-
Notifications
You must be signed in to change notification settings - Fork 55
Implement Cloudant.bluemix client class method #314
Conversation
e9eed27 to
f51cf68
Compare
| variable. | ||
| """ | ||
| instance_name = 'Cloudant NoSQL DB-lv' | ||
| vcap_services = {'cloudantNoSQLDB': [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to test with a JSON object that has multiple Cloudant instances to verify that instance_name is working correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thinking. I'll add an additional test. I'll also add a test for 1 service in VCAP without specifying instance_name.
tests/unit/cloud_foundry_tests.py is testing majority of this. But since I've already gaffed this once it'd be good to test again at the client instantiation level too.
b58c661 to
8512b8d
Compare
ricellis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 just the CHANGES comment needs a tweak I think.
CHANGES.rst
Outdated
| @@ -1,5 +1,6 @@ | |||
| 2.6.0 (Unreleased) | |||
| ================== | |||
| - [NEW] Added ``Cloudant.bluemix()`` client class method for instantiating a Cloudant Bluemix client. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure a "Cloudant Bluemix client" is really a thing.
Instantiating a client from VCAP_SERVICES metadata?
Last time we went with:
- [NEW] Added
cloudant_bluemixmethod to the Cloudant client allowing service credentials to be passed using the CloudFoundry VCAP_SERVICES environment variable.
| append_response_error_content, | ||
| InfiniteSession, | ||
| ClientSession) | ||
| ClientSession, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright date on this file is a bit weird, but I think it's fixed in #306 anyway.
Added `Cloudant.bluemix()` client class method for instantiating a Cloudant Bluemix client.
8512b8d to
17d8c63
Compare
Thanks for your hard work, please ensure all items are complete before opening.
What
Implement
Cloudant.bluemix()client class method.Example Usage
Testing
Includes additional unit tests.
Issues
Fixes #313.