How to set fabric using python client

maas 2.3.5

When a new machine is discovered, my primary 10 gbps interface is assigned to the wrong fabric so when I go to assign a vlan to it, it fails, I assume because the VLAN is part of a different fabric. If I fix the fabric using the GUI and then run my script, it works fine.

So how can I set the fabric in my script? I don’t see the fabric listed as an attribute of the physical interface in python, but I can set it via the GUI.

Is this the wrong place to ask such a question? I still have this issue.

Hi Jeremy,

sorry for missing your question. This is indeed the right place to ask questions like this.

Can you show the code where you try to update the fabric?

Fabrics are tied to VLANs, and interfaces are tied to VLANs. So either you simply update the interface to point to a VLAN in another fabric, or you update the fabric of the VLAN.

If that doesn’t work, there might be a bug somewhere.

@jeremy-mordkoff, just checking to see if you’ve found the answer to your question. there is more information we’d need to help you, if you still need help – please see the last post…