| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The initial use of osc-lib is behind the compatibility/deprecation
modules that we will leave in place for a time for plugins to catch
up.
* openstackclient.common.exceptions
* openstackclient.common.utils
Module-level warnings are emitted directly on stderr since logging
has not been configured yet.
Change-Id: I79e57ce9523a20366bccaf9b949ab5906792ea0d
|
| |
|
|
|
|
|
|
| |
I checked all the files in openstackclient/common
and fixed the missing i18n supprots.
Change-Id: Id7f76a24aae663f5832ef9bcf1bd5a6b7081af24
Partial-bug: #1574965
|
| |
|
|
|
|
|
|
|
| |
Project show with name argument returns 'Could not find resource'
error when the user is not authorized. It should report the
authorization error instead. This patch makes that change.
Change-Id: Iac3521f8a411060b0ec9ef46c8f0e1f3551e56ae
Closes-Bug: #1511625
|
| |
|
|
|
|
|
|
|
|
| |
In Python 2, dict.keys() will return a list.
But in Python 3, it will return an iterator.
So we need to fix all the places that assuming
dict.keys() is a list.
Change-Id: I8d1cc536377b3e5c644cfaa0892e40d0bd7c11b1
Closes-Bug: #1556350
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Python’s default arguments are evaluated once when the function is defined,
not each time the function is called. This means that if you use a mutable
default argument (like list and dict) and mutate it, you will and have mutated
that object for all future calls to the function as well.
more details about this wrong usage here:
http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments
Change-Id: If187f16bfb305ac4fe6e4177e498a06c49c3f946
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow the exception and error status
strings to be passed in such that other plugins can
make use of this function.
There is a comment in find_resource:
The exception to catch here is dependent on which
client library the manager passed in belongs to.
Eventually this should be pulled from a common set
of client exceptions.
Since I think that is a long ways off, this change will
work now and also work when a common exception is defined
and used.
Change-Id: Iab56cd1166028caed4f1e657e0b1ee81af3f48d8
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| | |
Add "os port show" command.
Change-Id: Id87c81640e74c60ae8f247c722c64fdadff022a2
Partial-Bug: #1519909
Partially-Implements: blueprint neutron-client
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a result of the recent logging refactoring, log_method decorator
is no longer required. oslo.log provides a similar decorator
oslo_log.helpers.log_method_call. If a similar feature is needed,
we can use the decorator from oslo_log.
searchlightclient is the only OSC external plugin which uses this
decorator. The depending patch removes it, so we can safely drop
the decorator.
Change-Id: If3df09cf6aa0a401d9f89e8924adce851d0c6dec
Depends-On: Ib94e7ba77262a9a8cbfce71f3083c47cb1973364
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes 'log' optional.
'log' attribute of each command class does not exist
when the class is defined because 'log' is now setup
dynamically when a class is instantiated. Instead log_method
looks for a logger from a decorating method.
compute.v2.server is changed in this commit as an example.
Change-Id: Ic4d128f8e027d3b8e6f884f31369e9085c0f0871
Partial-Bug: #1532294
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
string_to_bool() is not used by anyone.
Furthermore, it is not well designed. It tries to convirt 't', '1'
to True, which could be confused.
So remove it. If we need something similar, let's make a better one.
Change-Id: Ic1f63480c806bf7bcc9f541fc806eed297ddf718
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve the security group rules output when running the
"os security group show" command. Each security group rule
is now displayed on a separate line.
Current output example:
$ openstack security group show default
+-------------+------------------------- ... ---+
| Field | Value ... |
+-------------+------------------------- ... ---+
| description | Default security group ... |
| id | 048a5fc3-3be1-407d-ae47-9... |
| name | default ... |
| project_id | 3b96bb2020c1459da76963f9e... |
| rules | [u"id='5d812367-9829-4340...t"] |
+-------------+------------------------- ... ---+
New output example:
+-------------+------------------------- ... ---+
| Field | Value ... |
+-------------+------------------------- ... ---+
| description | Default security group ... |
| id | 048a5fc3-3be1-407d-ae47-9... |
| name | default ... |
| project_id | 3b96bb2020c1459da76963f9e... |
| rules | id='5d812367-9829-4340-95...lt' |
| | id='ee451d1c-ade3-4975-8e...lt' |
+-------------+------------------------- ... ---+
Change-Id: I1386075310896c58a2b776e2bbec3603bd00eff1
Partial-Bug: #1519511
Related-To: blueprint neutron-client
|
| |
|
|
| |
Change-Id: I236b4f53ee23cc97900e6244ab709404cc44a4ca
|
| |
|
|
|
|
| |
The doc of parameter manager is missing.
Change-Id: I4e99c06ab713532d73615670ada0a61462285d76
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Two trivial fixes:
1. docs for parameters are not sorted correctly
2. missing doc for a parameter
Change-Id: I0cfb65e0f897c391b9b6e7225251e88855b07a56
|
| |/
|
|
|
|
| |
There is no parameter named format.
Change-Id: I286006430efb2850b978b6f2abaed87216156d12
|
| |
|
|
|
|
|
|
| |
For some apis, heat, the error status is "failed". This patch
changes the wait_for_status method to allow for the error
status to be passed in the same way as the success status.
Change-Id: I20db4051d3f5611a4b13fe23ea8798b82a40da81
|
| |
|
|
|
|
|
|
|
| |
skip properties that are non-ascii values, but proceed
with properties that work. log these failed values back
to the user.
Change-Id: Iaca8909f4465a01c8aebfd290b1a322823702359
Closes-Bug: 1503898
|
| |
|
|
|
|
|
|
|
|
|
| |
add a last-ditch effort to find the resource in question by
listing all the resources and doing a simply match for name and
id. if no match is found then raise an error, if the list call
is unsuccessful, raise the same error. we have failed this city.
Closes-Bug: #1501362
Change-Id: I0d3d7002e9ac47b17b1ef1a5534406c85b1fc753
|
| |
|
|
|
|
|
|
|
|
| |
A few things here: 1) we need to check if the client class even
has a 'resource_class', in the case of glanceclient, it does not.
2) If everything fails we should print a better error message,
rather than a "find" failed, since some clients don't support find.
Change-Id: I6277322639e75b1635f9f3d159753efadbce1031
|
| |
|
|
|
|
|
|
|
| |
Instead of duplicating the same log statement throughout
the code, the same logic can be provided by a shared decorator
that abstracts away the logging capability and unifies it behind
a common function instead.
Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
|
| |
|
|
| |
Change-Id: Ia74b8e14bacb562d9bac29221f511acbab5296df
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
User should be able to specify the endpoint type through
a CLI optional argument/ENV variable setting. We will name this new
optional argument: --os-endpoint-type (Env: OS_ENDPOINT_TYPE) and
based on the value given, the service API will use that specific
endpoint type. Possible values: public, admin, internal.
DocImpact
Closes-Bug: #1454392
Change-Id: Ife3d4e46b44c0ddcd712b1130e27e362545a9a29
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
Adds the possibility to retrieve a project and list its
parents and subtree in the hierarchy.
Co-Authored-By: Rodrigo Duarte <rodrigods@lsd.ufcg.edu.br>
Co-Authored-By: Samuel de Medeiros Queiroz <samuel@lsd.ufcg.edu.br>
Implements: bp hierarchical-multitenancy
Change-Id: I874f6faffc8a2db9d99f12cbe0a69c0a30c0d9df
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the server delete command to wait for the server to be
deleted (obviously).
The wait method is the same model that Tempest uses, i.e. wait for a 404
on server GET (successful deletion), fail if the server went to ERROR
status, or fail if a timeout is reached. The default timeout of 300
seconds is also what Tempest uses.
Closes-Bug: #1460112
Change-Id: I0e66c400903e82832944d1cad61e7eb30177c3e8
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Include direction users pass in the error msg to help users know
which part of the argument is troublesome.
Change-Id: I796a85fbf40f6ddf544fb52a61f967e1914abdcc
Closes-Bug: #1420732
|
| |/
|
|
| |
Change-Id: Ieff86f841623e1ce34b79c66bc5e8b1b239fa3e9
|
| |
|
|
|
|
|
|
|
|
| |
Add sort support to image list by sorting items in the client side.
The parameter syntax follows this spec[1].
[1] https://review.openstack.org/#/c/145544/
Change-Id: I42b487d18f00f937db1938daa46487cea2a896ab
Closes-Bug: #1410251
|
| |
|
|
|
|
|
|
|
|
|
| |
Update `user show` for Identity V3 to account for a domain argument,
in doing so, also update `find resource` to be more flexible by
allowing **kwargs.
Also update `group show` and `project show` since they follow the
same logic as a user within a group.
Change-Id: Ib828e4dbeb0bd31164396069ce8a64c873179779
Closes-Bug: #1378165
|
| |
|
|
|
|
|
|
|
| |
Currently, utils.find_resource catch NotFound exception defined in
openstackclient. However, different client libraries raise different
exceptions defined in thire own library.
Change-Id: Idc40428e30e59f71dbdbfa0555c0066fddc441c2
Closes-Bug: #1371924
|
| |
|
|
|
|
|
|
| |
Module `importutils` from common code was graduated to oslo.utils,
so it would be great if we reuse this library.
Remove unused strutils.py and gettextutils.py
Change-Id: Iaae19fc5018d83103e5f15ff76d6da686bfdf5f8
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This new action will allow a user to change their own password by
either providing the new password as an argument (--password) or by
being prompted to enter the new password.
In both cases user will be prompted to enter their current password
as required by the v3 API.
Closes-Bug: #1337245
Change-Id: I5e1e0fd2b46a4502318da57f7cce2b236fb2d93d
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The unordered dict and lists causes variable results. The user
may see different results and tests can fail. Might as well make
this more consistent.
Change-Id: I7045b40b44cbf3ee0f2ca79c6ea0d279b6d8cfe3
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
This patch drops the import_utils method from common.utils and leverages
it from openstack.common.importutils instead.
Change-Id: If7e7383aa742afe44f750f916c0d90d747793150
Closes-bug: 1365273
|
| |/
|
|
|
|
|
|
| |
The safe_encode method returns bytes, so we cannot concatenate its output with
text strings. This call does not seem needed after all, so let's just remove
it.
Change-Id: I6c18427559147d4c732ff7daa6d6006e7e5f6365
|
| |
|
|
|
|
|
| |
bp/neutron
https://wiki.openstack.org/wiki/OpenStackClient/Commands#Network_2
Change-Id: I89ee083154afa544b03587e84becace36d9d522a
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The find_resource method had two hacks in in to support cinder
and keystone and I have removed those in favor of a monkey patch
for cinder.
The find_resource method used to attempt to UUID parse the id, but
it would do a manager.get anyway. I changed it to skip the UUID
parsing. This will make things run minorly faster and it supports
LDAP for keystone.
The find_resource used to attempt to use display_name=name_or_id
when finding. This was a hack for cinder support, but it breaks
keystone because keystone totally messes up with the bogus filter
and keystone refuses to fix it.
Change-Id: I66e45a6341f704900f1d5321a0e70eac3d051665
Closes-Bug: #1306699
|
| |
|
|
|
|
|
|
| |
Thinking ahead, a few other upcoming keystone features could
benefit from reading contents from a file. Thus, moving the
function from policy to utils.
Change-Id: I713ab0e5a00c949ad996daf83b775a7c19044888
|
| |
|
|
|
|
|
|
|
| |
Most of the CLIs use a NoUniqueMatch, so produce a useful
error message if that happens. Added some tests for
find_resource as well.
Change-Id: I85ba61d5f6d1be5bd336a1cc4b02501492905f33
Closes-Bug: #1293846
|
| |
|
|
|
|
|
|
|
|
| |
* Add get_password method to the utilities
* Add --password-prompt option
* Call the get_password method if a prompt is requested
* Various tests
Change-Id: I1786ad531e2a2fbcc21b8bc86aac0ccd7985995a
Closes-Bug: 1100116
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When using the -v option, displays curl equivalent commands and http
messages exchanged with the nova and cinder API servers. Displays the
same messages as those displayed with the --debug option of
python-novaclient and python-cinderclient.
Implements: blueprint curl-commands-in-debugging-messages for nova and
cinder related calls
Change-Id: Ibc8ef79d874334585b81d652b9c7df9e874fffa9
|
| |
|
|
|
|
|
|
|
|
|
| |
* restapi module provides basic REST API support
* uses dicts rather than Resource classes
* JSON serialization/deserialization
* log requests in 'curl' format
* basic API boilerplate for create/delete/list/set/show verbs
* ignore H302 due to urllib import
Change-Id: I3cb91e44e631ee19e9f5dea19b6bac5d599d19ce
|
| |\ |
|