Commit Graph

299 Commits

Author SHA1 Message Date
Tony Breeds 853d025f9b Retire Packaging Deb project repos
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
2017-09-12 16:02:23 -06:00
Jenkins 6b6c4843ea Merge "Bringing back backward compatybility" 2017-07-24 10:20:45 +00:00
Tomasz Trębski 7e19131bfd Bringing back backward compatybility
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
2017-07-24 07:59:13 +02:00
OpenStack Proposal Bot 7e57528f59 Updated from global requirements
Change-Id: I70e2499eeca24c23e614c596a9bcfea62cba2728
2017-07-21 05:07:24 +00:00
Tomasz Trębski 94c5223f02 Integrate client with osc-lib
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
2017-07-15 01:37:08 +02:00
OpenStack Proposal Bot c46b781405 Updated from global requirements
Change-Id: If615cc13380aa90fccdc36a9cb37bc9f3b0fd4c3
2017-06-10 21:48:27 +00:00
OpenStack Proposal Bot d18e339037 Updated from global requirements
Change-Id: I872d61f2a771299ecf98254ab923e23f09004f5d
2017-05-18 06:34:10 +02:00
Jenkins fed80a73ba Merge "Added support for os_tenant_{name,id} after os_project_" 2017-05-05 08:37:52 +00:00
OpenStack Proposal Bot 66fe5bee25 Updated from global requirements
Change-Id: I636ec2d8e012bb26ec0895e8790f0ce9d56b36ec
2017-04-17 17:21:24 +00:00
Sumit Jamgade 3a320ee5d1 Added support for os_auth_version when os_auth_url is unversiond
Change-Id: I89e9b040e41caabcf366def480bb5c5cd0eb965d
Story: 2000965
2017-04-16 16:34:43 +00:00
Jenkins 5a4b4ed1c2 Merge "Optimize the link address" 2017-04-13 19:51:41 +00:00
Sumit Jamgade 9269be018f Added support for os_tenant_{name,id} after os_project_
and deprecation warning for using them.

Change-Id: I69080d4a2e1a2ccae24ee7f181aec30d7754a031
Story: 2000960
Task: 4097
2017-04-12 09:35:28 +02:00
Jenkins 1225a7324c Merge "Replacing six.iteritems() with .items()" 2017-04-11 16:45:09 +00:00
rajat29 47e3879972 Optimize the link address
Use https instead of http to ensure the safety

Change-Id: I2b076f946c907e111efd597b8a82e0980c6f8d05
2017-04-11 13:44:20 +05:30
OpenStack Proposal Bot 885f6e925c Updated from global requirements
Change-Id: I13c8991f830b9b3e0858c4d18f4d1aac12a12c65
2017-04-07 06:16:05 +00:00
rajat29 7f5c3e035e Replacing six.iteritems() with .items()
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
2017-04-04 16:42:31 +05:30
OpenStack Proposal Bot d9c5b30d42 Updated from global requirements
Change-Id: Ia54eef70d5f3ab810af93cce14cb5338754e9556
2017-03-02 11:54:51 +00:00
Jenkins 3fa5659855 Merge "Fix: CLI metric-create using project-id fails" 2017-02-28 16:46:50 +00:00
Jenkins cc793ac8a0 Merge "Fix notification-patch CLI fails if type not given" 2017-02-22 15:55:52 +00:00
Tomasz Trębski f9696d6816 Migrate fully to ostestr
Following commit migrates python-monascaclient
fully to os-testr and oslo.test

Additionally:
- removed mock requirement (unused)
- removed sphinx requirement (unused)

Change-Id: If534134ced5081ccdf40ab7963e087e29672608d
2017-02-20 11:07:46 +01:00
OpenStack Proposal Bot dc69217aea Updated from global requirements
Change-Id: I89924278075cc429892245c2a357f4869ad45ec5
2017-02-15 01:35:19 +00:00
Jeremy Liu 9442e29250 Remove unused requirements
These packages are not imported in monascaclient, remove them
from requirements.txt to avoid installing.

Change-Id: I239124ca1dcda943f7d1ea2aec881b83576f81a7
2017-02-14 17:28:47 +08:00
Craig Bryant 537389cad3 Fix notification-patch CLI fails if type not given
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
2017-02-13 22:23:38 -07:00
Craig Bryant 3736d114be Fix: CLI metric-create using project-id fails
The tenant-id query parameter was being passed as a list instead
of as a string

Added test

