Correct log formatting statements
Change-Id: I98d6324c582fad103c25398569db871ebe710af6 Closes-Bug: #1717173
This commit is contained in:
parent
d88fd1008a
commit
06d5c43877
|
@ -496,8 +496,8 @@ class EngineManager(base_manager.BaseEngineManager):
|
|||
server.uuid)
|
||||
except Exception as e:
|
||||
with excutils.save_and_reraise_exception():
|
||||
LOG.exception("Set server power state to %(state) failed, the "
|
||||
"reason: %(reason)s",
|
||||
LOG.exception("Set server power state to %(state)s failed, "
|
||||
"the reason: %(reason)s",
|
||||
{"state": state, "reason": six.text_type(e)})
|
||||
server.power_state = self.driver.get_power_state(context,
|
||||
server.uuid)
|
||||
|
@ -576,7 +576,7 @@ class EngineManager(base_manager.BaseEngineManager):
|
|||
def attach_interface(self, context, server, net_id, port_id):
|
||||
# prepare port to be attached
|
||||
if port_id:
|
||||
LOG.debug("Attaching port %(port_id) to server %(server)s",
|
||||
LOG.debug("Attaching port %(port_id)s to server %(server)s",
|
||||
{'port_id': port_id, 'server': server})
|
||||
try:
|
||||
vif_port = self.network_api.show_port(context, port_id)
|
||||
|
@ -590,7 +590,7 @@ class EngineManager(base_manager.BaseEngineManager):
|
|||
preserve_on_delete = True
|
||||
|
||||
else:
|
||||
LOG.debug("Attaching network interface %(net_id) to server "
|
||||
LOG.debug("Attaching network interface %(net_id)s to server "
|
||||
"%(server)s", {'net_id': net_id, 'server': server})
|
||||
vif_port = self.network_api.create_port(context, net_id,
|
||||
server.uuid)
|
||||
|
@ -643,7 +643,7 @@ class EngineManager(base_manager.BaseEngineManager):
|
|||
|
||||
@wrap_server_fault
|
||||
def detach_interface(self, context, server, port_id):
|
||||
LOG.debug("Detaching interface %(port_id) from server %(server)s",
|
||||
LOG.debug("Detaching interface %(port_id)s from server %(server)s",
|
||||
{'port_id': port_id, 'server': server.uuid})
|
||||
try:
|
||||
db_nic = objects.ServerNic.get_by_port_id(context, port_id)
|
||||
|
|
Loading…
Reference in New Issue