
Another weird one. There are two oddities here. Firstly, creation of a trait is a PUT request and doesn't return a body, only a 'Location'. It also doesn't error out if the trait already exists but rather returns a HTTP 204. This is mostly handled by setting the 'create_method' attribute. Secondly, the list response returns a list of strings rather than a list of objects. This is less easily worked around and once again requires a custom implementation of the 'list' class method. We extend the 'QueryParameter' class to accept a new kwarg argument, 'include_pagination_defaults', which allows us to disable adding the default 'limit' and 'marker' query string parameters: Placement doesn't use these. Change-Id: Idafa6c5c356d215224711b73c56a87ed7a690b94 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
50 lines
1.4 KiB
ReStructuredText
50 lines
1.4 KiB
ReStructuredText
Placement API
|
|
=============
|
|
|
|
.. automodule:: openstack.placement.v1._proxy
|
|
|
|
The Placement Class
|
|
-------------------
|
|
|
|
The placement high-level interface is available through the ``placement``
|
|
member of a :class:`~openstack.connection.Connection` object.
|
|
The ``placement`` member will only be added if the service is detected.
|
|
|
|
Resource Classes
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
.. autoclass:: openstack.placement.v1._proxy.Proxy
|
|
:noindex:
|
|
:members: create_resource_class, update_resource_class,
|
|
delete_resource_class, get_resource_class,
|
|
resource_classes
|
|
|
|
Resource Providers
|
|
^^^^^^^^^^^^^^^^^^
|
|
|
|
.. autoclass:: openstack.placement.v1._proxy.Proxy
|
|
:noindex:
|
|
:members: create_resource_provider, update_resource_provider,
|
|
delete_resource_provider, get_resource_provider,
|
|
find_resource_provider, resource_providers,
|
|
get_resource_provider_aggregates,
|
|
set_resource_provider_aggregates
|
|
|
|
Resource Provider Inventories
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. autoclass:: openstack.placement.v1._proxy.Proxy
|
|
:noindex:
|
|
:members: create_resource_provider_inventory,
|
|
update_resource_provider_inventory,
|
|
delete_resource_provider_inventory,
|
|
get_resource_provider_inventory,
|
|
resource_provider_inventories
|
|
|
|
Traits
|
|
^^^^^^
|
|
|
|
.. autoclass:: openstack.placement.v1._proxy.Proxy
|
|
:noindex:
|
|
:members: create_trait, delete_trait, get_trait, traits
|