--- tiers: - name: healthcheck description: >- First tier to be executed to verify the basic operations in the VIM. testcases: - case_name: connection_check project_name: functest criteria: 100 blocking: true description: >- This test case verifies the retrieval of OpenStack clients: Keystone, Glance, Neutron and Nova and may perform some simple queries. run: name: connection_check - case_name: tenantnetwork1 project_name: functest criteria: 100 blocking: true description: >- It creates and configures all tenant network ressources required by advanced testcases (subnet, network and router). dependencies: - NO_TENANT_NETWORK: '^(?![tT]rue$)' run: name: tenantnetwork1 - case_name: tenantnetwork2 project_name: functest criteria: 100 blocking: true description: >- It creates new user/project before creating and configuring all tenant network ressources required by a testcase (subnet, network and router). dependencies: - NO_TENANT_NETWORK: '^(?![tT]rue$)' run: name: tenantnetwork2 - case_name: vmready1 project_name: functest criteria: 100 blocking: true description: >- It inherits from TenantNetwork1 which creates all network resources and prepares a future VM attached to that network. run: name: vmready1 - case_name: vmready2 project_name: functest criteria: 100 blocking: true description: >- It creates new user/project before creating and configuring all tenant network ressources, flavors, images, etc. required by advanced testcases. run: name: vmready2 - case_name: singlevm1 project_name: functest criteria: 100 blocking: true description: >- It inherits from TenantNetwork1 which creates all network resources and completes it by booting a VM attached to that network. run: name: singlevm1 - case_name: singlevm2 project_name: functest criteria: 100 blocking: true description: >- It creates new user/project before creating and configuring all tenant network ressources and vms required by advanced testcases. run: name: singlevm2 - case_name: vping_ssh project_name: functest criteria: 100 blocking: true description: >- This test case verifies: 1) SSH to an instance using floating IPs over the public network. 2) Connectivity between 2 instances over a private network. run: name: vping_ssh - case_name: vping_userdata project_name: functest criteria: 100 blocking: true description: >- This test case verifies: 1) Boot a VM with given userdata. 2) Connectivity between 2 instances over a private network. run: name: vping_userdata - case_name: cinder_test project_name: functest criteria: 100 blocking: true description: >- This test case verifies: 1) Attach volume and to 1 instance; 2) Write data on volume 3) Detach volume from instance 1, attach it on instance 2 3) Read volume data run: name: cinder_test - case_name: odl project_name: functest criteria: 100 blocking: true description: >- Test Suite for the OpenDaylight SDN Controller. It integrates some test suites from upstream using Robot as the test framework. dependencies: - DEPLOY_SCENARIO: 'odl' run: name: odl args: suites: - /src/odl_test/csit/suites/integration/basic - /src/odl_test/csit/suites/openstack/neutron - case_name: tempest_smoke project_name: functest criteria: 100 blocking: false description: >- This test case runs the smoke subset of the OpenStack Tempest suite. The list of test cases is generated by Tempest automatically and depends on the parameters of the OpenStack deplopyment. https://github.com/openstack/tempest/blob/18.0.0/tox.ini#L114 run: name: tempest_common args: mode: '(?=.*\[.*\bsmoke\b.*\])(^tempest\.api)' option: - '--concurrency=4' - case_name: tempest_horizon project_name: functest criteria: 100 blocking: false description: >-
#!/usr/bin/env python

# matthew.lijun@huawei.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
import logging
import pkg_resources

from functest.opnfv_tests.openstack.tempest import conf_utils
from functest.utils import openstack_utils
from functest.utils.constants import CONST

""" logging configuration """
logger = logging.getLogger(__name__)


