mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 06:21:15 +02:00
Return the platform of a compute
Ref https://github.com/GNS3/gns3-gui/issues/1550
This commit is contained in:
3 files changed
+12
-3
No files matched your search
@@ -15,6 +15,8 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
|
||||
from gns3server.web.route import Route
|
||||
from gns3server.config import Config
|
||||
from gns3server.schemas.capabilities import CAPABILITIES_SCHEMA
|
||||
@@ -37,5 +39,6 @@ class CapabilitiesHandler:
|
||||
|
||||
response.json({
|
||||
"version": __version__,
|
||||
"platform": sys.platform,
|
||||
"node_types": node_types
|
||||
})
|
||||
@@ -30,7 +30,12 @@ CAPABILITIES_SCHEMA = {
|
||||
},
|
||||
"node_types": {
|
||||
"type": "array",
|
||||
"items": NODE_TYPE_SCHEMA
|
||||
"items": NODE_TYPE_SCHEMA,
|
||||
"description": "Node type supported by the compute"
|
||||
},
|
||||
"platform": {
|
||||
"type": "string",
|
||||
"description": "Platform where the compute is running"
|
||||
}
|
||||
},
|
||||
"additionalProperties": False
|
||||
|
||||
Reference in new issue
Block a user