From 97dde581982b9d49122aee3630328fb6064c8609 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Mon, 11 Feb 2019 06:45:34 +0100 Subject: Update and enable Cloudify-based testcases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It switches from the Cloudify virtual machine to the community container which allows deploying vyos_vrouter and cloudify_ims. Last stable Cloudify OpenStack plugin (2.4.17) is now deployed. It also updates the Cloudify python package to latest release. It adds a delay before deleting the blueprint which may be improved in a second change (it allows enabling the testcase in the stable release). Change-Id: Ie48a2c9d2badab0d7ba0b9e7845f453fad335ef7 Signed-off-by: Cédric Ollivier --- functest/core/cloudify.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'functest/core') diff --git a/functest/core/cloudify.py b/functest/core/cloudify.py index d9b3398e3..ac8e26743 100644 --- a/functest/core/cloudify.py +++ b/functest/core/cloudify.py @@ -27,15 +27,17 @@ class Cloudify(singlevm.SingleVm2): __logger = logging.getLogger(__name__) filename = ('/home/opnfv/functest/images/' - 'cloudify-manager-community-18.10.4.qcow2') + 'ubuntu-16.04-server-cloudimg-amd64-disk1.img') flavor_ram = 4096 flavor_vcpus = 2 flavor_disk = 40 - username = 'centos' + username = 'ubuntu' ssh_connect_loops = 12 create_server_timeout = 600 ports = [80, 443, 5671, 53333] + cloudify_container = "cloudifyplatform/community:19.01.24" + def __init__(self, **kwargs): """Initialize Cloudify testcase object.""" if "case_name" not in kwargs: @@ -54,10 +56,20 @@ class Cloudify(singlevm.SingleVm2): """ Deploy Cloudify Manager. """ + (_, stdout, stderr) = self.ssh.exec_command( + "sudo wget https://get.docker.com/ -O script.sh && " + "sudo chmod +x script.sh && " + "sudo ./script.sh && " + "sudo docker run --name cfy_manager_local -d " + "--restart unless-stopped -v /sys/fs/cgroup:/sys/fs/cgroup:ro " + "--tmpfs /run --tmpfs /run/lock --security-opt seccomp:unconfined " + "--cap-add SYS_ADMIN --network=host {}".format( + self.cloudify_container)) + self.__logger.debug("output:\n%s", stdout.read()) + self.__logger.debug("error:\n%s", stderr.read()) self.cfy_client = CloudifyClient( host=self.fip.floating_ip_address, - username='admin', password='admin', tenant='default_tenant', - api_version='v3') + username='admin', password='admin', tenant='default_tenant') self.__logger.info("Attemps running status of the Manager") secret_key = "foo" secret_value = "bar" -- cgit 1.2.3-korg