sushy.resources.system.storage package¶
Submodules¶
sushy.resources.system.storage.constants module¶
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID0
= 'RAID0'¶ A placement policy where consecutive logical blocks of data are uniformly distributed across a set of independent storage devices without offering any form of redundancy.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID00
= 'RAID00'¶ A placement policy that creates a RAID 0 stripe set over two or more RAID 0 sets.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID01
= 'RAID01'¶ A data placement policy that creates a mirrored device (RAID 1) over a set of striped devices (RAID 0).
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID1
= 'RAID1'¶ A placement policy where each logical block of data is stored on more than one independent storage device.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID10
= 'RAID10'¶ A placement policy that creates a striped device (RAID 0) over a set of mirrored devices (RAID 1).
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID10E
= 'RAID10E'¶ A placement policy that uses a RAID 0 stripe set over two or more RAID 10 sets.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID10Triple
= 'RAID10Triple'¶ A placement policy that uses a striped device (RAID 0) over a set of triple mirrored devices (RAID 1Triple).
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID1E
= 'RAID1E'¶ A placement policy that uses a form of mirroring implemented over a set of independent storage devices where logical blocks are duplicated on a pair of independent storage devices so that data is uniformly distributed across the storage devices.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID1Triple
= 'RAID1Triple'¶ A placement policy where each logical block of data is mirrored three times across a set of three independent storage devices.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID3
= 'RAID3'¶ A placement policy using parity-based protection where logical bytes of data are uniformly distributed across a set of independent storage devices and where the parity is stored on a dedicated independent storage device.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID4
= 'RAID4'¶ A placement policy using parity-based protection where logical blocks of data are uniformly distributed across a set of independent storage devices and where the parity is stored on a dedicated independent storage device.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID5
= 'RAID5'¶ A placement policy using parity-based protection for storing stripes of ‘n’ logical blocks of data and one logical block of parity across a set of ‘n+1’ independent storage devices where the parity and data blocks are interleaved across the storage devices.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID50
= 'RAID50'¶ A placement policy that uses a RAID 0 stripe set over two or more RAID 5 sets of independent storage devices.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID6
= 'RAID6'¶ A placement policy using parity-based protection for storing stripes of ‘n’ logical blocks of data and two logical blocks of independent parity across a set of ‘n+2’ independent storage devices where the parity and data blocks are interleaved across the storage devices.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID60
= 'RAID60'¶ A placement policy that uses a RAID 0 stripe set over two or more RAID 6 sets of independent storage devices.
-
sushy.resources.system.storage.constants.
RAID_TYPE_RAID6TP
= 'RAID6TP'¶ A placement policy that uses parity-based protection for storing stripes of ‘n’ logical blocks of data and three logical blocks of independent parity across a set of ‘n+3’ independent storage devices where the parity and data blocks are interleaved across the storage devices.
-
sushy.resources.system.storage.constants.
VOLUME_INIT_TYPE_FAST
= 'fast'¶ The volume is prepared for use quickly, typically by erasing just the beginning and end of the space so that partitioning can be performed.
-
sushy.resources.system.storage.constants.
VOLUME_INIT_TYPE_SLOW
= 'slow'¶ The volume is prepared for use slowly, typically by completely erasing the volume.
-
sushy.resources.system.storage.constants.
VOLUME_TYPE_MIRRORED
= 'mirrored'¶ The volume is a mirrored device.
-
sushy.resources.system.storage.constants.
VOLUME_TYPE_NON_REDUNDANT
= 'nonredundant'¶ The volume is a non-redundant storage device.
-
sushy.resources.system.storage.constants.
VOLUME_TYPE_RAW_DEVICE
= 'rawdevice'¶ The volume is a raw physical device without any RAID or other virtualization applied.
-
sushy.resources.system.storage.constants.
VOLUME_TYPE_SPANNED_MIRRORS
= 'spannedmirrors'¶ The volume is a spanned set of mirrored devices.
-
sushy.resources.system.storage.constants.
VOLUME_TYPE_SPANNED_STRIPES_WITH_PARITY
= 'spannedstripeswithparity'¶ The volume is a spanned set of devices which uses parity to retain redundant information.
-
sushy.resources.system.storage.constants.
VOLUME_TYPE_STRIPED_WITH_PARITY
= 'stripedwithparity'¶ The volume is a device which uses parity to retain redundant information.
sushy.resources.system.storage.drive module¶
-
class
sushy.resources.system.storage.drive.
Drive
(connector, path='', redfish_version=None, registries=None, reader=None, json_doc=None)¶ Bases:
sushy.resources.base.ResourceBase
This class represents a disk drive or other physical storage medium.
-
block_size_bytes
= <sushy.resources.base.Field object>¶ The size of the smallest addressable unit of this drive in bytes
-
capacity_bytes
= <sushy.resources.base.Field object>¶ The size in bytes of this Drive
-
identifiers
= <sushy.resources.common.IdentifiersListField object>¶ The Durable names for the drive
-
identity
= <sushy.resources.base.Field object>¶ The Drive identity string
-
indicator_led
= <sushy.resources.base.MappedField object>¶ Whether the indicator LED is lit or off
-
manufacturer
= <sushy.resources.base.Field object>¶ This is the manufacturer of this drive
-
media_type
= <sushy.resources.base.Field object>¶ The type of media contained in this drive
-
model
= <sushy.resources.base.Field object>¶ This is the model number for the drive
-
name
= <sushy.resources.base.Field object>¶ The name of the resource
-
part_number
= <sushy.resources.base.Field object>¶ The part number for this drive
-
protocol
= <sushy.resources.base.MappedField object>¶ Protocol this drive is using to communicate to the storage controller
-
serial_number
= <sushy.resources.base.Field object>¶ The serial number for this drive
-
set_indicator_led
(state)¶ Set IndicatorLED to the given state.
- Parameters
state – Desired LED state, lit (INDICATOR_LED_LIT), blinking (INDICATOR_LED_BLINKING), off (INDICATOR_LED_OFF)
- Raises
InvalidParameterValueError, if any information passed is invalid.
-
status
= <sushy.resources.common.StatusField object>¶ This type describes the status and health of the drive
-
sushy.resources.system.storage.mappings module¶
sushy.resources.system.storage.storage module¶
-
class
sushy.resources.system.storage.storage.
Storage
(connector, path='', redfish_version=None, registries=None, reader=None, json_doc=None)¶ Bases:
sushy.resources.base.ResourceBase
This class represents the storage subsystem resources.
A storage subsystem represents a set of storage controllers (physical or virtual) and the resources such as drives and volumes that can be accessed from that subsystem.
-
property
drives
¶ Return a list of Drive objects present in the storage resource.
It is set once when the first time it is queried. On subsequent invocations, it returns a cached list of Drives objects until it is marked stale.
- Returns
A list of Drive objects
- Raises
ResourceNotFoundError
-
drives_identities
= <sushy.resources.base.Field object>¶ A tuple with the drive identities
-
property
drives_max_size_bytes
¶ Max size available in bytes among all Drives of this collection.
-
property
drives_sizes_bytes
¶ Sizes of all Drives in bytes in Storage resource.
Returns the list of cached values until it (or its parent resource) is refreshed.
-
get_drive
(drive_identity)¶ Given the drive identity return a
Drive
object- Parameters
drive_identity – The identity of the
Drive
- Returns
The
Drive
object- Raises
ResourceNotFoundError
-
identity
= <sushy.resources.base.Field object>¶ The Storage identity string
-
name
= <sushy.resources.base.Field object>¶ The name of the resource
-
status
= <sushy.resources.common.StatusField object>¶ Describes the status and health of the resource and its children.
-
storage_controllers
= <sushy.resources.system.storage.storage.StorageControllersListField object>¶ The storage devices associated with this resource.
-
property
volumes
¶ Property to reference VolumeCollection instance
It is set once when the first time it is queried. On refresh, this property is marked as stale (greedy-refresh not done at that point). Here only the actual refresh of the sub-resource happens, if resource is stale.
-
property
-
class
sushy.resources.system.storage.storage.
StorageCollection
(connector, path, redfish_version=None, registries=None)¶ Bases:
sushy.resources.base.ResourceCollectionBase
This class represents the collection of Storage resources
-
property
drives_sizes_bytes
¶ Sizes of each Drive in bytes in Storage collection resource.
Returns the list of cached values until it (or its parent resource) is refreshed.
-
property
max_drive_size_bytes
¶ Max size available (in bytes) among all Drive resources.
Returns the cached value until it (or its parent resource) is refreshed.
-
property
max_volume_size_bytes
¶ Max size available (in bytes) among all Volume resources.
Returns the cached value until it (or its parent resource) is refreshed.
-
property
volumes_sizes_bytes
¶ Sizes of each Volume in bytes in Storage collection resource.
Returns the list of cached values until it (or its parent resource) is refreshed.
-
property
-
class
sushy.resources.system.storage.storage.
StorageControllersListField
(*args, **kwargs)¶ Bases:
sushy.resources.base.ListField
The set of storage controllers represented by this resource.
-
controller_protocols
= <sushy.resources.base.MappedListField object>¶ The protocols by which this storage controller can be communicated to
-
device_protocols
= <sushy.resources.base.MappedListField object>¶ The protocols which the controller can use tocommunicate with devices
-
identifiers
= <sushy.resources.common.IdentifiersListField object>¶ The Durable names for the storage controller.
-
member_id
= <sushy.resources.base.Field object>¶ Uniquely identifies the member within the collection.
-
name
= <sushy.resources.base.Field object>¶ The name of the storage controller
-
raid_types
= <sushy.resources.base.MappedListField object>¶ The set of RAID types supported by the storage controller.
-
speed_gbps
= <sushy.resources.base.Field object>¶ The maximum speed of the storage controller’s device interface.
-
status
= <sushy.resources.common.StatusField object>¶ Describes the status and health of the resource and its children.
-
sushy.resources.system.storage.volume module¶
-
class
sushy.resources.system.storage.volume.
ActionsField
(*args, **kwargs)¶ Bases:
sushy.resources.base.CompositeField
-
initialize
= <sushy.resources.common.InitializeActionField object>¶
-
-
class
sushy.resources.system.storage.volume.
Volume
(connector, path='', redfish_version=None, registries=None, reader=None, json_doc=None)¶ Bases:
sushy.resources.base.ResourceBase
This class adds the Storage Volume resource
-
block_size_bytes
= <sushy.resources.base.Field object>¶ The size of the smallest addressable unit of this volume in bytes.
-
capacity_bytes
= <sushy.resources.base.Field object>¶ The size in bytes of this Volume.
-
delete
(payload=None, apply_time=None, timeout=500)¶ Delete the volume.
- Parameters
payload – May contain @Redfish.OperationApplyTime property
apply_time – When to update the attributes. Optional. APPLY_TIME_IMMEDIATE - Immediate, APPLY_TIME_ON_RESET - On reset, APPLY_TIME_MAINT_START - During specified maintenance time APPLY_TIME_MAINT_RESET - On reset during specified maintenance time
timeout – Max time in seconds to wait for blocking async call.
- Raises
ConnectionError
- Raises
HTTPError
- Returns
TaskMonitor if async task or None if successful deletion
-
delete_volume
(payload=None, apply_time=None, timeout=500)¶ Delete the volume.
Deprecated: Use delete
- Parameters
payload – May contain @Redfish.OperationApplyTime property
apply_time – When to update the attributes. Optional. APPLY_TIME_IMMEDIATE - Immediate, APPLY_TIME_ON_RESET - On reset, APPLY_TIME_MAINT_START - During specified maintenance time APPLY_TIME_MAINT_RESET - On reset during specified maintenance time
timeout – Max time in seconds to wait for blocking async call.
- Raises
ConnectionError
- Raises
HTTPError
- Returns
TaskMonitor if async task or None if successful deletion
-
encrypted
= <sushy.resources.base.Field object>¶ Is this Volume encrypted.
-
get_allowed_initialize_volume_values
()¶ Get the allowed values for initializing the volume.
- Returns
A set with the allowed values.
-
identifiers
= <sushy.resources.common.IdentifiersListField object>¶ The Durable names for the volume.
-
identity
= <sushy.resources.base.Field object>¶ The Volume identity string
-
initialize
(value='fast', apply_time=None, timeout=500)¶ Initialize the volume.
- Parameters
value – The InitializeType value.
apply_time – When to update the attributes. Optional. APPLY_TIME_IMMEDIATE - Immediate, APPLY_TIME_ON_RESET - On reset, APPLY_TIME_MAINT_START - During specified maintenance time APPLY_TIME_MAINT_RESET - On reset during specified maintenance time
timeout – Max time in seconds to wait for blocking async call.
- Raises
InvalidParameterValueError, if the target value is not allowed.
- Raises
ConnectionError
- Raises
HTTPError
- Returns
TaskMonitor if async task or None if successful init
-
initialize_volume
(value='fast', apply_time=None, timeout=500)¶ Initialize the volume.
Deprecated: Use initialize
- Parameters
value – The InitializeType value.
apply_time – When to update the attributes. Optional. APPLY_TIME_IMMEDIATE - Immediate, APPLY_TIME_ON_RESET - On reset, APPLY_TIME_MAINT_START - During specified maintenance time APPLY_TIME_MAINT_RESET - On reset during specified maintenance time
timeout – Max time in seconds to wait for blocking async call.
- Raises
InvalidParameterValueError, if the target value is not allowed.
- Raises
ConnectionError
- Raises
HTTPError
- Returns
TaskMonitor if async task or None if successful init
-
name
= <sushy.resources.base.Field object>¶ The name of the resource
-
operation_apply_time_support
= <sushy.resources.common.OperationApplyTimeSupportField object>¶ Indicates if a client is allowed to request for a specific apply time of a create, delete, or action operation of a given resource
-
raid_type
= <sushy.resources.base.MappedField object>¶ The RAID type of this volume.
-
volume_type
= <sushy.resources.base.MappedField object>¶ The type of this volume.
-
-
class
sushy.resources.system.storage.volume.
VolumeCollection
(connector, path, redfish_version=None, registries=None)¶ Bases:
sushy.resources.base.ResourceCollectionBase
This class represents the Storage Volume collection
-
create
(payload, apply_time=None, timeout=500)¶ Create a volume.
- Parameters
payload – The payload representing the new volume to create.
apply_time – When to update the attributes. Optional. APPLY_TIME_IMMEDIATE - Immediate, APPLY_TIME_ON_RESET - On reset, APPLY_TIME_MAINT_START - During specified maintenance time APPLY_TIME_MAINT_RESET - On reset during specified maintenance time
timeout – Max time in seconds to wait for blocking async call.
- Raises
ConnectionError
- Raises
HTTPError
- Returns
Newly created Volume resource or TaskMonitor if async task
-
create_volume
(payload, apply_time=None, timeout=500)¶ Create a volume.
Deprecated: Use create.
- Parameters
payload – The payload representing the new volume to create.
apply_time – When to update the attributes. Optional. APPLY_TIME_IMMEDIATE - Immediate, APPLY_TIME_ON_RESET - On reset, APPLY_TIME_MAINT_START - During specified maintenance time APPLY_TIME_MAINT_RESET - On reset during specified maintenance time
timeout – Max time in seconds to wait for blocking async call.
- Raises
ConnectionError
- Raises
HTTPError
- Returns
Newly created Volume resource or TaskMonitor if async task
-
property
max_size_bytes
¶ Max size available (in bytes) among all Volume resources.
Returns the cached value until it (or its parent resource) is refreshed.
-
property
max_volume_size_bytes
¶ Max size available (in bytes) among all Volume resources.
Returns the cached value until it (or its parent resource) is refreshed.
-
operation_apply_time_support
= <sushy.resources.common.OperationApplyTimeSupportField object>¶ Indicates if a client is allowed to request for a specific apply time of a create, delete, or action operation of a given resource
-
property
volumes_sizes_bytes
¶ Sizes of all Volumes in bytes in VolumeCollection resource.
Returns the list of cached values until it (or its parent resource) is refreshed.
-