MCPcopy Create free account
hub / github.com/FDio/vpp / apply_rules

Method apply_rules

test/test_acl_plugin.py:211–221  ·  view source on GitHub ↗
(self, rules, tag=None)

Source from the content-addressed store, hash-verified

209 )
210
211 def apply_rules(self, rules, tag=None):
212 acl = VppAcl(self, rules, tag=tag)
213 acl.add_vpp_config()
214 self.logger.info("Dumped ACL: " + str(acl.dump()))
215 # Apply a ACL on the interface as inbound
216 for i in self.pg_interfaces:
217 acl_if = VppAclInterface(
218 self, sw_if_index=i.sw_if_index, n_input=1, acls=[acl]
219 )
220 acl_if.add_vpp_config()
221 return acl.acl_index
222
223 def apply_rules_to(self, rules, tag=None, sw_if_index=INVALID_INDEX):
224 acl = VppAcl(self, rules, tag=tag)

Calls 5

add_vpp_configMethod · 0.95
dumpMethod · 0.95
add_vpp_configMethod · 0.95
VppAclClass · 0.90
VppAclInterfaceClass · 0.90

Tested by

no test coverage detected