Stop sending tenant_id to Neutron
For a long time we are supporting both tenant_id and project_id for most of the networking resources. tenant_id is deprecated since long time already and we should stop sending it ourselves to Neutron, while leaving it as attribute where it was present. Change-Id: I19c4b76258eb22897b3ae5d9573b01ea4ce8022b
This commit is contained in:
parent
6db391f674
commit
70a06d9990
@ -1887,7 +1887,7 @@ class NetworkCloudMixin(_normalize.Normalizer):
|
||||
'admin_state_up': admin_state_up
|
||||
}
|
||||
if project_id is not None:
|
||||
router['tenant_id'] = project_id
|
||||
router['project_id'] = project_id
|
||||
if name:
|
||||
router['name'] = name
|
||||
ext_gw_info = self._build_external_gateway_info(
|
||||
|
@ -33,7 +33,7 @@ class AddressGroup(resource.Resource):
|
||||
_query_mapping = resource.QueryParameters(
|
||||
"sort_key", "sort_dir",
|
||||
'name', 'description',
|
||||
project_id='tenant_id'
|
||||
'project_id'
|
||||
)
|
||||
|
||||
# Properties
|
||||
@ -44,7 +44,9 @@ class AddressGroup(resource.Resource):
|
||||
#: The address group name.
|
||||
description = resource.Body('description')
|
||||
#: The ID of the project that owns the address group.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The IP addresses of the address group.
|
||||
addresses = resource.Body('addresses', type=list)
|
||||
|
||||
|
@ -30,7 +30,7 @@ class AddressScope(resource.Resource):
|
||||
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'name', 'ip_version',
|
||||
project_id='tenant_id',
|
||||
'project_id',
|
||||
is_shared='shared',
|
||||
)
|
||||
|
||||
@ -38,7 +38,9 @@ class AddressScope(resource.Resource):
|
||||
#: The address scope name.
|
||||
name = resource.Body('name')
|
||||
#: The ID of the project that owns the address scope.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The IP address family of the address scope.
|
||||
#: *Type: int*
|
||||
ip_version = resource.Body('ip_version', type=int)
|
||||
|
@ -36,7 +36,9 @@ class AutoAllocatedTopology(resource.Resource):
|
||||
#: Will return in error if resources have not been configured correctly
|
||||
#: To use this feature auto-allocated-topology, subnet_allocation,
|
||||
#: external-net and router extensions must be enabled and set up.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
|
||||
|
||||
class ValidateTopology(AutoAllocatedTopology):
|
||||
|
@ -28,11 +28,13 @@ class FloatingIP(_base.NetworkResource, resource.TagMixin):
|
||||
allow_delete = True
|
||||
allow_list = True
|
||||
|
||||
# For backward compatibility include tenant_id as query param
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'description', 'fixed_ip_address',
|
||||
'floating_ip_address', 'floating_network_id',
|
||||
'port_id', 'router_id', 'status', 'subnet_id',
|
||||
project_id='tenant_id',
|
||||
'project_id', 'tenant_id',
|
||||
tenant_id='project_id',
|
||||
**resource.TagMixin._tag_query_parameters)
|
||||
|
||||
# Properties
|
||||
@ -68,7 +70,9 @@ class FloatingIP(_base.NetworkResource, resource.TagMixin):
|
||||
#: The ID of the QoS policy attached to the floating IP.
|
||||
qos_policy_id = resource.Body('qos_policy_id')
|
||||
#: The ID of the project this floating IP is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The ID of an associated router.
|
||||
router_id = resource.Body('router_id')
|
||||
#: The floating IP status. Value is ``ACTIVE`` or ``DOWN``.
|
||||
|
@ -29,9 +29,8 @@ class HealthMonitor(resource.Resource):
|
||||
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'delay', 'expected_codes', 'http_method', 'max_retries',
|
||||
'timeout', 'type', 'url_path',
|
||||
'timeout', 'type', 'url_path', 'project_id',
|
||||
is_admin_state_up='adminstate_up',
|
||||
project_id='tenant_id',
|
||||
)
|
||||
|
||||
# Properties
|
||||
@ -54,7 +53,9 @@ class HealthMonitor(resource.Resource):
|
||||
#: The ID of the pool associated with this health monitor
|
||||
pool_id = resource.Body('pool_id')
|
||||
#: The ID of the project this health monitor is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The maximum number of seconds for a monitor to wait for a
|
||||
#: connection to be established before it times out. This value must
|
||||
#: be less than the delay value.
|
||||
|
@ -44,7 +44,9 @@ class LoadBalancer(resource.Resource):
|
||||
#: *Type: list of dicts which contain the pool IDs*
|
||||
pool_ids = resource.Body('pools', type=list)
|
||||
#: The ID of the project this load balancer is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The name of the provider.
|
||||
provider = resource.Body('provider')
|
||||
#: Status of load balancer provisioning, e.g. ACTIVE, INACTIVE.
|
||||
|
@ -28,9 +28,8 @@ class MeteringLabel(resource.Resource):
|
||||
allow_list = True
|
||||
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'description', 'name',
|
||||
'description', 'name', 'project_id',
|
||||
is_shared='shared',
|
||||
project_id='tenant_id'
|
||||
)
|
||||
|
||||
# Properties
|
||||
@ -39,7 +38,9 @@ class MeteringLabel(resource.Resource):
|
||||
#: Name of the metering label.
|
||||
name = resource.Body('name')
|
||||
#: The ID of the project this metering label is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: Indicates whether this label is shared across all tenants.
|
||||
#: *Type: bool*
|
||||
is_shared = resource.Body('shared', type=bool)
|
||||
|
@ -29,7 +29,7 @@ class MeteringLabelRule(resource.Resource):
|
||||
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'direction', 'metering_label_id', 'remote_ip_prefix',
|
||||
'source_ip_prefix', 'destination_ip_prefix', project_id='tenant_id',
|
||||
'source_ip_prefix', 'destination_ip_prefix', 'project_id',
|
||||
)
|
||||
|
||||
# Properties
|
||||
@ -44,7 +44,9 @@ class MeteringLabelRule(resource.Resource):
|
||||
#: The metering label ID to associate with this metering label rule.
|
||||
metering_label_id = resource.Body('metering_label_id')
|
||||
#: The ID of the project this metering label rule is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The remote IP prefix to be associated with this metering label rule.
|
||||
remote_ip_prefix = resource.Body(
|
||||
'remote_ip_prefix', deprecated=True,
|
||||
|
@ -29,13 +29,13 @@ class Network(_base.NetworkResource, resource.TagMixin):
|
||||
# NOTE: We don't support query on list or datetime fields yet
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'description', 'name', 'status',
|
||||
'project_id',
|
||||
ipv4_address_scope_id='ipv4_address_scope',
|
||||
ipv6_address_scope_id='ipv6_address_scope',
|
||||
is_admin_state_up='admin_state_up',
|
||||
is_port_security_enabled='port_security_enabled',
|
||||
is_router_external='router:external',
|
||||
is_shared='shared',
|
||||
project_id='tenant_id',
|
||||
provider_network_type='provider:network_type',
|
||||
provider_physical_network='provider:physical_network',
|
||||
provider_segmentation_id='provider:segmentation_id',
|
||||
|
@ -30,7 +30,7 @@ class NetworkIPAvailability(resource.Resource):
|
||||
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'ip_version', 'network_id', 'network_name',
|
||||
project_id='tenant_id'
|
||||
'project_id'
|
||||
)
|
||||
|
||||
# Properties
|
||||
@ -42,7 +42,9 @@ class NetworkIPAvailability(resource.Resource):
|
||||
#: *Type: list*
|
||||
subnet_ip_availability = resource.Body('subnet_ip_availability', type=list)
|
||||
#: The ID of the project this network IP availability is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The total ips of a network.
|
||||
#: *Type: int*
|
||||
total_ips = resource.Body('total_ips', type=int)
|
||||
|
@ -30,8 +30,8 @@ class Pool(resource.Resource):
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'description', 'lb_algorithm', 'name',
|
||||
'protocol', 'provider', 'subnet_id', 'virtual_ip_id', 'listener_id',
|
||||
'project_id',
|
||||
is_admin_state_up='admin_state_up',
|
||||
project_id='tenant_id',
|
||||
load_balancer_id='loadbalancer_id',
|
||||
)
|
||||
|
||||
@ -67,7 +67,9 @@ class Pool(resource.Resource):
|
||||
#: Pool name. Does not have to be unique.
|
||||
name = resource.Body('name')
|
||||
#: The ID of the project this pool is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The protocol of the pool, which is TCP, HTTP, or HTTPS.
|
||||
protocol = resource.Body('protocol')
|
||||
#: The provider name of the load balancer service.
|
||||
|
@ -29,8 +29,8 @@ class PoolMember(resource.Resource):
|
||||
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'address', 'name', 'protocol_port', 'subnet_id', 'weight',
|
||||
'project_id',
|
||||
is_admin_state_up='admin_state_up',
|
||||
project_id='tenant_id',
|
||||
)
|
||||
|
||||
# Properties
|
||||
@ -44,7 +44,9 @@ class PoolMember(resource.Resource):
|
||||
#: Name of the pool member.
|
||||
name = resource.Body('name')
|
||||
#: The ID of the project this pool member is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The port on which the application is hosted.
|
||||
protocol_port = resource.Body('protocol_port', type=int)
|
||||
#: Subnet ID in which to access this pool member.
|
||||
|
@ -32,10 +32,9 @@ class Port(_base.NetworkResource, resource.TagMixin):
|
||||
'binding:vif_type', 'binding:vnic_type',
|
||||
'description', 'device_id', 'device_owner', 'fields', 'fixed_ips',
|
||||
'id', 'ip_address', 'mac_address', 'name', 'network_id', 'status',
|
||||
'subnet_id',
|
||||
'subnet_id', 'project_id',
|
||||
is_admin_state_up='admin_state_up',
|
||||
is_port_security_enabled='port_security_enabled',
|
||||
project_id='tenant_id',
|
||||
**resource.TagMixin._tag_query_parameters
|
||||
)
|
||||
|
||||
@ -112,7 +111,9 @@ class Port(_base.NetworkResource, resource.TagMixin):
|
||||
numa_affinity_policy = resource.Body('numa_affinity_policy')
|
||||
#: The ID of the project who owns the network. Only administrative
|
||||
#: users can specify a project ID other than their own.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: Whether to propagate uplink status of the port. *Type: bool*
|
||||
propagate_uplink_status = resource.Body('propagate_uplink_status',
|
||||
type=bool)
|
||||
|
@ -30,7 +30,7 @@ class QoSPolicy(resource.Resource, resource.TagMixin):
|
||||
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'name', 'description', 'is_default',
|
||||
project_id='tenant_id',
|
||||
'project_id',
|
||||
is_shared='shared',
|
||||
**resource.TagMixin._tag_query_parameters
|
||||
)
|
||||
|
@ -114,7 +114,7 @@ class QuotaDetails(Quota):
|
||||
#: The maximum amount of ports you can create. *Type: dict*
|
||||
ports = resource.Body('port', type=dict)
|
||||
#: The ID of the project these quota values are for.
|
||||
project_id = resource.Body('tenant_id', alternate_id=True)
|
||||
project_id = resource.Body('project_id', alternate_id=True)
|
||||
#: The maximum amount of RBAC policies you can create. *Type: dict*
|
||||
rbac_policies = resource.Body('rbac_policy', type=dict)
|
||||
#: The maximum amount of routers you can create. *Type: int*
|
||||
|
@ -38,7 +38,9 @@ class RBACPolicy(resource.Resource):
|
||||
#: The ID of the project this RBAC will be enforced.
|
||||
target_project_id = resource.Body('target_tenant')
|
||||
#: The owner project ID.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: Type of the object that this RBAC policy affects.
|
||||
object_type = resource.Body('object_type')
|
||||
#: Action for the RBAC policy.
|
||||
|
@ -30,11 +30,10 @@ class Router(_base.NetworkResource, resource.TagMixin):
|
||||
|
||||
# NOTE: We don't support query on datetime, list or dict fields
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'description', 'flavor_id', 'name', 'status',
|
||||
'description', 'flavor_id', 'name', 'status', 'project_id',
|
||||
is_admin_state_up='admin_state_up',
|
||||
is_distributed='distributed',
|
||||
is_ha='ha',
|
||||
project_id='tenant_id',
|
||||
**resource.TagMixin._tag_query_parameters
|
||||
)
|
||||
|
||||
@ -66,7 +65,9 @@ class Router(_base.NetworkResource, resource.TagMixin):
|
||||
#: The router name.
|
||||
name = resource.Body('name')
|
||||
#: The ID of the project this router is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: Revision number of the router. *Type: int*
|
||||
revision_number = resource.Body('revision', type=int)
|
||||
#: The extra routes configuration for the router.
|
||||
|
@ -48,6 +48,6 @@ class SecurityGroup(_base.NetworkResource, resource.TagMixin):
|
||||
#: objects. *Type: list*
|
||||
security_group_rules = resource.Body('security_group_rules', type=list)
|
||||
#: The ID of the project this security group is associated with.
|
||||
tenant_id = resource.Body('tenant_id')
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: Timestamp when the security group was last updated.
|
||||
updated_at = resource.Body('updated_at')
|
||||
|
@ -84,7 +84,7 @@ class SecurityGroupRule(_base.NetworkResource, resource.TagMixin):
|
||||
#: The security group ID to associate with this security group rule.
|
||||
security_group_id = resource.Body('security_group_id')
|
||||
#: The ID of the project this security group rule is associated with.
|
||||
tenant_id = resource.Body('tenant_id')
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: Timestamp when the security group rule was last updated.
|
||||
updated_at = resource.Body('updated_at')
|
||||
|
||||
|
@ -28,9 +28,8 @@ class ServiceProfile(resource.Resource):
|
||||
allow_list = True
|
||||
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'description', 'driver',
|
||||
'description', 'driver', 'project_id',
|
||||
is_enabled='enabled',
|
||||
project_id='tenant_id'
|
||||
)
|
||||
# Properties
|
||||
#: Description of the service flavor profile.
|
||||
@ -42,4 +41,6 @@ class ServiceProfile(resource.Resource):
|
||||
#: Metainformation of the service flavor profile
|
||||
meta_info = resource.Body('metainfo')
|
||||
#: The owner project ID
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
|
@ -30,9 +30,8 @@ class Subnet(_base.NetworkResource, resource.TagMixin):
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'cidr', 'description', 'gateway_ip', 'ip_version',
|
||||
'ipv6_address_mode', 'ipv6_ra_mode', 'name', 'network_id',
|
||||
'segment_id', 'dns_publish_fixed_ip',
|
||||
'segment_id', 'dns_publish_fixed_ip', 'project_id',
|
||||
is_dhcp_enabled='enable_dhcp',
|
||||
project_id='tenant_id',
|
||||
subnet_pool_id='subnetpool_id',
|
||||
use_default_subnet_pool='use_default_subnetpool',
|
||||
**resource.TagMixin._tag_query_parameters
|
||||
@ -75,7 +74,9 @@ class Subnet(_base.NetworkResource, resource.TagMixin):
|
||||
#: The prefix length to use for subnet allocation from a subnet pool
|
||||
prefix_length = resource.Body('prefixlen')
|
||||
#: The ID of the project this subnet is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The ID of the segment this subnet is associated with.
|
||||
segment_id = resource.Body('segment_id')
|
||||
#: Service types for this subnet
|
||||
|
@ -29,9 +29,8 @@ class SubnetPool(resource.Resource, resource.TagMixin):
|
||||
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'address_scope_id', 'description', 'ip_version', 'is_default',
|
||||
'name',
|
||||
'name', 'project_id',
|
||||
is_shared='shared',
|
||||
project_id='tenant_id',
|
||||
**resource.TagMixin._tag_query_parameters
|
||||
)
|
||||
|
||||
@ -69,7 +68,9 @@ class SubnetPool(resource.Resource, resource.TagMixin):
|
||||
#: The subnet pool name.
|
||||
name = resource.Body('name')
|
||||
#: The ID of the project that owns the subnet pool.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: A list of subnet prefixes that are assigned to the subnet pool.
|
||||
#: The adjacent prefixes are merged and treated as a single prefix.
|
||||
#: *Type: list*
|
||||
|
@ -31,7 +31,7 @@ class Trunk(resource.Resource, resource.TagMixin):
|
||||
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'name', 'description', 'port_id', 'status', 'sub_ports',
|
||||
project_id='tenant_id',
|
||||
'project_id',
|
||||
is_admin_state_up='admin_state_up',
|
||||
**resource.TagMixin._tag_query_parameters
|
||||
)
|
||||
@ -41,7 +41,9 @@ class Trunk(resource.Resource, resource.TagMixin):
|
||||
name = resource.Body('name')
|
||||
#: The ID of the project who owns the trunk. Only administrative
|
||||
#: users can specify a project ID other than their own.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The trunk description.
|
||||
description = resource.Body('description')
|
||||
#: The administrative state of the port, which is up ``True`` or
|
||||
|
@ -44,7 +44,9 @@ class VPNService(resource.Resource):
|
||||
#: ID of the router into which the VPN service is inserted.
|
||||
router_id = resource.Body('router_id')
|
||||
#: The ID of the project this vpnservice is associated with.
|
||||
project_id = resource.Body('tenant_id')
|
||||
project_id = resource.Body('project_id', alias='tenant_id')
|
||||
#: Tenant_id (deprecated attribute).
|
||||
tenant_id = resource.Body('tenant_id', deprecated=True)
|
||||
#: The vpnservice status.
|
||||
status = resource.Body('status')
|
||||
#: The ID of the subnet on which the tenant wants the vpnservice.
|
||||
|
@ -151,7 +151,7 @@ class TestRouter(base.TestCase):
|
||||
json={'router': {
|
||||
'name': self.router_name,
|
||||
'admin_state_up': True,
|
||||
'tenant_id': new_router_tenant_id}}))
|
||||
'project_id': new_router_tenant_id}}))
|
||||
])
|
||||
|
||||
self.cloud.create_router(self.router_name,
|
||||
|
@ -19,7 +19,7 @@ EXAMPLE = {
|
||||
'id': IDENTIFIER,
|
||||
'name': '1',
|
||||
'description': '2',
|
||||
'tenant_id': '3',
|
||||
'project_id': '3',
|
||||
'addresses': ['10.0.0.1/32']
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ class TestAddressGroup(base.TestCase):
|
||||
|
||||
self.assertDictEqual({"name": "name",
|
||||
"description": "description",
|
||||
"project_id": "tenant_id",
|
||||
"project_id": "project_id",
|
||||
"sort_key": "sort_key",
|
||||
"sort_dir": "sort_dir",
|
||||
"limit": "limit",
|
||||
@ -51,5 +51,5 @@ class TestAddressGroup(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['id'], sot.id)
|
||||
self.assertEqual(EXAMPLE['name'], sot.name)
|
||||
self.assertEqual(EXAMPLE['description'], sot.description)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertCountEqual(EXAMPLE['addresses'], sot.addresses)
|
||||
|
@ -20,7 +20,7 @@ EXAMPLE = {
|
||||
'ip_version': 4,
|
||||
'name': '1',
|
||||
'shared': True,
|
||||
'tenant_id': '2',
|
||||
'project_id': '2',
|
||||
}
|
||||
|
||||
|
||||
@ -43,4 +43,4 @@ class TestAddressScope(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['ip_version'], sot.ip_version)
|
||||
self.assertEqual(EXAMPLE['name'], sot.name)
|
||||
self.assertTrue(sot.is_shared)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
|
@ -15,7 +15,7 @@ from openstack.tests.unit import base
|
||||
|
||||
|
||||
EXAMPLE = {
|
||||
'tenant_id': '1',
|
||||
'project_id': '1',
|
||||
'dry_run': False,
|
||||
}
|
||||
|
||||
@ -34,4 +34,4 @@ class TestAutoAllocatedTopology(base.TestCase):
|
||||
|
||||
def test_make_it(self):
|
||||
topo = auto_allocated_topology.AutoAllocatedTopology(**EXAMPLE)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], topo.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], topo.project_id)
|
||||
|
@ -25,7 +25,7 @@ EXAMPLE = {
|
||||
'id': IDENTIFIER,
|
||||
'port_id': '5',
|
||||
'qos_policy_id': '51',
|
||||
'tenant_id': '6',
|
||||
'project_id': '6',
|
||||
'router_id': '7',
|
||||
'description': '8',
|
||||
'dns_domain': '9',
|
||||
@ -61,7 +61,7 @@ class TestFloatingIP(base.TestCase):
|
||||
sot.floating_network_id)
|
||||
self.assertEqual(EXAMPLE['id'], sot.id)
|
||||
self.assertEqual(EXAMPLE['port_id'], sot.port_id)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['router_id'], sot.router_id)
|
||||
self.assertEqual(EXAMPLE['description'], sot.description)
|
||||
self.assertEqual(EXAMPLE['dns_domain'], sot.dns_domain)
|
||||
@ -72,6 +72,26 @@ class TestFloatingIP(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['subnet_id'], sot.subnet_id)
|
||||
self.assertEqual(EXAMPLE['tags'], sot.tags)
|
||||
|
||||
self.assertDictEqual(
|
||||
{'limit': 'limit',
|
||||
'marker': 'marker',
|
||||
'description': 'description',
|
||||
'project_id': 'project_id',
|
||||
'tenant_id': 'project_id',
|
||||
'status': 'status',
|
||||
'port_id': 'port_id',
|
||||
'subnet_id': 'subnet_id',
|
||||
'router_id': 'router_id',
|
||||
'fixed_ip_address': 'fixed_ip_address',
|
||||
'floating_ip_address': 'floating_ip_address',
|
||||
'floating_network_id': 'floating_network_id',
|
||||
'tags': 'tags',
|
||||
'any_tags': 'tags-any',
|
||||
'not_tags': 'not-tags',
|
||||
'not_any_tags': 'not-tags-any',
|
||||
},
|
||||
sot._query_mapping._mapping)
|
||||
|
||||
def test_find_available(self):
|
||||
mock_session = mock.Mock(spec=proxy.Proxy)
|
||||
mock_session.get_filter = mock.Mock(return_value={})
|
||||
|
@ -24,7 +24,7 @@ EXAMPLE = {
|
||||
'max_retries': '6',
|
||||
'pools': [{'id': '7'}],
|
||||
'pool_id': '7',
|
||||
'tenant_id': '8',
|
||||
'project_id': '8',
|
||||
'timeout': '9',
|
||||
'type': '10',
|
||||
'url_path': '11',
|
||||
@ -55,7 +55,7 @@ class TestHealthMonitor(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['max_retries'], sot.max_retries)
|
||||
self.assertEqual(EXAMPLE['pools'], sot.pool_ids)
|
||||
self.assertEqual(EXAMPLE['pool_id'], sot.pool_id)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['timeout'], sot.timeout)
|
||||
self.assertEqual(EXAMPLE['type'], sot.type)
|
||||
self.assertEqual(EXAMPLE['url_path'], sot.url_path)
|
||||
|
@ -23,7 +23,7 @@ EXAMPLE = {
|
||||
'name': '5',
|
||||
'operating_status': '6',
|
||||
'provisioning_status': '7',
|
||||
'tenant_id': '8',
|
||||
'project_id': '8',
|
||||
'vip_address': '9',
|
||||
'vip_subnet_id': '10',
|
||||
'vip_port_id': '11',
|
||||
@ -55,7 +55,7 @@ class TestLoadBalancer(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['operating_status'], sot.operating_status)
|
||||
self.assertEqual(EXAMPLE['provisioning_status'],
|
||||
sot.provisioning_status)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['vip_address'], sot.vip_address)
|
||||
self.assertEqual(EXAMPLE['vip_subnet_id'], sot.vip_subnet_id)
|
||||
self.assertEqual(EXAMPLE['vip_port_id'], sot.vip_port_id)
|
||||
|
@ -19,7 +19,7 @@ EXAMPLE = {
|
||||
'description': '1',
|
||||
'id': IDENTIFIER,
|
||||
'name': '3',
|
||||
'tenant_id': '4',
|
||||
'project_id': '4',
|
||||
'shared': False,
|
||||
}
|
||||
|
||||
@ -42,5 +42,5 @@ class TestMeteringLabel(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['description'], sot.description)
|
||||
self.assertEqual(EXAMPLE['id'], sot.id)
|
||||
self.assertEqual(EXAMPLE['name'], sot.name)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['shared'], sot.is_shared)
|
||||
|
@ -20,7 +20,7 @@ EXAMPLE = {
|
||||
'excluded': False,
|
||||
'id': IDENTIFIER,
|
||||
'metering_label_id': '4',
|
||||
'tenant_id': '5',
|
||||
'project_id': '5',
|
||||
'remote_ip_prefix': '6',
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ class TestMeteringLabelRule(base.TestCase):
|
||||
self.assertFalse(sot.is_excluded)
|
||||
self.assertEqual(EXAMPLE['id'], sot.id)
|
||||
self.assertEqual(EXAMPLE['metering_label_id'], sot.metering_label_id)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['remote_ip_prefix'], sot.remote_ip_prefix)
|
||||
|
||||
def test_make_it_source_and_destination(self):
|
||||
@ -58,7 +58,7 @@ class TestMeteringLabelRule(base.TestCase):
|
||||
self.assertEqual(custom_example['id'], sot.id)
|
||||
self.assertEqual(
|
||||
custom_example['metering_label_id'], sot.metering_label_id)
|
||||
self.assertEqual(custom_example['tenant_id'], sot.project_id)
|
||||
self.assertEqual(custom_example['project_id'], sot.project_id)
|
||||
self.assertEqual(
|
||||
custom_example['remote_ip_prefix'], sot.remote_ip_prefix)
|
||||
|
||||
|
@ -99,7 +99,7 @@ class TestNetwork(base.TestCase):
|
||||
'marker': 'marker',
|
||||
'description': 'description',
|
||||
'name': 'name',
|
||||
'project_id': 'tenant_id',
|
||||
'project_id': 'project_id',
|
||||
'status': 'status',
|
||||
'ipv4_address_scope_id': 'ipv4_address_scope',
|
||||
'ipv6_address_scope_id': 'ipv6_address_scope',
|
||||
|
@ -19,7 +19,7 @@ EXAMPLE = {
|
||||
'network_id': IDENTIFIER,
|
||||
'network_name': 'private',
|
||||
'subnet_ip_availability': [],
|
||||
'tenant_id': '5',
|
||||
'project_id': '5',
|
||||
'total_ips': 6,
|
||||
'used_ips': 10,
|
||||
}
|
||||
@ -32,7 +32,7 @@ EXAMPLE_WITH_OPTIONAL = {
|
||||
"subnet_name": "private-subnet",
|
||||
"ip_version": 6, "cidr": "fd91:c3ba:e818::/64",
|
||||
"total_ips": 18446744073709551614}],
|
||||
'tenant_id': '2',
|
||||
'project_id': '2',
|
||||
'total_ips': 1844,
|
||||
'used_ips': 6,
|
||||
}
|
||||
@ -58,7 +58,7 @@ class TestNetworkIPAvailability(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['network_name'], sot.network_name)
|
||||
self.assertEqual(EXAMPLE['subnet_ip_availability'],
|
||||
sot.subnet_ip_availability)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['total_ips'], sot.total_ips)
|
||||
self.assertEqual(EXAMPLE['used_ips'], sot.used_ips)
|
||||
|
||||
@ -70,6 +70,6 @@ class TestNetworkIPAvailability(base.TestCase):
|
||||
sot.network_name)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['subnet_ip_availability'],
|
||||
sot.subnet_ip_availability)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['total_ips'], sot.total_ips)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['used_ips'], sot.used_ips)
|
||||
|
@ -27,7 +27,7 @@ EXAMPLE = {
|
||||
'listener_id': '6',
|
||||
'members': [{'id': '7'}],
|
||||
'name': '8',
|
||||
'tenant_id': '9',
|
||||
'project_id': '9',
|
||||
'protocol': '10',
|
||||
'provider': '11',
|
||||
'session_persistence': '12',
|
||||
@ -67,7 +67,7 @@ class TestPool(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['listener_id'], sot.listener_id)
|
||||
self.assertEqual(EXAMPLE['members'], sot.member_ids)
|
||||
self.assertEqual(EXAMPLE['name'], sot.name)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['protocol'], sot.protocol)
|
||||
self.assertEqual(EXAMPLE['provider'], sot.provider)
|
||||
self.assertEqual(EXAMPLE['session_persistence'],
|
||||
|
@ -19,7 +19,7 @@ EXAMPLE = {
|
||||
'address': '1',
|
||||
'admin_state_up': True,
|
||||
'id': IDENTIFIER,
|
||||
'tenant_id': '4',
|
||||
'project_id': '4',
|
||||
'protocol_port': 5,
|
||||
'subnet_id': '6',
|
||||
'weight': 7,
|
||||
@ -46,7 +46,7 @@ class TestPoolMember(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['address'], sot.address)
|
||||
self.assertTrue(sot.is_admin_state_up)
|
||||
self.assertEqual(EXAMPLE['id'], sot.id)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['protocol_port'], sot.protocol_port)
|
||||
self.assertEqual(EXAMPLE['subnet_id'], sot.subnet_id)
|
||||
self.assertEqual(EXAMPLE['weight'], sot.weight)
|
||||
|
@ -53,7 +53,7 @@ EXAMPLE = {
|
||||
'revision_number': 22,
|
||||
'security_groups': ['23'],
|
||||
'status': '25',
|
||||
'tenant_id': '26',
|
||||
'project_id': '26',
|
||||
'trunk_details': {
|
||||
'trunk_id': '27',
|
||||
'sub_ports': [{
|
||||
@ -98,7 +98,7 @@ class TestPort(base.TestCase):
|
||||
"is_admin_state_up": "admin_state_up",
|
||||
"is_port_security_enabled":
|
||||
"port_security_enabled",
|
||||
"project_id": "tenant_id",
|
||||
"project_id": "project_id",
|
||||
"limit": "limit",
|
||||
"marker": "marker",
|
||||
"any_tags": "tags-any",
|
||||
@ -146,6 +146,6 @@ class TestPort(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['revision_number'], sot.revision_number)
|
||||
self.assertEqual(EXAMPLE['security_groups'], sot.security_group_ids)
|
||||
self.assertEqual(EXAMPLE['status'], sot.status)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['trunk_details'], sot.trunk_details)
|
||||
self.assertEqual(EXAMPLE['updated_at'], sot.updated_at)
|
||||
|
@ -21,7 +21,7 @@ EXAMPLE = {
|
||||
'description': 'QoS policy description',
|
||||
'name': 'qos-policy-name',
|
||||
'shared': True,
|
||||
'tenant_id': '2',
|
||||
'project_id': '2',
|
||||
'rules': [uuid.uuid4().hex],
|
||||
'is_default': False,
|
||||
'tags': ['3']
|
||||
@ -46,8 +46,7 @@ class TestQoSPolicy(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['id'], sot.id)
|
||||
self.assertEqual(EXAMPLE['description'], sot.description)
|
||||
self.assertEqual(EXAMPLE['name'], sot.name)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.tenant_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['rules'], sot.rules)
|
||||
self.assertEqual(EXAMPLE['is_default'], sot.is_default)
|
||||
self.assertEqual(EXAMPLE['tags'], sot.tags)
|
||||
|
@ -20,7 +20,7 @@ EXAMPLE = {
|
||||
'floatingip': 1,
|
||||
'network': 2,
|
||||
'port': 3,
|
||||
'tenant_id': '4',
|
||||
'project_id': '4',
|
||||
'router': 5,
|
||||
'subnet': 6,
|
||||
'subnetpool': 7,
|
||||
@ -53,7 +53,7 @@ class TestQuota(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['floatingip'], sot.floating_ips)
|
||||
self.assertEqual(EXAMPLE['network'], sot.networks)
|
||||
self.assertEqual(EXAMPLE['port'], sot.ports)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['router'], sot.routers)
|
||||
self.assertEqual(EXAMPLE['subnet'], sot.subnets)
|
||||
self.assertEqual(EXAMPLE['subnetpool'], sot.subnet_pools)
|
||||
@ -74,10 +74,10 @@ class TestQuota(base.TestCase):
|
||||
self.assertNotIn('id', response)
|
||||
|
||||
def test_alternate_id(self):
|
||||
my_tenant_id = 'my-tenant-id'
|
||||
body = {'tenant_id': my_tenant_id, 'network': 12345}
|
||||
my_project_id = 'my-tenant-id'
|
||||
body = {'project_id': my_project_id, 'network': 12345}
|
||||
quota_obj = quota.Quota(**body)
|
||||
self.assertEqual(my_tenant_id,
|
||||
self.assertEqual(my_project_id,
|
||||
resource.Resource._get_id(quota_obj))
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ class TestQuotaDefault(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['floatingip'], sot.floating_ips)
|
||||
self.assertEqual(EXAMPLE['network'], sot.networks)
|
||||
self.assertEqual(EXAMPLE['port'], sot.ports)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['router'], sot.routers)
|
||||
self.assertEqual(EXAMPLE['subnet'], sot.subnets)
|
||||
self.assertEqual(EXAMPLE['subnetpool'], sot.subnet_pools)
|
||||
|
@ -20,7 +20,7 @@ EXAMPLE = {
|
||||
'object_id': IDENTIFIER,
|
||||
'object_type': 'network',
|
||||
'target_tenant': '10',
|
||||
'tenant_id': '5',
|
||||
'project_id': '5',
|
||||
}
|
||||
|
||||
|
||||
@ -43,4 +43,4 @@ class TestRBACPolicy(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['object_id'], sot.object_id)
|
||||
self.assertEqual(EXAMPLE['object_type'], sot.object_type)
|
||||
self.assertEqual(EXAMPLE['target_tenant'], sot.target_project_id)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
|
@ -34,7 +34,7 @@ EXAMPLE = {
|
||||
'revision': 7,
|
||||
'routes': ['8'],
|
||||
'status': '9',
|
||||
'tenant_id': '10',
|
||||
'project_id': '10',
|
||||
'updated_at': 'timestamp2',
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ EXAMPLE_WITH_OPTIONAL = {
|
||||
'destination': '10.0.3.1/24'
|
||||
}],
|
||||
'status': 'ACTIVE',
|
||||
'tenant_id': '2',
|
||||
'project_id': '2',
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ class TestRouter(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['revision'], sot.revision_number)
|
||||
self.assertEqual(EXAMPLE['routes'], sot.routes)
|
||||
self.assertEqual(EXAMPLE['status'], sot.status)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['updated_at'], sot.updated_at)
|
||||
|
||||
def test_make_it_with_optional(self):
|
||||
@ -113,7 +113,7 @@ class TestRouter(base.TestCase):
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['name'], sot.name)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['routes'], sot.routes)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['status'], sot.status)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['project_id'], sot.project_id)
|
||||
|
||||
def test_add_interface_subnet(self):
|
||||
# Add subnet to a router
|
||||
|
@ -23,7 +23,7 @@ RULES = [
|
||||
"protocol": None,
|
||||
"ethertype":
|
||||
"IPv6",
|
||||
"tenant_id": "4",
|
||||
"project_id": "4",
|
||||
"port_range_max": None,
|
||||
"port_range_min": None,
|
||||
"id": "5",
|
||||
@ -38,7 +38,7 @@ RULES = [
|
||||
"remote_ip_prefix": None,
|
||||
"protocol": None,
|
||||
"ethertype": "IPv6",
|
||||
"tenant_id": "4",
|
||||
"project_id": "4",
|
||||
"port_range_max": None,
|
||||
"port_range_min": None,
|
||||
"id": "6",
|
||||
@ -57,7 +57,7 @@ EXAMPLE = {
|
||||
'stateful': True,
|
||||
'revision_number': 3,
|
||||
'security_group_rules': RULES,
|
||||
'tenant_id': '4',
|
||||
'project_id': '4',
|
||||
'project_id': '4',
|
||||
'updated_at': '2016-10-14T12:16:57.233772',
|
||||
'tags': ['5']
|
||||
@ -86,12 +86,12 @@ class TestSecurityGroup(base.TestCase):
|
||||
'name': 'name',
|
||||
'not_any_tags': 'not-tags-any',
|
||||
'not_tags': 'not-tags',
|
||||
'project_id': 'project_id',
|
||||
'tenant_id': 'tenant_id',
|
||||
'revision_number': 'revision_number',
|
||||
'sort_dir': 'sort_dir',
|
||||
'sort_key': 'sort_key',
|
||||
'tags': 'tags',
|
||||
'tenant_id': 'tenant_id',
|
||||
'project_id': 'project_id',
|
||||
'stateful': 'stateful',
|
||||
},
|
||||
sot._query_mapping._mapping)
|
||||
@ -106,7 +106,7 @@ class TestSecurityGroup(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['security_group_rules'],
|
||||
sot.security_group_rules)
|
||||
self.assertEqual(dict, type(sot.security_group_rules[0]))
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.tenant_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['updated_at'], sot.updated_at)
|
||||
self.assertEqual(EXAMPLE['tags'], sot.tags)
|
||||
|
@ -28,7 +28,7 @@ EXAMPLE = {
|
||||
'remote_ip_prefix': '8',
|
||||
'revision_number': 9,
|
||||
'security_group_id': '10',
|
||||
'tenant_id': '11',
|
||||
'project_id': '11',
|
||||
'project_id': '11',
|
||||
'updated_at': '12',
|
||||
'remote_address_group_id': '13'
|
||||
@ -59,7 +59,7 @@ class TestSecurityGroupRule(base.TestCase):
|
||||
'not_tags': 'not-tags',
|
||||
'port_range_max': 'port_range_max',
|
||||
'port_range_min': 'port_range_min',
|
||||
'project_id': 'project_id',
|
||||
'tenant_id': 'tenant_id',
|
||||
'protocol': 'protocol',
|
||||
'remote_group_id': 'remote_group_id',
|
||||
'remote_address_group_id':
|
||||
@ -70,7 +70,7 @@ class TestSecurityGroupRule(base.TestCase):
|
||||
'sort_dir': 'sort_dir',
|
||||
'sort_key': 'sort_key',
|
||||
'tags': 'tags',
|
||||
'tenant_id': 'tenant_id'
|
||||
'project_id': 'project_id'
|
||||
},
|
||||
sot._query_mapping._mapping)
|
||||
|
||||
@ -90,6 +90,6 @@ class TestSecurityGroupRule(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['remote_ip_prefix'], sot.remote_ip_prefix)
|
||||
self.assertEqual(EXAMPLE['revision_number'], sot.revision_number)
|
||||
self.assertEqual(EXAMPLE['security_group_id'], sot.security_group_id)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.tenant_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['updated_at'], sot.updated_at)
|
||||
|
@ -20,7 +20,7 @@ EXAMPLE_WITH_OPTIONAL = {
|
||||
'driver': 'neutron_lbaas.drivers.octavia.driver.OctaviaDriver',
|
||||
'enabled': True,
|
||||
'metainfo': {'foo': 'bar'},
|
||||
'tenant_id': '5',
|
||||
'project_id': '5',
|
||||
}
|
||||
|
||||
EXAMPLE = {
|
||||
@ -55,5 +55,5 @@ class TestServiceProfile(base.TestCase):
|
||||
service_profiles.is_enabled)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['metainfo'],
|
||||
service_profiles.meta_info)
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['tenant_id'],
|
||||
self.assertEqual(EXAMPLE_WITH_OPTIONAL['project_id'],
|
||||
service_profiles.project_id)
|
||||
|
@ -35,7 +35,7 @@ EXAMPLE = {
|
||||
'segment_id': '14',
|
||||
'service_types': ['15'],
|
||||
'subnetpool_id': '16',
|
||||
'tenant_id': '17',
|
||||
'project_id': '17',
|
||||
'updated_at': '18',
|
||||
'use_default_subnetpool': True,
|
||||
}
|
||||
@ -75,6 +75,6 @@ class TestSubnet(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['segment_id'], sot.segment_id)
|
||||
self.assertEqual(EXAMPLE['service_types'], sot.service_types)
|
||||
self.assertEqual(EXAMPLE['subnetpool_id'], sot.subnet_pool_id)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['updated_at'], sot.updated_at)
|
||||
self.assertTrue(sot.use_default_subnet_pool)
|
||||
|
@ -30,7 +30,7 @@ EXAMPLE = {
|
||||
'prefixes': ['10', '11'],
|
||||
'revision_number': 12,
|
||||
'shared': True,
|
||||
'tenant_id': '13',
|
||||
'project_id': '13',
|
||||
'updated_at': '14',
|
||||
}
|
||||
|
||||
@ -65,5 +65,5 @@ class TestSubnetpool(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['prefixes'], sot.prefixes)
|
||||
self.assertEqual(EXAMPLE['revision_number'], sot.revision_number)
|
||||
self.assertTrue(sot.is_shared)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['updated_at'], sot.updated_at)
|
||||
|
@ -22,7 +22,7 @@ EXAMPLE = {
|
||||
'id': 'IDENTIFIER',
|
||||
'description': 'Trunk description',
|
||||
'name': 'trunk-name',
|
||||
'tenant_id': '2',
|
||||
'project_id': '2',
|
||||
'admin_state_up': True,
|
||||
'port_id': 'fake_port_id',
|
||||
'status': 'ACTIVE',
|
||||
@ -53,7 +53,7 @@ class TestTrunk(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['id'], sot.id)
|
||||
self.assertEqual(EXAMPLE['description'], sot.description)
|
||||
self.assertEqual(EXAMPLE['name'], sot.name)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['admin_state_up'], sot.is_admin_state_up)
|
||||
self.assertEqual(EXAMPLE['port_id'], sot.port_id)
|
||||
self.assertEqual(EXAMPLE['status'], sot.status)
|
||||
|
@ -25,7 +25,7 @@ EXAMPLE = {
|
||||
"router_id": "5",
|
||||
"status": "6",
|
||||
"subnet_id": "7",
|
||||
"tenant_id": "8",
|
||||
"project_id": "8",
|
||||
}
|
||||
|
||||
|
||||
@ -53,4 +53,4 @@ class TestVPNService(base.TestCase):
|
||||
self.assertEqual(EXAMPLE['router_id'], sot.router_id)
|
||||
self.assertEqual(EXAMPLE['status'], sot.status)
|
||||
self.assertEqual(EXAMPLE['subnet_id'], sot.subnet_id)
|
||||
self.assertEqual(EXAMPLE['tenant_id'], sot.project_id)
|
||||
self.assertEqual(EXAMPLE['project_id'], sot.project_id)
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Stop sending tenant_id attribute to Neutron.
|
Loading…
Reference in New Issue
Block a user