Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
niels van hooij committed Aug 15, 2023
1 parent 07e2b11 commit 4da1bf9
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/genie/libs/parser/iosxe/show_run_dhcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,5 @@ def cli(self, output=None):
boot_file = m.groupdict()['boot_file']
dhcp_pools[pool_name]['boot_file'] = boot_file

logging.debug(dhcp_pools)
return dhcp_pools
Original file line number Diff line number Diff line change
@@ -1,19 +1,62 @@
expected_output = {
'TEST-1': {'networks': {
1: {'ip': '1.1.1.0', 'subnet_mask': '255.255.255.0', 'secondary': False}},
'dhcp_options': {1: {'option': '150', 'type': 'ip',
'data': '4.4.4.4 5.5.5.5'}},
'TEST-1': {
'boot_file': 'dapcfg.txt',
'dhcp_excludes': {
1: {'start': '1.1.1.2', 'end': '1.1.1.2'},
2: {'start': '1.1.1.3', 'end': '1.1.1.10'}},
'vrf': 'ABC', 'gateway': '1.1.1.1',
1: {
'end': '1.1.1.2',
'start': '1.1.1.2',
},
2: {
'end': '1.1.1.10',
'start': '1.1.1.3',
},
},
'dhcp_options': {
1: {
'data': '4.4.4.4 5.5.5.5',
'option': '150',
'type': 'ip',
},
},
'dns_servers': ['8.8.8.8', '9.9.9.9'],
'domain': 'TEST.com',
'gateway': '1.1.1.1',
'lease_time': '1',
'netbios_servers': ['2.2.2.2', '3.3.3.3'],
'lease_time': '1', 'domain': 'TEST.com'}, 'TEST-12': {
'networks': {
1: {'ip': '12.1.1.0', 'subnet_mask': '255.255.255.0', 'secondary': False}},
'dhcp_options': {1: {'option': '150', 'type': 'ip', 'data': '4.4.4.4 5.5.5.5'}},
'dhcp_excludes': {1: {'start': '12.1.1.200', 'end': '12.1.1.201'}},
'gateway': '1.1.1.1', 'dns_servers': ['8.8.8.8', '9.9.9.9'],
'netbios_servers': ['2.2.2.2', '3.3.3.3'], 'lease_time': '1',
'domain': 'TEST.com'}}
1: {
'ip': '1.1.1.0',
'secondary': False,
'subnet_mask': '255.255.255.0',
},
},
'vrf': 'ABC',
},
'TEST-12': {
'dhcp_excludes': {
1: {
'end': '12.1.1.201',
'start': '12.1.1.200',
},
},
'dhcp_options': {
1: {
'data': '4.4.4.4 5.5.5.5',
'option': '150',
'type': 'ip',
},
},
'dns_servers': ['8.8.8.8', '9.9.9.9'],
'domain': 'TEST.com',
'gateway': '1.1.1.1',
'lease_time': '1',
'netbios_servers': ['2.2.2.2', '3.3.3.3'],
'networks': {
1: {
'ip': '12.1.1.0',
'secondary': False,
'subnet_mask': '255.255.255.0',
},
},
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ no ip dhcp conflict logging
ip dhcp pool TEST-1
vrf ABC
network 1.1.1.0 255.255.255.0
bootfile dapcfg.txt
default-router 1.1.1.1
dns-server 8.8.8.8 9.9.9.9
netbios-name-server 2.2.2.2 3.3.3.3
Expand Down

0 comments on commit 4da1bf9

Please sign in to comment.