summaryrefslogtreecommitdiffstats
path: root/testcases/vIMS/CI/clearwater.py
diff options
context:
space:
mode:
authorboucherv <valentin.boucher@orange.com>2015-12-30 08:08:33 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-12-30 08:08:33 +0000
commita90c42e54bbc84dc63db2e58c6366c020fefdad8 (patch)
tree53867e246d8112fe6fb75c4938c330138e6549d0 /testcases/vIMS/CI/clearwater.py
parente250cde1fc43246c3464e0efd35fc5fb1fece561 (diff)
parent80aa17c01f6907199e43b3790c206f7e367d7c78 (diff)
Merge "Update orchestrator (cloudify) version from 3.2 to 3.3"
Diffstat (limited to 'testcases/vIMS/CI/clearwater.py')
-rw-r--r--testcases/vIMS/CI/clearwater.py63
1 files changed, 63 insertions, 0 deletions
diff --git a/testcases/vIMS/CI/clearwater.py b/testcases/vIMS/CI/clearwater.py
new file mode 100644
index 000000000..0456cd231
--- /dev/null
+++ b/testcases/vIMS/CI/clearwater.py
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+# coding: utf8
+#######################################################################
+#
+# Copyright (c) 2015 Orange
+# valentin.boucher@orange.com
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+########################################################################
+import sys, subprocess
+
+class clearwater:
+
+ def __init__(self, inputs={}, orchestrator=None, logger=None):
+ self.config = inputs
+ self.orchestrator = orchestrator
+ self.logger = logger
+ self.deploy = False
+
+ def set_orchestrator(self, orchestrator):
+ self.orchestrator = orchestrator
+
+ def set_flavor_id(self, flavor_id):
+ self.config['flavor_id'] = flavor_id
+
+ def set_image_id(self, image_id):
+ self.config['image_id'] = image_id
+
+ def set_agent_user(self, agent_user):
+ self.config['agent_user'] = agent_user
+
+ def set_external_network_name(self, external_network_name):
+ self.config['external_network_name'] = external_network_name
+
+ def set_public_domain(self, public_domain):
+ self.config['public_domain'] = public_domain
+
+ def deploy_vnf(self, blueprint, bp_name='clearwater', dep_name='clearwater-opnfv'):
+ if self.orchestrator:
+ self.dep_name = dep_name
+ self.orchestrator.download_upload_and_deploy_blueprint(blueprint, self.config, bp_name, dep_name)
+ self.deploy = True
+ else:
+ if self.logger:
+ logger.error("Cloudify manager is down or not provide...")
+
+ def undeploy_vnf(self):
+ if self.orchestrator:
+ if self.deploy:
+ self.deploy = False
+ self.orchestrator.undeploy_deployment(self.dep_name)
+ else:
+ if self.logger:
+ logger.error("Clearwater isn't already deploy...")
+ else:
+ if self.logger:
+ logger.error("Cloudify manager is down or not provide...")
+
+
+