summaryrefslogtreecommitdiff
path: root/openstackclient/compute
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Refactor unit test of "compute service list" commandHuanxuan Ao2016-06-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit test of "compute service list" only checked the "Disabled Reason" columns and its data. It is not enough. This patch change the test to check all datas in the list. Also, this patch modify the "Id" to "ID" in this command. Change-Id: I988fd6365f2652185dd96d9417f294eba9c31cd9
* | | Merge "Make set/unset commands in compute/image/common return normally when ↵Jenkins2016-06-221-6/+0
|\ \ \ | |/ / |/| | | | | nothing specified"
| * | Make set/unset commands in compute/image/common return normally when nothing ↵Tang Chen2016-06-211-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified After this patch, all set/unset commands will return normally when nothing specified. Change-Id: Id94d0329faa1a674006a9aae901f834b41917317 Close-bug: #1588588
* | | Merge "Support bulk deletion for "flavor/aggregate delete""Jenkins2016-06-222-12/+45
|\ \ \
| * | | Support bulk deletion for "flavor/aggregate delete"Huanxuan Ao2016-06-212-12/+50
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Support bulk deletion and error handling for "aggregate delete" and "flavor delete" commands. Change-Id: I3f6105cbeeab1c9f8cd571c63ce0e7ac3d4252b3 Partially-Implements: blueprint multi-argument-compute Partial-Bug: #1592906
* | | Add "--project" option to the "flavor create" command.Huanxuan Ao2016-06-211-0/+26
| |/ |/| | | | | | | | | | | | | Add ``--project`` and ``--project-domain`` options to the ``flavor create`` command. We can use these options to add the flavor access to a givin project when we create the flavor. Change-Id: Ic1907272c1d1ae526f9c9e86f32ba06c6da147c0
* | Merge "Standardize logger usage"Jenkins2016-06-206-37/+59
|\ \
| * | Standardize logger usageTang Chen2016-06-206-37/+59
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use file logger for all command specific logs. This patch also fixes some usage that doesn't follow rules in: http://docs.openstack.org/developer/oslo.i18n/guidelines.html After this patch, all self.log and self.app.log will be standardized to LOG(). NOTE: In shell.py, we got the log in class OpenStackShell, which is also known as self.app.log in other classes. This logger is used to record non-command-specific logs. So we leave it as-is. Change-Id: I114f73ee6c7e84593d71e724bc1ad00d343c1896 Implements: blueprint log-usage
* | Merge "Fix console url show command broken in microversion case"Jenkins2016-06-201-3/+9
|\ \
| * | Fix console url show command broken in microversion caseRui Chen2016-06-161-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The response data of nova get_xxx_console API is changed from "console" to "remote_console" in microversion 2.6, and nova server side API schema verify the spice vnc type to "spice-html5", update OSC code to apply these change so that OSC can work in different nova microversion cases. Change-Id: I3bb4fe057e656209d00d2bb308ac3f7f837cb03f Closes-Bug: #1590318
* | | Use osc_lib in server_image.pyTang Chen2016-06-201-3/+3
| |/ |/| | | | | | | | | | | server_image.py is a newly created file. So I think we forgot to use osc_lib in it. Change-Id: Ieda13438662ea55b03f549108aac63c18b9af913
* | Merge "Move server image create command to its own resource file."Jenkins2016-06-162-74/+111
|\ \ | |/ |/|
| * Move server image create command to its own resource file.Dean Troyer2016-06-032-74/+111
| | | | | | | | Change-Id: If37e82072bd7a32b81bfb1a8bb048f018dd5b04f
* | Merge "Support compute service force down/up"Jenkins2016-06-151-16/+53
|\ \
| * | Support compute service force down/upRui Chen2016-06-141-16/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | Aims to evacuate servers from compute host as soon as possible, operators might set the compute service force down manually. Novaclient support the behavior, this patch support it in OSC. Change-Id: I22ff1c5d670c449771fdcb3f4f39cd82f428531a Closes-Bug: #1589348
* | | Fix foundation copyrightsDean Troyer2016-06-144-4/+4
|/ / | | | | | | | | | | | | | | The OpenStack LLC copyrights date from before OpenStack was transferred to the foundation. These appear to be getting copy-pasted to new files so at least should reflect the correct entity. Change-Id: I02953d752cb24ead6aa4ad8bfe257a48317c9f13
* | osc-lib: commandDean Troyer2016-06-1316-19/+16
| | | | | | | | | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* | osc-lib: parseractionsDean Troyer2016-06-134-4/+4
| | | | | | | | | | | | | | Leave parseractions.py and test_parseractions.py as a sanity check during the deprecation period. Change-Id: I1a7469b6d872284e0276502a1a287bc0b87f8f83
* | osc-lib: utilsDean Troyer2016-06-1316-17/+24
| | | | | | | | | | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* | osc-lib: exceptionsDean Troyer2016-06-138-11/+15
| | | | | | | | | | | | | | | | Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
* | Merge "Fix compute service set command"Jenkins2016-06-081-1/+1
|\ \
| * | Fix compute service set commandsunyajing2016-06-081-1/+1
| | | | | | | | | | | | | | | | | | add ``Binary name`` to help msg of compute service set command. Change-Id: I5ed3824ec5bede250ce41f187835e8901b5e11fd
* | | Merge "Refactor SetService --enable/disable option"Jenkins2016-06-061-15/+23
|\ \ \
| * | | Refactor SetService --enable/disable optionTang Chen2016-06-041-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the following: 1. --enable/disable option should follow the rules in the doc below: http://docs.openstack.org/developer/python-openstackclient/command-options.html#boolean-options 2. "--disable-resion" is specified but not "--disable", an exception is raised instead of igoring "--disable-reason" option. Change-Id: I92e9234111e661bfe7119a8e19389a87c874ab0c
* | | | Merge "Add newline to strings in stdout/stderr.write()"Jenkins2016-06-061-1/+1
|\ \ \ \
| * | | | Add newline to strings in stdout/stderr.write()Lu lei2016-06-061-1/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | Function stdout/stderr.write() can't break line automatically. Change-Id: I903c2d1cc1a669adb6be5aa4eb783d3b9943e685
* | | | Merge "fix keypair help msg"Jenkins2016-06-061-2/+2
|\ \ \ \
| * | | | fix keypair help msgsunyajing2016-06-061-2/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | keypair delete and keypair show commands cannot work on keypair ID Change-Id: I958fcd2ed184706b28d63cc9c73a8b566e86a16c Closes-Bug:#1588701
* | | | modify server groupsunyajing2016-06-061-9/+1
| |/ / |/| | | | | | | | | | | | | | make column_headers equal to columns, to keep code consistence Change-Id: Ia96b398ad822fc5fac3753e28709c370165bda8a
* | | Merge "Support multiple argument for compute agent delete command"Jenkins2016-06-051-3/+19
|\ \ \ | |_|/ |/| |
| * | Support multiple argument for compute agent delete commandsunyajing2016-06-031-3/+19
| | | | | | | | | | | | | | | Change-Id: I3b19e4914d475b86d7e8aa8d76e62a2ac811272f Partially-Implements: blueprint multi-argument-compute
* | | Fix some missing i18n support problems in computeHuanxuan Ao2016-06-031-9/+9
| |/ |/| | | | | | | | | | | Found and Fix some missing i18n support problems in compute/client.py Change-Id: I54374f4eddafd9f80b6ccdaf8f8c30e098df105e Partial-bug: #1574965
* | Merge "Add support for removing flavor-access"Jenkins2016-06-021-5/+47
|\ \ | |/ |/|
| * Add support for removing flavor-accessHuanxuan Ao2016-06-021-5/+47
| | | | | | | | | | | | | | | | Add "--project" and "--project-domain" options in "flavor unset" command to remove flavor access. Change-Id: Ia5c5a80d9890d5af066b75b4e202647c18c7d915 Partial-Bug: #1575461
* | Merge "Fix output and error log in server.py"Jenkins2016-05-311-9/+17
|\ \ | |/ |/|
| * Fix output and error log in server.pyTang Chen2016-05-281-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes 2 problems: 1. The '\n' should be in the end of a message, not the beginning. i.e.: The original code was: sys.stdout.write(_('\nError deleting server')) It will make the output look like this: [root@tangchen /]# openstack server delete aaa bbb Error deleting server Error deleting server[root@tangchen /]# We change it to: sys.stdout.write(_('Error deleting server\n')) Then the output will become: [root@tangchen /]# openstack server delete aaa bbb Error deleting server Error deleting server [root@tangchen /]# which is much better. 2. Record the error in log for those who didn't. Change-Id: I38b00c2321014757970183205f95f026e20a8090
* | Merge "Add support for setting flavor-access"Jenkins2016-05-301-4/+48
|\ \
| * | Add support for setting flavor-accessHuanxuan Ao2016-05-301-4/+48
| |/ | | | | | | | | | | | | | | This patch adds "--project" option in "flavor set" command to support for setting flavor access. Change-Id: I75b473600080d8ab1dd6ad01561c4f989ed3c3bd Partial-Bug: #1575461
* | Merge "[compute] Add server backup function"Jenkins2016-05-301-0/+134
|\ \
| * | [compute] Add server backup functionjichenjc2016-05-271-0/+134
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add server backup function There is no return value for this command per following doc http://developer.openstack.org/api-ref-compute-v2.1.html#createBackup, also novaclient can't be updated now due to backward compatible issue http://lists.openstack.org/pipermail/openstack-dev/2016-March/089376.html, so we have to get the information ourselves. The Image tests were not using warlock images, so that needed to be fixed before we could completely test things like --wait. Change-Id: I30159518c4d3fdec89f15963bda641a0b03962d1
* | Support to set server stateRui Chen2016-05-281-0/+9
| | | | | | | | | | | | | | | | | | | | When a server is unexpected state, OSC don't support reset the server to active or error state, that's supported by novaclient, and it's an important command for operators, the patch implement this function. Change-Id: I3e7800feb192832b0719ef9a353945beb6bfd509 Implements: blueprint server-reset-state
* | Fix help message for "server group delete" commandHuanxuan Ao2016-05-281-1/+1
|/ | | | | | | | "Server group delete" command supported deleting multi server groups, but the help message was "Delete an existing server group", so I change it in this patch. Change-Id: I05b1a7e3f29b84b9190e7cc05c01734e3daa7a6d
* Fix i18n support for help and error messages in computeTang Chen2016-05-2411-133/+184
| | | | | Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f Partial-bug: #1574965
* Merge "remove #noqa from i18n imports"Jenkins2016-05-192-2/+2
|\
| * remove #noqa from i18n importsSteve Martinelli2016-05-132-2/+2
| | | | | | | | | | | | hacking checks no longer fail on `import _` Change-Id: Idd60f0a0e71e5081691eacb39e5091ab08fcce6d
* | Merge "Support X.latest format for OS_COMPUTE_API_VERSION"Jenkins2016-05-161-19/+26
|\ \ | |/ |/|
| * Support X.latest format for OS_COMPUTE_API_VERSIONRui Chen2016-04-201-19/+26
| | | | | | | | | | | | | | | | | | OSC don't support to use "X.latest" format in order to talk with the latest nova microversion API, that is very helpful shortcut usage to use new nova side features, this patch implement it. Change-Id: I87918addff1f50fbc6eb72ca82b31813330753b5 Closes-Bug: #1561838
* | Merge "Use find_resource() instead of get() in _prep_server_detail()"Jenkins2016-05-111-4/+1
|\ \
| * | Use find_resource() instead of get() in _prep_server_detail()Tang Chen2016-05-091-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is such a comment in test_server.py: # Call .get() to retrieve all of the server information # as findall(name=blah) and REST /details are not the same # and do not return flavor and image information. This is an out of date comment. There is no function named findall() in OSC now. So use find_resource() instead of get(), and remove this comment. Change-Id: I8d79afc5f341fb5caf771d905506b7f1c7a41ae8
* | | Map server power state num to meanful stringTang Chen2016-05-071-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | In _prep_server_detail(), power_state is not formatted by _format_servers_list_power_state(). So when executing "server show" or "server create", the power state is represented by number. This patch map the numbers to meanful strings. This patch also adds power_state attribute to FakeServer, and improves unit tests for this attribute. Change-Id: I2ec674327de4e5133b8712ba6bb53fa5ce55e3f4