refactoring server.go
This commit is contained in:
75
cmd/server/rpc/testdata/test_rest.rest
vendored
Normal file
75
cmd/server/rpc/testdata/test_rest.rest
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
POST http://192.168.100.1:8888/rpc HTTP/1.1
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"id": 1,
|
||||
"method": "Orion.OwrtCreateWifiInterface",
|
||||
"params": [ {
|
||||
"Iface": {
|
||||
"Name": "PyxisNetwork",
|
||||
"Network": "lan",
|
||||
"Index": 0,
|
||||
"Ssid": "Pyxis",
|
||||
"SysDevName": "wlan0",
|
||||
"Encryption": "psk2",
|
||||
"Key": "A2Z3E4R5T6Y7U",
|
||||
"Device": "radio0",
|
||||
"DevicePath": "soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0",
|
||||
"Mode": "ap"
|
||||
},
|
||||
"Cleanup": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
###
|
||||
POST http://192.168.100.1:8888/rpc HTTP/1.1
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"id": 1,
|
||||
"method": "Orion.OwrtCreateWifiInterface",
|
||||
"params": [ {
|
||||
"Iface": {
|
||||
"Name": "PyxisClient",
|
||||
"Index": 1,
|
||||
"SysDevName": "wlan1",
|
||||
"Device": "radio1",
|
||||
"DevicePath": "soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0",
|
||||
"Mode": "sta"
|
||||
},
|
||||
"Cleanup": false
|
||||
}]
|
||||
}
|
||||
|
||||
###
|
||||
POST http://192.168.100.1:8888/rpc HTTP/1.1
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
"id": 1,
|
||||
"method": "Orion.UpdateOrionBox",
|
||||
"params": [ {
|
||||
"Box": {
|
||||
"Address": "192.168.42.1",
|
||||
"NewAddress": "192.168.100.213",
|
||||
"Security": "",
|
||||
"SSID" : "reach:2a:03",
|
||||
"WifiKey": "emlidreach"
|
||||
},
|
||||
"Server": {
|
||||
"Address": "192.168.42.1",
|
||||
"SSID": "Pyxis",
|
||||
"Security": "",
|
||||
"WifiKey": "A2Z3E4R5T6Y7U",
|
||||
"ClientIface" : {
|
||||
"Name": "PyxisClient",
|
||||
"Index": 1,
|
||||
"SysDevName": "wlan1",
|
||||
"Device": "radio1",
|
||||
"DevicePath": "soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0",
|
||||
"Mode": "sta"
|
||||
}
|
||||
}
|
||||
} ]
|
||||
}
|
Reference in New Issue
Block a user