def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) if parsed_args.node_uuids: baremetal.clean_nodes(self.app.client_manager, node_uuids=parsed_args.node_uuids) else: baremetal.clean_manageable_nodes(self.app.client_manager)
def test_clean_manageable_nodes_success(self): self.websocket.wait_for_messages.return_value = iter([{ "execution_id": "IDID", "status": "SUCCESS", "cleaned_nodes": [], }]) baremetal.clean_manageable_nodes(self.app.client_manager) self.workflow.executions.create.assert_called_once_with( 'tripleo.baremetal.v1.clean_manageable_nodes', workflow_input={})
def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) nodes = parsed_args.node_uuids if nodes: baremetal.clean_nodes( node_uuids=parsed_args.node_uuids, verbosity=oooutils.playbook_verbosity(self=self)) else: baremetal.clean_manageable_nodes( clients=self.app.client_manager, verbosity=oooutils.playbook_verbosity(self=self)) if parsed_args.provide: if nodes: baremetal.provide( self.app.client_manager, node_uuids=nodes, ) else: baremetal.provide_manageable_nodes(self.app.client_manager)
def test_clean_manageable_nodes_success(self): baremetal.clean_manageable_nodes(self.app.client_manager)