880 Commits

Author SHA1 Message Date
Zuul
960004dcc7 Merge "Add 'openstack server create --use-config-drive'" 2020-10-09 10:43:59 +00:00
63b46ac5ec Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: I6c1a9cdff90f7073082fc057f0f11b184de5dc32
Sem-Ver: feature
2020-10-02 20:49:41 +00:00
Zuul
eb5416a257 Merge "Fix --image-property option in 'create server'" 2020-10-01 05:52:39 +00:00
Zuul
03b9216318 Merge "Output correct json for security groups in 'openstack server show'" 2020-09-25 09:44:41 +00:00
jay
bae89b3014 Output correct json for security groups in 'openstack server show'
Fixes incorrect json output for 'openstack server show -f json'.
The security group json output groups all the json as one
for e.g. "security_groups": "name='group1'\nname='group2'"
The correct output should be
"security_groups" : [{"name" : "group1"}, {"name" : "group2"}]
properties and volumes_attached fields also has similar issue.

Story: 2007755

Change-Id: I1b1cac716329e0530400aff782c08000b21d8e1d
2020-09-14 15:22:27 +02:00
Myeongchul Chae
fbd2c00b89 Fix --image-property option in 'create server'
There was a problem that the '-image-property' option, which can be used
to create an instance, did not work as intended.

I found that there were two problems with this option.

First, I cannot select an image as its metadata.

The second is that when there are multiple images available, the desired
image may not be selected depending on the situation.

This patch solves these two problems.

I wrote the test case with these two problems considered together.

Change-Id: Ib2745d7e067056ff4ca8bfaf6cff492d0dacb73a
story: #2007860
2020-09-10 16:12:11 +00:00
Zuul
15d0bfc185 Merge "Add NUMA affinity policy parameter to "port"" 2020-09-07 16:11:00 +00:00
Zuul
95cc05bdf6 Merge "Bypass user and group verification in RemoveRole" 2020-08-13 06:29:54 +00:00
Lance Bragstad
e246732670 Bypass user and group verification in RemoveRole
Keystone let's users remove role assignments that reference non-existent
users and groups. This is nice when keystone backs to an identity store
like LDAP and users or groups are removed.

Previously, openstackclient would validate the user and group existed in
keystone before sending the request to delete the role assignment. This
commit updates the code to bypass that validation so that users can use
IDs to forcibly cleanup role assignments.

Change-Id: I102b41677736bbe37a82abaa3c5b3e1faf2475d5
Story: 2006635
Task: 36848
2020-08-12 12:24:17 -05:00
Rodolfo Alonso Hernandez
454b219564 Add NUMA affinity policy parameter to "port"
Added port NUMA affinity policy parameter to "port create",
"port set" and "port unset" commands.

Change-Id: I48cacab275856af2911829f9b7176bb87fd039b3
Related-Bug: #1886798
2020-07-31 15:18:55 +00:00
Stephen Finucane
12f1e56ebf Add 'openstack server create --use-config-drive'
Despite what the help text for this options says, the nova API only
accepts boolean values for this value and has done so since at least the
introduction of the 2.1 microversioned API. While it would be nice to
convert '--config-drive' to a boolean flag, we'd need to be able to
retain temporary support for people passing arguments. 'nargs=?' [1]
looks promising but it has an annoying tendency to swallow a positional
argument following it [2]. Since that is not an option, we have to live
with a new config option, '--use-config-drive' and a '--no-config-drive'
counterpart.

[1] https://docs.python.org/3/library/argparse.html#nargs
[2] https://bugs.python.org/issue9338

Change-Id: If9cce0ad4094cc9cef1c9136b80c3b0f35a82c7a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Story: #2005468
Task: #30547
2020-07-22 10:59:07 +01:00
Felix Yan
82ebddca00 Fix compatibility issue in 5.3
The offending entry point object looks like:
EntryPoint(name='compute', value='openstackclient.compute.client',
group='openstack.cli.base')

