CORD-1511 Use OVS instead of CPqD

Change-Id: I89315b9155774f697c3ee0768f318e351fa23b38
diff --git a/Makefile b/Makefile
index 9a0035c..5e1acb3 100644
--- a/Makefile
+++ b/Makefile
@@ -24,12 +24,12 @@
 M                ?= $(BUILD)/milestones
 LOGS             ?= $(BUILD)/logs
 
-PREP_MS          ?= $(M)/prereqs-check $(M)/build-local-bootstrap $(M)/vagrant-up $(M)/copy-cord $(M)/cord-config $(M)/copy-config $(M)/prep-buildnode $(M)/prep-headnode $(M)/deploy-elasticstack $(M)/prep-computenode
+PREP_MS          ?= $(M)/prereqs-check $(M)/build-local-bootstrap $(M)/ciab-ovs $(M)/vagrant-up $(M)/copy-cord $(M)/cord-config $(M)/copy-config $(M)/prep-buildnode $(M)/prep-headnode $(M)/deploy-elasticstack $(M)/prep-computenode
 MAAS_MS          ?= $(M)/build-maas-images $(M)/maas-prime $(M)/publish-maas-images $(M)/deploy-maas
 OPENSTACK_MS     ?= $(M)/glance-images $(M)/deploy-openstack  $(M)/deploy-computenode $(M)/onboard-openstack
 XOS_MS           ?= $(M)/docker-images $(M)/core-image $(M)/publish-docker-images $(M)/start-xos $(M)/onboard-profile
 ONOS_MS          ?= $(M)/build-onos-apps $(M)/publish-onos-apps $(M)/deploy-onos $(M)/deploy-mavenrepo
-POST_INSTALL_MS  ?= $(M)/setup-automation $(M)/setup-ciab-pcu $(M)/vagrant-up-switches $(M)/compute1-up $(M)/compute2-up $(M)/compute3-up
+POST_INSTALL_MS  ?= $(M)/setup-automation $(M)/setup-ciab-pcu $(M)/compute1-up $(M)/compute2-up $(M)/compute3-up
 ALL_MILESTONES   ?= $(PREP_MS) $(MAAS_MS) $(OPENSTACK_MS) $(XOS_MS) $(ONOS_MS) $(POST_INSTALL_MS)
 
 LOCAL_MILESTONES ?= $(M)/local-cord-config $(M)/local-docker-images $(M)/local-core-image $(M)/local-start-xos $(M)/local-onboard-profile
@@ -168,6 +168,10 @@
 	$(ANSIBLE_PB) $(BUILD)/ansible/build-local-bootstrap.yml $(LOGCMD)
 	touch $@
 
+$(M)/ciab-ovs:
+	$(ANSIBLE_PB) $(BUILD)/ansible/ciab-ovs.yml $(LOGCMD)
+	touch $@
+
 $(M)/vagrant-up: | $(VAGRANT_UP_PREREQS)
 	$(VAGRANT) up $(VAGRANT_VMS) --provider $(VAGRANT_PROVIDER) $(LOGCMD)
 	@echo "Configuring SSH for VM's..."
@@ -294,24 +298,26 @@
 
 
 # Additional CiaB targets
-$(M)/vagrant-up-switches: | $(M)/setup-automation
-	$(VAGRANT) up $(VAGRANT_SWITCHES) --provider $(VAGRANT_PROVIDER) $(LOGCMD)
-	touch $@
-
 $(M)/setup-ciab-pcu: | $(M)/setup-automation
 	$(ANSIBLE_PB) $(MAAS)/setup-ciab-pcu.yml
 	touch $@
 
-$(M)/compute%-up: | $(M)/setup-ciab-pcu $(M)/vagrant-up-switches
+$(M)/compute%-up: | $(M)/setup-ciab-pcu
 	$(VAGRANT) up compute$* --provider $(VAGRANT_PROVIDER) $(LOGCMD)
 	$(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) ansible/maas-provision.yml --extra-vars='maas_user=maas vagrant_name=cord_compute$*'" $(LOGCMD)
 	touch $@
 
