aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCNlukai <lukai1@huawei.com>2016-01-30 11:34:27 +0800
committerJustin chi <chigang@huawei.com>2016-03-14 07:21:17 +0000
commitd79338373f2706485e5e8f14d80af08bfad9f208 (patch)
tree81fb93ce0388a94f48379da7c141b62e44c8b534
parent498cbd4258a809d1a87f28f58b48f25eb4700c0a (diff)
Update the method to get external nic mac address
JIRA: COMPASS-295 Change-Id: Ifc72424d2627f444ec52d2875a5252f9fd898c8a Signed-off-by: CNlukai <lukai1@huawei.com> Signed-off-by: Justin-chi <chigang@huawei.com> (cherry picked from commit ab495546af8ba0fe9ea1234e4f25a7e62ed92191)
-rwxr-xr-xdeploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml b/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml
index 9761af7..47f0f6e 100755
--- a/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml
+++ b/deploy/adapters/ansible/roles/onos_cluster/tasks/openvswitch.yml
@@ -48,7 +48,7 @@
- name: set veth to ovs
shell: >
- export externamMac=`ifconfig eth1 | grep "HWaddr" | awk '{print $5}'`;
+ 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