当前位置: 首页>>代码示例>>Python>>正文


Python Common.image_import方法代码示例

本文整理汇总了Python中fuelweb_test.helpers.common.Common.image_import方法的典型用法代码示例。如果您正苦于以下问题:Python Common.image_import方法的具体用法?Python Common.image_import怎么用?Python Common.image_import使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fuelweb_test.helpers.common.Common的用法示例。


在下文中一共展示了Common.image_import方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: deploy_murano_simple

# 需要导入模块: from fuelweb_test.helpers.common import Common [as 别名]
# 或者: from fuelweb_test.helpers.common.Common import image_import [as 别名]
    def deploy_murano_simple(self):
        """Deploy cluster in simple mode with Murano

        Scenario:
            1. Create cluster. Set install Murano option
            2. Add 1 node with controller role
            3. Add 1 nodes with compute role
            4. Deploy the cluster
            5. Verify murano services
            6. Run OSTF
            7. Register murano image
            8. Run OSTF platform tests

        Snapshot: deploy_murano_simple

        """
        if settings.OPENSTACK_RELEASE == settings.OPENSTACK_RELEASE_REDHAT:
            raise SkipTest()

        self.env.revert_snapshot("ready_with_3_slaves")

        LOGGER.debug('Check MD5 of image')
        check_image = checkers.check_image(
            settings.SERVTEST_MURANO_SERVER_URL,
            settings.SERVTEST_MURANO_IMAGE,
            settings.SERVTEST_MURANO_IMAGE_MD5,
            settings.SERVTEST_LOCAL_PATH)
        asserts.assert_true(check_image, "Image verification failed")

        data = {
            'murano': True,
            "net_provider": 'neutron',
            "net_segment_type": 'gre',
            'tenant': 'muranoSimple',
            'user': 'muranoSimple',
            'password': 'muranoSimple'
        }

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            settings=data)

        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['compute']
            }
        )
        self.fuel_web.deploy_cluster_wait(cluster_id)
        self.fuel_web.assert_cluster_ready(
            'slave-01', smiles_count=5, networks_count=1, timeout=300)
        checkers.verify_service(
            self.env.get_ssh_to_remote_by_name("slave-01"),
            service_name='murano-api')

        controller_ip = self.fuel_web.get_nailgun_node_by_name(
            'slave-01')['ip']
        common_func = Common(controller_ip,
                             data['user'],
                             data['password'],
                             data['tenant'])

        LOGGER.debug('Run sanity and functional oSTF tests')
        test_classes = ['fuel_health.tests.sanity.test_sanity_murano.'
                        'MuranoSanityTests.test_create_and_delete_service']
        self.fuel_web.run_ostf(
            cluster_id=self.fuel_web.get_last_created_cluster(),
            tests_must_be_passed=test_classes
        )

        LOGGER.debug('Import image')
        common_func.image_import(
            settings.SERVTEST_LOCAL_PATH,
            settings.SERVTEST_MURANO_IMAGE,
            settings.SERVTEST_MURANO_IMAGE_NAME,
            settings.SERVTEST_MURANO_IMAGE_META)

        LOGGER.debug('Run OSTF platform tests')

        test_class_main = ('fuel_health.tests.platform_tests'
                           '.test_platform_murano_linux.'
                           'MuranoDeployLinuxServicesTests')
        tests_names = ['test_deploy_telnet_service',
                       'test_deploy_apache_service']
        test_classes = []
        for test_name in tests_names:
            test_classes.append('{0}.{1}'.format(test_class_main,
                                                 test_name))

        self.fuel_web.run_ostf(
            cluster_id=self.fuel_web.get_last_created_cluster(),
            tests_must_be_passed=test_classes, test_sets=['platform_tests'])
        self.env.make_snapshot("deploy_murano_simple")
开发者ID:Axam,项目名称:fuel-main,代码行数:96,代码来源:test_services.py

示例2: deploy_savanna_simple

