]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
deal with parent_id not in target.
authorYong Sheng Gong <gongysh@cn.ibm.com>
Mon, 13 Aug 2012 23:27:22 +0000 (07:27 +0800)
committerYong Sheng Gong <gongysh@cn.ibm.com>
Tue, 14 Aug 2012 02:44:57 +0000 (10:44 +0800)
bug 1036425

If we filter the fields of the requested resource, we have no parent_id in the target, which we must be tolerant with.

Change-Id: Ieb591d9208f16a0d3e05bda00bf45ae7aca846a5

quantum/api/v2/attributes.py

index 20ddd66c3380b7a2e75c060d80909ebecaf6ea32..8a527665c2a722db21776f0f2343cd9a41400d42 100644 (file)
@@ -185,6 +185,7 @@ RESOURCE_ATTRIBUTE_MAP = {
         'name': {'allow_post': True, 'allow_put': True, 'default': '',
                  'is_visible': True},
         'network_id': {'allow_post': True, 'allow_put': False,
+                       'required_by_policy': True,
                        'validate': {'type:regex': UUID_PATTERN},
                        'is_visible': True},
         'admin_state_up': {'allow_post': True, 'allow_put': True,
@@ -228,6 +229,7 @@ RESOURCE_ATTRIBUTE_MAP = {
                        'validate': {'type:values': [4, 6]},
                        'is_visible': True},
         'network_id': {'allow_post': True, 'allow_put': False,
+                       'required_by_policy': True,
                        'validate': {'type:regex': UUID_PATTERN},
                        'is_visible': True},
         'cidr': {'allow_post': True, 'allow_put': False,