summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/server.py
Commit message (Collapse)AuthorAgeFilesLines
* log take_action parameters in a single placeAkihiro Motoki2016-02-021-32/+0
| | | | | | | | | | | | Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be
* log_method: get logger from decorated method if unspecifiedAkihiro Motoki2016-01-201-90/+31
| | | | | | | | | | | | | This commit makes 'log' optional. 'log' attribute of each command class does not exist when the class is defined because 'log' is now setup dynamically when a class is instantiated. Instead log_method looks for a logger from a decorating method. compute.v2.server is changed in this commit as an example. Change-Id: Ic4d128f8e027d3b8e6f884f31369e9085c0f0871 Partial-Bug: #1532294
* Merge "Make --image parameter optional in "server rebuild""Jenkins2016-01-151-5/+6
|\
| * Make --image parameter optional in "server rebuild"David Moreau Simard2015-12-111-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | The command will now default to the image currently in-use by the server, effectively making the --image parameter optional. This commit also adds basic tests for ServerRebuild since there wasn't any. Will add more full tests for it. Change-Id: I733fd3ad5a825f06563c72aa430122e1a0e3b3b0 Closes-bug: #1524406 Co-Authored-By: David Moreau Simard <dms@redhat.com> Co-Authored-By: Tang Chen <tangchen@cn.fujitsu.com>
* | Refactor network endpoint enablement checkingRichard Theis2016-01-041-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the network endpoint enablement checking from the 'server create' command to the common client manager. This allows future network commands to use either nova or neutron networking based on the cloud environment. This patch set also includes related unit test enhancements to the common client manager to trigger authentication on the tests. Change-Id: Ia37e81d4fb05a1e2fceb3e5d367bda769ab8e64b Related-Bug: #1519511 Related-to: blueprint neutron-client
* | Trivial: Remove useless return from files in compute.Tang Chen2015-12-171-2/+0
|/ | | | Change-Id: I9dc6749256fcd53d292d7f658912c032e9ce9df5
* SDK integration extensions and server create networksTerry Howe2015-12-091-13/+6
| | | | | | | Finish up the SDK integration with server create network and port find and extension list. Change-Id: I18dbada784d8aa92a45a937f251023ddf899c53e
* Merge "Trivial: Import network.common as network_common in server.py"Jenkins2015-12-051-9/+13
|\
| * Trivial: Import network.common as network_common in server.pyTang Chen2015-12-061-9/+13
| | | | | | | | | | | | | | | | In server.py, identity.common is imported as identity_common. But network.common is imported as common, which is confuseing. This patch imports network.common as network_common. Change-Id: I74295bc88b22de398ab64fe556aedaca2453d17d
* | Merge "Trivial: Improve doc for "server create" command"Jenkins2015-12-051-4/+4
|\ \ | |/ |/|
| * Trivial: Improve doc for "server create" commandTang Chen2015-12-041-4/+4
| | | | | | | | | | | | | | | | | | The following options of "server create" command support searching by both name and ID. So add this info into doc. --image, --volume, --flavor, --security. Change-Id: I93b167da58144e5de6c9996009b7ea2449fb4cd8
* | Support "server list" searching by both image name and ID.Tang Chen2015-12-011-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | Nova API only supports list servers searching by image ID. In OSC, we can support both image name and ID by mapping the name to ID. This patch also fix the inconsistent doc in .py and .rst files. Closes-Bug: 1521492 Change-Id: I70613843f82d74732bd32a457cd4a31aba57825f
* | Support "server list" searching by both flavor name and ID.Tang Chen2015-12-011-2/+9
|/ | | | | | | | | | | | Nova API only supports list servers searching by flavor ID. In OSC, we can support both flavor name and ID by mapping the name to ID. This patch also fix the inconsistent doc in .py and .rst files. Partial-Bug: 1521492 Change-Id: I1d1a6aa91aef4e2846745babe8382481185fa96e
* Merge "Add --limit option to "server list" command."Jenkins2015-12-011-1/+12
|\
| * Add --limit option to "server list" command.Tang Chen2015-12-011-1/+12
| | | | | | | | | | | | This option will limit the total amount of items the command will list up. Change-Id: I46af0d479d795ebb6a74585d0f76629dd940b117
* | Merge "Add --marker option to "server list" command."Jenkins2015-11-301-1/+16
|\ \ | |/
| * Add --marker option to "server list" command.Tang Chen2015-12-011-1/+16
| | | | | | | | | | | | | | This option will give user a chance to display the server list from wherever they want. Change-Id: I92cca5e98cd473f1113a9106eb9d1f490694b1fe
* | Add "openstack server unshelve" into OSCxiexs2015-11-281-25/+50
|/ | | | | | | | The unshelve operation is not supported by OSC, and this patch tries to add it. Change-Id: Ic60a4616cb63ad21c1a3c8e02611da8bad3a8bd0 Implements: blueprint introduce-shelve-into-osc
* Merge "Add "openstack server shelve" into OSC"Jenkins2015-11-241-0/+25
|\
| * Add "openstack server shelve" into OSCxiexs2015-11-241-0/+25
| | | | | | | | | | | | | | | | Currently, the shelve operation is not supported by OSC. So, this patch attempts to add it into OSC. Change-Id: I92545300bef006a069338168d2de800e8a58af69 Implements: blueprint introduce-shelve-into-osc
* | Enable "openstack server resume" command to take multiple servers.Tang Chen2015-11-241-6/+8
| | | | | | | | | | | | | | | | | | Current "openstack server resume" command could only resume one server. Improve it to be able to handle more than one servers. Also improve the doc to reflect the new feature. Change-Id: I726eb86bfa3df3a9911f45770e6641264dbc1e0b Implements: blueprint cmd-with-multi-servers
* | Enable "openstack server suspend" command to take multiple servers.Tang Chen2015-11-241-6/+8
|/ | | | | | | | | Current "openstack server suspend" command could only suspend one server. Improve it to be able to handle more than one servers. Also improve the doc to reflect the new feature. Change-Id: Ic0417ee28f46c9198a35744c0180342e61966b26 Implements: blueprint cmd-with-multi-servers
* Merge "Enable "openstack server unlock" command to take multiple servers."Jenkins2015-11-171-6/+8
|\
| * Enable "openstack server unlock" command to take multiple servers.Tang Chen2015-11-131-6/+8
| | | | | | | | | | | | | | | | | | Current "openstack server unlock" command could only unlock one server. Improve it to be able to handle more than one servers. Also improve the doc to reflect the new feature. Change-Id: Ibf57b2021a504da950a491d63139a438087aed0b Implements: blueprint cmd-with-multi-servers
* | Merge "Enable "openstack server lock" command to take multiple servers."Jenkins2015-11-161-6/+8
|\ \ | |/
| * Enable "openstack server lock" command to take multiple servers.Tang Chen2015-11-131-6/+8
| | | | | | | | | | | | | | | | | | Current "openstack server lock" command could only lock one server. Improve it to be able to handle more than one servers. Also improve the doc to reflect the new feature. Change-Id: Ifcf103b1c32e6c547ac09f688b887b1c03f92b09 Implements: blueprint cmd-with-multi-servers
* | Merge "Enable "openstack server unpause" command to take multiple servers."Jenkins2015-11-161-6/+8
|\ \ | |/
| * Enable "openstack server unpause" command to take multiple servers.Tang Chen2015-11-131-6/+8
| | | | | | | | | | | | | | | | | | Current "openstack server unpause" command could only unpause one server. Improve it to be able to handle more than one servers. Also improve the doc to reflect the new feature. Change-Id: I069ebdd6dcd121f6e55c2bf40d42197f93830e0c Implements: blueprint cmd-with-multi-servers
* | Merge "Improve "server list" command to have the same output as "nova list"."Jenkins2015-11-131-2/+43
|\ \
| * | Improve "server list" command to have the same output as "nova list".Tang Chen2015-11-141-2/+43
| |/ | | | | | | | | | | | | | | | | | | | | "nova list" will also output "Task State" and "Power State" by default. This patch improves "server list" command to have the same columns, but not by default. These two columns will be output if --long is added. The power state is an int, so also adds a formatter helper function to translate it to human readable string, just as "Networks" does. Change-Id: I0530a910bec03835839a5ba7687c66d5643338f3
* | Split the vol_id from a dev mappingxiexs2015-11-111-4/+11
|/ | | | | | | Add a split into the dev mapping to get the right vol_id. Change-Id: I1a7bf6351491b1321c5ca0fa4a27f29825400eaf Closes-Bug: #1514394
* Enable "openstack server pause" command to take multiple servers.Tang Chen2015-11-091-7/+8
| | | | | | | | | Current "openstack server pause" command could only pause one server. Improve it to be able to handle more than one servers. Also improve the doc to reflect the new feature. Change-Id: I809f77f0720457c9cdc1028a70b391c75885984c Implements: blueprint cmd-with-multi-servers
* Fix a bug about "openstack server list --user"xiexs2015-11-061-1/+1
| | | | | | | Fix the bug to get the right user id. Change-Id: Ie60a719a40654802772884ff94271b37aa061ac3 Closes-Bug: #1513701
* Merge "Trivial: Fix wrong comment of _format_servers_list_networks()."Jenkins2015-11-051-1/+1
|\
| * Trivial: Fix wrong comment of _format_servers_list_networks().Tang Chen2015-11-061-1/+1
| | | | | | | | | | | | The parameter name should be 'networks'. Change-Id: I140c3d61dccbbec40c14bd7a8f2aeac0eb24384d
* | Add "server stop" command to osc.Tang Chen2015-11-051-0/+25
| | | | | | | | | | | | | | There is no stop command in osc. Add it. Change-Id: Ia11a8f3b1245c884f7da442292009342d2ffde1e Implements: blueprint cmd-with-multi-servers
* | Add "server start" command to osc.Tang Chen2015-11-051-0/+25
|/ | | | | | | There is no start command in osc. Add it. Change-Id: Ic50f83413ab17c53396065aabb3f5a1506b52959 Implements: blueprint cmd-with-multi-servers
* Trivial clean up: do not use plural form in command arguments.Tang Chen2015-10-241-2/+2
| | | | | | | | It is a general rule that we don't use plural form for the name of command arguments. But class DeleteServer() is still using "servers". So use "server instead". Change-Id: I2d76de14ec34b88547b9f728b41e9bd93b2a22c5
* Merge "Use a common decorator to log 'take_action' activation"Jenkins2015-09-111-20/+20
|\
| * Use a common decorator to log 'take_action' activationJoshua Harlow2015-09-011-20/+20
| | | | | | | | | | | | | | | | | | Instead of duplicating the same log statement throughout the code, the same logic can be provided by a shared decorator that abstracts away the logging capability and unifies it behind a common function instead. Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
* | Merge "Add filtering by user for 'openstack server list'"Jenkins2015-09-101-1/+16
|\ \
| * | Add filtering by user for 'openstack server list'kafka2015-09-081-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new option to search by user when listing servers, include support for domain scoped users, also update docs Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com> Closes-Bug: #1483974 Change-Id: Ifdade6dc9ca8400fbd85f6b55793ab15ed17b97d
* | | Merge "Add support for listing servers of other projects"Jenkins2015-09-101-0/+18
|\ \ \ | |/ /
| * | Add support for listing servers of other projectsAshish Singh2015-09-081-0/+18
| |/ | | | | | | | | | | | | | | | | | | Added project and project-domain option to server list command for listing servers based on project name or id Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com> Change-Id: Iaadfffe734ad8a72fa4b1eeb2222748c66f7fae0 Closes-Bug: #1488486
* | Ignore flavor and image find errors on server showTerryHowe2015-08-281-4/+10
|/ | | | | | | | | | If there is an error finding an image or a flavor during image show, ignore it and just print the id of the flavor or image. This code is also used during server create and server rebuild, but only to display the results. Change-Id: I5362158ab8ffc3e5a0800904d6ea15420c3a8627 Closes-bug: #1489901
* Fix address parsing for server ssh commandTerryHowe2015-07-081-15/+37
| | | | | | | | | There seem to be three formats for the server address field and the old code only supported the old format. This code adds a parser for all three formats. Change-Id: I7f12d2c69ff70556907ea6f31a0e0bba91b68b49 Closes-Bug: #1469843
* Add --wait to server deleteMatt Riedemann2015-05-291-0/+17
| | | | | | | | | | | | | | This allows the server delete command to wait for the server to be deleted (obviously). The wait method is the same model that Tempest uses, i.e. wait for a 404 on server GET (successful deletion), fail if the server went to ERROR status, or fail if a timeout is reached. The default timeout of 300 seconds is also what Tempest uses. Closes-Bug: #1460112 Change-Id: I0e66c400903e82832944d1cad61e7eb30177c3e8
* Fix client error while rescuing an instanceAmey Bhide2015-05-221-3/+3
| | | | | | | | Typo server._info -> server Closes-Bug: #1457983 Change-Id: I606505d73b3aae90bac636e960275926284b4ea6
* Update the docs for new nic optionsSteve Martinelli2015-04-191-1/+1
| | | | Change-Id: I4c8b93ede80f993eab8badfbba6bf1c530844d54
* Better help for --nic in create serverDavanum Srinivas2015-04-151-2/+9
| | | | | | | | Use the help string from python-novaclient for a better user experience. Closes-Bug: #1444685 Change-Id: If7b8e3f68a0c6ad82b9959f162670b5568d5d12d