Enable configuration of compute node interfaces by MaaS
Move testclient LXC contaner to the head node
Remove simulate-fabric role
Remove maas-simulate-fabric role
Remove onos-load-apps role
Remove test-client-install role (replaced by maas-test-client-install)
Remove single-node-pod.sh (replaced by cord-in-a-box.sh in cord repo)

Change-Id: I0fcf108ab674bb5473556e78a401837c161f5ea9
diff --git a/roles/test-vsg/tasks/main.yml b/roles/test-vsg/tasks/main.yml
index 9eb08a9..10fa0f5 100644
--- a/roles/test-vsg/tasks/main.yml
+++ b/roles/test-vsg/tasks/main.yml
@@ -1,7 +1,7 @@
 ---
 # test-vsg/tasks/main.yml
 #
-# Run tests to check that the single-node deployment has worked
+# Run tests to check that the CORD-in-a-Box deployment has worked.
 
 - name: Create a sample CORD subscriber
   command: ansible xos-1 -u ubuntu -m shell \
@@ -54,16 +54,37 @@
   tags:
     - skip_ansible_lint # running a sub job
 
-- name: Run dhclient inside testclient to get IP address from vSG
-  command: ssh -l ubuntu {{ node_name.stdout }} "sudo lxc-attach -n testclient -- dhclient eth0.222.111"
-  tags:
-    - skip_ansible_lint # running a sub job
+# Specifying this through container_config below was not working...
+- name: set lxc bridge interface
+  become: yes
+  lineinfile:
+    dest: /etc/lxc/default.conf
+    regexp: "^lxc.network.link ="
+    line: "lxc.network.link = {{ fabric_bridge_on_head_node }}"
 
+- name: Create testclient
+  become: yes
+  lxc_container:
+    name: testclient
+    container_log: true
+    template: ubuntu
+    state: started
+    template_options: --release trusty
+    container_command: |
+      ifdown eth0
+      sed -i 's/eth0 inet dhcp/eth0 inet manual/g' /etc/network/interfaces
+      ifup eth0
+      ip link show eth0.222 || ip link add link eth0 name eth0.222 type vlan id 222
+      ip link show eth0.222.111 || ip link add link eth0.222 name eth0.222.111 type vlan id 111
+      ifconfig eth0.222 up
+      ifconfig eth0.222.111 up
+      dhclient eth0.222.111
+
+# Don't use lxc_container so that we can get output
 - name: Test external connectivity in test client
-  command: ssh -l ubuntu {{ node_name.stdout }} "sudo lxc-attach -n testclient -- ping -c 3 8.8.8.8"
+  become: yes
+  command: lxc-attach -n testclient -- ping -c 3 8.8.8.8
   register: pingtest
-  tags:
-    - skip_ansible_lint # running a sub job
 
 - name: Output from ping test
   debug: var=pingtest.stdout_lines