Skip to content

json problem in aos.devices.managed_devices.get_all() #11

@sfuhrm

Description

@sfuhrm

Hi,

it looks like the JSON returned from the server contains less keys than the aos client expects:

>>> aos.devices.managed_devices.get_all()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/apstra-api-python/aos/devices.py", line 151, in get_all
    return list(self.iter_all())
  File "/root/apstra-api-python/aos/devices.py", line 157, in iter_all
    yield System.from_json(s)
  File "/root/apstra-api-python/aos/devices.py", line 65, in from_json
    user_config=d["user_config"],
KeyError: 'user_config'
>>> 

Any help would be appreciated.

Stephan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions