class NetworkDeviceFunction(rsd_lib_base.ResourceBase):
    """NetworkDeviceFunction resource class

       A Network Device Function represents a logical interface exposed by the
       network adapter.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    device_enabled = base.Field("DeviceEnabled", adapter=bool)
    """Whether the network device function is enabled."""

    ethernet = EthernetField("Ethernet")
    """Ethernet."""

    iscsi_boot = iSCSIBootField("iSCSIBoot")
    """iSCSI Boot."""
    def update(self, ethernet=None, iscsi_boot=None):
        """Enable iSCSI boot of compute node

        :param ethernet: Ethernet capabilities for this network device function
        :param iscsi_boot: iSCSI boot capabilities, status, and configuration
                           values for this network device function
        """
        data = {}
        if ethernet is not None:
            data["Ethernet"] = ethernet
        if iscsi_boot is not None:
            data["iSCSIBoot"] = iscsi_boot

        self._conn.patch(self.path, data=data)
예제 #2
0
class PowerSupplyCollectionField(rsd_lib_base.ReferenceableMemberField):

    name = base.Field("Name")
    """The Power Supply name"""

    power_capacity_watts = base.Field("PowerCapacityWatts",
                                      adapter=rsd_lib_utils.num_or_none)
    """The maximum capacity of this Power Supply"""

    last_power_output_watts = base.Field("LastPowerOutputWatts",
                                         adapter=rsd_lib_utils.num_or_none)
    """The average power output of this Power Supply"""

    manufacturer = base.Field("Manufacturer")
    """The manufacturer of this Power Supply"""

    model_number = base.Field("ModelNumber")
    """The model number for this Power Supply"""

    firmware_revision = base.Field("FirmwareRevision")
    """The firmware version for this Power Supply"""

    serial_number = base.Field("SerialNumber")
    """The serial number for this Power Supply"""

    part_number = base.Field("PartNumber")
    """The part number for this Power Supply"""

    status = rsd_lib_base.StatusField("Status")
    """The Power supply status"""

    rack_location = rack_location.RackLocationField("RackLocation")
    """The PowerZone physical location"""
예제 #3
0
class Zone(rsd_lib_base.ResourceBase):
    """Zone resource class

       Switch contains properties describing a simple fabric zone.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    links = LinksField("Links")
    """Contains references to other resources that are related to this
       resource.
    """
    def update(self, endpoints):
        """Add or remove Endpoints from a Zone

        User have to provide a full representation of Endpoints array. A
        partial update (single element update/append/detele) is not supported.
        :param endpoints: a full representation of Endpoints array
        """
        data = {"Endpoints": []}
        data["Endpoints"] = [{"@odata.id": endpoint} for endpoint in endpoints]

        self._conn.patch(self.path, data=data)
