def test_is_dynamic_allocation_enabled_without_flag(self): """Ensure Dynamic Allocation is disabled when node doesnt't have flag. 1) Create a node without 'dynamic_allocation' flag 2) Check Dynamic Allocation is disabled for the given node """ with task_manager.acquire(self.context, self.node.uuid) as task: self.assertFalse(common.is_dynamic_allocation_enabled(task.node))
def test_is_dynamic_allocation_enabled_without_flag(self): """Ensure Dynamic Allocation is disabled when node doesn't have flag. 1) Create a node without 'dynamic_allocation' flag 2) Check Dynamic Allocation is disabled for the given node """ with task_manager.acquire(self.context, self.node.uuid) as task: self.assertFalse( common.is_dynamic_allocation_enabled(task.node) )
def test_is_dynamic_allocation_enabled_none_object(self): """Ensure Dynamic Allocation is disabled when flag is None. 1) Set 'dynamic_allocation' flag as None on node's driver_info 2) Check Dynamic Allocation is disabled for the given node """ with task_manager.acquire(self.context, self.node.uuid) as task: driver_info = task.node.driver_info driver_info['dynamic_allocation'] = None task.node.driver_info = driver_info self.assertFalse(common.is_dynamic_allocation_enabled(task.node))
def test_is_dynamic_allocation_enabled_string(self): """Ensure Dynamic Allocation is enabled when flag is 'True'. 1) Set 'dynamic_allocation' flag as True on node's driver_info 2) Check Dynamic Allocation is enabled for the given node """ with task_manager.acquire(self.context, self.node.uuid) as task: driver_info = task.node.driver_info driver_info['dynamic_allocation'] = 'True' task.node.driver_info = driver_info self.assertTrue(common.is_dynamic_allocation_enabled(task.node))
def test_is_dynamic_allocation_enabled_none_object(self): """Ensure Dynamic Allocation is disabled when flag is None. 1) Set 'dynamic_allocation' flag as None on node's driver_info 2) Check Dynamic Allocation is disabled for the given node """ with task_manager.acquire(self.context, self.node.uuid) as task: driver_info = task.node.driver_info driver_info['dynamic_allocation'] = None task.node.driver_info = driver_info self.assertFalse( common.is_dynamic_allocation_enabled(task.node) )
def test_is_dynamic_allocation_enabled_string(self): """Ensure Dynamic Allocation is enabled when flag is 'True'. 1) Set 'dynamic_allocation' flag as True on node's driver_info 2) Check Dynamic Allocation is enabled for the given node """ with task_manager.acquire(self.context, self.node.uuid) as task: driver_info = task.node.driver_info driver_info['dynamic_allocation'] = 'True' task.node.driver_info = driver_info self.assertTrue( common.is_dynamic_allocation_enabled(task.node) )
def tear_down_cleaning(self, task): if common.is_dynamic_allocation_enabled(task.node): deploy_utils.tear_down_cleaning(self.oneview_client, task) super(OneViewAgentDeploy, self).tear_down_cleaning(task)
def prepare_cleaning(self, task): if common.is_dynamic_allocation_enabled(task.node): deploy_utils.prepare_cleaning(self.oneview_client, task) return super(OneViewAgentDeploy, self).prepare_cleaning(task)
def tear_down(self, task): if (common.is_dynamic_allocation_enabled(task.node) and not CONF.conductor.automated_clean): deploy_utils.tear_down(self.oneview_client, task) return super(OneViewAgentDeploy, self).tear_down(task)
def prepare(self, task): if common.is_dynamic_allocation_enabled(task.node): deploy_utils.prepare(self.oneview_client, task) super(OneViewIscsiDeploy, self).prepare(task)
def prepare(self, task): if common.is_dynamic_allocation_enabled(task.node): deploy_utils.prepare(task) super(OneViewAgentDeploy, self).prepare(task)
def tear_down_cleaning(self, task): if common.is_dynamic_allocation_enabled(task.node): deploy_utils.tear_down_cleaning(task) return super(OneViewIscsiDeploy, self).tear_down_cleaning(task)
def tear_down(self, task): if (common.is_dynamic_allocation_enabled(task.node) and not CONF.conductor.automated_clean): deploy_utils.tear_down(task) super(OneViewIscsiDeploy, self).tear_down(task)
def prepare(self, task): if common.is_dynamic_allocation_enabled(task.node): deploy_utils.prepare(self.oneview_client, task) super(OneViewIscsiDeploy, self).prepare(task)
def tear_down(self, task): if (common.is_dynamic_allocation_enabled(task.node) and not CONF.conductor.automated_clean): deploy_utils.tear_down(self.oneview_client, task) return super(OneViewAgentDeploy, self).tear_down(task)
def tear_down_cleaning(self, task): if common.is_dynamic_allocation_enabled(task.node): deploy_utils.tear_down_cleaning(self.oneview_client, task) super(OneViewAgentDeploy, self).tear_down_cleaning(task)
def prepare_cleaning(self, task): if common.is_dynamic_allocation_enabled(task.node): deploy_utils.prepare_cleaning(self.oneview_client, task) return super(OneViewAgentDeploy, self).prepare_cleaning(task)