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; keystoneclient.session.Session.request() has the method and url arguments swapped from the rest of the requests-using world.
Authentication Library
Auth plugins options builder
Builds dynamically the list of options expected by each available authentication plugin.
Perform basic option checking, provide helpful error messages
Pick an auth plugin based on –os-auth-type or other options
Authentication Plugin Library
Bases: keystoneclient.auth.identity.generic.password.Password
Auth plugin hack to work around broken Keystone configurations
The default Keystone configuration uses http://localhost:xxxx in admin_endpoint and public_endpoint and are returned in the links.href attribute by the version routes. Deployments that do not set these are unusable with newer keystoneclient version discovery.
Handle default Keystone endpoint configuration
Build the actual API endpoint from the scheme, host and port of the original auth URL and the rest from the returned version URL.
Bases: keystoneclient.auth.base.BaseAuthPlugin
Auth plugin to handle traditional token/endpoint usage
Implements the methods required to handle token authentication with a user-specified token and service endpoint; no Identity calls are made for re-scoping, service catalog lookups or the like.
The purpose of this plugin is to get rid of the special-case paths in the code to handle this authentication format. Its primary use is for bootstrapping the Keystone database.
Stub this method for compatibility
Return the supplied endpoint
Return the supplied token
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 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/2.0/content/list-images.html
Network v2 API Library
Bases: openstackclient.api.api.BaseAPI
Network v2 API
List DHCP agents
Parameters: |
|
---|
List external networks
Parameters: |
|
---|
Object Store v1 API Library
Bases: openstackclient.api.api.BaseAPI
Object Store v1 API
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 |
---|
Get container details
Parameters: | container (string) – name of container to show |
---|---|
Returns: | dict of returned headers |
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: |
|
---|
Get object details
Parameters: |
|
---|---|
Returns: | dict of object properties |
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.