2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-17 14:28:02 +00:00

xenserver: Add vm-id to the external_ids.

The vm-id external id in the interface table will uniquely identify a VM
that is connected to a bridge through that interface.

In xenserver, this will have the same value as the external id - xs-vm-uuid
and can be overridden by setting the nicira-vm-id key in the other_config
field of VM record of XAPI.

Bug #10020.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
This commit is contained in:
Gurucharan Shetty
2012-03-05 10:20:00 -08:00
parent ac8c341227
commit c473936b9a
4 changed files with 57 additions and 4 deletions

View File

@@ -30,6 +30,7 @@ class XenAPI(object):
self.network = Network()
self.pool = Pool()
self.VIF = VIF()
self.VM = VM()
def login_with_password(self, unused_username, unused_password):
pass
@@ -87,3 +88,11 @@ class VIF(Table):
def __init__(self):
Table.__init__(self, VIF.__records)
class VM(Table):
__records = ({"uuid": "fcb8a3f6-dc04-41d2-8b8a-55afd2b755b8",
"other_config":
{"nicira-vm-id": "custom vm ID"}},)
def __init__(self):
Table.__init__(self, VM.__records)