# Copyright 2015 Mirantis, Inc. # # 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 fuelweb_test.helpers.decorators import log_snapshot_after_test from fuelweb_test.settings import DEPLOYMENT_MODE from fuelweb_test.settings import NEUTRON_SEGMENT from fuelweb_test.tests.base_test_case import SetupEnvironment from fuelweb_test.tests.base_test_case import TestBasic from proboscis import test @test(groups=["ironic"]) class TestIronicBase(TestBasic): """TestIronicBase""" # TODO documentation @test(depends_on=[SetupEnvironment.prepare_slaves_3], groups=["ironic_base"]) @log_snapshot_after_test def ironic_base( self): """Deploy cluster in HA mode with Ironic: Scenario: 1. Create cluster 2. Add 1 controller node 3. Add 1 compute node 4. Add 1 ironic node 5. Deploy cluster 6. Verify network 7. Run OSTF Snapshot: test_ironic_base """ self.env.revert_snapshot("ready_with_3_slaves") self.show_step(1) cluster_id = self.fuel_web.create_cluster( name=self.__class__.__name__, mode=DEPLOYMENT_MODE, settings={ "net_provider": 'neutron', "net_segment_type": NEUTRON_SEGMENT['vlan'], "ironic": True, } ) self.show_step(2) self.show_step(3) self.show_step(4) self.fuel_web.update_nodes( cluster_id, { 'slave-01': ['controller'], 'slave-02': ['compute'], 'slave-03': ['ironic'], } ) self.show_step(5) self.fuel_web.deploy_cluster_wait(cluster_id) self.show_step(6) self.fuel_web.verify_network(cluster_id) self.show_step(7) self.fuel_web.run_ostf( cluster_id=cluster_id) self.env.make_snapshot("ironic_base")