352 Commits

Author SHA1 Message Date
Terry Howe
8baa156ea6 High level interface
High level interface using the connection classes to access the
various services.  Only identity projects and list_flavors in
compute are implemented:

    projects = conn.identity.list_projects()

The service filter has a valid_versions added to it to map the
module name to the version component of the endpoint URL.  For
example, the v2.0 endpoint path is supported by the v2 SDK
network module:

https://region-a.geo-1.network.hpcloudsvc.com/v2.0/

is supported by the SDK module openstack.network.v2.

Implements: blueprint highlevel-interface

Change-Id: Ie52986a9da84c8f3395757c08de7a01be30e0f2a
2014-10-27 02:26:07 +00:00
Jenkins
76313512a4 Merge "identity v3 docs" 2014-10-26 16:26:23 +00:00
Jenkins
9f268fdff9 Merge "resource autodocs" 2014-10-26 15:57:08 +00:00
Terry Howe
2836187461 identity v3 docs
Change-Id: I8d67a03fb8f3818d15d186d85899887c6f525873
2014-10-23 17:18:23 -06:00
Terry Howe
f412047012 class linke for v2
Change-Id: I53a117e2c5ab67eefcad6707ffda1e0d4218bd46
2014-10-23 17:15:21 -06:00
Jenkins
0d0a8d445e Merge "update :class references" 2014-10-23 21:16:18 +00:00
Jenkins
861bca2c89 Merge "identity v2 docs" 2014-10-23 19:49:57 +00:00
Terry Howe
d9823c5a9c resource autodocs
Change-Id: I2893e5d0837a7f9312de93702559e0d42908427e
2014-10-23 13:42:38 -06:00
Terry Howe
bebb708dc3 update :class references
Change-Id: I241db27f9236d81f3b6c59066a97ce5742c8c0ea
2014-10-23 13:38:58 -06:00
Terry Howe
59d42475fa identity v2 docs
Change-Id: I8ef5d30c013c8bf1f427efcc71a2662241f672b1
2014-10-23 11:41:34 -06:00
Jenkins
ea06fb34ee Merge "auth plugin identity base docs" 2014-10-23 17:16:52 +00:00
Jenkins
12ecd8878a Merge "Move the examples docs into the code" 2014-10-23 16:31:23 +00:00
Terry Howe
36ba2a75fd auth plugin identity base docs
Change-Id: I55f1eef2514825bd14d4b9c97e620adeefe4e0c9
2014-10-23 08:28:21 -06:00
Terry Howe
4a76e5e02f base auth plugin docs
Change-Id: I9966cf4bb8c9e23517adeee4c061d23a8e71630a
2014-10-23 05:50:55 -06:00
Terry Howe
a696b41008 Move the examples docs into the code
I like the idea of having the examples in the code.  I don't necessarily
like having to scroll through all those comments to get to the code.  This
also changes the order of the documentation to summary, example, reference
versus summary, reference, example.  I think I'm okay with that because
:class links will anchor to the reference section.  Normally, seeing a
simple example first can be more useful.

This is a response to Doug's comment:
https://review.openstack.org/#/c/129937/1/doc/source/user_preference.rst

Change-Id: Ibbda909d2183edc6baeeec0bc56f01779334aabd
2014-10-22 15:33:14 +00:00
Terry Howe
ab9442a204 remove pointless test
Change-Id: I329ff78375f5e0d56f3e77ac2a645aecb1be9ed3
2014-10-22 06:16:06 -06:00
Jenkins
d1734b5b80 Merge "Reverse order of tests to avoid incompatibility" 2014-10-21 21:31:54 +00:00
Jenkins
f3affdfea8 Merge "Allow headers to be retreived with GET bodies" 2014-10-21 19:53:24 +00:00
Jenkins
c69ffb8b7c Merge "Handle booleans that are strings in APIs" 2014-10-21 19:36:13 +00:00
Jenkins
50d24ef86b Merge "User preference docs" 2014-10-21 19:18:57 +00:00
Jenkins
a4f41ff951 Merge "service filter docs" 2014-10-21 18:58:39 +00:00
Terry Howe
5fa45975ef service filter docs
Change-Id: I9fff211a5412270249fe5befa9097e5ba62ed941
2014-10-21 11:53:08 -06:00
Terry Howe
a7dabe9b80 fix identity service comment
Change-Id: I8ce56a99dfbbc744a8a34e530af6bb234aaceeff
2014-10-21 11:45:19 -06:00
Terry Howe
632ad8e325 User preference docs
Change-Id: I6534ad3f5921fdf3968006c742dc42a22a3cd5bd
2014-10-21 09:20:54 -06:00
Jenkins
4426c79f0a Merge "Add connection documentation" 2014-10-21 15:01:59 +00:00
Jenkins
70f1d218ff Merge "Convert the session object to autodoc" 2014-10-21 15:01:53 +00:00
Terry Howe
d568824cc8 Add connection documentation
Change-Id: I479d4980f8001266eb85174852d7f5f96d19d880
2014-10-21 07:42:07 -06:00
Terry Howe
59a98ce081 Convert transport docs to autodoc
Change-Id: I4b5081b4af0dd167679eace5faf0eb577a6e191f
2014-10-21 07:40:20 -06:00
Terry Howe
f559ecec2c Convert the session object to autodoc
Change-Id: I0be3800151f9dbd7bc070cd3885ae0ffc9da1b0c
2014-10-21 07:33:46 -06:00
Terry Howe
cc6380b7c0 Change configuration for sphinx autodoc
Change-Id: I604f6a8acaa8ba8a6521b16570a91bd178db3c37
2014-10-21 05:20:01 -06:00
Terry Howe
7beca88793 Reverse order of tests to avoid incompatibility
If py26 tests are run first, there is some incompatibility in the
.testrepository that breaks several tests.  To get around this, you
need to run the py33 tests first.  This change was made over in the
cliff project.

