oneview_redfish_toolkit.blueprints package¶
Submodules¶
oneview_redfish_toolkit.blueprints.chassis module¶
oneview_redfish_toolkit.blueprints.chassis_collection module¶
-
oneview_redfish_toolkit.blueprints.chassis_collection.
get_chassis_collection
()[source]¶ Get the Redfish Chassis Collection.
Return ChassisCollection redfish JSON. Logs exception of any error and return Internal Server Error or Not Found.
Returns: Redfish json with ChassisCollection. When Server hardware, enclosures or racks is not found calls abort(404). Return type: JSON - Exceptions:
OneViewRedfishResourceNotFoundError: if have some oneview resource with empty value (ServerHardware, Enclosures or Racks). Logs the exception and call abort(404).
Exception: Generic error, logs the exception and call abort(500).
oneview_redfish_toolkit.blueprints.computer_system module¶
-
oneview_redfish_toolkit.blueprints.computer_system.
change_power_state
(uuid)[source]¶ Change the Oneview power state for a specific Server hardware.
Return ResetType Computer System redfish JSON for a given server hardware UUID. Logs exception of any error and return abort.
Returns: Redfish JSON with ComputerSystem ResetType. Return type: JSON - Exceptions:
HPOneViewException: When some OneView resource was not found. return abort(404)
OneViewRedfishError: When occur a power state mapping error. return abort(400)
Exception: Unexpected error. return abort(500)
-
oneview_redfish_toolkit.blueprints.computer_system.
get_computer_system
(uuid)[source]¶ Get the Redfish Computer System for a given UUID.
Return ComputerSystem redfish JSON for a given server hardware UUID. Logs exception of any error and return abort(500) Internal Server Error.
Returns: Redfish json with ComputerSystem When Server hardware is not found calls abort(404) Return type: JSON - Exceptions:
- Logs the exception and call abort(500)
oneview_redfish_toolkit.blueprints.computer_system_collection module¶
oneview_redfish_toolkit.blueprints.event_service module¶
oneview_redfish_toolkit.blueprints.manager module¶
oneview_redfish_toolkit.blueprints.manager_collection module¶
-
oneview_redfish_toolkit.blueprints.manager_collection.
get_manager_collection
()[source]¶ Get the Redfish Manager Collection.
Return ManagerCollection redfish JSON. Logs exception of any error and return Internal Server Error or Not Found.
Returns: Redfish json with ManagerCollection. When Server hardware or enclosures is not found calls abort(404). Return type: JSON - Exceptions:
OneViewRedfishResourceNotFoundError: if have some oneview resource with empty value (ServerHardware or Enclosures). Logs the exception and call abort(404).
Exception: Generic error, logs the exception and call abort(500).
oneview_redfish_toolkit.blueprints.metadata module¶
oneview_redfish_toolkit.blueprints.network_adapter module¶
-
oneview_redfish_toolkit.blueprints.network_adapter.
get_network_adapter
(uuid, device_id)[source]¶ Get the Redfish NetworkInterface for a given UUID and device_id.
Return NetworkInterface Redfish JSON for a given hardware UUID and device_id.
Parameters: - uuid – the UUID of the server_hardware
- device_id – The id of the network device
Returns: Redfish json with NetworkInterface
Return type: JSON
- Exceptions:
- When hardware is not found calls abort(404) When other errors occur calls abort(500)
oneview_redfish_toolkit.blueprints.network_adapter_collection module¶
oneview_redfish_toolkit.blueprints.network_device_function module¶
-
oneview_redfish_toolkit.blueprints.network_device_function.
get_network_device_function
(uuid, device_id, device_function_id)[source]¶ Get the Redfish NetworkDeviceFunction for a given UUID and device_id.
Return NetworkDeviceFunction Redfish JSON for a given hardware UUID and device_id.
Parameters: - uuid – the UUID of the server_hardware
- device_id – The id of the network device
- device_function_id – The id of the device function
Returns: Redfish json with NetworkDeviceFunction
Return type: JSON
- Exceptions:
- When hardware is not found calls abort(404) When other errors occur calls abort(500)
oneview_redfish_toolkit.blueprints.network_device_function_collection module¶
oneview_redfish_toolkit.blueprints.network_interface module¶
-
oneview_redfish_toolkit.blueprints.network_interface.
get_network_interface
(uuid, device_id)[source]¶ Get the Redfish NetworkInterface for a given UUID and device_id.
Return NetworkInterface Redfish JSON for a given hardware UUID and device_id.
Parameters: - uuid – the UUID of the server_hardware
- device_id – The id of the network device
Returns: Redfish json with NetworkInterface
Return type: JSON
- Exceptions:
- When hardware is not found calls abort(404) When other errors occur calls abort(500)
oneview_redfish_toolkit.blueprints.network_interface_collection module¶
oneview_redfish_toolkit.blueprints.network_port module¶
-
oneview_redfish_toolkit.blueprints.network_port.
get_network_port
(uuid, device_id, port_id)[source]¶ Get the Redfish NetworkPort for a given UUID, device_id and port_id.
Return NetworkPort Redfish JSON for a given hardware UUID, device_id and port_id.
Parameters: - uuid – the UUID of the server_hardware
- device_id – The id of the network device
- port_id – The id of the port
Returns: Redfish json with NetworkPort
Return type: JSON
- Exceptions:
- When hardware is not found calls abort(404) When other errors occur calls abort(500)
oneview_redfish_toolkit.blueprints.network_port_collection module¶
oneview_redfish_toolkit.blueprints.odata module¶
oneview_redfish_toolkit.blueprints.redfish_base module¶
oneview_redfish_toolkit.blueprints.service_root module¶
oneview_redfish_toolkit.blueprints.session module¶
-
oneview_redfish_toolkit.blueprints.session.
post_session
()[source]¶ Posts Session
The response to the POST request to create a session includes:
- An X-Auth-Token header that contains a session auth token that
the client can use an subsequent requests. - A Location header that contains a link to the newly created session resource. - The JSON response body that contains a full representation of the newly created session object.
- Exception:
HPOneViewException: Invalid username or password. return abort(401)
OneViewRedfishError: When occur a credential key mapping error. return abort(400)
Exception: Unexpected error. return abort(500)
oneview_redfish_toolkit.blueprints.storage module¶
-
oneview_redfish_toolkit.blueprints.storage.
get_storage
(uuid)[source]¶ Get the Redfish Storage for a given UUID.
Return Storage Redfish JSON for a given hardware UUID. Logs exception of any error and return abort(500) Internal Server Error.
Returns: Redfish json with Storage When hardware or hardware type is not found calls abort(404) Return type: JSON - Exceptions:
- Logs the exception and call abort(500)
oneview_redfish_toolkit.blueprints.storage_collection module¶
oneview_redfish_toolkit.blueprints.subscription module¶
-
oneview_redfish_toolkit.blueprints.subscription.
add_subscription
()[source]¶ Add the Redfish Subscription.
Add a new subscription when this POST operation is requested. The body of the request must have the Destination, an array of EventTypes. Context is optional.
- EventTypes:
- StatusChange
- ResourceUpdated
- ResourceAdded
- ResourceRemoved
- Alert
Returns: JSON with Subscription information. Return type: JSON - Exception:
OneViewRedfishError: When occur a key mapping error. return abort(400)
Exception: Unexpected error. return abort(500)
oneview_redfish_toolkit.blueprints.subscription_collection module¶
-
oneview_redfish_toolkit.blueprints.subscription_collection.
get_subscription_collection
()[source]¶ Get the Redfish Subscription Collection.
Get method to return SubscriptionCollection JSON when /redfish/v1/EventService/EventSubscriptions is requested. :returns: JSON with EventSubscriptions. :rtype: JSON
oneview_redfish_toolkit.blueprints.thermal module¶
-
oneview_redfish_toolkit.blueprints.thermal.
get_thermal
(uuid)[source]¶ Get the Redfish Thermal for a given UUID.
Return Thermal Redfish JSON for a given hardware UUID. Logs exception of any error and return abort(500) Internal Server Error.
Returns: Redfish json with Thermal When hardware is not found calls abort(404) Return type: JSON - Exceptions:
- Logs the exception and call abort(500)