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
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
Nova (and indeed other clients with microversions, need a user to be
able to request an explicit version.
Change-Id: I5f67b7fc007b7d6123f621c5943345f88db1f84b
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
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
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 tests to have
more clear messages in case of failure.
Change-Id: Ia1af9f64f4f0a66c1429d81313b2c27a7c67cdd7
Closes-bug: #1280522
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
In porting ospurge to use get_legacy_client, it became clear that
the ceilometer client constructor was missing. Add it.
Change-Id: I1102105b78574378c4f11064e21245b08513247b
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
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
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
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
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
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
keystoneauth1 is now a hard dependency of os-client-config so there is
no way that this should not be importable.
Change-Id: I20901623e8b29f50d7ab1ed956472a4b1eda51bf
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
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
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
swiftclient does not have the built-in None detection that keystoneauth
has, so we have to do it ourselves.
Change-Id: I3fcf60dd2f3350045b824899ac48b02809452a4b
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
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
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
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
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
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
shade is adding magnum support, so we should probably grow a default
value for the container_api_version.
Change-Id: I2551f2921f10ba109ccb52301cc8ad23c5f81c46
keystoneclient bug #1513839 means that even when you proerly pass
a Session (like we do) to the discovery constructor (what you'd be
calling if you were passing "pass_version_arg = True") ksc fails
because you didn't send a URL.
We _HAVE_ an appropriate URL that we can pull from the Session. So
until ksc learns how to pull the URL from the Session itself, do it
for them.
Change-Id: I38eb4cfa750fab5196b86989c2cd498d41bf37ac
While we're at it, let's also put in some tests to ensure that we're
processing data types properly.
Change-Id: I0442d234e8422a58738612b2da114f61cc9afc5c
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
Excitingly, one of the places where we hard-code a workaround for
a differently behaving client is not needed. The Client in neutron
that takes a version arg is in neutronclient.neutron.client. Also,
pass the version arg as positional when we pass it, as some of the
clients (neutron) require it, and all accept it.
Change-Id: Ifcbaab782173b95a678af0b2792a1194b198b687