Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Schema fetch requires "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring" capability #46

Open
alkarp opened this issue Jun 20, 2019 · 0 comments

Comments

@alkarp
Copy link

alkarp commented Jun 20, 2019

ISSUE TYPE

  • Bug Report

ANSIBLE VERSION

ansible --version
ansible 2.8.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Apr  9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

ansible-galaxy list | grep ansible.network
- ansible-network.yang, v2.7.1
- ansible-network.cisco_nxos, v2.7.1
- ansible-network.network-engine, v2.7.5

Network OS

  • Operating System (inc version) of machine running Ansible: CentOS Linux 7 (Core), Linux version 4.9.125-linuxkit
  • Network device make/model, including version: Cisco C93180YC-FX Chassis, NX-OS version 9.2(3)

SUMMARY

yang_fetch.py fails to fetch available schemes from the devices those do not support "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring" capability. For example the subject NX-OS devices.

STEPS TO REPRODUCE

---
- hosts: nxos
  connection: netconf

  tasks:
  - name: include yang role
    include_role:
      name: ansible-network.yang
      tasks_from: spec
    loop:
       - openconfig-interfaces
       - openconfig-bgp
    loop_control:
      loop_var: yang_model_name
    vars:
      ansible_network_provider: cisco_nxos
      yang_netconf_enable_task_run: false

EXPECTED RESULTS

Retrieve 'openconfig-interfaces' and dependent yang modules from host and store in directory '~/.ansible/yang/fetch'

ACTUAL RESULTS

ansible-playbook 2.8.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Apr  9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /data/Playground/inventory/test/hosts as it did not pass it's verify_file() method
auto declined parsing /data/Playground/inventory/test/hosts as it did not pass it's verify_file() method
Parsed /data/Playground/inventory/test/hosts inventory source with yaml plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc

PLAYBOOK: generate_spec.yml ***************************************************************************************************************************************************************************************************************************************************
Positional arguments: generate_spec.yml
become_method: sudo
inventory: (u'/data/Playground/inventory/test',)
forks: 5
tags: (u'all',)
verbosity: 4
connection: smart
timeout: 10
1 plays in generate_spec.yml