# 需要导入模块: from fuelweb_test.helpers.common import Common [as 别名]
# 或者: from fuelweb_test.helpers.common.Common import image_import [as 别名]
    def deploy_savanna_simple(self):
        """Deploy cluster in simple mode with Savanna

        Scenario:
            1. Create cluster. Set install Sahara option
            2. Add 1 node with controller role
            3. Add 1 node with compute role
            4. Deploy the cluster
            5. Verify sahara services
            6. Run OSTF
            7. Register sahara image
            8. Run OSTF platform sahara tests only

        Snapshot: deploy_sahara_simple

        """
        if settings.OPENSTACK_RELEASE == settings.OPENSTACK_RELEASE_REDHAT:
            raise SkipTest()

        LOGGER.debug('Check MD5 of image')
        check_image = checkers.check_image(
            settings.SERVTEST_SAVANNA_SERVER_URL,
            settings.SERVTEST_SAVANNA_IMAGE,
            settings.SERVTEST_SAVANNA_IMAGE_MD5,
            settings.SERVTEST_LOCAL_PATH)
        asserts.assert_true(check_image)

        self.env.revert_snapshot("ready_with_3_slaves")
        LOGGER.debug('Create cluster for sahara tests')
        data = {
            'sahara': True,
            "net_provider": 'neutron',
            "net_segment_type": 'gre',
            'tenant': 'saharaSimple',
            'user': 'saharaSimple',
            'password': 'saharaSimple'

        }

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            settings=data
        )
        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['compute']
            }
        )
        self.fuel_web.deploy_cluster_wait(cluster_id)
        self.fuel_web.assert_cluster_ready(
            'slave-01', smiles_count=5, networks_count=1, timeout=300)
        checkers.verify_service(
            self.env.get_ssh_to_remote_by_name("slave-01"),
            service_name='sahara-api')

        controller_ip = self.fuel_web.get_nailgun_node_by_name(
            'slave-01')['ip']
        common_func = Common(controller_ip,
                             data['user'],
                             data['password'],
                             data['tenant'])

        failed_test_name = ['Create volume and attach it to instance']

        test_classes = ['fuel_health.tests.sanity.test_sanity_savanna.'
                        'SanitySavannaTests.test_sanity_savanna']
        self.fuel_web.run_ostf(
            cluster_id=self.fuel_web.get_last_created_cluster(),
            tests_must_be_passed=test_classes
        )

        LOGGER.debug('Import image')
        common_func.image_import(
            settings.SERVTEST_LOCAL_PATH,
            settings.SERVTEST_SAVANNA_IMAGE,
            settings.SERVTEST_SAVANNA_IMAGE_NAME,
            settings.SERVTEST_SAVANNA_IMAGE_META)

        common_func.goodbye_security()

        LOGGER.debug('Run OSTF savanna platform tests')

        self.fuel_web.run_single_ostf_test(
            cluster_id=cluster_id, test_sets=['platform_tests'],
            test_name=('fuel_health.tests.platform_tests.'
                       'test_platform_savanna.PlatformSavannaTests.'
                       'test_platform_savanna'), should_fail=1,
            timeout=60 * 200, failed_test_name=failed_test_name)

        self.env.make_snapshot("deploy_sahara_simple")
开发者ID:Axam,项目名称:fuel-main,代码行数:94,代码来源:test_services.py

示例3: deploy_murano_ha_with_gre