Story: 2007917
Task: 40323
Change-Id: I0f3cc62e23efdc14203ce6645581d5ba5dbf7fa0
2020-07-14 08:06:55 -05:00
Zuul
8aed5feab8 Merge "Fix uploading an signed image does not work if private signing key is encrypted" 2020-07-08 17:30:38 +00:00
Zuul
9fb68eca44 Merge "Expose flag for forcing use of import for images" 2020-07-08 17:01:22 +00:00
Alexander Gräb
c06d825635 Fix uploading an signed image does not work if private signing key is encrypted
Change-Id: Ia7c84aa7b840bf92aeb7db7246d14119eb727b03
Story: 2007890
Task: 40269
2020-07-07 13:26:51 +02:00
Zuul
4b5053ac89 Merge "Make volume backup record commands available in v3" 2020-07-07 10:58:15 +00:00
Zuul
d0741d7853 Merge "Add '--force; parameter to 'openstack quota set'" 2020-07-06 20:50:24 +00:00
Radosław Piliszek
b1fc587a6d Make volume backup record commands available in v3
They work just fine in Volume API v3 but they were limited in OSC
to v2.

Change-Id: I510383f8e0cbf05ec24caa1cad330f12f82a913d
Story: 2007896
Task: 40279
2020-07-05 09:55:49 +02:00
Monty Taylor
c04ec16cf7 Expose flag for forcing use of import for images
openstacksdk added support for using image import as a fallback
which is transparently supported here, but also provides an
override flag to allow a user to force use of import. Expose that
here.

Depends-On: https://review.opendev.org/737608
Change-Id: Ied938a8f63f305305a20ace42e9f4c84b0a5c00e
2020-06-30 07:02:23 -05:00
Zuul
57c02953ac Merge "Switch to newer openstackdocstheme and reno versions" 2020-06-05 18:32:11 +00:00
Zuul
26b3b30853 Merge "Update master for stable/ussuri" 2020-06-04 19:10:28 +00:00
yanpuqing
533af9f1b2 Client should parse string to boolean for value 'is_domain'
When we use "--property" parameter, client get lists these the
value is string type, but the type of the value 'is_domain'
should be boolean, so we should judge it and parse it.
The patch parse string to boolean for value 'is_domain'.

Co-Authored-By: Lance Bragstad <lbragstad@gmail.com>

Change-Id: I37c9eb854524bde3a1530bfe2e3a03810fb1a676
Task: 30039
Story: 2005246
2020-05-29 07:53:13 -05:00
Andreas Jaeger
709dfd9c21 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

Set openstackdocs_auto_name to use 'project' as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Depends-On: https://review.opendev.org/729744
Change-Id: Id3989cabdbf2204821531b00149aa0f1cb8a4955
2020-05-20 21:54:12 +02:00
662024646c Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: Ia0c7a6f2d84a7ed08514a64a73a5de577fcfb1d0
Sem-Ver: feature
2020-04-28 15:18:35 +00:00
Zuul
af1ffc456f Merge "Revert "Disallow setting default on internal network"" 2020-04-22 15:40:21 +00:00
Zuul
790ead00bb Merge "Add resource option immutable" 2020-04-17 10:25:30 +00:00
Zuul
92254bb0ac Merge "Add 'subnetpool' type support to rbac commands" 2020-04-15 08:44:49 +00:00
hackertron
b328cf74df Add '--force; parameter to 'openstack quota set'
The compute service allows us to to force set a quota, setting a
quota value that is less than the amount of the resource currently
consumed. Expose this feature by way of a '--force' boolean
parameter.

Change-Id: I1d1ac1ac46f49f64794ffc8631e166935537966c
2020-04-14 22:59:52 +02:00
Zuul
347c5b9df4 Merge "Add 'address_scope' type support to network rbac commands" 2020-04-10 00:18:56 +00:00
Igor Malinovskiy
557e65d8eb Add 'subnetpool' type support to rbac commands
Change-Id: Id6e528ebd1bf21ca142e60052d28371f97f629ac
Partial-Bug: #1862032
Depends-On: https://review.opendev.org/710755
2020-04-09 19:50:38 +03:00
Vishakha Agarwal
7f66273d3f Add resource option immutable
This patch adds the --immutable and --no-immutable option to the
role, project and domain CLI.

