3437 Commits

Author SHA1 Message Date
Stephen Finucane
ffd7e93961 functional: Remove test for 'quota set --force'
Change I1d1ac1ac46f49f64794ffc8631e166935537966c introduced the 'quota
set --force' parameter to force set nova quotas. As part of that fix, we
introduced a functional test, 'QuotaTests.test_quota_set_force' that
works by attempting to set the 'limit' of the quota for instances to the
current usage ('is_use') minus one.

This test is flawed. It doesn't create any instances so when it fires by
itself, it will always set the 'limit' to 0. When it fires at the same
time as other tests (remember, we run tests in parallel), notably tests
that rely on booting instances, it can cause other tests to fail with
the following error:

  Quota exceeded for instances: Requested 1, but already used 0 of 0
  instances (HTTP 403)

We could attempt to work around this by creating a new project and using
that project to fiddle with quotas. That's a lot of work though, and the
returns are questionable: the 'quota set' command is an admin-only
command by default and the '--force' parameter should almost never be
used. Simply remove this test.

Change-Id: Ic07ff6f4a7c1c27852c892eb906bb144aae91788
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: #2008327
Task: #41225
2020-11-06 17:40:13 +00:00
Zuul
cb6659d7cd Merge "Compute: Add user id support for keypair" 2020-11-04 00:28:41 +00:00
Zuul
71cdb113fe Merge "Add 'openstack server migration list --type' option" 2020-11-03 12:58:49 +00:00
Zuul
a40d22f1ed Merge "Fix formatting of the flavor properties" 2020-11-03 10:07:13 +00:00
Zuul
4cdc953888 Merge "Add support for 'keypairs list --project' parameter" 2020-11-02 17:23:23 +00:00
Zuul
2ffd06b3d5 Merge "Switch console url show operations to SDK" 2020-11-02 17:00:51 +00:00
Artem Goncharov
ad3369ed1f Fix formatting of the flavor properties
Do not stringify flavor properties to allow proper output formatting to
json/yaml/etc

Change-Id: I9f4c42acb85b726af87123134dd19de98fe95074
2020-11-02 15:09:09 +01:00
He Jie Xu
17f641e1c3 Compute: Add user id support for keypair
This patch adds functionality of specific the user id when create,
delete, show and list keypairs.

Change-Id: Ib826f1f4f5a73d1875ba0f02e124b3222c4d05ed
Co-Authored-By: tianhui <tianhui@awcloud.com>
2020-11-02 12:55:04 +00:00
Zuul
7fdbc6b8af Merge "Add support for 'keypairs list --user' parameter" 2020-11-02 12:06:41 +00:00
Zuul
987af4e390 Merge "trivial: Rework 'CreateServer' function" 2020-10-30 17:30:35 +00:00
Stephen Finucane
7c239403e9 trivial: Rework 'CreateServer' function
This rather complex function has had stuff tacked on over the years.
Help make working with it a bit easier through liberal application of
whitespace and some nicer indentation. Some option help text is improved
based on changes to modern nova.

Change-Id: I8154dd395dd904c3bcd180a7d0f9037b7e0be64f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-10-29 11:43:23 +00:00
Artem Goncharov
e05d39abb5 Switch console url show operations to SDK
Switch from using novaclient to SDK for openstack console url show operation.

Depends-On: https://review.opendev.org/756286
Change-Id: Ibe247825148788c549c2c1e991aae92338cdf557
2020-10-24 10:19:52 +02:00
Zuul
deae091f78 Merge "Validate 'server group create --policy' option" 2020-10-21 20:05:12 +00:00
Zuul
0228790024 Merge "Cleanup of 'server migration list' command" 2020-10-21 19:57:47 +00:00
Zuul
eb75c44656 Merge "Switch openstack console log show operation to use OpenStackSDK" 2020-10-21 16:19:21 +00:00
Zuul
77a45fe685 Merge "Compute: Add tag support for server add fixed ip" 2020-10-15 17:42:50 +00:00
Zuul
d59057ad3d Merge "Compute: Add tags support for server" 2020-10-14 17:38:33 +00:00
Zuul
96658a3116 Merge "Restore behavior of image create with same name." 2020-10-14 09:59:54 +00:00
Stephen Finucane
5645fad762 Add support for 'keypairs list --project' parameter
It would be lovely to do this server side but doing so requires a new
microversion, a blueprint and a spec. This is less performant but should
do the trick for the odd time users want to do this.

Change-Id: I26e7d38966304dd67be5da8ed0bb24f87191b82f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-10-14 10:27:05 +01:00
Stephen Finucane
98a0016cfa Add support for 'keypairs list --user' parameter
This has been supported by nova and novaclient since the veritable dark
ages. Add it to OSC.

Change-Id: Ifc95e7dd6c00807c80e87e10046ab154d0989014
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-10-14 10:25:50 +01:00
tianhui
2f76bfa3a6 Compute: Add tags support for server
Change-Id: If065602792958ff0145ae9f2e05f5b7a3177905c
Story: 2002006
Task: 19641
2020-10-14 09:53:26 +01:00
Zuul
6216025e9d Merge "Compute: Add tag support for server add volume" 2020-10-14 03:46:06 +00:00
Zuul
f083d42972 Merge "Add 'server migration force complete' command" 2020-10-14 03:46:00 +00:00
Zuul
91027a501f Merge "Add 'server migration abort' command" 2020-10-14 03:45:54 +00:00
Zuul
247ca75d26 Merge "compute: Add --password option for openstack server create" 2020-10-13 23:26:25 +00:00
Zuul
2eeab20eca Merge "Always display direction for security group rules" 2020-10-13 23:26:24 +00:00
Zuul
73765da310 Merge "Compute: Add 'keypair create --type' parameter" 2020-10-13 14:53:12 +00:00
Stephen Finucane
ab0b1fe885 Validate 'server group create --policy' option
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>
2020-10-13 15:35:21 +01:00
Stephen Finucane
bf35f04682 Add 'openstack server migration list --type' option
Another gap with novaclient closed.