+$(M)/refresh-fabric: | $(M)/compute1-up
+	$(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_MAAS) $(PI)/cord-refresh-fabric.yml" $(LOGCMD)
+	touch $@
+
 
 # Testing targets
 pod-test: $(M)/setup-automation collect-diag
 	$(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_LOCAL) $(PI)/pod-test-playbook.yml" $(LOGCMD)
 
+fabric-pingtest: $(M)/refresh-fabric
+	$(SSH_HEAD) "cd /opt/cord/build; $(ANSIBLE_PB_MAAS) $(PI)/cord-fabric-pingtest.yml" $(LOGCMD)
 
 # Local Targets, bring up XOS containers without a VM
 $(M)/local-cord-config:
diff --git a/ansible/build-ovs.yml b/ansible/build-ovs.yml
new file mode 100644
index 0000000..6a4112f
--- /dev/null
+++ b/ansible/build-ovs.yml
@@ -0,0 +1,19 @@
+
+# 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.
+
+- hosts: localhost
+  serial: 1
+  roles:
+    - ovs-deb-packages
diff --git a/ansible/ciab-ovs.yml b/ansible/ciab-ovs.yml
new file mode 100644
index 0000000..ebf38bd
--- /dev/null
+++ b/ansible/ciab-ovs.yml
@@ -0,0 +1,20 @@
+
+# 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.
+
+- hosts: localhost
+  serial: 1
+  become: yes
+  roles:
+    - ciab-ovs
diff --git a/ansible/roles/ciab-ovs/defaults/main.yml b/ansible/roles/ciab-ovs/defaults/main.yml
new file mode 100644
index 0000000..38c9652
--- /dev/null
+++ b/ansible/roles/ciab-ovs/defaults/main.yml
@@ -0,0 +1,46 @@
+# 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.
+
+ovs_bridges:
+  - leaf1
+#  - leaf2
+  - spine1
+#  - spine2
+
+ovs_patch_ports:
+  - { bridge: leaf1, port: leaf1-spine1, peer: spine1-leaf1 }
+#  - { bridge: leaf2, port: leaf2-spine1, peer: spine1-leaf2 }
+#  - { bridge: leaf1, port: leaf1-spine2, peer: spine2-leaf1 }
+#  - { bridge: leaf2, port: leaf2-spine2, peer: spine2-leaf2 }
+  - { bridge: spine1, port: spine1-leaf1, peer: leaf1-spine1 }
+#  - { bridge: spine2, port: spine2-leaf1, peer: leaf1-spine2 }
+#  - { bridge: spine1, port: spine1-leaf2, peer: leaf2-spine1 }
+#  - { bridge: spine2, port: spine2-leaf2, peer: leaf2-spine2 }
+
+enable_fabric: False
+
+ovs_controller_ip: 10.100.198.201
+ovs_controller_port: 6653
+
+ovs_packages:
+  - openvswitch-switch
+  - openvswitch-common
+
+ovs_fabric_packages:
+  - name: openvswitch-common_2.5.3-1_amd64.deb
+    url: http://www.vicci.org/openvswitch-2.5.3/openvswitch-common_2.5.3-1_amd64.deb
+    checksum: sha256:30c159c4a13d4eab75acdb04dca7acc0beee5dd0465b1b5b2e31a3a625e4c248
+  - name: openvswitch-switch_2.5.3-1_amd64.deb
+    url: http://www.vicci.org/openvswitch-2.5.3/openvswitch-switch_2.5.3-1_amd64.deb
+    checksum: sha256:b68e63f6408e1392bb0457760c77189c9b3380e1b354fdaec17e119e09ab5db6
diff --git a/ansible/roles/ciab-ovs/tasks/main.yml b/ansible/roles/ciab-ovs/tasks/main.yml
new file mode 100644
index 0000000..d5bb41a
--- /dev/null
+++ b/ansible/roles/ciab-ovs/tasks/main.yml
@@ -0,0 +1,79 @@
+# 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: Remove old OVS
+  apt:
+    name: "{{ item }}"
+    state: absent
+  with_items:
+    - openvswitch-switch
+    - openvswitch-common
+  when: enable_fabric
+
+- name: Install default OVS
+  apt:
+    name: "{{ item }}"
+    state: present
+  with_items: "{{ ovs_packages }}"
+  when: not enable_fabric
+
+- name: (fabric) Download OVS 2.5.3 packages
+  get_url:
+    url: "{{ item.url }}"
+    checksum: "{{ item.checksum }}"
+    dest: "/tmp/{{ item.name }}"
+  with_items: "{{ ovs_fabric_packages }}"
+  when: enable_fabric
+
+- name: (fabric) Install OVS 2.5.3
+  apt:
+    deb: "/tmp/{{ item.name }}"
+    state: present
+  with_items: "{{ ovs_fabric_packages }}"
+  when: enable_fabric
+
+- name: Create OVS bridges for CiaB
+  openvswitch_bridge:
+    bridge: "{{ item }}"
+    state: present
+  with_items: "{{ ovs_bridges }}"
+
+- name: Create patch ports
+  openvswitch_port:
+    bridge: "{{ item.bridge }}"
+    port: "{{ item.port }}"
+    set: "Interface {{ item.port }} type=patch"
+  with_items: "{{ ovs_patch_ports }}"
+
+- name: Create peers
+  openvswitch_port:
+    bridge: "{{ item.bridge }}"
+    port: "{{ item.port }}"
+    set: "Interface {{ item.port }} options:peer={{ item.peer }}"
+  with_items: "{{ ovs_patch_ports }}"
+
+# "set" argument to openvswitch_bridge wasn't working...
+- name: Set bridges to OpenFlow 1.3
+  command: ovs-vsctl set bridge {{ item }} protocols=OpenFlow13
+  when: enable_fabric
+  with_items: "{{ ovs_bridges }}"
+  tags:
+    - skip_ansible_lint # running a sub job
+
+- name: Add ONOS fabric controller
+  command: ovs-vsctl set-controller {{ item }} tcp:{{ ovs_controller_ip }}:{{ ovs_controller_port }}
+  when: enable_fabric
+  with_items: "{{ ovs_bridges }}"
+  tags:
+    - skip_ansible_lint # running a sub job
diff --git a/ansible/roles/ovs-deb-packages/defaults/main.yml b/ansible/roles/ovs-deb-packages/defaults/main.yml
new file mode 100644
index 0000000..5a7aafc
--- /dev/null
+++ b/ansible/roles/ovs-deb-packages/defaults/main.yml
@@ -0,0 +1,15 @@
+# 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.
+
+ovs_version: 2.5.3
\ No newline at end of file
diff --git a/ansible/roles/ovs-deb-packages/tasks/main.yml b/ansible/roles/ovs-deb-packages/tasks/main.yml
new file mode 100644
index 0000000..464ed9b
--- /dev/null
+++ b/ansible/roles/ovs-deb-packages/tasks/main.yml
@@ -0,0 +1,49 @@
+# 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: Install prereqs for building OVS
+  apt:
+    name: "{{ item }}"
+    state: present
+    update_cache: yes
+  become: yes
+  with_items:
+    - build-essential
+    - fakeroot
+    - graphviz
+    - autoconf
+    - automake
+    - bzip2
+    - debhelper
+    - dh-autoreconf
+    - libssl-dev
+    - libtool
+    - openssl
+    - procps
+    - python-all
+    - python-qt4
+    - python-twisted-conch
+    - python-zopeinterface
+
+- name: Download and unarchive OVS tarball
+  unarchive:
+    src: http://openvswitch.org/releases/openvswitch-{{ ovs_version }}.tar.gz
+    dest: /tmp/
+    remote_src: yes
+
+- name: Build OVS .deb packages
+  command: fakeroot debian/rules binary
+  args:
+    chdir: /tmp/openvswitch-{{ ovs_version }}
+    creates: /tmp/openvswitch-switch_{{ ovs_version }}-1_amd64.deb
diff --git a/scenarios/cord/Vagrantfile b/scenarios/cord/Vagrantfile
index 0ebab54..8cb119d 100644
--- a/scenarios/cord/Vagrantfile
+++ b/scenarios/cord/Vagrantfile
@@ -47,14 +47,12 @@
         libvirt__network_name: settings['vm_management_network_name'],
         libvirt__forward_mode: "none",
         libvirt__dhcp_enabled: false
