May-10-2017, 06:08 AM
So as I recently modified my script to now take input from Vendor-A (asa) to Vendor-C (palo alto), I'm seeing that I may be better off using a CLASS.
The issue is that any _one security policy_ could have
1) multiple protocols (IP/TCP/UDP/other)
2) one or multiple source addresses (or a group of addresses)
3) one or multiple destination addresses (or a group of addresses)
4) one or multiple service ports
5) a bunch of binary options (log/no-log, active/inactive, etc)
I've been RTFMing (https://python-forum.io/Thread-Class-Basics for example) but what's not clear is how do I handle the multiples? "Class Examples" often use a person, who does not have multiple attributes...(sure, maiden name, but that's typically a one-off and it's not last 4 maiden names).
So is it an array inside a class? I'm not sure what's the best method when (for example) the firewall service port could be one port (www) or 12 ports (80, 443, 3389, 3306, etc).
Thoughts, pointers, links
many thanks!
PappaBear
The issue is that any _one security policy_ could have
1) multiple protocols (IP/TCP/UDP/other)
2) one or multiple source addresses (or a group of addresses)
3) one or multiple destination addresses (or a group of addresses)
4) one or multiple service ports
5) a bunch of binary options (log/no-log, active/inactive, etc)
I've been RTFMing (https://python-forum.io/Thread-Class-Basics for example) but what's not clear is how do I handle the multiples? "Class Examples" often use a person, who does not have multiple attributes...(sure, maiden name, but that's typically a one-off and it's not last 4 maiden names).
So is it an array inside a class? I'm not sure what's the best method when (for example) the firewall service port could be one port (www) or 12 ports (80, 443, 3389, 3306, etc).
Thoughts, pointers, links
many thanks!
PappaBear