Change-Id: Id3ca95ceda6f438fa72496ab9ab15ac09bb64fa5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-10-13 15:14:09 +01:00
Stephen Finucane
5fd399eaba Cleanup of 'server migration list' command
Address some post merge nits.

Change-Id: Ie59521d81fab191194f6c1a114b007fa17f5299f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-10-13 15:09:55 +01:00
jay
08b0e5855b Add 'server migration force complete' command
This is equivalent to novaclient's 'live-migration-force-complete'
command.

Change-Id: Ic4dc639afa16cdf8c5a46774895e850d92985292
Story: 2007513
Task: 39293
2020-10-13 14:17:28 +01:00
hackertron
1c3cf11331 Add 'server migration abort' command
This is equivalent to nova client's 'live-migration-abort' command.

Change-Id: I0ff520ccfdf2de52c427affad7bef4554c86a06f
Story: 2007489
Task: 39210
2020-10-13 14:17:25 +01:00
Zuul
375fe31525 Merge "Add source_ip_prefix and destination_ip_prefix to metering label rules" 2020-10-13 12:21:15 +00:00
Zhaokun Fu
fd9a235de3 compute: Add --password option for openstack server create
Change-Id: Iaf923200efe023655a58ac5acac0b087d2fd5366
Story: #1708570
Task: #13780
2020-10-13 10:37:38 +01:00
Zuul
3cc81dded3 Merge "Remove oslo.utils" 2020-10-13 07:22:37 +00:00
Zuul
44f842b1f8 Merge "Add an error message when server bind floating IP" 2020-10-13 04:59:42 +00:00
Zuul
1bac625d47 Merge "Compute: Add tag support for server add network" 2020-10-13 03:42:52 +00:00
Zuul
ce563f08ba Merge "Compute: Add tag support for server add port" 2020-10-13 01:36:46 +00:00
Monty Taylor
9385113d40 Remove oslo.utils
Oslo things are really server-side oriented and are heavy-weight
for client things. Remove oslo.utils and just use iso8601 and
importlib directly. It's not actually a bad library, but pulling
it and its other deps in just for a couple of wrapper methods
is a bit much here.

oslo.i18n, fwiw, is lightweight and helpful.

Change-Id: I463993170c03a1d98c47ab6a3c19131b7fca1099
2020-10-12 17:29:57 +01:00
yanpuqing
415545ab9f Add an error message when server bind floating IP
If we add a floating IP for the server with no fixed IP, CLI doesn't
report an error and nothing happens. The patch adds an error message
when the server which don't have fixed IP bind floating IP.

Change-Id: I400f2bab08521bb7fa443d87c7f45cc79eb80694
Task: 27941
Story: 2004346
2020-10-12 17:09:19 +01:00
Zuul
ad2ac13c97 Merge "Add server migration list CLI" 2020-10-12 16:01:52 +00:00
tianhui
742c80a825 Compute: Add tag support for server add fixed ip
Change-Id: I62ed4729dead9f91630d1f568c834c9642965558
Story: 2002195
Task: 21679
2020-10-12 15:25:09 +01:00
tianhui
6f1602312b Compute: Add tag support for server add network
Change-Id: I31a66b2d4dac44052a71f43a5a67836247ccac64
Story: 2002195
Task: 21678
2020-10-12 15:19:27 +01:00
tianhui
4855fef8b8 Compute: Add 'keypair create --type' parameter
Change-Id: I2d251e1b97fb9a8069431c867fb7fc5f42d1fd6e
Story: 2002606
Task: 22225
2020-10-12 12:25:11 +01:00
tianhui
f3fbb1b648 Compute: Add tag support for server add port
Change-Id: Ice6bf5fb57afeb10862c870b42732dcf166772d1
Story: 2002195
Task: 21676
2020-10-12 11:37:20 +01:00
Zuul
a48c05b90a Merge "Remove usage of six" 2020-10-09 19:37:48 +00:00
tianhui
1c7fe3b6bd Compute: Add tag support for server add volume
Change-Id: Id9f2e09426f6824e9ca672bf7808b5165c650a69
Story: 2002195
Task: 21675
2020-10-09 17:31:14 +01:00
Zuul
960004dcc7 Merge "Add 'openstack server create --use-config-drive'" 2020-10-09 10:43:59 +00:00
songwenping
c2df9215e1 Remove usage of six
With python3.x, classes can use 'metaclass=' instead of
'six.add_metaclass', 'six.iteritems' and 'six.iterkeys' can
be replaced by 'items' and 'keys', 'six.moves.urllib.parse'
can be replaced by 'urllib.parse', 'six.StringIO' and
'six.moves.cStringIO' can be replaced by 'io.StringIO',
'six.text_type' and 'six.string_type' are just 'str'.

Change-Id: I84848c0bf8ab3c36dd821141191e2725e4e3b58b
2020-10-07 02:15:25 +00:00
Artem Goncharov
74db8dd65d Switch openstack console log show operation to use OpenStackSDK
A short switch onto SDK for fetching console logs of the server

Change-Id: I3f750ea4f13a4e72272aa67ea4506bd7182b13f9
2020-10-06 15:04:02 +02:00