Fix JsonSchema indexes
JsonSchema was throwing errors in the validator, so implement changes to
the update script to add the appropiate indexes.
Tested by:
Schema validator passes on the JsonSchema Fields
Change-Id: I6cb2737901b55c1089aef744d3ce3c3dfe13f17f
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/static/redfish/v1/JsonSchemas/Bios/Bios.json b/static/redfish/v1/JsonSchemas/Bios/Bios.json
new file mode 100644
index 0000000..de2936a
--- /dev/null
+++ b/static/redfish/v1/JsonSchemas/Bios/Bios.json
@@ -0,0 +1,244 @@
+{
+ "$ref": "#/definitions/Bios",
+ "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema.v1_3_0.json",
+ "copyright": "Copyright 2014-2017 Distributed Management Task Force, Inc. (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|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "#Bios.ChangePassword": {
+ "$ref": "#/definitions/ChangePassword"
+ },
+ "#Bios.ResetBios": {
+ "$ref": "#/definitions/ResetBios"
+ },
+ "Oem": {
+ "$ref": "#/definitions/OemActions"
+ }
+ },
+ "type": "object"
+ },
+ "Attributes": {
+ "additionalProperties": false,
+ "description": "The manufacturer/provider-specific list of BIOS attributes.",
+ "longDescription": "This type shall describe BIOS Attribute settings as additional properties in this object, and can be looked up in the Attribute Registry by their AttributeName.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ },
+ "^[A-Za-z][A-Za-z0-9_]+$": {
+ "type": [
+ "string",
+ "boolean",
+ "number",
+ "null"
+ ]
+ }
+ },
+ "properties": {},
+ "type": "object"
+ },
+ "Bios": {
+ "additionalProperties": true,
+ "description": "The Bios schema contains properties related to the BIOS Attribute Registry. The Attribute Registry describes the system-specific BIOS attributes and Actions for changing to BIOS settings. Changes to the BIOS typically require a system reset before they take effect.",
+ "longDescription": "This resource shall be used to represent BIOS attributes for a Redfish implementation.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "@odata.context": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/context"
+ },
+ "@odata.id": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/id"
+ },
+ "@odata.type": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/type"
+ },
+ "Actions": {
+ "$ref": "#/definitions/Actions",
+ "description": "The available actions for this resource.",
+ "longDescription": "The Actions property shall contain the available actions for this resource."
+ },
+ "AttributeRegistry": {
+ "description": "The Resource ID of the Attribute Registry that has the system-specific information about a BIOS resource.",
+ "longDescription": "The reference to the Attribute Registry that lists the metadata describing the BIOS attribute settings in this resource.",
+ "readonly": true,
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "Attributes": {
+ "$ref": "#/definitions/Attributes",
+ "description": "The list of BIOS attributes specific to the manufacturer or provider.",
+ "longDescription": "BIOS Attribute settings appear as additional properties in this object, and can be looked up in the Attribute Registry by their AttributeName."
+ },
+ "Description": {
+ "anyOf": [
+ {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "readonly": true
+ },
+ "Id": {
+ "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
+ "readonly": true
+ },
+ "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": "This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections.",
+ "longDescription": "The value of this string shall be of the format for the reserved word *Oem*."
+ }
+ },
+ "required": [
+ "Id",
+ "Name"
+ ],
+ "type": "object"
+ },
+ "ChangePassword": {
+ "additionalProperties": false,
+ "description": "This action is used to change the BIOS passwords.",
+ "longDescription": "This action shall perform a change of the selected BIOS password.",
+ "parameters": {
+ "NewPassword": {
+ "description": "The value of the new BIOS password.",
+ "longDescription": "This parameter shall define the value of the new BIOS password.",
+ "requiredParameter": true,
+ "type": "string"
+ },
+ "OldPassword": {
+ "description": "The value of the existing password.",
+ "longDescription": "This parameter shall define the value of the existing BIOS password that is about to be changed.",
+ "requiredParameter": true,
+ "type": "string"
+ },
+ "PasswordName": {
+ "description": "The name of the BIOS password to change.",
+ "longDescription": "This parameter shall define the BIOS password name to change. For instance, this could be the AdminPassword or UserPassword.",
+ "requiredParameter": true,
+ "type": "string"
+ }
+ },
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "target": {
+ "description": "Link to invoke action",
+ "format": "uri",
+ "type": "string"
+ },
+ "title": {
+ "description": "Friendly action name",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "OemActions": {
+ "additionalProperties": true,
+ "description": "The available OEM specific actions for this resource.",
+ "longDescription": "This type shall contain any additional OEM actions for this resource.",
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {},
+ "type": "object"
+ },
+ "ResetBios": {
+ "additionalProperties": false,
+ "description": "This action is used to reset the BIOS attributes to default.",
+ "longDescription": "This action shall perform a reset of the BIOS attributes to teir default values.",
+ "parameters": {},
+ "patternProperties": {
+ "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
+ "description": "This property shall specify a valid odata or Redfish property.",
+ "type": [
+ "array",
+ "boolean",
+ "number",
+ "null",
+ "object",
+ "string"
+ ]
+ }
+ },
+ "properties": {
+ "target": {
+ "description": "Link to invoke action",
+ "format": "uri",
+ "type": "string"
+ },
+ "title": {
+ "description": "Friendly action name",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "title": "#Bios.v1_0_3.Bios"
+}
\ No newline at end of file
diff --git a/static/redfish/v1/JsonSchemas/Bios/index.json b/static/redfish/v1/JsonSchemas/Bios/index.json
index de2936a..498b2ac 100644
--- a/static/redfish/v1/JsonSchemas/Bios/index.json
+++ b/static/redfish/v1/JsonSchemas/Bios/index.json
@@ -1,244 +1,21 @@
{
- "$ref": "#/definitions/Bios",
- "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema.v1_3_0.json",
- "copyright": "Copyright 2014-2017 Distributed Management Task Force, Inc. (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|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
- "description": "This property shall specify a valid odata or Redfish property.",
- "type": [
- "array",
- "boolean",
- "number",
- "null",
- "object",
- "string"
- ]
- }
- },
- "properties": {
- "#Bios.ChangePassword": {
- "$ref": "#/definitions/ChangePassword"
- },
- "#Bios.ResetBios": {
- "$ref": "#/definitions/ResetBios"
- },
- "Oem": {
- "$ref": "#/definitions/OemActions"
- }
- },
- "type": "object"
- },
- "Attributes": {
- "additionalProperties": false,
- "description": "The manufacturer/provider-specific list of BIOS attributes.",
- "longDescription": "This type shall describe BIOS Attribute settings as additional properties in this object, and can be looked up in the Attribute Registry by their AttributeName.",
- "patternProperties": {
- "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
- "description": "This property shall specify a valid odata or Redfish property.",
- "type": [
- "array",
- "boolean",
- "number",
- "null",
- "object",
- "string"
- ]
- },
- "^[A-Za-z][A-Za-z0-9_]+$": {
- "type": [
- "string",
- "boolean",
- "number",
- "null"
- ]
- }
- },
- "properties": {},
- "type": "object"
- },
- "Bios": {
- "additionalProperties": true,
- "description": "The Bios schema contains properties related to the BIOS Attribute Registry. The Attribute Registry describes the system-specific BIOS attributes and Actions for changing to BIOS settings. Changes to the BIOS typically require a system reset before they take effect.",
- "longDescription": "This resource shall be used to represent BIOS attributes for a Redfish implementation.",
- "patternProperties": {
- "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
- "description": "This property shall specify a valid odata or Redfish property.",
- "type": [
- "array",
- "boolean",
- "number",
- "null",
- "object",
- "string"
- ]
- }
- },
- "properties": {
- "@odata.context": {
- "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/context"
- },
- "@odata.id": {
- "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/id"
- },
- "@odata.type": {
- "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_1.json#/definitions/type"
- },
- "Actions": {
- "$ref": "#/definitions/Actions",
- "description": "The available actions for this resource.",
- "longDescription": "The Actions property shall contain the available actions for this resource."
- },
- "AttributeRegistry": {
- "description": "The Resource ID of the Attribute Registry that has the system-specific information about a BIOS resource.",
- "longDescription": "The reference to the Attribute Registry that lists the metadata describing the BIOS attribute settings in this resource.",
- "readonly": true,
- "type": [
- "string",
- "null"
- ]
- },
- "Attributes": {
- "$ref": "#/definitions/Attributes",
- "description": "The list of BIOS attributes specific to the manufacturer or provider.",
- "longDescription": "BIOS Attribute settings appear as additional properties in this object, and can be looked up in the Attribute Registry by their AttributeName."
- },
- "Description": {
- "anyOf": [
- {
- "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
- },
- {
- "type": "null"
- }
- ],
- "readonly": true
- },
- "Id": {
- "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
- "readonly": true
- },
- "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": "This is the manufacturer/provider specific extension moniker used to divide the Oem object into sections.",
- "longDescription": "The value of this string shall be of the format for the reserved word *Oem*."
- }
- },
- "required": [
- "Id",
- "Name"
- ],
- "type": "object"
- },
- "ChangePassword": {
- "additionalProperties": false,
- "description": "This action is used to change the BIOS passwords.",
- "longDescription": "This action shall perform a change of the selected BIOS password.",
- "parameters": {
- "NewPassword": {
- "description": "The value of the new BIOS password.",
- "longDescription": "This parameter shall define the value of the new BIOS password.",
- "requiredParameter": true,
- "type": "string"
- },
- "OldPassword": {
- "description": "The value of the existing password.",
- "longDescription": "This parameter shall define the value of the existing BIOS password that is about to be changed.",
- "requiredParameter": true,
- "type": "string"
- },
- "PasswordName": {
- "description": "The name of the BIOS password to change.",
- "longDescription": "This parameter shall define the BIOS password name to change. For instance, this could be the AdminPassword or UserPassword.",
- "requiredParameter": true,
- "type": "string"
- }
- },
- "patternProperties": {
- "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
- "description": "This property shall specify a valid odata or Redfish property.",
- "type": [
- "array",
- "boolean",
- "number",
- "null",
- "object",
- "string"
- ]
- }
- },
- "properties": {
- "target": {
- "description": "Link to invoke action",
- "format": "uri",
- "type": "string"
- },
- "title": {
- "description": "Friendly action name",
- "type": "string"
- }
- },
- "type": "object"
- },
- "OemActions": {
- "additionalProperties": true,
- "description": "The available OEM specific actions for this resource.",
- "longDescription": "This type shall contain any additional OEM actions for this resource.",
- "patternProperties": {
- "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
- "description": "This property shall specify a valid odata or Redfish property.",
- "type": [
- "array",
- "boolean",
- "number",
- "null",
- "object",
- "string"
- ]
- }
- },
- "properties": {},
- "type": "object"
- },
- "ResetBios": {
- "additionalProperties": false,
- "description": "This action is used to reset the BIOS attributes to default.",
- "longDescription": "This action shall perform a reset of the BIOS attributes to teir default values.",
- "parameters": {},
- "patternProperties": {
- "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message|Privileges)\\.[a-zA-Z_][a-zA-Z0-9_.]+$": {
- "description": "This property shall specify a valid odata or Redfish property.",
- "type": [
- "array",
- "boolean",
- "number",
- "null",
- "object",
- "string"
- ]
- }
- },
- "properties": {
- "target": {
- "description": "Link to invoke action",
- "format": "uri",
- "type": "string"
- },
- "title": {
- "description": "Friendly action name",
- "type": "string"
- }
- },
- "type": "object"
+ "@odata.context": "/redfish/v1/$metadata#JsonSchemaFile.JsonSchemaFile",
+ "@odata.id": "/redfish/v1/JSONSchemas/Bios",
+ "@odata.type": "#JsonSchemaFile.v1_0_2.JsonSchemaFile",
+ "Name": "Bios Schema File",
+ "Schema": "#Bios.Bios",
+ "Description": "Bios Schema File Location",
+ "Id": "Bios",
+ "Languages": [
+ "en"
+ ],
+ "Languages@odata.count": 1,
+ "Location": [
+ {
+ "Language": "en",
+ "PublicationUri": "http://redfish.dmtf.org/schemas/v1/Bios.json",
+ "Uri": "/redfish/v1/JSONSchemas/Bios/Bios.json"
}
- },
- "title": "#Bios.v1_0_3.Bios"
+ ],
+ "Location@odata.count": 1
}
\ No newline at end of file