Remove the deprecated command and the useless "if" condition

TrivialFix

Change-Id: I22970a9885eda670ec17d6b8c1b368ed2e10a732
This commit is contained in:
caoyuan 2016-12-01 01:44:29 +08:00
parent 15a917a62a
commit 2f21d2a88d

@ -25,8 +25,6 @@ done
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')") REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.." cd "$(dirname "$REAL_PATH")/.."
NETWORK_MANAGER="neutron"
# Test for credentials set # Test for credentials set
if [[ "${OS_USERNAME}" == "" ]]; then if [[ "${OS_USERNAME}" == "" ]]; then
echo "No Keystone credentials specified. Try running source openrc" echo "No Keystone credentials specified. Try running source openrc"
@ -48,12 +46,6 @@ fi
echo Creating glance image. echo Creating glance image.
glance image-create --name cirros --progress --disk-format qcow2 --container-format bare --visibility public --progress --file ./$IMAGE glance image-create --name cirros --progress --disk-format qcow2 --container-format bare --visibility public --progress --file ./$IMAGE
if [[ "${NETWORK_MANAGER}" == "nova" ]] ; then
echo Configuring nova networking.
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
nova network-create vmnet --fixed-range-v4=10.0.0.0/24 --bridge=br100 --multi-host=T
else
echo Configuring neutron. echo Configuring neutron.
neutron net-create public1 --router:external --provider:physical_network physnet1 --provider:network_type flat neutron net-create public1 --router:external --provider:physical_network physnet1 --provider:network_type flat
neutron subnet-create --name 1-subnet --disable-dhcp --allocation-pool start=10.0.2.150,end=10.0.2.199 public1 10.0.2.0/24 --gateway 10.0.2.1 neutron subnet-create --name 1-subnet --disable-dhcp --allocation-pool start=10.0.2.150,end=10.0.2.199 public1 10.0.2.0/24 --gateway 10.0.2.1
@ -69,7 +61,6 @@ else
# Open heat-cfn so it can run on a different host # Open heat-cfn so it can run on a different host
neutron security-group-rule-create default --direction ingress --ethertype IPv4 --protocol tcp --port-range-min 8000 --port-range-max 8000 --remote-ip-prefix 0.0.0.0/0 neutron security-group-rule-create default --direction ingress --ethertype IPv4 --protocol tcp --port-range-min 8000 --port-range-max 8000 --remote-ip-prefix 0.0.0.0/0
neutron security-group-rule-create default --direction ingress --ethertype IPv4 --protocol tcp --port-range-min 8080 --port-range-max 8080 --remote-ip-prefix 0.0.0.0/0 neutron security-group-rule-create default --direction ingress --ethertype IPv4 --protocol tcp --port-range-min 8080 --port-range-max 8080 --remote-ip-prefix 0.0.0.0/0
fi
if [ ! -f ~/.ssh/id_rsa.pub ]; then if [ ! -f ~/.ssh/id_rsa.pub ]; then
echo Generating ssh key. echo Generating ssh key.