Add Fan and FanCollection schema
Based on DSP8010_2022.2 and adds the schema of Fan and FanCollection.
Tested: built bmcweb successfully and validator passes
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Id1867a6f19d47d0fb1d686d650f7d936c33b5284
diff --git a/static/redfish/v1/JsonSchemas/Fan/Fan.json b/static/redfish/v1/JsonSchemas/Fan/Fan.json
new file mode 100644
index 0000000..a21f2d5
--- /dev/null
+++ b/static/redfish/v1/JsonSchemas/Fan/Fan.json
@@ -0,0 +1,296 @@
+{
+ "$id": "http://redfish.dmtf.org/schemas/v1/Fan.v1_3_0.json",
+ "$ref": "#/definitions/Fan",
+ "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json",
+ "copyright": "Copyright 2014-2022 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright",
+ "definitions": {
+ "Actions": {
+ "additionalProperties": false,
+ "description": "The available actions for this resource.",
+ "longDescription": "This type shall contain the available actions for this resource.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "integer",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "Oem": {
+ "$ref": "#/definitions/OemActions",
+ "description": "The available OEM-specific actions for this resource.",
+ "longDescription": "This property shall contain the available OEM-specific actions for this resource."
+ }
+ },
+ "type": "object"
+ },
+ "Fan": {
+ "additionalProperties": false,
+ "description": "The Fan schema describes a cooling fan unit for a computer system or similar devices contained within a chassis.",
+ "longDescription": "This resource shall represent the management properties for monitoring and management of cooling fans for a Redfish implementation.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "integer",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "@odata.context": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/context"
+ },
+ "@odata.etag": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/etag"
+ },
+ "@odata.id": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/id"
+ },
+ "@odata.type": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/type"
+ },
+ "Actions": {
+ "$ref": "#/definitions/Actions",
+ "description": "The available actions for this resource.",
+ "longDescription": "This property shall contain the available actions for this resource."
+ },
+ "Assembly": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Assembly.json#/definitions/Assembly",
+ "description": "The link to the assembly associated with this fan.",
+ "longDescription": "This property shall contain a link to a resource of type Assembly.",
+ "readonly": true
+ },
+ "Description": {
+ "anyOf": [
+ {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "readonly": true
+ },
+ "HotPluggable": {
+ "description": "An indication of whether this device can be inserted or removed while the equipment is in operation.",
+ "longDescription": "This property shall indicate whether the device can be inserted or removed while the underlying equipment otherwise remains in its current operational state. Hot-pluggable devices can become operable without altering the operational state of the underlying equipment. Devices that cannot be inserted or removed from equipment in operation, or devices that cannot become operable without affecting the operational state of that equipment, shall be not hot-pluggable.",
+ "readonly": true,
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "Id": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
+ "readonly": true
+ },
+ "Links": {
+ "$ref": "#/definitions/Links",
+ "description": "The links to other resources that are related to this resource.",
+ "longDescription": "This property shall contain links to resources that are related to but are not contained by, or subordinate to, this resource.",
+ "versionAdded": "v1_2_0"
+ },
+ "Location": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Location",
+ "description": "The location of the fan.",
+ "longDescription": "This property shall contain location information of this fan."
+ },
+ "LocationIndicatorActive": {
+ "description": "An indicator allowing an operator to physically locate this resource.",
+ "longDescription": "This property shall contain the state of the indicator used to physically identify or locate this resource.",
+ "readonly": false,
+ "type": [
+ "boolean",
+ "null"
+ ]
+ },
+ "Manufacturer": {
+ "description": "The manufacturer of this fan.",
+ "longDescription": "This property shall contain the name of the organization responsible for producing the fan. This organization may be the entity from whom the fan is purchased, but this is not necessarily true.",
+ "readonly": true,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "Model": {
+ "description": "The model number for this fan.",
+ "longDescription": "This property shall contain the model information as defined by the manufacturer for this fan.",
+ "readonly": true,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "Name": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name",
+ "readonly": true
+ },
+ "Oem": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
+ "description": "The OEM extension property.",
+ "longDescription": "This property shall contain the OEM extensions. All values for properties that this object contains shall conform to the Redfish Specification-described requirements."
+ },
+ "PartNumber": {
+ "description": "The part number for this fan.",
+ "longDescription": "This property shall contain the part number as defined by the manufacturer for this fan.",
+ "readonly": true,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "PhysicalContext": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/PhysicalContext.json#/definitions/PhysicalContext",
+ "description": "The area or device associated with this fan.",
+ "longDescription": "This property shall contain a description of the affected device or region within the chassis with which this fan is associated.",
+ "readonly": true
+ },
+ "PowerWatts": {
+ "anyOf": [
+ {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorPowerExcerpt"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Power consumption (W).",
+ "excerptCopy": "SensorPowerExcerpt",
+ "longDescription": "This property shall contain the total power, in watt units, for this resource. The value of the DataSourceUri property, if present, shall reference a resource of type Sensor with the ReadingType property containing the value `Power`.",
+ "versionAdded": "v1_1_0"
+ },
+ "Replaceable": {
+ "description": "An indication of whether this component can be independently replaced as allowed by the vendor's replacement policy.",
+ "longDescription": "This property shall indicate whether this component can be independently replaced as allowed by the vendor's replacement policy. A value of `false` indicates the component needs to be replaced by policy, as part of another component. If the `LocationType` property of this component contains `Embedded`, this property shall contain `false`.",
+ "readonly": true,
+ "type": [
+ "boolean",
+ "null"
+ ],
+ "versionAdded": "v1_3_0"
+ },
+ "SerialNumber": {
+ "description": "The serial number for this fan.",
+ "longDescription": "This property shall contain the serial number as defined by the manufacturer for this fan.",
+ "readonly": true,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "SparePartNumber": {
+ "description": "The spare part number for this fan.",
+ "longDescription": "This property shall contain the spare or replacement part number as defined by the manufacturer for this fan.",
+ "readonly": true,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "SpeedPercent": {
+ "anyOf": [
+ {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Sensor.json#/definitions/SensorFanExcerpt"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The fan speed (percent).",
+ "excerptCopy": "SensorFanExcerpt",
+ "longDescription": "This property shall contain the fan speed, in percent units, for this resource. The value of the DataSourceUri property, if present, shall reference a resource of type Sensor with the ReadingType property containing the value `Percent`."
+ },
+ "Status": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Status",
+ "description": "The status and health of the resource and its subordinate or dependent resources.",
+ "longDescription": "This property shall contain any status or health properties of the resource."
+ }
+ },
+ "required": [
+ "@odata.id",
+ "@odata.type",
+ "Id",
+ "Name"
+ ],
+ "type": "object"
+ },
+ "Links": {
+ "additionalProperties": false,
+ "description": "The links to other resources that are related to this resource.",
+ "longDescription": "This Redfish Specification-described type shall contain links to resources that are related to but are not contained by, or subordinate to, this resource.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "integer",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "CoolingChassis": {
+ "description": "An array of links to the chassis that are directly cooled by this fan.",
+ "items": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Chassis.json#/definitions/Chassis"
+ },
+ "longDescription": "This property shall contain an array of links to resources of type Chassis that represent the chassis directly cooled by this fan. This property shall not be present if the fan is only providing cooling to its containing chassis.",
+ "readonly": true,
+ "type": "array",
+ "versionAdded": "v1_2_0"
+ },
+ "CoolingChassis@odata.count": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/count"
+ },
+ "Oem": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
+ "description": "The OEM extension property.",
+ "longDescription": "This property shall contain the OEM extensions. All values for properties contained in this object shall conform to the Redfish Specification-described requirements."
+ }
+ },
+ "type": "object"
+ },
+ "OemActions": {
+ "additionalProperties": true,
+ "description": "The available OEM-specific actions for this resource.",
+ "longDescription": "This type shall contain the available OEM-specific actions for this resource.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "integer",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {},
+ "type": "object"
+ }
+ },
+ "owningEntity": "DMTF",
+ "release": "2022.2",
+ "title": "#Fan.v1_3_0.Fan"
+}
\ No newline at end of file