summaryrefslogtreecommitdiff
path: root/openstackclient/compute
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup for 3.8.0 releaseDean Troyer2017-01-261-2/+5
| | | | | | Release notes and proofreading cleanups. Change-Id: Iddc6a64e6ea3082aa220a2465793e6f7f2aecaa9
* Merge "Add options to "server list" command"Jenkins2017-01-261-0/+25
|\
| * Add options to "server list" commandjiahui.qiang2017-01-251-0/+25
| | | | | | | | | | | | | | Add "--deleted" and "--changes-since" options to "server list" command. Change-Id: Id94f6e5831a60b172b6cfcfca29b1d89de8db621 Closes-Bug:#1647242
* | Switch server create to block_device_mapping_v2Nikita Gerasimov2017-01-261-20/+32
|/ | | | | | | | | | | | | | | | | | | | | | | | | Current compute_client.servers.create() relies on block_device_mapping arg which is legacy[1]. "block_device_mapping" format require device_name which is leads to hard-coded hack in --volume key handler to KVM specific. "block_device_mapping_v2" format is more friendly to hypervisiors. Support of block_device_mapping_v2 appear in python-novaclient 2.16.0, openstackclient require at least 2.29.0 Makes options --volume and --block-device-mapping work simultaneously. Appends --block-device-mapping data even if --volume used. After bug 1383338 only --volume was taken when both are used. [1]http://docs.openstack.org/developer/nova/block_device_mapping.html NOTE(dtroyer): I moved the new test_boot_from_volume() functional test to Ie51b1c375c5940856ec76a5770df3c6bd18a3eba to test our previous behaviour. The only changes required to support the new behaviour should be that the empty_volume is now attached in that test. Change-Id: I7bac3d870dd9ca404093142f8bce22a62e49180d Closes-Bug: 1647406 Closes-Bug: 1497845
* Use image client for images instead of computeArtom Lifshitz2017-01-241-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
* Error in the return of command server show, createjiahui.qiang2017-01-171-0/+14
| | | | | | | | | | | | The raw output in the command 'openstack server create'(also in show) is used in display table directily. the item like os-extended-volumes:volumes_attached and security_groups needs to convert. the worry output: os-extended-volumes:volumes_attached | [{u'id': u'c3525de9-1cbf-4ac8-8b7a-ca295c46633b'}] security_groups | [{u'name': u'default'}] Change-Id: Id9db251c315f989e1dc5b1b6231ab328014213e3
* Fix flavor create help re swap size unitsPavlo Shchelokovskyy2017-01-121-2/+2
| | | | | | | | | | | nova actually expects and uses swap size in MB, while in openstackclient currently help states that swap must be specified in GB and passes this value to nova without changes. Fix the help string. Change-Id: I95f46246c072961ce77f818d80d75e6a51f728d0 Closes-Bug: #1656018
* Fix creating a private flavor with ID autoJens Rosenboom2017-01-051-1/+1
| | | | | | | | | When a private flavor is created with ID auto (=default) and a project is specified for it, instead of trying to add the project to the flavor called "auto" the ID of the newly created project should be used. Change-Id: I19f7a0ec26bd5d147f00ecba3312240e3601567e Closes-Bug: 1654221
* update server migrate '--wait' descriptionlicanwei2016-12-301-1/+1
| | | | | | | | 'Wait for resize to complete' ==> 'Wait for migrate to complete' Change-Id: I0e08968c0132f0a8e1ef1ce2e6179001315372c3
* Should support 'auto' and 'none' as network parameter when boot instancesKevin_Zheng2016-12-221-30/+36
| | | | | | | | | | Nova added support using 'auto' and 'none' as network parameters since microversion 2.37: http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/rest_api_version_history.rst#n389 we should also add support for this in OSC. Change-Id: I6e5f616dfa48895ebd13144effe9fda7cb94c649 Closes-bug: #1651288
* Modified API calls in os usagejiahui.qiang2016-12-081-1/+1
| | | | | | | We usually call v3 keystoneclient APIs for V2 OSC, this patch modified 'tenants' to 'projects'. Change-Id: Idbf74f098cd1386aa675c081480b89bbc11c8534
* translate all command help strings3.4.0Steve Martinelli2016-11-1716-77/+81
| | | | | | | | | | | | | | Leverage the new cliff command class attribute (_description) to get the help of a command, this allows us to mark strings for translation. We could not do this before since the help was grabbed from the docstring. This also depends on a new release of cliff and a bump to the minimum level in osc's requirements. Closes-Bug: 1636209 Depends-On: Id915f6aa7d95a0ff3dc6e2ceaac5decb3f3bf0da Change-Id: I8673080bb5625e8e3c499feaefd42dfc7121e96f
* Add --long option and more columns to the hypervisor list commandYan Xing'an2016-10-271-1/+11
| | | | | | | | | | Support --long option and more columns in output of hypervisor list command, including 'Hypervisor Type', 'Host IP', 'State', and 'vCPU Used', 'vCPUs', 'Memory MB Used', 'Memory MB' with --long option. Change-Id: I0c790c7835309dded03e230cf497168e19404537 Closes-Bug: #1637074
* Adds information about private key generation for instance accessAnne Gentle2016-10-251-11/+12
| | | | | | | - Also updated the help text in the command itself. Change-Id: Ib3d4f94ef415a3f12024d0d7c000d2de20de001b Partial-Bug: 1549410
* Fix --shared/block-migration options in server migrate commandCedric Brandily2016-10-111-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
* Merge "Support "--no" option in aggregate set"Jenkins2016-09-291-5/+28
|\
| * Support "--no" option in aggregate setRui Chen2016-09-241-5/+28
| | | | | | | | | | | | | | | | | | | | | | Supporting "--no-property" option will apply user a convenience way to clean all properties of aggregate in a short command, and this kind of behavior is the recommended way to devref. The patch add "--no-property" option in "aggregate set" command, and update related test cases and devref document. Change-Id: I7614a23c0db05144562330dc600dbab7d003d5d8 Implements: blueprint support-no-property-in-aggregate
* | Update default nova api version to 2.1qtang2016-09-281-1/+2
|/ | | | | | | | | | Ref:https://review.openstack.org/#/c/311653/ We should use 2.1 as the default nova version now The API_MIN_VERSION of novaclient has already changed to 2.1 Change-Id: I9ff16cf052556e5d3756f81e02a8e76e8f315df5 Closes-bug: #1588171
* Correct login name deduction in SshServerCedric Brandily2016-09-151-1/+1
| | | | | | | | | Currently SshServer ("server ssh" command) raises an AttributeError if no explicit login is provided because it uses an attribute which no more exists. Change-Id: I86f68230037d51efb41aca62e07e058733ecd67a Closes-Bug: #1624085
* Display hypervisor information without uptimeHironori Shiina2016-09-111-12/+17
| | | | | | | | | | | | | | Some virt drivers such as ironic virt driver doesn't implement a method to get host uptime. For such drivers, hypervisor show command displays no information although these drivers provides other host information. This patch fixes the command to display hypervisor information in case where a virt driver doesn't provide host uptime by ignoring a HTTPNotImplemented exception. Change-Id: I7bcca5862cd9c05aadaf6192cb80aa651cd77cad Closes-Bug: 1612065
* Fix regular expression for uptime in hypervisor showHironori Shiina2016-09-111-2/+3
| | | | | | | | | | | | Hypervisor show command has a few bugs as follows. - It doesn't trim an extra whitespace in the head of uptime information. - It doesn't display uptime information when the number of user is 1. This patch fixes the regular expression to match uptime information. Change-Id: Ic2f7fd9a9274466717084a0886f95f78e98a9007 Closes-Bug: 1611809
* 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
|\ \