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/PCIeFunction/PCIeFunction.json b/static/redfish/v1/JsonSchemas/PCIeFunction/PCIeFunction.json
new file mode 100644
index 0000000..1ba6eb8
--- /dev/null
+++ b/static/redfish/v1/JsonSchemas/PCIeFunction/PCIeFunction.json
@@ -0,0 +1,364 @@
+{
+    "$ref": "#/definitions/PCIeFunction",
+    "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema.v1_4_0.json",
+    "copyright": "Copyright 2014-2018 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)\\.[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": {
+                "Oem": {
+                    "$ref": "#/definitions/OemActions"
+                }
+            },
+            "type": "object"
+        },
+        "DeviceClass": {
+            "enum": [
+                "UnclassifiedDevice",
+                "MassStorageController",
+                "NetworkController",
+                "DisplayController",
+                "MultimediaController",
+                "MemoryController",
+                "Bridge",
+                "CommunicationController",
+                "GenericSystemPeripheral",
+                "InputDeviceController",
+                "DockingStation",
+                "Processor",
+                "SerialBusController",
+                "WirelessController",
+                "IntelligentController",
+                "SatelliteCommunicationsController",
+                "EncryptionController",
+                "SignalProcessingController",
+                "ProcessingAccelerators",
+                "NonEssentialInstrumentation",
+                "Coprocessor",
+                "UnassignedClass",
+                "Other"
+            ],
+            "enumDescriptions": {
+                "Bridge": "A bridge.",
+                "CommunicationController": "A communication controller.",
+                "Coprocessor": "A coprocessor.",
+                "DisplayController": "A display controller.",
+                "DockingStation": "A docking station.",
+                "EncryptionController": "An encryption controller.",
+                "GenericSystemPeripheral": "A generic system peripheral.",
+                "InputDeviceController": "An input device controller.",
+                "IntelligentController": "An intelligent controller.",
+                "MassStorageController": "A mass storage controller.",
+                "MemoryController": "A memory controller.",
+                "MultimediaController": "A multimedia controller.",
+                "NetworkController": "A network controller.",
+                "NonEssentialInstrumentation": "A non-essential instrumentation.",
+                "Other": "A other class. The function Device Class Id needs to be verified.",
+                "ProcessingAccelerators": "A processing accelerators.",
+                "Processor": "A processor.",
+                "SatelliteCommunicationsController": "A satellite communications controller.",
+                "SerialBusController": "A serial bus controller.",
+                "SignalProcessingController": "A signal processing controller.",
+                "UnassignedClass": "An unassigned class.",
+                "UnclassifiedDevice": "An unclassified device.",
+                "WirelessController": "A wireless controller."
+            },
+            "type": "string"
+        },
+        "FunctionType": {
+            "enum": [
+                "Physical",
+                "Virtual"
+            ],
+            "enumDescriptions": {
+                "Physical": "A physical PCie function.",
+                "Virtual": "A virtual PCIe function."
+            },
+            "type": "string"
+        },
+        "Links": {
+            "additionalProperties": false,
+            "description": "Contains references to other resources that are related to this resource.",
+            "longDescription": "This type, as described by the Redfish Specification, shall contain references to resources that are related to, but not contained by (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",
+                        "number",
+                        "null",
+                        "object",
+                        "string"
+                    ]
+                }
+            },
+            "properties": {
+                "Drives": {
+                    "description": "An array of references to the drives which the PCIe device produces.",
+                    "items": {
+                        "$ref": "http://redfish.dmtf.org/schemas/v1/Drive.json#/definitions/Drive"
+                    },
+                    "longDescription": "The value of this property shall reference a resource of type Drive that represents the storage drives associated with this resource.",
+                    "readonly": true,
+                    "type": "array"
+                },
+                "Drives@odata.count": {
+                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_2.json#/definitions/count"
+                },
+                "EthernetInterfaces": {
+                    "description": "An array of references to the ethernet interfaces which the PCIe device produces.",
+                    "items": {
+                        "$ref": "http://redfish.dmtf.org/schemas/v1/EthernetInterface.json#/definitions/EthernetInterface"
+                    },
+                    "longDescription": "The value of this property shall reference a resource of type EthernetInterface that represents the network interfaces associated with this resource.",
+                    "readonly": true,
+                    "type": "array"
+                },
+                "EthernetInterfaces@odata.count": {
+                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_2.json#/definitions/count"
+                },
+                "NetworkDeviceFunctions": {
+                    "description": "An array of references to the Network Device Functions which the PCIe device produces.",
+                    "items": {
+                        "$ref": "http://redfish.dmtf.org/schemas/v1/NetworkDeviceFunction.json#/definitions/NetworkDeviceFunction"
+                    },
+                    "longDescription": "The value of this property shall be an array of references to resources of type NetworkDeviceFunction that represents the network device functions associated with this resource.",
+                    "readonly": true,
+                    "type": "array"
+                },
+                "NetworkDeviceFunctions@odata.count": {
+                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_2.json#/definitions/count"
+                },
+                "Oem": {
+                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
+                    "description": "Oem extension object.",
+                    "longDescription": "This object represents the Oem property.  All values for resources described by this schema shall comply to the requirements as described in the Redfish specification."
+                },
+                "PCIeDevice": {
+                    "anyOf": [
+                        {
+                            "$ref": "http://redfish.dmtf.org/schemas/v1/PCIeDevice.json#/definitions/PCIeDevice"
+                        },
+                        {
+                            "type": "null"
+                        }
+                    ],
+                    "description": "A reference to the PCIeDevice on which this function resides.",
+                    "longDescription": "The value of this property shall be a reference to the resource that this function is a part of and shall reference a resource of type PCIeDevice.",
+                    "readonly": true
+                },
+                "StorageControllers": {
+                    "description": "An array of references to the storage controllers which the PCIe device produces.",
+                    "items": {
+                        "$ref": "http://redfish.dmtf.org/schemas/v1/Storage.json#/definitions/StorageController"
+                    },
+                    "longDescription": "The value of this property shall reference a resource of type StorageController that represents the storage controllers associated with this resource.",
+                    "readonly": true,
+                    "type": "array"
+                },
+                "StorageControllers@odata.count": {
+                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_2.json#/definitions/count"
+                }
+            },
+            "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)\\.[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"
+        },
+        "PCIeFunction": {
+            "additionalProperties": false,
+            "description": "This is the schema definition for the PCIeFunction resource.  It represents the properties of a PCIeFunction attached to a System.",
+            "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",
+                        "number",
+                        "null",
+                        "object",
+                        "string"
+                    ]
+                }
+            },
+            "properties": {
+                "@odata.context": {
+                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_2.json#/definitions/context"
+                },
+                "@odata.etag": {
+                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_2.json#/definitions/etag"
+                },
+                "@odata.id": {
+                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_2.json#/definitions/id"
+                },
+                "@odata.type": {
+                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata.v4_0_2.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."
+                },
+                "ClassCode": {
+                    "description": "The Class Code of this PCIe function.",
+                    "longDescription": "The value of this property shall be the PCI Class Code of the PCIe device function.",
+                    "pattern": "^0[xX](([a-fA-F]|[0-9]){2}){3}$",
+                    "readonly": true,
+                    "type": [
+                        "string",
+                        "null"
+                    ]
+                },
+                "Description": {
+                    "anyOf": [
+                        {
+                            "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
+                        },
+                        {
+                            "type": "null"
+                        }
+                    ],
+                    "readonly": true
+                },
+                "DeviceClass": {
+                    "$ref": "#/definitions/DeviceClass",
+                    "description": "The class for this PCIe Function.",
+                    "longDescription": "The value of this property shall be the device class of the PCIe device function such as Storage, Network, Memory etc.",
+                    "readonly": true
+                },
+                "DeviceId": {
+                    "description": "The Device ID of this PCIe function.",
+                    "longDescription": "The value of this property shall be the PCI Device ID of the PCIe device function.",
+                    "pattern": "^0[xX](([a-fA-F]|[0-9]){2}){2}$",
+                    "readonly": true,
+                    "type": [
+                        "string",
+                        "null"
+                    ]
+                },
+                "FunctionId": {
+                    "description": "The the PCIe Function identifier.",
+                    "longDescription": "The value of this property shall the PCIe device function number within a given PCIe device.",
+                    "readonly": true,
+                    "type": [
+                        "number",
+                        "null"
+                    ]
+                },
+                "FunctionType": {
+                    "$ref": "#/definitions/FunctionType",
+                    "description": "The type of the PCIe Function.",
+                    "longDescription": "The value of this property shall be the function type of the PCIe device function such as Physical or Virtual.",
+                    "readonly": true
+                },
+                "Id": {
+                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
+                    "readonly": true
+                },
+                "Links": {
+                    "$ref": "#/definitions/Links",
+                    "description": "The links object contains the links to other resources that are related to this resource."
+                },
+                "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*."
+                },
+                "RevisionId": {
+                    "description": "The Revision ID of this PCIe function.",
+                    "longDescription": "The value of this property shall be the PCI Revision ID of the PCIe device function.",
+                    "pattern": "^0[xX](([a-fA-F]|[0-9]){2}){1}$",
+                    "readonly": true,
+                    "type": [
+                        "string",
+                        "null"
+                    ]
+                },
+                "Status": {
+                    "anyOf": [
+                        {
+                            "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Status"
+                        },
+                        {
+                            "type": "null"
+                        }
+                    ]
+                },
+                "SubsystemId": {
+                    "description": "The Subsystem ID of this PCIe function.",
+                    "longDescription": "The value of this property shall be the PCI Subsystem ID of the PCIe device function.",
+                    "pattern": "^0[xX](([a-fA-F]|[0-9]){2}){2}$",
+                    "readonly": true,
+                    "type": [
+                        "string",
+                        "null"
+                    ]
+                },
+                "SubsystemVendorId": {
+                    "description": "The Subsystem Vendor ID of this PCIe function.",
+                    "longDescription": "The value of this property shall be the PCI Subsystem Vendor ID of the PCIe device function.",
+                    "pattern": "^0[xX](([a-fA-F]|[0-9]){2}){2}$",
+                    "readonly": true,
+                    "type": [
+                        "string",
+                        "null"
+                    ]
+                },
+                "VendorId": {
+                    "description": "The Vendor ID of this PCIe function.",
+                    "longDescription": "The value of this property shall be the PCI Vendor ID of the PCIe device function.",
+                    "pattern": "^0[xX](([a-fA-F]|[0-9]){2}){2}$",
+                    "readonly": true,
+                    "type": [
+                        "string",
+                        "null"
+                    ]
+                }
+            },
+            "required": [
+                "Id",
+                "Name"
+            ],
+            "type": "object"
+        }
+    },
+    "owningEntity": "DMTF",
+    "title": "#PCIeFunction.v1_2_0.PCIeFunction"
+}
\ No newline at end of file