mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Renaming things & more inline docs.
This commit is contained in:
1 parent
d68a24e39d
commit
687d5b75ab
35 files changed
+82
-96
No files matched your search
@@ -41,10 +41,6 @@ class ATMSW(object):
|
||||
:param request: JSON request
|
||||
"""
|
||||
|
||||
if request == None:
|
||||
self.send_param_error()
|
||||
return
|
||||
|
||||
#TODO: JSON schema validation for the request
|
||||
name = None
|
||||
if request and "name" in request:
|
||||
@@ -137,10 +133,10 @@ class ATMSW(object):
|
||||
|
||||
Mandatory request parameters:
|
||||
- id (switch identifier)
|
||||
- port_name (port name)
|
||||
- port_id (port identifier)
|
||||
|
||||
Response parameters:
|
||||
- port_name (port name)
|
||||
- port_id (port identifier)
|
||||
- lhost (local host address)
|
||||
- lport (allocated local port)
|
||||
|
||||
@@ -163,7 +159,7 @@ class ATMSW(object):
|
||||
self.send_custom_error(str(e))
|
||||
return
|
||||
|
||||
response["port_name"] = request["port_name"]
|
||||
response["port_id"] = request["port_id"]
|
||||
self.send_response(response)
|
||||
|
||||
@IModule.route("dynamips.atmsw.add_nio")
|
||||
@@ -174,6 +170,7 @@ class ATMSW(object):
|
||||
Mandatory request parameters:
|
||||
- id (switch identifier)
|
||||
- port (port identifier)
|
||||
- port_id (port identifier)
|
||||
- mappings (VCs/VPs mapped to the port)
|
||||
- nio (nio type, one of the following)
|
||||
- "NIO_UDP"
|
||||
|
||||
@@ -40,10 +40,6 @@ class ETHHUB(object):
|
||||
:param request: JSON request
|
||||
"""
|
||||
|
||||
if request == None:
|
||||
self.send_param_error()
|
||||
return
|
||||
|
||||
#TODO: JSON schema validation for the request
|
||||
name = None
|
||||
if request and "name" in request:
|
||||
@@ -136,10 +132,10 @@ class ETHHUB(object):
|
||||
|
||||
Mandatory request parameters:
|
||||
- id (hub identifier)
|
||||
- port_name (port name)
|
||||
- port_id (port identifier)
|
||||
|
||||
Response parameters:
|
||||
- port_name (port name)
|
||||
- port_id (port identifier)
|
||||
- lhost (local host address)
|
||||
- lport (allocated local port)
|
||||
|
||||
@@ -162,7 +158,7 @@ class ETHHUB(object):
|
||||
self.send_custom_error(str(e))
|
||||
return
|
||||
|
||||
response["port_name"] = request["port_name"]
|
||||
response["port_id"] = request["port_id"]
|
||||
self.send_response(response)
|
||||
|
||||
@IModule.route("dynamips.ethhub.add_nio")
|
||||
@@ -173,6 +169,7 @@ class ETHHUB(object):
|
||||
Mandatory request parameters:
|
||||
- id (hub identifier)
|
||||
- port (port identifier)
|
||||
- port_id (port identifier)
|
||||
- nio (nio type, one of the following)
|
||||
- "NIO_UDP"
|
||||
- lport (local port)
|
||||
|
||||
@@ -40,10 +40,6 @@ class ETHSW(object):
|
||||
:param request: JSON request
|
||||
"""
|
||||
|
||||
if request == None:
|
||||
self.send_param_error()
|
||||
return
|
||||
|
||||
#TODO: JSON schema validation for the request
|
||||
name = None
|
||||
if request and "name" in request:
|
||||
@@ -153,10 +149,10 @@ class ETHSW(object):
|
||||
|
||||
Mandatory request parameters:
|
||||
- id (switch identifier)
|
||||
- port_name (port name)
|
||||
- port_id (port identifier)
|
||||
|
||||
Response parameters:
|
||||
- port_name (port name)
|
||||
- port_id (port identifier)
|
||||
- lhost (local host address)
|
||||
- lport (allocated local port)
|
||||
|
||||
@@ -179,7 +175,7 @@ class ETHSW(object):
|
||||
self.send_custom_error(str(e))
|
||||
return
|
||||
|
||||
response["port_name"] = request["port_name"]
|
||||
response["port_id"] = request["port_id"]
|
||||
self.send_response(response)
|
||||
|
||||
@IModule.route("dynamips.ethsw.add_nio")
|
||||
@@ -190,6 +186,7 @@ class ETHSW(object):
|
||||
Mandatory request parameters:
|
||||
- id (switch identifier)
|
||||
- port (port identifier)
|
||||
- port_id (port identifier)
|
||||
- vlan (vlan identifier)
|
||||
- port_type ("access", "dot1q" or "qinq")
|
||||
- nio (nio type, one of the following)
|
||||
|
||||
@@ -40,10 +40,6 @@ class FRSW(object):
|
||||
:param request: JSON request
|
||||
"""
|
||||
|
||||
if request == None:
|
||||
self.send_param_error()
|
||||
return
|
||||
|
||||
#TODO: JSON schema validation for the request
|
||||
name = None
|
||||
if request and "name" in request:
|
||||
@@ -135,10 +131,10 @@ class FRSW(object):
|
||||
|
||||
Mandatory request parameters:
|
||||
- id (switch identifier)
|
||||
- port_name (port name)
|
||||
- port_id (port identifier)
|
||||
|
||||
Response parameters:
|
||||
- port_name (port name)
|
||||
- port_id (port identifier)
|
||||
- lhost (local host address)
|
||||
- lport (allocated local port)
|
||||
|
||||
@@ -161,7 +157,7 @@ class FRSW(object):
|
||||
self.send_custom_error(str(e))
|
||||
return
|
||||
|
||||
response["port_name"] = request["port_name"]
|
||||
response["port_id"] = request["port_id"]
|
||||
self.send_response(response)
|
||||
|
||||
@IModule.route("dynamips.frsw.add_nio")
|
||||
@@ -172,6 +168,7 @@ class FRSW(object):
|
||||
Mandatory request parameters:
|
||||
- id (switch identifier)
|
||||
- port (port identifier)
|
||||
- port_id (port identifier)
|
||||
- mappings (VCs mapped to the port)
|
||||
- nio (nio type, one of the following)
|
||||
- "NIO_UDP"
|
||||
|
||||
@@ -445,10 +445,10 @@ class VM(object):
|
||||
|
||||
Mandatory request parameters:
|
||||
- id (vm identifier)
|
||||
- port_name (port name e.g fastEthernet1/0)
|
||||
- port_id (unique port identifier)
|
||||
|
||||
Response parameters:
|
||||
- port_name (port name e.g fastEthernet1/0)
|
||||
- port_id (unique port identifier)
|
||||
- lhost (local host address)
|
||||
- lport (allocated local port)
|
||||
|
||||
@@ -471,7 +471,7 @@ class VM(object):
|
||||
self.send_custom_error(str(e))
|
||||
return
|
||||
|
||||
response["port_name"] = request["port_name"]
|
||||
response["port_id"] = request["port_id"]
|
||||
self.send_response(response)
|
||||
|
||||
@IModule.route("dynamips.vm.add_nio")
|
||||
@@ -481,8 +481,9 @@ class VM(object):
|
||||
|
||||
Mandatory request parameters:
|
||||
- id (vm identifier)
|
||||
- slot (slot identifier)
|
||||
- port (port identifier)
|
||||
- slot (slot number)
|
||||
- port (port number)
|
||||
- port_id (unique port identifier)
|
||||
- nio (nio type, one of the following)
|
||||
- "NIO_UDP"
|
||||
- lport (local port)
|
||||
|
||||
Reference in new issue
Block a user