|
22 | 22 | ] |
23 | 23 |
|
24 | 24 | override_schema = { |
25 | | - "type": "object", |
26 | | - "addtionalProperties": True, |
27 | | - "definitions": { |
28 | | - "base_address": { |
29 | | - "properties": { |
30 | | - "management": { |
31 | | - "type": "boolean", |
32 | | - "default": False, |
33 | | - } |
| 25 | + "type": "object", |
| 26 | + "addtionalProperties": True, |
| 27 | + "definitions": { |
| 28 | + "base_address": { |
| 29 | + "properties": { |
| 30 | + "management": { |
| 31 | + "type": "boolean", |
| 32 | + "default": False, |
34 | 33 | } |
35 | | - }, |
36 | | - "encryption_wireless_property_ap": { |
37 | | - "properties": { |
38 | | - "encryption": { |
39 | | - "type": "object", |
40 | | - "title": "Encryption", |
41 | | - "required": [ |
42 | | - "protocol", |
43 | | - ], |
44 | | - "propertyOrder": 20, |
45 | | - "oneOf": [ |
46 | | - {"$ref": "#/definitions/encryption_none"}, |
47 | | - {"$ref": "#/definitions/encryption_wpa_personal"}, |
48 | | - {"$ref": "#/definitions/encryption_wpa_enterprise_sta"}, |
49 | | - ], |
50 | | - }, |
| 34 | + } |
| 35 | + }, |
| 36 | + "encryption_wireless_property_ap": { |
| 37 | + "properties": { |
| 38 | + "encryption": { |
| 39 | + "type": "object", |
| 40 | + "title": "Encryption", |
| 41 | + "required": [ |
| 42 | + "protocol", |
| 43 | + ], |
| 44 | + "propertyOrder": 20, |
| 45 | + "oneOf": [ |
| 46 | + {"$ref": "#/definitions/encryption_none"}, |
| 47 | + {"$ref": "#/definitions/encryption_wpa_personal"}, |
| 48 | + {"$ref": "#/definitions/encryption_wpa_enterprise_sta"}, |
| 49 | + ], |
51 | 50 | }, |
52 | 51 | }, |
53 | | - "encryption_wireless_property_sta": { |
54 | | - "properties": { |
55 | | - "encryption": { |
56 | | - "type": "object", |
57 | | - "title": "Encryption", |
58 | | - "required": [ |
59 | | - "protocol", |
60 | | - ], |
61 | | - "propertyOrder": 20, |
62 | | - "oneOf": [ |
63 | | - {"$ref": "#/definitions/encryption_none"}, |
64 | | - {"$ref": "#/definitions/encryption_wpa_personal"}, |
65 | | - {"$ref": "#/definitions/encryption_wpa_enterprise_sta"}, |
66 | | - ], |
67 | | - }, |
| 52 | + }, |
| 53 | + "encryption_wireless_property_sta": { |
| 54 | + "properties": { |
| 55 | + "encryption": { |
| 56 | + "type": "object", |
| 57 | + "title": "Encryption", |
| 58 | + "required": [ |
| 59 | + "protocol", |
| 60 | + ], |
| 61 | + "propertyOrder": 20, |
| 62 | + "oneOf": [ |
| 63 | + {"$ref": "#/definitions/encryption_none"}, |
| 64 | + {"$ref": "#/definitions/encryption_wpa_personal"}, |
| 65 | + {"$ref": "#/definitions/encryption_wpa_enterprise_sta"}, |
| 66 | + ], |
68 | 67 | }, |
69 | 68 | }, |
70 | | - "interface_settings": { |
71 | | - "properties": { |
72 | | - "authoneg": { |
73 | | - "type": "boolean", |
74 | | - }, |
75 | | - "flowcontrol": { |
76 | | - "type": "boolean", |
77 | | - } |
| 69 | + }, |
| 70 | + "interface_settings": { |
| 71 | + "properties": { |
| 72 | + "authoneg": { |
| 73 | + "type": "boolean", |
| 74 | + }, |
| 75 | + "flowcontrol": { |
| 76 | + "type": "boolean", |
78 | 77 | } |
79 | 78 | } |
| 79 | + } |
| 80 | + }, |
| 81 | + "properties": { |
| 82 | + "netmode": { |
| 83 | + "enum": [ |
| 84 | + "bridge", |
| 85 | + "router", |
| 86 | + ], |
| 87 | + "default": "bridge", |
| 88 | + "type": "string", |
80 | 89 | }, |
81 | | - "properties": { |
82 | | - "netmode": { |
83 | | - "enum": [ |
84 | | - "bridge", |
85 | | - "router", |
86 | | - ], |
87 | | - "default": "bridge", |
88 | | - "type": "string", |
89 | | - }, |
90 | | - "user": { |
91 | | - "additionalProperties": True, |
92 | | - "properties": { |
93 | | - "name": { |
94 | | - "type": "string", |
95 | | - }, |
96 | | - "salt": { |
97 | | - "type": "string", |
98 | | - }, |
| 90 | + "user": { |
| 91 | + "additionalProperties": True, |
| 92 | + "properties": { |
| 93 | + "name": { |
| 94 | + "type": "string", |
| 95 | + }, |
| 96 | + "salt": { |
| 97 | + "type": "string", |
99 | 98 | }, |
100 | | - "required": [ |
101 | | - "name", |
102 | | - "password", |
103 | | - "salt", |
104 | | - ], |
105 | 99 | }, |
106 | | - "ntp": { |
107 | | - "type": "object", |
108 | | - "title": "NTP Settings", |
109 | | - "additionalProperties": True, |
110 | | - "propertyOrder": 8, |
111 | | - "properties": { |
112 | | - "enabled": { |
113 | | - "type": "boolean", |
114 | | - "title": "enable NTP client", |
115 | | - "default": True, |
116 | | - "format": "checkbox", |
117 | | - "propertyOrder": 1, |
118 | | - }, |
119 | | - "enable_server": { |
120 | | - "type": "boolean", |
121 | | - "title": "enable NTP server", |
122 | | - "default": False, |
123 | | - "format": "checkbox", |
124 | | - "propertyOrder": 2, |
| 100 | + "required": [ |
| 101 | + "name", |
| 102 | + "password", |
| 103 | + "salt", |
| 104 | + ], |
| 105 | + }, |
| 106 | + "ntp": { |
| 107 | + "type": "object", |
| 108 | + "title": "NTP Settings", |
| 109 | + "additionalProperties": True, |
| 110 | + "propertyOrder": 8, |
| 111 | + "properties": { |
| 112 | + "enabled": { |
| 113 | + "type": "boolean", |
| 114 | + "title": "enable NTP client", |
| 115 | + "default": True, |
| 116 | + "format": "checkbox", |
| 117 | + "propertyOrder": 1, |
| 118 | + }, |
| 119 | + "enable_server": { |
| 120 | + "type": "boolean", |
| 121 | + "title": "enable NTP server", |
| 122 | + "default": False, |
| 123 | + "format": "checkbox", |
| 124 | + "propertyOrder": 2, |
| 125 | + }, |
| 126 | + "server": { |
| 127 | + "title": "NTP Servers", |
| 128 | + "description": "NTP server candidates", |
| 129 | + "type": "array", |
| 130 | + "uniqueItems": True, |
| 131 | + "additionalItems": True, |
| 132 | + "propertyOrder": 3, |
| 133 | + "items": { |
| 134 | + "title": "NTP server", |
| 135 | + "type": "string", |
| 136 | + "format": "hostname" |
125 | 137 | }, |
126 | | - "server": { |
127 | | - "title": "NTP Servers", |
128 | | - "description": "NTP server candidates", |
129 | | - "type": "array", |
130 | | - "uniqueItems": True, |
131 | | - "additionalItems": True, |
132 | | - "propertyOrder": 3, |
133 | | - "items": { |
134 | | - "title": "NTP server", |
135 | | - "type": "string", |
136 | | - "format": "hostname" |
137 | | - }, |
138 | | - "default": default_ntp_servers, |
139 | | - } |
| 138 | + "default": default_ntp_servers, |
140 | 139 | } |
141 | | - }, |
| 140 | + } |
142 | 141 | }, |
143 | | - } |
| 142 | + }, |
| 143 | +} |
| 144 | + |
| 145 | +schema = merge_config(default_schema, override_schema) |
144 | 146 |
|
145 | 147 | schema['definitions']['encryption_wireless_property_ap'] = \ |
146 | 148 | override_schema['definitions']['encryption_wireless_property_ap'] |
147 | | -schema = merge_config( |
148 | | - default_schema, |
149 | | - override_schema |
150 | | - ) |
151 | 149 |
|
152 | 150 | schema['definitions']['encryption_wireless_property_sta'] = \ |
153 | 151 | override_schema['definitions']['encryption_wireless_property_sta'] |
154 | | -__all__ = [schema] |
0 commit comments