Skip to content

Commit

Permalink
Restore 127.0.0.1 addresses in parse_c03_factory
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Oct 13, 2023
1 parent cb3da74 commit 2111388
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tests/test_Models_Cisco.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from ciscoconfparse.ccp_util import IPv4Obj, CiscoRange
import pytest

from loguru import logger

r""" test_Models_Cisco.py - Parse, Query, Build, and Modify IOS-style configs
Copyright (C) 2020-2021 David Michael Pennington at Cisco Systems
Expand Down Expand Up @@ -278,6 +280,8 @@ def testVal_IOSIntfLine_trunk_vlan_allowed_01():
]
cfg = CiscoConfParse(lines, factory=True)
intf_obj = cfg.find_objects("^interface")[0]
logger.critical(f"""{len(intf_obj.trunk_vlans_allowed.as_list) == len(range(1, 4095))}""")
assert len(intf_obj.trunk_vlans_allowed.as_list) == len(range(1, 4095))
assert intf_obj.trunk_vlans_allowed.as_list == list(range(1, 4095))


Expand Down Expand Up @@ -1057,17 +1061,17 @@ def testVal_IOSIntfLine_ipv4_addr_object01(parse_c03_factory):
result_correct = {
"interface Serial 1/0": IPv4Obj("1.1.1.1/30", strict=False),
"interface Serial 1/1": IPv4Obj("1.1.1.9/31", strict=False),
"interface GigabitEthernet4/1": IPv4Obj("0.0.0.1/32", strict=False),
"interface GigabitEthernet4/2": IPv4Obj("0.0.0.1/32", strict=False),
"interface GigabitEthernet4/3": IPv4Obj("0.0.0.1/32", strict=False),
"interface GigabitEthernet4/4": IPv4Obj("0.0.0.1/32", strict=False),
"interface GigabitEthernet4/5": IPv4Obj("0.0.0.1/32", strict=False),
"interface GigabitEthernet4/6": IPv4Obj("0.0.0.1/32", strict=False),
"interface GigabitEthernet4/7": IPv4Obj("0.0.0.1/32", strict=False),
"interface GigabitEthernet4/1": IPv4Obj("127.0.0.1/32", strict=False),
"interface GigabitEthernet4/2": IPv4Obj("127.0.0.1/32", strict=False),
"interface GigabitEthernet4/3": IPv4Obj("127.0.0.1/32", strict=False),
"interface GigabitEthernet4/4": IPv4Obj("127.0.0.1/32", strict=False),
"interface GigabitEthernet4/5": IPv4Obj("127.0.0.1/32", strict=False),
"interface GigabitEthernet4/6": IPv4Obj("127.0.0.1/32", strict=False),
"interface GigabitEthernet4/7": IPv4Obj("127.0.0.1/32", strict=False),
"interface GigabitEthernet4/8.120": IPv4Obj("1.1.2.254/24", strict=False),
"interface ATM5/0/0": IPv4Obj("0.0.0.1/32", strict=False),
"interface ATM5/0/0.32 point-to-point": IPv4Obj("1.1.1.5/30", strict=False),
"interface ATM5/0/1": IPv4Obj("0.0.0.1/32", strict=False),
"interface ATM5/0/1": IPv4Obj("127.0.0.1/32", strict=False),

# FIXME FIXME FIXME
#"interface ATM5/0/1": None,
Expand Down

0 comments on commit 2111388

Please sign in to comment.