cable: add cable type and cable decorator

Add cable type to the global schema types and cable decorator with
Length and Type properties.

Change-Id: I5368c16b91c94980be1b10cbfaf7969933e0507e
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/schemas/global.json b/schemas/global.json
index 6b67cf1..d1cf0a6 100644
--- a/schemas/global.json
+++ b/schemas/global.json
@@ -94,7 +94,14 @@
                 "Type": {
                     "title": "Configuration Type",
                     "description": "The schema for the type property. The type property identifies the type of the configuration.  When exported, configurations will be instantiated as children of: /xyz/openbmc_project/configuration/<Type>",
-                    "enum": ["Board", "Chassis", "NVMe", "PowerSupply", "CPU"]
+                    "enum": [
+                        "Board",
+                        "Chassis",
+                        "NVMe",
+                        "PowerSupply",
+                        "CPU",
+                        "Cable"
+                    ]
                 },
                 "xyz.openbmc_project.Common.UUID": {
                     "$ref": "openbmc-dbus.json#/$defs/xyz/openbmc_project/Common/UUID"
@@ -108,6 +115,9 @@
                 "xyz.openbmc_project.Inventory.Decorator.AssetTag": {
                     "$ref": "openbmc-dbus.json#/$defs/xyz/openbmc_project/Inventory/Decorator/AssetTag"
                 },
+                "xyz.openbmc_project.Inventory.Decorator.Cable": {
+                    "$ref": "openbmc-dbus.json#/$defs/xyz/openbmc_project/Inventory/Decorator/Cable"
+                },
                 "xyz.openbmc_project.Inventory.Decorator.Compatible": {
                     "$ref": "openbmc-dbus.json#/$defs/xyz/openbmc_project/Inventory/Decorator/Compatible"
                 },
diff --git a/schemas/openbmc-dbus.json b/schemas/openbmc-dbus.json
index ace8cfa..bc9a988 100644
--- a/schemas/openbmc-dbus.json
+++ b/schemas/openbmc-dbus.json
@@ -69,6 +69,19 @@
                             "required": ["HostIndex"],
                             "type": "object"
                         },
+                        "Cable": {
+                            "additionalProperties": false,
+                            "properties": {
+                                "Length": {
+                                    "type": "number"
+                                },
+                                "Type": {
+                                    "enum": ["Optical", "Copper", "Unknown"]
+                                }
+                            },
+                            "required": ["Length", "Type"],
+                            "type": "object"
+                        },
                         "Replaceable": {
                             "additionalProperties": false,
                             "properties": {