summaryrefslogtreecommitdiff
path: root/openstackclient/compute/v2/server_group.py
Commit message (Collapse)AuthorAgeFilesLines
* Blacken openstackclient.computeStephen Finucane2023-05-101-5/+8
| | | | | | | | | | Black used with the '-l 79 -S' flags. A future change will ignore this commit in git-blame history by adding a 'git-blame-ignore-revs' file. Change-Id: I9af45c062d179ab3dc2a5e969e1c467932753a2b Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Migrate server_groups to the new APIViolet Kurtz2022-08-021-45/+58
| | | | | | Moved the server_groups to the new API. Change-Id: Ied7bd6f56e277f0c5efcd5ba028765f9be65050f
* compute: Add missing options for 'server group list'Stephen Finucane2021-01-211-1/+37
| | | | | | | | | Add pagination parameters, '--limit' and '--offset'. It's unfortunate that we can't use '--marker' like elsewhere but that requires server-side support to be truly effective. Change-Id: I186adc8cdf28e9c540ad22bca6684d9dd892976a Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* compute: Add 'server group create --rule' optionStephen Finucane2021-01-061-21/+49
| | | | | | | This closes the remaining gap with the 2.64 compute API microversion. Change-Id: Ia42b23d813b7af6ddb1a41f4e9bdc8a6160b908c Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* compute: Fix 'server group * -f yaml' outputStephen Finucane2021-01-061-11/+16
| | | | | | | | | Make use of 'FormattableColumn'-derived formatters, which provide better output than what we were using before, particularly for the YAML output format. Change-Id: Id6d25a0a348596d5a0430ff7afbf87b049a76bc8 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Validate 'server group create --policy' optionStephen Finucane2020-10-131-5/+20
| | | | | | | | | We were documenting that some of these policies were only supported with specific microversions, however, we weren't actually enforcing that, leading to a poor user experience. Correct this. Change-Id: Ic3c555226a220efd9b0f27edffccf6c4c95c2747 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Merge "Add API check for server_groups.create"Zuul2020-09-301-2/+6
|\
| * Add API check for server_groups.createLewis Denny2020-08-261-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The policies field has been replaced with the policy field since Nova API version 2.64[1] This commit adds a check to make sure the correct field is used. [1]https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id59 Change-Id: I06d3211937d822c26070b7f8ad757c365dcbb1bb Story: #2007822 Task: #40101
* | Add API check for server_groups.listLewis Denny2020-08-211-2/+7
|/ | | | | | | | | | | | | The policies parameter has been replaced with the policy parameter since Nova API version 2.64[1] This commit adds a check to make sure the correct parameter is used. [1]https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id59 Change-Id: Ia37beb7790884d6d15bec45074f446e64af1a2aa Story: #2008041 Task: #40703
* Remove hard-coded policy choices for creating a server groupMatt Riedemann2017-11-191-2/+3
| | | | | | | | | | | The hard-coded choices for the server group policy make it impossible to create a server group with the soft-affinity or soft-anti-affinity policy rules which were added in compute API microversion 2.15. This removes the hard-coded choices so that the policy is restricted on the server side rather than the client side. Change-Id: Ib3dc39422ac1015872d56ae2fdeddf0f29613494 Closes-Bug: #1732938
* Add choices for option '--policy'zhiyong.dai2016-11-271-4/+5
| | | | | | | | | | When creating server group, the '--policy' option is required, but valid choice is 'affinity' or 'anti-affinity', adding multiple policies will produce an error. This patch add choices and default value for option '--policy', and remove the former help message. Change-Id: I312680af384363b3e9a7de9aa1f0946643e193e2 Closes-Bug: #1662771
* translate all command help strings3.4.0Steve Martinelli2016-11-171-4/+4
| | | | | | | | | | | | | | 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
* Standardize logger usageTang Chen2016-06-201-1/+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
* osc-lib: commandDean Troyer2016-06-131-1/+1
| | | | | | | Leave command.py and test_command.py as a sanity check during the deprecation period. Change-Id: I24e1b755cbfbcbcaeb5273ec0c9706b82384fc85
* osc-lib: utilsDean Troyer2016-06-131-1/+1
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* osc-lib: exceptionsDean Troyer2016-06-131-1/+2
| | | | | | | | Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
* modify server groupsunyajing2016-06-061-9/+1
| | | | | | make column_headers equal to columns, to keep code consistence Change-Id: Ia96b398ad822fc5fac3753e28709c370165bda8a
* 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-241-9/+13
| | | | | Change-Id: Id6eebcb48d1b7b49b6636524506294edbc44a83f Partial-bug: #1574965
* Add "server group show" commandRui Chen2016-04-201-0/+24
| | | | | | | | | Support compute v2 "server group show" command in OSC. Implements: blueprint nova-server-group-support Closes-Bug: #1542171 Change-Id: I1a6d103151c704bda5b67cb9a49cc43c7d9f1d6a
* Add "server group list" commandRui Chen2016-04-201-0/+57
| | | | | | | | | Support compute v2 "server group list" command in OSC. Implements: blueprint nova-server-group-support Partial-Bug: #1542171 Change-Id: I68b80e3c4458692472af671028cd1f939736bcb8
* Add "server group delete" commandRui Chen2016-04-201-0/+33
| | | | | | | | | | Support compute v2 "server group delete" command in OSC. Implements: blueprint nova-server-group-support Partial-Bug: #1542171 Related-Bug: #1563301 Change-Id: I7d792d669b147b24dc774844cfc9dbacd60d017b
* Add "server group create" commandRui Chen2016-04-201-0/+68
Support compute v2 "server group create" command in OSC. Implements: blueprint nova-server-group-support Partial-Bug: #1542171 Change-Id: I96ffb07764d3adb715e048943cfee3b879c280f6