-    d.vm.network "private_network",
-        ip: "0.1.0.0", # not used, ignore
+    d.vm.network "public_network",
         mac: "02420a060101",
         auto_config: false,
-        virtualbox__intnet: "head1-leaf1",
-        libvirt__network_name: "head1-leaf1",
-        libvirt__forward_mode: "none",
-        libvirt__dhcp_enabled: false
+        type: "bridge",
+        dev: "leaf1",
+        ovs: true
     d.vm.provider :virtualbox do |v|
       v.memory = settings['head_vm_mem']
       v.cpus = settings['head_vm_cpu']
@@ -72,218 +70,6 @@
     end
   end
 
-  config.vm.define "leaf1" do |s|
-    s.vm.box = "ubuntu/trusty64"
-    s.vm.hostname = "leaf1"
-    s.vm.synced_folder $cordpath, $ciab_dir
-    s.vm.network "private_network",
-      #type: "dhcp",
-      ip: "0.0.0.0",
-      auto_config: false,
-      virtualbox__intnet: settings['vm_management_network_name'],
-      libvirt__network_name: settings['vm_management_network_name'],
-      mac: "cc37ab000011"
-    s.vm.network "private_network",
-      ip: "0.1.0.0",
-      auto_config: false,
-      virtualbox__intnet: "head1-leaf1",
-      libvirt__network_name: "head1-leaf1",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    s.vm.network "private_network",
-      ip: "0.2.0.0",
-      auto_config: false,
-      virtualbox__intnet: "compute1-leaf1",
-      libvirt__network_name: "compute1-leaf1",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    s.vm.network "private_network",
-      ip: "0.5.0.0",
-      auto_config: false,
-      virtualbox__intnet: "leaf1-spine1",
-      libvirt__network_name: "leaf1-spine1",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    s.vm.network "private_network",
-      ip: "0.6.0.0",
-      auto_config: false,
-      virtualbox__intnet: "leaf1-spine2",
-      libvirt__network_name: "leaf1-spine2",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    if (settings['enable_fabric'])
-      s.vm.provision :shell, path: $cordpath + "/build/scripts/install.sh", args: "-3f"
-    end
-    s.vm.provision :ansible do |ansible|
-      ansible.playbook = $cordpath + "/build/ansible/leafswitch.yml"
-      ansible.extra_vars = {
-        fabric: settings['enable_fabric'],
-        net_prefix: "10.6.1"
-      }
-    end
-    s.vm.provider :libvirt do |v, override|
-        v.memory = settings['switch_vm_mem']
-        v.cpus = settings['switch_vm_cpu']
-        override.vm.synced_folder $cordpath, $ciab_dir, type: "nfs"
-    end
-    s.vm.provider :virtualbox do |v, override|
-        v.memory = settings['switch_vm_mem']
-        v.cpus = settings['switch_vm_cpu']
-    end
-  end
-
-  config.vm.define "leaf2" do |s|
-    s.vm.box = "ubuntu/trusty64"
-    s.vm.hostname = "leaf2"
-    s.vm.synced_folder $cordpath, $ciab_dir
-    s.vm.network "private_network",
-      #type: "dhcp",
-      ip: "0.0.0.0",
-      auto_config: false,
-      virtualbox__intnet: settings['vm_management_network_name'],
-      libvirt__network_name: settings['vm_management_network_name'],
-      mac: "cc37ab000012"
-    s.vm.network "private_network",
-      ip: "0.3.0.0",
-      auto_config: false,
-      virtualbox__intnet: "compute2-leaf2",
-      libvirt__network_name: "compute2-leaf2",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    s.vm.network "private_network",
-      ip: "0.4.0.0",
-      auto_config: false,
-      virtualbox__intnet: "compute3-leaf2",
-      libvirt__network_name: "compute3-leaf2",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    s.vm.network "private_network",
-      ip: "0.7.0.0",
-      auto_config: false,
-      virtualbox__intnet: "leaf2-spine1",
-      libvirt__network_name: "leaf2-spine1",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    s.vm.network "private_network",
-      ip: "0.8.0.0",
-      auto_config: false,
-      virtualbox__intnet: "leaf2-spine2",
-      libvirt__network_name: "leaf2-spine2",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    if (settings['enable_fabric'])
-      s.vm.provision :shell, path: $cordpath + "/build/scripts/install.sh", args: "-3f"
-    end
-    s.vm.provision :ansible do |ansible|
-      ansible.playbook = $cordpath + "/build/ansible/leafswitch.yml"
-      ansible.extra_vars = {
-        fabric: settings['enable_fabric'],
-        net_prefix: "10.6.1"
-      }
-    end
-    s.vm.provider :libvirt do |v, override|
-        v.memory = settings['switch_vm_mem']
-        v.cpus = settings['switch_vm_cpu']
-        override.vm.synced_folder $cordpath, $ciab_dir, type: "nfs"
-    end
-    s.vm.provider :virtualbox do |v, override|
-        v.memory = settings['switch_vm_mem']
-        v.cpus = settings['switch_vm_cpu']
-    end
-  end
-
-  config.vm.define "spine1" do |s|
-    s.vm.box = "ubuntu/trusty64"
-    s.vm.hostname = "spine1"
-    s.vm.synced_folder $cordpath, $ciab_dir
-    s.vm.network "private_network",
-      #type: "dhcp",
-      ip: "0.0.0.0",
-      auto_config: false,
-      virtualbox__intnet: settings['vm_management_network_name'],
-      libvirt__network_name: settings['vm_management_network_name'],
-      mac: "cc37ab000021"
-    s.vm.network "private_network",
-      ip: "0.5.0.0",
-      auto_config: false,
-      virtualbox__intnet: "leaf1-spine1",
-      libvirt__network_name: "leaf1-spine1",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    s.vm.network "private_network",
-      ip: "0.7.0.0",
-      auto_config: false,
-      virtualbox__intnet: "leaf2-spine1",
-      libvirt__network_name: "leaf2-spine1",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    if (settings['enable_fabric'])
-      s.vm.provision :shell, path: $cordpath + "/build/scripts/install.sh", args: "-3f"
-    end
-    s.vm.provision :ansible do |ansible|
-      ansible.playbook = $cordpath + "/build/ansible/leafswitch.yml"
-      ansible.extra_vars = {
-        fabric: settings['enable_fabric'],
-        net_prefix: "10.6.1"
-      }
-    end
-    s.vm.provider :libvirt do |v, override|
-        v.memory = settings['switch_vm_mem']
-        v.cpus = settings['switch_vm_cpu']
-        override.vm.synced_folder $cordpath, $ciab_dir, type: "nfs"
-    end
-    s.vm.provider :virtualbox do |v, override|
-        v.memory = settings['switch_vm_mem']
-        v.cpus = settings['switch_vm_cpu']
-    end
-  end
-
-  config.vm.define "spine2" do |s|
-    s.vm.box = "ubuntu/trusty64"
-    s.vm.hostname = "spine2"
-    s.vm.synced_folder $cordpath, $ciab_dir
-    s.vm.network "private_network",
-      #type: "dhcp",
-      ip: "0.0.0.0",
-      auto_config: false,
-      virtualbox__intnet: settings['vm_management_network_name'],
-      libvirt__network_name: settings['vm_management_network_name'],
-      mac: "cc37ab000022"
-    s.vm.network "private_network",
-      ip: "0.6.0.0",
-      auto_config: false,
-      virtualbox__intnet: "leaf1-spine2",
-      libvirt__network_name: "leaf1-spine2",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    s.vm.network "private_network",
-      ip: "0.8.0.0",
-      auto_config: false,
-      virtualbox__intnet: "leaf2-spine2",
-      libvirt__network_name: "leaf2-spine2",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
-    if (settings['enable_fabric'])
-      s.vm.provision :shell, path: $cordpath + "/build/scripts/install.sh", args: "-3f"
-    end
-    s.vm.provision :ansible do |ansible|
-      ansible.playbook = $cordpath + "/build/ansible/leafswitch.yml"
-      ansible.extra_vars = {
-        fabric: settings['enable_fabric'],
-        net_prefix: "10.6.1"
-      }
-    end
-    s.vm.provider :libvirt do |v, override|
-        v.memory = settings['switch_vm_mem']
-        v.cpus = settings['switch_vm_cpu']
-        override.vm.synced_folder $cordpath, $ciab_dir, type: "nfs"
-    end
-    s.vm.provider :virtualbox do |v, override|
-        v.memory = settings['switch_vm_mem']
-        v.cpus = settings['switch_vm_cpu']
-    end
-  end
-
   config.vm.define "compute1" do |c|
     c.vm.communicator = "none"
     c.vm.hostname = "compute1"
