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
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
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
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
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
Rename the requests.Session subclass because of the use of 'session'
in other places that doesn't match this usage.
Change-Id: I407045da12e86d9b1007429566bf30cf3c866720
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
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
re-propose these docs as WIP towards final documentation so they can be
discussed, reviewed and iterated on in gerrit
Change-Id: Iffcc53677b32b5e330d701eff2389add2eccbf7d
Trivial change at this point, I know, but
Iee9340b5639d175e5bad699fb894fc043e929581 went in before I had a chance
to catch this.
Change-Id: I3834aa4e5a24a0f536ddee61a713d24c1e37dfbf