Developer

 View Only
last person joined: yesterday 

Expand all | Collapse all

New to pyaoscx

This thread has been viewed 15 times
  • 1.  New to pyaoscx

    Posted Jan 21, 2022 02:11 PM
    Hello,

    I'm trying to run my first python pyaoscx v2 script. The only documentation I found was in the workflow.py file.

    So my python script is:

    #!/home/user/pyaoscx-env/bin/python
    from pyaoscx.session import Session
    from pyaoscx.pyaoscx_factory import PyaoscxFactory
    from pyaoscx.interface import Interface

    version = '10.04'
    switch_ip = '10.100.10.106'
    s = Session(switch_ip, version)
    s.open('user', 'passwd')
    port = Interface(s, '1/1/11')
    port.get()
    print(port)

    When I run it I get:

    AttributeError: module 'pyaoscx' has no attribute 'interface'

    Any idea why I'm getting this error?  Also are there any pointers to documentation for v2 pyaoscx?

    Thank you
    ~

    ------------------------------
    Mike R
    ------------------------------


  • 2.  RE: New to pyaoscx

    MVP GURU
    Posted Jan 24, 2022 03:02 PM
    Hi Mike,

    Do you are using virtual env of Python ?

    ------------------------------
    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
    ------------------------------



  • 3.  RE: New to pyaoscx

    Posted Jan 24, 2022 03:16 PM

    Yes, I set up a virtual environment for pyaoscx.