# 需要导入模块: from fuelweb_test.helpers.common import Common [as 别名]
# 或者: from fuelweb_test.helpers.common.Common import image_import [as 别名]
    def deploy_murano_ha_with_gre(self):
        """Deploy cluster in ha mode with Murano and Neutron GRE

        Scenario:
            1. Create cluster. Set install Murano option
            2. Add 3 node with controller role
            3. Add 1 nodes with compute role
            4. Deploy the cluster
            5. Verify Murano services
            6. Run OSTF
            7. Register Murano image
            8. Run OSTF Murano platform tests

        Duration 100m
        Snapshot: deploy_murano_ha_with_gre

        """
        self.env.revert_snapshot("ready_with_5_slaves")

        LOGGER.debug('Check MD5 of image')
        check_image = checkers.check_image(
            settings.SERVTEST_MURANO_IMAGE,
            settings.SERVTEST_MURANO_IMAGE_MD5,
            settings.SERVTEST_LOCAL_PATH)
        asserts.assert_true(check_image, "Image verification failed")

        data = {
            'murano': True,
            'net_provider': 'neutron',
            'net_segment_type': 'gre',
            'tenant': 'muranoHA',
            'user': 'muranoHA',
            'password': 'muranoHA'
        }

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            mode=settings.DEPLOYMENT_MODE,
            settings=data)

        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute']
            }
        )
        self.fuel_web.deploy_cluster_wait(cluster_id)
        cluster_vip = self.fuel_web.get_public_vip(cluster_id)
        os_conn = os_actions.OpenStackActions(
            cluster_vip, data['user'], data['password'], data['tenant'])
        self.fuel_web.assert_cluster_ready(
            os_conn, smiles_count=13, networks_count=2, timeout=300)
        for slave in ["slave-01", "slave-02", "slave-03"]:
            checkers.verify_service(
                self.env.get_ssh_to_remote_by_name(slave),
                service_name='murano-api')

        common_func = Common(cluster_vip, data['user'], data['password'],
                             data['tenant'])

        LOGGER.debug('Run sanity and functional Murano OSTF tests')
        self.fuel_web.run_single_ostf_test(
            cluster_id=self.fuel_web.get_last_created_cluster(),
            test_sets=['sanity'],
            test_name=('fuel_health.tests.sanity.test_sanity_murano.'
                       'MuranoSanityTests.test_create_and_delete_service')
        )

        LOGGER.debug('Import Murano image')
        common_func.image_import(
            settings.SERVTEST_LOCAL_PATH,
            settings.SERVTEST_MURANO_IMAGE,
            settings.SERVTEST_MURANO_IMAGE_NAME,
            settings.SERVTEST_MURANO_IMAGE_META)

        LOGGER.debug('Boot instance with Murano image')

        image_name = settings.SERVTEST_MURANO_IMAGE_NAME
        srv = common_func.create_instance(flavor_name='test_murano_flavor',
                                          ram=2048, vcpus=1, disk=20,
                                          server_name='murano_instance',
                                          image_name=image_name,
                                          neutron_network=True)

        wait(lambda: common_func.get_instance_detail(srv).status == 'ACTIVE',
             timeout=60 * 60)

        common_func.delete_instance(srv)

        LOGGER.debug('Run OSTF platform tests')

        test_class_main = ('fuel_health.tests.platform_tests'
                           '.test_murano_linux.MuranoDeployLinuxServicesTests')
        tests_names = ['test_deploy_apache_service', ]

        test_classes = []

#.........这里部分代码省略.........
开发者ID:Fiware,项目名称:ops.Fuel-main-dev,代码行数:103,代码来源:test_services.py

示例4: deploy_sahara_ha_one_controller_gre

