Fixed opennebula mac retrieval (moved to a later stage, just after "power on" vm)

This commit is contained in:
Adolfo Gómez García 2019-12-20 16:18:35 +01:00
parent 7bfa539e70
commit 7801cf85c0

View File

@ -302,7 +302,7 @@ class LiveDeployment(UserDeployment): # pylint: disable=too-many-public-methods
raise Exception('Can\'t create machine') raise Exception('Can\'t create machine')
# Get IP & MAC (early stage) # Get IP & MAC (early stage)
self._mac, self._ip = self.service().getNetInfo(self._vmid) # self._mac, self._ip = self.service().getNetInfo(self._vmid)
return State.RUNNING return State.RUNNING
@ -331,6 +331,10 @@ class LiveDeployment(UserDeployment): # pylint: disable=too-many-public-methods
Powers on the machine Powers on the machine
""" """
self.service().startMachine(self._vmid) self.service().startMachine(self._vmid)
# Get IP & MAC (later stage, after "powering on")
self._mac, self._ip = self.service().getNetInfo(self._vmid)
return State.RUNNING return State.RUNNING
def __suspendMachine(self) -> str: def __suspendMachine(self) -> str: