summaryrefslogtreecommitdiffstats
path: root/sdnvpn/lib/openstack_utils.py
diff options
context:
space:
mode:
authornikoskarandreas <nick@intracom-telecom.com>2018-11-06 17:31:11 +0200
committernikoskarandreas <nick@intracom-telecom.com>2018-12-11 11:38:24 +0200
commitba1eb0716b966256ed9ff1f160df0422a7b04776 (patch)
treeff1c01211f61c36316e4b34eccc87453e1a72f55 /sdnvpn/lib/openstack_utils.py
parent63ea4922aa8340e2d6ffde0cce3ddff775900f15 (diff)
Using heat orchestrator for sdnvpn - test case 8
Heat orchestrator and the use of Heat Orchestrator Templates is introduced in sdnvpn test cases. The deployment of the nodes and networks under test is performed as a stack with the use of the heat api and the use of the other apis is kept to as little as possible. The scenarios that are executed are the same as in the orginal test cases. This is the implementation of sdnvpn test case 8: Test floating IP and router assoc coexistence JIRA: SDNVPN-219 Change-Id: I8a61d40e9decf4297b8714c93ce77ba05f033b66 Signed-off-by: nikoskarandreas <nick@intracom-telecom.com>
Diffstat (limited to 'sdnvpn/lib/openstack_utils.py')
-rw-r--r--sdnvpn/lib/openstack_utils.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/sdnvpn/lib/openstack_utils.py b/sdnvpn/lib/openstack_utils.py
index d377c33..5fc1e49 100644
--- a/sdnvpn/lib/openstack_utils.py
+++ b/sdnvpn/lib/openstack_utils.py
@@ -1404,15 +1404,6 @@ def delete_user(keystone_client, user_id):
# *********************************************
# HEAT
# *********************************************
-def get_resource(conn, stack_id, resource):
- try:
- resource = conn.orchestration.resources(stack_id, id=resource).next()
- return resource
- except Exception as e:
- logger.error("Error [get_resource(orchestration)]: %s" % e)
- return None
-
-
def create_stack(conn, **kwargs):
try:
stack = conn.orchestration.create_stack(**kwargs)
@@ -1426,6 +1417,15 @@ def create_stack(conn, **kwargs):
return None
+def update_stack(conn, stack_id, **kwargs):
+ try:
+ conn.orchestration.update_stack(stack_id, **kwargs)
+ return True
+ except Exception as e:
+ logger.error("Error [update_stack(orchestration)]: %s" % e)
+ return False
+
+
def delete_stack(conn, stack_id):
try:
conn.orchestration.delete_stack(stack_id)