The sushy.resources.base Module

The sushy.resources.base Module

class sushy.resources.base.CompositeField(*args, **kwargs)

Bases: _abcoll.Mapping, sushy.resources.base.Field

Base class for fields consisting of several sub-fields.

class sushy.resources.base.Field(path, required=False, default=None, adapter=<function <lambda>>)

Bases: object

Definition for fields fetched from JSON.

class sushy.resources.base.MappedField(field, mapping, required=False, default=None)

Bases: sushy.resources.base.Field

Field taking real value from a mapping.

class sushy.resources.base.ResourceBase(connector, path='', redfish_version=None)

Bases: object

json
path
redfish_version = None

The Redfish version

refresh()

Refresh the resource

Freshly retrieves/fetches the resource attributes and invokes _parse_attributes() method on successful retrieval. :raises: ResourceNotFoundError :raises: ConnectionError :raises: HTTPError

class sushy.resources.base.ResourceCollectionBase(connector, path, redfish_version=None)

Bases: sushy.resources.base.ResourceBase

get_member(identity)

Given the identity return a _resource_type object

Parameters:identity – The identity of the _resource_type
Returns:The _resource_type object
Raises:ResourceNotFoundError
get_members()

Return a list of _resource_type objects present in collection

Returns:A list of _resource_type objects
members_identities = <sushy.resources.base.Field object>

A tuple with the members identities

name = <sushy.resources.base.Field object>

The name of the collection

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.