mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 06:21:15 +02:00
Project global variables
This commit is contained in:
1 parent
80958e8a6d
commit
e267f8a8b8
9 files changed
+167
-8
No files matched your search
@@ -15,6 +15,40 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
SUPPLIER_OBJECT_SCHEMA = {
|
||||
"type": ["object", "null"],
|
||||
"description": "Supplier of the project",
|
||||
"properties": {
|
||||
"logo": {
|
||||
"type": "string",
|
||||
"description": "Path to the project supplier logo"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "URL to the project supplier site"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VARIABLES_OBJECT_SCHEMA = {
|
||||
"type": ["array", "null"],
|
||||
"description": "Variables required to run the project",
|
||||
"items": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Variable name"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Variable value"
|
||||
}
|
||||
},
|
||||
"required": ["name"]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PROJECT_CREATE_SCHEMA = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
@@ -73,7 +107,9 @@ PROJECT_CREATE_SCHEMA = {
|
||||
"show_interface_labels": {
|
||||
"type": "boolean",
|
||||
"description": "Show interface labels on the drawing area"
|
||||
}
|
||||
},
|
||||
"supplier": SUPPLIER_OBJECT_SCHEMA,
|
||||
"variables": VARIABLES_OBJECT_SCHEMA
|
||||
},
|
||||
"additionalProperties": False,
|
||||
"required": ["name"]
|
||||
@@ -136,7 +172,9 @@ PROJECT_UPDATE_SCHEMA = {
|
||||
"show_interface_labels": {
|
||||
"type": "boolean",
|
||||
"description": "Show interface labels on the drawing area"
|
||||
}
|
||||
},
|
||||
"supplier": SUPPLIER_OBJECT_SCHEMA,
|
||||
"variables": VARIABLES_OBJECT_SCHEMA
|
||||
},
|
||||
"additionalProperties": False,
|
||||
}
|
||||
@@ -215,7 +253,9 @@ PROJECT_OBJECT_SCHEMA = {
|
||||
"show_interface_labels": {
|
||||
"type": "boolean",
|
||||
"description": "Show interface labels on the drawing area"
|
||||
}
|
||||
},
|
||||
"supplier": SUPPLIER_OBJECT_SCHEMA,
|
||||
"variables": VARIABLES_OBJECT_SCHEMA
|
||||
},
|
||||
"additionalProperties": False,
|
||||
"required": ["project_id"]
|
||||
|
||||
Reference in new issue
Block a user