@classmethod
def setup_clients(cls):
    super(BaseV2ComputeTest, cls).setup_clients()
    cls.servers_client = cls.os_primary.servers_client
    cls.server_groups_client = cls.os_primary.server_groups_client
    cls.flavors_client = cls.os_primary.flavors_client
    cls.compute_images_client = cls.os_primary.compute_images_client
    cls.extensions_client = cls.os_primary.extensions_client
    cls.floating_ip_pools_client = cls.os_primary.floating_ip_pools_client
    cls.floating_ips_client = cls.os_primary.compute_floating_ips_client
    cls.keypairs_client = cls.os_primary.keypairs_client
    cls.security_group_rules_client = cls.os_primary.compute_security_group_rules_client
    cls.security_groups_client = cls.os_primary.compute_security_groups_client
    cls.quotas_client = cls.os_primary.quotas_client
    cls.compute_networks_client = cls.os_primary.compute_networks_client
    cls.limits_client = cls.os_primary.limits_client
    cls.volumes_extensions_client = cls.os_primary.volumes_extensions_client
    cls.snapshots_extensions_client = cls.os_primary.snapshots_extensions_client
    cls.interfaces_client = cls.os_primary.interfaces_client
    cls.fixed_ips_client = cls.os_primary.fixed_ips_client
    cls.availability_zone_client = cls.os_primary.availability_zone_client
    cls.agents_client = cls.os_primary.agents_client
    cls.aggregates_client = cls.os_primary.aggregates_client
    cls.services_client = cls.os_primary.services_client
    cls.instance_usages_audit_log_client = cls.os_primary.instance_usages_audit_log_client
    cls.hypervisor_client = cls.os_primary.hypervisor_client
    cls.certificates_client = cls.os_primary.certificates_client
    cls.migrations_client = cls.os_primary.migrations_client
    cls.security_group_default_rules_client = cls.os_primary.security_group_default_rules_client
    cls.versions_client = cls.os_primary.compute_versions_client
    if CONF.service_available.cinder:
        cls.volumes_client = cls.os_primary.volumes_client_latest
        cls.attachments_client = cls.os_primary.attachments_client_latest
        cls.snapshots_client = cls.os_primary.snapshots_client_latest
    if CONF.service_available.glance:
        if CONF.image_feature_enabled.api_v1:
            cls.images_client = cls.os_primary.image_client
        elif CONF.image_feature_enabled.api_v2:
            cls.images_client = cls.os_primary.image_client_v2
        else:
            raise lib_exc.InvalidConfiguration('Either api_v1 or api_v2 must be True in [image-feature-enabled].')
    cls._check_depends_on_nova_network()
@classmethod
def setup_clients(cls):
    super(BaseV2ComputeTest, cls).setup_clients()
    cls.servers_client = cls.os_primary.servers_client
    cls.server_groups_client = cls.os_primary.server_groups_client
    cls.flavors_client = cls.os_primary.flavors_client
    cls.compute_images_client = cls.os_primary.compute_images_client
    cls.extensions_client = cls.os_primary.extensions_client
    cls.floating_ip_pools_client = cls.os_primary.floating_ip_pools_client
    cls.floating_ips_client = cls.os_primary.compute_floating_ips_client
    cls.keypairs_client = cls.os_primary.keypairs_client
    cls.security_group_rules_client = cls.os_primary.compute_security_group_rules_client
    cls.security_groups_client = cls.os_primary.compute_security_groups_client
    cls.quotas_client = cls.os_primary.quotas_client
    cls.compute_networks_client = cls.os_primary.compute_networks_client
    cls.limits_client = cls.os_primary.limits_client
    cls.volumes_extensions_client = cls.os_primary.volumes_extensions_client
    cls.snapshots_extensions_client = cls.os_primary.snapshots_extensions_client
    cls.interfaces_client = cls.os_primary.interfaces_client
    cls.fixed_ips_client = cls.os_primary.fixed_ips_client
    cls.availability_zone_client = cls.os_primary.availability_zone_client
    cls.agents_client = cls.os_primary.agents_client
    cls.aggregates_client = cls.os_primary.aggregates_client
    cls.services_client = cls.os_primary.services_client
    cls.instance_usages_audit_log_client = cls.os_primary.instance_usages_audit_log_client
    cls.hypervisor_client = cls.os_primary.hypervisor_client
    cls.certificates_client = cls.os_primary.certificates_client
    cls.migrations_client = cls.os_primary.migrations_client
    cls.security_group_default_rules_client = cls.os_primary.security_group_default_rules_client
    cls.versions_client = cls.os_primary.compute_versions_client
    if CONF.service_available.cinder:
        cls.volumes_client = cls.os_primary.volumes_client_latest
        cls.attachments_client = cls.os_primary.attachments_client_latest
        cls.snapshots_client = cls.os_primary.snapshots_client_latest
    if CONF.service_available.glance:
        if CONF.image_feature_enabled.api_v1:
            cls.images_client = cls.os_primary.image_client
        elif CONF.image_feature_enabled.api_v2:
            cls.images_client = cls.os_primary.image_client_v2
        else:
            raise lib_exc.InvalidConfiguration('Either api_v1 or api_v2 must be True in [image-feature-enabled].')
    cls._check_depends_on_nova_network()