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:07 +0000
commit7832618c4356d01a8c8113729568807f9a0d8570 (patch)
tree32417fc470f4fcfc178a13f3002c53c0c8dd9595
parenta82b4c59441fc5e9b98e87505a9f87e602d25c47 (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 13:23:45 +0000 Reviewed-on: https://review.openstack.org/473801 Project: openstack/vmware-nsx Branch: refs/heads/stable/ocata
-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 a414eef..28172b7 100644
--- a/vmware_nsx/db/nsxv_db.py
+++ b/vmware_nsx/db/nsxv_db.py
@@ -219,10 +219,10 @@ def allocate_edge_vnic(session, edge_id, network_id):
219 binding['network_id'] = network_id 219 binding['network_id'] = network_id
220 session.add(binding) 220 session.add(binding)
221 return binding 221 return binding
222 msg = (_("Failed to allocate one available vnic on edge_id: " 222 msg = (_("Edge VNIC: Failed to allocate one available vnic on edge_id: "
223 ":%(edge_id)s to network_id: %(network_id)s") % 223 ":%(edge_id)s to network_id: %(network_id)s") %
224 {'edge_id': edge_id, 'network_id': network_id}) 224 {'edge_id': edge_id, 'network_id': network_id})
225 LOG.exception(msg) 225 LOG.error(msg)
226 raise nsx_exc.NsxPluginException(err_msg=msg) 226 raise nsx_exc.NsxPluginException(err_msg=msg)
227 227
228 228
@@ -255,7 +255,7 @@ def allocate_edge_vnic_with_tunnel_index(session, edge_id, network_id,
255 msg = (_("Failed to allocate one available vnic on edge_id: " 255 msg = (_("Failed to allocate one available vnic on edge_id: "
256 ":%(edge_id)s to network_id: %(network_id)s") % 256 ":%(edge_id)s to network_id: %(network_id)s") %
257 {'edge_id': edge_id, 'network_id': network_id}) 257 {'edge_id': edge_id, 'network_id': network_id})
258 LOG.exception(msg) 258 LOG.error(msg)
259 raise nsx_exc.NsxPluginException(err_msg=msg) 259 raise nsx_exc.NsxPluginException(err_msg=msg)
260 binding['network_id'] = network_id 260 binding['network_id'] = network_id
261 session.add(binding) 261 session.add(binding)