From f4c4101e4104ce531bdb832f109c967277f03b89 Mon Sep 17 00:00:00 2001 From: mpenning Date: Tue, 14 Nov 2023 10:06:49 -0600 Subject: [PATCH] Update ipv4 address parsing with factory=True --- ciscoconfparse/models_iosxr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ciscoconfparse/models_iosxr.py b/ciscoconfparse/models_iosxr.py index aea58eb..ca41d2a 100644 --- a/ciscoconfparse/models_iosxr.py +++ b/ciscoconfparse/models_iosxr.py @@ -1023,12 +1023,12 @@ def ip_addr(self): def ipv4_addr(self): r"""Return a string with the interface's IPv4 address, or '' if there is none""" retval = self.re_match_iter_typed( - r"^\s+ip\s+address\s+(\d+\.\d+\.\d+\.\d+)\s+\d+\.\d+\.\d+\.\d+\s*$", + r"^\s+ipv4\s+address\s+(\d+\.\d+\.\d+\.\d+)\s+\d+\.\d+\.\d+\.\d+\s*$", result_type=str, default="", ) condition1 = self.re_match_iter_typed( - r"^\s+ip\s+address\s+(dhcp)\s*$", result_type=str, default="" + r"^\s+ipv4\s+address\s+(dhcp)\s*$", result_type=str, default="" ) if condition1.lower() == "dhcp": error = "Cannot parse address from a dhcp interface: {}".format(self.name) @@ -1040,7 +1040,7 @@ def ipv4_addr(self): def ipv4_netmask(self): r"""Return a string with the interface's IPv4 netmask, or '' if there is none""" retval = self.re_match_iter_typed( - r"^\s+ip\s+address\s+\d+\.\d+\.\d+\.\d+\s+(\d+\.\d+\.\d+\.\d+)\s*$", + r"^\s+ipv4\s+address\s+\d+\.\d+\.\d+\.\d+\s+(\d+\.\d+\.\d+\.\d+)\s*$", result_type=str, default="", )