Merge "Config drive: make use of an instance object"
This commit is contained in:
@@ -453,7 +453,7 @@ class XenAPIVMTestCase(stubs.XenAPITestBase):
|
||||
'write_requests': 0}],
|
||||
'memory_details': {'maximum': 8192, 'used': 0}}
|
||||
|
||||
instance = self._create_instance()
|
||||
instance = self._create_instance(obj=True)
|
||||
actual = self.conn.get_instance_diagnostics(instance)
|
||||
self.assertEqual(expected, actual.serialize())
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ def required_by(instance):
|
||||
"img_config_drive",
|
||||
fields.ConfigDrivePolicy.OPTIONAL)
|
||||
|
||||
return (instance.get('config_drive') or
|
||||
return (instance.config_drive or
|
||||
'always' == CONF.force_config_drive or
|
||||
strutils.bool_from_string(CONF.force_config_drive) or
|
||||
image_prop == fields.ConfigDrivePolicy.MANDATORY
|
||||
|
||||
Reference in New Issue
Block a user