diff options
author | 2018-02-05 03:59:44 +0000 | |
---|---|---|
committer | 2018-02-05 03:59:44 +0000 | |
commit | d5747030d62979b1178e6372907d7431012b7fd1 (patch) | |
tree | 965f3a9c94748c1f4895dd9617072c93c14cab37 /deploy/network.sh | |
parent | ce0a73e89120efea3832b65b936dcc27f5840c74 (diff) | |
parent | 3907d59a072d158de67e3cc94bc6ea0ed747d390 (diff) |
Merge "Compass4nfv virtual deploy support direct connection"
Diffstat (limited to 'deploy/network.sh')
-rwxr-xr-x | deploy/network.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/deploy/network.sh b/deploy/network.sh index 698771b3..eea62277 100755 --- a/deploy/network.sh +++ b/deploy/network.sh @@ -76,9 +76,9 @@ function setup_bridge_external() sudo virsh net-destroy external sudo virsh net-undefine external - #save_network_info + save_network_info sed -e "s/REPLACE_NAME/external/g" \ - -e "s/REPLACE_OVS/br-external_nat/g" \ + -e "s/REPLACE_OVS/br-external/g" \ $COMPASS_DIR/deploy/template/network/bridge_ovs.xml \ > $WORK_DIR/network/external.xml @@ -86,14 +86,12 @@ function setup_bridge_external() sudo virsh net-start external sudo virsh net-autostart external - python $COMPASS_DIR/deploy/setup_vnic.py } function recover_bridge_external() { sudo virsh net-start external - python $COMPASS_DIR/deploy/setup_vnic.py } function setup_nat_net() { @@ -128,7 +126,12 @@ function recover_nat_net() { function setup_virtual_net() { setup_nat_net install $INSTALL_GW $INSTALL_NETMASK - setup_nat_net external_nat $EXT_NAT_GW $EXT_NAT_MASK $EXT_NAT_IP_START $EXT_NAT_IP_END + + if [[ "$NAT_EXTERNAL" == "false" ]]; then + setup_bridge_external + else + setup_nat_net external_nat $EXT_NAT_GW $EXT_NAT_MASK $EXT_NAT_IP_START $EXT_NAT_IP_END + fi } function recover_virtual_net() { |