예제 #4
0
class TemperatureCollectionField(rsd_lib_base.ReferenceableMemberField):

    name = base.Field("Name")
    """Temperature sensor name."""

    sensor_number = base.Field("SensorNumber",
                               adapter=rsd_lib_utils.num_or_none)
    """A numerical identifier to represent the temperature sensor"""

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    reading_celsius = base.Field("ReadingCelsius",
                                 adapter=rsd_lib_utils.num_or_none)
    """Temperature"""

    upper_threshold_non_critical = base.Field(
        "UpperThresholdNonCritical", adapter=rsd_lib_utils.num_or_none)
    """Above normal range"""

    upper_threshold_critical = base.Field("UpperThresholdCritical",
                                          adapter=rsd_lib_utils.num_or_none)
    """Above normal range but not yet fatal."""

    upper_threshold_fatal = base.Field("UpperThresholdFatal",
                                       adapter=rsd_lib_utils.num_or_none)
    """Above normal range and is fatal"""

    lower_threshold_non_critical = base.Field(
        "LowerThresholdNonCritical", adapter=rsd_lib_utils.num_or_none)
    """Below normal range"""

    lower_threshold_critical = base.Field("LowerThresholdCritical",
                                          adapter=rsd_lib_utils.num_or_none)
    """Below normal range but not yet fatal."""

    lower_threshold_fatal = base.Field("LowerThresholdFatal",
                                       adapter=rsd_lib_utils.num_or_none)
    """Below normal range and is fatal"""

    min_reading_range_temp = base.Field("MinReadingRangeTemp",
                                        adapter=rsd_lib_utils.num_or_none)
    """Minimum value for ReadingCelsius"""

    max_reading_range_temp = base.Field("MaxReadingRangeTemp",
                                        adapter=rsd_lib_utils.num_or_none)
    """Maximum value for ReadingCelsius"""

    physical_context = base.Field("PhysicalContext")
    """Describes the area or device to which this temperature measurement
       applies.
    """

    related_item = base.Field("RelatedItem",
                              adapter=utils.get_members_identities)
    """Describes the areas or devices to which this temperature measurement
예제 #5
0
class IntelRackScaleField(base.CompositeField):

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    tagged = base.Field("Tagged", adapter=bool)
    """This indicates if VLAN is tagged (as defined in IEEE 802.1Q)."""
예제 #6
0
class Storage(rsd_lib_base.ResourceBase):
    """Storage resource class

       This schema defines a storage subsystem and its respective properties.
       A storage subsystem represents a set of storage controllers (physical
       or virtual) and the resources such as volumes that can be accessed from
       that subsystem.
    """

    links = LinksField("Links")
    """Contains references to other resources that are related to this
       resource.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    storage_controllers = StorageControllerCollectionField(
        "StorageControllers")
    """The set of storage controllers represented by this resource."""

    redundancy = redundancy.RedundancyCollectionField("Redundancy")
    """Redundancy information for the storage subsystem"""

    # TODO(linyang): Add Action Field

    @property
    @utils.cache_it
    def drives(self):
        """Property to provide a list of `Drive` instance

           It is calculated once when it is queried for the first time. On
           refresh, this property is reset.
        """
        return [
            drive.Drive(self._conn, path, redfish_version=self.redfish_version)
            for path in rsd_lib_utils.get_sub_resource_path_list_by(
                self, "Drives")
        ]

    @property
    @utils.cache_it
    def volumes(self):
        """Property to provide reference to `VolumeCollection` instance

           It is calculated once when it is queried for the first time. On
           refresh, this property is reset.
        """
        return volume.VolumeCollection(
            self._conn,
            utils.get_sub_resource_path_by(self, "Volumes"),
            redfish_version=self.redfish_version,
        )
예제 #7
0
class StorageControllerCollectionField(rsd_lib_base.ReferenceableMemberField):
    """StorageController field

       This schema defines a storage controller and its respective properties.
       A storage controller represents a storage device (physical or virtual)
       that produces Volumes.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    speed_gbps = base.Field("SpeedGbps", adapter=rsd_lib_utils.num_or_none)
    """The speed of the storage controller interface."""

    firmware_version = base.Field("FirmwareVersion")
    """The firmware version of this storage Controller"""

    manufacturer = base.Field("Manufacturer")
    """This is the manufacturer of this storage controller."""

    model = base.Field("Model")
    """This is the model number for the storage controller."""

    sku = base.Field("SKU")
    """This is the SKU for this storage controller."""

    serial_number = base.Field("SerialNumber")
    """The serial number for this storage controller."""

    part_number = base.Field("PartNumber")
    """The part number for this storage controller."""

    asset_tag = base.Field("AssetTag")
    """The user assigned asset tag for this storage controller."""

    supported_controller_protocols = base.Field("SupportedControllerProtocols")
    """This represents the protocols by which this storage controller can be
       communicated to.
    """

    supported_device_protocols = base.Field("SupportedDeviceProtocols")
    """This represents the protocols which the storage controller can use to
       communicate with attached devices.
    """

    identifiers = rsd_lib_base.IdentifierCollectionField("Identifiers")
    """The Durable names for the storage controller"""

    links = StorageControllerLinksField("Links")
    """Contains references to other resources that are related to this
