]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Analyze re-raised exceptions in Cisco Plugin
authorPaul Michali <pcm@cisco.com>
Fri, 23 Aug 2013 15:47:24 +0000 (11:47 -0400)
committerPaul Michali <pcm@cisco.com>
Sat, 24 Aug 2013 06:34:43 +0000 (02:34 -0400)
commitcf1af8d282cd549ff554c7e1f5663cd3999d843e
treec38e791b8bf347f2b3fd8726e87cfb69e34e4ecb
parenta34f6f0e868bcd0a22dca4c0879247791c997434
Analyze re-raised exceptions in Cisco Plugin

Checked all cases of re-raised exceptions. In several cases, the exception
was redundant (re-raising the same exception), so the try block and
exception handling was removed.

In one case, exceptions raised from two sources were re-raised with a
a different exception. Instead of doing this, the original exceptions
were changed and the try block and re-raised exception were removed.

In cases where there were database exceptions that were re-raised as
Neutron exceptions, the traceback was left as-is, since it was more
informative to know the higher level source of the issue.

The same was true for the exception mentioned in the bug, where the
original failure was in the ncclient library parsing the configuration
and it would be more descriptive to know that there was a connection
failure or a config failure, that to know the library method.

bug 1213159

Change-Id: Ie334d2548bf651c61e878bf797adaf8c5880eb86
neutron/plugins/cisco/db/n1kv_db_v2.py
neutron/plugins/cisco/network_plugin.py
neutron/plugins/cisco/nexus/cisco_nexus_network_driver_v2.py