Add option to restart openstack
Change-Id: I7578ff4cecae5351d5749272424d71b56071239d
Signed-off-by: Steven Hardy <shardy@redhat.com>
if [ -z "$action" ]
then
echo "openstack [start|stop|install|erase|status]"
- echo ""
+ echo
echo "This tool is designed to control OpenStack on a Fedora 16/17 system"
- echo ""
+ echo
echo "start - Starts OpenStack"
echo "stop - Stops OpenStack"
+ echo "restart - Restart OpenStack"
echo "install - Installs a fresh OpenStack system with Keystone from RPM repostories"
echo "erase - permanently destroys an existing installation of OpenStack"
fi
done
}
+function os_restart() {
+ action=restart
+ os_stop
+ sleep 1
+ os_start
+}
+
function os_erase() {
for net in `sudo nova-manage network list |
awk '/^[[:digit:]]/ { print $9 }'`
stop)
os_stop
;;
+ restart)
+ os_restart
+ ;;
erase)
shift
os_erase $*