예제 #8
0
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")
예제 #9
0
class FanCollectionField(rsd_lib_base.ReferenceableMemberField):

    name = base.Field("Name")
    """The Power Supply name"""

    reading_rpm = base.Field("ReadingRPM", adapter=rsd_lib_utils.num_or_none)
    """Fan RPM reading"""

    status = rsd_lib_base.StatusField("Status")
    """The Fan status"""

    rack_location = rack_location.RackLocationField("RackLocation")
    """The Fan physical location"""
예제 #10
0
class StorageService(rsd_lib_base.ResourceBase):

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    links = LinksField("Links")

    @property
    @utils.cache_it
    def remote_targets(self):
        """Property to provide reference to `RemoteTargetCollection` instance

           It is calculated once when it is queried for the first time. On
           refresh, this property is reset.
        """
        return remote_target.RemoteTargetCollection(
            self._conn,
            utils.get_sub_resource_path_by(self, "RemoteTargets"),
            redfish_version=self.redfish_version,
        )

    @property
    @utils.cache_it
    def logical_drives(self):
        """Property to provide reference to `LogicalDriveCollection` instance

           It is calculated once when it is queried for the first time. On
           refresh, this property is reset.
        """
        return logical_drive.LogicalDriveCollection(
            self._conn,
            utils.get_sub_resource_path_by(self, "LogicalDrives"),
            redfish_version=self.redfish_version,
        )

    @property
    @utils.cache_it
    def drives(self):
        """Property to provide reference to `PhysicalDriveCollection` instance

           It is calculated once when it is queried for the first time. On
           refresh, this property is reset.
        """
        return physical_drive.PhysicalDriveCollection(
            self._conn,
            utils.get_sub_resource_path_by(self, "Drives"),
            redfish_version=self.redfish_version,
        )
예제 #11
0
class PowerControlCollectionField(rsd_lib_base.ReferenceableMemberField):

    name = base.Field("Name")
    """Power Control Function name."""

    power_consumed_watts = base.Field("PowerConsumedWatts",
                                      adapter=rsd_lib_utils.num_or_none)
    """The actual power being consumed by the chassis."""

    power_requested_watts = base.Field("PowerRequestedWatts",
                                       adapter=rsd_lib_utils.num_or_none)
    """The potential power that the chassis resources are requesting which may
       be higher than the current level being consumed since requested power
       includes budget that the chassis resource wants for future use.
    """

    power_available_watts = base.Field("PowerAvailableWatts",
                                       adapter=rsd_lib_utils.num_or_none)
    """The amount of power not already budgeted and therefore available for
       additional allocation. (powerCapacity - powerAllocated).  This
       indicates how much reserve power capacity is left.
    """

    power_capacity_watts = base.Field("PowerCapacityWatts",
                                      adapter=rsd_lib_utils.num_or_none)
    """The total amount of power available to the chassis for allocation. This
       may the power supply capacity, or power budget assigned to the chassis
       from an up-stream chassis.
    """

    power_allocated_watts = base.Field("PowerAllocatedWatts",
                                       adapter=rsd_lib_utils.num_or_none)
    """The total amount of power that has been allocated (or budegeted)to
       chassis resources.
    """

    power_metrics = PowerMetricField("PowerMetrics")
    """Power readings for this chassis."""

    power_limit = PowerLimitField("PowerLimit")
    """Power limit status and configuration information for this chassis"""

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    related_item = base.Field("RelatedItem",
                              adapter=utils.get_members_identities)
    """The ID(s) of the resources associated with this Power Limit"""
