Merge "Move comptue base test to common dir"
This commit is contained in:
commit
93374f31aa
@ -19,7 +19,7 @@ from tempest.tests import base
|
||||
from tempest.tests.lib import fake_http
|
||||
|
||||
|
||||
class BaseComputeServiceTest(base.TestCase):
|
||||
class BaseServiceTest(base.TestCase):
|
||||
def create_response(self, body, to_utf=False, status=200, headers=None):
|
||||
json_body = {}
|
||||
if body:
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import agents_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestAgentsClient(base.BaseComputeServiceTest):
|
||||
class TestAgentsClient(base.BaseServiceTest):
|
||||
FAKE_CREATE_AGENT = {
|
||||
"agent": {
|
||||
"url": "http://foo.com",
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import aggregates_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestAggregatesClient(base.BaseComputeServiceTest):
|
||||
class TestAggregatesClient(base.BaseServiceTest):
|
||||
FAKE_SHOW_AGGREGATE = {
|
||||
"aggregate":
|
||||
{
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import availability_zone_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestAvailabilityZoneClient(base.BaseComputeServiceTest):
|
||||
class TestAvailabilityZoneClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_AVAILABIRITY_ZONE_INFO = {
|
||||
"availabilityZoneInfo":
|
||||
|
@ -16,10 +16,10 @@ import copy
|
||||
|
||||
from tempest.lib.services.compute import baremetal_nodes_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestBareMetalNodesClient(base.BaseComputeServiceTest):
|
||||
class TestBareMetalNodesClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_NODE_INFO = {'cpus': '8',
|
||||
'disk_gb': '64',
|
||||
|
@ -19,10 +19,10 @@ from tempest.lib import exceptions
|
||||
from tempest.lib.services.compute import base_compute_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib import fake_http
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestMicroversionHeaderCheck(base.BaseComputeServiceTest):
|
||||
class TestMicroversionHeaderCheck(base.BaseServiceTest):
|
||||
|
||||
def setUp(self):
|
||||
super(TestMicroversionHeaderCheck, self).setUp()
|
||||
@ -72,7 +72,7 @@ class DummyServiceClient1(base_compute_client.BaseComputeClient):
|
||||
return self.get_schema(self.schema_versions_info)
|
||||
|
||||
|
||||
class TestSchemaVersionsNone(base.BaseComputeServiceTest):
|
||||
class TestSchemaVersionsNone(base.BaseServiceTest):
|
||||
api_microversion = None
|
||||
expected_schema = 'schemav21'
|
||||
|
||||
@ -130,7 +130,7 @@ class DummyServiceClient2(base_compute_client.BaseComputeClient):
|
||||
return self.get_schema(self.schema_versions_info)
|
||||
|
||||
|
||||
class TestSchemaVersionsNotFound(base.BaseComputeServiceTest):
|
||||
class TestSchemaVersionsNotFound(base.BaseServiceTest):
|
||||
api_microversion = '2.10'
|
||||
expected_schema = 'schemav210'
|
||||
|
||||
@ -149,7 +149,7 @@ class TestSchemaVersionsNotFound(base.BaseComputeServiceTest):
|
||||
self.client.return_selected_schema)
|
||||
|
||||
|
||||
class TestClientWithoutMicroversionHeader(base.BaseComputeServiceTest):
|
||||
class TestClientWithoutMicroversionHeader(base.BaseServiceTest):
|
||||
|
||||
def setUp(self):
|
||||
super(TestClientWithoutMicroversionHeader, self).setUp()
|
||||
@ -172,7 +172,7 @@ class TestClientWithoutMicroversionHeader(base.BaseComputeServiceTest):
|
||||
self.client.get('fake_url')
|
||||
|
||||
|
||||
class TestClientWithMicroversionHeader(base.BaseComputeServiceTest):
|
||||
class TestClientWithMicroversionHeader(base.BaseServiceTest):
|
||||
|
||||
def setUp(self):
|
||||
super(TestClientWithMicroversionHeader, self).setUp()
|
||||
|
@ -16,10 +16,10 @@ import copy
|
||||
|
||||
from tempest.lib.services.compute import certificates_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestCertificatesClient(base.BaseComputeServiceTest):
|
||||
class TestCertificatesClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_CERTIFICATE = {
|
||||
"certificate": {
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import extensions_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestExtensionsClient(base.BaseComputeServiceTest):
|
||||
class TestExtensionsClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_SHOW_EXTENSION = {
|
||||
"extension": {
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import fixed_ips_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestFixedIPsClient(base.BaseComputeServiceTest):
|
||||
class TestFixedIPsClient(base.BaseServiceTest):
|
||||
FIXED_IP_INFO = {"fixed_ip": {"address": "10.0.0.1",
|
||||
"cidr": "10.11.12.0/24",
|
||||
"host": "localhost",
|
||||
|
@ -20,10 +20,10 @@ from oslotest import mockpatch
|
||||
from tempest.lib.services.compute import flavors_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib import fake_http
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestFlavorsClient(base.BaseComputeServiceTest):
|
||||
class TestFlavorsClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_FLAVOR = {
|
||||
"disk": 1,
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import floating_ip_pools_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestFloatingIPPoolsClient(base.BaseComputeServiceTest):
|
||||
class TestFloatingIPPoolsClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_FLOATING_IP_POOLS = {
|
||||
"floating_ip_pools":
|
||||
|
@ -15,10 +15,10 @@
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
|
||||
from tempest.lib.services.compute import floating_ips_bulk_client
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestFloatingIPsBulkClient(base.BaseComputeServiceTest):
|
||||
class TestFloatingIPsBulkClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_FIP_BULK_LIST = {"floating_ip_info": [{
|
||||
"address": "10.10.10.1",
|
||||
|
@ -17,10 +17,10 @@ from oslotest import mockpatch
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from tempest.lib.services.compute import floating_ips_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestFloatingIpsClient(base.BaseComputeServiceTest):
|
||||
class TestFloatingIpsClient(base.BaseServiceTest):
|
||||
|
||||
floating_ip = {"fixed_ip": None,
|
||||
"id": "46d61064-13ba-4bf0-9557-69de824c3d6f",
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import hosts_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestHostsClient(base.BaseComputeServiceTest):
|
||||
class TestHostsClient(base.BaseServiceTest):
|
||||
FAKE_HOST_DATA = {
|
||||
"host": {
|
||||
"resource": {
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import hypervisor_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestHypervisorClient(base.BaseComputeServiceTest):
|
||||
class TestHypervisorClient(base.BaseServiceTest):
|
||||
|
||||
hypervisor_id = "1"
|
||||
hypervisor_name = "hyper.hostname.com"
|
||||
|
@ -19,10 +19,10 @@ from oslotest import mockpatch
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from tempest.lib.services.compute import images_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestImagesClient(base.BaseComputeServiceTest):
|
||||
class TestImagesClient(base.BaseServiceTest):
|
||||
# Data Dictionaries used for testing #
|
||||
FAKE_IMAGE_METADATA = {
|
||||
"list":
|
||||
|
@ -16,10 +16,10 @@ import datetime
|
||||
|
||||
from tempest.lib.services.compute import instance_usage_audit_log_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestInstanceUsagesAuditLogClient(base.BaseComputeServiceTest):
|
||||
class TestInstanceUsagesAuditLogClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_AUDIT_LOG = {
|
||||
"hosts_not_run": [
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import interfaces_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestInterfacesClient(base.BaseComputeServiceTest):
|
||||
class TestInterfacesClient(base.BaseServiceTest):
|
||||
# Data Values to be used for testing #
|
||||
FAKE_INTERFACE_DATA = {
|
||||
"fixed_ips": [{
|
||||
|
@ -16,10 +16,10 @@ import copy
|
||||
|
||||
from tempest.lib.services.compute import keypairs_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestKeyPairsClient(base.BaseComputeServiceTest):
|
||||
class TestKeyPairsClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_KEYPAIR = {"keypair": {
|
||||
"public_key": "ssh-rsa foo Generated-by-Nova",
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import limits_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestLimitsClient(base.BaseComputeServiceTest):
|
||||
class TestLimitsClient(base.BaseServiceTest):
|
||||
|
||||
def setUp(self):
|
||||
super(TestLimitsClient, self).setUp()
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import migrations_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestMigrationsClient(base.BaseComputeServiceTest):
|
||||
class TestMigrationsClient(base.BaseServiceTest):
|
||||
FAKE_MIGRATION_INFO = {"migrations": [{
|
||||
"created_at": "2012-10-29T13:42:02",
|
||||
"dest_compute": "compute2",
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import networks_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestNetworksClient(base.BaseComputeServiceTest):
|
||||
class TestNetworksClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_NETWORK = {
|
||||
"bridge": None,
|
||||
|
@ -16,10 +16,10 @@ import copy
|
||||
|
||||
from tempest.lib.services.compute import quota_classes_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestQuotaClassesClient(base.BaseComputeServiceTest):
|
||||
class TestQuotaClassesClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_QUOTA_CLASS_SET = {
|
||||
"injected_file_content_bytes": 10240,
|
||||
|
@ -16,10 +16,10 @@ import copy
|
||||
|
||||
from tempest.lib.services.compute import quotas_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestQuotasClient(base.BaseComputeServiceTest):
|
||||
class TestQuotasClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_QUOTA_SET = {
|
||||
"quota_set": {
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import security_group_default_rules_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestSecurityGroupDefaultRulesClient(base.BaseComputeServiceTest):
|
||||
class TestSecurityGroupDefaultRulesClient(base.BaseServiceTest):
|
||||
FAKE_RULE = {
|
||||
"from_port": 80,
|
||||
"id": 1,
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import security_group_rules_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestSecurityGroupRulesClient(base.BaseComputeServiceTest):
|
||||
class TestSecurityGroupRulesClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_SECURITY_GROUP_RULE = {
|
||||
"security_group_rule": {
|
||||
|
@ -17,10 +17,10 @@ from oslotest import mockpatch
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from tempest.lib.services.compute import security_groups_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestSecurityGroupsClient(base.BaseComputeServiceTest):
|
||||
class TestSecurityGroupsClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_SECURITY_GROUP_INFO = [{
|
||||
"description": "default",
|
||||
|
@ -17,10 +17,10 @@ from tempest.tests.lib import fake_auth_provider
|
||||
|
||||
from tempest.lib.services.compute import server_groups_client
|
||||
from tempest.tests.lib import fake_http
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestServerGroupsClient(base.BaseComputeServiceTest):
|
||||
class TestServerGroupsClient(base.BaseServiceTest):
|
||||
|
||||
server_group = {
|
||||
"id": "5bbcc3c4-1da2-4437-a48a-66f15b1b13f9",
|
||||
|
@ -16,10 +16,10 @@ import copy
|
||||
|
||||
from tempest.lib.services.compute import servers_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestServersClient(base.BaseComputeServiceTest):
|
||||
class TestServersClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_SERVERS = {'servers': [{
|
||||
"id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
|
||||
|
@ -16,10 +16,10 @@ import copy
|
||||
|
||||
from tempest.lib.services.compute import services_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestServicesClient(base.BaseComputeServiceTest):
|
||||
class TestServicesClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_SERVICES = {
|
||||
"services":
|
||||
|
@ -17,10 +17,10 @@ from oslotest import mockpatch
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from tempest.lib.services.compute import snapshots_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestSnapshotsClient(base.BaseComputeServiceTest):
|
||||
class TestSnapshotsClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_SNAPSHOT = {
|
||||
"createdAt": "2015-10-02T16:27:54.724209",
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import tenant_networks_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestTenantNetworksClient(base.BaseComputeServiceTest):
|
||||
class TestTenantNetworksClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_NETWORK = {
|
||||
"cidr": "None",
|
||||
|
@ -14,10 +14,10 @@
|
||||
|
||||
from tempest.lib.services.compute import tenant_usages_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestTenantUsagesClient(base.BaseComputeServiceTest):
|
||||
class TestTenantUsagesClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_SERVER_USAGES = [{
|
||||
"ended_at": None,
|
||||
|
@ -17,10 +17,10 @@ from oslotest import mockpatch
|
||||
|
||||
from tempest.lib.services.compute import versions_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestVersionsClient(base.BaseComputeServiceTest):
|
||||
class TestVersionsClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_INIT_VERSION = {
|
||||
"version": {
|
||||
|
@ -19,10 +19,10 @@ from oslotest import mockpatch
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from tempest.lib.services.compute import volumes_client
|
||||
from tempest.tests.lib import fake_auth_provider
|
||||
from tempest.tests.lib.services.compute import base
|
||||
from tempest.tests.lib.services import base
|
||||
|
||||
|
||||
class TestVolumesClient(base.BaseComputeServiceTest):
|
||||
class TestVolumesClient(base.BaseServiceTest):
|
||||
|
||||
FAKE_VOLUME = {
|
||||
"id": "521752a6-acf6-4b2d-bc7a-119f9148cd8c",
|
||||
|
Loading…
Reference in New Issue
Block a user