The sushy.main
Module¶
-
class
sushy.main.
LazyRegistries
(service_root)¶ Bases:
collections.abc.MutableMapping
Download registries on demand.
Redfish message registries can be very large. On top of that, they are not used frequently. Thus, let’s not pull them off the BMC unless the consumer is actually trying to use them.
- Parameters
service_root (Sushy) – Redfish service root object
-
property
registries
¶
-
class
sushy.main.
ProtocolFeaturesSupportedField
(*args, **kwargs)¶ Bases:
sushy.resources.base.CompositeField
-
excerpt_query
= <sushy.resources.base.Field object>¶ The excerpt query parameter is supported
-
expand_query
= <sushy.resources.base.Field object>¶ The expand query parameter is supported
-
filter_query
= <sushy.resources.base.Field object>¶ The filter query parameter is supported
-
only_member_query
= <sushy.resources.base.Field object>¶ The only query parameter is supported
-
select_query
= <sushy.resources.base.Field object>¶ The select query parameter is supported
-
-
class
sushy.main.
Sushy
(base_url, username=None, password=None, root_prefix='/redfish/v1/', verify=True, auth=None, connector=None, public_connector=None, language='en')¶ Bases:
sushy.resources.base.ResourceBase
-
create_session
(username=None, password=None)¶ Creates a session without invoking SessionService.
For use when a new connection is to be established. Removes prior Session and authentication data before making the request.
- Parameters
username – The username to utilize to create a session with the remote endpoint.
password – The password to utilize to create a session with the remote endpoint.
- Returns
A session key and uri in the form of a tuple
- Raises
MissingXAuthToken
- Raises
ConnectionError
- Raises
AccessError
- Raises
HTTPError
- Raises
MissingAttributeError
-
get_chassis
(identity=None)¶ Given the identity return a Chassis object
- Parameters
identity – The identity of the Chassis resource. If not given, sushy will default to the single available chassis or fail if there appear to be more or less then one Chassis listed.
- Raises
UnknownDefaultError if default system can’t be determined.
- Returns
The Chassis object
-
get_chassis_collection
()¶ Get the ChassisCollection object
- Raises
MissingAttributeError, if the collection attribute is not found
- Returns
a ChassisCollection object
-
get_composition_service
()¶ Get the CompositionService object
- Raises
MissingAttributeError, if the composition service attribute is not found
- Returns
The CompositionService object
-
get_fabric
(identity)¶ Given the identity return a Fabric object
- Parameters
identity – The identity of the Fabric resource
- Returns
The Fabric object
-
get_fabric_collection
()¶ Get the FabricCollection object
- Raises
MissingAttributeError, if the collection attribute is not found
- Returns
a FabricCollection object
-
get_manager
(identity=None)¶ Given the identity return a Manager object
- Parameters
identity – The identity of the Manager resource. If not given, sushy will default to the single available Manager or fail if there appear to be more or less then one Manager listed.
- Returns
The Manager object
-
get_manager_collection
()¶ Get the ManagerCollection object
- Raises
MissingAttributeError, if the collection attribute is not found
- Returns
a ManagerCollection object
-
get_session
(identity)¶ Given the identity return a Session object
- Parameters
identity – The identity of the session resource
- Returns
The Session object
-
get_session_service
()¶ Get the SessionService object
- Raises
MissingAttributeError, if the collection attribute is not found
- Returns
as SessionCollection object
-
get_sessions_path
()¶ Returns the Sessions url
-
get_system
(identity=None)¶ Given the identity return a System object
- Parameters
identity – The identity of the System resource. If not given, sushy will default to the single available System or fail if there appear to be more or less then one System listed.
- Raises
UnknownDefaultError if default system can’t be determined.
- Returns
The System object
-
get_system_collection
()¶ Get the SystemCollection object
- Raises
MissingAttributeError, if the collection attribute is not found
- Returns
a SystemCollection object
-
get_update_service
()¶ Get the UpdateService object
- Returns
The UpdateService object
-
identity
= <sushy.resources.base.Field object>¶ The Redfish root service identity
-
property
lazy_registries
¶ Gets and combines all message registries together
Fetches all registries if any provided by Redfish service and combines together with packaged standard registries.
- Returns
dict of combined message registries where key is Registry_name.Major_version.Minor_version and value is registry itself.
-
name
= <sushy.resources.base.Field object>¶ The Redfish root service name
-
product
= <sushy.resources.base.Field object>¶ The product associated with this Redfish service
-
protocol_features_supported
= <sushy.main.ProtocolFeaturesSupportedField object>¶ The information about protocol features supported by the service
-
property
registries
¶ Gets and combines all message registries together
Fetches all registries if any provided by Redfish service and combines together with packaged standard registries.
- Returns
dict of combined message registries where key is Registry_name.Major_version.Minor_version and value is registry itself.
-
uuid
= <sushy.resources.base.Field object>¶ The Redfish root service UUID
-