예제 #12
0
class MemorySummaryField(base.CompositeField):
    """MemorySummary field

       This object describes the memory of the system in general detail.
    """

    total_system_memory_gib = base.Field(
        "TotalSystemMemoryGiB", adapter=rsd_lib_utils.num_or_none
    )
    """The total installed, operating system-accessible memory (RAM), measured
       in GiB.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
예제 #13
0
class PCIeDevice(rsd_lib_base.ResourceBase):
    """PCIeDevice resource class

       This is the schema definition for the PCIeDevice resource.  It
       represents the properties of a PCIeDevice attached to a System.
    """

    manufacturer = base.Field("Manufacturer")
    """This is the manufacturer of this PCIe device."""

    model = base.Field("Model")
    """This is the model number for the PCIe device."""

    sku = base.Field("SKU")
    """This is the SKU for this PCIe device."""

    serial_number = base.Field("SerialNumber")
    """The serial number for this PCIe device."""

    part_number = base.Field("PartNumber")
    """The part number for this PCIe device."""

    asset_tag = base.Field("AssetTag")
    """The user assigned asset tag for this PCIe device."""

    device_type = base.Field("DeviceType")
    """The device type for this PCIe device."""

    firmware_version = base.Field("FirmwareVersion")
    """The version of firmware for this PCIe device."""

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    links = LinksField("Links")
    """The links object contains the links to other resources that are related
       to this resource.
    """

    def update(self, asset_tag):
        """Update AssetTag properties

        :param asset_tag: The user assigned asset tag for this PCIe device
        """
        data = {"AssetTag": asset_tag}
        self._conn.patch(self.path, data=data)
예제 #14
0
class Processor(rsd_lib_base.ResourceBase):
    """Processor resource class

       This is the schema definition for the Processor resource.  It
       represents the properties of a processor attached to a System.
    """

    socket = base.Field("Socket")
    """The socket or location of the processor"""

    processor_type = base.Field("ProcessorType")
    """The type of processor"""

    processor_architecture = base.Field("ProcessorArchitecture")
    """The architecture of the processor"""

    instruction_set = base.Field("InstructionSet")
    """The instruction set of the processor"""

    processor_id = ProcessorIdField("ProcessorId")
    """Identification information for this processor."""

    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 processor manufacturer"""

    model = base.Field("Model")
    """The product model number of this device"""

    max_speed_mhz = base.Field(
        "MaxSpeedMHz", adapter=rsd_lib_utils.num_or_none
    )
    """The maximum clock speed of the processor"""

    total_cores = base.Field("TotalCores", adapter=rsd_lib_utils.num_or_none)
    """The total number of cores contained in this processor"""

    total_threads = base.Field(
        "TotalThreads", adapter=rsd_lib_utils.num_or_none
    )
    """The total number of execution threads supported by this processor"""

    oem = OemField("Oem")
    """Oem specific properties."""
예제 #15
0
class SimpleStorage(rsd_lib_base.ResourceBase):
    """SimpleStorage resource class

       This is the schema definition for the Simple Storage resource.  It
       represents the properties of a storage controller and its
       directly-attached devices.
    """

    uefi_device_path = base.Field("UefiDevicePath")
    """The UEFI device path used to access this storage controller."""

    devices = DeviceCollectionField("Devices")
    """The storage devices associated with this resource"""

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
예제 #16
0
class EventService(rsd_lib_base.ResourceBase):
    """EventService resource class

       The Event Service resource contains properties for managing event
       subcriptions and generates the events sent to subscribers.  The
       resource has links to the actual collection of subscriptions (called
       Event Destinations).
    """

    service_enabled = base.Field("ServiceEnabled", adapter=bool)
    """This indicates whether this service is enabled."""

    delivery_retry_attempts = base.Field("DeliveryRetryAttempts",
                                         adapter=rsd_lib_utils.num_or_none)
    """This is the number of attempts an event posting is retried before the
       subscription is terminated.
    """

    delivery_retry_interval_seconds = base.Field(
        "DeliveryRetryIntervalSeconds", adapter=rsd_lib_utils.num_or_none)
    """This represents the number of seconds between retry attempts for
       sending any given Event
    """

    event_types_for_subscription = base.Field("EventTypesForSubscription")
    """This is the types of Events that can be subscribed to."""

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    # TODO(linyang): Add Action Field

    @property
    @utils.cache_it
    def subscriptions(self):
        """Property to provide reference to `EventDestinationCollection` instance

           It is calculated once when it is queried for the first time. On
           refresh, this property is reset.
        """
        return event_destination.EventDestinationCollection(
            self._conn,
            utils.get_sub_resource_path_by(self, "Subscriptions"),
            redfish_version=self.redfish_version,
        )
