-
Notifications
You must be signed in to change notification settings - Fork 163
Policy facts details #376
Policy facts details #376
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor things, but otherwise looks good!
library/panos_security_rule_facts.py
Outdated
@@ -72,6 +75,104 @@ | |||
returned: When I(rule_name) is not specified | |||
type: list | |||
sample: ['rule1', 'rule2', 'rule3'] | |||
rules_verbose: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your docstring says it's returning full policy details, so maybe change the output variable to policy
, as I think it would be nicer to see that in your playbook instead of rules_verbose
.
library/panos_security_rule_facts.py
Outdated
@@ -72,6 +75,104 @@ | |||
returned: When I(rule_name) is not specified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update this "returned" spec as you don't have a rules
output when all_details == True
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there I think
I'm sorry for the silly mistakes, I should have tested it before committing. It's now updated and tested with expected results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Declare module encoding * adding function to turn pandevice objects to dicts * adding panos_zone_facts * Module ipv4 proxyid for ipsec tunnel (#380) * Added module panos_ipsec_ipv4_proxyid * Fixed test build problem * Applied changes requested by @shinmog * Fix build problem * Additionally requested changes by @shinmog * adding panos_virtual_router_facts (#383) * fixing RETURNS section * adding panos_l3_subinterface (#384) * Correcting example documentation * adding panos_l2_subinterface (#385) * Policy facts details (#376) * Updated documentation for security_rule_facts * Documentation re-built * Get full details when querying all rules using 'all_details: yes' argument * Small fixes to panos_security_rule_facts * Bug fixes panos_security_rule_facts.py * Fixup for hyphens/dashes with extra bytes (#387) * Adding param: 'vsys_shared' (#388) * adding support for log forwarding profiles (#391) * adding support for log forwarding profiles * fixing code style issue * adding support for email profiles (#389) * adding support for snmp profiles (#392) * adding support for syslog profiles (#393) * adding support for syslog profiles * fixing code style issue * adding support for http profiles (#390) * correcting arg to vsys_shared * adding panos_type_cmd (#394) * Updating to 2.2.0 (#395)
So I wanted to be able to get all policy rules and the details of each rule. First I solved it by getting all rule names and then querying each rule by name. For 800 rules this took around 10 minutes to complete. I added the argument
all_details
to get all policy rules and the specific details at the same time. Now the playbook finish in ~10 seconds. Please let me know what you think.