Base API Library
Bases: openstackclient.api.api.KeystoneSession
Base API
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 |
Bases: object
Wrapper for the Keystone Session
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.
Authentication Plugin Library
Bases: keystoneauth1.loading.base.BaseLoader
Auth plugin to handle traditional token/endpoint usage
Keystoneauth contains a Token plugin class that now correctly handles the token/endpoint auth compatible with OSC. However, the AdminToken loader deprecates the ‘url’ argument, which breaks OSC compatibility, so make one that works.
Return the legacy options
A plugin for static authentication with an existing token
Parameters: |
|
---|
Image v1 API Library
Bases: openstackclient.api.api.BaseAPI
Image v1 API
Get available images
Parameters: |
|
---|
If public and private are both True or both False then all images are returned. Both arguments False is equivalent to no filter and all images are returned. Both arguments True is a filter that includes both public and private images which is the same set as all images.
http://docs.openstack.org/api/openstack-image-service/1.1/content/requesting-a-list-of-public-vm-images.html http://docs.openstack.org/api/openstack-image-service/1.1/content/requesting-detailed-metadata-on-public-vm-images.html http://docs.openstack.org/api/openstack-image-service/1.1/content/filtering-images-returned-via-get-images-and-get-imagesdetail.html
Image v2 API Library
Bases: openstackclient.api.image_v1.APIv1
Image v2 API
Get available images
can add limit/marker
Parameters: |
|
---|
If public, private and shared are all True or all False then all images are returned. All arguments False is equivalent to no filter and all images are returned. All arguments True is a filter that includes all public, private and shared images which is the same set as all images.
http://docs.openstack.org/api/openstack-image-service/2.0/content/list-images.html
Object Store v1 API Library
Bases: openstackclient.api.api.BaseAPI
Object Store v1 API
Set account properties
Parameters: | properties (dict) – properties to add or update for the account |
---|
Show account details
Unset account properties
Parameters: | properties (dict) – properties to remove from the account |
---|
Create a container
Parameters: | container (string) – name of container to create |
---|---|
Returns: | dict of returned headers |
Delete a container
Parameters: | container (string) – name of container to delete |
---|
Get containers in an account
Parameters: |
|
---|---|
Returns: | list of container names |
Save all the content from a container
Parameters: | container (string) – name of container to save |
---|
Set container properties
Parameters: |
|
---|
Get container details
Parameters: | container (string) – name of container to show |
---|---|
Returns: | dict of returned headers |
Unset container properties
Parameters: |
|
---|
Create an object inside a container
Parameters: |
|
---|---|
Returns: | dict of returned headers |
Delete an object from a container
Parameters: |
|
---|
List objects in a container
Parameters: |
|
---|---|
Returns: | a tuple of (response headers, a list of objects) The response headers will be a dict and all header names will be lowercase. |
Save an object stored in a container
Parameters: |
|
---|
Set object properties
Parameters: |
|
---|
Get object details
Parameters: |
|
---|---|
Returns: | dict of object properties |
Unset object properties
Parameters: |
|
---|
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.