예제 #17
0
class ProcessorSummaryField(base.CompositeField):
    """ProcessorSummary field

       This object describes the central processors of the system in general
       detail.
    """

    count = base.Field("Count", adapter=rsd_lib_utils.num_or_none)
    """The number of processors in the system."""

    model = base.Field("Model")
    """The processor model for the primary or majority of processors in this
       system.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
예제 #18
0
class LogService(rsd_lib_base.ResourceBase):
    """LogService resource class

       This resource represents the log service for the resource or service to
       which it is associated.
    """

    service_enabled = base.Field("ServiceEnabled", adapter=bool)
    """This indicates whether this service is enabled."""

    max_number_of_records = base.Field("MaxNumberOfRecords",
                                       adapter=rsd_lib_utils.num_or_none)
    """The maximum number of log entries this service can have."""

    over_write_policy = base.Field("OverWritePolicy")
    """The overwrite policy for this service that takes place when the log is
       full.
    """

    date_time = base.Field("DateTime")
    """The current DateTime (with offset) for the log service, used to set or
       read time.
    """

    date_time_local_offset = base.Field("DateTimeLocalOffset")
    """The time offset from UTC that the DateTime property is set to in
       format: +06:00 .
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """
    @property
    @utils.cache_it
    def entries(self):
        """Property to provide reference to `LogEntryCollection` instance

           It is calculated once when it is queried for the first time. On
           refresh, this property is reset.
        """
        return log_entry.LogEntryCollection(
            self._conn,
            utils.get_sub_resource_path_by(self, "Entries"),
            redfish_version=self.redfish_version,
        )
예제 #19
0
class ManagerNetworkProtocol(rsd_lib_base.ResourceBase):
    """ManagerNetworkProtocol resource class

       This resource is used to obtain or modify the network services managed
       by a given manager.
    """

    host_name = base.Field("HostName")
    """The DNS Host Name of this manager, without any domain information"""

    fqdn = base.Field("FQDN")
    """This is the fully qualified domain name for the manager obtained by DNS
       including the host name and top-level domain name.
    """

    http = ProtocolField("HTTP")
    """Settings for this Manager's HTTP protocol support"""

    https = ProtocolField("HTTPS")
    """Settings for this Manager's HTTPS protocol support"""

    snmp = ProtocolField("SNMP")
    """Settings for this Manager's SNMP support"""

    virtual_media = ProtocolField("VirtualMedia")
    """Settings for this Manager's Virtual Media support"""

    telnet = ProtocolField("Telnet")
    """Settings for this Manager's Telnet protocol support"""

    ssdp = SSDProtocolField("SSDP")
    """Settings for this Manager's SSDP support"""

    ipmi = ProtocolField("IPMI")
    """Settings for this Manager's IPMI-over-LAN protocol support"""

    ssh = ProtocolField("SSH")
    """Settings for this Manager's SSH (Secure Shell) protocol support"""

    kvmip = ProtocolField("KVMIP")
    """Settings for this Manager's KVM-IP protocol support"""

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
예제 #20
0
class TaskService(rsd_lib_base.ResourceBase):
    """TaskService resource class

       This is the schema definition for the Task Service.  It represents the
       properties for the service itself and has links to the actual list of
       tasks.
    """

    completed_task_over_write_policy = base.Field(
        "CompletedTaskOverWritePolicy"
    )
    """Overwrite policy of completed tasks"""

    date_time = base.Field("DateTime")
    """The current DateTime (with offset) setting that the task service is
       using.
    """

    life_cycle_event_on_task_state_change = base.Field(
        "LifeCycleEventOnTaskStateChange", adapter=bool
    )
    """Send an Event upon Task State Change."""

    service_enabled = base.Field("ServiceEnabled", adapter=bool)
    """This indicates whether this service is enabled."""

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    @property
    @utils.cache_it
    def tasks(self):
        """Property to provide reference to `TaskCollection` instance

           It is calculated once when it is queried for the first time. On
           refresh, this property is reset.
        """
        return task.TaskCollection(
            self._conn,
            utils.get_sub_resource_path_by(self, "Tasks"),
            redfish_version=self.redfish_version,
        )
