Base API Library
Bases: object
Base API wrapper for keystoneauth1.session.Session
Encapsulate the translation between keystoneauth1.session.Session and requests.Session in a single layer: * Restore some requests.session.Session compatibility;
keystoneauth1.session.Session.request() has the method and url arguments swapped from the rest of the requests-using world.
Create a new resource
Parameters: |
|
---|
Delete a resource
Parameters: |
|
---|
Find a single resource by name or ID
Parameters: |
|
---|
Find a resource via attribute or ID
Most APIs return a list wrapped by a dict with the resource name as key. Some APIs (Identity) return a dict when a query string is present and there is one return value. Take steps to unwrap these bodies and return a single dict without any resource wrappers.
Parameters: |
|
---|
Bulk load and filter locally
Parameters: |
|
---|---|
Returns: | list of resource dicts |
Find a resource by name or ID
Parameters: | path (string) – The API-specific portion of the URL path |
---|---|
Returns: | resource dict |
Return a list of resources
GET ${ENDPOINT}/${PATH}?${PARAMS}
path is often the object’s plural resource type
Parameters: |
|
---|---|
Returns: | JSON-decoded response, could be a list or a dict-wrapped-list |
Authentication Library
Auth plugins options builder
Builds dynamically the list of options expected by each available authentication plugin.
Validate authentication options, and provide helpful error messages
Parameters: | required_scope – indicate whether a scoped token is required |
---|
Validate authorization options, and provide helpful error messages.
Gather plugin options so the help action has them available
Gather plugin list and cache it
API Utilities Library
Filter a list of dicts
Parameters: |
|
---|---|
Returns: | Returns the filtered list |
Rtype list: |
This simple filter (one attribute, one exact-match value) searches a list of dicts to select items. It first searches the item dict for a matching attr then does an exact-match on the value. If property_field is given, it will look inside that field (if it exists and is a dict) for a matching value.