the instance os_type and os_version is not corrent when nova boot an
instance ImageMeta.py filter all properties, not allow self-define property. So fc driver shoud use nova common properties to pass the os_type and os_version Change-Id: I7807bf28d2081d30c70f555ad27b30b44b56ba0c
This commit is contained in:
parent
5421274a23
commit
12ccfe1d58
@ -321,8 +321,8 @@ FC_REBOOT_TYPE = {
|
||||
REBOOT_TYPE.SOFT: 'safe'
|
||||
}
|
||||
|
||||
HUAWEI_OS_TYPE = '__os_type'
|
||||
HUAWEI_OS_VERSION = '__os_version'
|
||||
HUAWEI_OS_TYPE = 'os_type'
|
||||
HUAWEI_OS_VERSION = 'os_distro'
|
||||
HUAWEI_IMAGE_LOCATION = '__image_location'
|
||||
HUAWEI_IMAGE_TYPE = '__image_source_type'
|
||||
HUAWEI_IS_LINK_CLONE = '__linked_clone'
|
||||
|
@ -589,14 +589,20 @@ class VmCreateWithImage(VmCreateByImport):
|
||||
def get_os_options(self):
|
||||
"""get vm os info"""
|
||||
|
||||
# get os Type from mata
|
||||
# os_type = self.image_properties.get(constant.HUAWEI_OS_TYPE)
|
||||
# os_version = self.image_properties.
|
||||
# get(constant.HUAWEI_OS_VERSION)
|
||||
# if os_type:
|
||||
# return self.get_fc_os_options(os_type, os_version)
|
||||
# else:
|
||||
return super(VmCreateWithImage, self).get_os_options()
|
||||
if self.image_properties.obj_attr_is_set(constant.HUAWEI_OS_TYPE):
|
||||
os_type = self.image_properties.get(constant.HUAWEI_OS_TYPE)
|
||||
else:
|
||||
os_type = "other"
|
||||
|
||||
if self.image_properties.obj_attr_is_set(constant.HUAWEI_OS_VERSION):
|
||||
os_version = self.image_properties.get(constant.HUAWEI_OS_VERSION)
|
||||
else:
|
||||
os_version = "other"
|
||||
|
||||
if os_type:
|
||||
return self.get_fc_os_options(os_type, os_version)
|
||||
else:
|
||||
return super(VmCreateWithImage, self).get_os_options()
|
||||
|
||||
def _get_image_size(self):
|
||||
"""get image size info"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user