summaryrefslogtreecommitdiff
path: root/openstackclient/compute
Commit message (Collapse)AuthorAgeFilesLines
* Fix --shared/block-migration options in server migrate commandnewton-eolstable/newtonCedric Brandily2017-07-051-8/+8
| | | | | | | | | | | | | Currently, --shared-migration and --block-migration options effects are reversed: --block-migration requests a migration with share, --shared-migration a block-migration. This change corrects OSC implementation and clarifies arguments passed to novaclient (the root cause of the bug). Change-Id: Ib682cff0c44d3b1304670f8606907b1762d8b1e7 Closes-Bug: #1518059 (cherry picked from commit 694a24c3093f5b2595b63ccf988da7972e532084)
* Use image client for images instead of computeArtom Lifshitz2017-02-061-8/+12
| | | | | | | | | | | | | | With the deprecation of the Nova proxy APIs in microversion 2.36 [1], any operation that uses a microversion higher than 2.36 and works with images will fail because the /images endpoint will return 404. This patch updates openstackclient to query images using the image client in places where previously the compute client was used. [1] http://docs.openstack.org/developer/nova/api_microversion_history.html#id33 Change-Id: Ia66e44e530799ce6531922dcf6a84e38528c8725 Closes-bug: 1630161 (cherry picked from commit 98f803e0f0e622e7770cfab52e99168f6a68f427)
* osc-lib: shellDean Troyer2016-08-051-2/+2
| | | | | | | | | | | | | Convert to using ClientManager and OpenStackShell from osc-lib. * Change all internal uses of ClientManager private attributes that are now public in osc-lib's ClientManager. Leave back-compat copies in place in OSC's clientManager so we don't break plugins. * Put some work-arounds in place for changes in osc-lib that we need until a new release makes it through the g-r and u-c change process. * Add a test for Unicode decoding of argv in shell.main() to parallel the one in osc-lib. Change-Id: I85289740d4ca081f2aca8c9b40ec422ad25d302c
* Pass security group id to novaclient while adding securityRajasi Kulkarni2016-07-281-1/+1
| | | | | | | | | | | | | | group to server In AddServerSecurityGroup, we currently pass the security group name to novaclient. If multiple security groups with same name exist, then even while passing secuity group using id to command 'openstack server add security group <server> <group>' it results in error 'Multiple security_group matches found'. Added unit test case to test the command. Change-Id: I6097eb36e1545c85209cfd767c477e10f82c6999 Closes-Bug: 1604076
* Merge "Standardize import format"Jenkins2016-07-261-2/+1
|\
| * Standardize import formatshizhihui2016-07-221-2/+1
| | | | | | | | | | | | | | | | According to the rule in http://docs.openstack.org/developer/hacking/#imports I modify some irregular import format. Change-Id: Ibf29ccaf3ddec4a956334cc3368ebee7a66e282c
* | Merge ""server list": "Image Name", "Image ID" columns"Jenkins2016-07-221-11/+42
|\ \
| * | "server list": "Image Name", "Image ID" columnsMarc Abramowitz2016-07-061-11/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `Image Name` column is shown by default (i.e.: without passing `--long`). E.g.: ``` $ openstack server list WARNING: openstackclient.common.utils is deprecated and will be removed after Jun 2017. Please use osc_lib.utils +--------------------------------------+-----------------+---------+----------------------+----------------------+ | ID | Name | Status | Networks | Image Name | +--------------------------------------+-----------------+---------+----------------------+----------------------+ | abe67035-b14f-4541-b436-e0e778ec4227 | n9anonw302mgm1 | ACTIVE | mnky3-3000=10.3.0.55 | Koala.2016-07-01-175 | | 8f6a2d12-2bc3-4d89-ba94-8916ce9cdf92 | n9anonw301mgm1 | ACTIVE | mnky3-3000=10.3.0.37 | Koala.2016-07-01-175 | | b316d6d1-67cf-4f75-94a4-4c9a2b03f6a4 | n9dobby301mgm0 | ACTIVE | mnky3-3000=10.3.0.36 | Koala.2016-05-04-130 | +--------------------------------------+-----------------+---------+----------------------+----------------------+ ``` The `Image ID` column is only available with `--long`. E.g.: ``` $ openstack server list --long -c Name -c "Image Name" -c "Image ID" WARNING: openstackclient.common.utils is deprecated and will be removed after Jun 2017. Please use osc_lib.utils +-----------------+----------------------+--------------------------------------+ | Name | Image Name | Image ID | +-----------------+----------------------+--------------------------------------+ | n9anonw302mgm1 | Koala.2016-07-01-175 | f587c6fc-1df3-42cd-ac86-8cd2c995a8d9 | | n9anonw301mgm1 | Koala.2016-07-01-175 | f587c6fc-1df3-42cd-ac86-8cd2c995a8d9 | | n9dobby301mgm0 | Koala.2016-05-04-130 | 37ff47a6-3e51-4986-bfa5-62afbfad5dfc | +-----------------+----------------------+--------------------------------------+ ``` Closes-Bug: #1599304 Change-Id: I477995b840eb9520b285948926ebbfe1777dd86c
* | | Merge "Support to get server rdp/serial/mks type console url"Jenkins2016-07-221-0/+27
|\ \ \
| * | | Support to get server rdp/serial/mks type console urlRui Chen2016-07-211-0/+27
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | The patch add the support to get server rdp/serial/mks type console url, that make osc capability equal with current nova server side feature. Change-Id: I3dee2531c68563725187c8251d5ea8d4c02cca0c Closes-Bug: #1605088
* | | Add Support for showing flavor access listHuanxuan Ao2016-07-221-0/+20
|/ / | | | | | | | | | | | | | | | | Add a attribute "access_project_id" for flavor object to display the access project id list by using "flavor show" command. Change-Id: I7f0c152b816e0ca2e32e47f9b5c1aa7663d33b6d Closes-Bug:#1575461
* | Merge "Pass security group id to novaclient"Jenkins2016-07-181-1/+1
|\ \
| * | Pass security group id to novaclientRajasi Kulkarni2016-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In RemoveServerSecurityGroup we currently pass the entire security group object, which results in TypeError in novaclient. Added unit test case to test command 'openstack server remove security group -h <server> <group>' Change-Id: I6d486403a83804c3a30d6f89d2cf7f64f09797c6 Closes-Bug: 1590883
* | | Merge "Modify compute agent set command"Jenkins2016-07-141-8/+28
|\ \ \ | |/ / |/| |
| * | Modify compute agent set commandsunyajing2016-07-111-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate ``compute agent set`` arguments: version, url, md5hash to be optional. BackwardsIncompatibleImpact Change-Id: I092b7ed24274bafa548f0537c4586504be3a2825 Co-Authored-By: Huanxuan Ao <huanxuan.ao@easystack.cn>
* | | fix one spelling mistake and two help messageszhengsenyan2016-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I checked all the 70 rst files in doc/source/command-objects and found that: -one spelling mistake as:rescure should be rescue(server.rst) -two help messages:xpvnc should be xvpvnc(console-url.rst and console.py) Change-Id: I6f46c79983eaf5650bd3aa0ab448c19f5c6527a9
* | | Merge "Transfer "ip fixed add/remove" to "server add/remove fixed ip""Jenkins2016-07-062-4/+87
|\ \ \
| * | | Transfer "ip fixed add/remove" to "server add/remove fixed ip"Tang Chen2016-07-042-4/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does the following things to transfer "ip fixed add/remove" to "server add/remove fixed ip": * Add new command "server add/remove fixed ip", and unit tests and doc. * Deprecate "ip fixed add/remove" command. compute/v2/fixedip.py is not removed because the arguments' positions are different between the new and old commands. * ip fixed add <network> <server> server add fixed ip <server> <network> * ip fixed remove <ip-address> <server> server remove fixed ip <server> <ip-address> Change-Id: Ica07ccf92a76c21fd5608ecaff86ff7c4d96f5a0 Implements: blueprint rework-ip-commands Partial-bug: 1555990 Co-Authored-By: Dean Troyer <dtroyer@gmail.com>
* | | | Merge "Transfer "ip floating add/remove" to "server add/remove floating ip""Jenkins2016-07-062-4/+85
|\ \ \ \ | |/ / /
| * | | Transfer "ip floating add/remove" to "server add/removeTang Chen2016-07-042-4/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | floating ip" This patch does the following things to transfer "ip floating add/remove" to "server add/remove floating ip": * Add new command "server add/remove floating ip", and unit tests and doc. * Deprecate "ip floating add/remove" command. compute/v2/floatingip.py is not removed because the arguments' positions are different between the new and old commands. * ip floating add <ip-address> <server> server add floating ip <server> <ip-address> * ip floating remove <ip-address> <server> server remove floating ip <server> <ip-address> Change-Id: Ic0dd22ca6fb7b7bc3e820fd5a14d7c551e7ab963 Implements: blueprint rework-ip-commands Partial-bug: 1555990 Co-Authored-By: Dean Troyer <dtroyer@gmail.com>
* | | | Merge "Transfer "ip floating pool list" to "floating ip pool list""Jenkins2016-07-061-36/+0
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | Transfer "ip floating pool list" to "floating ip pool list"Tang Chen2016-07-041-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does the following things to transfer "ip floating pool list" to "floating ip pool list": * Add a new command "floating ip pool list" to deprecate "ip floating pool list". The source code is in network/v2 dir. * Add doc for "floating ip pool list". * Add floating ip pool unit tests. Change-Id: Id410f4e4a96cf589a6e8def209574da71395b55f Implements: blueprint rework-ip-commands Partial-bug: 1555990 Co-Authored-By: Dean Troyer <dtroyer@gmail.com>
* | | Add missing '(name only)' message for keypair in computev2Huanxuan Ao2016-07-041-1/+1
|/ / | | | | | | | | | | | | | | | | In 'keypair show' command. One help message had '(name only)' but the doc had not. And another had not '(name only)' but the doc had. This patch Fixs them and keeps the consistent between doc and help message. Change-Id: Ic88219ae25a6f545a1db39e6b585e1857ae9e2e0
* | Merge "Add "--property" option to "flavor create" command"Jenkins2016-06-301-3/+18
|\ \ | |/ |/|
| * Add "--property" option to "flavor create" commandHuanxuan Ao2016-06-291-3/+18
| | | | | | | | | | | | | | | | Add "--property" option to "flavor create" command to support adding properties to a new falvor. Change-Id: I4f06b364375d5a81584fe41122d48e9568fa712a Closes-Bug: #1596798
* | Merge "Support bulk deletion for delete commands in computev2"Jenkins2016-06-282-5/+40
|\ \ | |/ |/|
| * Support bulk deletion for delete commands in computev2Huanxuan Ao2016-06-272-6/+41
| | | | | | | | | | | | | | | | | | | | | | Support bulk deletion and error handling for "keypair delete" and "service delete" commands in computev2. Up to now, all the delete commands in computev2 support bulk deletion. Change-Id: I6d5c960e9716188e56615514d0921618a15a88ec Partially-Implements: blueprint multi-argument-compute Partial-Bug: #1592906
* | Modify some unusual help messages in computev2Huanxuan Ao2016-06-273-8/+8
|/ | | | | | | | | | | | Some command help messages are unusual, for example: common help message for a list command: "list objects" unusual help message: "list obejcets command" I think we should keep help message consistent, so I modify the unusual help messages in computev2. Change-Id: Ic5f11eba1a4397949e85d91cc067519752e89bff
* Merge "Fix errors for "host set" command"Jenkins2016-06-231-10/+12
|\
| * Fix errors for "host set" commandHuanxuan Ao2016-06-221-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Host set" command cannot work. Because: 1.Host has no 'ID' attribute, so 'ID' attribute cannot be found in "host set" command. 2.value "True" and "Flase" are invalid in updata() method of host. 3.Some update functionalities is not supported in host API now. This patch solves the problems 1 and 2 in OSC. But the problem 3 is a API problem and can't be solved in OSC, only XenServer driver support to set enable/disable and maintenance host, it is a normal problem. After this patch the output of "host set" command is: The requested functionality is not supported. (HTTP 501) (Request-ID: req-14031fce-8c90-48a0-8492-dc8e3dd349f3) Just the same as the "host-update" command in novaclient. Change-Id: Ibe94c4d3d492d3d63355de803810edb988e1b4e9 Closes-Bug: #1594689
* | Merge "Refactor unit test of "compute service list" command"Jenkins2016-06-231-2/+2
|\ \
| * | 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