summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Munge region_name to '' if set to NoneColleen Murphy2015-12-292-0/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The openstack ansible module defaults to setting region_name to None[1]. With region_name explicitly set, _get_region won't use '' as a default and therefor has unexpected behavior if the user does not set the region explicitly. This is apparent in bifrost[2] which does not use any cloud config file and does not set the region explicitly. This patch checks whether None was passed in as the region name and sets it to '' so that it can continue processing it as though it was not set. [1] https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/openstack.py#L41 [2] http://paste.openstack.org/show/482831/ Change-Id: I22cce104930f74dd479e704cc1a941dc945b75de
* | | Fix some README typosTim Burke2015-12-281-4/+4
|/ / | | | | | | Change-Id: I3ebec661d1b02da0c940cde63ab862871dca11c5
* | Merge "remove python 2.6 os-client-config classifier"Jenkins2015-12-241-1/+0
|\ \
| * | remove python 2.6 os-client-config classifierDoug Hellmann2015-12-241-1/+0
| |/ | | | | | | | | | | | | OpenStack projects are no longer being tested under Python 2.6, so remove the classifier implying that this project supports 2.6. Change-Id: Ic24f93d5f7e7ffb1eaf91617c09cc897163e88df
* | If cloud doesn't list regions expand passed nameClark Boylan2015-12-223-5/+76
|/ | | | | | | | | | | | | | | | | | Don't fail on a cloud not having regions when a region name is passed. Instead just use the name that is given and expand it properly. This adds test coverage for the paths through the OpenStackConfig._get_region() method to avoid problems like this in the future. In order for this work to be done cleanly a small refactor of get_regions() is done to split it into two methods, one that gets all regions with a sane fallback default (for backward compat) and another that returns only regions that are known in the config and None otherwise. This allows us to switch on whether or not there are known regions. Change-Id: I62736ea82f365badaea5016a23d37a9f1c760927
* Fix glance endpoints with endpoint_override1.13.0Monty Taylor2015-12-212-6/+101
| | | | | | | | | | Now that we properly pass endpoint_override all the time, we broke glance. The reason for this is that we calculate the glance url via glance url stripping in all cases, so the case where we did not have a configured endpoint override was passing the wrong information to the constructor, causing double version addition. Change-Id: I5699b0581d0cb68fed68800c29c8a847e2606ec9
* Allow passing in explicit version for legacy_clientMonty Taylor2015-12-211-3/+6
| | | | | | | Nova (and indeed other clients with microversions, need a user to be able to request an explicit version. Change-Id: I5f67b7fc007b7d6123f621c5943345f88db1f84b
* Pass endpoint override to constructorsMonty Taylor2015-12-212-5/+23
| | | | | | | | Also, the variable name from keystoneauth is "*-endpoint-override" ... so we need to respond to that. Respond to the old -endpoint for compat reasons. Then let's actually pass in the value. Change-Id: I6f413b02e0d2b167a4ee30494b2c91c67124b219
* Merge "Support backwards compat for _ args"Jenkins2015-12-212-0/+63
|\
| * Support backwards compat for _ argsMonty Taylor2015-12-182-0/+63
| | | | | | | | | | | | | | | | | | Instead of putting tons of hidden options to allow for variations of argparse options with _ in them, just manipulate the argv when it's passed in to translate to - instead. (why the heck does argparse not already do this?) Change-Id: I5f0bd9d9a333781ad13d531b3667fff5fdac9eac
* | Merge "Add backwards compat mapping for auth-token"Jenkins2015-12-212-0/+45
|\ \ | |/
| * Add backwards compat mapping for auth-tokenMonty Taylor2015-12-182-0/+45
| | | | | | | | | | | | | | | | novaclient accepted an auth-token argument, which also triggered a token not password based workflow. That's fine - let's map that to token, and if we find it, change auth_type's default from password to token. Change-Id: Ie9acece5cb3c68560ae975bfb0fb2393381b6fba
* | Replace assertEqual(None, *) with assertIsNone in testsShuquan Huang2015-12-171-3/+3
|/ | | | | | | | Replace assertEqual(None, *) with assertIsNone in tests to have more clear messages in case of failure. Change-Id: Ia1af9f64f4f0a66c1429d81313b2c27a7c67cdd7 Closes-bug: #1280522
* Allow arbitrary client-specific optionsDavid Shrewsbury2015-12-143-0/+38
| | | | | | | | | | | | There are occasionally some client-specific things that would be handy to be able to configure about behaviors. For instance, the only config file that ansible's openstack inventory has is clouds.yaml. Rather than teaching os-client-config about such things, allow a pass-through config section. Apply key normalization to _'s like other configs, and merge the clouds and secure files so that the sections behave like other OCC config sections. Change-Id: If307e95006abf6e1efbbd77cfc99e5fdfed6c80a
* Add ceilometer constructor to known constructorsMonty Taylor2015-12-092-0/+2
| | | | | | | In porting ospurge to use get_legacy_client, it became clear that the ceilometer client constructor was missing. Add it. Change-Id: I1102105b78574378c4f11064e21245b08513247b
* Merge "Update vexxhost to Identity v3"Jenkins2015-12-072-3/+10
|\
| * Update vexxhost to Identity v3Monty Taylor2015-12-062-3/+10
| | | | | | | | | | | | | | | | | | There is a discovery URL for vexxhost for keystone v3. Also, there is a new vexxhost domain for it. Also, vexxhost has DNS running designate v1. And make the region list a list of one region, because there is a second region coming soon. Change-Id: Ie72c19976646f41c713124659e69725df59e1580
* | Add support for generalized per-region settingsMonty Taylor2015-12-074-43/+146
| | | | | | | | | | | | | | | | | | | | Internap creates a public and a private network for each customer for each region on region activation. This means there is a per-region external network that the user may want to specify. Also, conoha has per-region auth-urls. Per-region config is still overridden by argparse or kwargs values. Change-Id: Ie2f3d2ca3ccbe7e3dd674983136b42c323544997
* | Merge "Fix a README typo - hepler is not actually a thing"Jenkins2015-12-071-1/+1
|\ \
| * | Fix a README typo - hepler is not actually a thingMonty Taylor2015-12-071-1/+1
| | | | | | | | | | | | Change-Id: Ie8c267e75171b88bd3a1a3a684e85869e75843d7
* | | Merge "Make client constructor optional"Jenkins2015-12-074-6/+82
|\ \ \ | |/ /
| * | Make client constructor optionalMonty Taylor2015-12-074-6/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out we know the mapping of service name to constsructor, so we can try the import for the user without actually importing. Keep the argument though, because this method should be usable by just about any random openstack client lib. Also, because backwards compat. Change-Id: I7e9672e3bf61b8b7b92d55903f4596382f18b515
* | | Updated README to clarify legacy client usageMonty Taylor2015-12-061-14/+14
|/ / | | | | | | | | | | Also, update it to use code-block - which makes things look much nicer. Change-Id: I930ab63a5d159cf4cea27b4e2c4d6fd933de04fc
* | Add simple helper function for client constructionMonty Taylor2015-12-072-0/+54
| | | | | | | | | | | | | | | | Often times you don't want to take advantage of all the flexibility, you simple want the basic works-like-it-should thing. Add a warpper around get_legacy_client to do tht one thing. Change-Id: I086dc4a8e762d4e8e56e01cabe2386577f2ceec8
* | Add method for registering argparse optionsMonty Taylor2015-12-064-1/+263
|/ | | | | | | | | | | | | keystoneauth knows about a bunch of argparse options that users from a command line will want. We do a good job of processing them once they've been collected, but an os-client-config user doesn't have a great way to make sure that they register all of the options, especially when once considers that you really want to peek at the args to see which auth plugin has been selected so that the right arguments can be registered and displayed. Depends-On: Ifea90b981044009c3642b268dd639a703df1ef05 Change-Id: Ic196f65f89b3ccf92ebec39564f5eaefe8a4ae4b
* Merge "Make sure that cloud always has a name"Jenkins2015-12-051-6/+9
|\
| * Make sure that cloud always has a nameMonty Taylor2015-12-031-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | If we don't ask for a cloud, and we fall through to the envvars cloud or the defaults cloud, the cloud that is returned winds up not being named - even though we know what cloud it is. Set the name of the cloud we're working with. This is important for the next patch, where we need to peek at the config to get some default values, but in a fallthrough case we do not know which cloud to request. Change-Id: Ie56e490d4384f2d680450bc956e4b7b5b8099f0e
* | Merge "Add support for secure.yaml file for auth info"Jenkins2015-12-055-13/+95
|\ \ | |/ |/|
| * Add support for secure.yaml file for auth infoMonty Taylor2015-11-225-13/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost nothing in clouds.yaml is secret, but the file has to be treated as if it were because of the passwords or other secrets contained in it. This makes it difficult to put clouds.yaml into a public or broadly accessible config repository. Add support for having a second optional file, secure.yaml, which can contain any value you can put in clouds.yaml and which will be overlayed on top of clouds.yaml values. Most people probably do not need this, but for folks with complex cloud configs with teams of people working on them, this reduces the amount of things that have to be managed by the privileged system. Change-Id: I631d826588b0a0b1f36244caa7982dd42d9eb498
* | Remove optional keystoneauth1 importsJamie Lennox2015-12-021-22/+15
| | | | | | | | | | | | | | keystoneauth1 is now a hard dependency of os-client-config so there is no way that this should not be importable. Change-Id: I20901623e8b29f50d7ab1ed956472a4b1eda51bf
* | Add BHS1 to OVH1.12.0James E. Blair2015-11-252-0/+2
| | | | | | | | Change-Id: I0ef175edccbbc3e24803d02ab6809cfe1a68e0e8
* | Handle cinder v2Monty Taylor2015-11-242-1/+17
|/ | | | | | | | | | | | | | It turns out that cinder v2 has a service_type of volumev2 because nobody thought of the children. But that's ok - we actually care about user experience around here. SO - take the sane approach and return service_type = volumev2 if service_type == volume and volume_api_version == 2. This way user code can all safely say "please give me the endpoint for the volume service" and can use the api_version parameter to specify which version they want. We should all possess righteous indignation about this patch. Change-Id: I15fc5ddd92345d78b6928f11a8d77cecd0427f7d
* Fix lack of parenthesis around boolean logic1.11.1Monty Taylor2015-11-202-1/+41
| | | | | | | | The legacy envvar prefix support broke a workaround for use of OS_ envvars in test cases. This is only currently a problem for shade functional tests, but it IS a bug. Change-Id: Ia0cbb4e2ea7ce6eeeea36533e057bd53a830d44c
* Only pass timeout to swift if we have a value1.11.0Monty Taylor2015-11-192-5/+39
| | | | | | | swiftclient does not have the built-in None detection that keystoneauth has, so we have to do it ourselves. Change-Id: I3fcf60dd2f3350045b824899ac48b02809452a4b
* Merge "Add support for legacy envvar prefixes"Jenkins2015-11-192-8/+30
|\
| * Add support for legacy envvar prefixesMonty Taylor2015-11-132-8/+30
| | | | | | | | | | | | | | | | | | | | In trying to move the legacy clients to do their config via os-client-config, many of them had prefixes like NOVA_ or GLANCE_ in their shells. It's pretty easy to support optionally passing those in so that the transition to OCC is less of a change and we can treat the deprecation cycle of those features as a different topic. Change-Id: Ic819c0790989fa034db03d83535ee7b70aaacc3a
* | Fix name of the object-store api keyMonty Taylor2015-11-142-3/+3
| | | | | | | | | | | | | | | | | | | | There is only one value for this, and it's not consumed in the process of making a swift client, so the chances that anyone set it to something else are pretty much nil. However, for completeness we should make it the right name, as "object-store" is the service key name for swift, not "object". Change-Id: I395c1c44a2f50996b61dff22e07149b8dd13eda9
* | Refactor per-service key makingMonty Taylor2015-11-142-8/+33
|/ | | | | | | | | The key for swift is object-store, but the key in the config dict would be object_store_api_version, so the key concatenation would not work. In fixing that, refactor out the creation of the keys so that the concatenation and transformation needed always happens. Change-Id: Ic095912bfc84f13ef8b11f312303a517289e0441
* Merge "Add method to get a mounted session from config"Jenkins2015-11-122-0/+40
|\
| * Add method to get a mounted session from configMonty Taylor2015-11-052-0/+40
| | | | | | | | | | | | | | | | Getting a session is great, but sometimes you need a thing called an "adapter" which takes 5 parameters which are all already contained in the config that you used to get the session. Change-Id: Id4e418cd04ae81540d9898f7b2e959b974f355d2
* | Merge "Use requestsexceptions for urllib squelching"Jenkins2015-11-122-12/+4
|\ \
| * | Use requestsexceptions for urllib squelchingMonty Taylor2015-11-042-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | The code to deal with this properly is quite sharable and we should not care. Use requestsexceptions from the Infra team to handle it. Change-Id: Ie20a3e1b2d8d18a4a76b34219cf12510cb1cda98 Depends-On: I52249b6d2fe04c49a9f4ed139d7625c890309ca8
* | | Merge "Remove unneeded workaround for ksc"Jenkins2015-11-122-7/+3
|\ \ \
| * | | Remove unneeded workaround for kscMonty Taylor2015-11-082-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out keystoneclient can take string input and does the same transform we're doing here, it's just not documented. Remove the workaround on our side as it's unneccesary. Change-Id: Ie46945f7d96e3d65004cd19823b3be989e1d18a7
* | | | Fix JSON schemaDavid Shrewsbury2015-11-101-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | We incorrectly refered to things with _api_ in the name. Change-Id: I9130ae0f72484957d0a8943eceabcd6a6bc21c91
* | | | Merge "Workaround a dispute between osc and neutronclient"1.10.2Jenkins2015-11-092-1/+5
|\ \ \ \
| * | | | Workaround a dispute between osc and neutronclientMonty Taylor2015-11-092-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-openstackclient wants network_api_version to be 2. neutronclient wants it to be 2.0. There is a patch to OSC to make it understand both, but in the mean time, let's unbreak people. Change-Id: I4d8f187d1302c5bcfa246e017e6c6d8af9c3f733
* | | | | Merge "Workaround for int value with verbose_level"Jenkins2015-11-091-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Workaround for int value with verbose_levelMonty Taylor2015-11-091-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-openstackclient uses an int value for verbose level which the stringification patch broke. As a quick fix, special case verbose_level, as fixing it properly might take more than 5 minutes. Change-Id: Ie12a40d3d3e400b3ec2103d7a58c4902fb10fc2d Closes-Bug: #1513919
* | | | Add default API version for magnum serviceMonty Taylor2015-11-081-0/+1
|/ / / | | | | | | | | | | | | | | | | | | shade is adding magnum support, so we should probably grow a default value for the container_api_version. Change-Id: I2551f2921f10ba109ccb52301cc8ad23c5f81c46