Merge "Enable "openstack server unpause" command to take multiple servers."
This commit is contained in:
commit
f177160991
@ -658,17 +658,17 @@ Unlock server
|
|||||||
server unpause
|
server unpause
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Unpause server
|
Unpause server(s)
|
||||||
|
|
||||||
.. program:: server unpause
|
.. program:: server unpause
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
os server unpause
|
os server unpause
|
||||||
<server>
|
<server> [<server> ...]
|
||||||
|
|
||||||
.. describe:: <server>
|
.. describe:: <server>
|
||||||
|
|
||||||
Server (name or ID)
|
Server(s) to unpause (name or ID)
|
||||||
|
|
||||||
server unrescue
|
server unrescue
|
||||||
---------------
|
---------------
|
||||||
|
@ -187,7 +187,7 @@ Those actions with an opposite action are noted in parens if applicable.
|
|||||||
* ``stop`` (``start``) - stop one or more servers
|
* ``stop`` (``start``) - stop one or more servers
|
||||||
* ``suspend`` (``resume``) - stop a server and save to disk freeing memory
|
* ``suspend`` (``resume``) - stop a server and save to disk freeing memory
|
||||||
* ``unlock`` (``lock``) - unlock a server
|
* ``unlock`` (``lock``) - unlock a server
|
||||||
* ``unpause`` (``pause``) - return a paused server to running state
|
* ``unpause`` (``pause``) - return one or more paused servers to running state
|
||||||
* ``unrescue`` (``rescue``) - return a server to normal boot mode
|
* ``unrescue`` (``rescue``) - return a server to normal boot mode
|
||||||
* ``unset`` (``set``) - remove an attribute of the object
|
* ``unset`` (``set``) - remove an attribute of the object
|
||||||
|
|
||||||
|
@ -1631,7 +1631,7 @@ class UnlockServer(command.Command):
|
|||||||
|
|
||||||
|
|
||||||
class UnpauseServer(command.Command):
|
class UnpauseServer(command.Command):
|
||||||
"""Unpause server"""
|
"""Unpause server(s)"""
|
||||||
|
|
||||||
log = logging.getLogger(__name__ + '.UnpauseServer')
|
log = logging.getLogger(__name__ + '.UnpauseServer')
|
||||||
|
|
||||||
@ -1640,7 +1640,8 @@ class UnpauseServer(command.Command):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'server',
|
'server',
|
||||||
metavar='<server>',
|
metavar='<server>',
|
||||||
help=_('Server (name or ID)'),
|
nargs='+',
|
||||||
|
help=_('Server(s) to unpause (name or ID)'),
|
||||||
)
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -1648,9 +1649,10 @@ class UnpauseServer(command.Command):
|
|||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
|
|
||||||
compute_client = self.app.client_manager.compute
|
compute_client = self.app.client_manager.compute
|
||||||
|
for server in parsed_args.server:
|
||||||
utils.find_resource(
|
utils.find_resource(
|
||||||
compute_client.servers,
|
compute_client.servers,
|
||||||
parsed_args.server,
|
server,
|
||||||
).unpause()
|
).unpause()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user