For a listing of terms used throughout the SDK, including the names of projects and services supported by it, see the glossary.
The OpenStack SDK is available on
PyPI under the name
openstacksdk. To install it, use pip
:
$ pip install openstacksdk
These guides walk you through how to make use of the libraries we provide to work with each OpenStack service. If you’re looking for a cookbook approach, this is where you’ll want to begin.
Service APIs are exposed through a two-layered approach. The classes
exposed through our Connection Interface are
the place to start if you’re an application developer consuming an OpenStack
cloud. The Resource Interface is the layer upon which the
Connection Interface is built, with methods on Service Proxies accepting
and returning Resource
objects.
The Cloud Abstraction layer has a data model.
A Connection
instance maintains your cloud
config, session and authentication information providing you with a set of
higher-level interfaces to work with OpenStack services.
Once you have a Connection
instance, services
are accessed through instances of BaseProxy
or
subclasses of it that exist as attributes on the
Connection
.
openstack.proxy.
BaseProxy
(session=None, task_manager=None, *args, **kwargs)¶Represents a service.
wait_for_status
(value, status, failures=None, interval=2, wait=120)¶Wait for a resource to be in a particular status.
Parameters: |
|
---|---|
Returns: | Method returns resource on success. |
Raises: |
|
Raises: |
|
Raises: |
|
Deprecated since version 0.9.14: This will be removed in 2.0.0. This is no longer a part of the proxy base, service-specific subclasses should expose this as needed. See resource.wait_for_status for this behavior
wait_for_delete
(value, interval=2, wait=120)¶Wait for the resource to be deleted.
Parameters: |
|
---|---|
Returns: | Method returns resource on success. |
Raises: |
|
Deprecated since version 0.9.14: This will be removed in 2.0.0. This is no longer a part of the proxy base, service-specific subclasses should expose this as needed. See resource.wait_for_delete for this behavior
The following service proxies exist on the
Connection
. The service proxies are all always
present on the Connection
object, but the
combination of your CloudRegion
and the catalog of the cloud in question
control which services can be used.
The Resource layer is a lower-level interface to
communicate with OpenStack services. While the classes exposed by the
Service Proxies build a convenience layer on top of
this, Resource
objects can be
used directly. However, the most common usage of this layer is in receiving
an object from a class in the Connection Interface_, modifying it, and
sending it back to the Service Proxies layer, such as to update a resource
on the server.
The following services have exposed Resource
classes.
The following classes are not commonly used by application developers, but are used to construct applications to talk to OpenStack APIs. Typically these parts are managed through the Connection Interface, but their use can be customized.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.