[CORD-2453]
Remove docker connection used with old TOSCA engine from platform-install
Change-Id: Id39121bb4f77c38b692b61abc9071e41c050adc0
diff --git a/roles/test-ecord-subscriber-enable/defaults/main.yml b/roles/test-ecord-subscriber-enable/defaults/main.yml
index 697fc3c..e7f2be1 100644
--- a/roles/test-ecord-subscriber-enable/defaults/main.yml
+++ b/roles/test-ecord-subscriber-enable/defaults/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# test-ecord-subscriber-enable/defaults/main.yml
----
-# ecord-test-subscriber-enable/defaults/main.yml
+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) }}"
+
diff --git a/roles/test-ecord-subscriber-enable/tasks/main.yml b/roles/test-ecord-subscriber-enable/tasks/main.yml
index a7e2674..5630c43 100644
--- a/roles/test-ecord-subscriber-enable/tasks/main.yml
+++ b/roles/test-ecord-subscriber-enable/tasks/main.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,12 +13,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
# test-ecord-subscriber-enable/tasks/main.yml
-- name: Run TOSCA to add test-ecord-subscriber
- command: "python /opt/xos/tosca/run.py {{ xos_admin_user }} /opt/cord_profile/test-ecord-subscriber.yaml"
+- name: Run TOSCA to add E-CORD test-subscriber
+ 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
+ register: result
+ until: result | success
+ retries: 50
+ delay: 5
+ with_items:
+ - "test-ecord-subscriber.yaml"
tags:
- skip_ansible_lint # TOSCA loading should be idempotent
diff --git a/roles/xos-bootstrap-hosts/defaults/main.yml b/roles/xos-bootstrap-hosts/defaults/main.yml
deleted file mode 100644
index 51423ec..0000000
--- a/roles/xos-bootstrap-hosts/defaults/main.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
----
-# xos-bootstrap-hosts/defaults/main.yml
-
-head_cord_profile_dir: "/opt/cord_profile"
-
diff --git a/roles/xos-bootstrap-hosts/tasks/main.yml b/roles/xos-bootstrap-hosts/tasks/main.yml
deleted file mode 100644
index 4cf6568..0000000
--- a/roles/xos-bootstrap-hosts/tasks/main.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
----
-# xos-bootstrap-hosts/tasks/main.yml
-
-- name: Get the Docker container names for bootstrap containers
- docker_service:
- project_name: "{{ cord_profile | regex_replace('\\W','') }}bs"
- project_src: "{{ head_cord_profile_dir }}"
- files: "xos-bootstrap-docker-compose.yaml"
- recreate: never
- register: xos_bootstrap_out
-
-- name: Add the containers to Ansible groups on a per-container type basis
- add_host:
- name: "{{ xos_bootstrap_out.ansible_facts[item].keys() | first }}"
- groups: "{{ item }}"
- ansible_connection: "docker"
- cord_profile: "{{ cord_profile }}"
- ansible_ssh_user: "root"
- with_items: "{{ xos_bootstrap_out.ansible_facts.keys() | list }}"
-
diff --git a/roles/xos-onboard-hosts/defaults/main.yml b/roles/xos-onboard-hosts/defaults/main.yml
deleted file mode 100644
index 4936e54..0000000
--- a/roles/xos-onboard-hosts/defaults/main.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
----
-# xos-onboard-hosts/defaults/main.yml
-
-head_cord_profile_dir: /opt/cord_profile
-
diff --git a/roles/xos-onboard-hosts/tasks/main.yml b/roles/xos-onboard-hosts/tasks/main.yml
deleted file mode 100644
index 2cbe730..0000000
--- a/roles/xos-onboard-hosts/tasks/main.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
----
-# xos-onboard-hosts/tasks/main.yml
-
-- name: Get the Docker container names for onboarded containers
- docker_service:
- project_name: "{{ cord_profile | regex_replace('\\W','') }}"
- project_src: "{{ head_cord_profile_dir }}"
- recreate: never
- register: xos_onboard_out
-
-- name: Add the containers to Ansible groups on a per-container type basis
- add_host:
- name: "{{ xos_onboard_out.ansible_facts[item].keys() | first }}"
- groups: "{{ item }}"
- ansible_connection: "docker"
- cord_profile: "{{ cord_profile }}"
- ansible_ssh_user: "root"
- with_items: "{{ xos_onboard_out.ansible_facts.keys() | list }}"
-