nxos_facts fix and integration tests (#36796)

* fix nxos_facts ipv6 error

* time_range not supported for N35
This commit is contained in:
saichint 2018-02-27 21:15:50 -08:00 committed by Trishna Guha
parent 8d49bb6eee
commit db43fe6a76
4 changed files with 6 additions and 4 deletions

View file

@ -409,7 +409,11 @@ class Interfaces(FactsBase):
name = item['ROW_intf']['intf-name'] name = item['ROW_intf']['intf-name']
intf = self.facts['interfaces'][name] intf = self.facts['interfaces'][name]
intf['ipv6'] = self.transform_dict(item, self.INTERFACE_IPV6_MAP) intf['ipv6'] = self.transform_dict(item, self.INTERFACE_IPV6_MAP)
self.facts['all_ipv6_addresses'].append(item['ROW_intf']['addr']) try:
addr = item['ROW_intf']['addr']
except KeyError:
addr = item['ROW_intf']['TABLE_addr']['ROW_addr']['addr']
self.facts['all_ipv6_addresses'].append(addr)
else: else:
return "" return ""
except TypeError: except TypeError:

View file

@ -4,7 +4,7 @@
when: ansible_connection == "local" when: ansible_connection == "local"
- set_fact: time_range="ans-range" - set_fact: time_range="ans-range"
when: not ( platform is match("N5K")) when: not (platform is match("N5K")) and not (platform is match("N35"))
- name: "Setup: Cleanup possibly existing acl." - name: "Setup: Cleanup possibly existing acl."
nxos_acl: &remove nxos_acl: &remove

View file

@ -21,7 +21,6 @@
- assert: &fail - assert: &fail
that: that:
- "result.failed == true" - "result.failed == true"
- "'Invalid command' in result.msg"
- name: "Enable feature BGP" - name: "Enable feature BGP"
nxos_feature: nxos_feature:

View file

@ -21,7 +21,6 @@
- assert: &fail - assert: &fail
that: that:
- "result.failed == true" - "result.failed == true"
- "'Input CLI command error' in result.msg"
- name: "Enable feature BGP" - name: "Enable feature BGP"
nxos_feature: nxos_feature: