summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Kotton <gkotton@vmware.com>2017-06-13 02:43:50 -0700
committergaryk <gkotton@vmware.com>2017-06-13 11:48:15 +0000
commit63dfc1dc61a2587ef919899bf3cfdf46c40e99ec (patch)
treefd90b0fd86b6062d4257a2eeb1ffc5dc6a3ebba6
parentdc1e6b1576640facef38330859ca2f6fdcfab158 (diff)
NSX|V: LOG.exception only when there is an exception
Notes
Notes (review): Code-Review+2: garyk <gkotton@vmware.com> Workflow+1: garyk <gkotton@vmware.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 13 Jun 2017 18:10:52 +0000 Reviewed-on: https://review.openstack.org/473802 Project: openstack/vmware-nsx Branch: refs/heads/stable/newton
-rw-r--r--vmware_nsx/db/nsxv_db.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/vmware_nsx/db/nsxv_db.py b/vmware_nsx/db/nsxv_db.py
index 1d69be3..d713e70 100644
--- a/vmware_nsx/db/nsxv_db.py
+++ b/vmware_nsx/db/nsxv_db.py
@@ -226,10 +226,10 @@ def allocate_edge_vnic(session, edge_id, network_id):
226 binding['network_id'] = network_id 226 binding['network_id'] = network_id
227 session.add(binding) 227 session.add(binding)
228 return binding 228 return binding
229 msg = (_("Failed to allocate one available vnic on edge_id: " 229 msg = (_("Edge VNIC: Failed to allocate one available vnic on edge_id: "
230 ":%(edge_id)s to network_id: %(network_id)s") % 230 ":%(edge_id)s to network_id: %(network_id)s") %
231 {'edge_id': edge_id, 'network_id': network_id}) 231 {'edge_id': edge_id, 'network_id': network_id})
232 LOG.exception(msg) 232 LOG.error(msg)
233 raise nsx_exc.NsxPluginException(err_msg=msg) 233 raise nsx_exc.NsxPluginException(err_msg=msg)
234 234
235 235
@@ -260,7 +260,7 @@ def allocate_edge_vnic_with_tunnel_index(session, edge_id, network_id):
260 msg = (_("Failed to allocate one available vnic on edge_id: " 260 msg = (_("Failed to allocate one available vnic on edge_id: "
261 ":%(edge_id)s to network_id: %(network_id)s") % 261 ":%(edge_id)s to network_id: %(network_id)s") %
262 {'edge_id': edge_id, 'network_id': network_id}) 262 {'edge_id': edge_id, 'network_id': network_id})
263 LOG.exception(msg) 263 LOG.error(msg)
264 raise nsx_exc.NsxPluginException(err_msg=msg) 264 raise nsx_exc.NsxPluginException(err_msg=msg)
265 binding['network_id'] = network_id 265 binding['network_id'] = network_id
266 session.add(binding) 266 session.add(binding)