summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ci/config_functest.yaml2
-rw-r--r--docker/requirements.pip1
-rw-r--r--docs/release-notes/functest-release.rst7
-rwxr-xr-xtestcases/features/copper.py16
-rwxr-xr-xtestcases/security_scan/security_scan.py13
-rw-r--r--testcases/vnf/vIMS/orchestrator.py2
-rwxr-xr-xtestcases/vnf/vRNC/parser.py15
-rw-r--r--utils/functest_utils.py15
-rwxr-xr-xutils/openstack_clean.py11
-rwxr-xr-xutils/openstack_utils.py7
10 files changed, 64 insertions, 25 deletions
diff --git a/ci/config_functest.yaml b/ci/config_functest.yaml
index e58fcea1a..2b3317a1b 100644
--- a/ci/config_functest.yaml
+++ b/ci/config_functest.yaml
@@ -170,7 +170,7 @@ promise:
image_name: promise-img
flavor_name: promise-flavor
flavor_vcpus: 1
- flavor_ram: 512
+ flavor_ram: 128
flavor_disk: 0
network_name: promise-net
subnet_name: promise-subnet
diff --git a/docker/requirements.pip b/docker/requirements.pip
index 25ec795f3..7ba1a350c 100644
--- a/docker/requirements.pip
+++ b/docker/requirements.pip
@@ -11,6 +11,7 @@ pyyaml==3.10
gitpython==1.0.1
python-openstackclient==2.3.0
python-ceilometerclient==1.5.1
+python-keystoneclient==2.3.1
virtualenv==1.11.4
pexpect==4.0
requests==2.8.0
diff --git a/docs/release-notes/functest-release.rst b/docs/release-notes/functest-release.rst
index 6ebab22a7..9623b43d4 100644
--- a/docs/release-notes/functest-release.rst
+++ b/docs/release-notes/functest-release.rst
@@ -242,6 +242,13 @@ Colorado known restrictions/issues
| | | metadata service excluded from onos scenarios|
| | | https://gerrit.opnfv.org/gerrit/#/c/18729/ |
+-----------+-----------+----------------------------------------------+
+| any | odl_l3-* | Tempest cases related to using floating IP |
+| | | addresses fail because of a known ODL bug. |
+| | | vPing_ssh test case is excluded for the same |
+| | | reason. |
+| | | https://jira.opnfv.org/browse/APEX-112 |
+| | | https://jira.opnfv.org/browse/FUNCTEST-445 |
++-----------+-----------+----------------------------------------------+
| apex/fuel | *-bgpvpn | vPing_ssh (floating ips not supported) and |
| | | vIMS excluded. Some Tempest cases related to |
| | | floating ips also excluded. |
diff --git a/testcases/features/copper.py b/testcases/features/copper.py
index b1df99a52..50319d965 100755
--- a/testcases/features/copper.py
+++ b/testcases/features/copper.py
@@ -14,23 +14,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+import argparse
import sys
import time
-import argparse
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as functest_utils
+
parser = argparse.ArgumentParser()
parser.add_argument("-r", "--report",
help="Create json result file",
action="store_true")
args = parser.parse_args()
-functest_yaml = functest_utils.get_functest_yaml()
-
-dirs = functest_yaml.get('general').get('directories')
-COPPER_REPO = dirs.get('dir_repo_copper')
+COPPER_REPO = functest_utils.get_parameter_from_yaml(
+ 'general.directories.dir_repo_copper')
+RESULTS_DIR = functest_utils.get_parameter_from_yaml(
+ 'general.directories.dir_results')
logger = ft_logger.Logger("copper").getLogger()
@@ -40,7 +41,10 @@ def main():
start_time = time.time()
- ret_val = functest_utils.execute_command(cmd, exit_on_error=False)
+ log_file = RESULTS_DIR + "/copper.log"
+ ret_val = functest_utils.execute_command(cmd,
+ exit_on_error=False,
+ output_file=log_file)
stop_time = time.time()
duration = round(stop_time - start_time, 1)
diff --git a/testcases/security_scan/security_scan.py b/testcases/security_scan/security_scan.py
index 7b9250215..ac7b78ed6 100755
--- a/testcases/security_scan/security_scan.py
+++ b/testcases/security_scan/security_scan.py
@@ -12,18 +12,19 @@
# nominated node. Post scan a report is downloaded and if '--clean' is passed
# all trace of the scan is removed from the remote system.
+
+import argparse
+import connect
import datetime
import os
import sys
-from ConfigParser import SafeConfigParser
-import argparse
+from ConfigParser import SafeConfigParser
from functest.utils.functest_utils import FUNCTEST_REPO as FUNCTEST_REPO
from keystoneclient import session
from keystoneclient.auth.identity import v2
from novaclient import client
-import connect
__version__ = 0.1
__author__ = 'Luke Hinds (lhinds@redhat.com)'
@@ -80,16 +81,16 @@ def run_tests(host, nodetype):
connect.logger.info("Internet Connection OK.")
connect.logger.info("Creating temp file structure..")
createfiles(host, port, user, localkey)
- connect.logger.info("Installing OpenSCAP...")
+ connect.logger.debug("Installing OpenSCAP...")
install_pkg(host, port, user, localkey)
- connect.logger.info("Running scan...")
+ connect.logger.debug("Running scan...")
run_scanner(host, port, user, localkey, nodetype)
clean = cfgparse.get(nodetype, 'clean')
connect.logger.info("Post installation tasks....")
post_tasks(host, port, user, localkey, nodetype)
if clean:
connect.logger.info("Cleaning down environment....")
- connect.logger.info("Removing OpenSCAP....")
+ connect.logger.debug("Removing OpenSCAP....")
removepkg(host, port, user, localkey, nodetype)
connect.logger.info("Deleting tmp file and reports (remote)...")
cleandir(host, port, user, localkey, nodetype)
diff --git a/testcases/vnf/vIMS/orchestrator.py b/testcases/vnf/vIMS/orchestrator.py
index 3e5117ffd..61157a4fb 100644
--- a/testcases/vnf/vIMS/orchestrator.py
+++ b/testcases/vnf/vIMS/orchestrator.py
@@ -188,7 +188,7 @@ class orchestrator:
except:
self.logger.error("Clearwater undeployment failed")
- def _download_blueprints(blueprint_url, branch, dest_path):
+ def _download_blueprints(self, blueprint_url, branch, dest_path):
if os.path.exists(dest_path):
shutil.rmtree(dest_path)
try:
diff --git a/testcases/vnf/vRNC/parser.py b/testcases/vnf/vRNC/parser.py
index 37e84d87c..5ff207c14 100755
--- a/testcases/vnf/vRNC/parser.py
+++ b/testcases/vnf/vRNC/parser.py
@@ -14,22 +14,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+import argparse
import time
-import argparse
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as functest_utils
+
parser = argparse.ArgumentParser()
parser.add_argument("-r", "--report",
help="Create json result file",
action="store_true")
args = parser.parse_args()
-functest_yaml = functest_utils.get_functest_yaml()
-
-dirs = functest_yaml.get('general').get('directories')
-PARSER_REPO = dirs.get('dir_repo_parser')
+PARSER_REPO = functest_utils.get_parameter_from_yaml(
+ 'general.directories.dir_repo_parser')
+RESULTS_DIR = functest_utils.get_parameter_from_yaml(
+ 'general.directories.dir_results')
logger = ft_logger.Logger("parser").getLogger()
@@ -40,9 +41,11 @@ def main():
cmd = 'cd %s/tests && ./functest_run.sh' % PARSER_REPO
start_time = time.time()
+ log_file = RESULTS_DIR + "/parser.log"
ret = functest_utils.execute_command(cmd,
info=True,
- exit_on_error=False)
+ exit_on_error=False,
+ output_file=log_file)
stop_time = time.time()
status, details = functest_utils.check_test_result(project,
diff --git a/utils/functest_utils.py b/utils/functest_utils.py
index 8c5dd835a..644ad1a1b 100644
--- a/utils/functest_utils.py
+++ b/utils/functest_utils.py
@@ -294,7 +294,7 @@ def get_ci_envvars():
def execute_command(cmd, exit_on_error=True, info=False, error_msg="",
- verbose=True):
+ verbose=True, output_file=None):
if not error_msg:
error_msg = ("The command '%s' failed." % cmd)
msg_exec = ("Executing command: '%s'" % cmd)
@@ -305,10 +305,17 @@ def execute_command(cmd, exit_on_error=True, info=False, error_msg="",
logger.debug(msg_exec)
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
+ if output_file:
+ f = open(output_file, "w")
for line in iter(p.stdout.readline, b''):
- line = line.replace('\n', '')
- print line
- sys.stdout.flush()
+ if output_file:
+ f.write(line)
+ else:
+ line = line.replace('\n', '')
+ print line
+ sys.stdout.flush()
+ if output_file:
+ f.close()
p.stdout.close()
returncode = p.wait()
if returncode != 0:
diff --git a/utils/openstack_clean.py b/utils/openstack_clean.py
index 8e7dee8fb..ef26be1f3 100755
--- a/utils/openstack_clean.py
+++ b/utils/openstack_clean.py
@@ -202,9 +202,20 @@ def remove_networks(neutron_client, default_networks, default_routers):
else:
remove_routers(neutron_client, routers, default_routers)
+ # trozet: wait for Neutron to auto-cleanup HA networks when HA router is
+ # deleted
+ time.sleep(5)
+
# remove networks
if network_ids is not None:
for net_id in network_ids:
+ networks = os_utils.get_network_list(neutron_client)
+ if networks is None:
+ logger.debug("No networks left to remove")
+ break
+ elif not any(network['id'] == net_id for network in networks):
+ logger.debug("Network %s has already been removed" % net_id)
+ continue
logger.debug("Removing network %s ..." % net_id)
if os_utils.delete_neutron_net(neutron_client, net_id):
logger.debug(" > Done!")
diff --git a/utils/openstack_utils.py b/utils/openstack_utils.py
index bc718bb2b..ff9b54a58 100755
--- a/utils/openstack_utils.py
+++ b/utils/openstack_utils.py
@@ -705,6 +705,11 @@ def create_network_association(neutron_client, bgpvpn_id, neutron_network_id):
return neutron_client.create_network_association(bgpvpn_id, json_body)
+def create_router_association(neutron_client, bgpvpn_id, router_id):
+ json_body = {"router_association": {"router_id": router_id}}
+ return neutron_client.create_router_association(bgpvpn_id, json_body)
+
+
def update_bgpvpn(neutron_client, bgpvpn_id, **kwargs):
json_body = {"bgpvpn": kwargs}
return neutron_client.update_bgpvpn(bgpvpn_id, json_body)
@@ -1077,7 +1082,7 @@ def create_tenant(keystone_client, tenant_name, tenant_description):
enabled=True)
return tenant.id
except Exception, e:
- logger.error("Error [create_tenant(cinder_client, '%s', '%s')]: %s"
+ logger.error("Error [create_tenant(keystone_client, '%s', '%s')]: %s"
% (tenant_name, tenant_description, e))
return None