aristanetworks / ansible-cvp

Ansible modules for Arista CloudVision
http://cvp.avd.sh
Apache License 2.0
66 stars 61 forks source link

Device input data are not compliant with module. #671

Closed ninnux closed 12 months ago

ninnux commented 1 year ago

Issue Summary

I have an AVD repository in a working production environment and I'm trying to build a lab environment with 4 Arista 7020SR, CVP and AVD and on lab it fails. I used same code and same package versions I have in production working environment: CVP 2022.3.0 arista.avd 3.8.1 arista.cvp 3.5.1 arista.eos 6.0.0 pyhton cvprac 1.3.1. Now I bootstrapped lab arista with ZTP and switches are recognized by CVP they are in "Undefined" container. When I try to deploy my network by AVD it fails on "arista.avd.eos_config_deploy_cvp : Configure devices on cv_server". Adding verbosity on ansible-playbook I have the error message reported in subject of this case. I find code where it fails and it seems that the problem is the "devices": null instead of a dict in witch there are nodes and related containers and configlets.

Could you help me?

Which component(s) of AVD impacted

other

How do you run AVD ?

Ansible CLI with AVD Runner

Input variables

inventory:
---
all:
  children:
    CVP:
      hosts:
        cv_server:
          ansible_httpapi_host: 10.8.111.8
          ansible_host: 10.8.111.8
          ansible_user: CHANGEME
          ansible_password: CHANGEME
          ansible_connection: httpapi
          ansible_httpapi_use_ssl: true
          ansible_httpapi_validate_certs: false
          ansible_network_os: eos
          ansible_httpapi_port: 443
          # Configuration to get Virtual Env information
          ansible_python_interpreter: $(which python3)
    # RM2-Fabric - EVPN Fabric running in home lab
    LABBO11:
      children:
        LABBO11_FABRIC:
          children:
            #            LABBO11_SPINE:
            #              hosts:
            #                LABBO11_SPINE1:
            #                  ansible_host: 10.10.100.20
            #                LABBO11_SPINE2:
            #                  ansible_host: 10.10.100.21
            LABBO11_LEAFS:
              hosts:
                A3:
                  ansible_host: 172.16.9.23
                A4:
                  ansible_host: 172.16.9.24

          vars:
            ansible_connection: httpapi
            ansible_network_os: eos
            ansible_user: ansible
            # should use vault for passwords
            ansible_ssh_pass: ansible
            ansible_become: true
            ansible_become_method: enable
            ansible_httpapi_use_ssl: true
            ansible_httpapi_validate_certs: false
    LABBO11_TENANTS_NETWORKS:
      children:
        LABBO11_LEAF:

FABRIC FILE:
---
fabric_name: LABBO11_FABRIC
underlay_routing_protocol: ISIS 
overlay_routing_protocol: IBGP
bgp_as: 64762
underlay_p2p_network_summary: 192.168.100.0/26
overlay_loopback_network_summary: 10.10.20.0/24
vtep_loopback_network_summary: 10.10.30.0/24
mlag_ips:
  leaf_peer_l3: 192.168.100.64/26
  mlag_peer: 10.255.252.0/24
vxlan_vlan_aware_bundles: true
bgp_peer_groups:
  IPv4_UNDERLAY_PEERS:
    password: "CHANGEME"
  EVPN_OVERLAY_PEERS:
    password: "CHANGEME"
  MLAG_IPv4_UNDERLAY_PEER:
    password: "CHANGEME"
l3leaf:
  defaults:
    # virtual router mac for VNIs assigned to Leaf switches
    # format: xx:xx:xx:xx:xx:xx
    virtual_router_mac_address: 00:00:00:00:00:01
    platform: 7050SX3-48YC8
    mlag_interfaces: [Ethernet8]
    spanning_tree_priority: 32768 
    spanning_tree_mode: rstp
    loopback_ipv4_pool: 10.10.20.0/24
    loopback_ipv4_offset: 2
    vtep_loopback_ipv4_pool: 10.10.30.0/24
    uplink_interfaces: ['Ethernet49/1', 'Ethernet50/1']
    uplink_ipv4_pool: 192.168.110.0/26
    mlag_peer_ipv4_pool: 10.255.252.0/24
    mlag_peer_l3_ipv4_pool: 192.168.110.64/26
    bgp_defaults:
      - update wait-install
      - no bgp default ipv4-unicast
      - distance bgp 20 200 200
      - graceful-restart restart-time 300
      - graceful-restart
    isis_system_id_prefix: '0001.0001'
    isis_maximum_paths: 2
  node_groups:
    LABBO11_LEAFS:
      nodes:
        A3:
          id: 1
          mgmt_ip: 172.16.9.23/24
        A4:
          id: 2
          mgmt_ip: 172.16.9.24/24
custom_structured_configuration_ntp:
  local_interface:
    name: Management1
    vrf: MGMT
  servers:
  - name: 193.204.114.232
    preferred: true
    vrf: MGMT
custom_structured_configuration_router_bgp:
  address_family_ipv4:
    peer_groups:
      EVPN-OVERLAY-PEERS:
        activate: true
  address_family_ipv6:
    peer_groups: 
      EVPN-OVERLAY-PEERS:
        activate: true
  address_family_evpn:
    peer_groups:
      EVPN-OVERLAY-PEERS:
        activate: true
