Add metadata to create brphy:brphyv

This patch adds contrail_ovs metadata that will create brphy:brphyv
virtual interface and plug it to the contrail network.

Change-Id: I4dfb6b6b5a152f7f30e3724ac0ed123b965662a7
diff --git a/baremetal_simulator/init.sls b/baremetal_simulator/init.sls
index 36247e6..149402b 100644
--- a/baremetal_simulator/init.sls
+++ b/baremetal_simulator/init.sls
@@ -67,6 +67,11 @@
       - br_simulator_vtep_management
       - br_simulator_vtep_tunnel
 
+brphyv_in_ovs:
+  openvswitch_port.present:
+    - name: brphyv
+    - bridge: br-simulator
+
 {%- endif %}
 
 libvirt-bin:
diff --git a/metadata/service/network/contrail_ovs.yml b/metadata/service/network/contrail_ovs.yml
new file mode 100644
index 0000000..2a7846d
--- /dev/null
+++ b/metadata/service/network/contrail_ovs.yml
@@ -0,0 +1,50 @@
+parameters:
+  _param:
+    dollar: '$'
+    colon: ':'
+  opencontrail:
+    client:
+      physical_router:
+        br-simulator:
+          name: br-simulator
+          dataplane_ip: ${_param:single_address}
+          management_ip: ${_param:single_address}
+          vendor_name: ovs
+          product_name: ovs
+          agents:
+           - tsn0-0
+           - tsn0
+          interface:
+            brphyv:
+              name: brphyv
+              logical_interface:
+                brphyv:
+                  name: 'brphyv.0'
+                  vlan_tag: 0
+                  interface_type: L2
+                  virtual_machine_interface:
+                    brphyv_port:
+                      name: brphyv_port
+                      ip_address: ${_param:single_baremetal_address}
+                      mac_address: ${_param:baremetal_hw_address}
+                      security_group: 'default'
+                      virtual_network: 'baremetal-provision-network'
+  linux:
+    network:
+      interface:
+        brphybrphyv:
+          enabled: true
+          name: brphy${_param:colon}brphyv
+          proto: static
+          type: eth
+          address: ${_param:single_baremetal_address}
+          netmask: 255.255.255.0
+          hwaddr: ${_param:baremetal_hw_address}
+          pre_up_cmds:
+            - "ip link add dev ${_param:dollar}{IFACE%${_param:colon}*} type veth peer name ${_param:dollar}{IFACE##*${_param:colon}}"
+          pre_down_cmds:
+            - "ip link set dev ${_param:dollar}{IFACE%${_param:colon}*} down && ip link set dev ${_param:dollar}{IFACE##*${_param:colon}} down"
+          post_up_cmds:
+            - "ip link set dev ${_param:dollar}{IFACE%${_param:colon}*} up && ip link set dev ${_param:dollar}{IFACE##*${_param:colon}} up"
+          post_down_cmds:
+            - "ip link del dev ${_param:dollar}{IFACE%${_param:colon}*}"