From: YAMAMOTO Takashi Date: Mon, 30 Nov 2015 09:46:17 +0000 (+0900) Subject: Disallow updating SG rule direction in RESOURCE_ATTRIBUTE_MAP X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e407a335713df40984286bafe1d7da4b530091dc;p=openstack-build%2Fneutron-build.git Disallow updating SG rule direction in RESOURCE_ATTRIBUTE_MAP It doesn't make much sense to allow updating only the direction. I suppose it was a bug in the first place. Partial-Bug: #1521099 Change-Id: Idfd48c801be3cd34286595f5ca3c9d629a296200 --- diff --git a/neutron/extensions/securitygroup.py b/neutron/extensions/securitygroup.py index 018f70442..dcaddabfb 100644 --- a/neutron/extensions/securitygroup.py +++ b/neutron/extensions/securitygroup.py @@ -236,7 +236,7 @@ RESOURCE_ATTRIBUTE_MAP = { 'is_visible': True, 'required_by_policy': True}, 'remote_group_id': {'allow_post': True, 'allow_put': False, 'default': None, 'is_visible': True}, - 'direction': {'allow_post': True, 'allow_put': True, + 'direction': {'allow_post': True, 'allow_put': False, 'is_visible': True, 'validate': {'type:values': ['ingress', 'egress']}}, 'protocol': {'allow_post': True, 'allow_put': False,