Skip to content

Commit

Permalink
chore: allow network to use OpaqueRef
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex4386 committed May 6, 2022
1 parent 649eec4 commit fabcc11
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions XenGarden/VIF/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from XenAPI.XenAPI import Failure

from XenGarden import VM
from XenGarden.VM import VM
from XenGarden.Network import Network


Expand Down Expand Up @@ -58,14 +58,14 @@ def get_all(session):

@staticmethod
def create(
session, device: str, network: str, vm: VM, mac: str, mtu: int, **kwargs
session, device: str, network: Network, vm: VM, mac: str, mtu: int, **kwargs
):
props = dict(
device=device,
network=network,
vm=vm,
mac=mac,
mtu=mtu,
network=network.network,
VM=vm.vm,
MAC=mac,
MTU=mtu,
**kwargs,
)

Expand Down Expand Up @@ -97,9 +97,6 @@ def unplug_force(self):
self.session.xenapi.VIF.unplug_force(self.vif)
return True

def move(self, network: Network):
return self.session.xenapi.VIF.move(self.vif, network.network)

def get_locking_mode(self):
return self.session.xenapi.VIF.get_locking_mode(self.vif)

Expand Down

0 comments on commit fabcc11

Please sign in to comment.