Merge "Do not allow security group rule update"

This commit is contained in:
Jenkins 2015-11-21 00:57:42 +00:00 committed by Gerrit Code Review
commit e950fd2d88
4 changed files with 2 additions and 22 deletions

View File

@ -1192,22 +1192,6 @@ class Proxy(proxy.BaseProxy):
return self._list(security_group_rule.SecurityGroupRule,
paginated=False, **query)
def update_security_group_rule(self, value, **attrs):
"""Update a security group rule
:param value: Either the id of a security group rule or a
:class:`~openstack.network.v2.security_group_rule.
SecurityGroupRule` instance.
:attrs kwargs: The attributes to update on the security group rule
represented by ``value``.
:returns: The updated security group rule
:rtype: :class:`~openstack.network.v2.security_group_rule.
SecurityGroupRule`
"""
return self._update(security_group_rule.SecurityGroupRule, value,
**attrs)
def create_subnet(self, **attrs):
"""Create a new subnet from attributes

View File

@ -23,7 +23,7 @@ class SecurityGroupRule(resource.Resource):
# capabilities
allow_create = True
allow_retrieve = True
allow_update = True
allow_update = False
allow_delete = True
allow_list = True

View File

@ -441,10 +441,6 @@ class TestNetworkProxy(test_proxy_base.TestProxyBase):
security_group_rule.SecurityGroupRule,
paginated=False)
def test_security_group_rule_update(self):
self.verify_update(self.proxy.update_security_group_rule,
security_group_rule.SecurityGroupRule)
def test_subnet_create_attrs(self):
self.verify_create(self.proxy.create_subnet, subnet.Subnet)

View File

@ -39,7 +39,7 @@ class TestSecurityGroupRule(testtools.TestCase):
self.assertEqual('network', sot.service.service_type)
self.assertTrue(sot.allow_create)
self.assertTrue(sot.allow_retrieve)
self.assertTrue(sot.allow_update)
self.assertFalse(sot.allow_update)
self.assertTrue(sot.allow_delete)
self.assertTrue(sot.allow_list)