Related-Patch: https://review.opendev.org/#/c/712182/

Change-Id: I9c3bdd741f28bf558267fb217818d947597ce13e
2020-04-08 13:51:01 +00:00
Zuul
78b18030b5 Merge "Support for stateless security groups" 2020-04-08 08:31:28 +00:00
Vasyl Saienko
bdaebeb508 Revert "Disallow setting default on internal network"
The original patch assumes that both --external and --is-default are set
in the same request and broke case when --is-default is set as an
network update. The validation logic have to be moved on API side to
avoid extra API calls from openstackclient.

This reverts commit 962efd949feb461283a9bb4a668fbd310f80ba40.

Related-Bug: #1745658

Change-Id: Idf08abb0e08a6880f89c3e9df9dd2ac82f36c432
2020-04-08 07:14:52 +00:00
pedro
74a7c1d9d6 Add description field to portforwarding NAT rules
Add the `description` field to Floating IP Port Forwardings

Depends-On: https://review.opendev.org/#/c/705038/
Change-Id: I6477368e32570c96cacddba4f86455262e533277
Implements: blueprint portforwarding-description
Closes-Bug: #1850818
2020-04-02 13:15:19 -03:00
Zuul
70f1ff375a Merge "Add command: router add/remove route --route" 2020-04-01 11:03:51 +00:00
Tom Stappaerts
5e62411e5f Support for stateless security groups
Add support for stateful attribute of security groups,
using --stateful and --no-stateful flag on security group.
This allows a user to create security groups with stateful
false.

Change-Id: Ifd20b5fc47fd0ea0bb5aeda84820dcc0fb1e8847
Blueprint: stateless-security-groups
Depends-On: https://review.opendev.org/711513/
2020-03-31 12:05:18 +02:00
Bence Romsics
dba57c85d5 Add command: router add/remove route --route
Add commands to osc to call the two new API methods introduced by
new Neutron extension: extraroute-atomic.

Bump our openstacksdk requirement to >=0.38.0 which contains
the corresponding sdk change.

The lower-constraints of dogpile.cache and keystoneauth1 are bumped
because of requirements bumps in openstacksdk.

The lower-constraint of decorator is bumped because of problem already
fixed by amotoki here: https://review.opendev.org/701706

Change-Id: Ia9b9c216f1d1161ebedac31594a2c464d77f4ae2
Depends-On: https://review.opendev.org/674324
Partial-Bug: #1826396 (rfe)
Related-Change: https://review.opendev.org/655680 (spec)
2020-03-30 16:19:05 +02:00
Vishakha Agarwal
05da145eae Adding options to user cli
User options [1] can be set by making POST and PATCH
request for /v3/users API calls but cannot by openstack
CLI because of no user options defined in create and update
user CLI [2]. This patch adds the user options [1] in
create user and update user CLI.

[1] https://docs.openstack.org/keystone/latest/admin/resource-options.html#multi-factor-auth-rules
[2] https://docs.openstack.org/api-ref/identity/v3/#create-user

Change-Id: I4e41bae2e8cfbe92d52b14d856991bedcd44164f
2020-03-26 22:24:39 +05:30
Igor Malinovskiy
f03cb68ad8 Add 'address_scope' type support to network rbac commands
Change-Id: I6a4b7219934805c1bbd1e88fcc670ae231d9ac37
Partial-Bug: #1862968
Depends-On: https://review.opendev.org/709122
2020-03-26 12:40:12 +00:00
Zuul
74616cd235 Merge "Complete switch from glanceclient to SDK for image service" 2020-03-25 15:19:21 +00:00
Zuul
21c883b3d3 Merge "Switch image to use SDK" 2020-03-25 15:19:20 +00:00
Zuul
2c8d705a24 Merge "Add unit tests and release note for dns_publish_fixed_ip" 2020-03-24 21:24:52 +00:00
Artem Goncharov
768a64aac5 Complete switch from glanceclient to SDK for image service
In https://review.opendev.org/#/c/650374/ a work has been started to
switch image service support from glanceclient with all it's
dependencies to the SDK version. With this change version 1 (anyway
deprecated since ages) is also being switched to SDK.

