Fix the invalid arguments formatting in exception messages

This is to fix the invalid arguments formatting in exception
messages.

Change-Id: I80faf93252f3c907693f0b5f53fb4e503ef4ce91
This commit is contained in:
zhufl 2020-11-20 10:39:29 +08:00
parent bef15d1bbe
commit 6634be03a7
1 changed files with 3 additions and 3 deletions

View File

@ -98,7 +98,7 @@ class NestedMacvlanPodVIFDriver(nested_vif.NestedPodVIFDriver):
if not ip_addresses:
raise k_exc.IntegrityError(
"Cannot add pair from the "
"allowed_address_pairs of port %s: missing IP address",
"allowed_address_pairs of port %s: missing IP address" %
port.id)
mac = mac_address if mac_address else port.mac_address
@ -111,7 +111,7 @@ class NestedMacvlanPodVIFDriver(nested_vif.NestedPodVIFDriver):
raise k_exc.AllowedAddressAlreadyPresent(
"Pair %s already "
"present in the 'allowed_address_pair' list. This is "
"due to a misconfiguration or a bug", pair)
"due to a misconfiguration or a bug" % str(pair))
else:
LOG.warning(
"A pair with IP %s but different MAC address "
@ -134,7 +134,7 @@ class NestedMacvlanPodVIFDriver(nested_vif.NestedPodVIFDriver):
if not ip_addresses:
raise k_exc.IntegrityError(
"Cannot remove pair from the "
"allowed_address_pairs of port %s: missing IP address",
"allowed_address_pairs of port %s: missing IP address" %
port.id)
mac = mac_address if mac_address else port.mac_address