[CORD-2453]
Remove docker connection used with old TOSCA engine from platform-install
Change-Id: Id39121bb4f77c38b692b61abc9071e41c050adc0
diff --git a/add-bootstrap-containers-playbook.yml b/add-bootstrap-containers-playbook.yml
deleted file mode 100644
index 620755c..0000000
--- a/add-bootstrap-containers-playbook.yml
+++ /dev/null
@@ -1,24 +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.
-
-
----
-# add-bootstrap-containers-playbook.yml
-
-- name: Add bootstrapped containers to inventory
- hosts: head
- roles:
- - xos-bootstrap-hosts
-
diff --git a/add-onboard-containers-playbook.yml b/add-onboard-containers-playbook.yml
deleted file mode 100644
index 0d95e19..0000000
--- a/add-onboard-containers-playbook.yml
+++ /dev/null
@@ -1,23 +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.
-
-
----
-# add-onboard-containers-playbook.yml
-
-- name: Add onboarded containers to inventory
- hosts: head
- roles:
- - xos-onboard-hosts
diff --git a/ecord-test-subscriber-playbook.yml b/ecord-test-subscriber-playbook.yml
index 5b7372d..f8451de 100644
--- a/ecord-test-subscriber-playbook.yml
+++ b/ecord-test-subscriber-playbook.yml
@@ -1,4 +1,4 @@
-
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,21 +13,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
----
-# pod-test-playbook.yml
-# Tests CiaB cord-pod XOS configuration
+# ecord-test-subscriber-playbook.yml
+# Configures and enables an E-CORD subscriber
- name: Create test subscriber
hosts: head
roles:
- test-ecord-subscriber-config
-- include: add-onboard-containers-playbook.yml
-
- name: Enable the test subscriber
- hosts: xos_ui
- connection: docker
+ hosts: head
roles:
- test-ecord-subscriber-enable
diff --git a/mock-ecord-container-test.yml b/mock-ecord-container-test.yml
deleted file mode 100644
index b666769..0000000
--- a/mock-ecord-container-test.yml
+++ /dev/null
@@ -1,101 +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.
-
-
----
-# mock-ecord xos container sanity tests
-
-- name: Add xos onboarded containers to inventory to test
- hosts: head
- roles:
- - xos-onboard-test-hosts
-
-- name: Check UI Container
- hosts: xos-ui
- connection: docker
- roles:
- - xos-container-test-ui
-
-- name: Check GUI Container
- hosts: xos-spa-gui
- connection: docker
- roles:
- - xos-container-test-spa-gui
-
-- name: Check REST GW Container
- hosts: xos-rest-gateway
- connection: docker
- roles:
- - xos-container-test-restgw
-
-- name: Check Chameleon Container
- hosts: xos_chameleon
- connection: docker
- roles:
- - xos-container-test-chameleon
-
-- name: Check XOS Core Synchronizer Container
- hosts: xos_core
- connection: docker
- roles:
- - xos-container-test-core
-
-- name: Check XOS ONOS Synchronizer Container
- hosts: xos_onos_synchronizer
- connection: docker
- roles:
- - xos-container-test-onos
-
-- name: Check XOS OPENSTACK Synchronizer Container
- hosts: xos_openstack_synchronizer
- connection: docker
- roles:
- - xos-container-test-openstack
-
-- name: Check XOS VTN Synchronizer Container
- hosts: xos_vtn_synchronizer
- connection: docker
- roles:
- - xos-container-test-vtn
-
-- name: Check XOS Fabric Synchronizer Container
- hosts: xos_fabric_synchronizer
- connection: docker
- roles:
- - xos-container-test-fabric
-
-- name: Check XOS VROUTER Synchronizer Container
- hosts: xos_vrouter_synchronizer
- connection: docker
- roles:
- - xos-container-test-vrouter
-
-- name: Check XOS VEG Synchronizer Container
- hosts: xos_veg_synchronizer
- connection: docker
- roles:
- - xos-container-test-veg
-
-- name: Check XOS VNOD Synchronizer Container
- hosts: xos_vnod_synchronizer
- connection: docker
- roles:
- - xos-container-test-vnod
-
-- name: Check XOS VEE Synchronizer Container
- hosts: xos_vee_synchronizer
- connection: docker
- roles:
- - xos-container-test-vee
diff --git a/mock-rcord-container-test.yml b/mock-rcord-container-test.yml
deleted file mode 100644
index 7db60fb..0000000
--- a/mock-rcord-container-test.yml
+++ /dev/null
@@ -1,85 +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.
-
-
----
-# mock-rcord xos container sanity tests
-
-#- include: "{{ playbook_dir }}/add-onboard-containers-playbook.yml"
-
-- name: Add xos onboarded containers to inventory to test
- hosts: head
- roles:
- - xos-onboard-test-hosts
-
-- name: Check UI Container
- hosts: xos-ui
- connection: docker
- roles:
- - xos-container-test-ui
-
-- name: Check GUI Container
- hosts: xos-spa-gui
- connection: docker
- roles:
- - xos-container-test-spa-gui
-
-- name: Check REST GW Container
- hosts: xos-rest-gateway
- connection: docker
- roles:
- - xos-container-test-restgw
-
-- name: Check Chameleon Container
- hosts: xos_chameleon
- connection: docker
- roles:
- - xos-container-test-chameleon
-
-- name: Check XOS Core Synchronizer Container
- hosts: xos_core
- connection: docker
- roles:
- - xos-container-test-core
-
-- name: Check XOS ONOS Synchronizer Container
- hosts: xos_onos_synchronizer
- connection: docker
- roles:
- - xos-container-test-onos
-
-- name: Check XOS Fabric Synchronizer Container
- hosts: xos_fabric_synchronizer
- connection: docker
- roles:
- - xos-container-test-fabric
-
-- name: Check XOS VROUTER Synchronizer Container
- hosts: xos_vrouter_synchronizer
- connection: docker
- roles:
- - xos-container-test-vrouter
-
-- name: Check XOS VSG Synchronizer Container
- hosts: xos_vsg_synchronizer
- connection: docker
- roles:
- - xos-container-test-vsg
-
-- name: Check XOS VTR Synchronizer Container
- hosts: xos_vtr_synchronizer
- connection: docker
- roles:
- - xos-container-test-vtr
diff --git a/onboard-openstack-playbook.yml b/onboard-openstack-playbook.yml
index 60b9aa8..6153779 100644
--- a/onboard-openstack-playbook.yml
+++ b/onboard-openstack-playbook.yml
@@ -21,11 +21,8 @@
roles:
- xos-ready
-- include: add-onboard-containers-playbook.yml
-
-- name: Enable compute nodes
- hosts: xos_ui
- connection: docker
+- name: Enable Compute Node
+ hosts: head
roles:
- compute-node-enable
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 }}"
-
diff --git a/xos-container-test.yml b/xos-container-test.yml
deleted file mode 100644
index bf342f7..0000000
--- a/xos-container-test.yml
+++ /dev/null
@@ -1,194 +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.
-
----
-
-- name: Add xos onboarded containers to inventory to test
- hosts: head
- roles:
- - xos-onboard-hosts
- tags:
- - rcord
- - ecord
- - ecord-global
- - mcord
-
-- name: Check UI Container
- hosts: xos_ui
- connection: docker
- roles:
- - xos-container-test-ui
- tags:
- - rcord
- - ecord
- - ecord-global
- - mcord
-
-- name: Check Chameleon Container
- hosts: xos_chameleon
- connection: docker
- roles:
- - xos-container-test-chameleon
- tags:
- - rcord
- - ecord
- - ecord-global
- - mcord
-
-- name: Check XOS Core Container
- hosts: xos_core
- connection: docker
- roles:
- - xos-container-test-core
- tags:
- - rcord
- - ecord
- - ecord-global
- - mcord
-
-- name: Check XOS WS Container
- hosts: xos_ws
- connection: docker
- roles:
- - xos-container-test-ws
- tags:
- - rcord
- - ecord
- - ecord-global
-
-- name: Check XOS DB Container
- hosts: xos_db
- connection: docker
- roles:
- - xos-container-test-postgres
- tags:
- - rcord
- - ecord
- - ecord-global
- - mcord
-
-- name: Check XOS Openstack Synchronizer Container
- hosts: openstack-synchronizer
- connection: docker
- roles:
- - xos-container-test-openstack
- tags:
- - rcord
- - ecord
- - ecord-global
- - mcord
-
-- name: Check XOS ONOS Synchronizer Container
- hosts: onos-synchronizer
- connection: docker
- roles:
- - xos-container-test-onos
- tags:
- - rcord
- - ecord
- - ecord-global
- - mcord
-
-- name: Check XOS Fabric Synchronizer Container
- hosts: fabric-synchronizer
- connection: docker
- roles:
- - xos-container-test-fabric
- tags:
- - rcord
- - ecord
- - ecord-global
- - mcord
-
-- name: Check XOS VROUTER Synchronizer Container
- hosts: vrouter-synchronizer
- connection: docker
- roles:
- - xos-container-test-vrouter
- tags:
- - rcord
- - ecord
-
-- name: Check XOS VOLT Synchronizer Container
- hosts: volt-synchronizer
- connection: docker
- roles:
- - xos-container-test-volt
- tags:
- - rcord
-
-- name: Check XOS VSG Synchronizer Container
- hosts: vsg-synchronizer
- connection: docker
- roles:
- - xos-container-test-vsg
- tags:
- - rcord
-
-- name: Check XOS VTR Synchronizer Container
- hosts: vtr-synchronizer
- connection: docker
- roles:
- - xos-container-test-vtr
- tags:
- - rcord
-
-- name: Check XOS AddressManager Synchronizer Container
- hosts: addressmanager-synchronizer
- connection: docker
- roles:
- - xos-container-test-addressmanager
- tags:
- - rcord
-
-- name: Check XOS VTN Synchronizer Container
- hosts: vtn-synchronizer
- connection: docker
- roles:
- - xos-container-test-vtn
- tags:
- - rcord
- - ecord
-
-- name: Check XOS VEG Synchronizer Container
- hosts: veg-synchronizer
- connection: docker
- roles:
- - xos-container-test-veg
- tags:
- - ecord
-
-- name: Check XOS VNOD Synchronizer Container
- hosts: vnod-synchronizer
- connection: docker
- roles:
- - xos-container-test-vnod
- tags:
- - ecord
-
-- name: Check XOS VEE Synchronizer Container
- hosts: vee-synchronizer
- connection: docker
- roles:
- - xos-container-test-vee
- tags:
- - ecord
-
-- name: Check XOS VNAAS Synchronizer Container
- hosts: vnaas-synchronizer
- connection: docker
- roles:
- - xos-container-test-vnaas
- tags:
- - ecord-global