예제 #1
0
    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))
예제 #2
0
    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)
            )
예제 #3
0
    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))
예제 #4
0
    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))
예제 #5
0
    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)
            )
예제 #6
0
    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)
            )
예제 #7
0
파일: deploy.py 프로젝트: namnh68/ironic
 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)
예제 #8
0
파일: deploy.py 프로젝트: namnh68/ironic
 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)
예제 #9
0
파일: deploy.py 프로젝트: namnh68/ironic
 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)
예제 #10
0
파일: deploy.py 프로젝트: namnh68/ironic
 def prepare(self, task):
     if common.is_dynamic_allocation_enabled(task.node):
         deploy_utils.prepare(self.oneview_client, task)
     super(OneViewIscsiDeploy, self).prepare(task)
예제 #11
0
 def prepare(self, task):
     if common.is_dynamic_allocation_enabled(task.node):
         deploy_utils.prepare(task)
     super(OneViewAgentDeploy, self).prepare(task)
예제 #12
0
 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)
예제 #13
0
 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)
예제 #14
0
 def prepare(self, task):
     if common.is_dynamic_allocation_enabled(task.node):
         deploy_utils.prepare(self.oneview_client, task)
     super(OneViewIscsiDeploy, self).prepare(task)
예제 #15
0
 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)
예제 #16
0
 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)
예제 #17
0
 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)