55 Commits

Author SHA1 Message Date
Alex Gaynor
1d4c9ecb30 Removed now unnecesary workaround for PyPy
Change-Id: I793108170a4fa847d351cf605bf2d01b0dd46822
2014-05-31 21:41:21 -07:00
Jenkins
56635b082a Merge "Wrap lines at the appropriate length and use native sphinx constructs" 2014-05-28 19:18:50 +00:00
Alex Gaynor
857e8ab1e5 Wrap lines at the appropriate length and use native sphinx constructs
Change-Id: I116b7007d017469e22bf22fb2a98dfa0b765188d
2014-05-27 14:50:18 -05:00
Alex Gaynor
7c62969a31 Reorganize the index a bit to make the important content be at the top
Change-Id: If3392f8d837baf0038c5eefe079d77515cfc7cb5
2014-05-27 19:16:29 +00:00
Alex Gaynor
dbffefcf7c Fix an innacuracy in an example in the docs
requests switched from json as a property to json as a method a long time ago

Change-Id: I04a782615d5c80b5cf5127d8b1b31fde9ad95250
2014-05-27 12:39:51 -05:00
Alex Gaynor
99d5df0e3a Fixed an emberassing typo
Change-Id: Ib86cdcffbb9b98742aa580ba0bf0abdd1ee510ae
2014-05-27 11:10:52 -05:00
Jenkins
c72010f6b8 Merge "Converted the glossary to use native Sphinx markup" 2014-05-27 16:09:49 +00:00
Alex Gaynor
2ee3b7912b Added a makefile for sphinx
Change-Id: I56b72d90743522ab2d1a13a79b88197ea2aa02ad
2014-05-27 09:10:56 -05:00
Alex Gaynor
c12854211b Converted the glossary to use native Sphinx markup
Change-Id: I609b5b439fa43aa1df80b63c7003cb8ca5d9b3f0
2014-05-27 08:51:22 -05:00
Jenkins
fd6ceada9d Merge "Add Transport doc" 2014-05-27 13:45:28 +00:00
Alex Gaynor
e0e8ad2fd9 Mark openstacksdk as being a universal wheel
Change-Id: Ib3a686d4d5d594ac23b4018036af4b05ae948829
2014-05-21 16:28:25 -07:00
Dean Troyer
fc2bf9ee67 Add initial glossary
These are the (hopefully) least-controversial glossary terms from the
initial Etherpad (https://etherpad.openstack.org/p/sdk-glossary).

Additional terms will be added as they are solidified.

Change-Id: I656aef799d786b8e7cb81c452f0180580e142f4d
2014-05-19 18:46:52 -06:00
Dean Troyer
fcc7d7e1e6 Add Transport doc
Basic overview of the Transport class with some sample code.

Change-Id: I214f494da1f2674041ef0dd753cae4f3706966d9
2014-05-19 18:31:09 -06:00
Jamie Lennox
8f5a677921 Resource Properties
Provide a helper method for defining known properties that are a part of
a Resource. This will provide a developer friendly way to access
resource properties without needing to know the format of message.

It provides a basic example of validation via the type= parameter. It is
meant as a reference and may be removed later in favour of a proper
validation framework.

Access to the underlying message is still available by the item
accessors, ie setting obj['prop'] will set 'prop' within the resource
and ignore any validation or attribute safety net.

Change-Id: Iccfa4fad3e2f444aac0392a776f5948cefb13791
2014-05-07 05:19:26 +10:00
Jenkins
54f91a596d Merge "Finish transport renaming in the tests" 2014-05-01 20:19:15 +00:00
Terry Howe
5c13d0dcad Update the requirements
Change-Id: I4ff009cfed20efddb8482172dba940957d3e4ce6
2014-04-30 12:00:09 -06:00
Terry Howe
76a2784355 Finish transport renaming in the tests
Change-Id: Ied47c578406d190c0964d841121c298792813173
2014-04-30 10:27:43 -06:00
Jenkins
96b6bd0c4f Merge "Add some sample scripts" 2014-04-30 16:06:54 +00:00
Dean Troyer
7b33afc2e9 Add some sample scripts
This is a very basic starting point for working code example usage of
the SDK.

The common module includes an argument parser that recognizes the common
authentication arguments so setting up auth against a running OpenStack
cloud is the same as the library CLIs.

The inital example for Transport is a couple of simple GETs that also
shows the connection pooling.

Change-Id: I07de2888471a39cbc43daedded36ad683d02a472
2014-04-30 09:43:08 -06:00
Jenkins
d103cf852c Merge "Add base resource class" 2014-04-29 17:56:16 +00:00
Jenkins
470b8aeb8f Merge "Session layer with base authenticator" 2014-04-29 17:34:11 +00:00
Jamie Lennox
c8105da07a Add base resource class
This has been describes as closer to the ORM approach whereby the
resource contains all the information on how to communicate with a
server.

It is intended to be a relatively low level interface on which other
things may be built. So I expect some helper wrappers will be built at a
later time.

The manager in this commit is no longer a requirement, but it shows how
you can keep the current client pattern of managers and remove the
manual handling of session objects.

Change-Id: I46678215063c31928c0b372c039ed020bed837c9
2014-04-25 17:43:50 +10:00
Terry Howe
40b23d8299 Session layer with base authenticator
The session layer provides an authenticated HTTP layer for the SDK.  The
session is created with a transport and an authenticator.  All requests are
passed a service identifier as well as the normal HTTP parameters.

The authenticator is used to get the token and get the endpoint for the
service.  The service identifier is used to get the endpoint associated with
a service.

The service identifier has a service type, visibiltiy and region.

This code is based on the keystoneclient, but it has been simplified and
some renaming has been done.

Change-Id: I7184c733a5593dffb07ce4fc77e126a043274fea
2014-04-23 20:33:57 -06:00
Terry Howe
6acf124278 Add .venv to .gitignore
Change-Id: I046ec38145fdc540f2a0cfa63ad640017f92f97c
2014-04-21 09:31:52 -06:00
Jenkins
f47198fca6 Merge "Rename session to transport" 2014-04-17 20:52:03 +00:00
Dean Troyer
6923b2cff9 Docs cleanup
Massage the default cookiecutter-provided structire to remove Sphinx
errors and make it our own.

Change-Id: I2996b793f6ef5881749a9fc3b7ce7d202a6a1349
2014-04-17 12:44:19 -05:00
Dean Troyer
49922f340c Rename session to transport
Rename the requests.Session subclass because of the use of 'session'
in other places that doesn't match this usage.

Change-Id: I407045da12e86d9b1007429566bf30cf3c866720
2014-04-16 00:25:48 -05:00
Jenkins
a60d43b70b Merge "Add redirection handling to openstack.session.Session" 2014-04-03 18:58:58 +00:00
Jenkins
17e7e0a173 Merge "Add requests.Session wrapper class" 2014-04-03 15:38:13 +00:00
Dean Troyer
b065d05c0e Add redirection handling to openstack.session.Session
The requests lib follows some browser patterns where it will redirect POSTs
as GETs for certain statuses which is not want we want for an API.
See: https://en.wikipedia.org/wiki/Post/Redirect/Get

Partially implements blueprint: rest-client
Change-Id: If8593df64bd5ff9bf3b41f990b3c0b2dcfdbbda4
2014-04-01 18:01:46 -05:00
Dean Troyer
aa8d82e5d0 Add requests.Session wrapper class
Wrapper class for requests.Session adds some common OpenStack functionality
* log all requests and responses at debug level
* json-encode request body passed in to request() in json keyword arg
* set default user_agent at Session creation
* set default verify at Session creation

This sets the base for some additional functionality to follow:
* handle redirects properly for a REST API client
* handle a default auth token to set the X-Auth-Token header for simple use cases

Partially implements blueprint: rest-client
Change-Id: Ice3f2dae4a99fe59c7cc384a857900e3ae45a7d2
2014-04-01 18:01:40 -05:00
Dean Troyer
8b43d8ae8e Fix temporary pypy gate issue with setuptools
Change-Id: I56e187a15768c507c5fd9eee7b9fc408a5715a95
2014-03-21 08:44:40 -05:00
Jenkins
c1c6f87a71 Merge "Several stylistic fixes for the docs" 2014-03-15 04:17:10 +00:00
Alex Gaynor
f35a8e1861 Several stylistic fixes for the docs
Change-Id: I61a1c37be2fd343a0c5021233fcbbd5454215439
2014-03-14 15:48:45 -07:00
Doug Hellmann
b823ad53ed Switch to oslosphinx
Use the version of the doc theme without the namespace
package.

Partial-bug: #1277168
Change-Id: I7788a9d6b5984fdfcc4678f2182104d2eb8a2be0
2014-03-12 10:16:05 -07:00
Jenkins
f5d8f9deea Merge "add newlines to end of requirements files" 2014-03-05 18:04:35 +00:00
Dolph Mathews
14a1f85938 add newlines to end of requirements files
update versions to match current global requirements

Change-Id: I73f26d2b9e0273d3bcac0dcef02626fcbde2126a
2014-03-04 16:24:08 -06:00
Dolph Mathews
dfc5ddb2e9 remove api_strawman
re-propose these docs as WIP towards final documentation so they can be
discussed, reviewed and iterated on in gerrit

Change-Id: Iffcc53677b32b5e330d701eff2389add2eccbf7d
2014-02-21 04:48:49 -06:00
Brian Curtin
77f2e5ac07 reigster->register typo
Trivial change at this point, I know, but
Iee9340b5639d175e5bad699fb894fc043e929581 went in before I had a chance
to catch this.

Change-Id: I3834aa4e5a24a0f536ddee61a713d24c1e37dfbf
2014-02-18 13:07:30 -06:00
Alex Gaynor
956418f5d8 Added support in the strawman for re-authentication
Also a handful of flake8 cleanups

Change-Id: Iee9340b5639d175e5bad699fb894fc043e929581
2014-02-17 14:53:36 -08:00
Alex Gaynor
65568d9726 Initial new version with demonstration of clean implementation
Change-Id: I98e7f1a36955b97ba202f72ab7bec63c0a4364e1
2014-02-14 15:29:18 -08:00
EdLeafe
3005d8323f Added sample directory layout for pystack.
Change-Id: If1e6d473b2a1d2531dc1203cf728bc10c6e6ee7e
2014-02-12 10:11:52 -06:00
Jenkins
8ea34e0eb0 Merge "Fix misspellings in python openstacksdk" 2014-02-10 19:22:58 +00:00
Jenkins
cf7fb54605 Merge "Remove locale overrides in tox" 2014-02-10 17:31:02 +00:00
Alex Gaynor
83ec5d3047 Remove locale overrides in tox
This is being done in all OpenStack projects.

Change-Id: I0000a9b8e35089dfb7683f21c718586a023a778d
2014-02-09 22:19:40 -08:00
Shane Wang
fc80f37b23 Fix misspellings in python openstacksdk
Fix misspellings detected by:
* pip install misspellings
* git ls-files | grep -v locale | misspellings -f -

Change-Id: Icba80ebaf3f7e9dbe48ed45a9eee30a09270135e
Closes-Bug: #1257295
2014-02-07 13:46:04 +08:00
EdLeafe
9b80da813e Finished the pystack strawman overview.
Change-Id: Ic6b68a66108beb52da8060865516b17d61bdb9c6
2014-01-31 10:33:42 -06:00
EdLeafe
aa360429e0 Initial pystack strawman docs
Change-Id: Ie7e68c64a8c8faa1ab423ea248d19e84f6c7dd94
2014-01-29 10:00:00 -06:00
Alex Gaynor
fe57620045 Made tox -e pep8 passed. Also made git review work
Two elements to this: make the existing code pass, and skip the
api_strawman/ directory.

Change-Id: Ic85067bdd63337e135f054c9a28e46683c46656c
2014-01-28 09:20:44 -08:00
Jesse Noller
e0418241a3 setting up the initial layout; move the api proposals to api_strawman
Change-Id: I7c933d5e023c2a98a64aa90ed209f1e25d07f0d9
2014-01-24 22:58:25 -06:00