]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Merge "Validate that network_id in port/subnet POST belong to the same tenant"
authorJenkins <jenkins@review.openstack.org>
Tue, 10 Jul 2012 19:37:52 +0000 (19:37 +0000)
committerGerrit Code Review <review@openstack.org>
Tue, 10 Jul 2012 19:37:52 +0000 (19:37 +0000)
1  2 
quantum/api/v2/base.py
quantum/tests/unit/test_api_v2.py
quantum/tests/unit/test_db_plugin.py

Simple merge
Simple merge
index b5f9188a1f479cbdcea0106109cd59541592bc03,c54f70e24aaca52579b9ee8955949b34be87cae6..7b1c4164c87557f0a31cbe1117004276515ffbf2
@@@ -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: