CORD-229 updated with a fake switch for testing and to latest maas commit

Change-Id: I3a81a7da834db140f5b5eca43d75ee33dad02e35
diff --git a/Vagrantfile b/Vagrantfile
index 007e7e5..c33d952 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -23,27 +23,48 @@
 
   config.vm.define "prod" do |d|
     d.vm.box = "ubuntu/trusty64"
+    d.vm.synced_folder '.', '/vagrant', disable: true
     d.vm.hostname = "prod"
     d.vm.network "private_network", ip: "10.100.198.201"
-    d.vm.network "private_network", ip: "10.6.0.1", virtualbox__intnet: "cord-test-network"
+    d.vm.network "private_network", ip: "10.1.0.1", virtualbox__intnet: "cord-test-network"
     d.vm.provider "virtualbox" do |v|
       v.memory = 2048
     end
   end
 
-  config.vm.define "computenode" do |c|
-    c.vm.box = "clink15/pxe"
-    c.vm.synced_folder '.', '/vagrant', disable: true
-    c.vm.communicator = "none"
-    c.vm.hostname = "computenode"
-    c.vm.network "private_network",
-    adapter: "1",
-    type: "dhcp",
-    auto_config: false,
-    virtualbox__intnet: "cord-test-network"
-    c.vm.provider "virtualbox" do |v|
+  config.vm.define "switch" do |s|
+    s.vm.box = "ubuntu/trusty64"
+    s.vm.hostname = "fakeswitch"
+    s.vm.network "private_network", ip: "10.100.198.253"
+    s.vm.network "private_network",
+        type: "dhcp",
+        virtualbox__intnet: "cord-test-network",
+        mac: "cc37ab000001"
+    s.vm.provision :shell, path: "scripts/bootstrap_ansible.sh"
+    s.vm.provision :shell, inline: "PYTHONUNBUFFERED=1 ansible-playbook /cord/ansible/fakeswitch.yml -c local"
+    s.vm.provider "virtualbox" do |v|
       v.memory = 1048
-      v.gui = "true"
+      v.name = "fakeswitch"
+    end
+  end
+
+  (1..3).each do |i|
+    # Defining VM properties
+    config.vm.define "compute_node#{i}" do |c|
+      c.vm.box = "clink15/pxe"
+      c.vm.synced_folder '.', '/vagrant', disable: true
+      c.vm.communicator = "none"
+      c.vm.hostname = "computenode"
+      c.vm.network "private_network",
+        adapter: "1",
+        type: "dhcp",
+        auto_config: false,
+        virtualbox__intnet: "cord-test-network"
+      c.vm.provider "virtualbox" do |v|
+        v.name = "compute_node#{i}"
+        v.memory = 1048
+        v.gui = "true"
+      end
     end
   end
 
diff --git a/ansible/fakeswitch.yml b/ansible/fakeswitch.yml
new file mode 100644
index 0000000..c3d39af
--- /dev/null
+++ b/ansible/fakeswitch.yml
@@ -0,0 +1,6 @@
+- hosts: localhost
+  remote_user: vagrant
+  serial: 1
+  roles:
+    - common
+    - fakeswitch
diff --git a/ansible/roles/fakeswitch/files/persist b/ansible/roles/fakeswitch/files/persist
new file mode 100755
index 0000000..d032e90
--- /dev/null
+++ b/ansible/roles/fakeswitch/files/persist
@@ -0,0 +1,3 @@
+#!/bin/bash
+echo "persist"
+exit 0
diff --git a/ansible/roles/fakeswitch/files/savepersist b/ansible/roles/fakeswitch/files/savepersist
new file mode 100755
index 0000000..50d503b
--- /dev/null
+++ b/ansible/roles/fakeswitch/files/savepersist
@@ -0,0 +1,3 @@
+#!/bin/bash
+echo "savepersist"
+exit 0
diff --git a/ansible/roles/fakeswitch/tasks/main.yml b/ansible/roles/fakeswitch/tasks/main.yml
new file mode 100644
index 0000000..39879e9
--- /dev/null
+++ b/ansible/roles/fakeswitch/tasks/main.yml
@@ -0,0 +1,43 @@
+- name: Ensure Root User
+  become: yes
+  user:
+    name: root
+    password: '$6$o5YKQzd9CIadXU$KPaV6CcDd1XPr4cO.dRnWnMnrZl9mBEM84Pfhp9b1v6fLWHdoQ1gPJ4qa0lGvxpukcWtWtwiZezi3JWisMd4D.'
+
+- name: Ensure Directories
+  become: yes
+  file:
+    path: "{{ item }}"
+    owner: root
+    group: root
+    mode: 0755
+    state: directory
+  with_items:
+    - /mnt/flash2
+    - /etc/accton
+
+- name: Ensure Commands
+  become: yes
+  template:
+    src: files/{{ item }}
+    dest: /usr/bin/{{ item }}
+    owner: root
+    group: root
+    mode: 0755
+  with_items:
+    - persist
+    - savepersist
+
+- name: Ensure Root SSH
+  become: yes
+  lineinfile:
+    dest: "/etc/ssh/sshd_config"
+    regexp: "^PermitRootLogin"
+    line: "PermitRootLogin yes"
+
+- name: Ensure SSH Config
+  become: yes
+  service:
+    name: ssh
+    state: restarted
+  #failed_when: false
diff --git a/components/maas b/components/maas
index 742f085..be58a0d 160000
--- a/components/maas
+++ b/components/maas
@@ -1 +1 @@
-Subproject commit 742f085735725a9a0f089ba367bdf2af73662127
+Subproject commit be58a0d76d9280ebd6c191ffc061cc7f2dafd8f5
diff --git a/config/default.yml b/config/default.yml
index 596138b..0be591e 100644
--- a/config/default.yml
+++ b/config/default.yml
@@ -13,7 +13,7 @@
 
   # Specifies tasks within the head node provisioning not to execute, including:
   #
-  # switch_support -   don't download the switch ONL images as there are no 
+  # switch_support -   don't download the switch ONL images as there are no
   #                    switches in this configuration
   # interface_config - don't update the network configuration of the headnode
   #                    as it is configured by vagrant to the proper settings
@@ -21,16 +21,27 @@
     - 'switch_support'
     - 'interface_config'
 
+  management_ip: '10.1.0.1/24'
+  management_iface: 'eth2'
+  external_iface: 'eth0'
+  management_network: '10.1.0.0/24'
+
   # Specifies the extra settings required for this configuration
   #
   # virtualbox_support - install support for managing virtual box based
   #                      compute nodes
-  extraVars:
-    - 'virtualbox_support=1'
-    - 'external_iface=eth0'
+  virtualbox_support: 1
+  power_helper_user: 'cord'
+
+docker:
+  imageVersion: candidate
 
 otherServers:
   # Specifies the configuration for dynamically added compute nodes
   location: 'http://gerrit.opencord.org/maas'
   rolesPath: 'roles'
   role: 'compute-node'
+  fabric:
+    network: '10.1.1.1/24'
+    range_low: '10.1.1.2'
+    range_high: '10.1.1.253'