Before:

    (.venv)terry@brat:~/hp/sdk$ rm -rf .testrepository/
    (.venv)terry@brat:~/hp/sdk$ tox
      ...
      py26: commands succeeded
      py27: commands succeeded
    ERROR:   py33: commands failed
    ERROR:   py34: commands failed
    ERROR:   pypy: commands failed
      pep8: commands succeeded

After:

    (.venv)terry@brat:~/hp/sdk$ rm -rf .testrepository/
    (.venv)terry@brat:~/hp/sdk$ tox
      ...
      py33: commands succeeded
      py34: commands succeeded
      py26: commands succeeded
      py27: commands succeeded
      pypy: commands succeeded
      pep8: commands succeeded
      congratulations :)
    (.venv)terry@brat:~/hp/sdk$ 

Change-Id: I64925097ce003659c4daa0e105bd06dc30726921
2014-10-17 14:45:52 +00:00
Jenkins
58d77008e6 Merge "Add support for Samples coming from Ceilometer" 2014-10-16 16:56:22 +00:00
Jenkins
56b1983f13 Merge "Fix the v2 auth plugin to handle empty token" 2014-10-16 16:56:06 +00:00
Jenkins
933a80be32 Merge "Add ability to extract a list of versions" 2014-10-16 02:46:42 +00:00
Jenkins
8a0d2767a1 Merge "Remove extraneous vim editor configuration comments" 2014-10-16 00:34:31 +00:00
Jenkins
46407d7d75 Merge "Allow user to select different visibilities" 2014-10-15 23:11:35 +00:00
Jenkins
67214c50a0 Merge "Add user preference and example CLI to build it" 2014-10-15 23:10:45 +00:00
Terry Howe
d260d5c34e Add ability to extract a list of versions
Add ability to extract a list of know versions from the service
catalog.  Currently at least, the service catalog contains versions.
The get_versions method returns either a list of versions or an
[] empty list if the service catalog doesn't contain a detectable
version.  If the service catalog does not contain a service, None
is returned.

Change-Id: I207553ca4bdd0083aff1802182039dde6ab72148
2014-10-15 02:11:57 +00:00
Terry Howe
cd551c5b62 Allow user to select different visibilities
A service may have one default visibility, but the user should
be allowed to override that.  For example listing tenants is
an administrative function by default, but is also available
over the public interface.  This will work:

    python examples/list.py openstack/identity/v2/tenant.py --os-api-visibility public

Change-Id: I4e40e55f9f7c369a9c3e900712a89fdbc743ffcb
2014-10-15 02:11:33 +00:00
Terry Howe
5d2b0e8160 Add user preference and example CLI to build it
Add a user preference class to collect user service preferences.

Sorry for all the test changes.  I wanted to make the v2 and v3
tests have the same service catalog in a different format so that
the normalize catalog would be the same for both.

Closes-Bug: #1353030

Change-Id: Ice4e606255533425be7559916f083b4171566502
2014-10-14 17:41:39 -06:00
Jenkins
595adb35b9 Merge "Introduce the connection class" 2014-10-14 22:34:08 +00:00
Terry Howe
86a3119d10 Fix the v2 auth plugin to handle empty token
The v3 plugin handles an empty token value, but the v2 plugin
would attempt to authenticate with a token of ''.  This change
should fix that.

Change-Id: Ia86377e7450a972bcb50303afeefacd9dc6426a9
2014-10-14 15:16:47 -06:00
Steve Lewis
049a2a09d5 Handle booleans that are strings in APIs
Coerces string values to a boolean only when the prop is given a
type=BoolStr. BoolStr only accepts string words, no shortened values,
synonyms or integer values. When no acceptable value is found a
TypeError or ValueError is raised. Setters and Constructor calls
validate the attribute value as a fail-fast behavior.

Change-Id: I382426325522227a83ec5234c5116da97e71cfa2
Closes-Bug: #1365724
2014-10-13 10:35:32 -07:00
Terry Howe
46f329afdb Introduce the connection class
The connection class can be made with a transport and/or authenticator
that was already constructed or it can be made with nothing.  The
create method will create a transport, authenticator and session if
they are needed.  The normal use case would look something like:

    conn = connection.Connection(**auth_args)

Change-Id: I27573bce799d9992748967b5ea1b575139a75853
2014-10-12 05:48:30 -06:00
OpenStack Proposal Bot
e6e5d836ec Updated from global requirements
Change-Id: I08409412b1501acb82aecf1af72daebe8b20fd64
2014-10-11 15:57:59 +00:00
Terry Howe
b43ba62e71 Apply id_attribute to Ceilometer Meters
Gives Ceilometer Meters an id_attribute rather than overriding id.

Change-Id: I01131859c9b85d6a603c1b03763893df45153415
Partial-Bug: #1368397
2014-10-10 08:19:14 -06:00
Jenkins
08d3f8907e Merge "Update README requirements" 2014-10-09 18:16:08 +00:00
Christian Berendt
6a2c3e30c3 Remove extraneous vim editor configuration comments
Change-Id: Ib9142be48763cdc6cb08db6e064634a1d1fb87f3
Partial-Bug: #1229324
2014-10-08 22:56:13 +02:00
Jenkins
1205878c4a Merge "Use the now graduated oslo.utils" 2014-10-08 15:38:49 +00:00
Jenkins
b7ea6c902e Merge "Add ability to find an available floating ip" 2014-10-08 13:30:56 +00:00