diff options
-rwxr-xr-x | testcases/security_scan/security_scan.py | 13 | ||||
-rw-r--r-- | testcases/vnf/vIMS/orchestrator.py | 2 | ||||
-rwxr-xr-x | utils/openstack_utils.py | 7 |
3 files changed, 14 insertions, 8 deletions
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/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 |