Collapse the error messages to force consistency
This commit is contained in:
@ -381,18 +381,20 @@ class VPPApi:
|
|||||||
self.logger.warning(
|
self.logger.warning(
|
||||||
f"MPLS state retrieval requires https://gerrit.fd.io/r/c/vpp/+/39022"
|
f"MPLS state retrieval requires https://gerrit.fd.io/r/c/vpp/+/39022"
|
||||||
)
|
)
|
||||||
=======
|
|
||||||
self.logger.debug("Retrieving ACLs")
|
try:
|
||||||
api_response = self.vpp.api.acl_dump(acl_index=0xFFFFFFFF)
|
self.logger.debug("Retrieving ACLs")
|
||||||
for acl in api_response:
|
api_response = self.vpp.api.acl_dump(acl_index=0xFFFFFFFF)
|
||||||
self.cache["acls"][acl.acl_index] = acl
|
for acl in api_response:
|
||||||
if acl.tag in self.cache["acl_tags"]:
|
self.cache["acls"][acl.acl_index] = acl
|
||||||
self.logger.error(
|
if acl.tag in self.cache["acl_tags"]:
|
||||||
f"Duplicate ACL tag '{acl.tag}' found - cannot safely preoceed, bailing"
|
self.logger.error(
|
||||||
)
|
f"Duplicate ACL tag '{acl.tag}' found - cannot safely preoceed, bailing"
|
||||||
return False
|
)
|
||||||
self.cache["acl_tags"][acl.tag] = acl.acl_index
|
return False
|
||||||
>>>>>>> ace08ac (Refuse to work with ACLs if there are duplicate tags -- it means something/somebody has been inserting them outside of vppcfg, and this breaks the requirement that vppcfg.acls. is the same uniquely identified vpp.acl.tag)
|
self.cache["acl_tags"][acl.tag] = acl.acl_index
|
||||||
|
except AttributeError as err:
|
||||||
|
self.logger.warning(f"ACL API not found - missing plugin: {err}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.logger.debug("Retrieving ACLs")
|
self.logger.debug("Retrieving ACLs")
|
||||||
|
Reference in New Issue
Block a user