
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>
275 B
275 B
openstack.placement.v1.trait
openstack.placement.v1.trait
The Trait Class
The Trait
class inherits from ~openstack.resource.Resource
.
openstack.placement.v1.trait.Trait