Merge "delete should return 404 error for invalid name"
[multicloud/k8s.git] / src / orchestrator / json-schemas / controller.json
1 {
2     "$schema": "http://json-schema.org/schema#",
3     "type": "object",
4     "properties": {
5       "spec": {
6         "required": [
7           "host",
8           "port",
9           "type",
10           "priority"
11         ],
12         "type": "object",
13         "properties": {
14           "priority": {
15             "description": "Priority of controller to be called",
16             "type": "integer",
17             "example": 4,
18             "minimum": 0,
19             "maximum": 100
20           },
21           "host": {
22             "description": "Controller reachibility information",
23             "type": "string",
24             "example": "10.7.100.4",
25             "maxLength": 128
26           },
27           "type": {
28             "description": "Type of controller (placement, action are 2 types supported)",
29             "type": "string",
30             "example": "placement",
31             "maxLength": 48
32           },
33           "port": {
34             "description": "Port for controller",
35             "type": "integer",
36             "minimum": 0,
37             "maximum": 50000,
38             "example": 9029
39           }
40         }
41       },
42       "metadata": {
43         "required": ["name"],
44         "properties": {
45           "userData2": {
46             "description": "User relevant data for the resource",
47             "type": "string",
48             "example": "Some more data",
49             "maxLength": 512
50           },
51           "userData1": {
52             "description": "User relevant data for the resource",
53             "type": "string",
54             "example": "Some data",
55             "maxLength": 512
56           },
57           "name": {
58             "description": "Name of the resource",
59             "type": "string",
60             "example": "ResName",
61             "maxLength": 128,
62             "pattern": "[-_0-9a-zA-Z]+$"
63           },
64           "description": {
65             "description": "Description for the resource",
66             "type": "string",
67             "example": "Resource description",
68             "maxLength": 1024
69           }
70         }
71       }
72     }
73   }