Skip to content

Commit a4af6df

Browse files
committed
lib/vif: Add VIF plug/unplug methods
Signed-off-by: Tu Dinh <[email protected]>
1 parent 077a7dd commit a4af6df

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/vif.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ def __init__(self, uuid, vm):
77
self.uuid = uuid
88
self.vm = vm
99

10+
def plug(self):
11+
self.vm.host.xe("vif-plug", {'uuid': self.uuid})
12+
13+
def unplug(self):
14+
self.vm.host.xe("vif-unplug", {'uuid': self.uuid})
15+
1016
def param_get(self, param_name, key=None, accept_unknown_key=False):
1117
return _param_get(self.vm.host, VIF.xe_prefix, self.uuid, param_name, key, accept_unknown_key)
1218

0 commit comments

Comments
 (0)