summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <shuya.nakama@okinawaopenlabs.org>2017-10-10 11:08:40 +0000
committerCédric Ollivier <cedric.ollivier@orange.com>2017-11-30 09:26:31 +0100
commiteb104ac8d30cef77d80d92f5d7eccb3a9a916fa1 (patch)
tree074170929fcfd84ffb1e1f26d0b3ab904f0b21e6
parenta6ef634a1bc7ba1f877f421bfcb7532d9501c045 (diff)
Fix fail of vRouter on Orange POD
1. Functest docker container environment has no attribute 'OS_REGION_NAME' 2. vRouter was get the 'OS_REGION_NAME' but not used it. 3. Deleting use 'OS_REGION_NAME' part of vRouter. 4. Utility lib of vRouter use Nova client. 5. Modifying Nova client authentication step for auth api v3. 6. Doing test of modified vRouter on Orange POD. Change-Id: I062549e5ca48fb4825b53448a4e2ffc8c1f8ec40 Signed-off-by: root <shuya.nakama@okinawaopenlabs.org> (cherry picked from commit 3fa62219bb5a9e928fe94d95314c7c00d5f06e66)
-rw-r--r--docker/vnf/testcases.yaml1
-rw-r--r--functest/ci/testcases.yaml1
-rw-r--r--functest/opnfv_tests/vnf/router/cloudify_vrouter.py3
-rw-r--r--functest/opnfv_tests/vnf/router/test_controller/function_test_exec.py3
-rw-r--r--functest/opnfv_tests/vnf/router/utilvnf.py15
-rw-r--r--functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py3
6 files changed, 11 insertions, 15 deletions
diff --git a/docker/vnf/testcases.yaml b/docker/vnf/testcases.yaml
index d89be6fe3..4117a6583 100644
--- a/docker/vnf/testcases.yaml
+++ b/docker/vnf/testcases.yaml
@@ -51,7 +51,6 @@ tiers:
-
case_name: vyos_vrouter
project_name: functest
- enabled: false
criteria: 100
blocking: false
description: >-
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index c099eb934..3b28b0fb6 100644
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -419,7 +419,6 @@ tiers:
-
case_name: vyos_vrouter
project_name: functest
- enabled: false
criteria: 100
blocking: false
description: >-
diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
index 86362368e..ea09b2112 100644
--- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
+++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
@@ -368,8 +368,7 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase):
credentials = {"username": self.snaps_creds.username,
"password": self.snaps_creds.password,
"auth_url": self.snaps_creds.auth_url,
- "tenant_name": self.snaps_creds.project_name,
- "region_name": os.environ['OS_REGION_NAME']}
+ "tenant_name": self.snaps_creds.project_name}
self.util_info = {"credentials": credentials,
"cfy": cfy_client,
diff --git a/functest/opnfv_tests/vnf/router/test_controller/function_test_exec.py b/functest/opnfv_tests/vnf/router/test_controller/function_test_exec.py
index 236447e0c..9303aecae 100644
--- a/functest/opnfv_tests/vnf/router/test_controller/function_test_exec.py
+++ b/functest/opnfv_tests/vnf/router/test_controller/function_test_exec.py
@@ -40,8 +40,7 @@ class FunctionTestExec(object):
self.util.set_credentials(credentials["username"],
credentials["password"],
credentials["auth_url"],
- credentials["tenant_name"],
- credentials["region_name"])
+ credentials["tenant_name"])
with open(self.util.test_env_config_yaml) as file_fd:
test_env_config_yaml = yaml.safe_load(file_fd)
diff --git a/functest/opnfv_tests/vnf/router/utilvnf.py b/functest/opnfv_tests/vnf/router/utilvnf.py
index 084af3312..c31d6777c 100644
--- a/functest/opnfv_tests/vnf/router/utilvnf.py
+++ b/functest/opnfv_tests/vnf/router/utilvnf.py
@@ -19,8 +19,8 @@ import yaml
from functest.utils.constants import CONST
from git import Repo
from novaclient import client as novaclient
+from keystoneauth1.identity import v3
from keystoneauth1 import session
-from keystoneauth1 import loading
from requests.auth import HTTPBasicAuth
RESULT_SPRIT_INDEX = {
@@ -57,7 +57,6 @@ class Utilvnf(object):
self.password = ""
self.auth_url = ""
self.tenant_name = ""
- self.region_name = ""
data_dir = data_dir = CONST.__getattribute__('dir_router_data')
@@ -116,20 +115,22 @@ class Utilvnf(object):
def get_nova_client(self):
creds = self.get_nova_credentials()
- loader = loading.get_plugin_loader('password')
- auth = loader.load_from_options(**creds)
+ auth = v3.Password(auth_url=creds['auth_url'],
+ username=creds['username'],
+ password=creds['password'],
+ project_name=creds['tenant_name'],
+ user_domain_id='default',
+ project_domain_id='default')
sess = session.Session(auth=auth)
nova_client = novaclient.Client(NOVA_CLIENT_API_VERSION, session=sess)
return nova_client
- def set_credentials(self, username, password, auth_url,
- tenant_name, region_name="RegionOne"):
+ def set_credentials(self, username, password, auth_url, tenant_name):
self.username = username
self.password = password
self.auth_url = auth_url
self.tenant_name = tenant_name
- self.region_name = region_name
def get_nova_credentials(self):
creds = {}
diff --git a/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py b/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
index cd228fe26..50487d1ca 100644
--- a/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
+++ b/functest/opnfv_tests/vnf/router/vnf_controller/vm_controller.py
@@ -35,8 +35,7 @@ class VmController(object):
self.util.set_credentials(credentials["username"],
credentials["password"],
credentials["auth_url"],
- credentials["tenant_name"],
- credentials["region_name"])
+ credentials["tenant_name"])
with open(self.util.test_env_config_yaml) as file_fd:
test_env_config_yaml = yaml.safe_load(file_fd)