We have two contradictory precedence needs that are impossible to
satisfy because we're losing knowledge of the source of data as
we build the ultimate dict of data. If we carry the argparse data
along in a separate bucket for longer, we can check to see if it's
there so that it can win, but so that in situations where kwargs
is complex and contains both a top-level and an auth dict we don't
assume that the values that are not in the auth dict came from
argparse.
By doing this, we can establish that precedence for auth args is:
- argparse
- auth dict
- top level kwargs
Change-Id: I9eca5937077f5873f7896b6745951fb8d8c4747c
The passed-in argparse Namespace is flat and does not have an 'auth'
dict, all of the auth options are in the top level. If the loaded
dict from clouds.yaml as an 'auth' dict, that used to totally override
any passed-in options.
This is backwards.
Make the passed-in auth options always win over clouds.yaml as this is
the only way to change/override those values from the command line.
Change-Id: Ic2752a396d45deeda19a16389437679829e0844d
Wanted to make each section a little better, but also to start to
indicate that legacy clients should really not be your first choice.
Change-Id: I26e08d037c7b28ced22a2a0126693d7e3e779f58
We have helper factory methods for REST Client, legacy client and
OpenStack SDK all with the same interface ... we might as well have one
for shade too. It makes documenting and talking about the simple case of
all of them easy.
Change-Id: I046da85ae4a3e2a6333223921d5ae9ce3673121d
While writing some docs, it became clear that session_client was just a
horrible horrible name and that I'm a bad person. Rename it so that we
can make docs that make humans happy.
Also, move the REST client section of the README up a bit.
Change-Id: I1a27853e3031489da5916308a76f19bc72185d24
openstacksdk already has a helper method for dealing with occ, but if a
user is already using the occ helper methods, there is no reason we
should not provide them an easy path to using the SDK.
Change-Id: I1040efb94385fdac0aa02ac960ba95089b954377
The function _validate_auth_ksc was missing a "cloud" parameter so the
exception formatting failed as it could not find that variable.
Change-Id: Ia1caaa29fcb14d6ce7c16de1f78bbcae6c24adb0
troveclient requires username and password as parameters to the Client
object, but if a Session is passed (like we do) that's not needed. A
patch has been submitted to troveclient, but until that has been
released, simply send None to both parameters.
Change-Id: Ie130a4e83cceb7cab69bfbeb559493d195ef35e1
Everything in this file is automatically generated by pbr.
There appears to be no good reason to keep it around.
Change-Id: I73eb120dedbdb6685862d26493fc178e6dee1353
openstack/common was used to kepp copied files from
oslo-incubator, we don't use oslo-incubator stuff,
so remove it.
Change-Id: Id426c41e6ae277ed1f829820771d5ffc31a81166
Make it clear in the docs that default_interface and nat_destination can
each be set only once per cloud.
Change-Id: Ic862b9f4dc31580c4e192f13f100428bbec7faa2
Add support for indicating default_interface. Also, add some validation
and normalization code, some interface methods and, shockingly,
documentation.
Change-Id: Ib45b68894585ac02821d5d2376510fd7a8e8ee40
Networks can have more information than just internal or external. Notably,
if you have two private networks and you're trying to assign floating
ips, you need to know which network should be the recipient.
This should be backwards compatible with existing external_network and
internal_network options.
Change-Id: I0d469339ba00486683fcd3ce2995002fa0a576d1
Cleaned up example references to now-not-existing HP Public Cloud. Also
added a named-cloud entry to the make_client section.
Change-Id: I398c438e22eb84d6079a5c45f068753c3bcaa216
make_client is a great, simple yet flexible way to get a fully featured
Client object. simple_client is similar for Session objects, but lacks
the argparse and arbitrary kwargs that make_client - plus it has a weird
name. Since adding those two features to make_client did not make it too
confusing - do the same for simple_client. Also, rename it to
session_client (with a backwards-compat alias) and add it to the README
docs.
In the process of doing this, extract the "get me a cloud config"
functinality into an additional helper function - get_config.
Change-Id: Iadd24dfa021f870b3e5858bab8cd91fc96a373c2
Catch up the release notes from the previous release to current state.
This does not catch up from the beginning of oscc's history.
Change-Id: Ic981fdfbb79cd7fc70167091bdfed281c11eff03
For longer-lived operations, tokens can timeout and we need to get new
ones. While in theory we should be keystoneauth aware and passing around
sessions, swiftclient does not yet support this. So, instead of passing
in just a preauthtoken, also pass in credentials if we have them. However, for
plugin types that swift does not know about directly, only preauthtoken will
be used as before.
Change-Id: If724fdcd0649d9fa3b3ee7b127e49a3f77e3b767
HP has already shut down its public cloud. RunAbove is shutting down
17th February as part of the migration to OVH.com. Neither are therefore
valid vendors any longer.
Change-Id: I8d305ca2b1cbaf67e6711eedaa1a4c5668a42be7
VEXXHOST cloud uses SSL for Keystone and all other services,
change the auth URL to the SSL endpoint.
Change-Id: If80c76603de44d005d6af1726f34d924384bf747
We have no codepaths that currently set v2password plugin by default.
However, there are some cases, such as old clouds, where a user needs
to explicitly set v2password as the auth_type to avoid version discovery
because their cloud is old enough to not support it. If the user
sets v2password, keep it and align the auth parameters the other
direction to set tenant_name and tenant_id.
Co-Authored-By: David Shrewsbury <shrewsbury.dave@gmail.com>
Change-Id: Ib9eb3ae163b79b67737d01868868187b6dee1756
os-client-config is clean on E125 and E123 is ignored in recent pep8 by
default. Also, even though they are not 'valid' pep8 rules, they are
actually both nice styles and consistent with how we code
os-client-config anyway.
Change-Id: I7764e1511ed580d37b9a0a8be6743a5fa50441e5
The code to expand domain_{name,id} to {user,project}_domain_{name,id}
is flawed in that it sets a project_domain_{name,id} even if a
project_{name,id} is not set. There is a valid use case for not having
a project_{name,id} - specifically getting a domain-scoped token.
In the case where we do not set a project, check for that and don't make
further assumptions that the domain input needs to be "fixed".
Closes-Bug: #1535676
Change-Id: I825fe4bc375687208bb176bb5990c23fe87c8f9d
We bump hacking>=0.10.2, and hacking removed some rules, for
the full list of rules please see [1]. So don't need them any more.
Hacking related commits:
Remove H904 in commit b1fe19ebebe47a36b905d709467f5e82521bbd96
Remove H803 in commit f01ce4fd822546cbd52a0aedc49184bddbfe1b10
Remove H307 in commit ec4833b206c23b0b6f9c6b101c70ab925a5e9c67
Remove H305 in commit 8f1fcbdb9aa4fc61349e5e879153c722195b1233
[1]https://github.com/openstack-dev/hacking/blob/master/setup.cfg#L30
Change-Id: I24b82c1913d3d42cc5228b1db700b787623fcdc5