Reformat
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
""" module to help locate unittest resources """
|
""" module to help locate unittest resources """
|
||||||
|
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 Ray Kinsella
|
# Copyright (c) 2022 Ray Kinsella
|
||||||
|
@ -291,9 +291,9 @@ class Dumper(VPPApi):
|
|||||||
acl_rule.srcport_or_icmptype_first
|
acl_rule.srcport_or_icmptype_first
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
config_term[
|
config_term["icmp-type"] = (
|
||||||
"icmp-type"
|
f"{acl_rule.srcport_or_icmptype_first}-{maxval}"
|
||||||
] = f"{acl_rule.srcport_or_icmptype_first}-{maxval}"
|
)
|
||||||
|
|
||||||
maxval = acl_rule.dstport_or_icmpcode_last
|
maxval = acl_rule.dstport_or_icmpcode_last
|
||||||
if maxval > 255:
|
if maxval > 255:
|
||||||
@ -306,9 +306,9 @@ class Dumper(VPPApi):
|
|||||||
acl_rule.dstport_or_icmpcode_first
|
acl_rule.dstport_or_icmpcode_first
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
config_term[
|
config_term["icmp-code"] = (
|
||||||
"icmp-code"
|
f"{acl_rule.dstport_or_icmpcode_first}-{maxval}"
|
||||||
] = f"{acl_rule.dstport_or_icmpcode_first}-{maxval}"
|
)
|
||||||
elif acl_rule.proto in [6, 17]:
|
elif acl_rule.proto in [6, 17]:
|
||||||
if acl_rule.proto == 6:
|
if acl_rule.proto == 6:
|
||||||
config_term["protocol"] = "tcp"
|
config_term["protocol"] = "tcp"
|
||||||
@ -322,9 +322,9 @@ class Dumper(VPPApi):
|
|||||||
acl_rule.srcport_or_icmptype_first
|
acl_rule.srcport_or_icmptype_first
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
config_term[
|
config_term["source-port"] = (
|
||||||
"source-port"
|
f"{acl_rule.srcport_or_icmptype_first}-{acl_rule.srcport_or_icmptype_last}"
|
||||||
] = f"{acl_rule.srcport_or_icmptype_first}-{acl_rule.srcport_or_icmptype_last}"
|
)
|
||||||
if (
|
if (
|
||||||
acl_rule.dstport_or_icmpcode_first
|
acl_rule.dstport_or_icmpcode_first
|
||||||
== acl_rule.dstport_or_icmpcode_last
|
== acl_rule.dstport_or_icmpcode_last
|
||||||
@ -333,9 +333,9 @@ class Dumper(VPPApi):
|
|||||||
acl_rule.dstport_or_icmpcode_first
|
acl_rule.dstport_or_icmpcode_first
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
config_term[
|
config_term["destination-port"] = (
|
||||||
"destination-port"
|
f"{acl_rule.dstport_or_icmpcode_first}-{acl_rule.dstport_or_icmpcode_last}"
|
||||||
] = f"{acl_rule.dstport_or_icmpcode_first}-{acl_rule.dstport_or_icmpcode_last}"
|
)
|
||||||
else:
|
else:
|
||||||
config_term["protocol"] = int(acl_rule.proto)
|
config_term["protocol"] = int(acl_rule.proto)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user