summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/tests
diff options
context:
space:
mode:
Diffstat (limited to 'snaps/openstack/tests')
-rw-r--r--snaps/openstack/tests/create_instance_tests.py4
-rw-r--r--snaps/openstack/tests/openstack_tests.py12
2 files changed, 9 insertions, 7 deletions
diff --git a/snaps/openstack/tests/create_instance_tests.py b/snaps/openstack/tests/create_instance_tests.py
index 55da144..c713794 100644
--- a/snaps/openstack/tests/create_instance_tests.py
+++ b/snaps/openstack/tests/create_instance_tests.py
@@ -20,8 +20,8 @@ import unittest
import uuid
import os
-from neutronclient.common.exceptions import InvalidIpForSubnetClient
-from novaclient.exceptions import BadRequest
+from neutronclient.common.exceptions import (
+ InvalidIpForSubnetClient, BadRequest)
from snaps import file_utils
from snaps.config.flavor import FlavorConfig
diff --git a/snaps/openstack/tests/openstack_tests.py b/snaps/openstack/tests/openstack_tests.py
index a3dec11..3c32eb7 100644
--- a/snaps/openstack/tests/openstack_tests.py
+++ b/snaps/openstack/tests/openstack_tests.py
@@ -15,7 +15,6 @@
import logging
import re
-import pkg_resources
from snaps import file_utils
from snaps.config.image import ImageConfig
from snaps.config.network import NetworkConfig, SubnetConfig
@@ -139,6 +138,10 @@ def get_credentials(os_env_file=None, proxy_settings_str=None,
if overrides and isinstance(overrides, dict):
creds_dict.update(overrides)
+ for key, value in creds_dict.items():
+ if value is not None and isinstance(value, str):
+ creds_dict[key] = value.replace('"', '').replace('\'', '')
+
os_creds = OSCreds(**creds_dict)
logger.info('OS Credentials = %s', os_creds.__str__)
return os_creds
@@ -336,11 +339,10 @@ class OSNetworkConfig:
router_name=None, external_gateway=None,
netconf_override=None):
"""
- :param netconf_override: dict() containing the reconfigured network_type,
- physical_network and segmentation_id
+ :param netconf_override: dict() containing the reconfigured
+ network_type, physical_network and
+ segmentation_id
"""
-
- network_conf = None
if subnet_name and subnet_cidr:
network_conf = NetworkConfig(
name=net_name, subnet_settings=[