summaryrefslogtreecommitdiff
path: root/ceilometerclient/client.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix alarm-evaluator can't start when ssl was enabledLan Qi song2015-05-131-3/+3
| | | | | | Change-Id: I8cd3f3c7e745107ad4e0cbed7ebdd247a34fbbbd Closes-Bug: #1453061 (cherry picked from commit ed8408c61f258794a0a689df10c5549753680a0a)
* Merge "add in missing options" into stable/kiloJenkins2015-04-211-1/+2
|\
| * add in missing optionsgordon chung2015-04-211-1/+2
| | | | | | | | | | | | | | we missed a few options. this cleans up list. Change-Id: I9ba984f804aecee5b63e5a86e699733040dee245 (cherry picked from commit bdbec9721233a5cb304f0122832002b50832ae8a)
* | Add timeout for keystoneclient sessionZhiQiang Fan2015-04-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit 44af2d4087815d5d451305b549f91ab6130528c0)
* | add region_name to auth plugin parametersZhiQiang Fan2015-04-201-0/+2
| | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit bfb6d122fa99d94a61aea4432f74cbbf3f5d03cc)
* | ceilometerclient insecure argument no longer worksMatthew Edmonds2015-04-201-1/+3
|/ | | | | | | | | The os_insecure argument needs to be parsed and passed to the auth plugin for non-shell usage. Change-Id: Id45a680396a9b646b273d971a0f6c274e95019a6 Closes-Bug: #1438750 (cherry picked from commit a5df77d8730284e278fde087e8bb3c2520c6ddb1)
* Merge "Fixes bug with Client function not setting up SSL params" into ↵Jenkins2015-04-201-30/+33
|\ | | | | | | stable/kilo
| * Fixes bug with Client function not setting up SSL paramsSrinivas Sakhamuri2015-04-161-30/+33
| | | | | | | | | | | | | | | | | | | | | | There are instances where some applications (heat, rally) instantiate ceilometer client using Client function (instead of get_client) which doesn't use the insecure and verify params properly. This fix will address that. Change-Id: I2f6346496e6ee36b5cd97ec6d9a732431532ff96 Closes-Bug: #1428370 (cherry picked from commit e7b8c48c60e85378e1e1d3c30bfb4cfa79f3105a)
* | Merge "ceilometerclient fails with keystone v3 auth" into stable/kiloJenkins2015-04-201-0/+2
|\ \
| * | ceilometerclient fails with keystone v3 authMatthew Edmonds2015-04-161-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | When attempting to use keystone v3 Password authentication, ceilometerclient is failing to pass the project information to keystoneclient, which results in an unscoped token that lacks the service catalog. Change-Id: I980ba19f4b6b85ffc54d044184970c4902e62af4 Closes-Bug: #1438753 (cherry picked from commit d6ce587e95527c2c1aaeb2ce28afdcc64b32563f)
* | fix client docstringZhiQiang Fan2015-04-161-0/+2
|/ | | | | | | | | | * fix broken docstring in ceilometerclient.client * remove non-existent `release` index * remove duplicated reference generation in ext/gen_ref.py Change-Id: Iad8c527e61628a406d5dd84adac875190b994fac Closes-Bug: #1440629 (cherry picked from commit 2ea94891ea964710ea76e774a805bdff589a0b80)
* Merge "Allow all pep8 checks"Jenkins2015-01-201-2/+1
|\
| * Allow all pep8 checksDina Belova2015-01-121-2/+1
| | | | | | | | | | | | | | Fix H405 pep8 issue. H904 issue check was ignored, although there were no places in client code violating this rule. Change-Id: If3b84eb8abb03511d7f77cabfa2955f472a60f23
* | Merge "Fix improper parameter setup for cacert and client certs"Jenkins2015-01-161-1/+25
|\ \
| * | Fix improper parameter setup for cacert and client certsSrinivas Sakhamuri2015-01-151-1/+25
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The client passes cacert incorrectly, CA cert need to be passed in verify parameter to requests library. Also at present, key file is not being used, which if it is supplied need to be passed as a tuple in cert parameter Python requests library relevant doc link http://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification Change-Id: Ie71e760bce6a78ed1444373adfa0a133e82ec434 Closes-Bug: 1408372
* | Merge "Remove redundant parentheses (except openstack.common)"Jenkins2015-01-131-1/+1
|\ \ | |/ |/|
| * Remove redundant parentheses (except openstack.common)Dina Belova2014-12-101-1/+1
| | | | | | | | Change-Id: I594234648a37d283559a0365969a7fe3609079f8
* | Support ceilometer-url and os-endpointZhiQiang Fan2015-01-081-20/+23
| | | | | | | | | | | | | | | | | | Ceilometerclient has messed up with (ceilometer-url and os-endpoint) and (os-auth-token and token). This patch marks ceilometer-url and auth-token as deprecated, and unifies the two pairs arguments. Change-Id: Id55e5b603d8075018cf45b9833d397173439b3ce Closes-Bug: #1396811
* | Enable --os-insecure CLI optionZhiQiang Fan2014-12-061-1/+3
|/ | | | | | | | | | | | | --os-insecure is not correctly passed to Keystoneclient because it expects a bool type but we assgin a string value to the insecure parameter, this patch fixes it by using oslo.utils.strutils.bool_from_string. --os-insecure is ignored by Ceilometerclient.v2.client because it expects parameter verify rather than insecure, this patch fixes it by converting insecure to verify if that field is not set. Change-Id: I545de167cdf8cfec6b5c67984b74327fb76c513a Closes-Bug: #1394449
* Support os-endpoint-typeZhiQiang Fan2014-11-271-2/+3
| | | | | | | | | | | | Ceilometerclient will always get publicURL even though we specify endpoint type via arguments, it is because we call kesytone session with wrong keyword argument, which should be interface rather than endpoint_type. see: https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/auth/identity/base.py Change-Id: Ic2b03bd900d913c7efd22c9b91dfaa79e0cdd4bc Closes-Bug: #1396493
* Fix wrong initialization of AuthPlugin for keystone v3ZhiQiang Fan2014-11-111-0/+8
| | | | | | | | Ceilometerclient doesn't pass domain related arguments to AuthPlugin, which will cause keystoneclient v3 cannot be used properly. Change-Id: I2554a36f214c0eae61b7ba6b8580c41b8f8c6370 Closes-Bug: #1391122
* Merge "keystone discovery fallback support"Jenkins2014-09-201-42/+41
|\
| * keystone discovery fallback supportgordon chung2014-09-101-42/+41
| | | | | | | | | | | | | | | | | | version discovery and sessions aren't supported by all external auth systems. this patch adds a fallback when discovery does not work. Closes-Bug: #1333961 Change-Id: Ib253c736e37f8dbc50881f9fc691bfdb4ab87d71
* | Typo "authtenticated" instead of "authenticated"Rafael Rivero2014-09-181-1/+1
| | | | | | | | | | | | | | Misspelling of "authenticated" found in docstring of method get_client in client.py Change-Id: I0b661a6b6008b416341ccbc691739094420723b1
* | Fix AuthPlugin authentificationPavlo Shchelokovskyy2014-09-151-1/+1
|/ | | | | | | AuthPlugin wrongly assumed that self.opts['token'] is always a function. Change-Id: I968c62aec0d16d736693e403d03a495baf8ea15a Closes-Bug: #1369461
* Add endpoint opt into auth_pluginEugeniya Kudryashova2014-08-081-1/+1
| | | | | | | | Endpoint should be present in auth_plugin options to allow connect to ceilometer through specified endpoint and token Closes-Bug: #1354507 Change-Id: I0aaafc6f599a67b242ade25efb3e667738bd71fd
* Use HTTPClient from common Oslo codeekudryashova2014-07-311-45/+113
| | | | | | | | | In the process of unification of the clients code we should reuse common functionality from Oslo. bp common-client-library-2 Change-Id: I0e027c33ee42b6de032d33269caeea33e7837f40
* Update python-ceilometerclient to support Keystone V3 APIFabio Giannetti2014-06-261-47/+156
| | | | | | | | | | | | | | Keystone is now deprecating the V2 API in favor of the V3 API. The ceilometer client is now using the keystone session to delegate the discovery of the version that is going to be used, this eliminates the need of updating the client every time there is a new API version. DocImpact blueprint support-keystone-v3-api Change-Id: I6ebacce7adf70f24bdede9b920853ab9851071cf
* Avoid dead loop when token is string formatZhiQiang Fan2014-04-261-2/+2
| | | | | | | | | | The token needs to be a callable object in http.Client, so we assign a lambda expression to it when it is a string, but current implementation will cause dead loop since it is x = lambda: x. This patch fixes it and improves the corresponding test code. Change-Id: Id41edd705b46196404e5cb3483a290074bde12d0 Closes-Bug: #1301877
* Checking the type of auth_token, and fixing it if necessaryMarc Solanas2014-03-131-6/+9
| | | | | | | | | | | | | | | | | When creating a new Client object by calling the get_client function, if the ceilometer_url is not passed as a parameter, but the token is passed, the auth_token is converted to a lambda function. However, when both the ceilometer_url and the auth_token are passed, this conversion does not take place. This fix checks if the auth_token is a lambda function or not. If it is not, it creates a new lambda function which returns the token. Without this check, if a token was passed as a string, the python client would throw and error, when trying to call self.auth_token() in ceilomenterclient/common/http.py. Change-Id: I3e564fcf17ce497546b75f0ab8c7ca0f6f2099df Closes-Bug: #1254186
* client looking at wrong cacert argument nameGordon Chung2014-01-061-1/+1
| | | | | | | | fix so client consistently uses 'os_cacert' arg value instead of either 'os_cacert' or 'cacert' Change-Id: If5648855aefc7af64178249c270a9ac66907e466 Closes-Bug: #1266472
* Added support to --os-cacertStefano Zilli2013-10-011-1/+5
| | | | | | Closes-Bug: #1224343 Change-Id: Ib0549d4496c47900c81cc970b99bcff25cad0040
* Pass region_name argument to keystone clientBartosz Górski2013-09-171-0/+2
| | | | | Change-Id: If82bd7fe5680faef6e56abb6f76d203b7296beb5 Closes-Bug: #1228063
* Handle case where os_auth_token is set to ''Eoghan Glynn2013-08-021-1/+1
| | | | | | | Properly handle case (as in CLI) where os_auth_token is set, but to an empty string. Change-Id: I7e96bf22e2a91e0e3ec783b406fd05e4138860c8
* Ensure keystoneclient.auth_token is re-evaluatedEoghan Glynn2013-08-021-1/+3
| | | | | | | | | | Fixes bug 1207441 Force the re-evaluation of the keystoneclient.auth_token property so as to avoid missing out on the in-built refresh logic when expiry is imminent. Change-Id: I8319e9e9a71e33e089fbe2fbc812d2b6c15da927
* Make authenticated client easier to consume.Eoghan Glynn2013-06-211-0/+77
| | | | | | Encapsulate keystone logic in an convenience method. Change-Id: I0a048e02f57d657b8b414a76d759ceb9e0e025df
* Add basic functionalityAngus Salkeld2012-11-091-0/+19
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>