Add patch method in EthernetSwitchACLRule in RSD 2.1

Change-Id: I5e98ada0bd68c6fa1545ff0d5e8f117a955c7119
This commit is contained in:
HeyIns
2019-04-09 06:27:12 +00:00
parent 9223ccd4ad
commit 7cdaf00432
2 changed files with 28 additions and 0 deletions

View File

@@ -197,6 +197,23 @@ class EthernetSwitchACLRuleTestCase(testtools.TestCase):
# | WHEN & THEN |
self.assertIsInstance(self.acl_rule_inst.mirror_port_region, list)
def test_update(self):
data = {
"RuleId": 1,
"Action": "Permit",
"Condition": {
"IPSource": {
"IPv4Address": "192.168.6.0",
"Mask": "0.0.0.255",
},
},
}
self.acl_rule_inst.update(data)
self.acl_rule_inst._conn.patch.assert_called_once_with(
"/redfish/v1/EthernetSwitches/Switch1/ACLs/ACL1/Rules/Rule1",
data=data,
)
class EthernetSwitchACLRuleCollectionTestCase(testtools.TestCase):
def setUp(self):