Change-Id: Ic391500af02a73d81d64a9e9113cca85c9e24390
2020-03-24 13:13:06 +00:00
Artem Goncharov
60e7c51df4 Switch image to use SDK
This is a work to switch OSC from using glanceclient to OpenStackSDK.

With this change only v2 is using OpenStackSDK. V1 is still using
glanceclient and will be switched in a separate change.

Remove the direct depend on keystoneauth- let that flow through
openstacksdk.

Depends-on: https://review.opendev.org/#/c/698972
Change-Id: I36f292fb70c98f6e558f58be55d533d979c47ca7
2020-03-23 14:38:32 -05:00
Zuul
fc12033f1d Merge "Now we can add description for role creation in OSC" 2020-03-20 18:59:44 +00:00
Hongbin Lu
962efd949f Disallow setting default on internal network
The ``--default`` option should be only used for external network.
Default internal network is not currently supported so we disallow
it for now.

Change-Id: Ia9d39b40e1e041d7bda0f6a27d058e382b572e1a
Closes-Bug: #1745658
2020-03-09 21:01:53 -05:00
Monty Taylor
e6e4b73efa Complete "Drop python2 support" goal
We stopped testing python2, but there are more things to be cleanup.

- Remove python2 entries from setup.cfg
- Add releasenotes
- remove universal wheel since this is only python 3 now

Change-Id: Ie2bbb4d34b8411939ad5cfd750fc76c933779542
2020-02-05 05:58:51 +00:00
Colleen Murphy
70ab3f9dd5 Add support for app cred access rules
This commit introduces the --access-rules option for 'application
credential create' as well as new 'access rule' commands for listing,
showing, and deleting access rules.

bp whitelist-extension-for-app-creds

Change-Id: I04834b2874ec2a70da456a380b5bef03a392effa
2020-01-17 11:14:51 -08:00
Dean Troyer
68aa35f35f Add unit tests and release note for dns_publish_fixed_ip
Follow-up to https://review.opendev.org/#/c/679834/ which
added the options and lacked both a release note and
minimal option-handling unit tests.

Change-Id: Ibb2820add9b2fedaf5a8b1a77babf043f6641724
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2020-01-14 09:53:13 -06:00
KeithMnemonic
f5384ae16a Fix openstack server list --deleted --marker option
This patch removes using the "name" option for a marker when
--deleted is also used. The find_resource() function
that is being called does not correctly handle using the marker
as the "name" in the search when also using deleted=True.
One simple way to fix this is force the marker to only be an ID
when --deleted is used. This is how the nova client works.

Using the --deleted option is available to users with the admin
role by default. If you're an admin listing --deleted servers
with a marker by name, find_resource() is going to fail to find
it since it doesn't apply the --deleted filter to find_resource().

The find_resource() function is trying to find the marker server
by name if it's not found by id, and to find it by name it's
listing servers with the given marker as the name, but not
applying the --deleted filter so it doesn't get back any results.

In the story it was suggested modifying find_resource to include
the deleted query param when it's specified on the command line but
that didn't work because it still results in something like this:

http://192.168.1.123/compute/v2.1/servers?deleted=True&name=4cecd49f-bc25-4a7e-826e-4aea6f9267d9

It seems like there are bugs in find_resource().

Restricting the marker to be the server ID when listing deleted servers
is probably OK since if you're using --deleted you're an admin and you could
be listing across all projects and if you're filtering by a server across all
projects anyway (not that you have to, I'm just saying if you are), or even
showing a server in another project, you have to do it by id rather than name
because find_resource() won't find the server in another project by name, only ID.

story: 2006761
Task: 37258

Change-Id: Ib878982b1d469212ca3483dcfaf407a8e1d2b417
2020-01-02 20:05:56 +00:00