Forum Discussion
dfo
Nimbostratus
Jun 06, 2018Python SDK: How to assign an interface to a VLAN on BIG-IP ?
I'm trying to attached an interface to a VLAN using the Python SDK but I get the following error => "Instance contains a string". Here is my code: vlan = mgmt.tm.net.vlans.vlan.load(name='TEST_4...
JRahm
Admin
Jun 06, 2018Ah...you are supplying the boolean as a string for the tagged state. Remove your quotes and it'll work fine:
v10 = b.tm.net.vlans.vlan.load(name='v10')
v10.interfaces_s.get_collection()
[]
v10.interfaces_s.interfaces.exists(name='1.3')
False
if not v10.interfaces_s.interfaces.exists(name='1.3'):
v10int = v10.interfaces_s.interfaces.create(name='1.3', untagged=True)
v10.interfaces_s.interfaces.exists(name='1.3')
True
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects