COMPASS-436 97/16897/3
authorCNlucius <lukai1@huawei.com>
Thu, 14 Jul 2016 09:06:28 +0000 (17:06 +0800)
committerCNlucius CNlucius <lukai1@huawei.com>
Fri, 15 Jul 2016 05:58:20 +0000 (05:58 +0000)
add Port config

Change-Id: I8e9ea4df7a4a1bdd6aaa123c40e2d726d0c4f4e6
Signed-off-by: CNlucius <lukai1@huawei.com>
deploy/adapters/ansible/openstack_mitaka/roles/onos_cluster/tasks/openvswitch.yml

index aac787e..7686389 100755 (executable)
     ifconfig onos_port2 up;
   ignore_errors: True
 
+- name: set veth to ovs
+  shell: >
+    export externamMac=`ifconfig eth1 | grep -Eo '\<[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'`;
+    ifconfig onos_port2 hw ether $externamMac;
+    ovs-vsctl add-port br-prv onos_port1;
+  ignore_errors: True
+
 - name: add openflow-base feature
   command: su -s /bin/sh -c "/opt/onos/bin/onos 'feature:install onos-openflow-base'";
   when: inventory_hostname in groups['onos']