jedelman8/pycsco

Layer3 Interface params not available in nxos_get_interface

EvgeniyV opened this issue · 2 comments

Hi,
i have configured interface as Layer3

vars:
    - ipv4_if:
           name: Eth1/21
           mask:  22
           ip: 10.100.10.5
...
- name: set interface params for ipv4
  nxos_interface: host={{ inventory_hostname }} interface={{ ipv4_if.name }}   mode='layer3'
- name: set ipv4 interface params
  nxos_ipv4_interface: host={{ inventory_hostname }} interface={{ ipv4_if.name }} ip_addr={{ ipv4_if.ip }} mask={{ ipv4_if.mask }}
- name: get interface_ipv4 info
  nxos_get_interface: host={{ inventory_hostname }}  interface={{ ipv4_if.name}}
  register: v_if_ipv4_info
- debug: var=v_if_ipv4_info

But in debug variable v_if_ipv4_info i cant find ip and mask params
In Sandbox i see it:

           ...
          "eth_ip_addr": "10.100.10.5",
          "eth_ip_mask": 22,
           ...

as i understand no such mappings exists in method get_interface_detail of nxapi_lib.py

A function called get_ipv4_interface exists in nxapi_lib.py.

There is also an Ansible module called nxos_get_ipv4_interface. That said, we are in the process of combining nxos_get_interface and nxos_get_ipv4_interface.

Does this meet your requirements?

absolutely!
Thanks!