class TempestConf(object):
    def __init__(self):
        self.VERIFIER_ID = conf_utils.get_verifier_id()
        self.VERIFIER_REPO_DIR = conf_utils.get_verifier_repo_dir(
            self.VERIFIER_ID)
        self.DEPLOYMENT_ID = conf_utils.get_verifier_deployment_id()
        self.DEPLOYMENT_DIR = conf_utils.get_verifier_deployment_dir(
            self.VERIFIER_ID, self.DEPLOYMENT_ID)
        self.confpath = pkg_resources.resource_filename(
            'functest',
            'opnfv_tests/openstack/refstack_client/refstack_tempest.conf')

    def generate_tempestconf(self):
        try:
            openstack_utils.source_credentials(
                CONST.__getattribute__('openstack_creds'))
            img_flavor_dict = conf_utils.create_tempest_resources(
                use_custom_images=True, use_custom_flavors=True)
            conf_utils.configure_tempest_defcore(
                self.DEPLOYMENT_DIR, img_flavor_dict)
        except Exception as e:
            logger.error("error with generating refstack client "
                         "reference tempest conf file: %s", e)

    def main(self):
        try:
            self.generate_tempestconf()
            logger.info("a reference tempest conf file generated "
                        "at %s", self.confpath)
        except Exception as e:
            logger.error('Error with run: %s', e)


if __name__ == '__main__':
    logging.basicConfig()
    tempestconf = TempestConf()
    tempestconf.main()