예제 #21
0
class ThermalZone(rsd_lib_base.ResourceBase):

    status = rsd_lib_base.StatusField("Status")
    """The ThermalZone status"""

    rack_location = rack_location.RackLocationField("RackLocation")
    """The ThermalZone physical location"""

    presence = base.Field("Presence")
    """Indicates the aggregated Power Supply Unit presence information
       Aggregated Power Supply Unit presence format: Length of string indicate
       total slot of Power Supply Units in PowerZone.

       For each byte the string:
       "1" means present
       "0" means not present
    """

    desired_speed_pwm = base.Field("DesiredSpeedPWM",
                                   adapter=rsd_lib_utils.num_or_none)
    """The desired FAN speed in current ThermalZone present in PWM unit"""

    desired_speed_rpm = base.Field("DesiredSpeedRPM",
                                   adapter=rsd_lib_utils.num_or_none)
    """The desired FAN speed in current ThermalZone present in RPM unit"""

    max_fans_supported = base.Field("MaxFansSupported",
                                    adapter=rsd_lib_utils.num_or_none)
    """Number of maximum fans that can be installed in a given Thermal Zone"""

    number_of_fans_present = base.Field("NumberOfFansPresent",
                                        adapter=rsd_lib_utils.num_or_none)
    """The existing number of fans in current ThermalZone"""

    volumetric_airflow = base.Field("VolumetricAirflow",
                                    adapter=rsd_lib_utils.num_or_none)
    """Rack Level PTAS Telemetry - Volumetric airflow in current ThermalZone"""

    fans = FanCollectionField("Fans")
    """Details of the fans associated with this thermal zone"""

    temperatures = TemperatureSensorCollectionField("Temperatures")
    """Array of temperature sensors"""
