Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    def test_clean_nodes_success(self):

        self.websocket.wait_for_messages.return_value = self.message_success

        baremetal.clean_nodes(self.app.client_manager, node_uuids=[])

        self.workflow.executions.create.assert_called_once_with(
            'tripleo.baremetal.v1.clean_nodes',
            workflow_input={
                'node_uuids': [],
            })
    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)
Exemplo n.º 4
0
 def test_clean_nodes_success(self):
     baremetal.clean_nodes(node_uuids=[])