Merge "Do not allow security group rule update"
This commit is contained in:
commit
e950fd2d88
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue