Merge "remove description API attr from securitygroup"
This commit is contained in:
commit
6eb9bc5253
|
@ -31,6 +31,7 @@ from neutron.api import extensions
|
||||||
from neutron.api.v2 import base
|
from neutron.api.v2 import base
|
||||||
from neutron.common import exceptions
|
from neutron.common import exceptions
|
||||||
from neutron.conf import quota
|
from neutron.conf import quota
|
||||||
|
from neutron.extensions import standardattrdescription as stdattr_ext
|
||||||
from neutron.quota import resource_registry
|
from neutron.quota import resource_registry
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,10 +225,6 @@ RESOURCE_ATTRIBUTE_MAP = {
|
||||||
'is_visible': True, 'default': '',
|
'is_visible': True, 'default': '',
|
||||||
'validate': {
|
'validate': {
|
||||||
'type:name_not_default': db_const.NAME_FIELD_SIZE}},
|
'type:name_not_default': db_const.NAME_FIELD_SIZE}},
|
||||||
'description': {'allow_post': True, 'allow_put': True,
|
|
||||||
'validate': {
|
|
||||||
'type:string': db_const.DESCRIPTION_FIELD_SIZE},
|
|
||||||
'is_visible': True, 'default': ''},
|
|
||||||
'tenant_id': {'allow_post': True, 'allow_put': False,
|
'tenant_id': {'allow_post': True, 'allow_put': False,
|
||||||
'required_by_policy': True,
|
'required_by_policy': True,
|
||||||
'validate': {
|
'validate': {
|
||||||
|
@ -338,6 +335,9 @@ class Securitygroup(api_extensions.ExtensionDescriptor):
|
||||||
else:
|
else:
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
def get_required_extensions(self):
|
||||||
|
return [stdattr_ext.Standardattrdescription.get_alias()]
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
class SecurityGroupPluginBase(object):
|
class SecurityGroupPluginBase(object):
|
||||||
|
|
|
@ -55,6 +55,11 @@ class SecurityGroupTestExtensionManager(object):
|
||||||
ext_sg.RESOURCE_ATTRIBUTE_MAP[ext_sg.SECURITYGROUPRULES])
|
ext_sg.RESOURCE_ATTRIBUTE_MAP[ext_sg.SECURITYGROUPRULES])
|
||||||
sg_rule_attr_desc = ext_res[ext_sg.SECURITYGROUPRULES]
|
sg_rule_attr_desc = ext_res[ext_sg.SECURITYGROUPRULES]
|
||||||
existing_sg_rule_attr_map.update(sg_rule_attr_desc)
|
existing_sg_rule_attr_map.update(sg_rule_attr_desc)
|
||||||
|
if ext_sg.SECURITYGROUPS in ext_res:
|
||||||
|
existing_sg_attr_map = (
|
||||||
|
ext_sg.RESOURCE_ATTRIBUTE_MAP[ext_sg.SECURITYGROUPS])
|
||||||
|
sg_attr_desc = ext_res[ext_sg.SECURITYGROUPS]
|
||||||
|
existing_sg_attr_map.update(sg_attr_desc)
|
||||||
return ext_sg.Securitygroup.get_resources()
|
return ext_sg.Securitygroup.get_resources()
|
||||||
|
|
||||||
def get_actions(self):
|
def get_actions(self):
|
||||||
|
|
Loading…
Reference in New Issue