예제 #22
0
class Volume(rsd_lib_base.ResourceBase):
    """Volume resource class

       Volume contains properties used to describe a volume, virtual disk,
       LUN, or other logical storage entity for any system.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    capacity_bytes = base.Field("CapacityBytes",
                                adapter=rsd_lib_utils.num_or_none)
    """The size in bytes of this Volume"""

    volume_type = base.Field("VolumeType")
    """The type of this volume"""

    encrypted = base.Field("Encrypted", adapter=bool)
    """Is this Volume encrypted"""

    encryption_types = base.Field("EncryptionTypes")
    """The types of encryption used by this Volume"""

    identifiers = rsd_lib_base.IdentifierCollectionField("Identifiers")
    """The Durable names for the volume"""

    block_size_bytes = base.Field("BlockSizeBytes",
                                  adapter=rsd_lib_utils.num_or_none)
    """The size of the smallest addressible unit (Block) of this volume in
       bytes
    """

    operations = OperationsCollectionField("Operations")
    """The operations currently running on the Volume"""

    optimum_io_size_bytes = base.Field("OptimumIOSizeBytes",
                                       adapter=rsd_lib_utils.num_or_none)
    """The size in bytes of this Volume's optimum IO size."""

    links = LinksField("Links")
    """Contains references to other resources that are related to this
예제 #23
0
class PowerZone(rsd_lib_base.ResourceBase):

    status = rsd_lib_base.StatusField("Status")
    """The PowerZone status"""

    rack_location = rack_location.RackLocationField("RackLocation")
    """The PowerZone physical location"""

    max_psus_supported = base.Field("MaxPSUsSupported",
                                    adapter=rsd_lib_utils.num_or_none)
    """The maximum number of Power Supply Units supported by PowerZone"""

    presence = base.Field("Presence")
    """Indicates the aggregated Power Supply Unit presence information
       Aggregated Power Supply Unit presence format: Length of string indicate
       total slot of Power Supply Units in PowerZone.

       For each byte the string:
       "1" means present
       "0" means not present
    """

    number_of_psus_present = base.Field("NumberOfPSUsPresent",
                                        adapter=rsd_lib_utils.num_or_none)
    """Indicates the number of existing Power Supply Units in PowerZone"""

    power_consumed_watts = base.Field("PowerConsumedWatts",
                                      adapter=rsd_lib_utils.num_or_none)
    """The total power consumption of PowerZone, sum of trays'
       power consumption
    """

    power_output_watts = base.Field("PowerOutputWatts",
                                    adapter=rsd_lib_utils.num_or_none)
    """The total power production of PowerZone, sum of PSUs' output"""

    power_capacity_watts = base.Field("PowerCapacityWatts",
                                      adapter=rsd_lib_utils.num_or_none)
    """The maximum power capacity supported by PowerZone"""

    power_supplies = PowerSupplyCollectionField("PowerSupplies")
    """Details of the power supplies associated with this system or device"""
예제 #24
0
class Thermal(rsd_lib_base.ResourceBase):
    """Thermal resource class

       This is the schema definition for the Thermal properties.  It
       represents the properties for Temperature and Cooling.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    temperatures = TemperatureCollectionField("Temperatures")
    """This is the definition for temperature sensors."""

    fans = FanCollectionField("Fans")
    """This is the definition for fans."""

    redundancy = redundancy.RedundancyCollectionField("Redundancy")
    """This structure is used to show redundancy for fans.  The Component ids
예제 #25
0
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."""
예제 #26
0
class PCIeFunction(rsd_lib_base.ResourceBase):
    """PCIeFunction resource class

       This is the schema definition for the PCIeFunction resource.  It
       represents the properties of a PCIeFunction attached to a System.
    """

    function_id = base.Field("FunctionId", adapter=rsd_lib_utils.num_or_none)
    """The the PCIe Function identifier."""

    function_type = base.Field("FunctionType")
    """The type of the PCIe Function."""

    device_class = base.Field("DeviceClass")
    """The class for this PCIe Function."""

    device_id = base.Field("DeviceId")
    """The Device ID of this PCIe function."""

    vendor_id = base.Field("VendorId")
    """The Vendor ID of this PCIe function."""

    class_code = base.Field("ClassCode")
    """The Class Code of this PCIe function."""

    revision_id = base.Field("RevisionId")
    """The Revision ID of this PCIe function."""

    subsystem_id = base.Field("SubsystemId")
    """The Subsystem ID of this PCIe function."""

    subsystem_vendor_id = base.Field("SubsystemVendorId")
    """The Subsystem Vendor ID of this PCIe function."""

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    links = LinksField("Links")
    """The links object contains the links to other resources that are related
