Skip to content

Commit

Permalink
ASA show run object network add fqdn (#1752)
Browse files Browse the repository at this point in the history
* fixed asa_show_run_object_network_fqdn_issue

* Fix test cases

---------

Co-authored-by: sureshvina <[email protected]>
  • Loading branch information
jmcgill298 and sureshvina authored Jul 23, 2024
1 parent b7a8202 commit 2fa7d8c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Value Required NAME (\S+)
Value DESCRIPTION (.+)
Value TYPE ([hostubnerag]+)
Value TYPE (host|subnet|range|fqdn)
Value HOST (\S+)
Value NETWORK (\S+)
Value NETMASK (\S+)
Value PREFIX_LENGTH (\d+)
Value START_IP (\S+)
Value END_IP (\S+)
Value FQDN (\S+)


Start
Expand All @@ -18,4 +19,5 @@ Start
^\s+subnet\s+${NETWORK}\/${PREFIX_LENGTH}\s*
^\s+range\s+${START_IP}\s+${END_IP}\s*
^\s+host\s+${HOST}\s*
^\s+fqdn\s+${FQDN}\s*
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ 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
description dmz GW ip
object network server-vip
host 10.1.11.8
object network visitors
Expand All @@ -25,3 +23,5 @@ object network internal-ipv6-range
range fd00:: fd00::ffff
object network internal-ipv6-subnet
subnet fd00::/8
object network fqdn_test
fqdn google.com
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
parsed_sample:
- description: ""
fqdn: ""
end_ip: ""
host: ""
name: "corp"
Expand All @@ -10,6 +11,7 @@ parsed_sample:
start_ip: ""
type: "subnet"
- description: ""
fqdn: ""
end_ip: ""
host: ""
name: "internal"
Expand All @@ -19,15 +21,7 @@ parsed_sample:
start_ip: ""
type: "subnet"
- description: ""
end_ip: ""
host: ""
name: "any"
netmask: "0.0.0.0"
network: "0.0.0.0"
prefix_length: ""
start_ip: ""
type: "subnet"
- description: ""
fqdn: ""
end_ip: ""
host: "10.10.11.1"
name: "host-10.10.11.1"
Expand All @@ -37,6 +31,7 @@ parsed_sample:
start_ip: ""
type: "host"
- description: ""
fqdn: ""
end_ip: ""
host: "10.75.51.11"
name: "block"
Expand All @@ -46,6 +41,7 @@ parsed_sample:
start_ip: ""
type: "host"
- description: "dmz GW ip"
fqdn: ""
end_ip: ""
host: "11.1.2.2"
name: "dmz"
Expand All @@ -55,6 +51,7 @@ parsed_sample:
start_ip: ""
type: "host"
- description: ""
fqdn: ""
end_ip: ""
host: "10.1.11.8"
name: "server-vip"
Expand All @@ -64,6 +61,7 @@ parsed_sample:
start_ip: ""
type: "host"
- description: ""
fqdn: ""
end_ip: "10.10.10.60"
host: ""
name: "visitors"
Expand All @@ -73,6 +71,7 @@ parsed_sample:
start_ip: "10.10.10.4"
type: "range"
- description: ""
fqdn: ""
end_ip: "10.75.51.100"
host: ""
name: "contractor"
Expand All @@ -82,6 +81,7 @@ parsed_sample:
start_ip: "10.75.51.15"
type: "range"
- description: ""
fqdn: ""
end_ip: ""
host: "2606:4700:4700::1111"
name: "cloudflare-ipv6-dns-primary"
Expand All @@ -91,6 +91,7 @@ parsed_sample:
start_ip: ""
type: "host"
- description: ""
fqdn: ""
end_ip: ""
host: "2001:4860:4860::8888"
name: "google-ipv6-dns-primary"
Expand All @@ -100,6 +101,7 @@ parsed_sample:
start_ip: ""
type: "host"
- description: ""
fqdn: ""
end_ip: "fd00::ffff"
host: ""
name: "internal-ipv6-range"
Expand All @@ -109,6 +111,7 @@ parsed_sample:
start_ip: "fd00::"
type: "range"
- description: ""
fqdn: ""
end_ip: ""
host: ""
name: "internal-ipv6-subnet"
Expand All @@ -117,3 +120,13 @@ parsed_sample:
prefix_length: "8"
start_ip: ""
type: "subnet"
- description: ""
fqdn: "google.com"
end_ip: ""
host: ""
name: "fqdn_test"
netmask: ""
network: ""
prefix_length: ""
start_ip: ""
type: "fqdn"

0 comments on commit 2fa7d8c

Please sign in to comment.