est.test_extra_routes_atomic)\ (?!.*test_routers.RoutersTest.test_extra_routes_atomic)\ (?!.*test_routers_negative.DvrRoutersNegativeTest)\ (?!.*test_routers_negative.DvrRoutersNegativeTestExtended)\ (?!.*test_routers_negative.HaRoutersNegativeTest)\ (?!.*test_security_groups.RbacSharedSecurityGroupTest)\ (?!.*test_subnetpool_prefix_ops)\ (?!.*test_subnetpools.RbacSubnetPoolTest)\ (?!.*test_subnetpools.SubnetPoolsSearchCriteriaTest.test_list_validation_filters)\ (?!.*test_subnetpools_negative.SubnetPoolsNegativeTestJSON.test_tenant_create_subnetpool_associate_shared_address_scope)\ (?!.*test_subnets.SubnetsSearchCriteriaTest.test_list_validation_filters)\ (?!.*test_timestamp.TestTimeStamp.test_segment_with_timestamp)\ (?!.*test_trunk.TrunkTestInheritJSONBase.test_add_subport)\ (?!.*test_trunk.TrunkTestMtusJSON)\ (?!.*test_trunk_negative.TrunkTestJSON.test_create_subport_invalid_inherit_network_segmentation_type)\ (?!.*test_trunk_negative.TrunkTestMtusJSON)\ (^neutron_tempest_plugin.api)" option: - '--concurrency=4' - case_name: tempest_cinder_cntt project_name: functest criteria: 100 blocking: false deny_skipping: true tests_count: 9 description: >- This test case runs the Tempest suite proposed by the Cinder project. run: name: tempest_common args: mode: "(?!.*test_incremental_backup)\ (?!.*test_consistencygroups)\ (?!.*test_backup_crossproject_admin_negative)\ (?!.*test_backup_crossproject_user_negative)\ (^cinder_tempest_plugin.)" option: - '--concurrency=4' - case_name: tempest_keystone_cntt project_name: functest criteria: 100 blocking: false deny_skipping: true tests_count: 27 description: >- This test case runs the Tempest suite proposed by the Keystone project. run: name: tempest_common args: mode: "(?!.*api.identity.v3.test_oauth1_tokens)\ (?!.*scenario.test_federated_authentication)\ keystone_tempest_plugin." option: - '--concurrency=4' - case_name: tempest_heat_cntt project_name: functest criteria: 100 blocking: false deny_skipping: true tests_count: 125 description: >- This test case runs the Tempest suite proposed by the Heat project. run: name: tempest_heat args: mode: "(?!.*functional.test_lbaasv2)\ (?!.*functional.test_encryption_vol_type)\ (?!.*RemoteStackTest.test_stack_create_with_cloud_credential)\ (?!.*scenario.test_aodh_alarm)\ (?!.*tests.scenario.test_autoscaling_lb)\ (?!.*scenario.test_autoscaling_lbv2)\ (?!.*scenario.test_server_software_config)\ (?!.*test_volumes.VolumeBackupRestoreIntegrationTest)\ (?!.*scenario.test_octavia_lbaas)\ (?!.*scenario.test_server_cfn_init)\ ^heat_tempest_plugin.tests" option: - '--concurrency=1' - case_name: rally_sanity_cntt project_name: functest criteria: 100 blocking: false description: >- This test case runs a sub group of tests of the OpenStack Rally suite in smoke mode. run: name: rally_sanity args: tests: - 'authenticate' - 'glance' - 'cinder' - 'heat' - 'keystone' - 'neutron' - 'nova' - 'quotas' - 'swift' - case_name: tempest_full_cntt project_name: functest criteria: 100 blocking: false deny_skipping: true tests_count: 1260 description: >- The list of test cases is generated by Tempest automatically and depends on the parameters of the OpenStack deployment. https://github.com/openstack/tempest/blob/18.0.0/tox.ini#L83 run: name: tempest_common args: mode: "(?!.*admin.test_agents)(?!.*test_fixed_ips)\ (?!.*test_fixed_ips_negative)\ (?!.*test_auto_allocate_network)(?!.*test_floating_ips_bulk)\ (?!.*test_flavors_microversions.FlavorsV255TestJSON)\ (?!.*test_flavors_microversions.FlavorsV261TestJSON)\ (?!.*test_live_migration.LiveAutoBlockMigrationV225Test.test_iscsi_volume)\ (?!.*test_live_migration.LiveAutoBlockMigrationV225Test.test_live_block_migration)\ (?!.*test_live_migration.LiveAutoBlockMigrationV225Test.test_live_block_migration_paused)\ (?!.*test_live_migration.LiveAutoBlockMigrationV225Test.test_volume_backed_live_migration)\ (?!.*test_live_migration.LiveMigrationTest.test_iscsi_volume)\ (?!.*test_live_migration.LiveMigrationTest.test_live_block_migration)\ (?!.*test_live_migration.LiveMigrationTest.test_live_block_migration_paused)\ (?!.*test_live_migration.LiveMigrationTest.test_volume_backed_live_migration)\ (?!.*test_live_migration.LiveMigrationRemoteConsolesV26Test)\ (?!.*test_quotas.QuotasAdminTestV257)\ (?!.*test_servers.ServersAdminTestJSON.test_reset_network_inject_network_info)\ (?!.*certificates.test_certificates)\ (?!.*test_quotas_negative.QuotasSecurityGroupAdminNegativeTest)\ (?!.*test_novnc)(?!.*test_server_personality)\ (?!.*test_servers.ServerShowV263Test.test_show_update_rebuild_list_server)\ (?!.*test_servers_microversions.ServerShowV254Test)\ (?!.*test_servers_microversions.ServerShowV257Test)\ (?!.*test_servers_negative.ServersNegativeTestJSON.test_personality_file_contents_not_encoded)\ (?!.*servers.test_virtual_interfaces)\ (?!.*test_server_actions.ServerActionsTestJSON.test_change_server_password)\ (?!.*test_server_actions.ServerActionsTestJSON.test_get_vnc_console)\ (?!.*test_server_actions.ServerActionsTestJSON.test_reboot_server_soft)\ (?!.*test_server_rescue.ServerBootFromVolumeStableRescueTest)\ (?!.*test_server_rescue.ServerStableDeviceRescueTest)\ (?!.*test_security_group_default_rules)\ (?!.*test_security_groups_negative.SecurityGroupsNegativeTestJSON.test_security_group_create_with_duplicate_name)\ (?!.*test_security_groups_negative.SecurityGroupsNegativeTestJSON.test_security_group_create_with_invalid_group_description)\ (?!.*test_security_groups_negative.SecurityGroupsNegativeTestJSON.test_security_group_create_with_invalid_group_name)\ (?!.*test_security_groups_negative.SecurityGroupsNegativeTestJSON.test_update_security_group_with_invalid_sg_des)\ (?!.*test_security_groups_negative.SecurityGroupsNegativeTestJSON.test_update_security_group_with_invalid_sg_id)\ (?!.*test_security_groups_negative.SecurityGroupsNegativeTestJSON.test_update_security_group_with_invalid_sg_name)\ (?!.*test_server_metadata.ServerMetadataTestJSON)\ (?!.*test_server_metadata_negative.ServerMetadataNegativeTestJSON.test_delete_metadata_non_existent_server)\ (?!.*test_server_metadata_negative.ServerMetadataNegativeTestJSON.test_metadata_items_limit)\ (?!.*test_server_metadata_negative.ServerMetadataNegativeTestJSON.test_set_metadata_invalid_key)\ (?!.*test_server_metadata_negative.ServerMetadataNegativeTestJSON.test_set_metadata_non_existent_server)\ (?!.*test_server_metadata_negative.ServerMetadataNegativeTestJSON.test_set_server_metadata_blank_key)\ (?!.*test_server_metadata_negative.ServerMetadataNegativeTestJSON.test_set_server_metadata_missing_metadata)\ (?!.*test_server_metadata_negative.ServerMetadataNegativeTestJSON.test_update_metadata_non_existent_server)\ (?!.*test_server_metadata_negative.ServerMetadataNegativeTestJSON.test_update_metadata_with_blank_key)\ (?!.*test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filtered_by_ip_regex)\ (?!.*compute.test_virtual_interfaces)(?!.*compute.test_virtual_interfaces_negative)\ (?!.*compute.test_networks)\ (?!.*test_attach_volume.AttachVolumeMultiAttach)\ (?!.*identity.admin.v2)(?!.*identity.v2)\ (?!.*identity.v3.test_access_rules)\ (?!.*identity.v3.test_application_credentials.ApplicationCredentialsV3Test.test_create_application_credential_access_rules)\ (?!.*image.v1)\ (?!.*image.v2.admin.test_images.ImportCopyImagesTest)\ (?!.*image.v2.test_images.ImportImagesTest)\ (?!.*image.v2.test_images.MultiStoresImportImages)\ (?!.*admin.test_dhcp_agent_scheduler)\ (?!.*admin.test_routers_dvr)\ (?!.*test_metering_extensions)(?!.*network.test_tags)\ (?!.*test_routers_negative.DvrRoutersNegativeTest)\ (?!.*test_routers.RoutersIpV6Test.test_create_router_set_gateway_with_fixed_ip)\ (?!.*test_routers.RoutersTest.test_create_router_set_gateway_with_fixed_ip)\ (?!.*test_encrypted_volumes_extend)\ (?!.*test_group_snapshots.GroupSnapshotsV319Test.test_reset_group_snapshot_status)\ (?!.*test_multi_backend)\ (?!.*test_volume_retype.VolumeRetypeWithMigrationTest)\ (?!.*test_volume_delete_cascade.VolumesDeleteCascade.test_volume_from_snapshot_cascade_delete)\ (?!.*test_volumes_backup.VolumesBackupsTest.test_volume_backup_create_get_detailed_list_restore_delete)\ (?!.*test_volumes_negative.UpdateMultiattachVolumeNegativeTest.test_multiattach_rw_volume_update_failure)\ (?!.*test_volumes_extend.VolumesExtendAttachedTest.test_extend_attached_volume)\ (?!.*\\[.*\\bslow\\b.*\\])(^tempest.api)" option: - '--concurrency=4' - case_name: tempest_scenario_cntt project_name: functest criteria: 100 blocking: false deny_skipping: true tests_count: 9 description: >- The list of test cases is generated by Tempest automatically and depends on the parameters of the OpenStack deployment. https://github.com/openstack/tempest/blob/18.0.0/tox.ini#L84 run: name: tempest_scenario args: mode: "\ (?!.*test_minbw_allocation_placement)\ (?!.*test_volume_boot_pattern.TestVolumeBootPattern.test_boot_server_from_encrypted_volume_luks)\ (?!.*\\[.*\\bslow\\b.*\\])(^tempest.scenario)" option: - '--concurrency=1' - case_name: tempest_slow_cntt project_name: functest criteria: 100 blocking: false deny_skipping: true tests_count: 43 description: >- The list of test cases is generated by Tempest automatically and depends on the parameters of the OpenStack deployment. https://github.com/openstack/tempest/blob/18.0.0/tox.ini#L84 run: name: tempest_common args: mode: "(?!.*test_volume_swap)\ (?!.*test_server_personality)\ (?!.*test_server_rescue.ServerBootFromVolumeStableRescueTest)\ (?!.*test_container_sync.ContainerSyncTest.test_container_synchronization)\ (?!.*test_container_sync_middleware.ContainerSyncMiddlewareTest.test_container_synchronization)\ (?!.*test_encrypted_cinder_volumes)\ (?!.*test_minbw_allocation_placement)\ (?!.*test_network_basic_ops.TestNetworkBasicOps.test_router_rescheduling)\ (?!.*test_shelve_instance.TestShelveInstance.test_cold_migrate_unshelved_instance)\ (?!.*test_volume_migrate_attached)\ (?!.*test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_cold_migration_revert)\ (?=.*\\[.*\\bslow\\b.*\\])(^tempest.)" option: - '--concurrency=1' - name: benchmarking description: >- Run several OpenStack performance tools https://docs.openstack.org/performance-docs/latest/methodologies/tools.html testcases: - case_name: rally_full project_name: functest criteria: 100 blocking: false description: >- This test case runs the full suite of scenarios of the OpenStack Rally suite using several threads and iterations. run: name: rally_full args: optional: - 'gnocchi' - 'barbican' - case_name: rally_jobs project_name: functest criteria: 100 blocking: false description: >- This test case runs a group of Rally jobs used in OpenStack gating dependencies: - NO_TENANT_NETWORK: '^(?![tT]rue$)' run: name: rally_jobs args: optional: - 'gnocchi' - case_name: vmtp project_name: functest criteria: 100 blocking: false description: >- VMTP is a small python application that will automatically perform ping connectivity, round trip time measurement (latency) and TCP/UDP throughput dependencies: - NO_TENANT_NETWORK: '^(?![tT]rue$)' run: name: vmtp - case_name: shaker project_name: functest criteria: 100 blocking: false description: >- Shaker wraps around popular system network testing tools like iperf, iperf3 and netperf (with help of flent). Shaker is able to deploy OpenStack instances and networks in different topologies. dependencies: - NO_TENANT_NETWORK: '^(?![tT]rue$)' run: name: shaker - name: benchmarking_cntt description: >- Run several OpenStack performance tools https://docs.openstack.org/performance-docs/latest/methodologies/tools.html testcases: - case_name: rally_full_cntt project_name: functest criteria: 100 blocking: false description: >- This test case runs the full suite of scenarios of the OpenStack Rally suite using several threads and iterations. run: name: rally_full args: tests: - 'authenticate' - 'glance' - 'cinder' - 'heat' - 'keystone' - 'neutron' - 'nova' - 'quotas' - 'swift' - case_name: rally_jobs_cntt project_name: functest criteria: 100 blocking: false description: >- This test case runs a group of Rally jobs used in OpenStack gating run: name: rally_jobs args: tests: - 'neutron' - name: vnf description: >- Collection of VNF test cases. testcases: - case_name: cloudify project_name: functest criteria: 100 blocking: false description: >- This test case deploys the Cloudify orchestrator. run: name: cloudify - case_name: cloudify_ims project_name: functest criteria: 100 blocking: false description: >- This test case deploys an OpenSource vIMS solution from Clearwater using the Cloudify orchestrator. It also runs some signaling traffic. dependencies: - NO_TENANT_NETWORK: '^(?![tT]rue$)' run: name: cloudify_ims - case_name: heat_ims project_name: functest criteria: 100 blocking: false description: >- This test case deploys an OpenSource vIMS solution from Clearwater using the OpenStack Heat orchestrator. It also runs some signaling traffic. dependencies: - NO_TENANT_NETWORK: '^(?![tT]rue$)' run: name: heat_ims - case_name: vyos_vrouter project_name: functest criteria: 100 blocking: false description: >- This test case is vRouter testing. dependencies: - NO_TENANT_NETWORK: '^(?![tT]rue$)' run: name: vyos_vrouter - case_name: juju_epc project_name: functest criteria: 100 blocking: false description: >- vEPC validation with Juju as VNF manager and ABoT as test executor. dependencies: - NO_TENANT_NETWORK: '^(?![tT]rue$)' run: name: juju_epc