- data = {
- "access-lists": {
- "acl": [{
- "type": None,
- "name": list_name
- }],
- "default-action": default_action,
- "mode": None
- }
- }
-
- acl_type = "ietf-access-control-list:{suffix}-acl"
-
- if layer.lower() == "l2":
- data["access-lists"]["mode"] = "l2"
- data["access-lists"]["acl"][0]["type"] = \
- acl_type.format(suffix="eth")
-
- elif layer.lower() in ("l3_ip4", "l3_ip6", "L4"):
+ types = {
+ "ietf": "ietf-access-control-list:{0}-acl",
+ "vpp": "vpp-acl:{0}-acl"}
+ layers = {
+ "l2": {"mode": "l2", "acl_type": types['ietf'].format("eth")},
+ "l3_ip4": {"mode": "l3", "acl_type": types['ietf'].format("ipv4")},
+ "l3_ip6": {"mode": "l3", "acl_type": types['ietf'].format("ipv6")},
+ "mixed": {"mode": mode, "acl_type": types['vpp'].format("mixed")}
+ }
+
+ if layer == "L4":