Rework config and rest layers
This is a large and invasive change to the underlying guts. Most casual use should not notice a difference, but advanced users, especially those using the Profile or Authenticator interfaces or making use of pluggable providers will be broken. The overall intent is to align directly on top of the mechanisms that came from os-client-config for config and to use keystoneauth1's Adapter interface to make use of the canonical implementations of such things as service and version discovery. The end goal is that openstacksdk provides the REST interaction layer for python-openstackclient, shade, Ansible and nodepool. Replace profile with openstack.config os-client-config is used by shade and python-openstackclient to read and process configuration. openstacksdk also can use the os-client-config interface, but translates it internally into the Profile object. As os-client-config has been injested into openstack.config, remove Profile and just use the config classes. Make proxy subclass of adapter This gives every service a generic passthrough for REST calls, which means we can map unknown service-type values to a generic proxy. Strip endpoint_filter We're passing Adapters around, not sessions. Doing so means that self.service and endpoint_filter have become unnecessary. Rename _Request.uri to _Request.url This is a stepping-stone to replacing _Request with requests.Request and using requests.Session.prepare_request inside of _prepare_request. Rename service proxy instances to match their official service-type. Aliases are kept for the old versions, but make the canonical versions match the official name. Rename bare_metal to baremetal Rename cluster to clustering Rename block_store to block_storage Rename telemetry to meter Create generic proxies for all services in STA Every service listed in service types authority is an OpenStack service. Even if we don't know about it in SDK, we should at the very least have a low-level Adapter for it so that people can use REST calls while waiting on the SDK to add higher-level constructs. The pypy jobs are happily green. Run them as voting rather than non-voting. Add syntatic sugar alias for making connections Typing: import openstack.connection conn = openstack.connection.Connection(cloud='example') is annoying. This allows: import openstack conn = openstack.connect(cloud='example') Use task_manager and Adapter from shade As a stepping-stone towards shade and sdk codepaths being rationalized, we need to get SDK using the Adapter from shade that submits requests into the TaskManager. For normal operation this is a passthrough/no-op sort of thing, but it's essential for high-volume consumers such as nodepool. This exposes a bunch of places in tests where we're mocking a bit too deeply. We should go back through and fix all of those via requests_mock, but that's WAY too much for today. This was a 'for later' task, but it turns out that the move to Adapter was causing exceptions to be thrown that were not the exceptions that were intended to be caught in the SDK layer, which was causing functional tests of things like GET operations to fail. So it became a today task. Change-Id: I7b46e263a76d84573bdfbbece57b1048764ed939
This commit is contained in:
parent
a25f8f3518
commit
4bad718783
@ -220,6 +220,7 @@
|
|||||||
- project:
|
- project:
|
||||||
name: openstack/python-openstacksdk
|
name: openstack/python-openstacksdk
|
||||||
templates:
|
templates:
|
||||||
|
- openstack-pypy-jobs
|
||||||
- openstacksdk-functional-tips
|
- openstacksdk-functional-tips
|
||||||
- openstacksdk-tox-tips
|
- openstacksdk-tox-tips
|
||||||
check:
|
check:
|
||||||
|
@ -5,15 +5,6 @@ The following diagram shows how the project is laid out.
|
|||||||
|
|
||||||
.. literalinclude:: layout.txt
|
.. literalinclude:: layout.txt
|
||||||
|
|
||||||
Session
|
|
||||||
-------
|
|
||||||
|
|
||||||
The :class:`openstack.session.Session` manages an authenticator,
|
|
||||||
transport, and user profile. It exposes methods corresponding to
|
|
||||||
HTTP verbs, and injects your authentication token into a request,
|
|
||||||
determines any service preferences callers may have set, gets the endpoint
|
|
||||||
from the authenticator, and sends the request out through the transport.
|
|
||||||
|
|
||||||
Resource
|
Resource
|
||||||
--------
|
--------
|
||||||
|
|
||||||
@ -26,7 +17,7 @@ service's ``https://openstack:1234/v2/servers`` resource.
|
|||||||
The base ``Resource`` contains methods to support the typical
|
The base ``Resource`` contains methods to support the typical
|
||||||
`CRUD <http://en.wikipedia.org/wiki/Create,_read,_update_and_delete>`_
|
`CRUD <http://en.wikipedia.org/wiki/Create,_read,_update_and_delete>`_
|
||||||
operations supported by REST APIs, and handles the construction of URLs
|
operations supported by REST APIs, and handles the construction of URLs
|
||||||
and calling the appropriate HTTP verb on the given ``Session``.
|
and calling the appropriate HTTP verb on the given ``Adapter``.
|
||||||
|
|
||||||
Values sent to or returned from the service are implemented as attributes
|
Values sent to or returned from the service are implemented as attributes
|
||||||
on the ``Resource`` subclass with type :class:`openstack.resource.prop`.
|
on the ``Resource`` subclass with type :class:`openstack.resource.prop`.
|
||||||
@ -63,10 +54,10 @@ Each service implements a ``Proxy`` class, within the
|
|||||||
``openstack/<program_name>/vX/_proxy.py`` module. For example, the v2 compute
|
``openstack/<program_name>/vX/_proxy.py`` module. For example, the v2 compute
|
||||||
service's ``Proxy`` exists in ``openstack/compute/v2/_proxy.py``.
|
service's ``Proxy`` exists in ``openstack/compute/v2/_proxy.py``.
|
||||||
|
|
||||||
This ``Proxy`` class manages a :class:`~openstack.sessions.Session` and
|
This ``Proxy`` class contains a :class:`~keystoneauth1.adapter.Adapter` and
|
||||||
provides a higher-level interface for users to work with via a
|
provides a higher-level interface for users to work with via a
|
||||||
:class:`~openstack.connection.Connection` instance. Rather than requiring
|
:class:`~openstack.connection.Connection` instance. Rather than requiring
|
||||||
users to maintain their own session and work with lower-level
|
users to maintain their own ``Adapter`` and work with lower-level
|
||||||
:class:`~openstack.resource.Resource` objects, the ``Proxy`` interface
|
:class:`~openstack.resource.Resource` objects, the ``Proxy`` interface
|
||||||
offers a place to make things easier for the caller.
|
offers a place to make things easier for the caller.
|
||||||
|
|
||||||
@ -77,7 +68,7 @@ Each ``Proxy`` class implements methods which act on the underlying
|
|||||||
return flavor.Flavor.list(self.session, **params)
|
return flavor.Flavor.list(self.session, **params)
|
||||||
|
|
||||||
This method is operating on the ``openstack.compute.v2.flavor.Flavor.list``
|
This method is operating on the ``openstack.compute.v2.flavor.Flavor.list``
|
||||||
method. For the time being, it simply passes on the ``Session`` maintained
|
method. For the time being, it simply passes on the ``Adapter`` maintained
|
||||||
by the ``Proxy``, and returns what the underlying ``Resource.list`` method
|
by the ``Proxy``, and returns what the underlying ``Resource.list`` method
|
||||||
does.
|
does.
|
||||||
|
|
||||||
@ -88,9 +79,9 @@ way which will apply nicely across all of the services.
|
|||||||
Connection
|
Connection
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The :class:`openstack.connection.Connection` class builds atop a ``Session``
|
The :class:`openstack.connection.Connection` class builds atop a
|
||||||
object, and provides a higher level interface constructed of ``Proxy``
|
:class:`os_client_config.config.CloudConfig` object, and provides a higher
|
||||||
objects from each of the services.
|
level interface constructed of ``Proxy`` objects from each of the services.
|
||||||
|
|
||||||
The ``Connection`` class' primary purpose is to act as a high-level interface
|
The ``Connection`` class' primary purpose is to act as a high-level interface
|
||||||
to this SDK, managing the lower level connecton bits and exposing the
|
to this SDK, managing the lower level connecton bits and exposing the
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
openstack/
|
openstack/
|
||||||
connection.py
|
connection.py
|
||||||
resource.py
|
resource.py
|
||||||
session.py
|
|
||||||
compute/
|
compute/
|
||||||
compute_service.py
|
compute_service.py
|
||||||
v2/
|
v2/
|
||||||
|
@ -26,9 +26,9 @@ class EnforcementError(errors.SphinxError):
|
|||||||
|
|
||||||
def get_proxy_methods():
|
def get_proxy_methods():
|
||||||
"""Return a set of public names on all proxies"""
|
"""Return a set of public names on all proxies"""
|
||||||
names = ["openstack.bare_metal.v1._proxy",
|
names = ["openstack.baremetal.v1._proxy",
|
||||||
"openstack.block_store.v2._proxy",
|
"openstack.clustering.v1._proxy",
|
||||||
"openstack.cluster.v1._proxy",
|
"openstack.block_storage.v2._proxy",
|
||||||
"openstack.compute.v2._proxy",
|
"openstack.compute.v2._proxy",
|
||||||
"openstack.database.v1._proxy",
|
"openstack.database.v1._proxy",
|
||||||
"openstack.identity.v2._proxy",
|
"openstack.identity.v2._proxy",
|
||||||
@ -43,8 +43,8 @@ def get_proxy_methods():
|
|||||||
"openstack.network.v2._proxy",
|
"openstack.network.v2._proxy",
|
||||||
"openstack.object_store.v1._proxy",
|
"openstack.object_store.v1._proxy",
|
||||||
"openstack.orchestration.v1._proxy",
|
"openstack.orchestration.v1._proxy",
|
||||||
"openstack.telemetry.v2._proxy",
|
"openstack.meter.v2._proxy",
|
||||||
"openstack.telemetry.alarm.v2._proxy",
|
"openstack.meter.alarm.v2._proxy",
|
||||||
"openstack.workflow.v2._proxy"]
|
"openstack.workflow.v2._proxy"]
|
||||||
|
|
||||||
modules = (importlib.import_module(name) for name in names)
|
modules = (importlib.import_module(name) for name in names)
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
Configuring os-client-config Applications
|
Configuring os-client-config Applications
|
||||||
===========================================
|
===========================================
|
||||||
|
|
||||||
|
.. _config-environment-variables:
|
||||||
|
|
||||||
Environment Variables
|
Environment Variables
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
@ -22,6 +24,8 @@ for trove set
|
|||||||
|
|
||||||
export OS_DATABASE_SERVICE_TYPE=rax:database
|
export OS_DATABASE_SERVICE_TYPE=rax:database
|
||||||
|
|
||||||
|
.. _config-clouds-yaml:
|
||||||
|
|
||||||
Config Files
|
Config Files
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Using OpenStack Bare Metal
|
Using OpenStack Baremetal
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
Before working with the Bare Metal service, you'll need to create a
|
Before working with the Baremetal service, you'll need to create a
|
||||||
connection to your OpenStack cloud by following the :doc:`connect` user
|
connection to your OpenStack cloud by following the :doc:`connect` user
|
||||||
guide. This will provide you with the ``conn`` variable used in the examples
|
guide. This will provide you with the ``conn`` variable used in the examples
|
||||||
below.
|
below.
|
@ -1,7 +1,7 @@
|
|||||||
Using OpenStack Block Store
|
Using OpenStack Block Storage
|
||||||
===========================
|
=============================
|
||||||
|
|
||||||
Before working with the Block Store service, you'll need to create a
|
Before working with the Block Storage service, you'll need to create a
|
||||||
connection to your OpenStack cloud by following the :doc:`connect` user
|
connection to your OpenStack cloud by following the :doc:`connect` user
|
||||||
guide. This will provide you with the ``conn`` variable used in the examples
|
guide. This will provide you with the ``conn`` variable used in the examples
|
||||||
below.
|
below.
|
@ -1,36 +0,0 @@
|
|||||||
..
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
not use this file except in compliance with the License. You may obtain
|
|
||||||
a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
License for the specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
|
|
||||||
|
|
||||||
=======================
|
|
||||||
Using OpenStack Cluster
|
|
||||||
=======================
|
|
||||||
|
|
||||||
Before working with the Cluster service, you'll need to create a connection
|
|
||||||
to your OpenStack cloud by following the :doc:`connect` user guide. This will
|
|
||||||
provide you with the ``conn`` variable used by all examples in this guide.
|
|
||||||
|
|
||||||
The primary abstractions/resources of the Cluster service are:
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 1
|
|
||||||
|
|
||||||
Profile Type <cluster/profile_type>
|
|
||||||
Profile <cluster/profile>
|
|
||||||
Cluster <cluster/cluster>
|
|
||||||
Node <cluster/node>
|
|
||||||
Policy Type <cluster/policy_type>
|
|
||||||
Policy <cluster/policy>
|
|
||||||
Receiver <cluster/receiver>
|
|
||||||
Action <cluster/action>
|
|
||||||
Event <cluster/event>
|
|
37
doc/source/users/guides/clustering.rst
Normal file
37
doc/source/users/guides/clustering.rst
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
..
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
not use this file except in compliance with the License. You may obtain
|
||||||
|
a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
|
||||||
|
|
||||||
|
================================
|
||||||
|
Using OpenStack Clustering
|
||||||
|
================================
|
||||||
|
|
||||||
|
Before working with the Clustering service, you'll need to create a
|
||||||
|
connection to your OpenStack cloud by following the :doc:`connect` user guide.
|
||||||
|
This will provide you with the ``conn`` variable used by all examples in this
|
||||||
|
guide.
|
||||||
|
|
||||||
|
The primary abstractions/resources of the Clustering service are:
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
Profile Type <clustering/profile_type>
|
||||||
|
Profile <clustering/profile>
|
||||||
|
Cluster <clustering/cluster>
|
||||||
|
Node <clustering/node>
|
||||||
|
Policy Type <clustering/policy_type>
|
||||||
|
Policy <clustering/policy>
|
||||||
|
Receiver <clustering/receiver>
|
||||||
|
Action <clustering/action>
|
||||||
|
Event <clustering/event>
|
@ -26,7 +26,7 @@ List Policies
|
|||||||
|
|
||||||
To examine the list of policies:
|
To examine the list of policies:
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/policy.py
|
.. literalinclude:: ../../examples/clustering/policy.py
|
||||||
:pyobject: list_policies
|
:pyobject: list_policies
|
||||||
|
|
||||||
When listing policies, you can specify the sorting option using the ``sort``
|
When listing policies, you can specify the sorting option using the ``sort``
|
||||||
@ -42,7 +42,7 @@ Create Policy
|
|||||||
When creating a policy, you will provide a dictionary with keys and values
|
When creating a policy, you will provide a dictionary with keys and values
|
||||||
according to the policy type referenced.
|
according to the policy type referenced.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/policy.py
|
.. literalinclude:: ../../examples/clustering/policy.py
|
||||||
:pyobject: create_policy
|
:pyobject: create_policy
|
||||||
|
|
||||||
Optionally, you can specify a ``metadata`` keyword argument that contains some
|
Optionally, you can specify a ``metadata`` keyword argument that contains some
|
||||||
@ -56,7 +56,7 @@ Find Policy
|
|||||||
|
|
||||||
To find a policy based on its name or ID:
|
To find a policy based on its name or ID:
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/policy.py
|
.. literalinclude:: ../../examples/clustering/policy.py
|
||||||
:pyobject: find_policy
|
:pyobject: find_policy
|
||||||
|
|
||||||
Full example: `manage policy`_
|
Full example: `manage policy`_
|
||||||
@ -67,7 +67,7 @@ Get Policy
|
|||||||
|
|
||||||
To get a policy based on its name or ID:
|
To get a policy based on its name or ID:
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/policy.py
|
.. literalinclude:: ../../examples/clustering/policy.py
|
||||||
:pyobject: get_policy
|
:pyobject: get_policy
|
||||||
|
|
||||||
Full example: `manage policy`_
|
Full example: `manage policy`_
|
||||||
@ -79,7 +79,7 @@ Update Policy
|
|||||||
After a policy is created, most of its properties are immutable. Still, you
|
After a policy is created, most of its properties are immutable. Still, you
|
||||||
can update a policy's ``name`` and/or ``metadata``.
|
can update a policy's ``name`` and/or ``metadata``.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/policy.py
|
.. literalinclude:: ../../examples/clustering/policy.py
|
||||||
:pyobject: update_policy
|
:pyobject: update_policy
|
||||||
|
|
||||||
The Cluster service doesn't allow updating the ``spec`` of a policy. The only
|
The Cluster service doesn't allow updating the ``spec`` of a policy. The only
|
||||||
@ -95,8 +95,8 @@ A policy can be deleted after creation, provided that it is not referenced
|
|||||||
by any active clusters or nodes. If you attempt to delete a policy that is
|
by any active clusters or nodes. If you attempt to delete a policy that is
|
||||||
still in use, you will get an error message.
|
still in use, you will get an error message.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/policy.py
|
.. literalinclude:: ../../examples/clustering/policy.py
|
||||||
:pyobject: delete_policy
|
:pyobject: delete_policy
|
||||||
|
|
||||||
|
|
||||||
.. _manage policy: http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/examples/cluster/policy.py
|
.. _manage policy: http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/examples/clustering/policy.py
|
@ -25,7 +25,7 @@ List Policy Types
|
|||||||
|
|
||||||
To examine the known policy types:
|
To examine the known policy types:
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/policy_type.py
|
.. literalinclude:: ../../examples/clustering/policy_type.py
|
||||||
:pyobject: list_policy_types
|
:pyobject: list_policy_types
|
||||||
|
|
||||||
Full example: `manage policy type`_
|
Full example: `manage policy type`_
|
||||||
@ -37,9 +37,9 @@ Get Policy Type
|
|||||||
To retrieve the details about a policy type, you need to provide the name of
|
To retrieve the details about a policy type, you need to provide the name of
|
||||||
it.
|
it.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/policy_type.py
|
.. literalinclude:: ../../examples/clustering/policy_type.py
|
||||||
:pyobject: get_policy_type
|
:pyobject: get_policy_type
|
||||||
|
|
||||||
Full example: `manage policy type`_
|
Full example: `manage policy type`_
|
||||||
|
|
||||||
.. _manage policy type: http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/examples/cluster/policy_type.py
|
.. _manage policy type: http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/examples/clustering/policy_type.py
|
@ -26,7 +26,7 @@ List Profiles
|
|||||||
|
|
||||||
To examine the list of profiles:
|
To examine the list of profiles:
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/profile.py
|
.. literalinclude:: ../../examples/clustering/profile.py
|
||||||
:pyobject: list_profiles
|
:pyobject: list_profiles
|
||||||
|
|
||||||
When listing profiles, you can specify the sorting option using the ``sort``
|
When listing profiles, you can specify the sorting option using the ``sort``
|
||||||
@ -42,7 +42,7 @@ Create Profile
|
|||||||
When creating a profile, you will provide a dictionary with keys and values
|
When creating a profile, you will provide a dictionary with keys and values
|
||||||
specified according to the profile type referenced.
|
specified according to the profile type referenced.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/profile.py
|
.. literalinclude:: ../../examples/clustering/profile.py
|
||||||
:pyobject: create_profile
|
:pyobject: create_profile
|
||||||
|
|
||||||
Optionally, you can specify a ``metadata`` keyword argument that contains some
|
Optionally, you can specify a ``metadata`` keyword argument that contains some
|
||||||
@ -56,7 +56,7 @@ Find Profile
|
|||||||
|
|
||||||
To find a profile based on its name or ID:
|
To find a profile based on its name or ID:
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/profile.py
|
.. literalinclude:: ../../examples/clustering/profile.py
|
||||||
:pyobject: find_profile
|
:pyobject: find_profile
|
||||||
|
|
||||||
The Cluster service doesn't allow updating the ``spec`` of a profile. The only
|
The Cluster service doesn't allow updating the ``spec`` of a profile. The only
|
||||||
@ -70,7 +70,7 @@ Get Profile
|
|||||||
|
|
||||||
To get a profile based on its name or ID:
|
To get a profile based on its name or ID:
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/profile.py
|
.. literalinclude:: ../../examples/clustering/profile.py
|
||||||
:pyobject: get_profile
|
:pyobject: get_profile
|
||||||
|
|
||||||
Full example: `manage profile`_
|
Full example: `manage profile`_
|
||||||
@ -82,7 +82,7 @@ Update Profile
|
|||||||
After a profile is created, most of its properties are immutable. Still, you
|
After a profile is created, most of its properties are immutable. Still, you
|
||||||
can update a profile's ``name`` and/or ``metadata``.
|
can update a profile's ``name`` and/or ``metadata``.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/profile.py
|
.. literalinclude:: ../../examples/clustering/profile.py
|
||||||
:pyobject: update_profile
|
:pyobject: update_profile
|
||||||
|
|
||||||
The Cluster service doesn't allow updating the ``spec`` of a profile. The only
|
The Cluster service doesn't allow updating the ``spec`` of a profile. The only
|
||||||
@ -98,8 +98,8 @@ A profile can be deleted after creation, provided that it is not referenced
|
|||||||
by any active clusters or nodes. If you attempt to delete a profile that is
|
by any active clusters or nodes. If you attempt to delete a profile that is
|
||||||
still in use, you will get an error message.
|
still in use, you will get an error message.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/profile.py
|
.. literalinclude:: ../../examples/clustering/profile.py
|
||||||
:pyobject: delete_profile
|
:pyobject: delete_profile
|
||||||
|
|
||||||
|
|
||||||
.. _manage profile: http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/examples/cluster/profile.py
|
.. _manage profile: http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/examples/clustering/profile.py
|
@ -25,7 +25,7 @@ List Profile Types
|
|||||||
|
|
||||||
To examine the known profile types:
|
To examine the known profile types:
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/profile_type.py
|
.. literalinclude:: ../../examples/clustering/profile_type.py
|
||||||
:pyobject: list_profile_types
|
:pyobject: list_profile_types
|
||||||
|
|
||||||
Full example: `manage profile type`_
|
Full example: `manage profile type`_
|
||||||
@ -36,9 +36,9 @@ Get Profile Type
|
|||||||
|
|
||||||
To get the details about a profile type, you need to provide the name of it.
|
To get the details about a profile type, you need to provide the name of it.
|
||||||
|
|
||||||
.. literalinclude:: ../../examples/cluster/profile_type.py
|
.. literalinclude:: ../../examples/clustering/profile_type.py
|
||||||
:pyobject: get_profile_type
|
:pyobject: get_profile_type
|
||||||
|
|
||||||
Full example: `manage profile type`_
|
Full example: `manage profile type`_
|
||||||
|
|
||||||
.. _manage profile type: http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/examples/cluster/profile_type.py
|
.. _manage profile type: http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/examples/clustering/profile_type.py
|
@ -4,29 +4,20 @@ Connect
|
|||||||
In order to work with an OpenStack cloud you first need to create a
|
In order to work with an OpenStack cloud you first need to create a
|
||||||
:class:`~openstack.connection.Connection` to it using your credentials. A
|
:class:`~openstack.connection.Connection` to it using your credentials. A
|
||||||
:class:`~openstack.connection.Connection` can be
|
:class:`~openstack.connection.Connection` can be
|
||||||
created in 3 ways, using the class itself, a file, or environment variables.
|
created in 3 ways, using the class itself, :ref:`config-clouds-yaml`, or
|
||||||
If this is your first time using the SDK, we recommend simply using the
|
:ref:`config-environment-variables`. It is recommended to always use
|
||||||
class itself as illustrated below.
|
:ref:`config-clouds-yaml` as the same config can be used across tools and
|
||||||
|
languages.
|
||||||
|
|
||||||
Create Connection
|
Create Connection
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
To create a connection you need a :class:`~openstack.profile.Profile` and a
|
To create a :class:`~openstack.connection.Connection` instance, use the
|
||||||
:class:`~openstack.connection.Connection`.
|
:func:`~openstack.connect` factory function.
|
||||||
|
|
||||||
.. literalinclude:: ../examples/connect.py
|
.. literalinclude:: ../examples/connect.py
|
||||||
:pyobject: create_connection
|
:pyobject: create_connection
|
||||||
|
|
||||||
The :class:`~openstack.profile.Profile` sets your preferences for each
|
|
||||||
service. You will pass it the region of the OpenStack cloud that this
|
|
||||||
connection will use.
|
|
||||||
|
|
||||||
The :class:`~openstack.connection.Connection` is a context for a connection
|
|
||||||
to an OpenStack cloud. You will primarily use it to set the
|
|
||||||
:class:`~openstack.profile.Profile` and authentication information. You can
|
|
||||||
also set the ``user_agent`` to something that describes your application
|
|
||||||
(e.g. ``my-web-app/1.3.4``).
|
|
||||||
|
|
||||||
Full example at `connect.py <http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/examples/connect.py>`_
|
Full example at `connect.py <http://git.openstack.org/cgit/openstack/python-openstacksdk/tree/examples/connect.py>`_
|
||||||
|
|
||||||
.. note:: To enable logging, see the :doc:`logging` user guide.
|
.. note:: To enable logging, see the :doc:`logging` user guide.
|
||||||
@ -37,5 +28,9 @@ Now that you can create a connection, continue with the :ref:`user_guides`
|
|||||||
to work with an OpenStack service.
|
to work with an OpenStack service.
|
||||||
|
|
||||||
As an alternative to creating a :class:`~openstack.connection.Connection`
|
As an alternative to creating a :class:`~openstack.connection.Connection`
|
||||||
using the class itself, you can connect using a file or environment
|
using :ref:config-clouds-yaml, you can connect using
|
||||||
variables. See the :doc:`connect_from_config` user guide.
|
`config-environment-variables`.
|
||||||
|
|
||||||
|
.. TODO(shade) Update the text here and consolidate with the old
|
||||||
|
os-client-config docs so that we have a single and consistent explanation
|
||||||
|
of the envvars cloud, etc.
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Using OpenStack Telemetry
|
Using OpenStack Meter
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
.. caution::
|
.. caution::
|
||||||
BETA: This API is a work in progress and is subject to change.
|
BETA: This API is a work in progress and is subject to change.
|
||||||
|
|
||||||
Before working with the Telemetry service, you'll need to create a connection
|
Before working with the Meter service, you'll need to create a connection
|
||||||
to your OpenStack cloud by following the :doc:`connect` user guide. This will
|
to your OpenStack cloud by following the :doc:`connect` user guide. This will
|
||||||
provide you with the ``conn`` variable used in the examples below.
|
provide you with the ``conn`` variable used in the examples below.
|
||||||
|
|
@ -28,19 +28,19 @@ approach, this is where you'll want to begin.
|
|||||||
Connect to an OpenStack Cloud <guides/connect>
|
Connect to an OpenStack Cloud <guides/connect>
|
||||||
Connect to an OpenStack Cloud Using a Config File <guides/connect_from_config>
|
Connect to an OpenStack Cloud Using a Config File <guides/connect_from_config>
|
||||||
Logging <guides/logging>
|
Logging <guides/logging>
|
||||||
Bare Metal <guides/bare_metal>
|
Baremetal <guides/baremetal>
|
||||||
Block Store <guides/block_store>
|
Block Storage <guides/block_storage>
|
||||||
Cluster <guides/cluster>
|
Clustering <guides/clustering>
|
||||||
Compute <guides/compute>
|
Compute <guides/compute>
|
||||||
Database <guides/database>
|
Database <guides/database>
|
||||||
Identity <guides/identity>
|
Identity <guides/identity>
|
||||||
Image <guides/image>
|
Image <guides/image>
|
||||||
Key Manager <guides/key_manager>
|
Key Manager <guides/key_manager>
|
||||||
Message <guides/message>
|
Message <guides/message>
|
||||||
|
Meter <guides/meter>
|
||||||
Network <guides/network>
|
Network <guides/network>
|
||||||
Object Store <guides/object_store>
|
Object Store <guides/object_store>
|
||||||
Orchestration <guides/orchestration>
|
Orchestration <guides/orchestration>
|
||||||
Telemetry <guides/telemetry>
|
|
||||||
|
|
||||||
API Documentation
|
API Documentation
|
||||||
-----------------
|
-----------------
|
||||||
@ -54,26 +54,26 @@ interface is the layer upon which the *Connection* is built, with
|
|||||||
Connection Interface
|
Connection Interface
|
||||||
********************
|
********************
|
||||||
|
|
||||||
A *Connection* instance maintains your session, authentication, transport,
|
A *Connection* instance maintains your cloud config, session and authentication
|
||||||
and profile, providing you with a set of higher-level interfaces to work
|
information providing you with a set of higher-level interfaces to work with
|
||||||
with OpenStack services.
|
OpenStack services.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
connection
|
connection
|
||||||
profile
|
|
||||||
|
|
||||||
Once you have a *Connection* instance, the following services may be exposed
|
Once you have a *Connection* instance, the following services may be exposed
|
||||||
to you. Your user profile determine the full set of exposed services,
|
to you. The combination of your ``CloudConfig`` and the catalog of the cloud
|
||||||
but listed below are the ones provided by this SDK by default.
|
in question control which services are exposed, but listed below are the ones
|
||||||
|
provided by the SDK.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
Bare Metal <proxies/bare_metal>
|
Baremetal <proxies/baremetal>
|
||||||
Block Store <proxies/block_store>
|
Block Storage <proxies/block_storage>
|
||||||
Cluster <proxies/cluster>
|
Clustering <proxies/clustering>
|
||||||
Compute <proxies/compute>
|
Compute <proxies/compute>
|
||||||
Database <proxies/database>
|
Database <proxies/database>
|
||||||
Identity v2 <proxies/identity_v2>
|
Identity v2 <proxies/identity_v2>
|
||||||
@ -85,10 +85,10 @@ but listed below are the ones provided by this SDK by default.
|
|||||||
Message v1 <proxies/message_v1>
|
Message v1 <proxies/message_v1>
|
||||||
Message v2 <proxies/message_v2>
|
Message v2 <proxies/message_v2>
|
||||||
Network <proxies/network>
|
Network <proxies/network>
|
||||||
|
Meter <proxies/meter>
|
||||||
Metric <proxies/metric>
|
Metric <proxies/metric>
|
||||||
Object Store <proxies/object_store>
|
Object Store <proxies/object_store>
|
||||||
Orchestration <proxies/orchestration>
|
Orchestration <proxies/orchestration>
|
||||||
Telemetry <proxies/telemetry>
|
|
||||||
Workflow <proxies/workflow>
|
Workflow <proxies/workflow>
|
||||||
|
|
||||||
Resource Interface
|
Resource Interface
|
||||||
@ -106,20 +106,20 @@ The following services have exposed *Resource* classes.
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
Bare Metal <resources/bare_metal/index>
|
Baremetal <resources/baremetal/index>
|
||||||
Block Store <resources/block_store/index>
|
Block Storage <resources/block_storage/index>
|
||||||
Cluster <resources/cluster/index>
|
Clustering <resources/clustering/index>
|
||||||
Compute <resources/compute/index>
|
Compute <resources/compute/index>
|
||||||
Database <resources/database/index>
|
Database <resources/database/index>
|
||||||
Identity <resources/identity/index>
|
Identity <resources/identity/index>
|
||||||
Image <resources/image/index>
|
Image <resources/image/index>
|
||||||
Key Management <resources/key_manager/index>
|
Key Management <resources/key_manager/index>
|
||||||
Load Balancer <resources/load_balancer/index>
|
Load Balancer <resources/load_balancer/index>
|
||||||
|
Meter <resources/meter/index>
|
||||||
Metric <resources/metric/index>
|
Metric <resources/metric/index>
|
||||||
Network <resources/network/index>
|
Network <resources/network/index>
|
||||||
Orchestration <resources/orchestration/index>
|
Orchestration <resources/orchestration/index>
|
||||||
Object Store <resources/object_store/index>
|
Object Store <resources/object_store/index>
|
||||||
Telemetry <resources/telemetry/index>
|
|
||||||
Workflow <resources/workflow/index>
|
Workflow <resources/workflow/index>
|
||||||
|
|
||||||
Low-Level Classes
|
Low-Level Classes
|
||||||
@ -133,7 +133,6 @@ can be customized.
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
session
|
|
||||||
resource
|
resource
|
||||||
resource2
|
resource2
|
||||||
service_filter
|
service_filter
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
Profile
|
|
||||||
=======
|
|
||||||
.. automodule:: openstack.profile
|
|
||||||
|
|
||||||
Profile Object
|
|
||||||
--------------
|
|
||||||
|
|
||||||
.. autoclass:: openstack.profile.Profile
|
|
||||||
:members:
|
|
@ -1,76 +0,0 @@
|
|||||||
Bare Metal API
|
|
||||||
==============
|
|
||||||
|
|
||||||
For details on how to use bare_metal, see :doc:`/users/guides/bare_metal`
|
|
||||||
|
|
||||||
.. automodule:: openstack.bare_metal.v1._proxy
|
|
||||||
|
|
||||||
The BareMetal Class
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
The bare_metal high-level interface is available through the ``bare_metal``
|
|
||||||
member of a :class:`~openstack.connection.Connection` object.
|
|
||||||
The ``bare_metal`` member will only be added if the service is detected.
|
|
||||||
|
|
||||||
Node Operations
|
|
||||||
^^^^^^^^^^^^^^^
|
|
||||||
.. autoclass:: openstack.bare_metal.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.create_node
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.update_node
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.delete_node
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.get_node
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.find_node
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.nodes
|
|
||||||
|
|
||||||
Port Operations
|
|
||||||
^^^^^^^^^^^^^^^
|
|
||||||
.. autoclass:: openstack.bare_metal.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.create_port
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.update_port
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.delete_port
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.get_port
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.find_port
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.ports
|
|
||||||
|
|
||||||
Port Group Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
.. autoclass:: openstack.bare_metal.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.create_port_group
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.update_port_group
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.delete_port_group
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.get_port_group
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.find_port_group
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.port_groups
|
|
||||||
|
|
||||||
Driver Operations
|
|
||||||
^^^^^^^^^^^^^^^^^
|
|
||||||
.. autoclass:: openstack.bare_metal.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.drivers
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.get_driver
|
|
||||||
|
|
||||||
Chassis Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^
|
|
||||||
.. autoclass:: openstack.bare_metal.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.create_chassis
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.update_chassis
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.delete_chassis
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.get_chassis
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.find_chassis
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.chassis
|
|
||||||
|
|
||||||
Deprecated Methods
|
|
||||||
^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.bare_metal.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.create_portgroup
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.update_portgroup
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.delete_portgroup
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.get_portgroup
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.find_portgroup
|
|
||||||
.. automethod:: openstack.bare_metal.v1._proxy.Proxy.portgroups
|
|
76
doc/source/users/proxies/baremetal.rst
Normal file
76
doc/source/users/proxies/baremetal.rst
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
Baremetal API
|
||||||
|
==============
|
||||||
|
|
||||||
|
For details on how to use baremetal, see :doc:`/users/guides/baremetal`
|
||||||
|
|
||||||
|
.. automodule:: openstack.baremetal.v1._proxy
|
||||||
|
|
||||||
|
The Baremetal Class
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
The baremetal high-level interface is available through the ``baremetal``
|
||||||
|
member of a :class:`~openstack.connection.Connection` object.
|
||||||
|
The ``baremetal`` member will only be added if the service is detected.
|
||||||
|
|
||||||
|
Node Operations
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
.. autoclass:: openstack.baremetal.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.create_node
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.update_node
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.delete_node
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.get_node
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.find_node
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.nodes
|
||||||
|
|
||||||
|
Port Operations
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
.. autoclass:: openstack.baremetal.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.create_port
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.update_port
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.delete_port
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.get_port
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.find_port
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.ports
|
||||||
|
|
||||||
|
Port Group Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
.. autoclass:: openstack.baremetal.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.create_port_group
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.update_port_group
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.delete_port_group
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.get_port_group
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.find_port_group
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.port_groups
|
||||||
|
|
||||||
|
Driver Operations
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
.. autoclass:: openstack.baremetal.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.drivers
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.get_driver
|
||||||
|
|
||||||
|
Chassis Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
.. autoclass:: openstack.baremetal.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.create_chassis
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.update_chassis
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.delete_chassis
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.get_chassis
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.find_chassis
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.chassis
|
||||||
|
|
||||||
|
Deprecated Methods
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.baremetal.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.create_portgroup
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.update_portgroup
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.delete_portgroup
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.get_portgroup
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.find_portgroup
|
||||||
|
.. automethod:: openstack.baremetal.v1._proxy.Proxy.portgroups
|
43
doc/source/users/proxies/block_storage.rst
Normal file
43
doc/source/users/proxies/block_storage.rst
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
Block Storage API
|
||||||
|
=================
|
||||||
|
|
||||||
|
For details on how to use block_storage, see :doc:`/users/guides/block_storage`
|
||||||
|
|
||||||
|
.. automodule:: openstack.block_storage.v2._proxy
|
||||||
|
|
||||||
|
The BlockStorage Class
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
The block_storage high-level interface is available through the
|
||||||
|
``block_storage`` member of a :class:`~openstack.connection.Connection` object.
|
||||||
|
The ``block_storage`` member will only be added if the service is detected.
|
||||||
|
|
||||||
|
Volume Operations
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.block_storage.v2._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.create_volume
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.delete_volume
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.get_volume
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.volumes
|
||||||
|
|
||||||
|
Type Operations
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.block_storage.v2._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.create_type
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.delete_type
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.get_type
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.types
|
||||||
|
|
||||||
|
Snapshot Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.block_storage.v2._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.create_snapshot
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.delete_snapshot
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.get_snapshot
|
||||||
|
.. automethod:: openstack.block_storage.v2._proxy.Proxy.snapshots
|
@ -1,43 +0,0 @@
|
|||||||
Block Store API
|
|
||||||
===============
|
|
||||||
|
|
||||||
For details on how to use block_store, see :doc:`/users/guides/block_store`
|
|
||||||
|
|
||||||
.. automodule:: openstack.block_store.v2._proxy
|
|
||||||
|
|
||||||
The BlockStore Class
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
The block_store high-level interface is available through the ``block_store``
|
|
||||||
member of a :class:`~openstack.connection.Connection` object.
|
|
||||||
The ``block_store`` member will only be added if the service is detected.
|
|
||||||
|
|
||||||
Volume Operations
|
|
||||||
^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.block_store.v2._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.create_volume
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.delete_volume
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.get_volume
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.volumes
|
|
||||||
|
|
||||||
Type Operations
|
|
||||||
^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.block_store.v2._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.create_type
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.delete_type
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.get_type
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.types
|
|
||||||
|
|
||||||
Snapshot Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.block_store.v2._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.create_snapshot
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.delete_snapshot
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.get_snapshot
|
|
||||||
.. automethod:: openstack.block_store.v2._proxy.Proxy.snapshots
|
|
@ -1,177 +0,0 @@
|
|||||||
Cluster API
|
|
||||||
===========
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1._proxy
|
|
||||||
|
|
||||||
The Cluster Class
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
The cluster high-level interface is available through the ``cluster``
|
|
||||||
member of a :class:`~openstack.connection.Connection` object. The
|
|
||||||
``cluster`` member will only be added if the service is detected.
|
|
||||||
|
|
||||||
|
|
||||||
Build Info Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_build_info
|
|
||||||
|
|
||||||
|
|
||||||
Profile Type Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.profile_types
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_profile_type
|
|
||||||
|
|
||||||
|
|
||||||
Profile Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.create_profile
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.update_profile
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.delete_profile
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_profile
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.find_profile
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.profiles
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.validate_profile
|
|
||||||
|
|
||||||
|
|
||||||
Policy Type Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.policy_types
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_policy_type
|
|
||||||
|
|
||||||
|
|
||||||
Policy Operations
|
|
||||||
^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.create_policy
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.update_policy
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.delete_policy
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_policy
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.find_policy
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.policies
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.validate_policy
|
|
||||||
|
|
||||||
|
|
||||||
Cluster Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.create_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.update_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.delete_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.find_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.clusters
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.check_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.recover_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.resize_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.scale_in_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.scale_out_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.collect_cluster_attrs
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.perform_operation_on_cluster
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.add_nodes_to_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.remove_nodes_from_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.replace_nodes_in_cluster
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.attach_policy_to_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.update_cluster_policy
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.detach_policy_from_cluster
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_cluster_policy
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_policies
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_add_nodes
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_attach_policy
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_del_nodes
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_detach_policy
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_operation
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_replace_nodes
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_resize
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_scale_in
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_scale_out
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.cluster_update_policy
|
|
||||||
|
|
||||||
|
|
||||||
Node Operations
|
|
||||||
^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.create_node
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.update_node
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.delete_node
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_node
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.find_node
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.nodes
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.check_node
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.recover_node
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.perform_operation_on_node
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.adopt_node
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.node_operation
|
|
||||||
|
|
||||||
|
|
||||||
Receiver Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.create_receiver
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.update_receiver
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.delete_receiver
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_receiver
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.find_receiver
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.receivers
|
|
||||||
|
|
||||||
|
|
||||||
Action Operations
|
|
||||||
^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_action
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.actions
|
|
||||||
|
|
||||||
|
|
||||||
Event Operations
|
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.get_event
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.events
|
|
||||||
|
|
||||||
|
|
||||||
Helper Operations
|
|
||||||
^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.wait_for_delete
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.wait_for_status
|
|
||||||
|
|
||||||
|
|
||||||
Service Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.cluster.v1._proxy.Proxy.services
|
|
177
doc/source/users/proxies/clustering.rst
Normal file
177
doc/source/users/proxies/clustering.rst
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
Cluster API
|
||||||
|
===========
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1._proxy
|
||||||
|
|
||||||
|
The Cluster Class
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
The cluster high-level interface is available through the ``cluster``
|
||||||
|
member of a :class:`~openstack.connection.Connection` object. The
|
||||||
|
``cluster`` member will only be added if the service is detected.
|
||||||
|
|
||||||
|
|
||||||
|
Build Info Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_build_info
|
||||||
|
|
||||||
|
|
||||||
|
Profile Type Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.profile_types
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_profile_type
|
||||||
|
|
||||||
|
|
||||||
|
Profile Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.create_profile
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.update_profile
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.delete_profile
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_profile
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.find_profile
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.profiles
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.validate_profile
|
||||||
|
|
||||||
|
|
||||||
|
Policy Type Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.policy_types
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_policy_type
|
||||||
|
|
||||||
|
|
||||||
|
Policy Operations
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.create_policy
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.update_policy
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.delete_policy
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_policy
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.find_policy
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.policies
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.validate_policy
|
||||||
|
|
||||||
|
|
||||||
|
Cluster Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.create_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.update_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.delete_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.find_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.clusters
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.check_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.recover_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.resize_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.scale_in_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.scale_out_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.collect_cluster_attrs
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.perform_operation_on_cluster
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.add_nodes_to_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.remove_nodes_from_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.replace_nodes_in_cluster
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.attach_policy_to_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.update_cluster_policy
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.detach_policy_from_cluster
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_cluster_policy
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_policies
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_add_nodes
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_attach_policy
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_del_nodes
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_detach_policy
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_operation
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_replace_nodes
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_resize
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_scale_in
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_scale_out
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.cluster_update_policy
|
||||||
|
|
||||||
|
|
||||||
|
Node Operations
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.create_node
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.update_node
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.delete_node
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_node
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.find_node
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.nodes
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.check_node
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.recover_node
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.perform_operation_on_node
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.adopt_node
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.node_operation
|
||||||
|
|
||||||
|
|
||||||
|
Receiver Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.create_receiver
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.update_receiver
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.delete_receiver
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_receiver
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.find_receiver
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.receivers
|
||||||
|
|
||||||
|
|
||||||
|
Action Operations
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_action
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.actions
|
||||||
|
|
||||||
|
|
||||||
|
Event Operations
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.get_event
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.events
|
||||||
|
|
||||||
|
|
||||||
|
Helper Operations
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.wait_for_delete
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.wait_for_status
|
||||||
|
|
||||||
|
|
||||||
|
Service Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.clustering.v1._proxy.Proxy.services
|
85
doc/source/users/proxies/meter.rst
Normal file
85
doc/source/users/proxies/meter.rst
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
Meter API
|
||||||
|
=============
|
||||||
|
|
||||||
|
.. caution::
|
||||||
|
BETA: This API is a work in progress and is subject to change.
|
||||||
|
|
||||||
|
For details on how to use meter, see :doc:`/users/guides/meter`
|
||||||
|
|
||||||
|
.. automodule:: openstack.meter.v2._proxy
|
||||||
|
|
||||||
|
The Meter Class
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
The meter high-level interface is available through the ``meter``
|
||||||
|
member of a :class:`~openstack.connection.Connection` object. The
|
||||||
|
``meter`` member will only be added if the service is detected.
|
||||||
|
|
||||||
|
Sample Operations
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.meter.v2._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.find_sample
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.samples
|
||||||
|
|
||||||
|
Statistic Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.meter.v2._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.find_statistics
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.statistics
|
||||||
|
|
||||||
|
Resource Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.meter.v2._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.get_resource
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.find_resource
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.resources
|
||||||
|
|
||||||
|
Meter Operations
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.meter.v2._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.find_meter
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.meters
|
||||||
|
|
||||||
|
Capability Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.meter.v2._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.find_capability
|
||||||
|
.. automethod:: openstack.meter.v2._proxy.Proxy.capabilities
|
||||||
|
|
||||||
|
The Alarm Class
|
||||||
|
---------------
|
||||||
|
|
||||||
|
The alarm high-level interface is available through the ``meter.alarm``
|
||||||
|
member of a :class:`~openstack.connection.Connection` object. The
|
||||||
|
``meter.alarm`` member will only be added if the service is detected.
|
||||||
|
|
||||||
|
Alarm Operations
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.meter.alarm.v2._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.meter.alarm.v2._proxy.Proxy.create_alarm
|
||||||
|
.. automethod:: openstack.meter.alarm.v2._proxy.Proxy.update_alarm
|
||||||
|
.. automethod:: openstack.meter.alarm.v2._proxy.Proxy.delete_alarm
|
||||||
|
.. automethod:: openstack.meter.alarm.v2._proxy.Proxy.get_alarm
|
||||||
|
.. automethod:: openstack.meter.alarm.v2._proxy.Proxy.find_alarm
|
||||||
|
.. automethod:: openstack.meter.alarm.v2._proxy.Proxy.alarms
|
||||||
|
|
||||||
|
|
||||||
|
Alarm Change Operations
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. autoclass:: openstack.meter.alarm.v2._proxy.Proxy
|
||||||
|
|
||||||
|
.. automethod:: openstack.meter.alarm.v2._proxy.Proxy.find_alarm_change
|
||||||
|
.. automethod:: openstack.meter.alarm.v2._proxy.Proxy.alarm_changes
|
@ -1,85 +0,0 @@
|
|||||||
Telemetry API
|
|
||||||
=============
|
|
||||||
|
|
||||||
.. caution::
|
|
||||||
BETA: This API is a work in progress and is subject to change.
|
|
||||||
|
|
||||||
For details on how to use telemetry, see :doc:`/users/guides/telemetry`
|
|
||||||
|
|
||||||
.. automodule:: openstack.telemetry.v2._proxy
|
|
||||||
|
|
||||||
The Telemetry Class
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
The telemetry high-level interface is available through the ``telemetry``
|
|
||||||
member of a :class:`~openstack.connection.Connection` object. The
|
|
||||||
``telemetry`` member will only be added if the service is detected.
|
|
||||||
|
|
||||||
Sample Operations
|
|
||||||
^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.v2._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.find_sample
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.samples
|
|
||||||
|
|
||||||
Statistic Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.v2._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.find_statistics
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.statistics
|
|
||||||
|
|
||||||
Resource Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.v2._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.get_resource
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.find_resource
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.resources
|
|
||||||
|
|
||||||
Meter Operations
|
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.v2._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.find_meter
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.meters
|
|
||||||
|
|
||||||
Capability Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.v2._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.find_capability
|
|
||||||
.. automethod:: openstack.telemetry.v2._proxy.Proxy.capabilities
|
|
||||||
|
|
||||||
The Alarm Class
|
|
||||||
---------------
|
|
||||||
|
|
||||||
The alarm high-level interface is available through the ``telemetry.alarm``
|
|
||||||
member of a :class:`~openstack.connection.Connection` object. The
|
|
||||||
``telemetry.alarm`` member will only be added if the service is detected.
|
|
||||||
|
|
||||||
Alarm Operations
|
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.alarm.v2._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.telemetry.alarm.v2._proxy.Proxy.create_alarm
|
|
||||||
.. automethod:: openstack.telemetry.alarm.v2._proxy.Proxy.update_alarm
|
|
||||||
.. automethod:: openstack.telemetry.alarm.v2._proxy.Proxy.delete_alarm
|
|
||||||
.. automethod:: openstack.telemetry.alarm.v2._proxy.Proxy.get_alarm
|
|
||||||
.. automethod:: openstack.telemetry.alarm.v2._proxy.Proxy.find_alarm
|
|
||||||
.. automethod:: openstack.telemetry.alarm.v2._proxy.Proxy.alarms
|
|
||||||
|
|
||||||
|
|
||||||
Alarm Change Operations
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.alarm.v2._proxy.Proxy
|
|
||||||
|
|
||||||
.. automethod:: openstack.telemetry.alarm.v2._proxy.Proxy.find_alarm_change
|
|
||||||
.. automethod:: openstack.telemetry.alarm.v2._proxy.Proxy.alarm_changes
|
|
@ -1,4 +1,4 @@
|
|||||||
Bare Metal Resources
|
Baremetal Resources
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
@ -1,12 +1,12 @@
|
|||||||
openstack.bare_metal.v1.chassis
|
openstack.baremetal.v1.chassis
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
.. automodule:: openstack.bare_metal.v1.chassis
|
.. automodule:: openstack.baremetal.v1.chassis
|
||||||
|
|
||||||
The Chassis Class
|
The Chassis Class
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
The ``Chassis`` class inherits from :class:`~openstack.resource.Resource`.
|
The ``Chassis`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
.. autoclass:: openstack.bare_metal.v1.chassis.Chassis
|
.. autoclass:: openstack.baremetal.v1.chassis.Chassis
|
||||||
:members:
|
:members:
|
@ -1,12 +1,12 @@
|
|||||||
openstack.bare_metal.v1.driver
|
openstack.baremetal.v1.driver
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
.. automodule:: openstack.bare_metal.v1.driver
|
.. automodule:: openstack.baremetal.v1.driver
|
||||||
|
|
||||||
The Driver Class
|
The Driver Class
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
The ``Driver`` class inherits from :class:`~openstack.resource.Resource`.
|
The ``Driver`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
.. autoclass:: openstack.bare_metal.v1.driver.Driver
|
.. autoclass:: openstack.baremetal.v1.driver.Driver
|
||||||
:members:
|
:members:
|
@ -1,12 +1,12 @@
|
|||||||
openstack.bare_metal.v1.Node
|
openstack.baremetal.v1.Node
|
||||||
============================
|
============================
|
||||||
|
|
||||||
.. automodule:: openstack.bare_metal.v1.node
|
.. automodule:: openstack.baremetal.v1.node
|
||||||
|
|
||||||
The Node Class
|
The Node Class
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
The ``Node`` class inherits from :class:`~openstack.resource.Resource`.
|
The ``Node`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
.. autoclass:: openstack.bare_metal.v1.node.Node
|
.. autoclass:: openstack.baremetal.v1.node.Node
|
||||||
:members:
|
:members:
|
@ -1,12 +1,12 @@
|
|||||||
openstack.bare_metal.v1.port
|
openstack.baremetal.v1.port
|
||||||
============================
|
============================
|
||||||
|
|
||||||
.. automodule:: openstack.bare_metal.v1.port
|
.. automodule:: openstack.baremetal.v1.port
|
||||||
|
|
||||||
The Port Class
|
The Port Class
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
The ``Port`` class inherits from :class:`~openstack.resource.Resource`.
|
The ``Port`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
.. autoclass:: openstack.bare_metal.v1.port.Port
|
.. autoclass:: openstack.baremetal.v1.port.Port
|
||||||
:members:
|
:members:
|
@ -1,12 +1,12 @@
|
|||||||
openstack.bare_metal.v1.port_group
|
openstack.baremetal.v1.port_group
|
||||||
==================================
|
==================================
|
||||||
|
|
||||||
.. automodule:: openstack.bare_metal.v1.port_group
|
.. automodule:: openstack.baremetal.v1.port_group
|
||||||
|
|
||||||
The PortGroup Class
|
The PortGroup Class
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
The ``PortGroup`` class inherits from :class:`~openstack.resource.Resource`.
|
The ``PortGroup`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
.. autoclass:: openstack.bare_metal.v1.port_group.PortGroup
|
.. autoclass:: openstack.baremetal.v1.port_group.PortGroup
|
||||||
:members:
|
:members:
|
@ -1,5 +1,5 @@
|
|||||||
Block Store Resources
|
Block Storage Resources
|
||||||
=====================
|
=======================
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
21
doc/source/users/resources/block_storage/v2/snapshot.rst
Normal file
21
doc/source/users/resources/block_storage/v2/snapshot.rst
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
openstack.block_storage.v2.snapshot
|
||||||
|
===================================
|
||||||
|
|
||||||
|
.. automodule:: openstack.block_storage.v2.snapshot
|
||||||
|
|
||||||
|
The Snapshot Class
|
||||||
|
------------------
|
||||||
|
|
||||||
|
The ``Snapshot`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.block_storage.v2.snapshot.Snapshot
|
||||||
|
:members:
|
||||||
|
|
||||||
|
The SnapshotDetail Class
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
The ``SnapshotDetail`` class inherits from
|
||||||
|
:class:`~openstack.block_storage.v2.snapshot.Snapshot`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.block_storage.v2.snapshot.SnapshotDetail
|
||||||
|
:members:
|
13
doc/source/users/resources/block_storage/v2/type.rst
Normal file
13
doc/source/users/resources/block_storage/v2/type.rst
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
openstack.block_storage.v2.type
|
||||||
|
===============================
|
||||||
|
|
||||||
|
.. automodule:: openstack.block_storage.v2.type
|
||||||
|
|
||||||
|
The Type Class
|
||||||
|
--------------
|
||||||
|
|
||||||
|
The ``Type`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.block_storage.v2.type.Type
|
||||||
|
:members:
|
||||||
|
|
21
doc/source/users/resources/block_storage/v2/volume.rst
Normal file
21
doc/source/users/resources/block_storage/v2/volume.rst
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
openstack.block_storage.v2.volume
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. automodule:: openstack.block_storage.v2.volume
|
||||||
|
|
||||||
|
The Volume Class
|
||||||
|
----------------
|
||||||
|
|
||||||
|
The ``Volume`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.block_storage.v2.volume.Volume
|
||||||
|
:members:
|
||||||
|
|
||||||
|
The VolumeDetail Class
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
The ``VolumeDetail`` class inherits from
|
||||||
|
:class:`~openstack.block_storage.v2.volume.Volume`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.block_storage.v2.volume.VolumeDetail
|
||||||
|
:members:
|
@ -1,21 +0,0 @@
|
|||||||
openstack.block_store.v2.snapshot
|
|
||||||
=================================
|
|
||||||
|
|
||||||
.. automodule:: openstack.block_store.v2.snapshot
|
|
||||||
|
|
||||||
The Snapshot Class
|
|
||||||
------------------
|
|
||||||
|
|
||||||
The ``Snapshot`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.block_store.v2.snapshot.Snapshot
|
|
||||||
:members:
|
|
||||||
|
|
||||||
The SnapshotDetail Class
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
The ``SnapshotDetail`` class inherits from
|
|
||||||
:class:`~openstack.block_store.v2.snapshot.Snapshot`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.block_store.v2.snapshot.SnapshotDetail
|
|
||||||
:members:
|
|
@ -1,13 +0,0 @@
|
|||||||
openstack.block_store.v2.type
|
|
||||||
=============================
|
|
||||||
|
|
||||||
.. automodule:: openstack.block_store.v2.type
|
|
||||||
|
|
||||||
The Type Class
|
|
||||||
--------------
|
|
||||||
|
|
||||||
The ``Type`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.block_store.v2.type.Type
|
|
||||||
:members:
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
openstack.block_store.v2.volume
|
|
||||||
===============================
|
|
||||||
|
|
||||||
.. automodule:: openstack.block_store.v2.volume
|
|
||||||
|
|
||||||
The Volume Class
|
|
||||||
----------------
|
|
||||||
|
|
||||||
The ``Volume`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.block_store.v2.volume.Volume
|
|
||||||
:members:
|
|
||||||
|
|
||||||
The VolumeDetail Class
|
|
||||||
----------------------
|
|
||||||
|
|
||||||
The ``VolumeDetail`` class inherits from
|
|
||||||
:class:`~openstack.block_store.v2.volume.Volume`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.block_store.v2.volume.VolumeDetail
|
|
||||||
:members:
|
|
@ -1,12 +0,0 @@
|
|||||||
openstack.cluster.v1.action
|
|
||||||
===========================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.action
|
|
||||||
|
|
||||||
The Action Class
|
|
||||||
----------------
|
|
||||||
|
|
||||||
The ``Action`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.action.Action
|
|
||||||
:members:
|
|
@ -1,12 +0,0 @@
|
|||||||
openstack.cluster.v1.build_info
|
|
||||||
===============================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.build_info
|
|
||||||
|
|
||||||
The BuildInfo Class
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
The ``BuildInfo`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.build_info.BuildInfo
|
|
||||||
:members:
|
|
@ -1,12 +0,0 @@
|
|||||||
openstack.cluster.v1.Cluster
|
|
||||||
============================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.cluster
|
|
||||||
|
|
||||||
The Cluster Class
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
The ``Cluster`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.cluster.Cluster
|
|
||||||
:members:
|
|
@ -1,13 +0,0 @@
|
|||||||
openstack.cluster.v1.cluster_policy
|
|
||||||
===================================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.cluster_policy
|
|
||||||
|
|
||||||
The ClusterPolicy Class
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
The ``ClusterPolicy`` class inherits from
|
|
||||||
:class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.cluster_policy.ClusterPolicy
|
|
||||||
:members:
|
|
@ -1,12 +0,0 @@
|
|||||||
openstack.cluster.v1.event
|
|
||||||
==========================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.event
|
|
||||||
|
|
||||||
The Event Class
|
|
||||||
---------------
|
|
||||||
|
|
||||||
The ``Event`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.event.Event
|
|
||||||
:members:
|
|
@ -1,12 +0,0 @@
|
|||||||
openstack.cluster.v1.Node
|
|
||||||
=========================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.node
|
|
||||||
|
|
||||||
The Node Class
|
|
||||||
--------------
|
|
||||||
|
|
||||||
The ``Node`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.node.Node
|
|
||||||
:members:
|
|
@ -1,12 +0,0 @@
|
|||||||
openstack.cluster.v1.policy
|
|
||||||
===========================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.policy
|
|
||||||
|
|
||||||
The Policy Class
|
|
||||||
----------------
|
|
||||||
|
|
||||||
The ``Policy`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.policy.Policy
|
|
||||||
:members:
|
|
@ -1,12 +0,0 @@
|
|||||||
openstack.cluster.v1.policy_type
|
|
||||||
================================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.policy_type
|
|
||||||
|
|
||||||
The PolicyType Class
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
The ``PolicyType`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.policy_type.PolicyType
|
|
||||||
:members:
|
|
@ -1,12 +0,0 @@
|
|||||||
openstack.cluster.v1.profile
|
|
||||||
============================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.profile
|
|
||||||
|
|
||||||
The Profile Class
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
The ``Profile`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.profile.Profile
|
|
||||||
:members:
|
|
@ -1,12 +0,0 @@
|
|||||||
openstack.cluster.v1.profile_type
|
|
||||||
=================================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.profile_type
|
|
||||||
|
|
||||||
The ProfileType Class
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
The ``ProfileType`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.profile_type.ProfileType
|
|
||||||
:members:
|
|
@ -1,12 +0,0 @@
|
|||||||
openstack.cluster.v1.receiver
|
|
||||||
=============================
|
|
||||||
|
|
||||||
.. automodule:: openstack.cluster.v1.receiver
|
|
||||||
|
|
||||||
The Receiver Class
|
|
||||||
------------------
|
|
||||||
|
|
||||||
The ``Receiver`` class inherits from :class:`~openstack.resource.Resource`.
|
|
||||||
|
|
||||||
.. autoclass:: openstack.cluster.v1.receiver.Receiver
|
|
||||||
:members:
|
|
12
doc/source/users/resources/clustering/v1/action.rst
Normal file
12
doc/source/users/resources/clustering/v1/action.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
openstack.clustering.v1.action
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.action
|
||||||
|
|
||||||
|
The Action Class
|
||||||
|
----------------
|
||||||
|
|
||||||
|
The ``Action`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.action.Action
|
||||||
|
:members:
|
12
doc/source/users/resources/clustering/v1/build_info.rst
Normal file
12
doc/source/users/resources/clustering/v1/build_info.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
openstack.clustering.v1.build_info
|
||||||
|
==================================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.build_info
|
||||||
|
|
||||||
|
The BuildInfo Class
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
The ``BuildInfo`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.build_info.BuildInfo
|
||||||
|
:members:
|
12
doc/source/users/resources/clustering/v1/cluster.rst
Normal file
12
doc/source/users/resources/clustering/v1/cluster.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
openstack.clustering.v1.Cluster
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.cluster
|
||||||
|
|
||||||
|
The Cluster Class
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
The ``Cluster`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.cluster.Cluster
|
||||||
|
:members:
|
13
doc/source/users/resources/clustering/v1/cluster_policy.rst
Normal file
13
doc/source/users/resources/clustering/v1/cluster_policy.rst
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
openstack.clustering.v1.cluster_policy
|
||||||
|
======================================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.cluster_policy
|
||||||
|
|
||||||
|
The ClusterPolicy Class
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
The ``ClusterPolicy`` class inherits from
|
||||||
|
:class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.cluster_policy.ClusterPolicy
|
||||||
|
:members:
|
12
doc/source/users/resources/clustering/v1/event.rst
Normal file
12
doc/source/users/resources/clustering/v1/event.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
openstack.clustering.v1.event
|
||||||
|
=============================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.event
|
||||||
|
|
||||||
|
The Event Class
|
||||||
|
---------------
|
||||||
|
|
||||||
|
The ``Event`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.event.Event
|
||||||
|
:members:
|
12
doc/source/users/resources/clustering/v1/node.rst
Normal file
12
doc/source/users/resources/clustering/v1/node.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
openstack.clustering.v1.Node
|
||||||
|
============================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.node
|
||||||
|
|
||||||
|
The Node Class
|
||||||
|
--------------
|
||||||
|
|
||||||
|
The ``Node`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.node.Node
|
||||||
|
:members:
|
12
doc/source/users/resources/clustering/v1/policy.rst
Normal file
12
doc/source/users/resources/clustering/v1/policy.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
openstack.clustering.v1.policy
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.policy
|
||||||
|
|
||||||
|
The Policy Class
|
||||||
|
----------------
|
||||||
|
|
||||||
|
The ``Policy`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.policy.Policy
|
||||||
|
:members:
|
12
doc/source/users/resources/clustering/v1/policy_type.rst
Normal file
12
doc/source/users/resources/clustering/v1/policy_type.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
openstack.clustering.v1.policy_type
|
||||||
|
===================================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.policy_type
|
||||||
|
|
||||||
|
The PolicyType Class
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
The ``PolicyType`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.policy_type.PolicyType
|
||||||
|
:members:
|
12
doc/source/users/resources/clustering/v1/profile.rst
Normal file
12
doc/source/users/resources/clustering/v1/profile.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
openstack.clustering.v1.profile
|
||||||
|
===============================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.profile
|
||||||
|
|
||||||
|
The Profile Class
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
The ``Profile`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.profile.Profile
|
||||||
|
:members:
|
12
doc/source/users/resources/clustering/v1/profile_type.rst
Normal file
12
doc/source/users/resources/clustering/v1/profile_type.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
openstack.clustering.v1.profile_type
|
||||||
|
====================================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.profile_type
|
||||||
|
|
||||||
|
The ProfileType Class
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
The ``ProfileType`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.profile_type.ProfileType
|
||||||
|
:members:
|
12
doc/source/users/resources/clustering/v1/receiver.rst
Normal file
12
doc/source/users/resources/clustering/v1/receiver.rst
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
openstack.clustering.v1.receiver
|
||||||
|
================================
|
||||||
|
|
||||||
|
.. automodule:: openstack.clustering.v1.receiver
|
||||||
|
|
||||||
|
The Receiver Class
|
||||||
|
------------------
|
||||||
|
|
||||||
|
The ``Receiver`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
|
.. autoclass:: openstack.clustering.v1.receiver.Receiver
|
||||||
|
:members:
|
@ -1,4 +1,4 @@
|
|||||||
Telemetry Resources
|
Meter Resources
|
||||||
===================
|
===================
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
@ -1,12 +1,12 @@
|
|||||||
openstack.telemetry.v2.capability
|
openstack.meter.v2.capability
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
.. automodule:: openstack.telemetry.v2.capability
|
.. automodule:: openstack.meter.v2.capability
|
||||||
|
|
||||||
The Capability Class
|
The Capability Class
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
The ``Capability`` class inherits from :class:`~openstack.resource.Resource`.
|
The ``Capability`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.v2.capability.Capability
|
.. autoclass:: openstack.meter.v2.capability.Capability
|
||||||
:members:
|
:members:
|
@ -1,12 +1,12 @@
|
|||||||
openstack.telemetry.v2.meter
|
openstack.meter.v2.meter
|
||||||
============================
|
============================
|
||||||
|
|
||||||
.. automodule:: openstack.telemetry.v2.meter
|
.. automodule:: openstack.meter.v2.meter
|
||||||
|
|
||||||
The Meter Class
|
The Meter Class
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
The ``Meter`` class inherits from :class:`~openstack.resource.Resource`.
|
The ``Meter`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.v2.meter.Meter
|
.. autoclass:: openstack.meter.v2.meter.Meter
|
||||||
:members:
|
:members:
|
@ -1,12 +1,12 @@
|
|||||||
openstack.telemetry.v2.resource
|
openstack.meter.v2.resource
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
.. automodule:: openstack.telemetry.v2.resource
|
.. automodule:: openstack.meter.v2.resource
|
||||||
|
|
||||||
The Resource Class
|
The Resource Class
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
The ``Resource`` class inherits from :class:`~openstack.resource.Resource`.
|
The ``Resource`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.v2.resource.Resource
|
.. autoclass:: openstack.meter.v2.resource.Resource
|
||||||
:members:
|
:members:
|
@ -1,12 +1,12 @@
|
|||||||
openstack.telemetry.v2.sample
|
openstack.meter.v2.sample
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
.. automodule:: openstack.telemetry.v2.sample
|
.. automodule:: openstack.meter.v2.sample
|
||||||
|
|
||||||
The Sample Class
|
The Sample Class
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
The ``Sample`` class inherits from :class:`~openstack.resource.Resource`.
|
The ``Sample`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.v2.sample.Sample
|
.. autoclass:: openstack.meter.v2.sample.Sample
|
||||||
:members:
|
:members:
|
@ -1,12 +1,12 @@
|
|||||||
openstack.telemetry.v2.statistics
|
openstack.meter.v2.statistics
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
.. automodule:: openstack.telemetry.v2.statistics
|
.. automodule:: openstack.meter.v2.statistics
|
||||||
|
|
||||||
The Statistics Class
|
The Statistics Class
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
The ``Statistics`` class inherits from :class:`~openstack.resource.Resource`.
|
The ``Statistics`` class inherits from :class:`~openstack.resource.Resource`.
|
||||||
|
|
||||||
.. autoclass:: openstack.telemetry.v2.statistics.Statistics
|
.. autoclass:: openstack.meter.v2.statistics.Statistics
|
||||||
:members:
|
:members:
|
@ -1,10 +0,0 @@
|
|||||||
Session
|
|
||||||
=======
|
|
||||||
|
|
||||||
.. automodule:: openstack.session
|
|
||||||
|
|
||||||
Session Object
|
|
||||||
--------------
|
|
||||||
|
|
||||||
.. autoclass:: openstack.session.Session
|
|
||||||
:members:
|
|
@ -14,7 +14,7 @@
|
|||||||
Managing profile types in the Cluster service.
|
Managing profile types in the Cluster service.
|
||||||
|
|
||||||
For a full guide see
|
For a full guide see
|
||||||
https://developer.openstack.org/sdks/python/openstacksdk/users/guides/cluster.html
|
https://developer.openstack.org/sdks/python/openstacksdk/users/guides/clustering.html
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -19,9 +19,8 @@ For a full guide see TODO(etoews):link to docs on developer.openstack.org
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import openstack
|
||||||
from openstack import config as occ
|
from openstack import config as occ
|
||||||
from openstack import connection
|
|
||||||
from openstack import profile
|
|
||||||
from openstack import utils
|
from openstack import utils
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -49,7 +48,7 @@ def _get_resource_value(resource_key, default):
|
|||||||
return default
|
return default
|
||||||
|
|
||||||
config = occ.OpenStackConfig()
|
config = occ.OpenStackConfig()
|
||||||
cloud = config.get_one_cloud(TEST_CLOUD)
|
cloud = openstack.connect(cloud=TEST_CLOUD)
|
||||||
|
|
||||||
SERVER_NAME = 'openstacksdk-example'
|
SERVER_NAME = 'openstacksdk-example'
|
||||||
IMAGE_NAME = _get_resource_value('image_name', 'cirros-0.3.5-x86_64-disk')
|
IMAGE_NAME = _get_resource_value('image_name', 'cirros-0.3.5-x86_64-disk')
|
||||||
@ -66,10 +65,7 @@ EXAMPLE_IMAGE_NAME = 'openstacksdk-example-public-image'
|
|||||||
|
|
||||||
|
|
||||||
def create_connection_from_config():
|
def create_connection_from_config():
|
||||||
opts = Opts(cloud_name=TEST_CLOUD)
|
return openstack.connect(cloud=TEST_CLOUD)
|
||||||
config = occ.OpenStackConfig()
|
|
||||||
cloud = config.get_one_cloud(opts.cloud)
|
|
||||||
return connection.from_config(cloud_config=cloud, options=opts)
|
|
||||||
|
|
||||||
|
|
||||||
def create_connection_from_args():
|
def create_connection_from_args():
|
||||||
@ -77,18 +73,17 @@ def create_connection_from_args():
|
|||||||
config = occ.OpenStackConfig()
|
config = occ.OpenStackConfig()
|
||||||
config.register_argparse_arguments(parser, sys.argv[1:])
|
config.register_argparse_arguments(parser, sys.argv[1:])
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
return connection.from_config(options=args)
|
return openstack.connect(config=config.get_one_cloud(argparse=args))
|
||||||
|
|
||||||
|
|
||||||
def create_connection(auth_url, region, project_name, username, password):
|
def create_connection(auth_url, region, project_name, username, password):
|
||||||
prof = profile.Profile()
|
|
||||||
prof.set_region(profile.Profile.ALL, region)
|
|
||||||
|
|
||||||
return connection.Connection(
|
return openstack.connect(
|
||||||
profile=prof,
|
|
||||||
user_agent='examples',
|
|
||||||
auth_url=auth_url,
|
auth_url=auth_url,
|
||||||
project_name=project_name,
|
project_name=project_name,
|
||||||
username=username,
|
username=username,
|
||||||
password=password
|
password=password,
|
||||||
|
region_name=region,
|
||||||
|
app_name='examples',
|
||||||
|
app_version='1.0',
|
||||||
)
|
)
|
||||||
|
@ -23,6 +23,7 @@ from openstack import _log
|
|||||||
from openstack.cloud.exc import * # noqa
|
from openstack.cloud.exc import * # noqa
|
||||||
from openstack.cloud.openstackcloud import OpenStackCloud
|
from openstack.cloud.openstackcloud import OpenStackCloud
|
||||||
from openstack.cloud.operatorcloud import OperatorCloud
|
from openstack.cloud.operatorcloud import OperatorCloud
|
||||||
|
import openstack.connection
|
||||||
|
|
||||||
__version__ = pbr.version.VersionInfo('openstacksdk').version_string()
|
__version__ = pbr.version.VersionInfo('openstacksdk').version_string()
|
||||||
|
|
||||||
@ -130,3 +131,8 @@ def operator_cloud(
|
|||||||
raise OpenStackCloudException(
|
raise OpenStackCloudException(
|
||||||
"Invalid cloud configuration: {exc}".format(exc=str(e)))
|
"Invalid cloud configuration: {exc}".format(exc=str(e)))
|
||||||
return OperatorCloud(cloud_config=cloud_config, strict=strict)
|
return OperatorCloud(cloud_config=cloud_config, strict=strict)
|
||||||
|
|
||||||
|
|
||||||
|
def connect(self, *args, **kwargs):
|
||||||
|
"""Create a `openstack.connection.Connection`."""
|
||||||
|
return openstack.connection.Connection(*args, **kwargs)
|
||||||
|
@ -13,12 +13,12 @@
|
|||||||
from openstack import service_filter
|
from openstack import service_filter
|
||||||
|
|
||||||
|
|
||||||
class BareMetalService(service_filter.ServiceFilter):
|
class BaremetalService(service_filter.ServiceFilter):
|
||||||
"""The bare metal service."""
|
"""The bare metal service."""
|
||||||
|
|
||||||
valid_versions = [service_filter.ValidVersion('v1')]
|
valid_versions = [service_filter.ValidVersion('v1')]
|
||||||
|
|
||||||
def __init__(self, version=None):
|
def __init__(self, version=None):
|
||||||
"""Create a bare metal service."""
|
"""Create a bare metal service."""
|
||||||
super(BareMetalService, self).__init__(service_type='baremetal',
|
super(BaremetalService, self).__init__(service_type='baremetal',
|
||||||
version=version)
|
version=version)
|
@ -10,11 +10,11 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.bare_metal.v1 import chassis as _chassis
|
from openstack.baremetal.v1 import chassis as _chassis
|
||||||
from openstack.bare_metal.v1 import driver as _driver
|
from openstack.baremetal.v1 import driver as _driver
|
||||||
from openstack.bare_metal.v1 import node as _node
|
from openstack.baremetal.v1 import node as _node
|
||||||
from openstack.bare_metal.v1 import port as _port
|
from openstack.baremetal.v1 import port as _port
|
||||||
from openstack.bare_metal.v1 import port_group as _portgroup
|
from openstack.baremetal.v1 import port_group as _portgroup
|
||||||
from openstack import proxy2
|
from openstack import proxy2
|
||||||
from openstack import utils
|
from openstack import utils
|
||||||
|
|
||||||
@ -61,11 +61,11 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Create a new chassis from attributes.
|
"""Create a new chassis from attributes.
|
||||||
|
|
||||||
:param dict attrs: Keyword arguments that will be used to create a
|
:param dict attrs: Keyword arguments that will be used to create a
|
||||||
:class:`~openstack.bare_metal.v1.chassis.Chassis`, it comprised
|
:class:`~openstack.baremetal.v1.chassis.Chassis`, it comprised
|
||||||
of the properties on the ``Chassis`` class.
|
of the properties on the ``Chassis`` class.
|
||||||
|
|
||||||
:returns: The results of chassis creation.
|
:returns: The results of chassis creation.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.chassis.Chassis`.
|
:rtype: :class:`~openstack.baremetal.v1.chassis.Chassis`.
|
||||||
"""
|
"""
|
||||||
return self._create(_chassis.Chassis, **attrs)
|
return self._create(_chassis.Chassis, **attrs)
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||||
when the chassis does not exist. When set to `True``, None will
|
when the chassis does not exist. When set to `True``, None will
|
||||||
be returned when attempting to find a nonexistent chassis.
|
be returned when attempting to find a nonexistent chassis.
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.chassis.Chassis` object
|
:returns: One :class:`~openstack.baremetal.v1.chassis.Chassis` object
|
||||||
or None.
|
or None.
|
||||||
"""
|
"""
|
||||||
return self._find(_chassis.Chassis, name_or_id,
|
return self._find(_chassis.Chassis, name_or_id,
|
||||||
@ -87,9 +87,9 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Get a specific chassis.
|
"""Get a specific chassis.
|
||||||
|
|
||||||
:param chassis: The value can be the name or ID of a chassis or a
|
:param chassis: The value can be the name or ID of a chassis or a
|
||||||
:class:`~openstack.bare_metal.v1.chassis.Chassis` instance.
|
:class:`~openstack.baremetal.v1.chassis.Chassis` instance.
|
||||||
|
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.chassis.Chassis`
|
:returns: One :class:`~openstack.baremetal.v1.chassis.Chassis`
|
||||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||||
chassis matching the name or ID could be found.
|
chassis matching the name or ID could be found.
|
||||||
"""
|
"""
|
||||||
@ -99,12 +99,12 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Update a chassis.
|
"""Update a chassis.
|
||||||
|
|
||||||
:param chassis: Either the name or the ID of a chassis, or an instance
|
:param chassis: Either the name or the ID of a chassis, or an instance
|
||||||
of :class:`~openstack.bare_metal.v1.chassis.Chassis`.
|
of :class:`~openstack.baremetal.v1.chassis.Chassis`.
|
||||||
:param dict attrs: The attributes to update on the chassis represented
|
:param dict attrs: The attributes to update on the chassis represented
|
||||||
by the ``chassis`` parameter.
|
by the ``chassis`` parameter.
|
||||||
|
|
||||||
:returns: The updated chassis.
|
:returns: The updated chassis.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.chassis.Chassis`
|
:rtype: :class:`~openstack.baremetal.v1.chassis.Chassis`
|
||||||
"""
|
"""
|
||||||
return self._update(_chassis.Chassis, chassis, **attrs)
|
return self._update(_chassis.Chassis, chassis, **attrs)
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Delete a chassis.
|
"""Delete a chassis.
|
||||||
|
|
||||||
:param chassis: The value can be either the name or ID of a chassis or
|
:param chassis: The value can be either the name or ID of a chassis or
|
||||||
a :class:`~openstack.bare_metal.v1.chassis.Chassis` instance.
|
a :class:`~openstack.baremetal.v1.chassis.Chassis` instance.
|
||||||
:param bool ignore_missing: When set to ``False``, an exception
|
:param bool ignore_missing: When set to ``False``, an exception
|
||||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||||
when the chassis could not be found. When set to ``True``, no
|
when the chassis could not be found. When set to ``True``, no
|
||||||
@ -120,7 +120,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
chassis.
|
chassis.
|
||||||
|
|
||||||
:returns: The instance of the chassis which was deleted.
|
:returns: The instance of the chassis which was deleted.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.chassis.Chassis`.
|
:rtype: :class:`~openstack.baremetal.v1.chassis.Chassis`.
|
||||||
"""
|
"""
|
||||||
return self._delete(_chassis.Chassis, chassis,
|
return self._delete(_chassis.Chassis, chassis,
|
||||||
ignore_missing=ignore_missing)
|
ignore_missing=ignore_missing)
|
||||||
@ -136,9 +136,9 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Get a specific driver.
|
"""Get a specific driver.
|
||||||
|
|
||||||
:param driver: The value can be the name of a driver or a
|
:param driver: The value can be the name of a driver or a
|
||||||
:class:`~openstack.bare_metal.v1.driver.Driver` instance.
|
:class:`~openstack.baremetal.v1.driver.Driver` instance.
|
||||||
|
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.driver.Driver`
|
:returns: One :class:`~openstack.baremetal.v1.driver.Driver`
|
||||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||||
driver matching the name could be found.
|
driver matching the name could be found.
|
||||||
"""
|
"""
|
||||||
@ -193,11 +193,11 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Create a new node from attributes.
|
"""Create a new node from attributes.
|
||||||
|
|
||||||
:param dict attrs: Keyword arguments that will be used to create a
|
:param dict attrs: Keyword arguments that will be used to create a
|
||||||
:class:`~openstack.bare_metal.v1.node.Node`, it comprised
|
:class:`~openstack.baremetal.v1.node.Node`, it comprised
|
||||||
of the properties on the ``Node`` class.
|
of the properties on the ``Node`` class.
|
||||||
|
|
||||||
:returns: The results of node creation.
|
:returns: The results of node creation.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.node.Node`.
|
:rtype: :class:`~openstack.baremetal.v1.node.Node`.
|
||||||
"""
|
"""
|
||||||
return self._create(_node.Node, **attrs)
|
return self._create(_node.Node, **attrs)
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||||
when the node does not exist. When set to `True``, None will
|
when the node does not exist. When set to `True``, None will
|
||||||
be returned when attempting to find a nonexistent node.
|
be returned when attempting to find a nonexistent node.
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.node.Node` object
|
:returns: One :class:`~openstack.baremetal.v1.node.Node` object
|
||||||
or None.
|
or None.
|
||||||
"""
|
"""
|
||||||
return self._find(_node.Node, name_or_id,
|
return self._find(_node.Node, name_or_id,
|
||||||
@ -219,9 +219,9 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Get a specific node.
|
"""Get a specific node.
|
||||||
|
|
||||||
:param node: The value can be the name or ID of a chassis or a
|
:param node: The value can be the name or ID of a chassis or a
|
||||||
:class:`~openstack.bare_metal.v1.node.Node` instance.
|
:class:`~openstack.baremetal.v1.node.Node` instance.
|
||||||
|
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.node.Node`
|
:returns: One :class:`~openstack.baremetal.v1.node.Node`
|
||||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||||
node matching the name or ID could be found.
|
node matching the name or ID could be found.
|
||||||
"""
|
"""
|
||||||
@ -231,12 +231,12 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Update a node.
|
"""Update a node.
|
||||||
|
|
||||||
:param chassis: Either the name or the ID of a node or an instance
|
:param chassis: Either the name or the ID of a node or an instance
|
||||||
of :class:`~openstack.bare_metal.v1.node.Node`.
|
of :class:`~openstack.baremetal.v1.node.Node`.
|
||||||
:param dict attrs: The attributes to update on the node represented
|
:param dict attrs: The attributes to update on the node represented
|
||||||
by the ``node`` parameter.
|
by the ``node`` parameter.
|
||||||
|
|
||||||
:returns: The updated node.
|
:returns: The updated node.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.node.Node`
|
:rtype: :class:`~openstack.baremetal.v1.node.Node`
|
||||||
"""
|
"""
|
||||||
return self._update(_node.Node, node, **attrs)
|
return self._update(_node.Node, node, **attrs)
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Delete a node.
|
"""Delete a node.
|
||||||
|
|
||||||
:param node: The value can be either the name or ID of a node or
|
:param node: The value can be either the name or ID of a node or
|
||||||
a :class:`~openstack.bare_metal.v1.node.Node` instance.
|
a :class:`~openstack.baremetal.v1.node.Node` instance.
|
||||||
:param bool ignore_missing: When set to ``False``, an exception
|
:param bool ignore_missing: When set to ``False``, an exception
|
||||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||||
when the node could not be found. When set to ``True``, no
|
when the node could not be found. When set to ``True``, no
|
||||||
@ -252,7 +252,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
node.
|
node.
|
||||||
|
|
||||||
:returns: The instance of the node which was deleted.
|
:returns: The instance of the node which was deleted.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.node.Node`.
|
:rtype: :class:`~openstack.baremetal.v1.node.Node`.
|
||||||
"""
|
"""
|
||||||
return self._delete(_node.Node, node, ignore_missing=ignore_missing)
|
return self._delete(_node.Node, node, ignore_missing=ignore_missing)
|
||||||
|
|
||||||
@ -306,11 +306,11 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Create a new port from attributes.
|
"""Create a new port from attributes.
|
||||||
|
|
||||||
:param dict attrs: Keyword arguments that will be used to create a
|
:param dict attrs: Keyword arguments that will be used to create a
|
||||||
:class:`~openstack.bare_metal.v1.port.Port`, it comprises of the
|
:class:`~openstack.baremetal.v1.port.Port`, it comprises of the
|
||||||
properties on the ``Port`` class.
|
properties on the ``Port`` class.
|
||||||
|
|
||||||
:returns: The results of port creation.
|
:returns: The results of port creation.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.port.Port`.
|
:rtype: :class:`~openstack.baremetal.v1.port.Port`.
|
||||||
"""
|
"""
|
||||||
return self._create(_port.Port, **attrs)
|
return self._create(_port.Port, **attrs)
|
||||||
|
|
||||||
@ -322,7 +322,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||||
when the port does not exist. When set to `True``, None will
|
when the port does not exist. When set to `True``, None will
|
||||||
be returned when attempting to find a nonexistent port.
|
be returned when attempting to find a nonexistent port.
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.port.Port` object
|
:returns: One :class:`~openstack.baremetal.v1.port.Port` object
|
||||||
or None.
|
or None.
|
||||||
"""
|
"""
|
||||||
return self._find(_port.Port, name_or_id,
|
return self._find(_port.Port, name_or_id,
|
||||||
@ -332,7 +332,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Get a specific port.
|
"""Get a specific port.
|
||||||
|
|
||||||
:param port: The value can be the name or ID of a chassis or a
|
:param port: The value can be the name or ID of a chassis or a
|
||||||
:class:`~openstack.bare_metal.v1.port.Port` instance.
|
:class:`~openstack.baremetal.v1.port.Port` instance.
|
||||||
:param dict query: Optional query parameters to be sent to restrict
|
:param dict query: Optional query parameters to be sent to restrict
|
||||||
the port properties returned. Available parameters include:
|
the port properties returned. Available parameters include:
|
||||||
|
|
||||||
@ -340,7 +340,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
in the response. This may lead to some performance gain
|
in the response. This may lead to some performance gain
|
||||||
because other fields of the resource are not refreshed.
|
because other fields of the resource are not refreshed.
|
||||||
|
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.port.Port`
|
:returns: One :class:`~openstack.baremetal.v1.port.Port`
|
||||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||||
port matching the name or ID could be found.
|
port matching the name or ID could be found.
|
||||||
"""
|
"""
|
||||||
@ -350,12 +350,12 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Update a port.
|
"""Update a port.
|
||||||
|
|
||||||
:param chassis: Either the name or the ID of a port or an instance
|
:param chassis: Either the name or the ID of a port or an instance
|
||||||
of :class:`~openstack.bare_metal.v1.port.Port`.
|
of :class:`~openstack.baremetal.v1.port.Port`.
|
||||||
:param dict attrs: The attributes to update on the port represented
|
:param dict attrs: The attributes to update on the port represented
|
||||||
by the ``port`` parameter.
|
by the ``port`` parameter.
|
||||||
|
|
||||||
:returns: The updated port.
|
:returns: The updated port.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.port.Port`
|
:rtype: :class:`~openstack.baremetal.v1.port.Port`
|
||||||
"""
|
"""
|
||||||
return self._update(_port.Port, port, **attrs)
|
return self._update(_port.Port, port, **attrs)
|
||||||
|
|
||||||
@ -363,7 +363,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Delete a port.
|
"""Delete a port.
|
||||||
|
|
||||||
:param port: The value can be either the name or ID of a port or
|
:param port: The value can be either the name or ID of a port or
|
||||||
a :class:`~openstack.bare_metal.v1.port.Port` instance.
|
a :class:`~openstack.baremetal.v1.port.Port` instance.
|
||||||
:param bool ignore_missing: When set to ``False``, an exception
|
:param bool ignore_missing: When set to ``False``, an exception
|
||||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||||
when the port could not be found. When set to ``True``, no
|
when the port could not be found. When set to ``True``, no
|
||||||
@ -371,7 +371,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
port.
|
port.
|
||||||
|
|
||||||
:returns: The instance of the port which was deleted.
|
:returns: The instance of the port which was deleted.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.port.Port`.
|
:rtype: :class:`~openstack.baremetal.v1.port.Port`.
|
||||||
"""
|
"""
|
||||||
return self._delete(_port.Port, port, ignore_missing=ignore_missing)
|
return self._delete(_port.Port, port, ignore_missing=ignore_missing)
|
||||||
|
|
||||||
@ -462,11 +462,11 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Create a new port group from attributes.
|
"""Create a new port group from attributes.
|
||||||
|
|
||||||
:param dict attrs: Keyword arguments that will be used to create a
|
:param dict attrs: Keyword arguments that will be used to create a
|
||||||
:class:`~openstack.bare_metal.v1.port_group.PortGroup`, it
|
:class:`~openstack.baremetal.v1.port_group.PortGroup`, it
|
||||||
comprises of the properties on the ``PortGroup`` class.
|
comprises of the properties on the ``PortGroup`` class.
|
||||||
|
|
||||||
:returns: The results of portgroup creation.
|
:returns: The results of portgroup creation.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.port_group.PortGroup`.
|
:rtype: :class:`~openstack.baremetal.v1.port_group.PortGroup`.
|
||||||
"""
|
"""
|
||||||
return self.create_port_group(**attrs)
|
return self.create_port_group(**attrs)
|
||||||
|
|
||||||
@ -474,11 +474,11 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Create a new portgroup from attributes.
|
"""Create a new portgroup from attributes.
|
||||||
|
|
||||||
:param dict attrs: Keyword arguments that will be used to create a
|
:param dict attrs: Keyword arguments that will be used to create a
|
||||||
:class:`~openstack.bare_metal.v1.port_group.PortGroup`, it
|
:class:`~openstack.baremetal.v1.port_group.PortGroup`, it
|
||||||
comprises of the properties on the ``PortGroup`` class.
|
comprises of the properties on the ``PortGroup`` class.
|
||||||
|
|
||||||
:returns: The results of portgroup creation.
|
:returns: The results of portgroup creation.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.port_group.PortGroup`.
|
:rtype: :class:`~openstack.baremetal.v1.port_group.PortGroup`.
|
||||||
"""
|
"""
|
||||||
return self._create(_portgroup.PortGroup, **attrs)
|
return self._create(_portgroup.PortGroup, **attrs)
|
||||||
|
|
||||||
@ -492,7 +492,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||||
when the port group does not exist. When set to `True``, None will
|
when the port group does not exist. When set to `True``, None will
|
||||||
be returned when attempting to find a nonexistent port group.
|
be returned when attempting to find a nonexistent port group.
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.port_group.PortGroup`
|
:returns: One :class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||||
object or None.
|
object or None.
|
||||||
"""
|
"""
|
||||||
return self.find_port_group(name_or_id, ignore_missing=ignore_missing)
|
return self.find_port_group(name_or_id, ignore_missing=ignore_missing)
|
||||||
@ -505,7 +505,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||||
when the port group does not exist. When set to `True``, None will
|
when the port group does not exist. When set to `True``, None will
|
||||||
be returned when attempting to find a nonexistent port group.
|
be returned when attempting to find a nonexistent port group.
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.port_group.PortGroup`
|
:returns: One :class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||||
object or None.
|
object or None.
|
||||||
"""
|
"""
|
||||||
return self._find(_portgroup.PortGroup, name_or_id,
|
return self._find(_portgroup.PortGroup, name_or_id,
|
||||||
@ -517,7 +517,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Get a specific port group.
|
"""Get a specific port group.
|
||||||
|
|
||||||
:param portgroup: The value can be the name or ID of a chassis or a
|
:param portgroup: The value can be the name or ID of a chassis or a
|
||||||
:class:`~openstack.bare_metal.v1.port_group.PortGroup` instance.
|
:class:`~openstack.baremetal.v1.port_group.PortGroup` instance.
|
||||||
:param dict query: Optional query parameters to be sent to restrict
|
:param dict query: Optional query parameters to be sent to restrict
|
||||||
the portgroup properties returned. Available parameters include:
|
the portgroup properties returned. Available parameters include:
|
||||||
|
|
||||||
@ -525,7 +525,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
in the response. This may lead to some performance gain
|
in the response. This may lead to some performance gain
|
||||||
because other fields of the resource are not refreshed.
|
because other fields of the resource are not refreshed.
|
||||||
|
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.port_group.PortGroup`
|
:returns: One :class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||||
port group matching the name or ID could be found.
|
port group matching the name or ID could be found.
|
||||||
"""
|
"""
|
||||||
@ -535,7 +535,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Get a specific port group.
|
"""Get a specific port group.
|
||||||
|
|
||||||
:param port_group: The value can be the name or ID of a chassis or a
|
:param port_group: The value can be the name or ID of a chassis or a
|
||||||
:class:`~openstack.bare_metal.v1.port_group.PortGroup` instance.
|
:class:`~openstack.baremetal.v1.port_group.PortGroup` instance.
|
||||||
:param dict query: Optional query parameters to be sent to restrict
|
:param dict query: Optional query parameters to be sent to restrict
|
||||||
the port group properties returned. Available parameters include:
|
the port group properties returned. Available parameters include:
|
||||||
|
|
||||||
@ -543,7 +543,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
in the response. This may lead to some performance gain
|
in the response. This may lead to some performance gain
|
||||||
because other fields of the resource are not refreshed.
|
because other fields of the resource are not refreshed.
|
||||||
|
|
||||||
:returns: One :class:`~openstack.bare_metal.v1.port_group.PortGroup`
|
:returns: One :class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||||
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
:raises: :class:`~openstack.exceptions.ResourceNotFound` when no
|
||||||
port group matching the name or ID could be found.
|
port group matching the name or ID could be found.
|
||||||
"""
|
"""
|
||||||
@ -556,12 +556,12 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
|
|
||||||
:param chassis: Either the name or the ID of a port group or
|
:param chassis: Either the name or the ID of a port group or
|
||||||
an instance of
|
an instance of
|
||||||
:class:`~openstack.bare_metal.v1.port_group.PortGroup`.
|
:class:`~openstack.baremetal.v1.port_group.PortGroup`.
|
||||||
:param dict attrs: The attributes to update on the port group
|
:param dict attrs: The attributes to update on the port group
|
||||||
represented by the ``portgroup`` parameter.
|
represented by the ``portgroup`` parameter.
|
||||||
|
|
||||||
:returns: The updated port group.
|
:returns: The updated port group.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.port_group.PortGroup`
|
:rtype: :class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||||
"""
|
"""
|
||||||
return self.update_port_group(portgroup, **attrs)
|
return self.update_port_group(portgroup, **attrs)
|
||||||
|
|
||||||
@ -570,12 +570,12 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
|
|
||||||
:param chassis: Either the name or the ID of a port group or
|
:param chassis: Either the name or the ID of a port group or
|
||||||
an instance of
|
an instance of
|
||||||
:class:`~openstack.bare_metal.v1.port_group.PortGroup`.
|
:class:`~openstack.baremetal.v1.port_group.PortGroup`.
|
||||||
:param dict attrs: The attributes to update on the port group
|
:param dict attrs: The attributes to update on the port group
|
||||||
represented by the ``port_group`` parameter.
|
represented by the ``port_group`` parameter.
|
||||||
|
|
||||||
:returns: The updated port group.
|
:returns: The updated port group.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.port_group.PortGroup`
|
:rtype: :class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||||
"""
|
"""
|
||||||
return self._update(_portgroup.PortGroup, port_group, **attrs)
|
return self._update(_portgroup.PortGroup, port_group, **attrs)
|
||||||
|
|
||||||
@ -586,7 +586,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
|
|
||||||
:param portgroup: The value can be either the name or ID of a port
|
:param portgroup: The value can be either the name or ID of a port
|
||||||
group or a
|
group or a
|
||||||
:class:`~openstack.bare_metal.v1.port_group.PortGroup`
|
:class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||||
instance.
|
instance.
|
||||||
:param bool ignore_missing: When set to ``False``, an exception
|
:param bool ignore_missing: When set to ``False``, an exception
|
||||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||||
@ -595,7 +595,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
port group.
|
port group.
|
||||||
|
|
||||||
:returns: The instance of the port group which was deleted.
|
:returns: The instance of the port group which was deleted.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.port_group.PortGroup`.
|
:rtype: :class:`~openstack.baremetal.v1.port_group.PortGroup`.
|
||||||
"""
|
"""
|
||||||
return self.delete_port_group(portgroup, ignore_missing=ignore_missing)
|
return self.delete_port_group(portgroup, ignore_missing=ignore_missing)
|
||||||
|
|
||||||
@ -604,7 +604,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
|
|
||||||
:param port_group: The value can be either the name or ID of
|
:param port_group: The value can be either the name or ID of
|
||||||
a port group or a
|
a port group or a
|
||||||
:class:`~openstack.bare_metal.v1.port_group.PortGroup`
|
:class:`~openstack.baremetal.v1.port_group.PortGroup`
|
||||||
instance.
|
instance.
|
||||||
:param bool ignore_missing: When set to ``False``, an exception
|
:param bool ignore_missing: When set to ``False``, an exception
|
||||||
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
:class:`~openstack.exceptions.ResourceNotFound` will be raised
|
||||||
@ -613,7 +613,7 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
port group.
|
port group.
|
||||||
|
|
||||||
:returns: The instance of the port group which was deleted.
|
:returns: The instance of the port group which was deleted.
|
||||||
:rtype: :class:`~openstack.bare_metal.v1.port_group.PortGroup`.
|
:rtype: :class:`~openstack.baremetal.v1.port_group.PortGroup`.
|
||||||
"""
|
"""
|
||||||
return self._delete(_portgroup.PortGroup, port_group,
|
return self._delete(_portgroup.PortGroup, port_group,
|
||||||
ignore_missing=ignore_missing)
|
ignore_missing=ignore_missing)
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.bare_metal import bare_metal_service
|
from openstack.baremetal import baremetal_service
|
||||||
from openstack import resource2 as resource
|
from openstack import resource2 as resource
|
||||||
|
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ class Chassis(resource.Resource):
|
|||||||
|
|
||||||
resources_key = 'chassis'
|
resources_key = 'chassis'
|
||||||
base_path = '/chassis'
|
base_path = '/chassis'
|
||||||
service = bare_metal_service.BareMetalService()
|
service = baremetal_service.BaremetalService()
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
allow_create = True
|
allow_create = True
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.bare_metal import bare_metal_service
|
from openstack.baremetal import baremetal_service
|
||||||
from openstack import resource2 as resource
|
from openstack import resource2 as resource
|
||||||
|
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ class Driver(resource.Resource):
|
|||||||
|
|
||||||
resources_key = 'drivers'
|
resources_key = 'drivers'
|
||||||
base_path = '/drivers'
|
base_path = '/drivers'
|
||||||
service = bare_metal_service.BareMetalService()
|
service = baremetal_service.BaremetalService()
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
allow_create = False
|
allow_create = False
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.bare_metal import bare_metal_service
|
from openstack.baremetal import baremetal_service
|
||||||
from openstack import resource2 as resource
|
from openstack import resource2 as resource
|
||||||
|
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ class Node(resource.Resource):
|
|||||||
|
|
||||||
resources_key = 'nodes'
|
resources_key = 'nodes'
|
||||||
base_path = '/nodes'
|
base_path = '/nodes'
|
||||||
service = bare_metal_service.BareMetalService()
|
service = baremetal_service.BaremetalService()
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
allow_create = True
|
allow_create = True
|
||||||
@ -45,7 +45,7 @@ class Node(resource.Resource):
|
|||||||
driver = resource.Body("driver")
|
driver = resource.Body("driver")
|
||||||
#: All the metadata required by the driver to manage this node. List of
|
#: All the metadata required by the driver to manage this node. List of
|
||||||
#: fields varies between drivers, and can be retrieved from the
|
#: fields varies between drivers, and can be retrieved from the
|
||||||
#: :class:`openstack.bare_metal.v1.driver.Driver` resource.
|
#: :class:`openstack.baremetal.v1.driver.Driver` resource.
|
||||||
driver_info = resource.Body("driver_info", type=dict)
|
driver_info = resource.Body("driver_info", type=dict)
|
||||||
#: Internal metadata set and stored by node's driver. This is read-only.
|
#: Internal metadata set and stored by node's driver. This is read-only.
|
||||||
driver_internal_info = resource.Body("driver_internal_info", type=dict)
|
driver_internal_info = resource.Body("driver_internal_info", type=dict)
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.bare_metal import bare_metal_service
|
from openstack.baremetal import baremetal_service
|
||||||
from openstack import resource2 as resource
|
from openstack import resource2 as resource
|
||||||
|
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ class Port(resource.Resource):
|
|||||||
|
|
||||||
resources_key = 'ports'
|
resources_key = 'ports'
|
||||||
base_path = '/ports'
|
base_path = '/ports'
|
||||||
service = bare_metal_service.BareMetalService()
|
service = baremetal_service.BaremetalService()
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
allow_create = True
|
allow_create = True
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.bare_metal import bare_metal_service
|
from openstack.baremetal import baremetal_service
|
||||||
from openstack import resource2 as resource
|
from openstack import resource2 as resource
|
||||||
|
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ class PortGroup(resource.Resource):
|
|||||||
|
|
||||||
resources_key = 'portgroups'
|
resources_key = 'portgroups'
|
||||||
base_path = '/portgroups'
|
base_path = '/portgroups'
|
||||||
service = bare_metal_service.BareMetalService()
|
service = baremetal_service.BaremetalService()
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
allow_create = True
|
allow_create = True
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.bare_metal import bare_metal_service
|
from openstack.baremetal import baremetal_service
|
||||||
from openstack import resource2
|
from openstack import resource2
|
||||||
|
|
||||||
|
|
||||||
@ -18,8 +18,8 @@ class Version(resource2.Resource):
|
|||||||
resource_key = 'version'
|
resource_key = 'version'
|
||||||
resources_key = 'versions'
|
resources_key = 'versions'
|
||||||
base_path = '/'
|
base_path = '/'
|
||||||
service = bare_metal_service.BareMetalService(
|
service = baremetal_service.BaremetalService(
|
||||||
version=bare_metal_service.BareMetalService.UNVERSIONED
|
version=baremetal_service.BaremetalService.UNVERSIONED
|
||||||
)
|
)
|
||||||
|
|
||||||
# Capabilities
|
# Capabilities
|
@ -13,13 +13,12 @@
|
|||||||
from openstack import service_filter
|
from openstack import service_filter
|
||||||
|
|
||||||
|
|
||||||
class BlockStoreService(service_filter.ServiceFilter):
|
class BlockStorageService(service_filter.ServiceFilter):
|
||||||
"""The block store service."""
|
"""The block storage service."""
|
||||||
|
|
||||||
valid_versions = [service_filter.ValidVersion('v2')]
|
valid_versions = [service_filter.ValidVersion('v2')]
|
||||||
|
|
||||||
def __init__(self, version=None):
|
def __init__(self, version=None):
|
||||||
"""Create a block store service."""
|
"""Create a block storage service."""
|
||||||
super(BlockStoreService, self).__init__(service_type='volume',
|
super(BlockStorageService, self).__init__(
|
||||||
version=version,
|
service_type='volume', version=version, requires_project_id=True)
|
||||||
requires_project_id=True)
|
|
@ -10,9 +10,9 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.block_store.v2 import snapshot as _snapshot
|
from openstack.block_storage.v2 import snapshot as _snapshot
|
||||||
from openstack.block_store.v2 import type as _type
|
from openstack.block_storage.v2 import type as _type
|
||||||
from openstack.block_store.v2 import volume as _volume
|
from openstack.block_storage.v2 import volume as _volume
|
||||||
from openstack import proxy2
|
from openstack import proxy2
|
||||||
|
|
||||||
|
|
||||||
@ -35,9 +35,9 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Retrieve a generator of snapshots
|
"""Retrieve a generator of snapshots
|
||||||
|
|
||||||
:param bool details: When set to ``False``
|
:param bool details: When set to ``False``
|
||||||
:class:`~openstack.block_store.v2.snapshot.Snapshot`
|
:class:`~openstack.block_storage.v2.snapshot.Snapshot`
|
||||||
objects will be returned. The default, ``True``, will cause
|
objects will be returned. The default, ``True``, will cause
|
||||||
:class:`~openstack.block_store.v2.snapshot.SnapshotDetail`
|
:class:`~openstack.block_storage.v2.snapshot.SnapshotDetail`
|
||||||
objects to be returned.
|
objects to be returned.
|
||||||
:param kwargs \*\*query: Optional query parameters to be sent to limit
|
:param kwargs \*\*query: Optional query parameters to be sent to limit
|
||||||
the snapshots being returned. Available parameters include:
|
the snapshots being returned. Available parameters include:
|
||||||
@ -144,9 +144,9 @@ class Proxy(proxy2.BaseProxy):
|
|||||||
"""Retrieve a generator of volumes
|
"""Retrieve a generator of volumes
|
||||||
|
|
||||||
:param bool details: When set to ``False``
|
:param bool details: When set to ``False``
|
||||||
:class:`~openstack.block_store.v2.volume.Volume` objects
|
:class:`~openstack.block_storage.v2.volume.Volume` objects
|
||||||
will be returned. The default, ``True``, will cause
|
will be returned. The default, ``True``, will cause
|
||||||
:class:`~openstack.block_store.v2.volume.VolumeDetail`
|
:class:`~openstack.block_storage.v2.volume.VolumeDetail`
|
||||||
objects to be returned.
|
objects to be returned.
|
||||||
:param kwargs \*\*query: Optional query parameters to be sent to limit
|
:param kwargs \*\*query: Optional query parameters to be sent to limit
|
||||||
the volumes being returned. Available parameters include:
|
the volumes being returned. Available parameters include:
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.block_store import block_store_service
|
from openstack.block_storage import block_storage_service
|
||||||
from openstack import format
|
from openstack import format
|
||||||
from openstack import resource2
|
from openstack import resource2
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ class Snapshot(resource2.Resource):
|
|||||||
resource_key = "snapshot"
|
resource_key = "snapshot"
|
||||||
resources_key = "snapshots"
|
resources_key = "snapshots"
|
||||||
base_path = "/snapshots"
|
base_path = "/snapshots"
|
||||||
service = block_store_service.BlockStoreService()
|
service = block_storage_service.BlockStorageService()
|
||||||
|
|
||||||
_query_mapping = resource2.QueryParameters('all_tenants', 'name', 'status',
|
_query_mapping = resource2.QueryParameters('all_tenants', 'name', 'status',
|
||||||
'volume_id')
|
'volume_id')
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.block_store import block_store_service
|
from openstack.block_storage import block_storage_service
|
||||||
from openstack import resource2
|
from openstack import resource2
|
||||||
|
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ class Type(resource2.Resource):
|
|||||||
resource_key = "volume_type"
|
resource_key = "volume_type"
|
||||||
resources_key = "volume_types"
|
resources_key = "volume_types"
|
||||||
base_path = "/types"
|
base_path = "/types"
|
||||||
service = block_store_service.BlockStoreService()
|
service = block_storage_service.BlockStorageService()
|
||||||
|
|
||||||
# capabilities
|
# capabilities
|
||||||
allow_get = True
|
allow_get = True
|
@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from openstack.block_store import block_store_service
|
from openstack.block_storage import block_storage_service
|
||||||
from openstack import format
|
from openstack import format
|
||||||
from openstack import resource2
|
from openstack import resource2
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ class Volume(resource2.Resource):
|
|||||||
resource_key = "volume"
|
resource_key = "volume"
|
||||||
resources_key = "volumes"
|
resources_key = "volumes"
|
||||||
base_path = "/volumes"
|
base_path = "/volumes"
|
||||||
service = block_store_service.BlockStoreService()
|
service = block_storage_service.BlockStorageService()
|
||||||
|
|
||||||
_query_mapping = resource2.QueryParameters('all_tenants', 'name',
|
_query_mapping = resource2.QueryParameters('all_tenants', 'name',
|
||||||
'status', 'project_id')
|
'status', 'project_id')
|
@ -12,18 +12,18 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
''' Wrapper around keystoneauth Session to wrap calls in TaskManager '''
|
''' Wrapper around keystoneauth Adapter to wrap calls in TaskManager '''
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
from keystoneauth1 import adapter
|
|
||||||
from six.moves import urllib
|
from six.moves import urllib
|
||||||
|
|
||||||
from openstack import _log
|
from keystoneauth1 import adapter
|
||||||
from openstack.cloud import exc
|
|
||||||
from openstack.cloud import task_manager
|
from openstack.cloud import task_manager as _task_manager
|
||||||
|
from openstack import exceptions
|
||||||
|
|
||||||
|
|
||||||
def extract_name(url):
|
def _extract_name(url):
|
||||||
'''Produce a key name to use in logging/metrics from the URL path.
|
'''Produce a key name to use in logging/metrics from the URL path.
|
||||||
|
|
||||||
We want to be able to logic/metric sane general things, so we pull
|
We want to be able to logic/metric sane general things, so we pull
|
||||||
@ -81,86 +81,67 @@ def extract_name(url):
|
|||||||
return [part for part in name_parts if part]
|
return [part for part in name_parts if part]
|
||||||
|
|
||||||
|
|
||||||
# TODO(shade) This adapter should go away in favor of the work merging
|
class OpenStackSDKAdapter(adapter.Adapter):
|
||||||
# adapter with openstack.proxy.
|
"""Wrapper around keystoneauth1.adapter.Adapter.
|
||||||
class ShadeAdapter(adapter.Adapter):
|
|
||||||
|
|
||||||
def __init__(self, shade_logger, manager, *args, **kwargs):
|
Uses task_manager to run tasks rather than executing them directly.
|
||||||
super(ShadeAdapter, self).__init__(*args, **kwargs)
|
This allows using the nodepool MultiThreaded Rate Limiting TaskManager.
|
||||||
self.shade_logger = shade_logger
|
"""
|
||||||
self.manager = manager
|
|
||||||
self.request_log = _log.setup_logging('openstack.cloud.request_ids')
|
|
||||||
|
|
||||||
def _log_request_id(self, response, obj=None):
|
def __init__(self, session=None, task_manager=None, *args, **kwargs):
|
||||||
# Log the request id and object id in a specific logger. This way
|
super(OpenStackSDKAdapter, self).__init__(
|
||||||
# someone can turn it on if they're interested in this kind of tracing.
|
session=session, *args, **kwargs)
|
||||||
request_id = response.headers.get('x-openstack-request-id')
|
if not task_manager:
|
||||||
if not request_id:
|
task_manager = _task_manager.TaskManager(name=self.service_type)
|
||||||
return response
|
|
||||||
tmpl = "{meth} call to {service} for {url} used request id {req}"
|
|
||||||
kwargs = dict(
|
|
||||||
meth=response.request.method,
|
|
||||||
service=self.service_type,
|
|
||||||
url=response.request.url,
|
|
||||||
req=request_id)
|
|
||||||
|
|
||||||
if isinstance(obj, dict):
|
self.task_manager = task_manager
|
||||||
obj_id = obj.get('id', obj.get('uuid'))
|
|
||||||
if obj_id:
|
|
||||||
kwargs['obj_id'] = obj_id
|
|
||||||
tmpl += " returning object {obj_id}"
|
|
||||||
self.request_log.debug(tmpl.format(**kwargs))
|
|
||||||
return response
|
|
||||||
|
|
||||||
def _munch_response(self, response, result_key=None, error_message=None):
|
|
||||||
exc.raise_from_response(response, error_message=error_message)
|
|
||||||
|
|
||||||
if not response.content:
|
|
||||||
# This doens't have any content
|
|
||||||
return self._log_request_id(response)
|
|
||||||
|
|
||||||
# Some REST calls do not return json content. Don't decode it.
|
|
||||||
if 'application/json' not in response.headers.get('Content-Type'):
|
|
||||||
return self._log_request_id(response)
|
|
||||||
|
|
||||||
try:
|
|
||||||
result_json = response.json()
|
|
||||||
self._log_request_id(response, result_json)
|
|
||||||
except Exception:
|
|
||||||
return self._log_request_id(response)
|
|
||||||
return result_json
|
|
||||||
|
|
||||||
def request(
|
def request(
|
||||||
self, url, method, run_async=False, error_message=None,
|
self, url, method, run_async=False, error_message=None,
|
||||||
*args, **kwargs):
|
raise_exc=False, connect_retries=1, *args, **kwargs):
|
||||||
name_parts = extract_name(url)
|
name_parts = _extract_name(url)
|
||||||
name = '.'.join([self.service_type, method] + name_parts)
|
name = '.'.join([self.service_type, method] + name_parts)
|
||||||
class_name = "".join([
|
|
||||||
part.lower().capitalize() for part in name.split('.')])
|
|
||||||
|
|
||||||
request_method = functools.partial(
|
request_method = functools.partial(
|
||||||
super(ShadeAdapter, self).request, url, method)
|
super(OpenStackSDKAdapter, self).request, url, method)
|
||||||
|
|
||||||
class RequestTask(task_manager.BaseTask):
|
return self.task_manager.submit_function(
|
||||||
|
request_method, run_async=run_async, name=name,
|
||||||
def __init__(self, **kw):
|
connect_retries=connect_retries, raise_exc=raise_exc,
|
||||||
super(RequestTask, self).__init__(**kw)
|
**kwargs)
|
||||||
self.name = name
|
|
||||||
self.__class__.__name__ = str(class_name)
|
|
||||||
self.run_async = run_async
|
|
||||||
|
|
||||||
def main(self, client):
|
|
||||||
self.args.setdefault('raise_exc', False)
|
|
||||||
return request_method(**self.args)
|
|
||||||
|
|
||||||
response = self.manager.submit_task(RequestTask(**kwargs))
|
|
||||||
if run_async:
|
|
||||||
return response
|
|
||||||
else:
|
|
||||||
return self._munch_response(response, error_message=error_message)
|
|
||||||
|
|
||||||
def _version_matches(self, version):
|
def _version_matches(self, version):
|
||||||
api_version = self.get_api_major_version()
|
api_version = self.get_api_major_version()
|
||||||
if api_version:
|
if api_version:
|
||||||
return api_version[0] == version
|
return api_version[0] == version
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
class ShadeAdapter(OpenStackSDKAdapter):
|
||||||
|
"""Wrapper for shade methods that expect json unpacking."""
|
||||||
|
|
||||||
|
def request(self, url, method,
|
||||||
|
run_async=False, error_message=None, **kwargs):
|
||||||
|
response = super(ShadeAdapter, self).request(
|
||||||
|
url, method, run_async=run_async, **kwargs)
|
||||||
|
if run_async:
|
||||||
|
return response
|
||||||
|
else:
|
||||||
|
return self._munch_response(response, error_message=error_message)
|
||||||
|
|
||||||
|
def _munch_response(self, response, result_key=None, error_message=None):
|
||||||
|
exceptions.raise_from_response(response, error_message=error_message)
|
||||||
|
|
||||||
|
if not response.content:
|
||||||
|
# This doens't have any content
|
||||||
|
return response
|
||||||
|
|
||||||
|
# Some REST calls do not return json content. Don't decode it.
|
||||||
|
if 'application/json' not in response.headers.get('Content-Type'):
|
||||||
|
return response
|
||||||
|
|
||||||
|
try:
|
||||||
|
result_json = response.json()
|
||||||
|
except Exception:
|
||||||
|
return response
|
||||||
|
return result_json
|
||||||
|
@ -12,46 +12,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import sys
|
from openstack import exceptions
|
||||||
|
|
||||||
import munch
|
OpenStackCloudException = exceptions.SDKException
|
||||||
from requests import exceptions as _rex
|
|
||||||
|
|
||||||
from openstack import _log
|
|
||||||
|
|
||||||
|
|
||||||
class OpenStackCloudException(Exception):
|
|
||||||
|
|
||||||
log_inner_exceptions = False
|
|
||||||
|
|
||||||
def __init__(self, message, extra_data=None, **kwargs):
|
|
||||||
args = [message]
|
|
||||||
if extra_data:
|
|
||||||
if isinstance(extra_data, munch.Munch):
|
|
||||||
extra_data = extra_data.toDict()
|
|
||||||
args.append("Extra: {0}".format(str(extra_data)))
|
|
||||||
super(OpenStackCloudException, self).__init__(*args, **kwargs)
|
|
||||||
self.extra_data = extra_data
|
|
||||||
self.inner_exception = sys.exc_info()
|
|
||||||
self.orig_message = message
|
|
||||||
|
|
||||||
def log_error(self, logger=None):
|
|
||||||
if not logger:
|
|
||||||
logger = _log.setup_logging('openstack.cloud.exc')
|
|
||||||
if self.inner_exception and self.inner_exception[1]:
|
|
||||||
logger.error(self.orig_message, exc_info=self.inner_exception)
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
message = Exception.__str__(self)
|
|
||||||
if (self.inner_exception and self.inner_exception[1]
|
|
||||||
and not self.orig_message.endswith(
|
|
||||||
str(self.inner_exception[1]))):
|
|
||||||
message = "%s (Inner Exception: %s)" % (
|
|
||||||
message,
|
|
||||||
str(self.inner_exception[1]))
|
|
||||||
if self.log_inner_exceptions:
|
|
||||||
self.log_error()
|
|
||||||
return message
|
|
||||||
|
|
||||||
|
|
||||||
class OpenStackCloudCreateException(OpenStackCloudException):
|
class OpenStackCloudCreateException(OpenStackCloudException):
|
||||||
@ -76,98 +39,8 @@ class OpenStackCloudUnavailableFeature(OpenStackCloudException):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class OpenStackCloudHTTPError(OpenStackCloudException, _rex.HTTPError):
|
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
OpenStackCloudException.__init__(self, *args, **kwargs)
|
|
||||||
_rex.HTTPError.__init__(self, *args, **kwargs)
|
|
||||||
|
|
||||||
|
|
||||||
class OpenStackCloudBadRequest(OpenStackCloudHTTPError):
|
|
||||||
"""There is something wrong with the request payload.
|
|
||||||
|
|
||||||
Possible reasons can include malformed json or invalid values to parameters
|
|
||||||
such as flavorRef to a server create.
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
class OpenStackCloudURINotFound(OpenStackCloudHTTPError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Backwards compat
|
# Backwards compat
|
||||||
|
OpenStackCloudHTTPError = exceptions.HttpException
|
||||||
|
OpenStackCloudBadRequest = exceptions.BadRequestException
|
||||||
|
OpenStackCloudURINotFound = exceptions.NotFoundException
|
||||||
OpenStackCloudResourceNotFound = OpenStackCloudURINotFound
|
OpenStackCloudResourceNotFound = OpenStackCloudURINotFound
|
||||||
|
|
||||||
|
|
||||||
def _log_response_extras(response):
|
|
||||||
# Sometimes we get weird HTML errors. This is usually from load balancers
|
|
||||||
# or other things. Log them to a special logger so that they can be
|
|
||||||
# toggled indepdently - and at debug level so that a person logging
|
|
||||||
# openstack.cloud.* only gets them at debug.
|
|
||||||
if response.headers.get('content-type') != 'text/html':
|
|
||||||
return
|
|
||||||
try:
|
|
||||||
if int(response.headers.get('content-length', 0)) == 0:
|
|
||||||
return
|
|
||||||
except Exception:
|
|
||||||
return
|
|
||||||
logger = _log.setup_logging('openstack.cloud.http')
|
|
||||||
if response.reason:
|
|
||||||
logger.debug(
|
|
||||||
"Non-standard error '{reason}' returned from {url}:".format(
|
|
||||||
reason=response.reason,
|
|
||||||
url=response.url))
|
|
||||||
else:
|
|
||||||
logger.debug(
|
|
||||||
"Non-standard error returned from {url}:".format(
|
|
||||||
url=response.url))
|
|
||||||
for response_line in response.text.split('\n'):
|
|
||||||
logger.debug(response_line)
|
|
||||||
|
|
||||||
|
|
||||||
# Logic shamelessly stolen from requests
|
|
||||||
def raise_from_response(response, error_message=None):
|
|
||||||
msg = ''
|
|
||||||
if 400 <= response.status_code < 500:
|
|
||||||
source = "Client"
|
|
||||||
elif 500 <= response.status_code < 600:
|
|
||||||
source = "Server"
|
|
||||||
else:
|
|
||||||
return
|
|
||||||
|
|
||||||
remote_error = "Error for url: {url}".format(url=response.url)
|
|
||||||
try:
|
|
||||||
details = response.json()
|
|
||||||
# Nova returns documents that look like
|
|
||||||
# {statusname: 'message': message, 'code': code}
|
|
||||||
detail_keys = list(details.keys())
|
|
||||||
if len(detail_keys) == 1:
|
|
||||||
detail_key = detail_keys[0]
|
|
||||||
detail_message = details[detail_key].get('message')
|
|
||||||
if detail_message:
|
|
||||||
remote_error += " {message}".format(message=detail_message)
|
|
||||||
except ValueError:
|
|
||||||
if response.reason:
|
|
||||||
remote_error += " {reason}".format(reason=response.reason)
|
|
||||||
|
|
||||||
_log_response_extras(response)
|
|
||||||
|
|
||||||
if error_message:
|
|
||||||
msg = '{error_message}. ({code}) {source} {remote_error}'.format(
|
|
||||||
error_message=error_message,
|
|
||||||
source=source,
|
|
||||||
code=response.status_code,
|
|
||||||
remote_error=remote_error)
|
|
||||||
else:
|
|
||||||
msg = '({code}) {source} {remote_error}'.format(
|
|
||||||
code=response.status_code,
|
|
||||||
source=source,
|
|
||||||
remote_error=remote_error)
|
|
||||||
|
|
||||||
# Special case 404 since we raised a specific one for neutron exceptions
|
|
||||||
# before
|
|
||||||
if response.status_code == 404:
|
|
||||||
raise OpenStackCloudURINotFound(msg, response=response)
|
|
||||||
elif response.status_code == 400:
|
|
||||||
raise OpenStackCloudBadRequest(msg, response=response)
|
|
||||||
if msg:
|
|
||||||
raise OpenStackCloudHTTPError(msg, response=response)
|
|
||||||
|
@ -175,7 +175,7 @@ class OpenStackCloud(_normalize.Normalizer):
|
|||||||
self.manager = manager
|
self.manager = manager
|
||||||
else:
|
else:
|
||||||
self.manager = task_manager.TaskManager(
|
self.manager = task_manager.TaskManager(
|
||||||
name=':'.join([self.name, self.region_name]), client=self)
|
name=':'.join([self.name, self.region_name]))
|
||||||
|
|
||||||
self._external_ipv4_names = cloud_config.get_external_ipv4_networks()
|
self._external_ipv4_names = cloud_config.get_external_ipv4_networks()
|
||||||
self._internal_ipv4_names = cloud_config.get_internal_ipv4_networks()
|
self._internal_ipv4_names = cloud_config.get_internal_ipv4_networks()
|
||||||
@ -402,29 +402,27 @@ class OpenStackCloud(_normalize.Normalizer):
|
|||||||
version=config_major)
|
version=config_major)
|
||||||
adapter = _adapter.ShadeAdapter(
|
adapter = _adapter.ShadeAdapter(
|
||||||
session=self.keystone_session,
|
session=self.keystone_session,
|
||||||
manager=self.manager,
|
task_manager=self.manager,
|
||||||
service_type=self.cloud_config.get_service_type(service_type),
|
service_type=self.cloud_config.get_service_type(service_type),
|
||||||
service_name=self.cloud_config.get_service_name(service_type),
|
service_name=self.cloud_config.get_service_name(service_type),
|
||||||
interface=self.cloud_config.get_interface(service_type),
|
interface=self.cloud_config.get_interface(service_type),
|
||||||
endpoint_override=self.cloud_config.get_endpoint(service_type),
|
endpoint_override=self.cloud_config.get_endpoint(service_type),
|
||||||
region_name=self.cloud_config.region,
|
region_name=self.cloud_config.region,
|
||||||
min_version=request_min_version,
|
min_version=request_min_version,
|
||||||
max_version=request_max_version,
|
max_version=request_max_version)
|
||||||
shade_logger=self.log)
|
|
||||||
if adapter.get_endpoint():
|
if adapter.get_endpoint():
|
||||||
return adapter
|
return adapter
|
||||||
|
|
||||||
adapter = _adapter.ShadeAdapter(
|
adapter = _adapter.ShadeAdapter(
|
||||||
session=self.keystone_session,
|
session=self.keystone_session,
|
||||||
manager=self.manager,
|
task_manager=self.manager,
|
||||||
service_type=self.cloud_config.get_service_type(service_type),
|
service_type=self.cloud_config.get_service_type(service_type),
|
||||||
service_name=self.cloud_config.get_service_name(service_type),
|
service_name=self.cloud_config.get_service_name(service_type),
|
||||||
interface=self.cloud_config.get_interface(service_type),
|
interface=self.cloud_config.get_interface(service_type),
|
||||||
endpoint_override=self.cloud_config.get_endpoint(service_type),
|
endpoint_override=self.cloud_config.get_endpoint(service_type),
|
||||||
region_name=self.cloud_config.region,
|
region_name=self.cloud_config.region,
|
||||||
min_version=min_version,
|
min_version=min_version,
|
||||||
max_version=max_version,
|
max_version=max_version)
|
||||||
shade_logger=self.log)
|
|
||||||
|
|
||||||
# data.api_version can be None if no version was detected, such
|
# data.api_version can be None if no version was detected, such
|
||||||
# as with neutron
|
# as with neutron
|
||||||
@ -456,14 +454,13 @@ class OpenStackCloud(_normalize.Normalizer):
|
|||||||
self, service_type, api_version=None, endpoint_override=None):
|
self, service_type, api_version=None, endpoint_override=None):
|
||||||
return _adapter.ShadeAdapter(
|
return _adapter.ShadeAdapter(
|
||||||
session=self.keystone_session,
|
session=self.keystone_session,
|
||||||
manager=self.manager,
|
task_manager=self.manager,
|
||||||
service_type=self.cloud_config.get_service_type(service_type),
|
service_type=self.cloud_config.get_service_type(service_type),
|
||||||
service_name=self.cloud_config.get_service_name(service_type),
|
service_name=self.cloud_config.get_service_name(service_type),
|
||||||
interface=self.cloud_config.get_interface(service_type),
|
interface=self.cloud_config.get_interface(service_type),
|
||||||
endpoint_override=self.cloud_config.get_endpoint(
|
endpoint_override=self.cloud_config.get_endpoint(
|
||||||
service_type) or endpoint_override,
|
service_type) or endpoint_override,
|
||||||
region_name=self.cloud_config.region,
|
region_name=self.cloud_config.region)
|
||||||
shade_logger=self.log)
|
|
||||||
|
|
||||||
def _is_client_version(self, client, version):
|
def _is_client_version(self, client, version):
|
||||||
client_name = '_{client}_client'.format(client=client)
|
client_name = '_{client}_client'.format(client=client)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user