custom_structured_configuration_daemon_terminattr:
  # Authentication scheme used to connect to CloudVision
  cvaddrs:
    - 10.8.111.8:9910
  cvvrf: MGMT
  cvauth:
    method: "token"
    token_file: "/tmp/token"
  smashexcludes: "ale,flexCounter,hardware,kni,pulse,strata"
  ingestexclude: "/Sysdb/cell/1/agent,/Sysdb/cell/2/agent"
custom_structured_configuration_logging:
  vrfs:
    MGMT:
      source_interface: Management1
      hosts:
       90.147.160.54:
          ports:
            - 30714
p2p_uplinks_mtu: 9000
bfd_multihop:
  interval: 1200
  min_rx: 1200
  multiplier: 3

Steps to reproduce

CVP 2022.3.0
arista.avd 3.8.1
arista.cvp 3.5.1
arista.eos 6.0.0
pyhton cvprac 1.3.1

Relevant log output

HERE the ansible error:
fatal: [cv_server]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "configlet_mode": "override",
            "cvp_facts": {
                "configlets": [
                    {
                        "config": "",
                        "containerCount": 0,
                        "containers": [],
                        "dateTimeInLongFormat": 1693906253208,
                        "devices": [],
                        "editable": true,
                        "isAutoBuilder": "",
                        "isDefault": "no",
                        "isDraft": false,
                        "key": "SYS_TelemetryBuilderV6_1693906253208",
                        "name": "SYS_TelemetryBuilderV6",
                        "netElementCount": 0,
                        "note": "",
                        "reconciled": false,
                        "sslConfig": false,
                        "type": "Builder",
                        "typeStudioConfiglet": false,
                        "user": "cvp system",
                        "visible": true
                    },
                    {
                        "config": "username dc_admin privilege 15 role network-admin secret sha512 $6$PoeW8IU6fwaTPPfu$f7KuWdU/GjxTKAq8ba4fREe.nci.ONL07C22L4OZA9OX55WUHdGDLf7eOTFJ5HUHqCqhOcYmu6SVtpkjSJo2E.\nusername nms privilege 15 secret sha512 $6$c50U2eCpWHKATPBc$Z6YHsk838lJ6a4jagyUrY2ojAP6aHrotxSE0QXkbejv/I9g5Sl5q10mB3Sh02sr1YFWoaEz2rGwTJXHNJ/vhp.\ndaemon TerminAttr\n   exec /usr/bin/TerminAttr -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -cvaddr=10.8.111.8:9910 -cvauth=token,/tmp/token -cvvrf=MGMT -taillogs\n   no shutdown\nhostname A2\nvrf instance MGMT\nmanagement api http-commands\n   no shutdown\n   vrf MGMT\n      no shutdown\ninterface Management1\n   description Management\n   vrf MGMT\n   ip address 172.16.9.22/24\nip routing vrf MGMT\nip route vrf MGMT 0.0.0.0/0 172.16.9.1\nntp local-interface vrf MGMT Management1\nntp server vrf MGMT 193.204.114.232\n",
                        "containerCount": 0,
                        "containers": [],
                        "dateTimeInLongFormat": 1695287610201,
                        "devices": [
                            "A2"
                        ],
                        "editable": true,
                        "isAutoBuilder": "",
                        "isDefault": "no",
                        "isDraft": false,
                        "key": "configlet_751b9621-e0df-4e8e-9b53-002cc70c05c2",
                        "name": "RECONCILE_JPE19230667",
                        "netElementCount": 0,
                        "note": "",
                        "reconciled": true,
                        "sslConfig": false,
                        "type": "Static",
                        "typeStudioConfiglet": false,
                        "user": "nms",
                        "visible": true
                    },
{
                        "config": "username dc_admin privilege 15 role network-admin secret sha512 $6$PoeW8IU6fwaTPPfu$f7KuWdU/GjxTKAq8ba4fREe.nci.ONL07C22L4OZA9OX55WUHdGDLf7eOTFJ5HUHqCqhOcYmu6SVtpkjSJo2E.\nusername nms privilege 15 secret sha512 $6$6YiWgyQaYpsEwOVd$IEXa/BR.paYd/zgh0lz/wEd6V4ITe2jZuViRJhsgLFHfhDcI8m8EIq4cqcDkJXEX89yedqrR7Fu/sTPiyw3dg/\ndaemon TerminAttr\n   exec /usr/bin/TerminAttr -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -cvaddr=10.8.111.8:9910 -cvauth=token,/tmp/token -cvvrf=MGMT -taillogs\n   no shutdown\nhostname A1\nvrf instance MGMT\n   description Management\nmanagement api http-commands\n   no shutdown\n   vrf MGMT\n      no shutdown\ninterface Management1\n   description Management\n   vrf MGMT\n   ip address 172.16.9.21/24\nip routing vrf MGMT\nip route vrf MGMT 0.0.0.0/0 172.16.9.1\nntp local-interface vrf MGMT Management1\nntp server vrf MGMT 193.204.114.232\n",
                        "containerCount": 0,
                        "containers": [],
                        "dateTimeInLongFormat": 1695287588078,
                        "devices": [
                            "A1"
                        ],
                        "editable": true,
                        "isAutoBuilder": "",
                        "isDefault": "no",
                        "isDraft": false,
                        "key": "configlet_b547b9e8-76db-468b-b78f-f33ea4b08e74",
                        "name": "RECONCILE_JPE19260933",
                        "netElementCount": 0,
                        "note": "",
                        "reconciled": true,
                        "sslConfig": false,
                        "type": "Static",
                        "typeStudioConfiglet": false,
                        "user": "nms",
                        "visible": true
                    },
{
                        "config": "!RANCID-CONTENT-TYPE: arista\n!\ndaemon TerminAttr\n   exec /usr/bin/TerminAttr -cvaddr=10.8.111.8:9910 -cvauth=token,/tmp/token -cvvrf=MGMT -disableaaa -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent -taillogs\n   no shutdown\n!\nvlan internal order ascending range 1006 1199\n!\ntransceiver qsfp default-mode 4x10G\n!\nservice routing protocols model multi-agent\n!\nhostname A1\nip name-server vrf MGMT 193.206.158.1\n!\nntp local-interface vrf MGMT Management1\nntp server vrf MGMT 0.pool.ntp.org\n!\nspanning-tree mode mstp\nno spanning-tree vlan-id 4093-4094\nspanning-tree mst 0 priority 4096\n!\nno enable password\nno aaa root\n!\nusername dc_admin privilege 15 role network-admin secret sha512 $6$PoeW8IU6fwaTPPfu$f7KuWdU/GjxTKAq8ba4fREe.nci.ONL07C22L4OZA9OX55WUHdGDLf7eOTFJ5HUHqCqhOcYmu6SVtpkjSJo2E.\nusername telemetria privilege 1 role network-viewer secret sha512 $6$a1rCGCMW/6jqeXeS$GklHzAYDIKE5dCg4EhyfaYyhuhwLn0XG.icvV48pF.MFipWED8Re4Q60N0RludO/WTQg/COLtRrgFSF5pkWMH1\n!\nvlan 4093\n   name LEAF_PEER_L3\n   trunk group LEAF_PEER_L3\n!\nvlan 4094\n   name MLAG_PEER\n   trunk group MLAG\n!\nvrf instance MGMT\n!\ninterface Port-Channel3\n   description MLAG_PEER_A2_Po3\n   no shutdown\n   switchport\n   switchport mode trunk\n   switchport trunk group LEAF_PEER_L3\n   switchport trunk group MLAG\n!\ninterface Ethernet3\n   description MLAG_PEER_A2_Ethernet3\n   no shutdown\n   channel-group 3 mode active\n!\ninterface Loopback0\n   description EVPN_Overlay_Peering\n   no shutdown\n   ip address 10.255.0.3/32\n   isis enable EVPN_UNDERLAY\n   isis passive\n!\ninterface Loopback1\n   description VTEP_VXLAN_Tunnel_Source\n   no shutdown\n   ip address 10.255.1.3/32\n   isis enable EVPN_UNDERLAY\n   isis passive\n!\ninterface Management1\n   description oob_management\n   no shutdown\n   vrf MGMT\n   ip address 172.16.9.21/24\n!\ninterface Vlan4093\n   description MLAG_PEER_L3_PEERING\n   no shutdown\n   mtu 1500\n   ip address 10.255.1.96/31\n   isis enable EVPN_UNDERLAY\n   isis metric 50\n   isis network point-to-point\n!\ninterface Vlan4094\n   description MLAG_PEER\n   no shutdown\n   mtu 1500\n   no autostate\n   ip address 10.255.1.64/31\n!\ninterface Vxlan1\n   description A1_VTEP\n   vxlan source-interface Loopback1\n   vxlan virtual-router encapsulation mac-address mlag-system-id\n   vxlan udp-port 4789\n!\nip virtual-router mac-address 00:1c:73:00:00:99\n!\nip routing\nno ip routing vrf MGMT\n!\nip extcommunity-list ECL-EVPN-SOO permit soo 10.255.1.3:1\n!\nmlag configuration\n   domain-id DC1_L3_LEAF1\n   local-interface Vlan4094\n   peer-address 10.255.1.65\n   peer-link Port-Channel3\n   reload-delay mlag 300\n   reload-delay non-mlag 330\n!\nip route vrf MGMT 0.0.0.0/0 172.16.9.1\n!\nroute-map RM-EVPN-SOO-IN deny 10\n   match extcommunity ECL-EVPN-SOO\n!\nroute-map RM-EVPN-SOO-IN permit 20\n!\nroute-map RM-EVPN-SOO-OUT permit 10\n   set extcommunity soo 10.255.1.3:1 additive\n!\nrouter bfd\n   multihop interval 300 min-rx 300 multiplier 3\n!\nrouter bgp 65101\n   router-id 10.255.0.3\n   maximum-paths 4 ecmp 4\n   no bgp default ipv4-unicast\n   neighbor EVPN-OVERLAY-PEERS peer group\n   neighbor EVPN-OVERLAY-PEERS remote-as 65101\n   neighbor EVPN-OVERLAY-PEERS update-source Loopback0\n   neighbor EVPN-OVERLAY-PEERS bfd\n   neighbor EVPN-OVERLAY-PEERS password 7 Q4fqtbqcZ7oQuKfuWtNGRQ==\n   neighbor EVPN-OVERLAY-PEERS send-community\n   neighbor EVPN-OVERLAY-PEERS maximum-routes 0\n   !\n   address-family evpn\n      neighbor EVPN-OVERLAY-PEERS route-map RM-EVPN-SOO-IN in\n      neighbor EVPN-OVERLAY-PEERS route-map RM-EVPN-SOO-OUT out\n      neighbor EVPN-OVERLAY-PEERS activate\n   !\n   address-family ipv4\n      no neighbor EVPN-OVERLAY-PEERS activate\n!\nrouter isis EVPN_UNDERLAY\n   is-type level-2\n   router-id ipv4 10.255.0.3\n   log-adjacency-changes\n   !\n   address-family ipv4 unicast\n      maximum-paths 4\n   !\n!\nmanagement api http-commands\n   protocol https\n   no shutdown\n   !\n   vrf MGMT\n      no shutdown\n!\nend\n",
                        "containerCount": 0,
                        "containers": [],
                        "dateTimeInLongFormat": 1694179131585,
                        "devices": [
                            "A1"
                        ],
                        "editable": true,
                        "isAutoBuilder": "",
                        "isDefault": "no",
                        "isDraft": false,
                        "key": "configlet_2f9c8842-e09b-437c-8b6e-45e65e2dd5bd",
                        "name": "AVD-FABRIC-_A1",
                        "netElementCount": 0,
                        "note": "Managed by Ansible",
                        "reconciled": false,
                        "sslConfig": false,
                        "type": "Static",
                        "typeStudioConfiglet": false,
                        "user": "nms",
                        "visible": true
                    },
{
                        "config": "!RANCID-CONTENT-TYPE: arista\n!\ndaemon TerminAttr\n   exec /usr/bin/TerminAttr -cvaddr=10.8.111.8:9910 -cvauth=token,/tmp/token -cvvrf=MGMT -disableaaa -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -ingestexclude=/Sysdb/cell/1/agent,/Sysdb/cell/2/agent -taillogs\n   no shutdown\n!\nvlan internal order ascending range 1006 1199\n!\ntransceiver qsfp default-mode 4x10G\n!\nservice routing protocols model multi-agent\n!\nhostname A2\nip name-server vrf MGMT 193.206.158.1\n!\nntp local-interface vrf MGMT Management1\nntp server vrf MGMT 0.pool.ntp.org\n!\nspanning-tree mode mstp\nno spanning-tree vlan-id 4093-4094\nspanning-tree mst 0 priority 4096\n!\nno enable password\nno aaa root\n!\nusername dc_admin privilege 15 role network-admin secret sha512 $6$PoeW8IU6fwaTPPfu$f7KuWdU/GjxTKAq8ba4fREe.nci.ONL07C22L4OZA9OX55WUHdGDLf7eOTFJ5HUHqCqhOcYmu6SVtpkjSJo2E.\nusername telemetria privilege 1 role network-viewer secret sha512 $6$a1rCGCMW/6jqeXeS$GklHzAYDIKE5dCg4EhyfaYyhuhwLn0XG.icvV48pF.MFipWED8Re4Q60N0RludO/WTQg/COLtRrgFSF5pkWMH1\n!\nvlan 4093\n   name LEAF_PEER_L3\n   trunk group LEAF_PEER_L3\n!\nvlan 4094\n   name MLAG_PEER\n   trunk group MLAG\n!\nvrf instance MGMT\n!\ninterface Port-Channel3\n   description MLAG_PEER_A1_Po3\n   no shutdown\n   switchport\n   switchport mode trunk\n   switchport trunk group LEAF_PEER_L3\n   switchport trunk group MLAG\n!\ninterface Ethernet3\n   description MLAG_PEER_A1_Ethernet3\n   no shutdown\n   channel-group 3 mode active\n!\ninterface Loopback0\n   description EVPN_Overlay_Peering\n   no shutdown\n   ip address 10.255.0.4/32\n   isis enable EVPN_UNDERLAY\n   isis passive\n!\ninterface Loopback1\n   description VTEP_VXLAN_Tunnel_Source\n   no shutdown\n   ip address 10.255.1.3/32\n   isis enable EVPN_UNDERLAY\n   isis passive\n!\ninterface Management1\n   description oob_management\n   no shutdown\n   vrf MGMT\n   ip address 172.16.9.22/24\n!\ninterface Vlan4093\n   description MLAG_PEER_L3_PEERING\n   no shutdown\n   mtu 1500\n   ip address 10.255.1.97/31\n   isis enable EVPN_UNDERLAY\n   isis metric 50\n   isis network point-to-point\n!\ninterface Vlan4094\n   description MLAG_PEER\n   no shutdown\n   mtu 1500\n   no autostate\n   ip address 10.255.1.65/31\n!\ninterface Vxlan1\n   description A2_VTEP\n   vxlan source-interface Loopback1\n   vxlan virtual-router encapsulation mac-address mlag-system-id\n   vxlan udp-port 4789\n!\nip virtual-router mac-address 00:1c:73:00:00:99\n!\nip routing\nno ip routing vrf MGMT\n!\nip extcommunity-list ECL-EVPN-SOO permit soo 10.255.1.3:1\n!\nmlag configuration\n   domain-id DC1_L3_LEAF1\n   local-interface Vlan4094\n   peer-address 10.255.1.64\n   peer-link Port-Channel3\n   reload-delay mlag 300\n   reload-delay non-mlag 330\n!\nip route vrf MGMT 0.0.0.0/0 172.16.9.1\n!\nroute-map RM-EVPN-SOO-IN deny 10\n   match extcommunity ECL-EVPN-SOO\n!\nroute-map RM-EVPN-SOO-IN permit 20\n!\nroute-map RM-EVPN-SOO-OUT permit 10\n   set extcommunity soo 10.255.1.3:1 additive\n!\nrouter bfd\n   multihop interval 300 min-rx 300 multiplier 3\n!\nrouter bgp 65101\n   router-id 10.255.0.4\n   maximum-paths 4 ecmp 4\n   no bgp default ipv4-unicast\n   neighbor EVPN-OVERLAY-PEERS peer group\n   neighbor EVPN-OVERLAY-PEERS remote-as 65101\n   neighbor EVPN-OVERLAY-PEERS update-source Loopback0\n   neighbor EVPN-OVERLAY-PEERS bfd\n   neighbor EVPN-OVERLAY-PEERS password 7 Q4fqtbqcZ7oQuKfuWtNGRQ==\n   neighbor EVPN-OVERLAY-PEERS send-community\n   neighbor EVPN-OVERLAY-PEERS maximum-routes 0\n   !\n   address-family evpn\n      neighbor EVPN-OVERLAY-PEERS route-map RM-EVPN-SOO-IN in\n      neighbor EVPN-OVERLAY-PEERS route-map RM-EVPN-SOO-OUT out\n      neighbor EVPN-OVERLAY-PEERS activate\n   !\n   address-family ipv4\n      no neighbor EVPN-OVERLAY-PEERS activate\n!\nrouter isis EVPN_UNDERLAY\n   is-type level-2\n   router-id ipv4 10.255.0.4\n   log-adjacency-changes\n   !\n   address-family ipv4 unicast\n      maximum-paths 4\n   !\n!\nmanagement api http-commands\n   protocol https\n   no shutdown\n   !\n   vrf MGMT\n      no shutdown\n!\nend\n",
                        "containerCount": 0,
                        "containers": [],
                        "dateTimeInLongFormat": 1694179131695,
                        "devices": [
                            "A2"
                        ],
                        "editable": true,
                        "isAutoBuilder": "",
                        "isDefault": "no",
                        "isDraft": false,
                        "key": "configlet_1c1fdfd8-89ee-4a79-9b72-716467bc6958",
                        "name": "AVD-FABRIC-_A2",
                        "netElementCount": 0,
                        "note": "Managed by Ansible",
                        "reconciled": false,
                        "sslConfig": false,
                        "type": "Static",
                        "typeStudioConfiglet": false,
                        "user": "nms",
                        "visible": true
                    }
                ],
 "containers": [
                    {
                        "CreatedBy": "cvp system",
                        "CreatedOn": 1693906253092,
                        "Key": "root",
                        "Mode": "expand",
                        "Name": "Tenant",
                        "childContainerId": null,
                        "configlets": [],
                        "devices": [],
                        "factoryId": 1,
                        "id": 21,
                        "imageBundle": "",
                        "key": "root",
                        "name": "Tenant",
                        "parentId": null,
                        "parentName": null,
                        "type": null,
                        "userId": null
                    },
                    {
                        "CreatedBy": "cvp system",
                        "CreatedOn": 1693906253133,
                        "Key": "undefined_container",
                        "Mode": "expand",
                        "Name": "Undefined",
                        "childContainerId": null,
                        "configlets": [],
                        "devices": [],
                        "factoryId": 1,
                        "id": 21,
                        "imageBundle": "EOS-4.27.4M-TA-1.22.3-1",
                        "key": "undefined_container",
                        "name": "Undefined",
                        "parentId": "root",
                        "parentName": "Tenant",
                        "type": null,
                        "userId": null
                    },
                    {
                        "CreatedBy": "nms",
                        "CreatedOn": 1696345251561,
                        "Key": "container_64d5381f-ac6e-46fa-87da-1f6239201f50",
                        "Mode": "expand",
                        "Name": "LABBO11_FABRIC",
                        "childContainerId": null,
                        "configlets": [],
                        "devices": [],
                        "factoryId": 1,
                        "id": 21,
                        "imageBundle": "",
                        "key": "container_64d5381f-ac6e-46fa-87da-1f6239201f50",
                        "name": "LABBO11_FABRIC",
                        "parentId": "root",
                        "parentName": "Tenant",
                        "type": null,
                        "userId": null
                    },
{
                        "CreatedBy": "nms",
                        "CreatedOn": 1696345251920,
                        "Key": "container_9ed0a719-248f-400c-806d-32976e520b65",
                        "Mode": "expand",
                        "Name": "LABBO11_LEAFS",
                        "childContainerId": null,
                        "configlets": [],
                        "devices": [],
                        "factoryId": 1,
                        "id": 21,
                        "imageBundle": "",
                        "key": "container_9ed0a719-248f-400c-806d-32976e520b65",
                        "name": "LABBO11_LEAFS",
                        "parentId": "container_64d5381f-ac6e-46fa-87da-1f6239201f50",
                        "parentName": "LABBO11_FABRIC",
                        "type": null,
                        "userId": null
                    }
                ],
                "cvp_info": {
                    "version": "2023.1.1"
                },
 "devices": [
                    {
                        "architecture": "",
                        "bootupTimeStamp": 0,
                        "bootupTimestamp": 0,
                        "complianceCode": "0001",
                        "complianceIndication": "WARNING",
                        "containerName": "Undefined",
                        "danzEnabled": false,
                        "dcaKey": null,
                        "deviceInfo": "Registered",
                        "deviceSpecificConfiglets": [
                            "AVD-FABRIC-_A1",
                            "RECONCILE_JPE19260933"
                        ],
                        "deviceStatus": "Registered",
                        "deviceType": "eos",
                        "domainName": "",
                        "fqdn": "A1",
                        "hardwareRevision": "",
                        "hostname": "A1",
                        "imageBundle": "",
                        "internalBuild": "",
                        "internalBuildId": "",
                        "internalVersion": "4.30.2F",
                        "ipAddress": "172.16.9.21",
                        "isDANZEnabled": false,
                        "isMLAGEnabled": false,
                        "key": "98:5d:82:ec:00:19",
                        "lastSyncUp": 0,
                        "memFree": 0,
                        "memTotal": 0,
                        "mlagEnabled": false,
                        "modelName": "DCS-7020SR-24C2",
                        "name": "A1",
                        "parentContainerId": "undefined_container",
                        "parentContainerKey": "undefined_container",
                        "parentContainerName": "Undefined",
                        "serialNumber": "JPE19260933",
                        "sslConfigAvailable": false,
                        "sslEnabledByCVP": false,
                        "status": "Registered",
                        "streamingStatus": "inactive",
                        "systemMacAddress": "98:5d:82:ec:00:19",
                        "taskIdList": [],
                        "tempAction": null,
                        "type": "netelement",
                        "unAuthorized": false,
                        "version": "4.30.2F",
                        "ztpMode": true
                    },
 {
                        "architecture": "",
                        "bootupTimeStamp": 0,
                        "bootupTimestamp": 0,
                        "complianceCode": "0000",
                        "complianceIndication": "",
                        "containerName": "Undefined",
                        "danzEnabled": false,
                        "dcaKey": null,
                        "deviceInfo": "Registered",
                        "deviceSpecificConfiglets": [],
                        "deviceStatus": "Registered",
                        "deviceType": "eos",
                        "domainName": "arista.int.infra.garr.it",
                        "fqdn": "A4.arista.int.infra.garr.it",
                        "hardwareRevision": "",
                        "hostname": "A4",
                        "imageBundle": "",
                        "internalBuild": "",
                        "internalBuildId": "",
                        "internalVersion": "4.27.4M",
                        "ipAddress": "172.16.9.24",
                        "isDANZEnabled": false,
                        "isMLAGEnabled": false,
                        "key": "e8:ae:c5:f1:2b:bb",
                        "lastSyncUp": 0,
                        "memFree": 0,
                        "memTotal": 0,
                        "mlagEnabled": false,
                        "modelName": "DCS-7020SR-24C2",
                        "name": "A4",
                        "parentContainerId": "undefined_container",
                        "parentContainerKey": "undefined_container",
                        "parentContainerName": "Undefined",
                        "serialNumber": "JPA2252P02M",
                        "sslConfigAvailable": false,
                        "sslEnabledByCVP": false,
                        "status": "Registered",
                        "streamingStatus": "active",
                        "systemMacAddress": "e8:ae:c5:f1:2b:bb",
                        "taskIdList": [],
                        "tempAction": null,
                        "type": "netelement",
                        "unAuthorized": false,
                        "version": "4.27.4M",
                        "ztpMode": true
                    },
{
                        "architecture": "",
                        "bootupTimeStamp": 0,
                        "bootupTimestamp": 0,
                        "complianceCode": "0001",
                        "complianceIndication": "WARNING",
                        "containerName": "Undefined",
                        "danzEnabled": false,
                        "dcaKey": null,
                        "deviceInfo": "Registered",
                        "deviceSpecificConfiglets": [
                            "AVD-FABRIC-_A2",
                            "RECONCILE_JPE19230667"
                        ],
                        "deviceStatus": "Registered",
                        "deviceType": "eos",
                        "domainName": "",
                        "fqdn": "A2",
                        "hardwareRevision": "",
                        "hostname": "A2",
                        "imageBundle": "",
                        "internalBuild": "",
                        "internalBuildId": "",
                        "internalVersion": "4.30.2F",
                        "ipAddress": "172.16.9.22",
                        "isDANZEnabled": false,
                        "isMLAGEnabled": false,
                        "key": "98:5d:82:eb:ef:19",
                        "lastSyncUp": 0,
                        "memFree": 0,
                        "memTotal": 0,
                        "mlagEnabled": false,
                        "modelName": "DCS-7020SR-24C2",
                        "name": "A2",
                        "parentContainerId": "undefined_container",
                        "parentContainerKey": "undefined_container",
                        "parentContainerName": "Undefined",
                        "serialNumber": "JPE19230667",
                        "sslConfigAvailable": false,
                        "sslEnabledByCVP": false,
                        "status": "Registered",
                        "streamingStatus": "inactive",
                        "systemMacAddress": "98:5d:82:eb:ef:19",
                        "taskIdList": [],
                        "tempAction": null,
                        "type": "netelement",
                        "unAuthorized": false,
                        "version": "4.30.2F",
                        "ztpMode": true
                    },
 {
                        "architecture": "",
                        "bootupTimeStamp": 0,
                        "bootupTimestamp": 0,
                        "complianceCode": "0000",
                        "complianceIndication": "",
                        "containerName": "Undefined",
                        "danzEnabled": false,
                        "dcaKey": null,
                        "deviceInfo": "Registered",
                        "deviceSpecificConfiglets": [],
                        "deviceStatus": "Registered",
                        "deviceType": "eos",
                        "domainName": "arista.int.infra.garr.it",
                        "fqdn": "A3.arista.int.infra.garr.it",
                        "hardwareRevision": "",
                        "hostname": "A3",
                        "imageBundle": "",
                        "internalBuild": "",
                        "internalBuildId": "",
                        "internalVersion": "4.25.0F",
                        "ipAddress": "172.16.9.23",
                        "isDANZEnabled": false,
                        "isMLAGEnabled": false,
                        "key": "74:83:ef:e0:aa:0f",
                        "lastSyncUp": 0,
                        "memFree": 0,
                        "memTotal": 0,
                        "mlagEnabled": false,
                        "modelName": "DCS-7020SR-24C2",
                        "name": "A3",
                        "parentContainerId": "undefined_container",
                        "parentContainerKey": "undefined_container",
                        "parentContainerName": "Undefined",
                        "serialNumber": "JPE19230723",
                        "sslConfigAvailable": false,
                        "sslEnabledByCVP": false,
                        "status": "Registered",
                        "streamingStatus": "active",
                        "systemMacAddress": "74:83:ef:e0:aa:0f",
                        "taskIdList": [],
                        "tempAction": null,
                        "type": "netelement",
                        "unAuthorized": false,
                        "version": "4.25.0F",
                        "ztpMode": true
                    }
                ],
 "imageBundles": [],
                "tasks": [
                    {
                        "ccId": "",
                        "ccIdV2": "",
                        "completedOnInLongFormat": 1694179142345,
                        "createdBy": "nms",
                        "createdOnInLongFormat": 1694179137321,
                        "currentTaskName": "Submit",
                        "currentTaskType": "User Task",
                        "data": {
                            "APP_SESSION_ID": "",
                            "ERROR_IN_CAPTURING_DESIGN_CONFIG": "",
                            "ERROR_IN_CAPTURING_RUNNING_CONFIG": "",
                            "INCORRECT_CONFIG_IN_CAPTURING_DESIGN_CONFIG": "",
                            "INCORRECT_CONFIG_IN_CAPTURING_DESIGN_CONFIG_OUTPUT_INDEX": "",
                            "IS_ADD_OR_MOVE_FLOW": true,
                            "IS_AUTO_GENERATED_IN_CVP": false,
                            "IS_CONFIG_PUSH_NEEDED": "yes",
                            "NETELEMENT_ID": "98:5d:82:eb:ef:19",
                            "VIEW": "CONFIG_IMAGE",
                            "WORKFLOW_ACTION": "UpdateServiceTask",
                            "ZERO_TOUCH_REPLACEMENT": "",
                            "ccExecutingNode": "",
                            "ccId": "",
                            "commandUsedInMgmtIpVal": "",
                            "config": [],
                            "configExistInCVP": false,
                            "configSnapshots": [],
                            "configletList": [],
                            "currentparentContainerId": "undefined_container",
                            "designedConfig": "",
                            "designedConfigOutputIndex": "",
                            "extensionsRequireReboot": [],
                            "ignoreConfigletList": [],
                            "image": "",
                            "imageBundleId": "",
                            "imageId": [],
                            "imageIdList": [],
                            "imageToBePushedToDevice": "",
                            "isDCAEnabled": false,
                            "isRollbackFromSnapshotFlow": false,
                            "isRollbackTask": false,
                            "newparentContainerId": "container_0fbcb80f-0115-4c75-b25d-032a49d7e38a",
                            "noOfRe-Tries": 0,
                            "preRollbackImage": "",
                            "presentImageInDevice": "",
                            "runningConfig": "",
                            "sessionUsedInMgmtIpVal": "",
                            "targetIpAddress": "",
                            "user": ""
                        },
 "description": "Device Add A2 to container DC1_L3_LEAVES by CvDeviceTools.deploy",
                        "dualSupervisor": false,
                        "executedBy": "",
                        "executedOnInLongFormat": 0,
                        "name": "",
                        "netElementId": "98:5d:82:eb:ef:19",
                        "newParentContainerId": "container_0fbcb80f-0115-4c75-b25d-032a49d7e38a",
                        "newParentContainerName": "Undefined",
                        "note": "",
                        "stageId": "",
                        "taskStatus": "ACTIVE",
                        "taskStatusBeforeCancel": "",
                        "templateId": "ztp",
                        "workFlowDetailsId": "",
                        "workOrderDetails": {
                            "ipAddress": "172.16.9.22",
                            "netElementHostName": "A2",
                            "netElementId": "98:5d:82:eb:ef:19",
                            "serialNumber": "JPE19230667",
                            "workOrderDetailsId": "",
                            "workOrderId": ""
                        },
                        "workOrderId": "23",
                        "workOrderState": "ACTIVE",
                        "workOrderUserDefinedStatus": "Pending"
                    },
{
                        "ccId": "",
                        "ccIdV2": "",
                        "completedOnInLongFormat": 1694179141889,
                        "createdBy": "nms",
                        "createdOnInLongFormat": 1694179136867,
                        "currentTaskName": "Submit",
                        "currentTaskType": "User Task",
                        "data": {
                            "APP_SESSION_ID": "",
                            "ERROR_IN_CAPTURING_DESIGN_CONFIG": "",
                            "ERROR_IN_CAPTURING_RUNNING_CONFIG": "",
                            "INCORRECT_CONFIG_IN_CAPTURING_DESIGN_CONFIG": "",
                            "INCORRECT_CONFIG_IN_CAPTURING_DESIGN_CONFIG_OUTPUT_INDEX": "",
                            "IS_ADD_OR_MOVE_FLOW": true,
                            "IS_AUTO_GENERATED_IN_CVP": false,
                            "IS_CONFIG_PUSH_NEEDED": "yes",
                            "NETELEMENT_ID": "98:5d:82:ec:00:19",
                            "VIEW": "CONFIG_IMAGE",
                            "WORKFLOW_ACTION": "UpdateServiceTask",
                            "ZERO_TOUCH_REPLACEMENT": "",
                            "ccExecutingNode": "",
                            "ccId": "",
                            "commandUsedInMgmtIpVal": "",
                            "config": [],
                            "configExistInCVP": false,
                            "configSnapshots": [],
                            "configletList": [],
                            "currentparentContainerId": "undefined_container",
                            "designedConfig": "",
                            "designedConfigOutputIndex": "",
                            "extensionsRequireReboot": [],
                            "ignoreConfigletList": [],
                            "image": "",
                            "imageBundleId": "",
                            "imageId": [],
                            "imageIdList": [],
                            "imageToBePushedToDevice": "",
                            "isDCAEnabled": false,
                            "isRollbackFromSnapshotFlow": false,
                            "isRollbackTask": false,
                            "newparentContainerId": "container_0fbcb80f-0115-4c75-b25d-032a49d7e38a",
                            "noOfRe-Tries": 0,
                            "preRollbackImage": "",
                            "presentImageInDevice": "",
                            "runningConfig": "",
                            "sessionUsedInMgmtIpVal": "",
                            "targetIpAddress": "",
                            "user": ""
                        },
 "description": "Device Add A1 to container DC1_L3_LEAVES by CvDeviceTools.deploy",
                        "dualSupervisor": false,
                        "executedBy": "",
                        "executedOnInLongFormat": 0,
                        "name": "",
                        "netElementId": "98:5d:82:ec:00:19",
                        "newParentContainerId": "container_0fbcb80f-0115-4c75-b25d-032a49d7e38a",
                        "newParentContainerName": "Undefined",
                        "note": "",
                        "stageId": "",
                        "taskStatus": "ACTIVE",
                        "taskStatusBeforeCancel": "",
                        "templateId": "ztp",
                        "workFlowDetailsId": "",
                        "workOrderDetails": {
                            "ipAddress": "172.16.9.21",
                            "netElementHostName": "A1",
                            "netElementId": "98:5d:82:ec:00:19",
                            "serialNumber": "JPE19260933",
                            "workOrderDetailsId": "",
                            "workOrderId": ""
                        },
                        "workOrderId": "22",
                        "workOrderState": "ACTIVE",
                        "workOrderUserDefinedStatus": "Pending"
                    }
                ]
            },
            "device_filter": [
                "LABBO11"
            ],
            "devices": null,
            "options": null,
            "state": "present"
        }
    },
    "msg": "Device input data are not compliant with module."

Code of Conduct

ClausHolbechArista commented 12 months ago

Hi Ninnux.

Please also share your playbook.

~I will move this to a discussion, since this is more a troubleshooting exercise than a bug report.~ We don't have discussions enabled on ansible-cvp repo :)

ClausHolbechArista commented 12 months ago

@ninnux from your provided outputs I suspect "device_filter": ["LABBO11"], do be the issue, since LABB011 is not part of the hostnames A1, A2, A3 or A4. Try removing the device_filter from your playbook.

ninnux commented 12 months ago

@ClausHolbechArista I didn't understand that device_filter variable in playbook selected on hostname. I understud that device_filter select root name inventory... I changed my devices hostname and It works. Thank you a lot. You solved my problem.

ClausHolbechArista commented 12 months ago

device_filter is supposed to limit which devices you send to cloudvision, and if no devices match the filter, it leads to this bad situation. We have improved this behavior in AVD 4.0.

The root name is set with container_root: 'DC1' or similar.

ninnux commented 12 months ago

in any case Thank you