summaryrefslogtreecommitdiff
path: root/ceilometerclient/tests/unit/test_client.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove keystoneclient dependencyJulien Danjou2016-07-281-3/+0
| | | | Change-Id: I3589eca8fd6a581e57524cffa8a8f1278358f38c
* Merge "Switch to keystoneauth"Jenkins2016-06-231-14/+14
|\
| * Switch to keystoneauthClenimar Filemon2016-06-011-14/+14
| | | | | | | | | | | | | | keystoneclient.auth is deprecated in favour of keystoneauth. This patch updates Ceilometerclient accordingly. Change-Id: Id4b14cbccfabfeaa5322f7ae5702261d0ed9cca2
* | Ignore aodh_endpoint argumentrabi2016-06-071-1/+18
|/ | | | | | | | | When using keystone session, we seem to pass all **kwargs to SessionClient for metering. We should drop the 'aodh_endpoint' from kwargs. Change-Id: Iaf28d4a525d49f62a0ae635dc1102cc1f0308c74 Closes-Bug: #1589425
* Decouple ceilometerclient without aodh services runningliusheng2016-03-081-0/+10
| | | | | | | | | Currently, the ceilometerclient will be broken if aodh services not running, it will be worse if users don't want alarming service and they must start the aodh services. Change-Id: Idf7468f28cee001262b67b6e110357ffc971535a Closes-Bug: #1550095
* Only token or creds are required.Mehdi Abaakouk2016-01-131-1/+1
| | | | | | | | | When token is provided and not the endpoint, the client works, because keystoneauth/keystoneclient will use the service_type to discover the endpoint. Closes-bug: #1533712 Change-Id: I0cf1ba52f656a450d358b2356df67d004f9aba7d
* Don't copy the auth_plugin for aodhMehdi Abaakouk2016-01-071-92/+56
| | | | | | | | | | | | | We must not copy a keystone session object or auth_plugin object. This change simplifies the aodh redirection code by: * sharing the keystone session object between aodh and ceilometer client * creating a new AuthPlugin() for the aodh client instead of copying the ceilometer one and then change its content. Closes-bug: #1531452 Change-Id: I2b2195e32c5dd74136237f7166c9c0d325434611
* Remove double API requestsMehdi Abaakouk2015-11-201-0/+11
| | | | | | | | When a keystone session object is used API call are done twice. This change fixes that. Change-Id: I79815520b996bce954fe531193f1a0229ef30060
* Catch exception raised by keystoneauth1Mehdi Abaakouk2015-11-201-1/+2
| | | | | | | | | We must support session object that comes from keystoneauth1 and keystoneclient. This change adds code path for keystoneauth1 when it misses. Change-Id: I1164a0a0745605b6bc4fd1fc8fb2813c7e40fb9b
* drop v1 clientgordon chung2015-10-211-14/+0
| | | | | | | | | | we dropped v1 back in Juno. as icehouse is EOL and the client follows stable/branches, v1 is completely inaccessible and can be removed Change-Id: If4c6c07e65a6c47f47c59de6c99e8c40ef4e63cb Co-Authored-By: ZhiQiang Fan <aji.zqfan@gmail.com> Closes-Bug: #1389331
* Move to keystone session objectMehdi Abaakouk2015-10-071-3/+24
| | | | | | | | | | | | ceilometer client is a rare client that doesn't allow to use a keystoneclient/keystoneauth session object. This change fixes that and will allow to remove the deprecated apiclient code in the future. Depends-On: I43223a8b38ff1f4ef30c1d2345a28de6ade51863 Depends-On: I7cbe0afa12c9d11ce2eaed1f4d29f41507e273f8 Change-Id: I4804c45c2ba69982163503ba5d9d4eba86f904fe
* Don't try to get aodh endpoint if auth_url didn't providedliu-sheng2015-08-251-0/+9
| | | | | | | | | | | | This change includes: * Allow users of ceilometerclient specifying aodh_endpoint explicitly * If aodh_endpoint didn't provided and users just provide ceilometer endpoint and token, no auth_url, we assume aodh is unavailable and avoid trying to get aodh endpoint. Change-Id: Idd0ce60058d23507a99b89926e461d19db267ca2 Closes-Bug: #1488290
* Add support for client redirecting to aodh endpoint if availableliu-sheng2015-07-221-18/+93
| | | | | | | | Currently, alarm module of ceilometer has been decided to be splitted out of ceilometer tree. To keep compatibility for others upstream users (such as Heat), we need to redirect alarm related request to aodh endpoint. Change-Id: Id13b56eef55f807d5ad2026f225c93fd5585521e
* Fix unit tests failing caused by new Mock releaseIlya Tyaptin2015-07-101-6/+11
| | | | | | | | Since the mock 1.1.1 calling of function 'assert_called' and 'assert_called_once' raises the AttributeError. In current patchset calling of these functions is fixed Change-Id: I5c21bb3f6cfd8cc095a277ead80794e97bb63c72
* [unittest] Increase client and shell modules coverIlya Tyaptin2015-05-111-0/+151
| | | | | | | Add tests to increase unittest coverage of ceilometerclient.client, ceilometerclient.shell, ceilometerclient.v2.shell. Change-Id: I83a64ee31d6068a5903ef85ec85d5780828a24d7
* Add timeout for keystoneclient sessionZhiQiang Fan2015-04-141-0/+13
| | | | | | | | | | | Currently, we only apply timeout on ceilometer api, but not on keystone api as well, this is not consistent. Keystone api may be slow, or worse, stuck, then ceilometerclient will not return timely. This issue has caused availability problem in our environment when ceilometer alarm service has been running for a long time. Change-Id: I0d5f82ff9cf4132a1de2f0b649908483326e116e Closes-Bug: #1436249
* add region_name to auth plugin parametersZhiQiang Fan2015-04-141-0/+1
| | | | | | | | | If endpoint is not specified, then auth plugin will request to keystone to get target endpoint, however, we don't provide region name for it, this will cause critical issue in multiple region scenario. Change-Id: I99ceafec25072988435018ca1affbd778ca9b22f Closes-Bug: #1439553
* ceilometerclient insecure argument no longer worksMatthew Edmonds2015-04-071-0/+9
| | | | | | | | The os_insecure argument needs to be parsed and passed to the auth plugin for non-shell usage. Change-Id: Id45a680396a9b646b273d971a0f6c274e95019a6 Closes-Bug: #1438750
* Move unit tests into their own subdirectoryChris Dent2015-03-131-0/+158
This is in preparation of moving functional tests currently in tempest in-tree. No surprises in this change: * move files * update the local imports Same number of tests run, all still pass. Change-Id: Ibfeac44421c5f36740b1377868f5ec469b2893f5