# 需要导入模块: from fuelweb_test.helpers.common import Common [as 别名]
# 或者: from fuelweb_test.helpers.common.Common import image_import [as 别名]
    def deploy_sahara_ha_one_controller_gre(self):
        """Deploy cluster in ha mode with 1 controller Sahara and Neutron GRE

        Scenario:
            1. Create a Fuel cluster. Set the option for Sahara installation
            2. Add 1 node with "controller" role
            3. Add 1 node with "compute" role
            4. Deploy the Fuel cluster
            5. Verify Sahara service on controller
            6. Run all sanity and smoke tests
            7. Register Vanilla2 image for Sahara
            8. Run platform Vanilla2 test for Sahara

        Duration 65m
        Snapshot: deploy_sahara_ha_one_controller_gre
        """
        if settings.OPENSTACK_RELEASE == settings.OPENSTACK_RELEASE_REDHAT:
            raise SkipTest()

        LOGGER.debug('Check MD5 sum of Vanilla2 image')
        check_image = checkers.check_image(
            settings.SERVTEST_SAHARA_VANILLA_2_IMAGE,
            settings.SERVTEST_SAHARA_VANILLA_2_IMAGE_MD5,
            settings.SERVTEST_LOCAL_PATH)
        asserts.assert_true(check_image)

        self.env.revert_snapshot("ready_with_3_slaves")

        LOGGER.debug('Create Fuel cluster for Sahara tests')
        data = {
            'sahara': True,
            'net_provider': 'neutron',
            'net_segment_type': 'gre',
            'tenant': 'saharaSimple',
            'user': 'saharaSimple',
            'password': 'saharaSimple'
        }
        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            mode=settings.DEPLOYMENT_MODE,
            settings=data
        )
        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['compute']
            }
        )
        self.fuel_web.deploy_cluster_wait(cluster_id)
        os_conn = os_actions.OpenStackActions(
            self.fuel_web.get_public_vip(cluster_id),
            data['user'], data['password'], data['tenant'])
        self.fuel_web.assert_cluster_ready(
            os_conn, smiles_count=5, networks_count=2, timeout=300)

        LOGGER.debug('Verify Sahara service on controller')
        _ip = self.fuel_web.get_nailgun_node_by_name("slave-01")['ip']
        checkers.verify_service(
            self.env.d_env.get_ssh_to_remote(_ip),
            service_name='sahara-all')

        LOGGER.debug('Run all sanity and smoke tests')
        path_to_tests = 'fuel_health.tests.sanity.test_sanity_sahara.'
        test_names = ['VanillaTwoTemplatesTest.test_vanilla_two_templates',
                      'HDPTwoTemplatesTest.test_hdp_two_templates']
        self.fuel_web.run_ostf(
            cluster_id=self.fuel_web.get_last_created_cluster(),
            tests_must_be_passed=[path_to_tests + test_name
                                  for test_name in test_names]
        )

        LOGGER.debug('Import Vanilla2 image for Sahara')
        common_func = Common(
            self.fuel_web.get_public_vip(cluster_id),
            data['user'], data['password'], data['tenant'])
        common_func.image_import(
            settings.SERVTEST_LOCAL_PATH,
            settings.SERVTEST_SAHARA_VANILLA_2_IMAGE,
            settings.SERVTEST_SAHARA_VANILLA_2_IMAGE_NAME,
            settings.SERVTEST_SAHARA_VANILLA_2_IMAGE_META)

        path_to_tests = 'fuel_health.tests.tests_platform.test_sahara.'
        test_names = ['VanillaTwoClusterTest.test_vanilla_two_cluster']
        for test_name in test_names:
            LOGGER.debug('Run platform test {0} for Sahara'.format(test_name))
            self.fuel_web.run_single_ostf_test(
                cluster_id=cluster_id, test_sets=['tests_platform'],
                test_name=path_to_tests + test_name, timeout=60 * 200)

        self.env.make_snapshot("deploy_sahara_ha_one_controller_gre")
开发者ID:aglarendil,项目名称:fuel-qa,代码行数:93,代码来源:test_services.py

示例5: deploy_heat_ha

