mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-11 00:58:39 +03:00
* Fixed a bug on Services Pool Groups Images
* Fixed a couple bugs on OpenNebula"
This commit is contained in:
parent
793b6c9004
commit
437865b278
@ -109,7 +109,7 @@ class ServicesPools(ModelHandler):
|
||||
'service_id': item.service.uuid,
|
||||
'provider_id': item.service.provider.uuid,
|
||||
'image_id': item.image.uuid if item.image is not None else None,
|
||||
'pool_group_id': poolGroupId,
|
||||
'servicesPoolGroup_id': poolGroupId,
|
||||
'pool_group_name': poolGroupName,
|
||||
'pool_group_thumb': poolGroupThumb,
|
||||
'initial_srvs': item.initial_srvs,
|
||||
@ -164,7 +164,7 @@ class ServicesPools(ModelHandler):
|
||||
'tab': ugettext('Display'),
|
||||
}, {
|
||||
'name': 'servicesPoolGroup_id',
|
||||
'values': [gui.choiceImage(-1, _('Default'), DEFAULT_THUMB_BASE64)] + gui.sortedChoices([gui.choiceImage(v.uuid, v.name, v.image.thumb64) for v in ServicesPoolGroup.objects.all()]),
|
||||
'values': [gui.choiceImage(-1, _('Default'), DEFAULT_THUMB_BASE64)] + gui.sortedChoices([gui.choiceImage(v.uuid, v.name, v.thumb64) for v in ServicesPoolGroup.objects.all()]),
|
||||
'label': ugettext('Pool group'),
|
||||
'tooltip': ugettext('Pool group for this pool (for pool clasify on display)'),
|
||||
'type': gui.InputField.IMAGECHOICE_TYPE,
|
||||
|
@ -40,6 +40,7 @@ from django.utils.encoding import python_2_unicode_compatible
|
||||
|
||||
from uds.models.UUIDModel import UUIDModel
|
||||
from uds.models.Image import Image
|
||||
from uds.core.ui.images import DEFAULT_THUMB_BASE64
|
||||
|
||||
import logging
|
||||
|
||||
@ -80,8 +81,10 @@ class ServicesPoolGroup(UUIDModel):
|
||||
'imageUuid': self.image.uuid if self.image is not None else 'x'
|
||||
}
|
||||
|
||||
@property
|
||||
def thumb64(self):
|
||||
return self.image.thumb64 if self.image is not None else DEFAULT_THUMB_BASE64
|
||||
|
||||
@staticmethod
|
||||
def default():
|
||||
return ServicesPoolGroup(name=_('General'), comments='Default group', priority=-10000)
|
||||
|
||||
|
||||
|
@ -141,7 +141,7 @@ class LiveDeployment(UserDeployment):
|
||||
The get method of a mac generator takes one param, that is the mac range
|
||||
to use to get an unused mac.
|
||||
'''
|
||||
return self._mac
|
||||
return self._mac.upper()
|
||||
|
||||
def getIp(self):
|
||||
'''
|
||||
@ -176,7 +176,7 @@ class LiveDeployment(UserDeployment):
|
||||
if state == on.VmState.UNKNOWN:
|
||||
return self.__error('Machine is not available anymore')
|
||||
|
||||
self.service().startMachine()
|
||||
self.service().startMachine(self._vmid)
|
||||
|
||||
self.cache.put('ready', '1')
|
||||
return State.FINISHED
|
||||
|
Loading…
x
Reference in New Issue
Block a user