Add delete method in EthernetSwitchACL in RSD 2.1
Change-Id: Iabdc1693fcf6440905b4fbd79b0eab9f43efe929
This commit is contained in:
parent
af3d36dd31
commit
66fa276d41
@ -129,6 +129,10 @@ class EthernetSwitchACL(rsd_lib_base.ResourceBase):
|
||||
|
||||
self._conn.post(target_uri, data=data)
|
||||
|
||||
def delete(self):
|
||||
"""Delete this ACL"""
|
||||
self._conn.delete(self._path)
|
||||
|
||||
@property
|
||||
@utils.cache_it
|
||||
def rules(self):
|
||||
|
@ -138,6 +138,10 @@ class EthernetSwitchACLTestCase(testtools.TestCase):
|
||||
):
|
||||
self.acl_inst.unbind_port("invalid-port")
|
||||
|
||||
def test_delete(self):
|
||||
self.acl_inst.delete()
|
||||
self.acl_inst._conn.delete.assert_called_once_with(self.acl_inst.path)
|
||||
|
||||
def test_acl_rule(self):
|
||||
# | GIVEN |
|
||||
self.conn.get.return_value.json.reset_mock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user