PLAY [nxos] *******************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************************************************
task path: /data/Playground/generate_spec.yml:2
<172.16.100.101> attempting to start connection
<172.16.100.101> using connection plugin netconf
<172.16.100.101> local domain socket does not exist, starting it
<172.16.100.101> control socket path is /root/.ansible/pc/96abefe666
<172.16.100.101> connection to remote device started successfully
<172.16.100.101> local domain socket listeners started successfully
unable to load netconf plugin for network_os nxos, falling back to default plugin
<172.16.100.101> ESTABLISH NETCONF SSH CONNECTION FOR USER: admin on PORT 830 TO 172.16.100.101
<172.16.100.101>
<172.16.100.101> local domain socket path is /root/.ansible/pc/96abefe666
<172.16.100.101> ESTABLISH LOCAL CONNECTION FOR USER: root
<172.16.100.101> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037574.49-72387095530864 `" && echo ansible-tmp-1561037574.49-72387095530864="` echo /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-15610
37574.49-72387095530864 `" ) && sleep 0'
<172.16.100.101> Attempting python interpreter discovery
<172.16.100.101> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; comma
nd -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
<172.16.100.101> Python interpreter discovery fallback (pipelining support required for extended interpreter discovery)
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py
<172.16.100.101> PUT /root/.ansible/tmp/ansible-local-1014dwva9E/tmp8xzon8 TO /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037574.49-72387095530864/AnsiballZ_setup.py
<172.16.100.101> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037574.49-72387095530864/ /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037574.49-72387095530864/AnsiballZ_setup.py && sleep 0'
<172.16.100.101> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037574.49-72387095530864/AnsiballZ_setup.py && sleep 0'
ok: [172.16.100.101] => {
    "ansible_facts": {
        "ansible_apparmor": {
            "status": "disabled"
        },
        "ansible_architecture": "x86_64",
        "ansible_bios_date": "08/26/2016",
        "ansible_bios_version": "Hyper-V UEFI Release v2.0",
        "ansible_cmdline": {
            "BOOT_IMAGE": "/boot/kernel",
            "console": "ttyS0",
            "page_poison": "1",
            "panic": "1",
            "root": "/dev/sr0",
            "text": true,
            "vsyscall": "emulate"
        },
        "ansible_date_time": {
            "date": "2019-06-20",
            "day": "20",
            "epoch": "1561037581",
            "hour": "13",
            "iso8601": "2019-06-20T13:33:01Z",
            "iso8601_basic": "20190620T133301233579",
            "iso8601_basic_short": "20190620T133301",
            "iso8601_micro": "2019-06-20T13:33:01.242342Z",
            "minute": "33",
            "month": "06",
            "second": "01",
            "time": "13:33:01",
            "tz": "UTC",
            "tz_offset": "+0000",
            "weekday": "Thursday",
            "weekday_number": "4",
            "weeknumber": "24",
            "year": "2019"
        },
        "ansible_device_links": {
            "ids": {},
            "labels": {},
            "masters": {},
            "uuids": {}
        },
        "ansible_devices": {
            "loop0": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "0",
                "vendor": null,
                "virtual": 1
            },
            "loop1": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "0",
                "vendor": null,
                "virtual": 1
            },
            "loop2": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "0",
                "vendor": null,
                "virtual": 1
            },
            "loop3": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "0",
                "vendor": null,
                "virtual": 1
            },
            "loop4": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "0",
                "vendor": null,
                "virtual": 1
            },
            "loop5": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "0",
                "vendor": null,
                "virtual": 1
            },
            "loop6": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "0",
                "vendor": null,
                "virtual": 1
            },
            "loop7": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "0",
                "vendor": null,
                "virtual": 1
            },
            "nbd0": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd1": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd10": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd11": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd12": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd13": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd14": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd15": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd2": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd3": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd4": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd5": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd6": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd7": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd8": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "nbd9": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": null,
                "partitions": {},
                "removable": "0",
                "rotational": "0",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "",
                "sectors": "0",
                "sectorsize": "512",
                "size": "0.00 Bytes",
                "support_discard": "512",
                "vendor": null,
                "virtual": 1
            },
            "sda": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": "Virtual Disk",
                "partitions": {
                    "sda1": {
                        "holders": [],
                        "links": {
                            "ids": [],
                            "labels": [],
                            "masters": [],
                            "uuids": []
                        },
                        "sectors": "125827072",
                        "sectorsize": 512,
                        "size": "60.00 GB",
                        "start": "2048",
                        "uuid": null
                    }
                },
                "removable": "0",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "deadline",
                "sectors": "125829120",
                "sectorsize": "512",
                "size": "60.00 GB",
                "support_discard": "1048576",
                "vendor": "Msft",
                "virtual": 1
            },
            "sr0": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": "Virtual DVD-ROM",
                "partitions": {},
                "removable": "1",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "deadline",
                "sectors": "961596",
                "sectorsize": "2048",
                "size": "469.53 MB",
                "support_discard": "0",
                "vendor": "Msft",
                "virtual": 1
            },
            "sr1": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": "Virtual DVD-ROM",
                "partitions": {},
                "removable": "1",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "deadline",
                "sectors": "508",
                "sectorsize": "2048",
                "size": "254.00 KB",
                "support_discard": "0",
                "vendor": "Msft",
                "virtual": 1
            },
            "sr2": {
                "holders": [],
                "host": "",
                "links": {
                    "ids": [],
                    "labels": [],
                    "masters": [],
                    "uuids": []
                },
                "model": "Virtual DVD-ROM",
                "partitions": {},
                "removable": "1",
                "rotational": "1",
                "sas_address": null,
                "sas_device_handle": null,
                "scheduler_mode": "deadline",
                "sectors": "1968348",
                "sectorsize": "2048",
                "size": "961.11 MB",
                "support_discard": "0",
                "vendor": "Msft",
                "virtual": 1
            }
        },
        "ansible_distribution": "CentOS",
        "ansible_distribution_file_parsed": true,
        "ansible_distribution_file_path": "/etc/redhat-release",
        "ansible_distribution_file_variety": "RedHat",
        "ansible_distribution_major_version": "7",
        "ansible_distribution_release": "Core",
        "ansible_distribution_version": "7",
        "ansible_dns": {
            "domain": "hq.trayport.com",
            "nameservers": [
                "192.168.65.1"
            ],
            "search": [
                "hq.trayport.com",
                "cme.trayport.com",
                "qa.trayport.com",
                "trayport.com",
                "ti.trayport.com"
            ]
        },
        "ansible_domain": "",
        "ansible_effective_group_id": 0,
        "ansible_effective_user_id": 0,
        "ansible_env": {
            "ANSIBLE_HOST_KEY_CHECKING": "False",
            "HOME": "/root",
            "HOSTNAME": "c0b9920517d3",
            "LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.l
z4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=
01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*
.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmv
b=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:
*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:",
            "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "PWD": "/data/Playground",
            "SHLVL": "3",
            "TERM": "xterm",
            "_": "/usr/bin/python"
        },
        "ansible_fibre_channel_wwn": [],
        "ansible_fips": false,
        "ansible_form_factor": "Desktop",
        "ansible_fqdn": "c0b9920517d3",
        "ansible_hostname": "c0b9920517d3",
        "ansible_hostnqn": "",
        "ansible_is_chroot": false,
        "ansible_iscsi_iqn": "",
        "ansible_kernel": "4.9.125-linuxkit",
        "ansible_local": {},
        "ansible_lsb": {},
        "ansible_machine": "x86_64",
        "ansible_machine_id": "be0f6e26e1ae4878bc507b1dc178903c",
        "ansible_memfree_mb": 973,
        "ansible_memory_mb": {
            "nocache": {
                "free": 1316,
                "used": 664
            },
            "real": {
                "free": 973,
                "total": 1980,
                "used": 1007
            },
            "swap": {
                "cached": 0,
                "free": 1007,
                "total": 1023,
                "used": 16
            }
        },
        "ansible_memtotal_mb": 1980,
        "ansible_mounts": [
            {
                "block_available": 13463440,
                "block_size": 4096,
                "block_total": 15416011,
                "block_used": 1952571,
                "device": "/dev/sda1",
                "fstype": "ext4",
                "inode_available": 3853167,
                "inode_total": 3932160,
                "inode_used": 78993,
                "mount": "/etc/resolv.conf",
                "options": "rw,relatime,data=ordered,bind",
                "size_available": 55146250240,
                "size_total": 63143981056,
                "uuid": "N/A"
            },
            {
                "block_available": 2235195,
                "block_size": 4096,
                "block_total": 60793343,
                "block_used": 58558148,
                "device": "//10.0.75.1/C",
                "fstype": "cifs",
                "inode_available": 0,
                "inode_total": 0,
                "inode_used": 0,
                "mount": "/data",
                "options": "rw,relatime,vers=3.02,sec=ntlmsspi,cache=strict,username=alexk,domain=HQ,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.75.1,file_mode=0755,dir_mode=0777,iocharset=utf8,nounix,serverino,mapposix,nobrl,mfsymlinks,noperm,rsize=1048576,wsize=1048576
,echo_interval=60,actimeo=1,bind",
                "size_available": 9155358720,
                "size_total": 249009532928,
                "uuid": "N/A"
            },
            {
                "block_available": 13463440,
                "block_size": 4096,
                "block_total": 15416011,
                "block_used": 1952571,
                "device": "/dev/sda1",
                "fstype": "ext4",
                "inode_available": 3853167,
                "inode_total": 3932160,
                "inode_used": 78993,
                "mount": "/etc/hosts",
                "options": "rw,relatime,data=ordered,bind",
                "size_available": 55146250240,
                "size_total": 63143981056,
                "uuid": "N/A"
            },
            {
                "block_available": 13463440,
                "block_size": 4096,
                "block_total": 15416011,
                "block_used": 1952571,
                "device": "/dev/sda1",
                "fstype": "ext4",
                "inode_available": 3853167,
                "inode_total": 3932160,
                "inode_used": 78993,
                "mount": "/etc/hostname",
                "options": "rw,relatime,data=ordered,bind",
                "size_available": 55146250240,
                "size_total": 63143981056,
                "uuid": "N/A"
            }
        ],
        "ansible_nodename": "c0b9920517d3",
        "ansible_os_family": "RedHat",
        "ansible_pkg_mgr": "yum",
        "ansible_proc_cmdline": {
            "BOOT_IMAGE": "/boot/kernel",
            "console": "ttyS0",
            "page_poison": "1",
            "panic": "1",
            "root": "/dev/sr0",
            "text": true,
            "vsyscall": "emulate"
        },
        "ansible_processor": [
            "0",
            "GenuineIntel",
            "Intel(R) Xeon(R) CPU           W3530  @ 2.80GHz",
            "1",
            "GenuineIntel",
            "Intel(R) Xeon(R) CPU           W3530  @ 2.80GHz"
        ],
        "ansible_processor_cores": 2,
        "ansible_processor_count": 1,
        "ansible_processor_threads_per_core": 1,
        "ansible_processor_vcpus": 2,
        "ansible_product_name": "Virtual Machine",
        "ansible_product_serial": "3184-7708-8543-9241-8565-0411-54",
        "ansible_product_uuid": "021AC5F9-CFCF-2C4B-B587-59576EC74180",
        "ansible_product_version": "Hyper-V UEFI Release v2.0",
        "ansible_python": {
            "executable": "/usr/bin/python",
            "has_sslcontext": true,
            "type": "CPython",
            "version": {
                "major": 2,
                "micro": 5,
                "minor": 7,
                "releaselevel": "final",
                "serial": 0
            },
            "version_info": [
                2,
                7,
                5,
                "final",
                0
            ]
        },
        "ansible_python_version": "2.7.5",
        "ansible_real_group_id": 0,
        "ansible_real_user_id": 0,
        "ansible_selinux": {
            "status": "Missing selinux Python library"
        },
        "ansible_selinux_python_present": false,
        "ansible_service_mgr": "sysvinit",
        "ansible_swapfree_mb": 1007,
        "ansible_swaptotal_mb": 1023,
        "ansible_system": "Linux",
        "ansible_system_capabilities": [
            "cap_chown",
            "cap_dac_override",
            "cap_fowner",
            "cap_fsetid",
            "cap_kill",
            "cap_setgid",
            "cap_setuid",
            "cap_setpcap",
            "cap_net_bind_service",
            "cap_net_raw",
            "cap_sys_chroot",
            "cap_mknod",
            "cap_audit_write",
            "cap_setfcap+eip"
        ],
        "ansible_system_capabilities_enforced": "True",
        "ansible_system_vendor": "Microsoft Corporation",
        "ansible_uptime_seconds": 230818,
        "ansible_user_dir": "/root",
        "ansible_user_gecos": "root",
        "ansible_user_gid": 0,
        "ansible_user_id": "root",
        "ansible_user_shell": "/bin/bash",
        "ansible_user_uid": 0,
        "ansible_userspace_architecture": "x86_64",
        "ansible_userspace_bits": "64",
        "ansible_virtualization_role": "guest",
        "ansible_virtualization_type": "docker",
        "discovered_interpreter_python": "/usr/bin/python",
        "gather_subset": [
            "all"
        ],
        "module_setup": true
    },
    "changed": false
}
META: ran handlers

TASK [include yang role] ******************************************************************************************************************************************************************************************************************************************************
task path: /data/Playground/generate_spec.yml:6

TASK [ansible-network.yang : initialize function] *****************************************************************************************************************************************************************************************************************************
task path: /root/.ansible/roles/ansible-network.yang/tasks/spec.yml:2
skipping: [172.16.100.101] => {
    "changed": false,
    "skip_reason": "Conditional result was False"
}

TASK [ansible-network.yang : validate role spec] ******************************************************************************************************************************************************************************************************************************
task path: /root/.ansible/roles/ansible-network.yang/tasks/spec.yml:6
<172.16.100.101> attempting to start connection
<172.16.100.101> using connection plugin netconf
<172.16.100.101> found existing local domain socket, using it!
<172.16.100.101>
<172.16.100.101> local domain socket path is /root/.ansible/pc/96abefe666
using role spec /root/.ansible/roles/ansible-network.yang/meta/spec_options.yml
ok: [172.16.100.101] => {
    "changed": false,
    "role_params": {
        "defaults": false,
        "yang_annotations": false,
        "yang_dir": "/root/.ansible/yang/fetch",
        "yang_doctype": "config",
        "yang_keep_tmp_files": false,
        "yang_model_name": "openconfig-interfaces",
        "yang_search_path": "~/.ansible/yang/fetch",
        "yang_spec_dir": "/root/.ansible/yang/spec"
    }
}

TASK [ansible-network.yang : fetch yang model] ********************************************************************************************************************************************************************************************************************************
task path: /root/.ansible/roles/ansible-network.yang/tasks/spec.yml:11
included: /root/.ansible/roles/ansible-network.yang/tasks/fetch.yml for 172.16.100.101

TASK [ansible-network.yang : initialize function] *****************************************************************************************************************************************************************************************************************************
task path: /root/.ansible/roles/ansible-network.yang/tasks/fetch.yml:2
skipping: [172.16.100.101] => {
    "changed": false,
    "skip_reason": "Conditional result was False"
}

TASK [ansible-network.yang : validate role spec] ******************************************************************************************************************************************************************************************************************************
task path: /root/.ansible/roles/ansible-network.yang/tasks/fetch.yml:6
<172.16.100.101> attempting to start connection
<172.16.100.101> using connection plugin netconf
<172.16.100.101> found existing local domain socket, using it!
<172.16.100.101>
<172.16.100.101> local domain socket path is /root/.ansible/pc/96abefe666
using role spec /root/.ansible/roles/ansible-network.yang/meta/fetch_options.yml
ok: [172.16.100.101] => {
    "changed": false,
    "role_params": {
        "ansible_connection": "netconf",
        "ansible_network_os": "nxos",
        "ansible_network_provider": "cisco_nxos",
        "yang_dir": "~/.ansible/yang/fetch",
        "yang_model_name": "openconfig-interfaces"
    }
}

TASK [ansible-network.yang : enable netconf] **********************************************************************************************************************************************************************************************************************************
task path: /root/.ansible/roles/ansible-network.yang/tasks/fetch.yml:10
skipping: [172.16.100.101] => {
    "changed": false,
    "skip_reason": "Conditional result was False"
}

TASK [ansible-network.yang : fetch: create directory '~/.ansible/yang/fetch' if not exist] ************************************************************************************************************************************************************************************
task path: /root/.ansible/roles/ansible-network.yang/tasks/fetch.yml:14
<172.16.100.101> attempting to start connection
<172.16.100.101> using connection plugin netconf
<172.16.100.101> found existing local domain socket, using it!
<172.16.100.101>
<172.16.100.101> local domain socket path is /root/.ansible/pc/96abefe666
<172.16.100.101> ESTABLISH LOCAL CONNECTION FOR USER: root
<172.16.100.101> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037585.47-191251645457150 `" && echo ansible-tmp-1561037585.47-191251645457150="` echo /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-156
1037585.47-191251645457150 `" ) && sleep 0'
Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/file.py
<172.16.100.101> PUT /root/.ansible/tmp/ansible-local-1014dwva9E/tmpb4crnl TO /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037585.47-191251645457150/AnsiballZ_file.py
<172.16.100.101> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037585.47-191251645457150/ /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037585.47-191251645457150/AnsiballZ_file.py && sleep 0'
<172.16.100.101> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037585.47-191251645457150/AnsiballZ_file.py && sleep 0'
<172.16.100.101> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-1014dwva9E/ansible-tmp-1561037585.47-191251645457150/ > /dev/null 2>&1 && sleep 0'
ok: [172.16.100.101] => {
    "changed": false,
    "diff": {
        "after": {
            "path": "/root/.ansible/yang/fetch"
        },
        "before": {
            "path": "/root/.ansible/yang/fetch"
        }
    },
    "gid": 0,
    "group": "root",
    "invocation": {
        "module_args": {
            "_diff_peek": null,
            "_original_basename": null,
            "access_time": null,
            "access_time_format": "%Y%m%d%H%M.%S",
            "attributes": null,
            "backup": null,
            "content": null,
            "delimiter": null,
            "directory_mode": null,
            "follow": true,
            "force": false,
            "group": null,
            "mode": null,
            "modification_time": null,
            "modification_time_format": "%Y%m%d%H%M.%S",
            "owner": null,
            "path": "/root/.ansible/yang/fetch",
            "recurse": false,
            "regexp": null,
            "remote_src": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": null,
            "state": "directory",
            "unsafe_writes": null
        }
    },
    "mode": "0755",
    "owner": "root",
    "path": "/root/.ansible/yang/fetch",
    "size": 4096,
    "state": "directory",
    "uid": 0
}

TASK [ansible-network.yang : fetch: retrieve 'openconfig-interfaces' and dependent yang modules from host and store in directory '~/.ansible/yang/fetch'] *********************************************************************************************************************
task path: /root/.ansible/roles/ansible-network.yang/tasks/fetch.yml:19
<172.16.100.101> attempting to start connection
<172.16.100.101> using connection plugin netconf
<172.16.100.101> found existing local domain socket, using it!
<172.16.100.101>
<172.16.100.101> local domain socket path is /root/.ansible/pc/96abefe666
fatal: [172.16.100.101]: FAILED! => {
    "changed": false,
    "msg": "Namespace=\"urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring\""
}

PLAY RECAP ********************************************************************************************************************************************************************************************************************************************************************
172.16.100.101             : ok=5    changed=0    unreachable=0    failed=1    skipped=3    rescued=0    ignored=0
@alkarp alkarp changed the title NX-OS support Schema fetch requires "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring" capability Jun 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant