diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-02-11 06:45:34 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-02-11 16:02:59 +0100 |
commit | c7dfec04018cd720a49a665026d1864f1914a1a6 (patch) | |
tree | 5a33023a771bce9ee697cc41f729a2b22ade590c /functest/core/cloudify.py | |
parent | 314faf01ac0da194088f5a821927f033026f17f0 (diff) |
Update and enable Cloudify-based testcases
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 <cedric.ollivier@orange.com>
(cherry picked from commit 97dde581982b9d49122aee3630328fb6064c8609)
Diffstat (limited to 'functest/core/cloudify.py')
-rw-r--r-- | functest/core/cloudify.py | 20 |
1 files changed, 16 insertions, 4 deletions
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" |