summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Pisarski <s.pisarski@cablelabs.com>2018-04-23 18:26:23 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-04-23 18:26:23 +0000
commit0e11064b4b5f49ec792784d9032161cbb3b8b023 (patch)
tree275f38befaaabb010e4edef747fbf61f091b8120
parent7f5f1b87cdde0b60cda714eb656d46751b9e2548 (diff)
parent6cd8600b863ba2e5c9a230290302435a9951ce07 (diff)
Merge "Fix NoneType error when creating router"HEADmaster
-rw-r--r--requirements.txt1
-rw-r--r--snaps/openstack/create_router.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/requirements.txt b/requirements.txt
index 5139ae7..91e67e6 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -13,3 +13,4 @@ wrapt>=1.7.0 # BSD License
scp
cryptography>=2.1 # BSD/Apache-2.0
concurrencytest
+six>=1.10.0 # MIT
diff --git a/snaps/openstack/create_router.py b/snaps/openstack/create_router.py
index 260fc03..441b21a 100644
--- a/snaps/openstack/create_router.py
+++ b/snaps/openstack/create_router.py
@@ -14,6 +14,8 @@
# limitations under the License.
import logging
+import six
+
from neutronclient.common.exceptions import NotFound, Unauthorized
from snaps.config.router import RouterConfig
@@ -149,7 +151,7 @@ class OpenStackRouter(OpenStackNetworkObject):
:param sub_config:
:return:
"""
- if isinstance(sub_config, str):
+ if isinstance(sub_config, six.text_type):
return neutron_utils.get_subnet_by_name(
self._neutron, self._keystone,
subnet_name=sub_config)