RHEV SDK/API: HostNic's attach network doesn't work with VLAN tagged networks
Issue
If I use the web admin portal to add an additional VLAN-tagged network to an interface it works; however, I've been unable to get this to work in the API.
I am using the attach method of the HostNICs class to associate the VLAN-tagged network with the bond0 interface.
Here is a simple code snippet (using the rhevm-sdk):
api = API(url=URL, username="admin@internal", password="rootme", insecure=True)
nic = api.hosts.get('host11').nics.get('eth1')
network = api.clusters.get("test").networks.get(name='net2')
nic.attach(params.Action(network = network))
I get the following output:
status: 400
reason: Bad Request
detail: The Network Interface is already attached to a Logical Network.
Environment
Red Hat Enterprise Virtualization 3.1 and 3.2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
