Fixes iosxr interfaces zuul failure (#61313)

* fixes 61311

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fix loopback

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
pull/61099/merge
Sumit Jaiswal 5 years ago committed by GitHub
parent e536d0e128
commit 30714682c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -79,13 +79,17 @@ class InterfacesFacts(object):
config = deepcopy(spec)
match = re.search(r'^(\S+)', conf)
if match.group(1).lower() == "preconfigure":
match = re.search(r'^(\S+ \S+)', conf)
intf = match.group(1)
if match.group(1).lower() == "preconfigure":
match = re.search(r'^(\S+) (.*)', conf)
if match:
intf = match.group(2)
if get_interface_type(intf) == 'unknown':
return {}
# populate the facts from the configuration
config['name'] = normalize_interface(intf)
config['name'] = intf
config['description'] = utils.parse_conf_arg(conf, 'description')
if utils.parse_conf_arg(conf, 'speed'):
config['speed'] = int(utils.parse_conf_arg(conf, 'speed'))

@ -2,9 +2,9 @@
merged:
before:
- enabled: true
name: loopback888
name: Loopback888
- enabled: true
name: loopback999
name: Loopback999
- description: this is interface0
enabled: true
mtu: 65
@ -30,9 +30,9 @@ merged:
after:
- enabled: true
name: loopback888
name: Loopback888
- enabled: true
name: loopback999
name: Loopback999
- description: Configured and Merged by Ansible-Network
duplex: half
enabled: true
@ -49,9 +49,9 @@ merged:
replaced:
before:
- enabled: true
name: loopback888
name: Loopback888
- enabled: true
name: loopback999
name: Loopback999
- description: this is interface0
enabled: true
mtu: 65
@ -75,9 +75,9 @@ replaced:
after:
- enabled: true
name: loopback888
name: Loopback888
- enabled: true
name: loopback999
name: Loopback999
- description: Configured and Replaced by Ansible-Network
enabled: true
mtu: 110
@ -90,9 +90,9 @@ replaced:
overridden:
before:
- enabled: true
name: loopback888
name: Loopback888
- enabled: true
name: loopback999
name: Loopback999
- description: this is interface0
enabled: true
mtu: 65
@ -118,9 +118,9 @@ overridden:
after:
- enabled: true
name: loopback888
name: Loopback888
- enabled: true
name: loopback999
name: Loopback999
- description: Configured and Overridden by Ansible-Network
duplex: full
enabled: false
@ -131,9 +131,9 @@ overridden:
deleted:
before:
- enabled: true
name: loopback888
name: Loopback888
- enabled: true
name: loopback999
name: Loopback999
- description: this is interface0
enabled: true
mtu: 65
@ -157,6 +157,6 @@ deleted:
after:
- enabled: true
name: loopback888
name: Loopback888
- enabled: true
name: loopback999
name: Loopback999

Loading…
Cancel
Save