[CORD-2453] Remove the old TOSCA engine (and obsolete roles/playbooks)
Change-Id: I769303b5ddfa6e2a6ffd5bcc08e6e7f3285e7bba
diff --git a/roles/test-subscriber-enable/defaults/main.yml b/roles/test-subscriber-enable/defaults/main.yml
index dd18150..a17a3c7 100644
--- a/roles/test-subscriber-enable/defaults/main.yml
+++ b/roles/test-subscriber-enable/defaults/main.yml
@@ -17,5 +17,11 @@
---
# test-subscriber-enable/defaults/main.yml
-xos_admin_user: "xosadmin@opencord.org"
+xos_tosca_url: "http://xos-tosca/xos-tosca"
+head_credentials_dir: "/opt/credentials"
+
+head_cord_profile_dir: "/opt/cord_profile"
+
+xos_admin_user: "xosadmin@opencord.org"
+head_xos_admin_pass: "{{ lookup('file', head_credentials_dir ~ '/' ~ xos_admin_user) }}"
\ No newline at end of file
diff --git a/roles/test-subscriber-enable/tasks/main.yml b/roles/test-subscriber-enable/tasks/main.yml
index 84d698b..f7c8c67 100644
--- a/roles/test-subscriber-enable/tasks/main.yml
+++ b/roles/test-subscriber-enable/tasks/main.yml
@@ -18,7 +18,15 @@
# test-subscriber-enable/tasks/main.yml
- name: Run TOSCA to add test-subscriber
- command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} /opt/cord_profile/test-subscriber.yaml"
+ uri:
+ url: "{{ xos_tosca_url }}/run"
+ method: POST
+ headers:
+ xos-username: "{{ xos_admin_user }}"
+ xos-password: "{{ head_xos_admin_pass }}"
+ body: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
+ status_code: 200
+ with_items:
+ - "test-subscriber.yaml"
tags:
- skip_ansible_lint # TOSCA loading should be idempotent
-