summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--requirements.txt1
-rw-r--r--snaps/openstack/create_router.py10
2 files changed, 4 insertions, 7 deletions
diff --git a/requirements.txt b/requirements.txt
index 91e67e6..5139ae7 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -13,4 +13,3 @@ 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 441b21a..0b93359 100644
--- a/snaps/openstack/create_router.py
+++ b/snaps/openstack/create_router.py
@@ -14,8 +14,6 @@
# limitations under the License.
import logging
-import six
-
from neutronclient.common.exceptions import NotFound, Unauthorized
from snaps.config.router import RouterConfig
@@ -151,10 +149,6 @@ class OpenStackRouter(OpenStackNetworkObject):
:param sub_config:
:return:
"""
- if isinstance(sub_config, six.text_type):
- return neutron_utils.get_subnet_by_name(
- self._neutron, self._keystone,
- subnet_name=sub_config)
if isinstance(sub_config, dict):
sub_dict = sub_config['subnet']
network = neutron_utils.get_network(
@@ -165,6 +159,10 @@ class OpenStackRouter(OpenStackNetworkObject):
return neutron_utils.get_subnet(
self._neutron, network,
subnet_name=sub_dict['subnet_name'])
+ else:
+ return neutron_utils.get_subnet_by_name(
+ self._neutron, self._keystone,
+ subnet_name=sub_config)
def clean(self):
"""