python nx-api spanning tree vlan priority

Viewed 16

I am trying to configure spanning tree priority via an API. Unfortunately it didn't work and I don't know if my URL or JSON is wrong.

URL = f"https://{ip}/api/mo/sys/stp/inst/vlan-1234.json"

jsonData = {
    "stpVlan": {
        "attributes": {
            "adminSt": "4"
        }
    }
}
1 Answers

The main problem has been VPC! The config had to be imported into both devices because of vpc.

URL = f"https://{ip}/api/mo/sys/stp/inst/vlan-1234.json

jsonData = {
    "stpVlan": {
        "attributes": {
             "priority": "16384"
        }
    }
}
Related