-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modified cisco_asa_show_object-group_network.template #302
Modified cisco_asa_show_object-group_network.template #302
Conversation
…config object-group network` by making the colon in the description optional
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.
@Jaydubya35 I think what you are trying to do is accomplished with a regex in the last column of the output.
templates/index
Outdated
@@ -95,6 +95,7 @@ checkpoint_gaia_fw_stat.template, .*, checkpoint_gaia, fw stat | |||
cisco_asa_show_running-config_crypto_ikev1.template, .*, cisco_asa, sh[[ow]] ru[[nning-config]] cr[[ypto]] ikev1 | |||
cisco_asa_show_running-config_tunnel-group.template, .*, cisco_asa, sh[[ow]] ru[[nning-config]] tu[[nnel-group]] | |||
cisco_asa_show_running-config_crypto_map.template, .*, cisco_asa, sh[[ow]] ru[[nning-config]] cr[[ypto]] m[[ap]] | |||
cisco_asa_show_object-group_network.template, .*, cisco_asa, sh[[ow]] ru[[nning-config]] object-[[group]] n[[etwork]] |
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.
cisco_asa_show_object-group_network.template, .*, cisco_asa, sh[[ow]] ru[[nning-config]] object-[[group]] n[[etwork]] |
templates/index
Outdated
@@ -95,6 +95,7 @@ checkpoint_gaia_fw_stat.template, .*, checkpoint_gaia, fw stat | |||
cisco_asa_show_running-config_crypto_ikev1.template, .*, cisco_asa, sh[[ow]] ru[[nning-config]] cr[[ypto]] ikev1 | |||
cisco_asa_show_running-config_tunnel-group.template, .*, cisco_asa, sh[[ow]] ru[[nning-config]] tu[[nnel-group]] | |||
cisco_asa_show_running-config_crypto_map.template, .*, cisco_asa, sh[[ow]] ru[[nning-config]] cr[[ypto]] m[[ap]] | |||
cisco_asa_show_object-group_network.template, .*, cisco_asa, sh[[ow]] ru[[nning-config]] object-[[group]] n[[etwork]] | |||
cisco_asa_show_vpn-sessiondb_detail_l2l.template, .*, cisco_asa, sh[[ow]] vpn-[[sessiondb]] d[[etail]] l[[2l]] | |||
cisco_asa_show_crypto_ikev1_sa_detail.template, .*, cisco_asa, sh[[ow]] cry[[pto]] ikev1 sa d[[etail]] | |||
cisco_asa_show_object-group_network.template, .*, cisco_asa, sh[[ow]] ob[[ject-group]] n[[etwork]] |
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.
cisco_asa_show_object-group_network.template, .*, cisco_asa, sh[[ow]] ob[[ject-group]] n[[etwork]] | |
cisco_asa_show_object-group_network.template, .*, cisco_asa, sh[[ow]] (?:ru[[nning-config]] |)ob[[ject-group]] n[[etwork]] |
The problem with your suggestion is the difference between the minimum letters of the syntax "show object-group network" = As you can see object and object-group would conflict with your proposed single regex. If you would still like a combined regex for the single template, the logical OR would need to contain the full
Let me know if you would prefer it that way or the split way that I originally committed. |
How were you testing that my proposal doesn't work? I tested with the ntc_show_command Ansible module, and it was able to read the index file and locate the template for both commands. The branch as you currently have it does not have a template for |
… into cisco_asa_show_running-config_object-group_network
Sorry, I should have specified it has the potential to conflict with #306. In that PR I added Working example with your solution:
But, if the order was reversed (since longer commands should come first in the index file according to your own guidelines) it would no longer work as I have provided a new commit with this change. Please review and let me know your thoughts. |
The order needs to be maintained, but this should work: |
Are you sure? You have |
Sorry, I mixed up non-capturing and optional. Yes, it will work with |
* Modified `show object-group network` to also work with `show running-config object-group network` by making the colon in the description optional * Update index file to account for both versions of the command * Update test files to include additional data
ISSUE TYPE
COMPONENT
cisco_asa_show_object-group_network.template, cisco_asa, show object-group network
cisco_asa_show_object-group_network.template, cisco_asa, show running-config object-group network
SUMMARY
On the ASA, if you run
show object-group network
orshow running-config object-group network
you get the same output except for the colon after the worddescription
. I have modified the existing cisco_asa_show_object-group_network.template to accept the colon as an optional character for it to work for both commands.I plan to add the
show running-config object network
template soon, and didn't want theshow running-config object-group network
command to conflict.