Merge "Allow boot vdu from volume"
This commit is contained in:
commit
8547078499
@ -70,7 +70,6 @@ class ToscaComputeTest(TestCase):
|
|||||||
#left intentionally
|
#left intentionally
|
||||||
'''
|
'''
|
||||||
expectedprops = {'flavor': 'm1.large',
|
expectedprops = {'flavor': 'm1.large',
|
||||||
'image': None,
|
|
||||||
'user_data_format': 'SOFTWARE_CONFIG'}
|
'user_data_format': 'SOFTWARE_CONFIG'}
|
||||||
self._tosca_compute_test(
|
self._tosca_compute_test(
|
||||||
tpl_snippet,
|
tpl_snippet,
|
||||||
@ -107,7 +106,6 @@ class ToscaComputeTest(TestCase):
|
|||||||
#left intentionally
|
#left intentionally
|
||||||
'''
|
'''
|
||||||
expectedprops = {'flavor': None,
|
expectedprops = {'flavor': None,
|
||||||
'image': None,
|
|
||||||
'user_data_format': 'SOFTWARE_CONFIG'}
|
'user_data_format': 'SOFTWARE_CONFIG'}
|
||||||
self._tosca_compute_test(
|
self._tosca_compute_test(
|
||||||
tpl_snippet,
|
tpl_snippet,
|
||||||
@ -120,7 +118,6 @@ class ToscaComputeTest(TestCase):
|
|||||||
type: tosca.nodes.Compute
|
type: tosca.nodes.Compute
|
||||||
'''
|
'''
|
||||||
expectedprops = {'flavor': None,
|
expectedprops = {'flavor': None,
|
||||||
'image': None,
|
|
||||||
'user_data_format': 'SOFTWARE_CONFIG'}
|
'user_data_format': 'SOFTWARE_CONFIG'}
|
||||||
self._tosca_compute_test(
|
self._tosca_compute_test(
|
||||||
tpl_snippet,
|
tpl_snippet,
|
||||||
@ -137,7 +134,6 @@ class ToscaComputeTest(TestCase):
|
|||||||
#left intentionally
|
#left intentionally
|
||||||
'''
|
'''
|
||||||
expectedprops = {'flavor': None,
|
expectedprops = {'flavor': None,
|
||||||
'image': None,
|
|
||||||
'user_data_format': 'SOFTWARE_CONFIG'}
|
'user_data_format': 'SOFTWARE_CONFIG'}
|
||||||
self._tosca_compute_test(
|
self._tosca_compute_test(
|
||||||
tpl_snippet,
|
tpl_snippet,
|
||||||
@ -155,7 +151,6 @@ class ToscaComputeTest(TestCase):
|
|||||||
mem_size: 4 GB
|
mem_size: 4 GB
|
||||||
'''
|
'''
|
||||||
expectedprops = {'flavor': 'm1.large',
|
expectedprops = {'flavor': 'm1.large',
|
||||||
'image': None,
|
|
||||||
'user_data_format': 'SOFTWARE_CONFIG'}
|
'user_data_format': 'SOFTWARE_CONFIG'}
|
||||||
self._tosca_compute_test(
|
self._tosca_compute_test(
|
||||||
tpl_snippet,
|
tpl_snippet,
|
||||||
@ -173,7 +168,6 @@ class ToscaComputeTest(TestCase):
|
|||||||
disk_size: 10 GB
|
disk_size: 10 GB
|
||||||
'''
|
'''
|
||||||
expectedprops = {'flavor': 'm1.large',
|
expectedprops = {'flavor': 'm1.large',
|
||||||
'image': None,
|
|
||||||
'user_data_format': 'SOFTWARE_CONFIG'}
|
'user_data_format': 'SOFTWARE_CONFIG'}
|
||||||
self._tosca_compute_test(
|
self._tosca_compute_test(
|
||||||
tpl_snippet,
|
tpl_snippet,
|
||||||
@ -190,7 +184,6 @@ class ToscaComputeTest(TestCase):
|
|||||||
num_cpus: 4
|
num_cpus: 4
|
||||||
'''
|
'''
|
||||||
expectedprops = {'flavor': 'm1.large',
|
expectedprops = {'flavor': 'm1.large',
|
||||||
'image': None,
|
|
||||||
'user_data_format': 'SOFTWARE_CONFIG'}
|
'user_data_format': 'SOFTWARE_CONFIG'}
|
||||||
self._tosca_compute_test(
|
self._tosca_compute_test(
|
||||||
tpl_snippet,
|
tpl_snippet,
|
||||||
@ -216,7 +209,6 @@ class ToscaComputeTest(TestCase):
|
|||||||
'num_cpus': 1}
|
'num_cpus': 1}
|
||||||
}
|
}
|
||||||
expectedprops = {'flavor': 'm1.mock_flavor',
|
expectedprops = {'flavor': 'm1.mock_flavor',
|
||||||
'image': None,
|
|
||||||
'user_data_format': 'SOFTWARE_CONFIG'}
|
'user_data_format': 'SOFTWARE_CONFIG'}
|
||||||
self._tosca_compute_test(tpl_snippet, expectedprops)
|
self._tosca_compute_test(tpl_snippet, expectedprops)
|
||||||
|
|
||||||
|
@ -87,7 +87,10 @@ class ToscaCompute(HotResource):
|
|||||||
if os_cap_props:
|
if os_cap_props:
|
||||||
image = self._best_image(os_cap_props)
|
image = self._best_image(os_cap_props)
|
||||||
hot_properties['flavor'] = flavor
|
hot_properties['flavor'] = flavor
|
||||||
hot_properties['image'] = image
|
if image:
|
||||||
|
hot_properties['image'] = image
|
||||||
|
else:
|
||||||
|
hot_properties.pop('image', None)
|
||||||
return hot_properties
|
return hot_properties
|
||||||
|
|
||||||
def _best_flavor(self, properties):
|
def _best_flavor(self, properties):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user