xref: /openbmc/entity-manager/schemas/topology.json (revision f850ecad00900a9d338950e28506c04af42b8883)
1{
2    "$schema": "http://json-schema.org/draft-07/schema#",
3    "$defs": {
4        "Port": {
5            "description": "https://github.com/openbmc/docs/blob/master/designs/physical-topology.md",
6            "additionalProperties": false,
7            "properties": {
8                "Name": {
9                    "$ref": "#/$defs/Types/Name"
10                },
11                "PortType": {
12                    "description": "This enum may be extended as described in the design",
13                    "type": "string",
14                    "enum": [
15                        "powering",
16                        "powered_by",
17                        "cooling",
18                        "cooled_by",
19                        "containing",
20                        "contained_by"
21                    ]
22                },
23                "Type": {
24                    "type": "string",
25                    "const": "Port"
26                }
27            },
28            "required": ["Name", "PortType", "Type"],
29            "type": "object"
30        },
31        "LegacyPort": {
32            "description": "deprecated schema. https://github.com/openbmc/docs/blob/master/designs/physical-topology.md",
33            "additionalProperties": false,
34            "properties": {
35                "Name": {
36                    "$ref": "#/$defs/Types/Name"
37                },
38                "Type": {
39                    "description": "This enum may be extended as described in the design",
40                    "type": "string",
41                    "enum": ["MB Upstream Port", "BackplanePort"]
42                }
43            },
44            "required": ["Name", "Type"],
45            "type": "object"
46        },
47        "LegacyDownstreamPort": {
48            "description": "deprecated schema. https://github.com/openbmc/docs/blob/master/designs/physical-topology.md",
49            "additionalProperties": false,
50            "properties": {
51                "Name": {
52                    "$ref": "#/$defs/Types/Name"
53                },
54                "ConnectsToType": {
55                    "description": "Should be equal to the 'Type' property on the upstream port",
56                    "type": "string",
57                    "enum": ["MB Upstream Port", "BackplanePort"]
58                },
59                "PowerPort": {
60                    "type": "boolean"
61                },
62                "Type": {
63                    "type": "string",
64                    "const": "DownstreamPort"
65                }
66            },
67            "required": ["Name", "Type", "ConnectsToType"],
68            "type": "object"
69        },
70        "Types": {
71            "Name": {
72                "type": "string"
73            }
74        }
75    }
76}
77