Skip to content
Snippets Groups Projects

Feature/dboard3 833 handle inactive bundle config

Merged Erik Reid requested to merge feature/DBOARD3-833-handle-inactive-bundle-config into develop
3 files
+ 267
7
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -232,10 +232,10 @@ def list_interfaces(netconf_config):
def _ifc_info(e):
# warning: this structure should match the default
# returned from routes.classifier.juniper_link_info
name = e.find('name')
assert name is not None, "expected interface 'name' child element"
_name = e.find('name')
assert _name is not None, "expected interface 'name' child element"
ifc = {
'name': name.text,
'name': _name.text,
'description': '',
'bundle': [],
'speed': '' # set elsewhere but needs to be included to maintain default structure
@@ -244,12 +244,11 @@ def list_interfaces(netconf_config):
if description is not None:
ifc['description'] = description.text
for b in i.iterfind(".//bundle"):
ifc['bundle'].append(b.text)
ifc['bundle'] = e.xpath(
"./gigether-options[not(@inactive='inactive')]"
"/ieee-802.3ad[not(@inactive='inactive')]/bundle/text()")
ifc['ipv4'] = e.xpath('./family/inet/address/name/text()')
ifc['ipv6'] = e.xpath('./family/inet6/address/name/text()')
return ifc
def _inactive(interface_node):
Loading