Skip to content

Commit

Permalink
Reordered schema sections
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Feb 4, 2016
1 parent 18ecf28 commit 75c259d
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 86 deletions.
110 changes: 55 additions & 55 deletions netjsonconfig/backends/openwrt/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,61 @@
}
}
},
"switch": {
"type": "array",
"title": "VLANs",
"uniqueItems": True,
"additionalItems": True,
"title": "Switch",
"items": {
"type": "object",
"additionalProperties": True,
"required": [
"name",
"reset",
"enable_vlan",
"vlan"
],
"properties": {
"name": {
"type": "string"
},
"reset": {
"type": "boolean"
},
"enable_vlan": {
"type": "boolean"
},
"vlan": {
"type": "array",
"title": "VLANs",
"uniqueItems": True,
"additionalItems": True,
"items": {
"type": "object",
"title": "VLAN",
"additionalProperties": True,
"required": [
"device",
"vlan",
"ports"
],
"properties": {
"device": {
"type": "string"
},
"vlan": {
"type": "integer"
},
"ports": {
"type": "string"
}
}
}
}
}
}
},
"ip_rules": {
"type": "array",
"title": "Ip rules",
Expand Down Expand Up @@ -224,61 +279,6 @@
}
}
},
"switch": {
"type": "array",
"title": "VLANs",
"uniqueItems": True,
"additionalItems": True,
"title": "Programmable Switch",
"items": {
"type": "object",
"additionalProperties": True,
"required": [
"name",
"reset",
"enable_vlan",
"vlan"
],
"properties": {
"name": {
"type": "string"
},
"reset": {
"type": "boolean"
},
"enable_vlan": {
"type": "boolean"
},
"vlan": {
"type": "array",
"title": "VLANs",
"uniqueItems": True,
"additionalItems": True,
"items": {
"type": "object",
"title": "VLAN",
"additionalProperties": True,
"required": [
"device",
"vlan",
"ports"
],
"properties": {
"device": {
"type": "string"
},
"vlan": {
"type": "integer"
},
"ports": {
"type": "string"
}
}
}
}
}
}
},
"files": {
"type": "array",
"title": "files",
Expand Down
58 changes: 27 additions & 31 deletions netjsonconfig/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,35 @@
}
}
},
"interfaces": {
"type": "array",
"title": "Interfaces",
"uniqueItems": True,
"additionalItems": True,
"items": {
"oneOf": [
{"$ref": "#/definitions/network_interface"},
{"$ref": "#/definitions/wireless_interface"},
{"$ref": "#/definitions/bridge_interface"}
]
}
},
"dns_servers": {
"title": "DNS Servers",
"type": "array",
"uniqueItems": True,
"additionalItems": True,
"items": {
"type": "string"
}
},
"dns_search": {
"title": "DNS Search",
"type": "array",
"uniqueItems": True,
"additionalItems": True,
"items": {
"type": "string"
}
},
"radios": {
Expand Down Expand Up @@ -310,19 +337,6 @@
}
}
},
"interfaces": {
"type": "array",
"title": "Interfaces",
"uniqueItems": True,
"additionalItems": True,
"items": {
"oneOf": [
{"$ref": "#/definitions/network_interface"},
{"$ref": "#/definitions/wireless_interface"},
{"$ref": "#/definitions/bridge_interface"}
]
}
},
"routes": {
"type": "array",
"title": "Routes",
Expand All @@ -349,24 +363,6 @@
}
}
}
},
"dns_servers": {
"title": "DNS Servers",
"type": "array",
"uniqueItems": True,
"additionalItems": True,
"items": {
"type": "string"
}
},
"dns_search": {
"title": "DNS Search",
"type": "array",
"uniqueItems": True,
"additionalItems": True,
"items": {
"type": "string"
}
}
}
}

0 comments on commit 75c259d

Please sign in to comment.