# 需要导入模块: from fuelweb_test.helpers.common import Common [as 别名]
# 或者: from fuelweb_test.helpers.common.Common import image_import [as 别名]
    def deploy_heat_ha(self):
        """Deploy Heat cluster in HA mode

        Scenario:
            1. Create cluster
            2. Add 3 node with controller role
            3. Add 1 nodes with compute role
            4. Deploy the cluster
            5. Verify heat services
            6. Run OSTF
            7. Register heat image
            8. Run OSTF platform tests

        Snapshot: deploy_heat_ha

        """

        self.env.revert_snapshot("ready_with_5_slaves")

        LOGGER.debug('Check MD5 of image')
        check_image = checkers.check_image(
            settings.SERVTEST_HEAT_IMAGE,
            settings.SERVTEST_HEAT_IMAGE_MD5,
            settings.SERVTEST_LOCAL_PATH)
        asserts.assert_true(check_image, "Image verification failed")

        data = {
            'net_provider': 'neutron',
            'net_segment_type': 'gre',
            'tenant': 'heatSimple',
            'user': 'heatSimple',
            'password': 'heatSimple'
        }

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            mode=settings.DEPLOYMENT_MODE_HA,
            settings=data)

        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute']
            }
        )
        self.fuel_web.deploy_cluster_wait(cluster_id)
        self.fuel_web.assert_cluster_ready(
            'slave-01', smiles_count=13, networks_count=1, timeout=300)

        for slave in ["slave-01", "slave-02", "slave-03"]:
            checkers.verify_service(
                self.env.get_ssh_to_remote_by_name(slave),
                service_name='heat-api', count=3)

        cluster_vip = self.fuel_web.get_public_vip(cluster_id)

        common_func = Common(cluster_vip,
                             data['user'],
                             data['password'],
                             data['tenant'])

        LOGGER.debug('Import Heat image')
        common_func.image_import(
            settings.SERVTEST_LOCAL_PATH,
            settings.SERVTEST_HEAT_IMAGE,
            settings.SERVTEST_HEAT_IMAGE_NAME,
            settings.SERVTEST_HEAT_IMAGE_META)

        LOGGER.debug('Run Heat OSTF platform tests')

        test_class_main = ('fuel_health.tests.platform_tests.'
                           'test_heat.'
                           'HeatSmokeTests')
        tests_names = ['test_actions',
                       'test_rollback']

        test_classes = []

        for test_name in tests_names:
            test_classes.append('{0}.{1}'.format(test_class_main,
                                                 test_name))

        for test_name in test_classes:
            self.fuel_web.run_single_ostf_test(
                cluster_id=cluster_id, test_sets=['platform_tests'],
                test_name=test_name, timeout=60 * 60)

        self.env.make_snapshot("deploy_heat_ha")
开发者ID:amit213,项目名称:fuel-main,代码行数:93,代码来源:test_services.py

示例6: deploy_sahara_ha_gre

# 需要导入模块: from fuelweb_test.helpers.common import Common [as 别名]
# 或者: from fuelweb_test.helpers.common.Common import image_import [as 别名]
    def deploy_sahara_ha_gre(self):
        """Deploy cluster in HA mode with Sahara and Neutron GRE

        Scenario:
            1. Create cluster. Set install Sahara option
            2. Add 3 node with controller role
            3. Add 1 node with compute role
            4. Deploy the cluster
            5. Verify Sahara services
            6. Run OSTF
            7. Register Sahara image
            8. Run OSTF platform Sahara test only

        Snapshot: deploy_sahara_ha_gre

        """
        if settings.OPENSTACK_RELEASE == settings.OPENSTACK_RELEASE_REDHAT:
            raise SkipTest()

        LOGGER.debug('Check MD5 of image')
        check_image = checkers.check_image(
            settings.SERVTEST_SAVANNA_IMAGE,
            settings.SERVTEST_SAVANNA_IMAGE_MD5,
            settings.SERVTEST_LOCAL_PATH)
        asserts.assert_true(check_image)

        self.env.revert_snapshot("ready_with_5_slaves")
        LOGGER.debug('Create cluster for sahara tests')
        data = {
            'sahara': True,
            'net_provider': 'neutron',
            'net_segment_type': 'gre',
            'tenant': 'saharaHA',
            'user': 'saharaHA',
            'password': 'saharaHA'
        }

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            mode=settings.DEPLOYMENT_MODE_HA,
            settings=data
        )
        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['controller'],
                'slave-03': ['controller'],
                'slave-04': ['compute']
            }
        )
        self.fuel_web.deploy_cluster_wait(cluster_id)
        self.fuel_web.assert_cluster_ready(
            'slave-01', smiles_count=13, networks_count=1, timeout=300)

        for slave in ["slave-01", "slave-02", "slave-03"]:
            checkers.verify_service(
                self.env.get_ssh_to_remote_by_name(slave),
                service_name='sahara-api')

        cluster_vip = self.fuel_web.get_public_vip(cluster_id)
        common_func = Common(cluster_vip, data['user'], data['password'],
                             data['tenant'])

        test_classes = ['fuel_health.tests.sanity.test_sanity_savanna.'
                        'SanitySavannaTests.test_sanity_savanna']
        self.fuel_web.run_ostf(
            cluster_id=self.fuel_web.get_last_created_cluster(),
            tests_must_be_passed=test_classes
        )

        LOGGER.debug('Import image')
        common_func.image_import(
            settings.SERVTEST_LOCAL_PATH,
            settings.SERVTEST_SAVANNA_IMAGE,
            settings.SERVTEST_SAVANNA_IMAGE_NAME,
            settings.SERVTEST_SAVANNA_IMAGE_META)

        common_func.goodbye_security()

        LOGGER.debug('Run OSTF Sahara platform test')

        self.fuel_web.run_single_ostf_test(
            cluster_id=cluster_id, test_sets=['platform_tests'],
            test_name=('fuel_health.tests.platform_tests.'
                       'test_platform_savanna.PlatformSavannaTests.'
                       'test_platform_savanna'), timeout=60 * 200)

        self.env.make_snapshot("deploy_sahara_ha_gre")
