From: Jenkins Date: Tue, 10 Jul 2012 19:37:52 +0000 (+0000) Subject: Merge "Validate that network_id in port/subnet POST belong to the same tenant" X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6f076c946f3a6963e5e243bc9381f1a764606dda;p=openstack-build%2Fneutron-build.git Merge "Validate that network_id in port/subnet POST belong to the same tenant" --- 6f076c946f3a6963e5e243bc9381f1a764606dda diff --cc quantum/tests/unit/test_db_plugin.py index b5f9188a1,c54f70e24..7b1c4164c --- a/quantum/tests/unit/test_db_plugin.py +++ b/quantum/tests/unit/test_db_plugin.py @@@ -113,12 -112,12 +113,13 @@@ class QuantumDbPluginV2TestCase(unittes network_req = self.new_create_request('networks', data, fmt) return network_req.get_response(self.api) - def _create_subnet(self, fmt, net_id, gateway_ip, cidr, + def _create_subnet(self, fmt, tenant_id, net_id, gateway_ip, cidr, allocation_pools=None, ip_version=4): - data = {'subnet': {'network_id': net_id, + data = {'subnet': {'tenant_id': tenant_id, + 'network_id': net_id, 'cidr': cidr, - 'ip_version': ip_version}} + 'ip_version': ip_version, + 'tenant_id': self._tenant_id}} if gateway_ip: data['subnet']['gateway_ip'] = gateway_ip if allocation_pools: