Commit Graph

58 Commits

Author SHA1 Message Date
Monty Taylor cc7a469fdb Update for opendev
Change-Id: Ib29ca90f7268e4a31dab6e80d92ef4e0fa99f64e
2019-04-21 13:09:50 +00:00
zhulingjie 93a8db5fdd fix bug link in readme
Change-Id: I695104e0c4749898b86126c9876ddf01cb9a2be9
2018-08-31 06:03:51 -04:00
qingszhao dd8071d112 Add release note link in README
Change-Id: I99081cdfde928bc4089e1bdc40eae1bd50082bc2
2018-06-27 23:06:35 +08:00
XiaojueGuan e2538769ee Update links in README
Change the outdated links to the latest links in README

Change-Id: Ia3480724d5db282ab71e1b9940b9ef2d871e2f44
2018-06-12 16:35:52 +08:00
Monty Taylor 5c2eae8f82
Replace guts with openstack.config
The code has been moved into openstacksdk. Make os-client-config a
thin wrapper around that code.

The legacy client code needs to stay, as it was removed in openstacksdk.

We also have to plumb os_client_config.defaults and
os_client_config.cloud_region.CloudRegion in so that users get the
os-client-config versions from the openstacksdk methods that return the
relevant objects.

Support for per-service region_name has been dropped. This was never
used anywhere and was added for compatibility with openstacksdk Profile
objects. Since Profile objects are no more, we can remove it. It never
made any sense.

Change-Id: I7180e20aa675c0ccbe3718493a6eff2be7e1b8b6
2018-04-27 08:42:17 -05:00
Doug Hellmann 95f44f171c rearrange existing documentation to follow the new standard layout
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Change-Id: Ib68812eda4ab0ce09c6d438f9f236111d61ef38b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-22 15:16:06 -04:00
Doug Hellmann 02116c41ef fix location of team tags in README
Remove the extraneous title markup and move the team tag include
instructions below the main project title in the readme so it renders
more nicely.

Change-Id: Icd384c81a455a3e1a86abd1f2ef84e775e06c307
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-01-31 16:03:05 -05:00
Flavio Percoco 3008683d61 Show team and repo badges on README
This patch adds the team's and repository's badges to the README file.
The motivation behind this is to communicate the project status and
features at first glance.

For more information about this effort, please read this email thread:

http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html

To see an example of how this would look like check:

https://gist.github.com/0bed66f234ed59d0c6e2aa220e709950

Change-Id: I80c57e310b601d47be5b5f81c604d7d6310a60eb
2016-11-26 12:06:37 +01:00
Cedric Brandily 422ad9ccdb
Clarify how to set SSL settings
This change adds an example in order to clarif how to SSL settings in
configuration files.

Change-Id: Id047f21d0a51752f46b16e3f4efbfec62cfbd5fb
2016-10-20 16:17:21 -05:00
Monty Taylor 4f36eca18f
Reword the entries in the README a bit
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
2016-06-02 10:07:30 +03:00
Monty Taylor 7d63f12edd
Add shade constructor helper method
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
2016-06-02 10:07:27 +03:00
Monty Taylor 6a834063a2
Rename session_client to make_rest_client
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
2016-06-01 10:39:42 +03:00
Monty Taylor 41ac1562b5
Add helper method for OpenStack SDK constructor
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
2016-06-01 10:26:24 +03:00
Ilya Shakhat 700ab6f282 Fix formatting in readme file
Change-Id: Ifa37d38b3c7689f703c7129459b15a367e2aafff
2016-04-22 18:01:17 +03:00
Monty Taylor 7c439073f3 Flesh out netowrk config list
Add support for indicating default_interface. Also, add some validation
and normalization code, some interface methods and, shockingly,
documentation.

Change-Id: Ib45b68894585ac02821d5d2376510fd7a8e8ee40
2016-04-02 09:09:54 -05:00
Monty Taylor 278a761df6 Change network info indication to a generic list
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
2016-03-30 16:15:49 -07:00
Monty Taylor 03d5659d8b Update the README a bit
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
2016-02-22 09:29:22 -08:00
Monty Taylor 7a4993da41 Allow session_client to take the same args as make_client
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
2016-02-22 09:29:18 -08:00
Yuriy Taraday 9688f8ebd1 Fix README.rst, add a check for it to fit PyPI rules
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
2015-12-31 15:40:58 +03:00
Doug Hellmann f3678f03de add URLs for release announcement tools
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
2015-12-30 19:06:38 +00:00
Tim Burke 7be6db82d3 Fix some README typos
Change-Id: I3ebec661d1b02da0c940cde63ab862871dca11c5
2015-12-28 16:43:38 -08:00
Monty Taylor d0c70cc962 Add support for generalized per-region settings
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
2015-12-07 15:35:04 -05:00
Jenkins eab0f48340 Merge "Fix a README typo - hepler is not actually a thing" 2015-12-07 20:17:54 +00:00
Jenkins 4de73f0550 Merge "Make client constructor optional" 2015-12-07 20:09:35 +00:00
Monty Taylor 1221ea7fca Fix a README typo - hepler is not actually a thing
Change-Id: Ie8c267e75171b88bd3a1a3a684e85869e75843d7
2015-12-07 17:38:23 +00:00
Monty Taylor 8eced67abe Make client constructor optional
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
2015-12-07 17:38:15 +00:00
Monty Taylor b90f53bbf4 Updated README to clarify legacy client usage
Also, update it to use code-block - which makes things look much nicer.

