yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #14005
[Bug 1314217] [NEW] add multiple server support to nova reset-state
Public bug reported:
It would be nice if nova reset-state supported specifying multiple
servers in a single invocation, similar to nova delete.
usage: nova reset-state [--active] <server>
usage: nova delete <server> [<server> ...]
It can be scripted similar to below, but it would be nice to have the
command line support.
#!/bin/bash
set -e
function usage() {
echo "Usage: nova-reset-state [--active] [--all] [--help] -- [<server> ...]"
}
active=""
all=false
while [ $# -ne 0 ]; do
case "$1" in
--all) all=true; shift;;
--active) active="--active"; shift;;
--help) usage; exit 1;;
--) shift; break;
esac
done
if [ "$all" = true ]; then
servers=($(nova list | awk 'NR > 2 { print $2 }'))
for server in "${servers[@]}"; do
nova reset-state $active $server
done
else
for server in "$@"; do
nova reset-state $active $server
done
fi
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1314217
Title:
add multiple server support to nova reset-state
Status in OpenStack Compute (Nova):
New
Bug description:
It would be nice if nova reset-state supported specifying multiple
servers in a single invocation, similar to nova delete.
usage: nova reset-state [--active] <server>
usage: nova delete <server> [<server> ...]
It can be scripted similar to below, but it would be nice to have the
command line support.
#!/bin/bash
set -e
function usage() {
echo "Usage: nova-reset-state [--active] [--all] [--help] -- [<server> ...]"
}
active=""
all=false
while [ $# -ne 0 ]; do
case "$1" in
--all) all=true; shift;;
--active) active="--active"; shift;;
--help) usage; exit 1;;
--) shift; break;
esac
done
if [ "$all" = true ]; then
servers=($(nova list | awk 'NR > 2 { print $2 }'))
for server in "${servers[@]}"; do
nova reset-state $active $server
done
else
for server in "$@"; do
nova reset-state $active $server
done
fi
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1314217/+subscriptions
Follow ups
References