forked from shaba/openuds
Fixes for providers
This commit is contained in:
parent
6038f93189
commit
dc381565cf
@ -121,8 +121,7 @@ class OVirtLinkedDeployment(services.UserDeployment):
|
|||||||
self._mac = vals[3].decode('utf8')
|
self._mac = vals[3].decode('utf8')
|
||||||
self._vmid = vals[4].decode('utf8')
|
self._vmid = vals[4].decode('utf8')
|
||||||
self._reason = vals[5].decode('utf8')
|
self._reason = vals[5].decode('utf8')
|
||||||
queue = pickle.loads(vals[6])
|
self._queue = pickle.loads(vals[6])
|
||||||
self._queue = pickle.loads(queue)
|
|
||||||
|
|
||||||
def getName(self) -> str:
|
def getName(self) -> str:
|
||||||
if self._name == '':
|
if self._name == '':
|
||||||
@ -527,7 +526,7 @@ if sys.platform == 'win32':
|
|||||||
}
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
chkFnc: typing.Optional[typing.Optional[typing.Callable[[], str]]] = fncs.get(op, None)
|
chkFnc: typing.Optional[typing.Optional[typing.Callable[[], str]]] = fncs.get(op, None)
|
||||||
|
|
||||||
if chkFnc is None:
|
if chkFnc is None:
|
||||||
return self.__error('Unknown operation found at check queue ({0})'.format(op))
|
return self.__error('Unknown operation found at check queue ({0})'.format(op))
|
||||||
|
@ -87,12 +87,10 @@ class IPMachinesService(IPServiceBase):
|
|||||||
return {'ipList': gui.convertToList(ips)}
|
return {'ipList': gui.convertToList(ips)}
|
||||||
|
|
||||||
def marshal(self) -> bytes:
|
def marshal(self) -> bytes:
|
||||||
logger.debug('Marshal: %s', self._ips)
|
|
||||||
self.storage.saveData('ips', pickle.dumps(self._ips))
|
self.storage.saveData('ips', pickle.dumps(self._ips))
|
||||||
return b'v1'
|
return b'v1'
|
||||||
|
|
||||||
def unmarshal(self, data: bytes) -> None:
|
def unmarshal(self, data: bytes) -> None:
|
||||||
logger.debug('Vals %s', data)
|
|
||||||
if data == b'v1':
|
if data == b'v1':
|
||||||
d = self.storage.readData('ips')
|
d = self.storage.readData('ips')
|
||||||
if isinstance(d, bytes):
|
if isinstance(d, bytes):
|
||||||
@ -103,8 +101,6 @@ class IPMachinesService(IPServiceBase):
|
|||||||
else:
|
else:
|
||||||
self._ips = []
|
self._ips = []
|
||||||
|
|
||||||
logger.debug('Unmarshal: %s', self._ips)
|
|
||||||
|
|
||||||
def getUnassignedMachine(self) -> typing.Optional[str]:
|
def getUnassignedMachine(self) -> typing.Optional[str]:
|
||||||
# Search first unassigned machine
|
# Search first unassigned machine
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user