Remove test_baremetal_nodes from tempest

Current compute baremetal tests involve ironic and nova. Ironic to
create baremetal node and then GET nodes using nova APIs.

Nova only provides GET APIs for baremetal nodes which has been deprecated.

This tests is testing Ironic node GET/POST etc which are covered on
ironic tempest plugin and nova API testing is covered in nova functional
tests.

It needs Ironic to be present and so ironic baremetal client.

With all points in consideration we should remove this tests from tempest.

It satisfy all rules as defined in tests removal procedure.
1. Nova functional test is enough for this API testing.
   -http://git.openstack.org/cgit/openstack/nova/tree/nova/tests/functional/api_sample_tests/test_baremetal_nodes.py
2. gate does not run this test.
3. No external usage:
   - http://codesearch.openstack.org/?q=test_list_get_baremetal_nodes&i=nope&files=&repos=

Change-Id: Ide9ca3a349f396c994f1c822c3d040d93547ad48
Closes-Bug: #1675416
This commit is contained in:
zwhe 2017-03-23 21:43:35 +08:00 committed by Ghanshyam Mann
parent f123438b6a
commit 1b0567c680
2 changed files with 0 additions and 56 deletions

View File

@ -1,55 +0,0 @@
# Copyright 2015 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tempest.api.compute import base
from tempest import config
from tempest.lib import decorators
from tempest import test
CONF = config.CONF
class BaremetalNodesAdminTestJSON(base.BaseV2ComputeAdminTest):
"""Tests Baremetal API"""
@classmethod
def resource_setup(cls):
super(BaremetalNodesAdminTestJSON, cls).resource_setup()
if not getattr(CONF.service_available, 'ironic', False):
skip_msg = ('%s skipped as Ironic is not available' % cls.__name__)
raise cls.skipException(skip_msg)
cls.client = cls.os_adm.baremetal_nodes_client
cls.ironic_client = cls.os_adm.baremetal_client
@test.attr(type=['baremetal'])
@decorators.idempotent_id('e475aa6e-416d-4fa4-b3af-28d5e84250fb')
def test_list_get_baremetal_nodes(self):
# Create some test nodes in Ironic directly
test_nodes = []
for _ in range(0, 3):
_, node = self.ironic_client.create_node()
test_nodes.append(node)
self.addCleanup(self.ironic_client.delete_node, node['uuid'])
# List all baremetal nodes and ensure our created test nodes are
# listed
bm_node_ids = set([n['id'] for n in
self.client.list_baremetal_nodes()['nodes']])
test_node_ids = set([n['uuid'] for n in test_nodes])
self.assertTrue(test_node_ids.issubset(bm_node_ids))
# Test getting each individually
for node in test_nodes:
baremetal_node = self.client.show_baremetal_node(node['uuid'])
self.assertEqual(node['uuid'], baremetal_node['node']['id'])

View File

@ -159,7 +159,6 @@ class Manager(clients.ServiceClients):
self.aggregates_client = self.compute.AggregatesClient()
self.services_client = self.compute.ServicesClient()
self.tenant_usages_client = self.compute.TenantUsagesClient()
self.baremetal_nodes_client = self.compute.BaremetalNodesClient()
self.hosts_client = self.compute.HostsClient()
self.hypervisor_client = self.compute.HypervisorClient()
self.instance_usages_audit_log_client = (