예제 #27
0
class Endpoint(rsd_lib_base.ResourceBase):
    """Endpoint resource class

       This is the schema definition for the Endpoint resource. It represents
       the properties of an entity that sends or receives protocol defined
       messages over a transport.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    endpoint_protocol = base.Field("EndpointProtocol")
    """The protocol supported by this endpoint."""

    connected_entities = ConnectedEntityCollectionField("ConnectedEntities")
    """All the entities connected to this endpoint."""

    identifiers = rsd_lib_base.IdentifierCollectionField("Identifiers")
    """Identifiers for this endpoint"""

    pci_id = PciIdField("PciId")
    """The PCI ID of the endpoint."""

    host_reservation_memory_bytes = base.Field(
        "HostReservationMemoryBytes", adapter=rsd_lib_utils.num_or_none)
    """The amount of memory in Bytes that the Host should allocate to connect
       to this endpoint.
    """

    links = LinksField("Links")
    """The links object contains the links to other resources that are related
       to this resource.
    """

    redundancy = redundancy.RedundancyCollectionField("Redundancy")
    """Redundancy information for the lower level endpoints supporting this
예제 #28
0
class NetworkInterface(rsd_lib_base.ResourceBase):
    """NetworkInterface resource class

       A NetworkInterface contains references linking  NetworkDeviceFunction
       resources and represents the functionality available to the containing
       system.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    def __init__(self, connector, identity, redfish_version=None):
        """A class representing a NetworkInterface

        :param connector: A Connector instance
        :param identity: The identity of the NetworkInterface
        :param redfish_version: The version of RedFish. Used to construct
            the object according to schema of the given version.
        """
        super(NetworkInterface, self).__init__(
            connector, identity, redfish_version
        )

    @property
    @utils.cache_it
    def network_device_functions(self):
        """Property to provide reference to `NetworkDeviceFunctionCollection` instance

           It is calculated once when it is queried for the first time. On
           refresh, this property is reset.
        """
        return network_device_function.NetworkDeviceFunctionCollection(
            self._conn,
            utils.get_sub_resource_path_by(self, "NetworkDeviceFunctions"),
            redfish_version=self.redfish_version,
        )
예제 #29
0
class RedundancyCollectionField(rsd_lib_base.ReferenceableMemberField):
    """Redundancy field

       This is the redundancy definition to be used in other resource schemas.
    """

    name = base.Field("Name")
    """The name of the resource or array element."""

    mode = base.Field("Mode")
    """This is the redundancy mode of the group."""

    max_num_supported = base.Field(
        "MaxNumSupported", adapter=rsd_lib_utils.num_or_none
    )
    """This is the maximum number of members allowable for this particular
       redundancy group.
    """

    min_num_needed = base.Field(
        "MinNumNeeded", adapter=rsd_lib_utils.num_or_none
    )
    """This is the minumum number of members needed for this group to be
       redundant.
    """

    status = rsd_lib_base.StatusField("Status")
    """This indicates the known state of the resource, such as if it is
       enabled.
    """

    redundancy_set = base.Field(
        "RedundancySet", adapter=utils.get_members_identities
    )
    """Contains any ids that represent components of this redundancy set."""

    redundancy_enabled = base.Field("RedundancyEnabled", adapter=bool)
    """This indicates whether redundancy is enabled."""
예제 #30
0
class TemperatureSensorCollectionField(rsd_lib_base.ReferenceableMemberField):

    name = base.Field("Name")
    """The Power Supply name"""

    reading_celsius = base.Field("ReadingCelsius",
                                 adapter=rsd_lib_utils.num_or_none)
    """Current value of the temperature sensor's reading"""

    physical_context = base.Field("PhysicalContext")
    """Describes the area or device to which this temperature measurement
       applies:
       "Intake" - The intake point of the chassis
       "Exhaust" - The exhaust point of the chassis
       "Backplane" - A backplane within the chassis
       "PowerSupply" - A power supply
       "SystemBoard" - The system board (PCB)
       "ComputeBay" - Within a compute bay
       "PowerSupplyBay" - Within a power supply bay
    """

    status = rsd_lib_base.StatusField("Status")
    """The temperature sensors status"""