开发者ID:amit213,项目名称:fuel-main,代码行数:91,代码来源:test_services.py

示例7: deploy_heat_simple_nova

# 需要导入模块: from fuelweb_test.helpers.common import Common [as 别名]
# 或者: from fuelweb_test.helpers.common.Common import image_import [as 别名]
    def deploy_heat_simple_nova(self):
        """Deploy Heat cluster in simple mode with Nova Network

        Scenario:
            1. Create cluster
            2. Add 1 node with controller role
            3. Add 1 nodes with compute role
            4. Deploy the cluster
            5. Verify heat services
            6. Run OSTF
            7. Register heat image
            8. Run OSTF platform tests

        Snapshot: deploy_heat_simple_nova

        """

        self.env.revert_snapshot("ready_with_3_slaves")

        LOGGER.debug('Check MD5 of image')
        check_image = checkers.check_image(
            settings.SERVTEST_HEAT_IMAGE,
            settings.SERVTEST_HEAT_IMAGE_MD5,
            settings.SERVTEST_LOCAL_PATH)
        asserts.assert_true(check_image, "Image verification failed")

        data = {
            'tenant': 'heatSimple',
            'user': 'heatSimple',
            'password': 'heatSimple'
        }

        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            settings=data)

        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['compute']
            }
        )
        self.fuel_web.deploy_cluster_wait(cluster_id)
        controller = self.fuel_web.get_nailgun_node_by_name('slave-01')
        os_conn = os_actions.OpenStackActions(
            controller['ip'], data['user'], data['password'], data['tenant'])
        self.fuel_web.assert_cluster_ready(
            os_conn, smiles_count=6, networks_count=1, timeout=300)

        checkers.verify_service(
            self.env.get_ssh_to_remote_by_name("slave-01"),
            service_name='heat-api', count=3)

        common_func = Common(controller['ip'],
                             data['user'],
                             data['password'],
                             data['tenant'])

        LOGGER.debug('Import Heat image')
        common_func.image_import(
            settings.SERVTEST_LOCAL_PATH,
            settings.SERVTEST_HEAT_IMAGE,
            settings.SERVTEST_HEAT_IMAGE_NAME,
            settings.SERVTEST_HEAT_IMAGE_META)

        LOGGER.debug('Run Heat OSTF platform tests')

        test_class_main = ('fuel_health.tests.platform_tests.'
                           'test_heat.'
                           'HeatSmokeTests')
        tests_names = ['test_actions',
                       'test_autoscaling',
                       'test_rollback']

        test_classes = []

        for test_name in tests_names:
            test_classes.append('{0}.{1}'.format(test_class_main,
                                                 test_name))

        for test_name in test_classes:
            self.fuel_web.run_single_ostf_test(
                cluster_id=cluster_id, test_sets=['platform_tests'],
                test_name=test_name, timeout=60 * 60)

        self.env.make_snapshot("deploy_heat_simple_nova")