Change-Id: Ib8300530a3a17d9cb96962c1ffdf5362ed0553ca
Closes-Bug:#1664415
2017-02-13 18:27:08 -07:00
OpenStack Proposal Bot 6c91e28edb Updated from global requirements
Change-Id: I165fb464523eb27267abf6057da40af7bd12ee51
2017-02-09 14:00:20 +00:00
Craig Bryant 9cf6e8b0a5 Turn on bandit check as part of pep8
Add bandit job as part of pep8 in tox.ini

Bandit showed no issues with the current code.

Change-Id: I482544040fa80f33335538404c74f7a075f78237
2017-02-08 13:34:22 -07:00
Jenkins ef358a8847 Merge "Show team and repo badges on README" 2017-01-24 10:09:56 +00:00
Anh Tran 3848b482a5 Typo fix: recieve => receive
Change-Id: I20d49e807a4827303446ac8d8d6bbf2d168b119d
2017-01-23 16:37:21 +07:00
Cao Xuan Hoang 4dafb28ad8 Remove support for py33
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
2017-01-23 10:33:49 +07:00
Jenkins 27cebc673c Merge "Use correct ENV variables for scoping" 2017-01-20 16:47:46 +00:00
OpenStack Proposal Bot 95cfb847e2 Updated from global requirements
Change-Id: I59d65db5b26194dc2f4fd525506745831621d2b8
2017-01-20 01:54:43 +00:00
Jenkins 7b15f2211d Merge "Don't send X-Auth- headers in requests" 2017-01-16 11:54:34 +00:00
Jamie Lennox 6105dddba8 Don't send X-Auth- headers in requests
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
2017-01-12 09:04:54 -07:00
Jenkins 37f3899577 Merge "Add __ne__ built-in function" 2017-01-10 21:31:13 +00:00
Jenkins bb48cdb3bd Merge "Use the new copy of tox_install.sh for global constraints support" 2017-01-10 21:24:18 +00:00
Jenkins c2c29799d0 Merge "Add CONTRIBUTING.rst" 2017-01-10 21:07:12 +00:00
Jamie Lennox d50f05a60b Use requests-mock instead of custom fakes
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
2017-01-09 11:11:13 -07:00
xhzhf 7664f93d00 H803 hacking have been deprecated
H803 hacking have been removed since hacking 0.10.
https://github.com/openstack-dev/hacking/blob/master/setup.cfg
So remove H803 ignore statement
Closes-Bug: #1650849

Change-Id: I5e73b975f76f2f837f86eb67f67903e1d748b2dd
2016-12-18 09:51:21 +08:00
OpenStack Proposal Bot fba4383533 Updated from global requirements
Change-Id: Ic1e157e7374885378223549644173adbed9c70dc
2016-12-12 03:46:59 +00:00
Jenkins de70f047dd Merge "Add list_next for pagination" 2016-12-09 06:26:12 +00:00
Jenkins ec9c445e49 Merge "Add py35 tox environment" 2016-12-06 06:18:47 +00:00
Jenkins db4ced5b1f Merge "Add state-updated-timestamp filter to alarm count CLI" 2016-12-06 05:33:25 +00:00
Jenkins c98c3d8397 Merge "Delete deprecated Hacking in tox.ini" 2016-12-05 21:09:54 +00:00
gengchc2 a2da78a356 Delete deprecated Hacking in tox.ini
Some hacking have been removed,so we can delete them.
More details:
    https://github.com/openstack-dev/hacking/blob/master/setup.cfg

Change-Id: I29f12404a275ea80a405472d860d01db470c3bcb
2016-12-04 13:06:37 +08:00
Dirk Mueller 7047a744d8 Add py35 tox environment
Change-Id: I1c8ca6a92b5100975e2cb9fab0417450c34af739
2016-12-04 02:48:43 +01:00
Dirk Mueller 38abce641b Use the new copy of tox_install.sh for global constraints support
global-constraints handling was simplified,  update local copy for
tools/tox_install.sh

Change-Id: I0acb51c73d1fa3ccf9af903f091c968ab7ae42aa
2016-12-03 20:07:43 +01:00
gengchc2 83ced3537c Correct reraising of exception
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
2016-12-02 10:14:24 +08:00
gecong1973 57be21cd16 Add __ne__ built-in function
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
2016-11-29 09:25:45 +08:00
Flavio Percoco 16aa6a60f5 Show team and repo badges on README
This patch adds the team's and repository's badges to the README file.
The motivation behind this is to communicate the project status and
features at first glance.

For more information about this effort, please read this email thread:

http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html

To see an example of how this would look like check:

b'https://gist.github.com/709feed00e8ddc03230013dc1884c4da\n'

Change-Id: I2f5dfdeb22245162525cf7b57da99aa3f557e94e
2016-11-25 12:44:04 +01:00
Ryan Bak 78a8486d1c Add list_next for pagination
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
2016-11-19 22:21:24 -07:00