def test_unassign_and_delete_passing_no_server_profile_template(
            self, mock_get_server_hardware, mock_prepare_and_do_request):
        driver_info = None
        mock_get_server_hardware.return_value = {'serverProfileUri': 'spt_uri'}
        mock_prepare_and_do_request.return_value = {"Task": "Delete"}

        oneview_client.unassign_and_delete(driver_info)
    def test_unassign_and_delete_passing_no_server_profile_template(
            self,
            mock_get_server_hardware,
            mock_prepare_and_do_request):
        driver_info = None
        mock_get_server_hardware.return_value = {'serverProfileUri': 'spt_uri'}
        mock_prepare_and_do_request.return_value = {"Task": "Delete"}

        oneview_client.unassign_and_delete(driver_info)
Esempio n. 3
0
 def tear_down(self, task):
     driver_info = common.parse_driver_info(task.node)
     manager_utils.node_power_action(task, states.POWER_OFF)
     oneview_client.unassign_and_delete(driver_info)
     return states.DELETED
 def tear_down(self, task):
     driver_info = common.parse_driver_info(task.node)
     manager_utils.node_power_action(task, states.POWER_OFF)
     oneview_client.unassign_and_delete(driver_info)
     return states.DELETED