summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_router.py
diff options
context:
space:
mode:
authorSteven Pisarski <s.pisarski@cablelabs.com>2018-01-23 16:18:51 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-23 16:18:51 +0000
commit88e9754a4280690acf2ec5942b34336d469673ed (patch)
tree284269828b606e36af90985f579095171cac9aea /snaps/openstack/create_router.py
parent7cf2a28e78404a3835bfde3516d1fb7ff93aa58d (diff)
parent7ea11eada552627b5385a6a347f23fccee484e67 (diff)
Merge "Added password support for SSH and Ansible Additional protections when initializing network resources Enhanced playbook runner variable support"
Diffstat (limited to 'snaps/openstack/create_router.py')
-rw-r--r--snaps/openstack/create_router.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/snaps/openstack/create_router.py b/snaps/openstack/create_router.py
index 4f95c3b..c9ccdd6 100644
--- a/snaps/openstack/create_router.py
+++ b/snaps/openstack/create_router.py
@@ -14,7 +14,7 @@
# limitations under the License.
import logging
-from neutronclient.common.exceptions import NotFound
+from neutronclient.common.exceptions import NotFound, Unauthorized
from snaps.config.router import RouterConfig
from snaps.openstack.openstack_creator import OpenStackNetworkObject
@@ -61,8 +61,12 @@ class OpenStackRouter(OpenStackNetworkObject):
"""
super(self.__class__, self).initialize()
- self.__router = neutron_utils.get_router(
- self._neutron, router_settings=self.router_settings)
+ try:
+ self.__router = neutron_utils.get_router(
+ self._neutron, router_settings=self.router_settings)
+ except Unauthorized as e:
+ logger.warn('Unable to lookup router with name %s - %s',
+ self.router_settings.name, e)
if self.__router:
for internal_subnet_name in self.router_settings.internal_subnets: