summaryrefslogtreecommitdiff
path: root/openstackclient/tests/compute
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Pass security group id to novaclient while adding security group to ↵Jenkins2016-07-291-0/+48
|\ | | | | | | server"
| * Pass security group id to novaclient while adding securityRajasi Kulkarni2016-07-281-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Allow setting quotas for server groups and server group membersElena Ezhova2016-07-271-0/+4
| | | | | | | | | | | | | | | | Adds support of --server-groups and --server-group-members options to the "quota set" command. Change-Id: I178d1e267d010be7e908adefcf3b15abdafd9da4 Closes-Bug: #1602223
* | Merge "Use identity fake classes instead of old unit tests data"Jenkins2016-07-261-37/+25
|\ \ | |/ |/|
| * Use identity fake classes instead of old unit tests dataHuanxuan Ao2016-07-261-37/+25
| | | | | | | | | | | | | | | | | | Use FakeProject, FakeDomain and FakeUser classes instead of old test data in image, compute and volume. (This work has done in network) Change-Id: Ic37d5d9db98f0f2acc6c714a9646063dcbde4ff3 Partially-Implements: blueprint use-fake-project
* | Merge "Use assertEqual() instead of assertDictEqual()"Jenkins2016-07-261-1/+1
|\ \
| * | Use assertEqual() instead of assertDictEqual()Tang Chen2016-07-251-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | In unittest2, assertDictEqual() is implemented by using != operator to compare two dicts. So is assertEqual() in testtools. assertEqual() in testtools is able to handle dict, list, set and so on. So we just call assertEqual() to make the unit tests simpler. Change-Id: Ice343b2ce468acae39d2ad79f7121503e3627656
* | Merge "Standardize import format"Jenkins2016-07-261-1/+1
|\ \ | |/ |/|
| * Standardize import formatshizhihui2016-07-221-1/+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-1/+14
|\ \
| * | "server list": "Image Name", "Image ID" columnsMarc Abramowitz2016-07-061-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+47
|\ \ \
| * | | Support to get server rdp/serial/mks type console urlRui Chen2016-07-211-0/+47
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Add Support for showing flavor access list"Jenkins2016-07-222-1/+73
|\ \ \ | |/ / |/| |
| * | Add Support for showing flavor access listHuanxuan Ao2016-07-222-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "Add unit tests for "host list" and "host show" commands"Jenkins2016-07-212-1/+111
|\ \ \ | |/ / |/| |
| * | Add unit tests for "host list" and "host show" commandsHuanxuan Ao2016-06-272-1/+111
| | | | | | | | | | | | | | | | | | | | | Missing unit tests for "host list" and "host show" commands in computev2, this patch add them. Change-Id: Ib157920fa2267ec96d206cdf46213563a105501b
* | | Merge "Pass security group id to novaclient"Jenkins2016-07-181-0/+53
|\ \ \
| * | | Pass security group id to novaclientRajasi Kulkarni2016-07-111-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-9/+64
|\ \ \ \ | |/ / / |/| | |
| * | | Modify compute agent set commandsunyajing2016-07-111-9/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate ``compute agent set`` arguments: version, url, md5hash to be optional. BackwardsIncompatibleImpact Change-Id: I092b7ed24274bafa548f0537c4586504be3a2825 Co-Authored-By: Huanxuan Ao <huanxuan.ao@easystack.cn>
* | | | Add notes, modify notes in fakes docstringzheng yin2016-07-081-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some code has no notes, then add them Some code notes are not perfect, then improve them Some code notes are incorrect, then modify them Change-Id: I43f9a8663ae138bdd494bc234c1fac00c2dd6c95
* | | | modify notes in the FakeHypervisorStats docstringzheng yin2016-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The arugments should be: count and current_workload Change-Id: I445d1d72d1f1b86a626bb4c9512cdb8311b2ebc9
* | | | Merge "Transfer "ip fixed add/remove" to "server add/remove fixed ip""Jenkins2016-07-061-0/+71
|\ \ \ \
| * | | | Transfer "ip fixed add/remove" to "server add/remove fixed ip"Tang Chen2016-07-041-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-061-0/+67
|\ \ \ \ \ | |/ / / /
| * | | | Transfer "ip floating add/remove" to "server add/removeTang Chen2016-07-041-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+51
|\ \ \ \ \ | |/ / / / | | | | / | |_|_|/ |/| | |
| * | | Transfer "ip floating pool list" to "floating ip pool list"Tang Chen2016-07-041-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | fix a few spelling mistakesgecong19732016-07-043-6/+6
|/ / / | | | | | | | | | | | | | | | | | | - overwriten should be overwritten - retrun should be return Change-Id: I1567402f4d5c7253e6a54d8753e3f201af7e6a54
* | | Merge "Add "--property" option to "flavor create" command"Jenkins2016-06-302-4/+17
|\ \ \ | |/ / |/| |
| * | Add "--property" option to "flavor create" commandHuanxuan Ao2016-06-292-4/+17
| |/ | | | | | | | | | | | | | | Add "--property" option to "flavor create" command to support adding properties to a new falvor. Change-Id: I4f06b364375d5a81584fe41122d48e9568fa712a Closes-Bug: #1596798
* | Support bulk deletion for delete commands in computev2Huanxuan Ao2016-06-273-11/+125
|/ | | | | | | | | | | 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
* Merge "Fix errors for "host set" command"Jenkins2016-06-232-8/+7
|\
| * Fix errors for "host set" commandHuanxuan Ao2016-06-222-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "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-232-7/+40
|\ \
| * | Refactor unit test of "compute service list" commandHuanxuan Ao2016-06-222-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+11
|\ \ \ | |/ / |/| | | | | nothing specified"
| * | Make set/unset commands in compute/image/common return normally when nothing ↵Tang Chen2016-06-211-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-223-21/+140
|\ \ \
| * | | Support bulk deletion for "flavor/aggregate delete"Huanxuan Ao2016-06-213-21/+140
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | 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-1/+27
| |/ |/| | | | | | | | | | | | | 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-201-9/+6
|\ \
| * | Standardize logger usageTang Chen2016-06-201-9/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+149
|\ \
| * | Fix console url show command broken in microversion caseRui Chen2016-06-161-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+3
| |/ |/| | | | | | | | | | | server_image.py is a newly created file. So I think we forgot to use osc_lib in it. Change-Id: Ieda13438662ea55b03f549108aac63c18b9af913
* | Merge "Modify unit tests of compute agent delete"Jenkins2016-06-171-0/+10
|\ \
| * | Modify unit tests of compute agent deletesunyajing2016-06-081-0/+10
| | | | | | | | | | | | | | | | | | add no-input test to ``compute agent delete`` unit tests. Change-Id: Iee22b75c9a9431e57cb634dc28a5efa9b43b7369
* | | Merge "Move server image create command to its own resource file."Jenkins2016-06-162-144/+227
|\ \ \ | |_|/ |/| |