@@ -293,14 +79,12 @@
       auto_config: false,
       virtualbox__intnet: settings['vm_management_network_name'],
       libvirt__network_name: settings['vm_management_network_name']
-    c.vm.network "private_network",
+    c.vm.network "public_network",
       adapter: 2,         # The fabric interface for each node
-      ip: "0.2.0.0",
       auto_config: false,
-      virtualbox__intnet: "compute1-leaf1",
-      libvirt__network_name: "compute1-leaf1",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
+      type: "bridge",
+      dev: "leaf1",
+      ovs: true
     c.vm.provider :libvirt do |v|
       v.memory = settings['compute_vm_mem']
       v.cpus = settings['compute_vm_cpu']
@@ -327,14 +111,12 @@
       auto_config: false,
       virtualbox__intnet: settings['vm_management_network_name'],
       libvirt__network_name: settings['vm_management_network_name']
-    c.vm.network "private_network",
+    c.vm.network "public_network",
       adapter: 2,         # The fabric interface for each node
-      ip: "0.3.0.0",
       auto_config: false,
-      virtualbox__intnet: "compute2-leaf2",
-      libvirt__network_name: "compute2-leaf2",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
+      type: "bridge",
+      dev: "leaf2",
+      ovs: true
     c.vm.provider :libvirt do |v|
       v.memory = settings['compute_vm_mem']
       v.cpus = settings['compute_vm_cpu']
@@ -361,14 +143,12 @@
       auto_config: false,
       virtualbox__intnet: settings['vm_management_network_name'],
       libvirt__network_name: settings['vm_management_network_name']
-    c.vm.network "private_network",
+    c.vm.network "public_network",
       adapter: 2,         # The fabric interface for each node
-      ip: "0.4.0.0",
       auto_config: false,
-      virtualbox__intnet: "compute3-leaf2",
-      libvirt__network_name: "compute3-leaf2",
-      libvirt__forward_mode: "none",
-      libvirt__dhcp_enabled: false
+      type: "bridge",
+      dev: "leaf2",
+      ovs: true
     c.vm.provider :libvirt do |v|
       v.memory = settings['compute_vm_mem']
       v.cpus = settings['compute_vm_cpu']
diff --git a/scenarios/cord/config.yml b/scenarios/cord/config.yml
index 6a8b0a2..c2376e1 100644
--- a/scenarios/cord/config.yml
+++ b/scenarios/cord/config.yml
@@ -67,6 +67,7 @@
 
 vagrant_up_prereqs:
   - prereqs-check
+  - ciab-ovs
 
 cord_config_prereqs:
   - copy-cord