2015-10-05 09:07:15 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
#
|
|
|
|
# Copyright (C) 2015 GNS3 Technologies Inc.
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
|
|
VM_LIST_IMAGES_SCHEMA = {
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
|
|
"description": "List of disk images",
|
|
|
|
"type": "array",
|
|
|
|
"items": [
|
|
|
|
{
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"filename": {
|
|
|
|
"description": "Image filename",
|
2015-11-05 15:28:11 +00:00
|
|
|
"type": "string",
|
|
|
|
"minLength": 1
|
2015-10-05 09:07:15 +00:00
|
|
|
},
|
|
|
|
"path": {
|
|
|
|
"description": "Image path",
|
2015-11-05 15:28:11 +00:00
|
|
|
"type": "string",
|
|
|
|
"minLength": 1
|
2015-10-05 09:07:15 +00:00
|
|
|
}
|
|
|
|
},
|
2015-11-05 15:28:11 +00:00
|
|
|
"required": ["filename", "path"],
|
2015-10-05 09:07:15 +00:00
|
|
|
"additionalProperties": False
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"additionalProperties": False,
|
|
|
|
}
|
2016-02-09 15:07:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
VM_CAPTURE_SCHEMA = {
|
|
|
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
|
|
"description": "Request validation to start a packet capture on a port",
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"capture_file_name": {
|
|
|
|
"description": "Capture file name",
|
|
|
|
"type": "string",
|
|
|
|
"minLength": 1,
|
|
|
|
},
|
|
|
|
"data_link_type": {
|
|
|
|
"description": "PCAP data link type",
|
|
|
|
"type": "string",
|
|
|
|
"minLength": 1,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"additionalProperties": False,
|
|
|
|
"required": ["capture_file_name"]
|
|
|
|
}
|