Exemple #1
0
    def delete_chassis(self, chassis_id):
        chassis_list = self.list_chassis()

        if utils.get_object(chassis_list, chassis_id):
            self.ironic('chassis-delete', params=chassis_id)

            chassis_list_uuid = self.get_chassis_uuids_from_chassis_list()
            if chassis_id in chassis_list_uuid:
                self.fail('Ironic chassis {0} has not been deleted!'
                          .format(chassis_id))
Exemple #2
0
    def delete_node(self, node_id):
        """Delete node method works only with fake driver.

        :param node_id: node uuid
        """
        node_list = self.list_nodes()

        if utils.get_object(node_list, node_id):
            node_show = self.show_node(node_id)
            if node_show['provision_state'] != 'available':
                self.ironic('node-set-provision-state',
                            params='{0} deleted'.format(node_id))
            if node_show['power_state'] not in ('None', 'off'):
                self.ironic('node-set-power-state',
                            params='{0} off'.format(node_id))
            self.ironic('node-delete', params=node_id)

            node_list_uuid = self.get_nodes_uuids_from_node_list()
            if node_id in node_list_uuid:
                self.fail('Ironic node {0} has not been deleted!'
                          .format(node_id))
Exemple #3
0
    def delete_node(self, node_id):
        """Delete node method works only with fake driver.

        :param node_id: node uuid
        """
        node_list = self.list_nodes()

        if utils.get_object(node_list, node_id):
            node_show = self.show_node(node_id)
            if node_show['provision_state'] != 'available':
                self.ironic('node-set-provision-state',
                            params='{0} deleted'.format(node_id))
            if node_show['power_state'] not in ('None', 'off'):
                self.ironic('node-set-power-state',
                            params='{0} off'.format(node_id))
            self.ironic('node-delete', params=node_id)

            node_list_uuid = self.get_nodes_uuids_from_node_list()
            if node_id in node_list_uuid:
                self.fail(
                    'Ironic node {0} has not been deleted!'.format(node_id))
    def delete_chassis(self, chassis_id):
        chassis_list = self.list_chassis()

        if utils.get_object(chassis_list, chassis_id):
            self.ironic('chassis-delete', params=chassis_id)
Exemple #5
0
    def delete_chassis(self, chassis_id):
        chassis_list = self.list_chassis()

        if utils.get_object(chassis_list, chassis_id):
            self.ironic('chassis-delete', params=chassis_id)