From e59a67b1c523f1330afd1f2000e9f668d263e914 Mon Sep 17 00:00:00 2001 From: Peter Bruno Date: Wed, 20 Nov 2024 16:49:37 -0500 Subject: [PATCH 1/7] add support for IPv6 object groups addresses and masks --- .../templates/cisco_ios_show_object-group.textfsm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ntc_templates/templates/cisco_ios_show_object-group.textfsm b/ntc_templates/templates/cisco_ios_show_object-group.textfsm index cce83b80fc..9a4ddae1ef 100644 --- a/ntc_templates/templates/cisco_ios_show_object-group.textfsm +++ b/ntc_templates/templates/cisco_ios_show_object-group.textfsm @@ -1,13 +1,13 @@ -Value Required,Filldown TYPE (Service|Network) +Value Required,Filldown TYPE (Service|Network|V6-Service|V6-Network) Value Required,Filldown NAME (\S+) Value DESCRIPTION (.+) Value NESTED_GROUPS (\S+) Value ANY (any) -Value HOST (\d+\.\d+\.\d+\.\d+) +Value HOST (((\d+\.\d+\.\d+\.\d+)|([A-Fa-f0-9:]+:+)+[A-Fa-f0-9]+)) Value HOST_RANGE_START (\d+\.\d+\.\d+\.\d+) Value HOST_RANGE_END (\d+\.\d+\.\d+\.\d+) -Value NETWORK (\d+\.\d+\.\d+\.\d+) -Value NETMASK (\d+\.\d+\.\d+\.\d+) +Value NETWORK ((\d+\.\d+\.\d+\.\d+)|([A-Fa-f0-9:]+:+[A-Fa-f0-9:]+)) +Value NETMASK ((\d+\.\d+\.\d+\.\d+)|((?:\/\d{1,3}))) Value PROTOCOL (\S+) Value PORT_MATCH (eq|neq|range|lt|gt) Value PORT ((? Continue.Clearall + ^(Service|Network|V6-Service|V6-Network) -> Continue.Clearall ^${TYPE}\s+object\s+group\s+${NAME}\s*$$ -> Record ^\s+Description\s+${DESCRIPTION}$$ -> Record ^\s+group-object\s+${NESTED_GROUPS}\s*$$ -> Record - ^\s+(host\s+${HOST}|range\s+${HOST_RANGE_START}\s+${HOST_RANGE_END}|${ANY}|${NETWORK}\s+${NETMASK})\s*$$ -> Record + ^\s+(host\s+${HOST}|range\s+${HOST_RANGE_START}\s+${HOST_RANGE_END}|${ANY}|${NETWORK}\s*${NETMASK})\s*$$ -> Record ^\s+icmp\s+${ICMP_TYPE}\s*$$ -> Record ^\s+${PROTOCOL}\s+${PORT_MATCH}\s+(${PORT_RANGE_START}\s+${PORT_RANGE_END}|${PORT})\s*$$ -> Record ^\s+${PROTOCOL}\s*$$ -> Record From 053bdbd85e11c0bd4475f9a7d2053df6903f3275 Mon Sep 17 00:00:00 2001 From: Peter Bruno Date: Wed, 20 Nov 2024 17:12:12 -0500 Subject: [PATCH 2/7] added support for ipv6 icmp types --- ntc_templates/templates/cisco_ios_show_object-group.textfsm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntc_templates/templates/cisco_ios_show_object-group.textfsm b/ntc_templates/templates/cisco_ios_show_object-group.textfsm index 9a4ddae1ef..e3cf7db3ee 100644 --- a/ntc_templates/templates/cisco_ios_show_object-group.textfsm +++ b/ntc_templates/templates/cisco_ios_show_object-group.textfsm @@ -14,6 +14,7 @@ Value PORT ((? Continue.Clearall @@ -21,11 +22,10 @@ Start ^\s+Description\s+${DESCRIPTION}$$ -> Record ^\s+group-object\s+${NESTED_GROUPS}\s*$$ -> Record ^\s+(host\s+${HOST}|range\s+${HOST_RANGE_START}\s+${HOST_RANGE_END}|${ANY}|${NETWORK}\s*${NETMASK})\s*$$ -> Record - ^\s+icmp\s+${ICMP_TYPE}\s*$$ -> Record + ^\s+icmp\s+(${ICMP_TYPE}|${ICMP6_TYPE})\s*$$ -> Record ^\s+${PROTOCOL}\s+${PORT_MATCH}\s+(${PORT_RANGE_START}\s+${PORT_RANGE_END}|${PORT})\s*$$ -> Record ^\s+${PROTOCOL}\s*$$ -> Record ^\s*$$ ^. -> Error EOF - From 625414df4da9bcbf88f004179950cb8b04f0746c Mon Sep 17 00:00:00 2001 From: Peter Bruno Date: Wed, 20 Nov 2024 19:55:13 -0500 Subject: [PATCH 3/7] ipv6 tests --- .../cisco_ios_show_object-group-v6.raw | 9 ++ .../cisco_ios_show_object-group-v6.yml | 138 ++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw create mode 100644 tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml diff --git a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw new file mode 100644 index 0000000000..298e699fec --- /dev/null +++ b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw @@ -0,0 +1,9 @@ +V6-Network object group TEST-v6-obj + host 2001:db8::1:1111 + host 2001:db8::2:2222 + 2001:db8:111:1::/48 + 2001:db8:222:2::/48 +V6-Service object group TEST-v6-icmp + icmp echo-request + icmp echo-reply + \ No newline at end of file diff --git a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml new file mode 100644 index 0000000000..b9d4ae2917 --- /dev/null +++ b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml @@ -0,0 +1,138 @@ +--- +parsed_sample: + - ANY: '' + DESCRIPTION: '' + HOST: '' + HOST_RANGE_END: '' + HOST_RANGE_START: '' + ICMP6_TYPE: '' + ICMP_TYPE: '' + NAME: TEST-v6-icmp + NESTED_GROUPS: '' + NETMASK: '' + NETWORK: '' + PORT: '' + PORT_MATCH: '' + PORT_RANGE_END: '' + PORT_RANGE_START: '' + PROTOCOL: '' + TYPE: V6-Service + - ANY: '' + DESCRIPTION: '' + HOST: '' + HOST_RANGE_END: '' + HOST_RANGE_START: '' + ICMP6_TYPE: echo-request + ICMP_TYPE: '' + NAME: TEST-v6-icmp + NESTED_GROUPS: '' + NETMASK: '' + NETWORK: '' + PORT: '' + PORT_MATCH: '' + PORT_RANGE_END: '' + PORT_RANGE_START: '' + PROTOCOL: '' + TYPE: V6-Service + - ANY: '' + DESCRIPTION: '' + HOST: '' + HOST_RANGE_END: '' + HOST_RANGE_START: '' + ICMP6_TYPE: '' + ICMP_TYPE: echo-reply + NAME: TEST-v6-icmp + NESTED_GROUPS: '' + NETMASK: '' + NETWORK: '' + PORT: '' + PORT_MATCH: '' + PORT_RANGE_END: '' + PORT_RANGE_START: '' + PROTOCOL: '' + TYPE: V6-Service + - ANY: '' + DESCRIPTION: '' + HOST: '' + HOST_RANGE_END: '' + HOST_RANGE_START: '' + ICMP6_TYPE: '' + ICMP_TYPE: '' + NAME: TEST-v6-obj + NESTED_GROUPS: '' + NETMASK: '' + NETWORK: '' + PORT: '' + PORT_MATCH: '' + PORT_RANGE_END: '' + PORT_RANGE_START: '' + PROTOCOL: '' + TYPE: V6-Network + - ANY: '' + DESCRIPTION: '' + HOST: 2001:DB8::1:1111 + HOST_RANGE_END: '' + HOST_RANGE_START: '' + ICMP6_TYPE: '' + ICMP_TYPE: '' + NAME: TEST-v6-obj + NESTED_GROUPS: '' + NETMASK: '' + NETWORK: '' + PORT: '' + PORT_MATCH: '' + PORT_RANGE_END: '' + PORT_RANGE_START: '' + PROTOCOL: '' + TYPE: V6-Network + - ANY: '' + DESCRIPTION: '' + HOST: 2001:DB8::2:2222 + HOST_RANGE_END: '' + HOST_RANGE_START: '' + ICMP6_TYPE: '' + ICMP_TYPE: '' + NAME: TEST-v6-obj + NESTED_GROUPS: '' + NETMASK: '' + NETWORK: '' + PORT: '' + PORT_MATCH: '' + PORT_RANGE_END: '' + PORT_RANGE_START: '' + PROTOCOL: '' + TYPE: V6-Network + - ANY: '' + DESCRIPTION: '' + HOST: '' + HOST_RANGE_END: '' + HOST_RANGE_START: '' + ICMP6_TYPE: '' + ICMP_TYPE: '' + NAME: TEST-v6-obj + NESTED_GROUPS: '' + NETMASK: /48 + NETWORK: '2001:DB8:111:1::' + PORT: '' + PORT_MATCH: '' + PORT_RANGE_END: '' + PORT_RANGE_START: '' + PROTOCOL: '' + TYPE: V6-Network + - ANY: '' + DESCRIPTION: '' + HOST: '' + HOST_RANGE_END: '' + HOST_RANGE_START: '' + ICMP6_TYPE: '' + ICMP_TYPE: '' + NAME: TEST-v6-obj + NESTED_GROUPS: '' + NETMASK: /48 + NETWORK: '2001:DB8:222:2::' + PORT: '' + PORT_MATCH: '' + PORT_RANGE_END: '' + PORT_RANGE_START: '' + PROTOCOL: '' + TYPE: V6-Network \ No newline at end of file From 85fb3eda54ebeec6a867a9712cb6583f293f4512 Mon Sep 17 00:00:00 2001 From: Peter Bruno Date: Mon, 25 Nov 2024 17:22:39 -0500 Subject: [PATCH 4/7] fixed quote type for yamllint --- .../cisco_ios_show_object-group-v6.yml | 228 +++++++++--------- 1 file changed, 114 insertions(+), 114 deletions(-) diff --git a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml index b9d4ae2917..a106b86920 100644 --- a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml +++ b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml @@ -1,138 +1,138 @@ --- parsed_sample: - - ANY: '' - DESCRIPTION: '' - HOST: '' - HOST_RANGE_END: '' - HOST_RANGE_START: '' - ICMP6_TYPE: '' - ICMP_TYPE: '' + - ANY: "" + DESCRIPTION: "" + HOST: "" + HOST_RANGE_END: "" + HOST_RANGE_START: "" + ICMP6_TYPE: "" + ICMP_TYPE: "" NAME: TEST-v6-icmp - NESTED_GROUPS: '' - NETMASK: '' - NETWORK: '' - PORT: '' - PORT_MATCH: '' - PORT_RANGE_END: '' - PORT_RANGE_START: '' - PROTOCOL: '' + NESTED_GROUPS: "" + NETMASK: "" + NETWORK: "" + PORT: "" + PORT_MATCH: "" + PORT_RANGE_END: "" + PORT_RANGE_START: "" + PROTOCOL: "" TYPE: V6-Service - - ANY: '' - DESCRIPTION: '' - HOST: '' - HOST_RANGE_END: '' - HOST_RANGE_START: '' + - ANY: "" + DESCRIPTION: "" + HOST: "" + HOST_RANGE_END: "" + HOST_RANGE_START: "" ICMP6_TYPE: echo-request - ICMP_TYPE: '' + ICMP_TYPE: "" NAME: TEST-v6-icmp - NESTED_GROUPS: '' - NETMASK: '' - NETWORK: '' - PORT: '' - PORT_MATCH: '' - PORT_RANGE_END: '' - PORT_RANGE_START: '' - PROTOCOL: '' + NESTED_GROUPS: "" + NETMASK: "" + NETWORK: "" + PORT: "" + PORT_MATCH: "" + PORT_RANGE_END: "" + PORT_RANGE_START: "" + PROTOCOL: "" TYPE: V6-Service - - ANY: '' - DESCRIPTION: '' - HOST: '' - HOST_RANGE_END: '' - HOST_RANGE_START: '' - ICMP6_TYPE: '' + - ANY: "" + DESCRIPTION: "" + HOST: "" + HOST_RANGE_END: "" + HOST_RANGE_START: "" + ICMP6_TYPE: "" ICMP_TYPE: echo-reply NAME: TEST-v6-icmp - NESTED_GROUPS: '' - NETMASK: '' - NETWORK: '' - PORT: '' - PORT_MATCH: '' - PORT_RANGE_END: '' - PORT_RANGE_START: '' - PROTOCOL: '' + NESTED_GROUPS: "" + NETMASK: "" + NETWORK: "" + PORT: "" + PORT_MATCH: "" + PORT_RANGE_END: "" + PORT_RANGE_START: "" + PROTOCOL: "" TYPE: V6-Service - - ANY: '' - DESCRIPTION: '' - HOST: '' - HOST_RANGE_END: '' - HOST_RANGE_START: '' - ICMP6_TYPE: '' - ICMP_TYPE: '' + - ANY: "" + DESCRIPTION: "" + HOST: "" + HOST_RANGE_END: "" + HOST_RANGE_START: "" + ICMP6_TYPE: "" + ICMP_TYPE: "" NAME: TEST-v6-obj - NESTED_GROUPS: '' - NETMASK: '' - NETWORK: '' - PORT: '' - PORT_MATCH: '' - PORT_RANGE_END: '' - PORT_RANGE_START: '' - PROTOCOL: '' + NESTED_GROUPS: "" + NETMASK: "" + NETWORK: "" + PORT: "" + PORT_MATCH: "" + PORT_RANGE_END: "" + PORT_RANGE_START: "" + PROTOCOL: "" TYPE: V6-Network - - ANY: '' - DESCRIPTION: '' + - ANY: "" + DESCRIPTION: "" HOST: 2001:DB8::1:1111 - HOST_RANGE_END: '' - HOST_RANGE_START: '' - ICMP6_TYPE: '' - ICMP_TYPE: '' + HOST_RANGE_END: "" + HOST_RANGE_START: "" + ICMP6_TYPE: "" + ICMP_TYPE: "" NAME: TEST-v6-obj - NESTED_GROUPS: '' - NETMASK: '' - NETWORK: '' - PORT: '' - PORT_MATCH: '' - PORT_RANGE_END: '' - PORT_RANGE_START: '' - PROTOCOL: '' + NESTED_GROUPS: "" + NETMASK: "" + NETWORK: "" + PORT: "" + PORT_MATCH: "" + PORT_RANGE_END: "" + PORT_RANGE_START: "" + PROTOCOL: "" TYPE: V6-Network - - ANY: '' - DESCRIPTION: '' + - ANY: "" + DESCRIPTION: "" HOST: 2001:DB8::2:2222 - HOST_RANGE_END: '' - HOST_RANGE_START: '' - ICMP6_TYPE: '' - ICMP_TYPE: '' + HOST_RANGE_END: "" + HOST_RANGE_START: "" + ICMP6_TYPE: "" + ICMP_TYPE: "" NAME: TEST-v6-obj - NESTED_GROUPS: '' - NETMASK: '' - NETWORK: '' - PORT: '' - PORT_MATCH: '' - PORT_RANGE_END: '' - PORT_RANGE_START: '' - PROTOCOL: '' + NESTED_GROUPS: "" + NETMASK: "" + NETWORK: "" + PORT: "" + PORT_MATCH: "" + PORT_RANGE_END: "" + PORT_RANGE_START: "" + PROTOCOL: "" TYPE: V6-Network - - ANY: '' - DESCRIPTION: '' - HOST: '' - HOST_RANGE_END: '' - HOST_RANGE_START: '' - ICMP6_TYPE: '' - ICMP_TYPE: '' + - ANY: "" + DESCRIPTION: "" + HOST: "" + HOST_RANGE_END: "" + HOST_RANGE_START: "" + ICMP6_TYPE: "" + ICMP_TYPE: "" NAME: TEST-v6-obj - NESTED_GROUPS: '' + NESTED_GROUPS: "" NETMASK: /48 - NETWORK: '2001:DB8:111:1::' - PORT: '' - PORT_MATCH: '' - PORT_RANGE_END: '' - PORT_RANGE_START: '' - PROTOCOL: '' + NETWORK: "2001:DB8:111:1::" + PORT: "" + PORT_MATCH: "" + PORT_RANGE_END: "" + PORT_RANGE_START: "" + PROTOCOL: "" TYPE: V6-Network - - ANY: '' - DESCRIPTION: '' - HOST: '' - HOST_RANGE_END: '' - HOST_RANGE_START: '' - ICMP6_TYPE: '' - ICMP_TYPE: '' + - ANY: "" + DESCRIPTION: "" + HOST: "" + HOST_RANGE_END: "" + HOST_RANGE_START: "" + ICMP6_TYPE: "" + ICMP_TYPE: "" NAME: TEST-v6-obj - NESTED_GROUPS: '' + NESTED_GROUPS: "" NETMASK: /48 - NETWORK: '2001:DB8:222:2::' - PORT: '' - PORT_MATCH: '' - PORT_RANGE_END: '' - PORT_RANGE_START: '' - PROTOCOL: '' + NETWORK: "2001:DB8:222:2::" + PORT: "" + PORT_MATCH: "" + PORT_RANGE_END: "" + PORT_RANGE_START: "" + PROTOCOL: "" TYPE: V6-Network \ No newline at end of file From f465033fc09a398989985876b0a863a8480b213f Mon Sep 17 00:00:00 2001 From: Peter Bruno Date: Tue, 26 Nov 2024 15:58:20 -0500 Subject: [PATCH 5/7] Update tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- .../show_object-group/cisco_ios_show_object-group-v6.raw | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw index 298e699fec..bd8932f03c 100644 --- a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw +++ b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw @@ -5,5 +5,4 @@ V6-Network object group TEST-v6-obj 2001:db8:222:2::/48 V6-Service object group TEST-v6-icmp icmp echo-request - icmp echo-reply - \ No newline at end of file + icmp echo-reply \ No newline at end of file From 65d74f531b09cd69f4ab815d66cb9a82c83041ef Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Tue, 26 Nov 2024 19:41:49 -0500 Subject: [PATCH 6/7] Remove IPv6 forward slash and lowercase YAML keys --- .../cisco_ios_show_object-group.textfsm | 4 +- .../cisco_ios_show_object-group-v6.yml | 272 ++++---- .../cisco_ios_show_object-group.yml | 651 +++++++++--------- 3 files changed, 479 insertions(+), 448 deletions(-) diff --git a/ntc_templates/templates/cisco_ios_show_object-group.textfsm b/ntc_templates/templates/cisco_ios_show_object-group.textfsm index e3cf7db3ee..fe2f46313d 100644 --- a/ntc_templates/templates/cisco_ios_show_object-group.textfsm +++ b/ntc_templates/templates/cisco_ios_show_object-group.textfsm @@ -7,7 +7,7 @@ Value HOST (((\d+\.\d+\.\d+\.\d+)|([A-Fa-f0-9:]+:+)+[A-Fa-f0-9]+)) Value HOST_RANGE_START (\d+\.\d+\.\d+\.\d+) Value HOST_RANGE_END (\d+\.\d+\.\d+\.\d+) Value NETWORK ((\d+\.\d+\.\d+\.\d+)|([A-Fa-f0-9:]+:+[A-Fa-f0-9:]+)) -Value NETMASK ((\d+\.\d+\.\d+\.\d+)|((?:\/\d{1,3}))) +Value NETMASK ((\d+\.\d+\.\d+\.\d+)|((?:\d{1,3}))) Value PROTOCOL (\S+) Value PORT_MATCH (eq|neq|range|lt|gt) Value PORT ((? Record ^\s+Description\s+${DESCRIPTION}$$ -> Record ^\s+group-object\s+${NESTED_GROUPS}\s*$$ -> Record - ^\s+(host\s+${HOST}|range\s+${HOST_RANGE_START}\s+${HOST_RANGE_END}|${ANY}|${NETWORK}\s*${NETMASK})\s*$$ -> Record + ^\s+(host\s+${HOST}|range\s+${HOST_RANGE_START}\s+${HOST_RANGE_END}|${ANY}|${NETWORK}\s*/?${NETMASK})\s*$$ -> Record ^\s+icmp\s+(${ICMP_TYPE}|${ICMP6_TYPE})\s*$$ -> Record ^\s+${PROTOCOL}\s+${PORT_MATCH}\s+(${PORT_RANGE_START}\s+${PORT_RANGE_END}|${PORT})\s*$$ -> Record ^\s+${PROTOCOL}\s*$$ -> Record diff --git a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml index a106b86920..87fe4a5986 100644 --- a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml +++ b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.yml @@ -1,138 +1,138 @@ --- parsed_sample: - - ANY: "" - DESCRIPTION: "" - HOST: "" - HOST_RANGE_END: "" - HOST_RANGE_START: "" - ICMP6_TYPE: "" - ICMP_TYPE: "" - NAME: TEST-v6-icmp - NESTED_GROUPS: "" - NETMASK: "" - NETWORK: "" - PORT: "" - PORT_MATCH: "" - PORT_RANGE_END: "" - PORT_RANGE_START: "" - PROTOCOL: "" - TYPE: V6-Service - - ANY: "" - DESCRIPTION: "" - HOST: "" - HOST_RANGE_END: "" - HOST_RANGE_START: "" - ICMP6_TYPE: echo-request - ICMP_TYPE: "" - NAME: TEST-v6-icmp - NESTED_GROUPS: "" - NETMASK: "" - NETWORK: "" - PORT: "" - PORT_MATCH: "" - PORT_RANGE_END: "" - PORT_RANGE_START: "" - PROTOCOL: "" - TYPE: V6-Service - - ANY: "" - DESCRIPTION: "" - HOST: "" - HOST_RANGE_END: "" - HOST_RANGE_START: "" - ICMP6_TYPE: "" - ICMP_TYPE: echo-reply - NAME: TEST-v6-icmp - NESTED_GROUPS: "" - NETMASK: "" - NETWORK: "" - PORT: "" - PORT_MATCH: "" - PORT_RANGE_END: "" - PORT_RANGE_START: "" - PROTOCOL: "" - TYPE: V6-Service - - ANY: "" - DESCRIPTION: "" - HOST: "" - HOST_RANGE_END: "" - HOST_RANGE_START: "" - ICMP6_TYPE: "" - ICMP_TYPE: "" - NAME: TEST-v6-obj - NESTED_GROUPS: "" - NETMASK: "" - NETWORK: "" - PORT: "" - PORT_MATCH: "" - PORT_RANGE_END: "" - PORT_RANGE_START: "" - PROTOCOL: "" - TYPE: V6-Network - - ANY: "" - DESCRIPTION: "" - HOST: 2001:DB8::1:1111 - HOST_RANGE_END: "" - HOST_RANGE_START: "" - ICMP6_TYPE: "" - ICMP_TYPE: "" - NAME: TEST-v6-obj - NESTED_GROUPS: "" - NETMASK: "" - NETWORK: "" - PORT: "" - PORT_MATCH: "" - PORT_RANGE_END: "" - PORT_RANGE_START: "" - PROTOCOL: "" - TYPE: V6-Network - - ANY: "" - DESCRIPTION: "" - HOST: 2001:DB8::2:2222 - HOST_RANGE_END: "" - HOST_RANGE_START: "" - ICMP6_TYPE: "" - ICMP_TYPE: "" - NAME: TEST-v6-obj - NESTED_GROUPS: "" - NETMASK: "" - NETWORK: "" - PORT: "" - PORT_MATCH: "" - PORT_RANGE_END: "" - PORT_RANGE_START: "" - PROTOCOL: "" - TYPE: V6-Network - - ANY: "" - DESCRIPTION: "" - HOST: "" - HOST_RANGE_END: "" - HOST_RANGE_START: "" - ICMP6_TYPE: "" - ICMP_TYPE: "" - NAME: TEST-v6-obj - NESTED_GROUPS: "" - NETMASK: /48 - NETWORK: "2001:DB8:111:1::" - PORT: "" - PORT_MATCH: "" - PORT_RANGE_END: "" - PORT_RANGE_START: "" - PROTOCOL: "" - TYPE: V6-Network - - ANY: "" - DESCRIPTION: "" - HOST: "" - HOST_RANGE_END: "" - HOST_RANGE_START: "" - ICMP6_TYPE: "" - ICMP_TYPE: "" - NAME: TEST-v6-obj - NESTED_GROUPS: "" - NETMASK: /48 - NETWORK: "2001:DB8:222:2::" - PORT: "" - PORT_MATCH: "" - PORT_RANGE_END: "" - PORT_RANGE_START: "" - PROTOCOL: "" - TYPE: V6-Network \ No newline at end of file + - any: "" + description: "" + host: "" + host_range_end: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-v6-obj" + nested_groups: "" + netmask: "" + network: "" + port: "" + port_match: "" + port_range_end: "" + port_range_start: "" + protocol: "" + type: "V6-Network" + - any: "" + description: "" + host: "2001:db8::1:1111" + host_range_end: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-v6-obj" + nested_groups: "" + netmask: "" + network: "" + port: "" + port_match: "" + port_range_end: "" + port_range_start: "" + protocol: "" + type: "V6-Network" + - any: "" + description: "" + host: "2001:db8::2:2222" + host_range_end: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-v6-obj" + nested_groups: "" + netmask: "" + network: "" + port: "" + port_match: "" + port_range_end: "" + port_range_start: "" + protocol: "" + type: "V6-Network" + - any: "" + description: "" + host: "" + host_range_end: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-v6-obj" + nested_groups: "" + netmask: "48" + network: "2001:db8:111:1::" + port: "" + port_match: "" + port_range_end: "" + port_range_start: "" + protocol: "" + type: "V6-Network" + - any: "" + description: "" + host: "" + host_range_end: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-v6-obj" + nested_groups: "" + netmask: "48" + network: "2001:db8:222:2::" + port: "" + port_match: "" + port_range_end: "" + port_range_start: "" + protocol: "" + type: "V6-Network" + - any: "" + description: "" + host: "" + host_range_end: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-v6-icmp" + nested_groups: "" + netmask: "" + network: "" + port: "" + port_match: "" + port_range_end: "" + port_range_start: "" + protocol: "" + type: "V6-Service" + - any: "" + description: "" + host: "" + host_range_end: "" + host_range_start: "" + icmp6_type: "echo-request" + icmp_type: "" + name: "TEST-v6-icmp" + nested_groups: "" + netmask: "" + network: "" + port: "" + port_match: "" + port_range_end: "" + port_range_start: "" + protocol: "" + type: "V6-Service" + - any: "" + description: "" + host: "" + host_range_end: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "echo-reply" + name: "TEST-v6-icmp" + nested_groups: "" + netmask: "" + network: "" + port: "" + port_match: "" + port_range_end: "" + port_range_start: "" + protocol: "" + type: "V6-Service" diff --git a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group.yml b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group.yml index 562100bd28..1f970527f6 100644 --- a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group.yml +++ b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group.yml @@ -1,498 +1,529 @@ --- parsed_sample: - - type: "Network" - name: "NNNN" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "NNNN" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "SSSS" + port_range_start: "" + protocol: "" + type: "Network" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "SSSS" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "" + type: "Service" + - any: "" description: "! Test Service Group !" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "echo-reply" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "echo-reply" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "tcp" - port_match: "eq" + network: "" port: "smtp" - port_range_start: "" + port_match: "eq" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "tcp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "udp" - port_match: "eq" + network: "" port: "tacacs" - port_range_start: "" + port_match: "eq" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "udp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "udp" - port_match: "range" + network: "" port: "" - port_range_start: "tacacs" + port_match: "range" port_range_end: "50" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "tacacs" + protocol: "udp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "tcp" - port_match: "range" + network: "" port: "" - port_range_start: "79" + port_match: "range" port_range_end: "www" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "79" + protocol: "tcp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "tcp" - port_match: "eq" + network: "" port: "www" - port_range_start: "" + port_match: "eq" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "tcp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "tcp" - port_match: "eq" + network: "" port: "81" - port_range_start: "" + port_match: "eq" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "tcp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "udp" - port_match: "lt" + network: "" port: "999" - port_range_start: "" + port_match: "lt" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "udp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "udp" - port_match: "gt" + network: "" port: "97" - port_range_start: "" + port_match: "gt" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "udp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "tcp-udp" - port_match: "range" + network: "" port: "" - port_range_start: "12200" + port_match: "range" port_range_end: "12700" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "12200" + protocol: "tcp-udp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "icmp" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "icmp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "tcp" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "tcp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "udp" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "udp" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "tcp-udp" - port_match: "range" + network: "" port: "" - port_range_start: "0" + port_match: "range" port_range_end: "65535" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "0" + protocol: "tcp-udp" + type: "Service" + - any: "" description: "" - nested_groups: "SSSS" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "SSSS" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "ip" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "ip" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "ipinip" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Service" - name: "TEST-SVC-OGR" + port_range_start: "" + protocol: "ipinip" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST-SVC-OGR" + nested_groups: "" netmask: "" - protocol: "99" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Network" - name: "TEST_NET_OGR" + port_range_start: "" + protocol: "99" + type: "Service" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST_NET_OGR" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Network" - name: "TEST_NET_OGR" + port_range_start: "" + protocol: "" + type: "Network" + - any: "" description: "###TEST NETWORK OGR###" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST_NET_OGR" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Network" - name: "TEST_NET_OGR" + port_range_start: "" + protocol: "" + type: "Network" + - any: "any" description: "" - nested_groups: "" - any: "any" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST_NET_OGR" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Network" - name: "TEST_NET_OGR" + port_range_start: "" + protocol: "" + type: "Network" + - any: "" description: "" - nested_groups: "" - any: "" host: "1.1.1.1" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST_NET_OGR" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Network" - name: "TEST_NET_OGR" + port_range_start: "" + protocol: "" + type: "Network" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "2.2.2.2" host_range_end: "3.3.3.3" - network: "" + host_range_start: "2.2.2.2" + icmp6_type: "" + icmp_type: "" + name: "TEST_NET_OGR" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Network" - name: "TEST_NET_OGR" + port_range_start: "" + protocol: "" + type: "Network" + - any: "" description: "" - nested_groups: "NNNN" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST_NET_OGR" + nested_groups: "NNNN" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Network" - name: "TEST_NET_OGR" + port_range_start: "" + protocol: "" + type: "Network" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "1.1.1.0" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "TEST_NET_OGR" + nested_groups: "" netmask: "255.255.255.0" - protocol: "" - port_match: "" + network: "1.1.1.0" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Network" - name: "XXXX" + port_range_start: "" + protocol: "" + type: "Network" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "XXXX" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" - - type: "Network" - name: "YYYY" + port_range_start: "" + protocol: "" + type: "Network" + - any: "" description: "" - nested_groups: "" - any: "" host: "" - host_range_start: "" host_range_end: "" - network: "" + host_range_start: "" + icmp6_type: "" + icmp_type: "" + name: "YYYY" + nested_groups: "" netmask: "" - protocol: "" - port_match: "" + network: "" port: "" - port_range_start: "" + port_match: "" port_range_end: "" - icmp_type: "" + port_range_start: "" + protocol: "" + type: "Network" From db32318cc57a90a59f7673343ea1965ae564fa71 Mon Sep 17 00:00:00 2001 From: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:09:10 -0500 Subject: [PATCH 7/7] Update tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw --- .../show_object-group/cisco_ios_show_object-group-v6.raw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw index bd8932f03c..dd95f4f650 100644 --- a/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw +++ b/tests/cisco_ios/show_object-group/cisco_ios_show_object-group-v6.raw @@ -5,4 +5,4 @@ V6-Network object group TEST-v6-obj 2001:db8:222:2::/48 V6-Service object group TEST-v6-icmp icmp echo-request - icmp echo-reply \ No newline at end of file + icmp echo-reply