class PowerLimitField(base.CompositeField): """PowerLimit field This object contains power limit status and configuration information for the chassis. """ limit_in_watts = base.Field("LimitInWatts", adapter=rsd_lib_utils.num_or_none) """The Power limit in watts. Set to null to disable power capping.""" limit_exception = base.Field("LimitException") """The action that is taken if the power cannot be maintained below the LimitInWatts. """ correction_in_ms = base.Field("CorrectionInMs", adapter=rsd_lib_utils.num_or_none) """The time required for the limiting process to reduce power consumption
class DriveMetrics(base.ResourceBase): name = base.Field('Name') """Drive metrics name""" identity = base.Field('Id') """Drive metrics id""" description = base.Field('Description') """Drive metrics description""" life_time = LifeTimeField('LifeTime') """The life time metrics for this drive""" health_data = HealthDataField('HealthData') """The health data metrics for this drive""" temperature_kelvin = base.Field('TemperatureKelvin') """The temperature in Kelvin degrees of this drive"""
class VLanNetworkInterface(rsd_lib_base.ResourceBase): """VLanNetworkInterface resource class This resource contains information for a Virtual LAN (VLAN) network instance available on a manager, system or other device. """ vlan_enable = base.Field("VLANEnable", adapter=bool) """This indicates if this VLAN is enabled.""" vlan_id = base.Field("VLANId") """This indicates the VLAN identifier for this VLAN.""" oem = OemField("Oem") """Oem specific properties.""" def delete(self): """Delete this vlan network interface""" self._conn.delete(self.path)
class SettingsApplyTimeField(base.CompositeField): def __init__(self): super(SettingsApplyTimeField, self).__init__(path="@Redfish.SettingsApplyTime") apply_time = base.Field('ApplyTime', adapter=str) """When the future configuration should be applied""" apply_time_allowable_values = base.Field( '*****@*****.**', adapter=list) """The list of allowable ApplyTime values""" maintenance_window_start_time = base.Field('MaintenanceWindowStartTime', adapter=parser.parse) """The start time of a maintenance window""" maintenance_window_duration_in_seconds = base.Field( 'MaintenanceWindowDurationInSeconds', adapter=int) """The expiry time of maintenance window in seconds"""
class Chassis(base.ResourceBase): asset_tag = base.Field('AssetTag') """The chassis asset tag""" description = base.Field('Description') """The chassis description""" identity = base.Field('Id', required=True) """The chassis identity string""" manufacturer = base.Field('Manufacturer') """The chassis manufacturer""" name = base.Field('Name') """The chassis name""" part_number = base.Field('PartNumber') """The chassis part number""" serial_number = base.Field('SerialNumber') """The chassis serial number""" sku = base.Field('SKU') """The chassis stock-keeping unit""" chassis_type = base.Field('ChassisType') """The chassis type""" oem = base.Field('Oem') """The chassis oem options values (dict)""" def __init__(self, connector, identity, redfish_version=None): """A class representing a Chassis :param connector: A Connector instance :param identity: The identity of the chassis resource :param redfish_version: The version of RedFish. Used to construct the object according to schema of the given version. """ super(Chassis, self).__init__(connector, identity, redfish_version) def refresh(self): super(Chassis, self).refresh()
class AttachResourceActionInfo(base.ResourceBase): identity = base.Field('Id', required=True) """The storage pool identity string""" description = base.Field('Description') """The storage pool description string""" name = base.Field('Name') """The storage pool name string""" def __init__(self, connector, identity, redfish_version=None): """A class representing a LogicalDrive :param connector: A Connector instance :param identity: The identity of the AttachResourceActionInfo resource :param redfish_version: The version of RedFish. Used to construct the object according to schema of the given version. """ super(AttachResourceActionInfo, self).__init__(connector, identity, redfish_version) @property @utils.cache_it def parameters(self): """Property to provide reference to `Parameters` instance It is calculated once when it is queried for the first time. On refresh, this property is reset. """ parameters = [] for i in self.json.get('Parameters'): item = {} for key in NAME_MAPPING: item[NAME_MAPPING[key]] = i[key] if item['name'] == 'Resource': item['allowable_values'] = utils.get_members_identities( item['allowable_values']) parameters.append(item) return parameters
class DeviceCollectionField(rsd_lib_base.ReferenceableMemberField): name = base.Field("Name") """The name of the resource or array element.""" status = rsd_lib_base.StatusField("Status") """This indicates the known state of the resource, such as if it is enabled. """ manufacturer = base.Field("Manufacturer") """The name of the manufacturer of this device""" model = base.Field("Model") """The product model number of this device""" capacity_bytes = base.Field( "CapacityBytes", adapter=rsd_lib_utils.num_or_none ) """The size of the storage device."""
class OperationApplyTimeSupportField(base.CompositeField): def __init__(self): super(OperationApplyTimeSupportField, self).__init__(path="@Redfish.OperationApplyTimeSupport") maintenance_window_duration_in_seconds = base.Field( 'MaintenanceWindowDurationInSeconds', adapter=int) """The expiry time of maintenance window in seconds""" _maintenance_window_resource = IdRefField('MaintenanceWindowResource') """The location of the maintenance window settings""" maintenance_window_start_time = base.Field('MaintenanceWindowStartTime', adapter=parser.parse) """The start time of a maintenance window""" supported_values = base.Field('SupportedValues', required=True, adapter=list) """The client is allowed request when performing a create, delete, or
class LinksField(base.CompositeField): ethernet_interfaces = base.Field("EthernetInterfaces", adapter=utils.get_members_identities) """An array of references to the ethernet interfaces which the PCIe device produces """ drives = base.Field("Drives", adapter=utils.get_members_identities) """An array of references to the drives which the PCIe device produces""" storage_controllers = base.Field("StorageControllers", adapter=utils.get_members_identities) """An array of references to the storage controllers which the PCIe device produces """ pcie_device = base.Field("PCIeDevice", adapter=rsd_lib_utils.get_resource_identity) """A reference to the PCIeDevice on which this function resides."""
class LinksField(base.CompositeField): computer_systems = base.Field("ComputerSystems", adapter=utils.get_members_identities) """An array of references to the computer systems contained in this chassis. This will only reference ComputerSystems that are directly and wholly contained in this chassis. """ managed_by = base.Field("ManagedBy", adapter=utils.get_members_identities) """An array of references to the Managers responsible for managing this chassis. """ contained_by = base.Field("ContainedBy", adapter=rsd_lib_utils.get_resource_identity) """A reference to the chassis that this chassis is contained by.""" contains = base.Field("Contains", adapter=utils.get_members_identities) """An array of references to any other chassis that this chassis has in it. """ powered_by = base.Field("PoweredBy", adapter=utils.get_members_identities) """An array of ID[s] of resources that power this chassis. Normally the ID will be a chassis or a specific set of powerSupplies """ cooled_by = base.Field("CooledBy", adapter=utils.get_members_identities) """An array of ID[s] of resources that cool this chassis. Normally the ID will be a chassis or a specific set of fans. """ managers_in_chassis = base.Field("ManagersInChassis", adapter=utils.get_members_identities) """An array of references to the managers located in this Chassis.""" drives = base.Field("Drives", adapter=utils.get_members_identities) """An array of references to the disk drives located in this Chassis.""" storage = base.Field("Storage", adapter=utils.get_members_identities) """An array of references to the storage subsystems connected to or inside this Chassis. """ oem = LinksOemField("Oem") """Oem specific properties."""
class IntelRackScaleField(base.CompositeField): erase_on_detach = base.Field("EraseOnDetach", adapter=bool) """This indicates if drive should be erased when detached from PCI switch. """ drive_erased = base.Field("DriveErased", adapter=bool) """This indicates whether drive was cleared after assignment to composed node. """ firmware_version = base.Field("FirmwareVersion") """This indicates drive firmware version.""" storage = base.Field("Storage", adapter=rsd_lib_utils.get_resource_identity) """A reference to the storage controller where this drive is connected.""" pcie_function = base.Field("PCIeFunction", adapter=rsd_lib_utils.get_resource_identity) """A reference to the PCIe function that provides this drive functionality.
class BootField(base.CompositeField): allowed_values = base.Field( '*****@*****.**', adapter=list) enabled = base.MappedField('BootSourceOverrideEnabled', sys_maps.BOOT_SOURCE_ENABLED_MAP) mode = base.MappedField('BootSourceOverrideMode', sys_maps.BOOT_SOURCE_MODE_MAP) target = base.MappedField('BootSourceOverrideTarget', sys_maps.BOOT_SOURCE_TARGET_MAP)
class LinksField(base.CompositeField): chassis = base.Field("Chassis", adapter=utils.get_members_identities) """An array of references to the chassis in which this system is contained """ managed_by = base.Field("ManagedBy", adapter=utils.get_members_identities) """An array of references to the Managers responsible for this system""" powered_by = base.Field("PoweredBy", adapter=utils.get_members_identities) """An array of ID[s] of resources that power this computer system. Normally the ID will be a chassis or a specific set of powerSupplies """ cooled_by = base.Field("CooledBy", adapter=utils.get_members_identities) """An array of ID[s] of resources that cool this computer system. Normally the ID will be a chassis or a specific set of fans. """ endpoints = base.Field("Endpoints", adapter=utils.get_members_identities) """An array of references to the endpoints that connect to this system."""
class SoftwareInventoryCollection(base.ResourceCollectionBase): name = base.Field('Name') """The software inventory collection name""" description = base.Field('Description') """The software inventory collection description""" @property def _resource_type(self): return SoftwareInventory def __init__(self, connector, identity, redfish_version=None): """A class representing a SoftwareInventoryCollection :param connector: A Connector instance :param identity: The identity of SoftwareInventory resource :param redfish_version: The version of RedFish. Used to construct the object according to schema of given version. """ super(SoftwareInventoryCollection, self).__init__(connector, identity, redfish_version)
class EthernetInterface(ethernet_interface.EthernetInterface): uefi_device_path = base.Field('UefiDevicePath') """The value of the property shall be the UEFI device path to the device that implements the interface (port). """ oem = OemField("Oem") """"The oem fields of Ethernet Interface""" links = LinksField("Links") """The EthernetInterface links"""
class InputRangeCollectionField(rsd_lib_base.ReferenceableMemberField): input_type = base.Field("InputType") """The Input type (AC or DC)""" minimum_voltage = base.Field("MinimumVoltage", adapter=rsd_lib_utils.num_or_none) """The minimum line input voltage at which this power supply input range is effective """ maximum_voltage = base.Field("MaximumVoltage", adapter=rsd_lib_utils.num_or_none) """The maximum line input voltage at which this power supply input range is effective """ minimum_frequency_hz = base.Field("MinimumFrequencyHz", adapter=rsd_lib_utils.num_or_none) """The minimum line input frequency at which this power supply input range is effective """ maximum_frequency_hz = base.Field("MaximumFrequencyHz", adapter=rsd_lib_utils.num_or_none) """The maximum line input frequency at which this power supply input range is effective """ output_wattage = base.Field("OutputWattage", adapter=rsd_lib_utils.num_or_none) """The maximum capacity of this Power Supply when operating in this input
class VirtualMedia(rsd_lib_base.ResourceBase): """VirtualMedia resource class This resource allows monitoring and control of an instance of virtual media (e.g. a remote CD, DVD, or USB device) functionality provided by a Manager for a system or device. """ image_name = base.Field("ImageName") """The current image name""" image = base.Field("Image") """A URI providing the location of the selected image""" media_types = base.Field("MediaTypes") """This is the media types supported as virtual media.""" connected_via = base.Field("ConnectedVia") """Current virtual media connection methods""" inserted = base.Field("Inserted", adapter=bool) """Indicates if virtual media is inserted in the virtual device.""" write_protected = base.Field("WriteProtected", adapter=bool) """Indicates the media is write protected."""
class LinksField(base.CompositeField): system = base.Field('ComputerSystem', adapter=rsd_lib_utils.get_resource_identity) """Link to base computer system of this node""" processors = base.Field('Processors', default=(), adapter=utils.get_members_identities) """Link to processors of this node""" memory = base.Field('Memory', default=(), adapter=utils.get_members_identities) """Link to memory of this node""" ethernet_interfaces = base.Field('EthernetInterfaces', default=(), adapter=utils.get_members_identities) """Link to ethernet interfaces of this node""" local_drives = base.Field('LocalDrives', default=(), adapter=utils.get_members_identities) """Link to local driver of this node""" remote_drives = base.Field('RemoteDrives', default=(), adapter=utils.get_members_identities) """Link to remote drives of this node"""
class BootField(base.CompositeField): """Boot field This object contains the boot information for the current resource. """ boot_source_override_target = base.Field("BootSourceOverrideTarget") """The current boot source to be used at next boot instead of the normal boot device, if BootSourceOverrideEnabled is true. """ boot_source_override_target_allowed_values = base.Field( "*****@*****.**" ) boot_source_override_enabled = base.Field("BootSourceOverrideEnabled") """Describes the state of the Boot Source Override feature""" uefi_target_boot_source_override = base.Field( "UefiTargetBootSourceOverride" ) """This property is the UEFI Device Path of the device to boot from when BootSourceOverrideSupported is UefiTarget. """ boot_source_override_mode = base.Field("BootSourceOverrideMode") """The BIOS Boot Mode (either Legacy or UEFI) to be used when BootSourceOverrideTarget boot source is booted from. """ boot_source_override_mode_allowed_values = base.Field( "*****@*****.**" )
class EthernetSwitchStaticMAC(rsd_lib_base.ResourceBase): """EthernetSwitchStaticMAC resource class A Ethernet Switch ACL represents Access Control List for switch. """ vlan_id = base.Field("VLANId", adapter=rsd_lib_utils.num_or_none) """The static mac vlan id""" mac_address = base.Field("MACAddress") """The static mac address""" def update(self, mac_address, vlan_id=None): """Update attributes of static MAC :param mac_address: MAC address that should be forwarded to this port :param vlan_id: If specified, defines which packets tagged with specific VLANId should be forwarded to this port """ if not isinstance(mac_address, type("")): raise exceptions.InvalidParameterValueError( parameter="mac_address", value=mac_address, valid_values="string", ) data = {"MACAddress": mac_address} if vlan_id is not None: if not isinstance(vlan_id, int): raise exceptions.InvalidParameterValueError( parameter="vlan_id", value=vlan_id, valid_values="int", ) data["VLANId"] = vlan_id self._conn.patch(self.path, data=data) def delete(self): """Delete this static mac address""" self._conn.delete(self._path)
class LinksField(base.CompositeField): associated_endpoints = base.Field("AssociatedEndpoints", adapter=utils.get_members_identities) """An array of references to the endpoints that connect to the switch through this port. """ connected_switches = base.Field("ConnectedSwitches", adapter=utils.get_members_identities) """An array of references to the switches that connect to the switch through this port. """ connected_switch_ports = base.Field("ConnectedSwitchPorts", adapter=utils.get_members_identities) """An array of references to the ports that connect to the switch through this port. """ oem = LinksOemField("Oem") """Oem specific properties."""
class IntelRackScaleField(processor.IntelRackScaleField): on_package_memory = OnPackageMemoryField('OnPackageMemory') """An array of references to the endpoints that connect to this processor """ thermal_design_power_watt = base.Field('ThermalDesignPowerWatt', adapter=rsd_lib_utils.num_or_none) """Thermal Design Power (TDP) of this processor""" metrics = base.Field('Metrics', adapter=rsd_lib_utils.get_resource_identity) """A reference to the Metrics associated with this Processor""" extended_identification_registers = rsd_lib_base.DynamicField( 'ExtendedIdentificationRegisters') """Extended contents of the Identification Registers (CPUID) for this processor """ fpga = FpgaField('FPGA') """FPGA specific properties for FPGA ProcessorType"""
class IntelRackScaleField(base.CompositeField): pcie_connection_id = base.Field("PCIeConnectionId") """This property is an array of IDs of cable or cables connected to this port. """ pci_devices = PciDeviceCollectionField("PciDevices") """This indicates array of PCI devices present in computer system""" discovery_state = base.Field("DiscoveryState") """This indicates computer system discovery state""" processor_sockets = base.Field( "ProcessorSockets", adapter=rsd_lib_utils.num_or_none ) """This indicates number of processor sockets available in system""" memory_sockets = base.Field( "MemorySockets", adapter=rsd_lib_utils.num_or_none ) """This indicates number of memory sockets available in system"""
class RegionSetCollectionField(rsd_lib_base.ReferenceableMemberField): """RegionSet field Memory memory region information. """ region_id = base.Field("RegionId") """Unique region ID representing a specific region within the Memory""" memory_classification = base.Field("MemoryClassification") """Classification of memory occupied by the given memory region""" offset_mib = base.Field("OffsetMiB", adapter=rsd_lib_utils.num_or_none) """Offset with in the Memory that corresponds to the starting of this memory region in MiB """ size_mib = base.Field("SizeMiB", adapter=rsd_lib_utils.num_or_none) """Size of this memory region in MiB""" passphrase_state = base.Field("PassphraseState", adapter=bool) """State of the passphrase for this region"""
class RemoteTarget(rsd_lib_base.ResourceBase): status = rsd_lib_base.StatusField("Status") """This indicates the known state of the resource, such as if it is enabled. """ type = base.Field("Type") """Type of target""" addresses = AddressCollectionField("Addresses") initiator = InitiatorCollectionField("Initiator")
class CompositionStatusField(base.CompositeField): composition_state = base.MappedField('CompositionState', res_maps.COMPOSITION_STATE_VALUE_MAP, required=True) """Inform the client, state of the resource block""" max_compositions = base.Field('MaxCompositions') """The maximum number of compositions""" number_of_compositions = base.Field('NumberOfCompositions') """The number of compositions""" reserved_state = base.Field('Reserved') """Inform the resource block has been identified by a client""" sharing_capable = base.Field('SharingCapable') """Indicates if this Resource Block is capable of participating in multiple compositions simultaneously""" sharing_enabled = base.Field('SharingEnabled') """Indicates if this Resource Block is allowed to participate in
class MessageRegistryFile(base.ResourceBase): identity = base.Field('Id', required=True) """Identity of Message Registry file resource""" description = base.Field('Description') """Description of Message Registry file resource""" name = base.Field('Name', required=True) """Name of Message Registry file resource""" languages = base.Field('Languages', required=True) """List of RFC 5646 language codes supported by this resource""" registry = base.Field('Registry', required=True) """Prefix for MessageId used for messages from this resource This attribute is in form Registry_name.Major_version.Minor_version """ location = LocationListField('Location', required=True) """List of locations of Registry files for each supported language"""
class LinksField(base.CompositeField): manager_for_servers = base.Field("ManagerForServers", adapter=utils.get_members_identities) """This property is an array of references to the systems that this manager has control over. """ manager_for_chassis = base.Field("ManagerForChassis", adapter=utils.get_members_identities) """This property is an array of references to the chassis that this manager has control over. """ manager_in_chassis = base.Field( "ManagerInChassis", adapter=rsd_lib_utils.get_resource_identity) """This property is a reference to the chassis that this manager is located in. """ oem = LinksOemField("Oem") """Oem specific properties."""
class Endpoint(base.ResourceBase): """This class represents a fabric endpoint. It represents the properties of an entity that sends or receives protocol defined messages over a transport. """ identity = base.Field('Id', required=True) """Identifier for the endpoint""" name = base.Field('Name', required=True) """The endpoint name""" description = base.Field('Description') """The endpoint description""" status = common.StatusField('Status') """The endpoint status""" host_reservation_memory_bytes = base.Field('HostReservationMemoryBytes', adapter=utils.int_or_none) """The amount of memory in Bytes that the Host should allocate to connect to this endpoint. """ endpoint_protocol = base.MappedField('EndpointProtocol', res_maps.PROTOCOL_TYPE_VALUE_MAP) """The protocol supported by this endpoint.""" pci_id = PciIdField('PciId') """The PCI ID of the endpoint.""" IP_transport_details = IPTransportDetailsListField('IPTransportDetails') """This array contains details for each IP transport supported by this endpoint. The array structure can be used to model multiple IP addresses for this endpoint.""" connected_entities = ConnectedEntitiesListField('ConnectedEntities') """All entities connected to this endpoint."""
class Processor(base.ResourceBase): identity = base.Field('Id', required=True) """The processor identity string""" socket = base.Field('Socket') """The socket or location of the processor""" # TODO(deray): Create mappings for the processor_type processor_type = base.Field('ProcessorType') """The type of processor""" processor_architecture = base.MappedField( 'ProcessorArchitecture', sys_maps.PROCESSOR_ARCH_VALUE_MAP) """The architecture of the processor""" # TODO(deray): Create mappings for the instruction_set instruction_set = base.Field('InstructionSet') """The instruction set of the processor""" manufacturer = base.Field('Manufacturer') """The processor manufacturer""" model = base.Field('Model') """The product model number of this device""" max_speed_mhz = base.Field('MaxSpeedMHz', adapter=int) """The maximum clock speed of the processor in MHz.""" total_cores = base.Field('TotalCores', adapter=int) """The total number of cores contained in this processor""" total_threads = base.Field('TotalThreads', adapter=int) """The total number of execution threads supported by this processor""" def __init__(self, connector, identity, redfish_version=None): """A class representing a Processor :param connector: A Connector instance :param identity: The identity of the processor :param redfish_version: The version of RedFish. Used to construct the object according to schema of the given version. """ super(Processor, self).__init__(connector, identity, redfish_version)