diff --git a/templates/cisco_asa_show_running-config_object_network.template b/templates/cisco_asa_show_running-config_object_network.template new file mode 100644 index 0000000000..be62466175 --- /dev/null +++ b/templates/cisco_asa_show_running-config_object_network.template @@ -0,0 +1,21 @@ +Value Required NAME (\S+) +Value DESC (.+) +Value TYPE ([hostubnerag]+) +Value HOST (\S+) +Value NETWORK (\S+) +Value MASK (\S+) +Value CIDR (\/\d+) +Value START_IP (\S+) +Value END_IP (\S+) + + +Start + ^object\s+network -> Continue.Record + ^object\s+network\s+${NAME}\s* + ^\s+description\s+${DESC}\s* + ^\s+${TYPE} -> Continue + ^\s+subnet\s+${NETWORK}\s+${MASK}\s* + ^\s+subnet\s+${NETWORK}${CIDR}\s* + ^\s+range\s+${START_IP}\s+${END_IP}\s* + ^\s+host\s+${HOST}\s* + ^. -> Error diff --git a/templates/index b/templates/index index fd34b9f503..0280a05e90 100644 --- a/templates/index +++ b/templates/index @@ -95,6 +95,7 @@ checkpoint_gaia_show_route.template, .*, checkpoint_gaia, show route checkpoint_gaia_show_lom.template, .*, checkpoint_gaia, show lom checkpoint_gaia_fw_stat.template, .*, checkpoint_gaia, fw stat +cisco_asa_show_running-config_object_network.template, .*, cisco_asa, sh[[ow]] ru[[nning-config]] o[[bject]] n[[etwork]] cisco_asa_show_asp_table_vpn-context_detail.template, .*, cisco_asa, sh[[ow]] asp t[[able]] vpn-co[[ntext]] d[[etail]] 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]] diff --git a/tests/cisco_asa/show_running-config_object_network/cisco_asa_show_running-config_object_network.parsed b/tests/cisco_asa/show_running-config_object_network/cisco_asa_show_running-config_object_network.parsed new file mode 100644 index 0000000000..dfc4ff4e73 --- /dev/null +++ b/tests/cisco_asa/show_running-config_object_network/cisco_asa_show_running-config_object_network.parsed @@ -0,0 +1,120 @@ +--- +parsed_sample: + +- name: "corp" + desc: "" + type: "subnet" + host: "" + network: "10.0.0.0" + mask: "255.0.0.0" + cidr: "" + start_ip: "" + end_ip: "" +- name: "internal" + desc: "" + type: "subnet" + host: "" + network: "192.168.0.0" + mask: "255.255.255.0" + cidr: "" + start_ip: "" + end_ip: "" +- name: "any" + desc: "" + type: "subnet" + host: "" + network: "0.0.0.0" + mask: "0.0.0.0" + cidr: "" + start_ip: "" + end_ip: "" +- name: "host-10.10.11.1" + desc: "" + type: "host" + host: "10.10.11.1" + network: "" + mask: "" + cidr: "" + start_ip: "" + end_ip: "" +- name: "block" + desc: "" + type: "host" + host: "10.75.51.11" + network: "" + mask: "" + cidr: "" + start_ip: "" + end_ip: "" +- name: "dmz" + desc: "dmz GW ip" + type: "host" + host: "11.1.2.2" + network: "" + mask: "" + cidr: "" + start_ip: "" + end_ip: "" +- name: "server-vip" + desc: "" + type: "host" + host: "10.1.11.8" + network: "" + mask: "" + cidr: "" + start_ip: "" + end_ip: "" +- name: "visitors" + desc: "" + type: "range" + host: "" + network: "" + mask: "" + cidr: "" + start_ip: "10.10.10.4" + end_ip: "10.10.10.60" +- name: "contractor" + desc: "" + type: "range" + host: "" + network: "" + mask: "" + cidr: "" + start_ip: "10.75.51.15" + end_ip: "10.75.51.100" +- name: "cloudflare-ipv6-dns-primary" + desc: "" + type: "host" + host: "2606:4700:4700::1111" + network: "" + mask: "" + cidr: "" + start_ip: "" + end_ip: "" +- name: "google-ipv6-dns-primary" + desc: "" + type: "host" + host: "2001:4860:4860::8888" + network: "" + mask: "" + cidr: "" + start_ip: "" + end_ip: "" +- name: "internal-ipv6-range" + desc: "" + type: "range" + host: "" + network: "" + mask: "" + cidr: "" + start_ip: "fd00::" + end_ip: "fd00::ffff" +- name: "internal-ipv6-subnet" + desc: "" + type: "subnet" + host: "" + network: "fd00::" + mask: "" + cidr: "/8" + start_ip: "" + end_ip: "" diff --git a/tests/cisco_asa/show_running-config_object_network/cisco_asa_show_running-config_object_network.raw b/tests/cisco_asa/show_running-config_object_network/cisco_asa_show_running-config_object_network.raw new file mode 100644 index 0000000000..3685195f39 --- /dev/null +++ b/tests/cisco_asa/show_running-config_object_network/cisco_asa_show_running-config_object_network.raw @@ -0,0 +1,27 @@ +object network corp + subnet 10.0.0.0 255.0.0.0 +object network internal + subnet 192.168.0.0 255.255.255.0 +object network any + subnet 0.0.0.0 0.0.0.0 +object network host-10.10.11.1 + host 10.10.11.1 +object network block + host 10.75.51.11 +object network dmz + description dmz GW ip + host 11.1.2.2 +object network server-vip + host 10.1.11.8 +object network visitors + range 10.10.10.4 10.10.10.60 +object network contractor + range 10.75.51.15 10.75.51.100 +object network cloudflare-ipv6-dns-primary + host 2606:4700:4700::1111 +object network google-ipv6-dns-primary + host 2001:4860:4860::8888 +object network internal-ipv6-range + range fd00:: fd00::ffff +object network internal-ipv6-subnet + subnet fd00::/8