This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).
Change-Id: I431ed20740926bc6101cb607a0b3d6d8b6ccdcd5
Removing *args in 94c5223f02,
turned out to break projects that are using monascaclient.
Following code adds it back with the note about the deprecation.
Change-Id: If2664b5054d668f5e088699ae1493c54692a2e8c
osc-lib library is foundation on which a CLI client
for openstack can be built. It is meant to facilitate several
aspects, that were previously hard-coded in client:
* keystone communication handling
* supporting multiple authentication methods (not only password)
* common authentication parameters (i.e. environmental OS_*)
* communicating over http with service endpoint
* interactive CLI mode
Thanks to those items, it was possible not only to drop
nearly 3k lines of code and replace them with osc-lib but also
increase reliabity of the client in terms of new openstack releases.
Also it allowed to greatly simpify existing set of unit-tests.
They are now testing only actual logic instead of mocking
entire process of calling shell (i.e. MonascaShell.run(args)) or
mocking HTTP communication. Both items are handled by osc-lib thus
not they are not subject of monascaclient unit tests layers.
Note:
This change is partial integration with osc-lib and its main
purpose is to move the responsibility of:
* keystone communication
* rest-ful communication with service endpoint
to underlying library thus allowing client to implement only
necessary functionality and not supporting boilerplate code,
mentioned above.
Story: 2000995
Task: 4172
Change-Id: I1712a24739438e2d8331a495f18f357749a633c5
We can use dict.items instead, as it will return iterators
in PY3* as well. And dict.items/keys will more readable.
Change-Id: I76683ba60193b725a668716366f020391f61ac4c
These packages are not imported in monascaclient, remove them
from requirements.txt to avoid installing.
Change-Id: I239124ca1dcda943f7d1ea2aec881b83576f81a7
The type field was always being sent to the API even if a value wasn't
given. Change code to only send type field if --type was actually used
as an argument
Added tests for this case
Change-Id: Idb495eceb189db341753fd82be57d414e17cd64b
Closes-Bug: #1664326
The tenant-id query parameter was being passed as a list instead
of as a string
Added test
Change-Id: Ib8300530a3a17d9cb96962c1ffdf5362ed0553ca
Closes-Bug:#1664415
Python 3.3 is not supported from Mitaka, as per Infra.
This patch removes the support and add py35 for the same.
Change-Id: I9248235fc5892362531f465259b3eb40abfc9d7e
From looking through monasca server code there is nowhere that is
actuall reading the X-Auth-User, X-Auth-Key, X-Auth-Url or X-Auth-Region
headers. The shell also enforces that a user provide keystone
authentication. This means we are sending the server a user's password
for no reason. They were initially added in the very first monascaclient
commit so assume they were unneeded and remove it.
Change-Id: Ic6e6dd1a14474537ab9180bb4af1a3fae09fc8a6
Mocking out the entire http layer means there is no testing being
performed that a request is actually being sent out as expected.
requests-mock mocks requests and responses at the point where it would
be sent out over the wire so we can better see actual made requests.
Change-Id: I66657ecc6a53b23cecfe92c911aee6fd27c68f40
When an exception was caught and rethrown, it should
call 'raise' without any arguments because it shows
the place where an exception occured initially instead
of place where the exception re-raised
Change-Id: Ida52fc0078eebea9441c3caa0efc8f7f4c9b53f2
In Python 3 __ne__ by default delegates to __eq__ and inverts the
result, but in Python 2 they urge you to define __ne__ when you
define __eq__ for it to work properly [1].There are no implied
relationships among the comparison operators. The truth of x==y does
not imply that x!=y is false. Accordingly, when defining __eq__(),
one should also define __ne__() so that the operators will behave as
expected.
[1]https://docs.python.org/2/reference/datamodel.html#object.__ne__
Change-Id: I52d4b7396136dd3be7b8767dccb0613e8faba536
Preserves the 'next' link from list queries to allow pagination
and adds a new command to pick the last query where the limit
stopped it
Change-Id: I564c3824b0dd8458e3d6237ec546b4e6e1052334