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
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
README.rst doesn't appear right on PyPI currently. This commit fixes the
issue and expands "docs" environment in tox.ini to use readme tool [0]
to verify that README.rst is good for PyPI.
[0] https://github.com/pypa/readme
Change-Id: I6025bb6c661d8a4a7cd9802a1298928662278f2d
The release announcement scripts expects to find URLs for the bug
tracker, documentation, etc. by looking for patterns in the README.rst
file. This change adds the URLs in a format consistent with other
OpenStack projects and that works with the release announcement
generator.
Change-Id: I88151008cca91da3fed7e4c0ec6dfb641a0062b6
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
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
We just added an unreleased interface method to the CloudConfig object -
but maybe that should have been more aligned with dogpile words.
SO - change the docs to reference the dogpile words and add support for
that, while keeping backwards compat support for people using max_age.
Also, do the -/_ transform on the cache config like elsewhere.
Then, while we're in there, add support for per-service cache timings.
We need this in nodepool and shade is adding support, so ability to
configure it will be important.
Change-Id: I31190a31ab0b79fc080db3611c0cd584076387d4
It turns out region_name is an important parameter - it's not
just another kwarg that will get passed through.
Change-Id: I5cca8d324a1dcd1355991df793fe29eedfa15dc0
IPv6 support is detectable, so rather than having a user opt-in to it,
provide a flag that can be provided to tell it that detected IPv6
support is lying. This should have to be set for far fewer people and
should result in transparent opt-in to IPv6 where available.
Change-Id: Ib0c4c4e8b3b7b4bcee5fa3414719969274929b9a
Navigating to https://pypi.python.org/pypi/os-client-config results
in seeing the raw RST content of the readme file. This is likely
caused by minor RST warnings, but pypi gives up and shows it raw.
Change-Id: Ia2d6202ade5282d9aeae9bb948175aae2aa264cd
The fine folks at ansible want to be able to specify a specific location
for the config file with an env var which seems like a perfectly
reasonable thing to allow. Inject the specified file at the beginning of
the list so that it'll be the first one found.
Change-Id: Ib1947be1c0ae812e9cb83c7b99168c05dfc6fa6a
Co-authored-by: Chris Church <chris@ninemoreminutes.com>
yaml supports encoding lists in a manner that is cleaner than comma
separated lists. While the old commas-in-region_name will still work,
add a 'regions' option that can be used to configure lists of regions.
Remove the comma-separated-list from the docs so that people don't try
to use it - even though it will work.
Change-Id: Ieb0aedb9c03fd26e644e9ba733b935f2c69daaf0
People, such as Infra, would like to use IPv6 when it's there, but don't
want to need to write the "if ipv6, awesome, else, ipv4" code all the
time.
Change-Id: I870955863f1e8851c684dc604584c1ef3e20dd6b
Although it is possible to include specific config files for
unknown vendors, this wasn't specified in the documentation.
Change-Id: Ib27277d480e373a8a083e820161e0bdb985de284
The cloud parameter was confusing people, especially since it was
inside of a dict that was named "clouds". profile was suggested as less
confusing, which seems fine.
Continue processing cloud as a parameter so that we don't break
anyway, but change the docs to only mention profile.
Change-Id: Idf3d089703985ecc60f23a3c780ddcab914aa678
Cache, data and config files live rooted in different places across
different OS's. Use appdirs to find where.
Depends-On: Ic939dea11b7476ec504d2bf65854a0781b1bfb39
Change-Id: I7338ae1d0442e0c5cc1ec4ae4d619fac319a4a28
We only want do define the 'openstack' cloud if there are neither
environment varaibles nor config files. We need to define it as a place
to put passed-in-parameters in the case of neither, but we don't want it
any other time.
The behavior can now be described as:
- If you have a config file, you will get the clouds listed in it
- If you have environment variable, you will get a cloud named 'envvars'
- If you have neither, you will get a cloud named 'defaults'
Change-Id: I6752c1ccecf1ef979b2603246eeaab7da360c8a4
For environment variables created cloud objects, it's possible someone
may not want it to be called envvars. I mean, let's be honest, I cannot
imagine why this would be important ... but people get emotional about
things. Let them name their cloud "bunnyrabbit" because that makes
people happy.
Change-Id: I0c232de7d93080ea632fb66a82b9e6d3e925c901
The semantics around mixing environment variables and config file values
are confusing at best and no reasonable usecase has been expressed as to
why doing so is desirable.
Move the logic around environment variable processing to always provide
an "envvars" cloud if any envvars are set. The cloud will only exist in
the presence of OS_ env vars.
get_one_cloud() will default to returning the envvars cloud if it
exists.
Change-Id: I6c3a54997c3278feedfdf93cc4d1e74b6235700a
Closes-Bug: #1439927
Memory cache can grow unbounded, so it should really be opt in. Change
to match shade with the following defaults:
- If you specify nothing, you get null cache
- If you specify an expiration time and nothing else, you get memory
cache
- If you specify an explicit cache class, you will get that class
Change-Id: I6c9eab71a88a534de7e52ad2a564450c44aacc1d
Basically, if keystoneclient is available, validate arguments into
the auth dict. If it's not - we should probably be talking about what
possible use this library has - but it should degrade cleanly and treat
everything as passthrough.
Change-Id: Ia31039d5c724eba22d053a004eefeaf6857f500d
* README.rst: Remove docs and bugs links since the project is not
currently publishing/consuming these anywhere that I can find. Also
correct the source URL.
Change-Id: I2b7002f7ea301a2c03a2e41e904de0c91a14831a
Things need to do local caching, which means they need to control
some settings about that. Add simple cache settings support.
Change-Id: I7b56cc25ebe7a803816d95b79d0329f8e42025ba