ActiveTest Service Creation.
Onboarding is done by running 'make activetest'. fusion.img, qt600.img, vta.img, and vpma.img
should be in the corresponding service_profile's image/ folder in order for images to be
uploaded in glance.
The measurement agents can be created through the different agents tenants. For example, to
create a VPMA tenant, run 'make vpma 1' where '1' can be any numberical identifier for the
tenant to be created.
Measurement agents will automatically register with the fusion controller through the use of
the synchronizer. Furthermore, tests can be orchestrated through XOS by modifying the models
for the vpma agents.
Change-Id: I69bab4b5f771c87126781799217bb36fda478fd3
diff --git a/xos/synchronizer/steps/roles/setup_qt600/tasks/main.yml b/xos/synchronizer/steps/roles/setup_qt600/tasks/main.yml
new file mode 100644
index 0000000..a8ef516
--- /dev/null
+++ b/xos/synchronizer/steps/roles/setup_qt600/tasks/main.yml
@@ -0,0 +1,59 @@
+---
+
+- name: check if work should be done
+ stat: path=/tmp/init_completed
+ register: result
+
+- name: get interface of private_ip
+ register: private_interface
+ shell: |
+ ip addr | awk '/^[0-9]+:/ { sub(/:/,"",$2); iface=$2 } /^[[:space:]]*inet / { split($2, a, "/"); print iface" : "a[1] }' | grep "{{ private_ip }}" | cut -d " " -f 1
+ when: result.stat.exists == False
+
+- name: run vnf-setup
+ shell: vnf-setup --controller-address {{controller_ip}} --controller-port 30500 --test-interface {{ private_interface.stdout }} --enable-single-test-mode
+ when: result.stat.exists == False
+
+- name: rm dhcp cache
+ shell: rm /var/lib/dhcp/dhclient.leases
+ when: result.stat.exists == False
+
+- name: rm test interface from /etc/network/interfaces
+ shell: |
+ sed -i '/{{ private_interface.stdout }}/d' /etc/network/interfaces
+ when: result.stat.exists == False
+
+- name: reset test interface ip
+ shell: ifconfig {{ private_interface.stdout }} 0.0.0.0
+ when: result.stat.exists == False
+
+- name: stop qt services
+ shell: /etc/init.d/vqt_startup stop
+ when: result.stat.exists == False
+
+- name: start apache service
+ shell: /etc/init.d/apache2 start
+ when: result.stat.exists == False
+
+- name: start qt services
+ shell: /etc/init.d/vqt_startup start
+ when: result.stat.exists == False
+
+- name: record task completed
+ shell: echo "done" > /tmp/init_completed
+#
+# - name: run reflector
+# command: python /root/fusion_controller.py --start-reflector --controller-ip "{{ controller_ip }}" --reflector-ip "{{ public_ip }}" --reflector-src-ip "{{ private_ip }}"
+# when: is_reflector
+#
+# - name: run initiator
+# command: python /root/fusion_controller.py --start-initiator --controller-ip "{{ controller_ip }}" --initiator-ip "{{ public_ip }}" --initiator-src-ip "{{ private_ip }}" --reflector-ip "{{ reflector_public_ip }}" --reflector-src-ip "{{ reflector_ip }}"
+# when: is_initiator
+#
+# - name: stop reflector
+# command: python /root/fusion_controller.py --stop-reflector --controller-ip "{{ controller_ip }}"
+# when: is_reflector == False
+#
+# - name: stop initiator
+# command: python /root/fusion_controller.py --stop-initiator --controller-ip "{{ controller_ip }}"
+# when: is_initiator == False