Image v2 uses warlock objects rather than the usua Resource objects
so we need to test for those. This adds a subset of the Image v2
schema that should be enough to test for proper warlock image handling.
Depends-On: Ic95db2f63d9f5f37e29f0d7e048397da311fbf8c
Change-Id: Ib89cce87f110a554f40e726718e31d39b500a6ae
image show using V2 api was failing.
openstack --os-image-api-version 2 image show <image_id>
ERROR: openstack _info
Closes-Bug: #1450829
Change-Id: Ic95db2f63d9f5f37e29f0d7e048397da311fbf8c
If the clientmanager is unable to create a keystone session (due to
insufficient auth parameters or something else) then the exception
caused by this shouldn't be ignored, as was the case.
On the other hand, we don't want this behaviour in the case of the
'complete' command, so this is now properly detected.
Change-Id: If4f453d23cc87900cda752e9ffbcf41ded59e26f
Closes-Bug: #1444640
By default the --dst-port value is set to None when no --dst-port
argument is provided. By making the default value (0, 0), this allows
novaclient to proceed without any error.
Change-Id: Ibb58f5df5ed1890a8f499dd2467b12b0e79d547b
Closes-Bug: #1443963
--description is optional in our CLI but the server requires it to be
non-empty. Set a default value of the given name.
Closes-Bug: #1434172
Change-Id: I81507a77ad8d815000ff411784ae71e229c77f78
Changed argument from parsed_args.volume to parsed_args.container as per what
is expected in python-cinderclient.
If not defined, defaults to "backup_swift_container" in cinder.conf.
Stops there being a container for every volume you take backups off.
Change-Id: I4a34894222f71b0f207d007c32427040589406aa
Closes-Bug: 1446751
Handle the paginatiion for image list. We were sorting the
data here, so nothing lost for the generator.
Change-Id: I2d7d4b3d5c9f650953f309c971ac53b64f6f7f77
Based on the comments made in this patch:
https://review.openstack.org/#/c/174908/2/
We should simplify and refactor the way we handle finding identity
resources.
Change-Id: I77db2e3564faa90a917082a6c6cb87269e93aebe
In several places we had else branches where a reasonable default
would do the job. This makes the code a mean cleaer and easier to
read.
Change-Id: I231e09aab85fd32b8300bc33c48d0899b728b96e
This adds a new option --os-cloud that allows the configuration values
for multiple clouds to be stored in a local file and selected with
a single option.
Internal option names have had 'os_' removed to be comptible with
the options returned from OpenStackConfig().get_one_cloud().
The config file is ~/.config/openstack/clouds.yaml:
Sample
------
clouds:
devstack:
auth:
auth_url: http://192.168.122.10:35357/
project_name: demo
username: demo
password: 0penstack
region_name: RegionOne
devstack:
auth:
auth_url: http://192.168.122.10:35357/
project_name: demo
username: demo
password: 0penstack
region_name: RegionOne
Co-Authored-By: Monty Taylor <mordred@inaugust.com>
Change-Id: I4939acf8067e44ffe06a2e26fc28f1adf8985b7d
Depends-On: I45e2550af58aee616ca168d20a557077beeab007
When using Keystone's policy.v3cloudsample.json policy file, a project admin is
supposed to be able to manage role assignments. Unfortunately, a project admin
isn't allowed to perform these operations using python-openstackclient, as we
attempt to perform list operations for any of the object types specified (users,
groups, projects). This is done in an attempt to lookup the id of the object by
name, but we perform this list operation even when the user specifies everything
by id. This causes 403 errors.
This patch still attempts to look up the object id by name, but we catch the 403
and assume that the user specified an id if the list operation is not allowed.
This is similar to what we do with the --domain option for other commands.
Closes-bug: #1445528
Change-Id: Id95a8520e935c1092d5a22ecd8ea01f572334ac8
At least print a warning on authentication error. I have no
idea why an exception is being ignored here because if there
is no session, nothing is going to happen. This at least will
print some useful warning:
(.venv)terry@f350:~/python-openstackclient$ os flavor list --os-cloud pro
WARNING: openstackclient.shell Possible error authenticating: __init__() got an unexpected keyword argument 'asdf'
ERROR: openstack Authentication requires 'auth_url', which should be specified in 'HTTPClient'
This error was caused by having a bogus value 'asdf' in the cloud.yaml
for the cloud pro.
Change-Id: Ie08432e0464cfa86b3b3f67ca29d3b7d23d2f46f
Image create action accepts attribute called location,
in method body is list of allowed attributes, which contain
localtion, what is typo and this attribute was not passed to
glance. Fixed.
Change-Id: I357b06b63b8aa97f7a5f587ef3fcee7a4b360ed1
Closes-Bug: #1445460
So we really weren't deferring the loading of client libs dadgummit,
do that for real where possible. This shaves a couple of tenths off
the static import times.
Also defer as much import-time procesing as possible. This is a little
ugly in api.auth but this also eliminates import of the auth plugins
until they are needed.
Change-Id: Ia11d4b9cf98231d37449103fc29101dc17afb009
Add a --volume-type option to quota set, this will allow users
to set quotas for volume attributes on a per volume-type basis.
for example:
openstack quota set admin --volume-type myvol --volumes 12
Change-Id: I3ce9cf82a65d4f012b339f0e0dedb752cb132c33
Closes-Bug: 1438377
This patch adds service providers to command-objects, and makes
a few changes to the help text, to align it more with the
already established identity provider resource.
Change-Id: Ibf3d2bc04bf5588d1fc9c37b8ca28c007496c021
Adds CRUD support for service providers as it's now available through
keystoneclient
Closes-Bug: 1435962
Depends-On: If802e8a47e45ae00112de3739334b4b5482d0500
Change-Id: Ic55101e50209070aa49ca2adc91c89ba754c8c68
Print a warning message if an unknown api version is supplied.
An attempt will be made to run the command anyway.
Change-Id: Idec8e88fe9621f10ec4b7eecd90708fb3730f56f
Subclass keystoneclient.session.Session to add the timing hooks to
record the elapsed time returned by requests.Response objects, including
the redirection history. Redirects are included individually and not
rolled into the total time for the original request.
This works for all clients that use OSC's session.
Closes-Bug: #1402577
Change-Id: I9360c90c151579b89a37edb8c11c17feb15b3cb9
Looks like the option to show limits of a specific project was
missing. This resulted in always using the authenticated project.
Change-Id: I512a05df20860ffb52af34f3b64c9eb81dae8c61
Closes-Bug: 1438379
Requests/urllib3 started issuing warnings about certificates and SSL
that our users are unable to do anything about. This is a very blunt
way to suppress these warnings unless --verbose or --debug is
supplied on the command line.
Being more precise in the suppression requires importing the warning
classes from urllib3 and dealing with the platforms where it has
been unvendored from requests. Maybe in the future if there are
concerns that this mutes too much otherwise.
Change-Id: I50bb10a16222de12c5b95bfe042b92e43ea8ee7c
Glanceclient image listing was special cased as it wasn't implemented in
glanceclient directly. This is no longer the case and we should use
glanceclient's functions.
Change-Id: If8d1246f1bd97c07f9f10f5457aa32124efa0be3
The federation APIs for the identity providers introduce a new parameter
for every identity provider, named remote_ids, which contains a list of
entity ID associated with. This parameter can be provided during the creation
of the identity provider and can be updated at any time. For more information
look at the blueprint:
https://blueprints.launchpad.net/keystone/+spec/idp-id-registration
This patch add the support to this new parameter in the command line by
inserting the option "--remote-id" in the following commands:
- "identity provider create"
- "identity provider set"
Additionally, the values can be read from a file, specified by
"--remote-id-file", containing an entity id per line.
Change-Id: Ie93340ee57e54128daa70d8a7bd0a9975ff7eef4
Depends-On: I12a262c55b5f6b5cc7007865edf30f14269da537
Implements: blueprint idp-id-registration
Adding the possibility to create projects hierarchies by adding
the parent field in the create project call.
Co-Authored-By: Victor Silva <victor@lsd.ufcg.edu.br>
Implements: bp hierarchical-multitenancy
Change-Id: I4eac4f5bc067634cc38c305dacc59ab1da63c153
Without this patch, openstackclient has no way to specify to which
project a network belongs upon creation. Instead, it uses the project
ID that the user is authenticating with to fill the tenant_id column.
This is a problem because an admin user is unable to specify a project
for a non-admin network. To fix this and to improve feature parity with
the neutron client, this patch adds project and domain parameters to
the network create command and uses the given project name to look up
the project ID.
Neutron does not allow the project to be changed after creation, so no
such parameter has been added to the neutron set command.
Neutron calls the field 'tenant_id', but this change exposes the
parameter as '--project' to support the newer terminology.
If no project is specified, the client defaults to the previous
behavior of using the auth project.
Change-Id: Ia33ff7d599542c5b88baf2a69b063a23089a3cc4
Added flavor set and unset command which allow manage flavor
properties called extra_specs.
Command flavor show output was extended with these properties.
Closes-Bug: 1434137
Change-Id: Ie469bade802de18aab9d58eda3fff46064008163
This change removes openstackclient homemade hack to defer help
printing in initialize_app and uses cliff (new) option to defer
help printing.
Change-Id: Ie3e94ec96254745bfef8c5ff5abc405facfe1bea
Related-Bug: #1316622