Wired Intelligent Edge

 View Only
last person joined: 22 hours ago 

Bring performance and reliability to your network with the Aruba Core, Aggregation, and Access layer switches. Discuss the latest features and functionality of the ArubaOS-Switch and ArubaOS-CX devices, and find ways to improve security across your network to bring together a mobile first solution.
Expand all | Collapse all

fyi, aoscx-ansible-collection error "The error was: AttributeError: 'Device' object has no attribute 'configuration'"

This thread has been viewed 5 times
  • 1.  fyi, aoscx-ansible-collection error "The error was: AttributeError: 'Device' object has no attribute 'configuration'"

    Posted Jan 10, 2022 03:01 PM
    This is a FYI, since I am sure someone else will end up having this same issue and I randomly figured out what was going on and how to fix it.  I did not find anything with searching.

    I recently moved all of my playbooks from using the ROLE to the COLLECTION, along with that the new version 3.1.0, is using pyaoscx v2.

    If you run a playbook and receive this error:  "    The error was: AttributeError: 'Device' object has no attribute 'configuration'  "

    At least what fixed this for me was to correctly install of the requirements.txt!  Another point of showing that slowing down and reading the directions fully and correctly would have saved me a lot of time. So, on to the fix:

    cd ~/.ansible/collections/ansible_collections/arubanetworks/aoscx  # This should be the location the collection was install to, if it differs on your system go there.
    ansible-galaxy install -r requirements.yml
    python3 -m pip install -r requirements.txt

    I hope this helps someone in the future.


    ------------------------------
    Don Rhodes
    ------------------------------


  • 2.  RE: fyi, aoscx-ansible-collection error "The error was: AttributeError: 'Device' object has no attribute 'configuration'"

    MVP GURU
    Posted Jan 13, 2022 02:35 PM
    Thanks Don for feedback ;)

    You need to reinstall requirements with last update...

    ------------------------------
    PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...

    PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)

    PowerArubaCL: Powershell Module to use Aruba Central

    PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..

    ACEP / ACMX #107 / ACDX #1281
    ------------------------------