开发者ID:astoica1986,项目名称:fuel-main,代码行数:89,代码来源:test_services.py

示例8: deploy_savanna_simple

# 需要导入模块: from fuelweb_test.helpers.common import Common [as 别名]
# 或者: from fuelweb_test.helpers.common.Common import image_import [as 别名]
    def deploy_savanna_simple(self):
        """Deploy cluster in simple mode with Savanna

        Scenario:
            1. Create cluster. Set install Savanna option
            2. Add 1 node with controller role
            3. Add 1 node with compute role
            4. Deploy the cluster
            5. Verify savanna services
            6. Run OSTF
            7. Register savanna image
            8. Run OSTF platform tests

        Snapshot: deploy_savanna_simple

        """
        LOGGER.debug('Check MD5 of image')
        check_image = checkers.check_image(
            settings.SERVTEST_SAVANNA_SERVER_URL,
            settings.SERVTEST_SAVANNA_IMAGE,
            settings.SERVTEST_SAVANNA_IMAGE_MD5,
            settings.SERVTEST_LOCAL_PATH)
        assert_true(check_image)

        self.env.revert_snapshot("ready_with_3_slaves")
        LOGGER.debug('Create cluster for savanna tests')
        cluster_id = self.fuel_web.create_cluster(
            name=self.__class__.__name__,
            settings={
                'savanna': True,
                "net_provider": 'neutron',
                "net_segment_type": 'gre'
            }
        )
        self.fuel_web.update_nodes(
            cluster_id,
            {
                'slave-01': ['controller'],
                'slave-02': ['compute']
            }
        )
        self.fuel_web.deploy_cluster_wait(cluster_id)
        self.fuel_web.assert_cluster_ready(
            'slave-01', smiles_count=6, networks_count=1, timeout=300)
        checkers.verify_service(
            self.env.get_ssh_to_remote_by_name("slave-01"),
            service_name='savanna-api')

        controller_ip = self.fuel_web.get_nailgun_node_by_name(
            'slave-01')['ip']
        common_func = Common(controller_ip,
                             settings.SERVTEST_USERNAME,
                             settings.SERVTEST_PASSWORD,
                             settings.SERVTEST_TENANT)

        test_classes = ['fuel_health.tests.sanity.test_sanity_savanna.'
                        'SanitySavannaTests.test_sanity_savanna']
        self.fuel_web.run_ostf(
            cluster_id=self.fuel_web.get_last_created_cluster(),
            tests_must_be_passed=test_classes
        )

        LOGGER.debug('Import image')
        common_func.image_import(
            settings.SERVTEST_SAVANNA_IMAGE_META,
            settings.SERVTEST_LOCAL_PATH,
            settings.SERVTEST_SAVANNA_IMAGE,
            settings.SERVTEST_SAVANNA_IMAGE_NAME)

        common_func.goodbye_security()

        LOGGER.debug('Run OSTF platform tests')
        test_classes = ['fuel_health.tests.platform_tests'
                        '.test_platform_savanna.'
                        'PlatformSavannaTests.test_platform_savanna']
        self.fuel_web.run_ostf(
            cluster_id=self.fuel_web.get_last_created_cluster(),
            tests_must_be_passed=test_classes, test_sets=['platform_tests'])
        self.env.make_snapshot("deploy_savanna_simple")
开发者ID:sirmax123,项目名称:fuel-main,代码行数:81,代码来源:test_services.py


注:本文中的fuelweb_test.helpers.common.Common.image_import方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。