Move deploy_forces_oob_reboot to deploy drivers

Currently this driver option is exported by agent vendor interface which
is about to be removed.

Change-Id: I44e6ce39163d13d1e687bca3953a4bafe1e1be6d
Partial-Bug: #1640533
This commit is contained in:
Pavlo Shchelokovskyy
2016-11-15 13:58:04 +02:00
committed by Pavlo Shchelokovskyy
parent ff4c11e71e
commit f03f3feb75
3 changed files with 4 additions and 2 deletions

View File

@@ -60,6 +60,7 @@ OPTIONAL_PROPERTIES = {
COMMON_PROPERTIES = REQUIRED_PROPERTIES.copy() COMMON_PROPERTIES = REQUIRED_PROPERTIES.copy()
COMMON_PROPERTIES.update(OPTIONAL_PROPERTIES) COMMON_PROPERTIES.update(OPTIONAL_PROPERTIES)
COMMON_PROPERTIES.update(agent_base_vendor.VENDOR_PROPERTIES)
PARTITION_IMAGE_LABELS = ('kernel', 'ramdisk', 'root_gb', 'root_mb', 'swap_mb', PARTITION_IMAGE_LABELS = ('kernel', 'ramdisk', 'root_gb', 'root_mb', 'swap_mb',
'ephemeral_mb', 'ephemeral_format', 'configdrive', 'ephemeral_mb', 'ephemeral_format', 'configdrive',

View File

@@ -396,7 +396,7 @@ class ISCSIDeploy(AgentDeployMixin, base.DeployInterface):
"""iSCSI Deploy Interface for deploy-related actions.""" """iSCSI Deploy Interface for deploy-related actions."""
def get_properties(self): def get_properties(self):
return {} return agent_base_vendor.VENDOR_PROPERTIES
@METRICS.timer('ISCSIDeploy.validate') @METRICS.timer('ISCSIDeploy.validate')
def validate(self, task): def validate(self, task):

View File

@@ -518,7 +518,8 @@ class ISCSIDeployTestCase(db_base.DbTestCase):
def test_get_properties(self): def test_get_properties(self):
with task_manager.acquire(self.context, self.node.uuid, with task_manager.acquire(self.context, self.node.uuid,
shared=True) as task: shared=True) as task:
self.assertEqual({}, task.driver.deploy.get_properties()) props = task.driver.deploy.get_properties()
self.assertEqual(['deploy_forces_oob_reboot'], list(props))
@mock.patch.object(iscsi_deploy, 'validate', autospec=True) @mock.patch.object(iscsi_deploy, 'validate', autospec=True)
@mock.patch.object(deploy_utils, 'validate_capabilities', autospec=True) @mock.patch.object(deploy_utils, 'validate_capabilities', autospec=True)