Change-Id: I930ab63a5d159cf4cea27b4e2c4d6fd933de04fc
2015-12-06 21:49:29 -05:00
Monty Taylor 5beaeef2c3 Add simple helper function for client construction
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
2015-12-07 02:42:47 +00:00
Monty Taylor ed2f34b06a Add method for registering argparse options
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
2015-12-06 21:39:49 -05:00
Monty Taylor b17bbcdef9 Add support for secure.yaml file for auth info
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
2015-11-22 14:56:09 -05:00
Monty Taylor 790fac9854 Clean up cache interface, add support for services
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
2015-10-17 11:47:20 -04:00
Monty Taylor f6681a8319 Fix documentation around regions
It turns out region_name is an important parameter - it's not
just another kwarg that will get passed through.

Change-Id: I5cca8d324a1dcd1355991df793fe29eedfa15dc0
2015-10-14 12:32:20 -04:00
Monty Taylor d3c82ab428 Fix two typos
Change-Id: Idf3df94ea039f07fa958a3afadf3388221ffa2ff
2015-10-01 14:52:18 -04:00
Monty Taylor 7d84f10231 Support passing force_ipv4 to the constructor
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
2015-10-01 13:51:43 -04:00
Steve Martinelli 988e305b37 update RST for readme so pypi looks pretty
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
2015-09-22 17:21:02 -04:00
Jenkins 27dff22c6b Merge "Specify the config file with environment variable" 2015-07-11 12:30:01 +00:00
Jenkins 33144d7c29 Merge "Add support for configuring region lists with yaml" 2015-07-11 12:19:51 +00:00
Monty Taylor 6523cf62fa Specify the config file with environment variable
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>
2015-07-09 09:11:36 -04:00
Monty Taylor 1065ea4dbf Add support for configuring region lists with yaml
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
2015-07-09 09:11:31 -04:00
Spencer Krum 9d3cc7969b Fix rendering issue in Readme
Change-Id: If089b0331c6b40e983d81623ee3a6a541f93a45a
2015-07-08 10:26:07 -07:00
Monty Taylor 65dd84515b Add support for indicating preference for IPv6
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
2015-06-26 17:10:41 -04:00
Ghe Rivero d710accb3f Some cleanup in the README.rst
Change-Id: I9f7c6c727708a9095566bce8d4ff03837be95d07
2015-06-06 13:32:20 +02:00
Ghe Rivero 7e605f963f Add SSL documentation to README.rst
Explain usage and warn avoid behavior with conflicting
cacert and verify options.

Change-Id: I25b43ba47bd0feb941b649265c6e67723a93e277
2015-06-05 14:35:52 -04:00
Ghe Rivero 038ddd3818 Add cloud vendor files config in doc
Although it is possible to include specific config files for
unknown vendors, this wasn't specified in the documentation.

Change-Id: Ib27277d480e373a8a083e820161e0bdb985de284
2015-06-04 09:59:02 +02:00
Monty Taylor b51f9f8416 Rename cloud to profile
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
2015-05-27 09:42:51 -04:00
Monty Taylor 4b40133e21 Use appdirs for platform-independent locations
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
2015-05-12 10:09:24 -04:00
Monty Taylor 2f1e6c13be Only add fall through cloud as a fall through
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
2015-05-12 08:36:28 -04:00
Monty Taylor 912af15b52 Remove crufty lines from README
Change-Id: Ibf36a67503aab5f3bcd3ba535da5f9f54ce9c28d
2015-05-02 19:27:22 -04:00
Monty Taylor ffafb52fa7 Allow overriding envvars as the name of the cloud
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
2015-04-11 13:36:56 -04:00
Monty Taylor 7e682d3bf0 Put env vars into their own cloud config
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
2015-04-11 13:36:55 -04:00