From e407a335713df40984286bafe1d7da4b530091dc Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 30 Nov 2015 18:46:17 +0900 Subject: [PATCH] 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 --- neutron/extensions/securitygroup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.45.2