Go to file
HuangXin 2726180356 OCT
REM:
1. 增加加密解密算法单元测试
2. 增加测试用例提高代码覆盖率
3. 增加协议安全测试用例
2020-09-15 14:31:35 +08:00
bin OCT 2020-05-12 17:57:59 +08:00
config OCT 2020-09-15 09:38:11 +08:00
src OCT 2020-09-15 14:31:35 +08:00
.gitignore OCT 2020-05-12 17:57:59 +08:00
Project.md OCT 2020-04-23 16:07:51 +08:00
Readme.md OCT 2020-09-01 16:07:04 +08:00
assembly.xml OCT 2020-04-28 12:59:39 +08:00
data-install.sh OCT 2020-03-17 09:31:21 +08:00
install.sh OCT 2020-03-17 09:31:21 +08:00
pom.xml OCT 2020-09-02 21:17:20 +08:00

Readme.md

处置模块接口协议

登录

  • 请求命令
    字段 内容
    Request URI dispose/auth/login
    Content type application/json;charset=UTF-8
    Body {"ver":3,"cryptoType":0,"timeStamp":1587604296988,"msgContent":"{"password":"c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58","userName":"admin"}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598580612302,
	"msgContent": {
		"password": "c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58",
		"userName": "admin"
	}
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":3,"cryptoType":0,"timeStamp":1598580612302,"code":200,"msgContent":"{"userName":"admin","token":"ed42284a31337b41c2ba2cc061754c60b0f4e659601ecc5c06daab25bd041e17","logTime":1598580612302,"expireTime":1598580612302,"status":0,"message":["成功"]}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598580612302,
	"code": 200,
	"msgContent": {
		"userName": "admin",
		"token": "ed42284a31337b41c2ba2cc061754c60b0f4e659601ecc5c06daab25bd041e17",
		"logTime": 1598580612302,
		"expireTime": 1598580612302,
		"status": 0,
		"message": [
			"成功"
		]
	}
}

注销

  • 请求命令
    字段 内容
    Request URI dispose/auth/logout
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":3,"cryptoType":0,"timeStamp":1598582999559,"msgContent":"{"userName":"admin"}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598582999559,
	"msgContent": {
		"userName": "admin"
	}
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":3,"cryptoType":0,"timeStamp":1598582999559,"code":200,"msgContent":"{"userName":"admin","status":0,"message":["成功"]}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598582999559,
	"code": 200,
	"msgContent": {
		"userName": "admin",
		"status": 0,
		"message": [
			"成功"
		]
	}
}

添加节点

  • 请求命令
    字段 内容
    Request URI dispose/manager/device
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":3,"cryptoType":0,"timeStamp":1598596150287,"msgContent":"{"items":[{"ipAddr":"10.88.77.15","ipPort":"",
    "deviceType":0,"areaCode":0,"deviceName":"中移杭研实验室迪普清洗设备","manufacturer":"DPTech","model":"UMC",
    "version":"5.7.13","userName":"admin","password":"UMCAdministrator","urlPath":"UMC/service/AbnormalFlowCleaningService","urlType":0,"readme":"实验室测试设备", "capacity":[{"capacityType":0,"objectType":1,"ipType":3,"protectIp":"0.0.0.0"}]}]}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp":  1598596150287,
	"msgContent":{
    "items": [
      {
        "ipAddr": "10.88.77.15",
        "ipPort": "",
        "deviceType": 0,
        "areaCode": 0,
        "deviceName": "中移杭研实验室迪普清洗设备",
        "manufacturer": "DPTech",
        "model": "UMC",
        "version": "5.7.13",
        "userName": "admin",
        "password": "UMCAdministrator",
        "urlPath": "UMC/service/AbnormalFlowCleaningService",
        "urlType": 0,
        "readme": "实验室测试设备",
        "capacity": [
          {
            "capacityType": 0,
            "objectType": 1,
            "ipType": 3,
            "protectIp": "0.0.0.0"
          }
        ]
      }
    ]
  }
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":3,"cryptoType":0,"timeStamp":1598596150287,"code":200,"msgContent":"{"items":[{"ipAddr":"10.88.77.15",{"ipPort":"","devId":"572","status":0,"message":["成功"]}]}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598596150287,
	"code": 200,
	"msgContent": {
		"items": [
			{
				"ipAddr": "10.88.77.15",
				"ipPort": "",
				"devId": "572",
				"status": 0,
				"message": [
					"成功"
				]
			}
		]
	}
}

删除节点

  • 请求命令
    字段 内容
    Request URI dispose/manager/device
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":3,"cryptoType":0,"timeStamp":1598596120673,"msgContent":"{"id":["572", "36"]}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp":  1598596120673,
	"msgContent": {
	    "id" :  ["572", "36"]
	}
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":3,"cryptoType":0,"timeStamp":1598596120673,"code":200,"msgContent":"[{"id":"572","devStatus":"DELETED","status":0,"message":["成功"]}, {"id":"36","devStatus":"NORMAL","status":19,"message":["没有这个设备"]}]"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598596120673,
	"code": 200,
	"msgContent": [
		{
			"id": "572",
			"devStatus": "DELETED",
			"status": 0,
			"message": [
				"成功"
			]
		},
		{
			"id": "36",
			"devStatus": "NORMAL",
			"status": 19,
			"message": [
				"没有这个设备"
			]
		}
	]
}

更新节点

  • 请求命令
    字段 内容
    Request URI dispose/manager/upgrade
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":3,"cryptoType":0,"timeStamp":1598596022176,"msgContent":"{"items":[{"ipAddr":"10.88.77.15","ipPort":"",
    "deviceType":0,"areaCode":0,"deviceName":"中移杭研实验室迪普清洗设备","manufacturer":"DPTech","model":"UMC",
    "version":"5.7.16","userName":"admin","password":"UMCAdministrator","urlPath":"UMC/service/AbnormalFlowCleaningService","urlType":0,"readme":"实验室测试设备", "capacity":[{"capacityType":0,"objectType":1,"ipType":3,"protectIp":"192.168.1.5-192.168.1.20"}]}]}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp":  1598596022176,
	"msgContent":{
    "items": [
      {
        "ipAddr": "10.88.77.15",
        "ipPort": "",
        "deviceType": 0,
        "areaCode": 0,
        "deviceName": "中移杭研实验室迪普清洗设备",
        "manufacturer": "DPTech",
        "model": "UMC",
        "version": "5.7.16",
        "userName": "admin",
        "password": "UMCAdministrator",
        "urlPath": "UMC/service/AbnormalFlowCleaningService",
        "urlType": 0,
        "readme": "实验室测试设备",
        "capacity": [
          {
            "capacityType": 0,
            "objectType": 1,
            "ipType": 3,
            "protectIp": "192.168.1.5-192.168.1.20"
          }
        ]
      }
    ]
  }
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":3,"cryptoType":0,"timeStamp":1598596022176,"code":200,"msgContent":[{"id":"572","status":0,"message":["成功"]}]"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598596022176,
	"code": 200,
	"msgContent": [
		{
			"id": "572",
			"status": 0,
			"message": [
				"成功"
			]
		}
	]
}

获取全部节点

  • 请求命令
    字段 内容
    Request URI dispose/manager/device_list
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":3,"cryptoType":0,"timeStamp":1598596065234,"msgContent":"{"startPage":1,"pageSize":"10"}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598596065234,
	"msgContent": {
		"startPage": 1,
		"pageSize": "10"
	}
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":3,"cryptoType":0,"timeStamp":1598596065234,"code":200,"msgContent":{"curPageNumber":1,"pageSize":10,"totalItems":2,"totalPages":1,"status":0,"message":["成功"],"items":[{"id":"573","ipAddr":"10...88","ipPort":"18080","deviceType":1,"areaCode":0, "deviceName":"中移杭研实验室浩瀚清洗设备","manufacturer":"Haohan","model":"Unknown","version":"Unknown","userName":"","urlType":0,"readme":"实验室测试设备","capacity":[{"capacityType":0, "objectType":1,"ipType":3,"protectIp":"0.0.0.0"}],"devStatus":0}, {"id":"572","ipAddr":"10...15","ipPort":"","deviceType":0,"areaCode":0,"deviceName":"中移杭研实验室迪普清洗设备","manufacturer":"DPTech","model":"UMC","version":"5.7.16","userName":"adm****","urlType":0,"readme":"实验室测试设备","capacity":[],"devStatus":0}]}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598596065234,
	"code": 200,
	"msgContent": {
		"curPageNumber": 1,
		"pageSize": 10,
		"totalItems": 2,
		"totalPages": 1,
		"status": 0,
		"message": [
			"成功"
		],
		"items": [
			{
				"id": "573",
				"ipAddr": "10.***.***.88",
				"ipPort": "18080",
				"deviceType": 1,
				"areaCode": 0,
				"deviceName": "中移杭研实验室浩瀚清洗设备",
				"manufacturer": "Haohan",
				"model": "Unknown",
				"version": "Unknown",
				"userName": "",
				"urlType": 0,
				"readme": "实验室测试设备",
				"capacity": [
					{
						"capacityType": 0,
						"objectType": 1,
						"ipType": 3,
						"protectIp": "0.0.0.0"
					}
				],
				"devStatus": 0
			},
			{
				"id": "572",
				"ipAddr": "10.***.***.15",
				"ipPort": "",
				"deviceType": 0,
				"areaCode": 0,
				"deviceName": "中移杭研实验室迪普清洗设备",
				"manufacturer": "DPTech",
				"model": "UMC",
				"version": "5.7.16",
				"userName": "adm****",
				"urlType": 0,
				"readme": "实验室测试设备",
				"capacity": [],
				"devStatus": 0
			}
		]
	}
}

获取节点版本信息

  • 请求命令
    字段 内容
    Request URI dispose/information/version
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1589439798660,"msgContent":"{"id":["1","123"]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589439798660,
    "msgContent":"{\"id\":[\"1\",\"123\"]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589439798757,"code":200,"msgContent":"{"items":[{"id":"1","version":"Virtual_Device_1.0.0","status":0,"message":"成功"},{"id":"123","status":19,"message":"没有这个设备"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589439798757,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"version\":\"Virtual_Device_1.0.0\",\"status\":0,\"message\":\"成功\"},{\"id\":\"123\",\"status\":19,\"message\":\"没有这个设备\"}]}"
}

获取设备信息

  • 请求命令
    字段 内容
    Request URI dispose/information/deviceinfo
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1589440046439,"msgContent":"{"id":["1","123"]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589440046439,
    "msgContent":"{\"id\":[\"1\",\"123\"]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589440046555,"code":200,"msgContent":"{"items":[{"id":"1","vendor":"Virtual","model":"Dispose_1000","firmware":"Unknown","os":"Unknown","kernel":"Linux","arch":"x86_64","memory":-1,"freeMemory":-1,"cpuUsed":-1,"status":0,"message":"成功"},{"id":"123","memory":0,"freeMemory":0,"cpuUsed":0,"status":19,"message":"没有这个设备"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589440046555,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"vendor\":\"Virtual\",\"model\":\"Dispose_1000\",\"firmware\":\"Unknown\",\"os\":\"Unknown\",\"kernel\":\"Linux\",\"arch\":\"x86_64\",\"memory\":-1,\"freeMemory\":-1,\"cpuUsed\":-1,\"status\":0,\"message\":\"成功\"},{\"id\":\"123\",\"memory\":0,\"freeMemory\":0,\"cpuUsed\":0,\"status\":19,\"message\":\"没有这个设备\"}]}"
}

获取链接状态

  • 请求命令
    字段 内容
    Request URI dispose/information/linkstatus
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1589440383391,"msgContent":"{"id":["1","123"]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589440383391,
    "msgContent":"{\"id\":[\"1\",\"123\"]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589440383488,"code":200,"msgContent":"{"items":[{"id":"1","online":1,"status":0,"message":"成功"},{"id":"123","online":0,"status":19,"message":"没有这个设备"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589440383488,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"online\":1,\"status\":0,\"message\":\"成功\"},{\"id\":\"123\",\"online\":0,\"status\":19,\"message\":\"没有这个设备\"}]}"
}

获取节点能力信息

  • 请求命令
    字段 内容
    Request URI dispose/information/capacity
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1589440740686,"msgContent":"{"id":["1","123"]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589440740686,
    "msgContent":"{\"id\":[\"1\",\"123\"]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589440740792,"code":200,"msgContent":"{"items":[{"id":"1","capacity":[{"type":0,"tolCapacity":1024,"usedCapacity":0},{"type":3,"tolCapacity":0,"usedCapacity":0}],"status":0,"message":"成功"},{"id":"123","status":19,"message":"没有这个设备"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589440740792,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"capacity\":[{\"type\":0,\"tolCapacity\":1024,\"usedCapacity\":0},{\"type\":3,\"tolCapacity\":0,\"usedCapacity\":0}],\"status\":0,\"message\":\"成功\"},{\"id\":\"123\",\"status\":19,\"message\":\"没有这个设备\"}]}"
}

获取节点防护IP

  • 请求命令
    字段 内容
    Request URI dispose/information/protected_ip
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1589440953311,"msgContent":"{"id":["1","123"]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589440953311,
    "msgContent":"{\"id\":[\"1\",\"123\"]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589440953422,"code":200,"msgContent":"{"items":[{"id":"1","capacity":[{"type":0,"disposeIp":"192.168.3.2-192.168.3.5,192.168.5.2-192.168.5.10,192.168.4.2-192.168.4.5"},{"type":3,"disposeIp":"192.168.2.1,192.168.2.2"}],"status":0,"message":"成功"},{"id":"123","status":19,"message":"没有这个设备"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589440953422,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"capacity\":[{\"type\":0,\"disposeIp\":\"192.168.3.2-192.168.3.5,192.168.5.2-192.168.5.10,192.168.4.2-192.168.4.5\"},{\"type\":3,\"disposeIp\":\"192.168.2.1,192.168.2.2\"}],\"status\":0,\"message\":\"成功\"},{\"id\":\"123\",\"status\":19,\"message\":\"没有这个设备\"}]}"
}

获取能力节点处置中任务

  • 请求命令
    字段 内容
    Request URI dispose/information/run_task
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1589441350918,"msgContent":"{"id":["1","123"]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589441350918,
    "msgContent":"{\"id\":[\"1\",\"123\"]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589441351042,"code":200,"msgContent":"{"items":[{"id":"1","taskArray":[{"taskId":"67","type":0,"disposeIp":"192.168.5.8","startTime":1589425749,"disposeTime":7200,"flowAttack":0,"flowClean":0}],"status":0,"message":"成功"},{"id":"123","taskArray":[],"status":19,"message":"没有这个设备"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589441351042,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"taskArray\":[{\"taskId\":\"67\",\"type\":0,\"disposeIp\":\"192.168.5.8\",\"startTime\":1589425749,\"disposeTime\":7200,\"flowAttack\":0,\"flowClean\":0}],\"status\":0,\"message\":\"成功\"},{\"id\":\"123\",\"taskArray\":[],\"status\":19,\"message\":\"没有这个设备\"}]}"
}

获取能力节点所有处置任务

  • 请求命令
    字段 内容
    Request URI dispose/information/all_task
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1589441746230,"msgContent":"{"id":["1","123"]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589441746230,
    "msgContent":"{\"id\":[\"1\",\"123\"]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589442276448,"code":200,"msgContent":"{"items":[{"id":"1","taskArray":[{"taskId":"66","currentStatus":1,"type":0,"disposeIp":"192.168.5.7","startTime":1589425731,"disposeTime":7200,"flowAttack":0,"flowClean":0},{"taskId":"67","currentStatus":1,"type":0,"disposeIp":"192.168.5.8","startTime":1589425749,"disposeTime":7200,"flowAttack":0,"flowClean":0},{"taskId":"63","currentStatus":1,"type":0,"disposeIp":"192.168.5.2","startTime":1589422184,"disposeTime":7200,"flowAttack":0,"flowClean":0}],"status":0,"message":"成功"},{"id":"123","taskArray":[],"status":19,"message":"没有这个设备"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589442276448,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"taskArray\":[{\"taskId\":\"66\",\"currentStatus\":1,\"type\":0,\"disposeIp\":\"192.168.5.7\",\"startTime\":1589425731,\"disposeTime\":7200,\"flowAttack\":0,\"flowClean\":0},{\"taskId\":\"67\",\"currentStatus\":1,\"type\":0,\"disposeIp\":\"192.168.5.8\",\"startTime\":1589425749,\"disposeTime\":7200,\"flowAttack\":0,\"flowClean\":0},{\"taskId\":\"63\",\"currentStatus\":1,\"type\":0,\"disposeIp\":\"192.168.5.2\",\"startTime\":1589422184,\"disposeTime\":7200,\"flowAttack\":0,\"flowClean\":0}],\"status\":0,\"message\":\"成功\"},{\"id\":\"123\",\"taskArray\":[],\"status\":19,\"message\":\"没有这个设备\"}]}"
}

获取能力节点列表

  • 请求命令
    字段 内容
    Request URI dispose/information/node_list
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1589442707017,"msgContent":"{"id":["1","123"]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589442707017,
    "msgContent":"{\"id\":[\"1\",\"123\"]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589442707130,"code":200,"msgContent":"{"items":[{"id":"1","type":0,"name":"中移杭研实验室清洗设备","ip":"10.88.77.15","areaCode":0,"manufacturer":"DPTech","model":"UMC","version":"Virtual_Device_1.0.0","readme":"实验室测试设备","status":0,"message":"成功","capacity":[{"type":0,"disposeIp":"192.168.3.2-192.168.3.5,192.168.5.2-192.168.5.10,192.168.4.2-192.168.4.5","tolCapacity":1024,"usedCapacity":0},{"type":3,"disposeIp":"192.168.2.1,192.168.2.2","tolCapacity":0,"usedCapacity":0}]},{"id":"123","type":0,"status":19,"message":"没有这个设备"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589442707130,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"type\":0,\"name\":\"中移杭研实验室清洗设备\",\"ip\":\"10.88.77.15\",\"areaCode\":0,\"manufacturer\":\"DPTech\",\"model\":\"UMC\",\"version\":\"Virtual_Device_1.0.0\",\"readme\":\"实验室测试设备\",\"status\":0,\"message\":\"成功\",\"capacity\":[{\"type\":0,\"disposeIp\":\"192.168.3.2-192.168.3.5,192.168.5.2-192.168.5.10,192.168.4.2-192.168.4.5\",\"tolCapacity\":1024,\"usedCapacity\":0},{\"type\":3,\"disposeIp\":\"192.168.2.1,192.168.2.2\",\"tolCapacity\":0,\"usedCapacity\":0}]},{\"id\":\"123\",\"type\":0,\"status\":19,\"message\":\"没有这个设备\"}]}"
}

获取能力节点详细信息

  • 请求命令
    字段 内容
    Request URI dispose/information/node_details
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1589444539612,"msgContent":"{"id":["1","123"]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589444539612,
    "msgContent":"{\"id\":[\"1\",\"123\"]}"
}
  • 响应消息
    字段 内容
    Request URI dispose
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589444539710,"code":200,"msgContent":"{"items":[{"id":"1","type":0,"name":"中移杭研实验室清洗设备","ip":"10.88.77.15","areaCode":0,"manufacturer":"DPTech","model":"UMC","version":"Virtual_Device_1.0.0","readme":"实验室测试设备","status":0,"message":"成功","capacity":[{"type":0,"disposeIp":"192.168.3.2-192.168.3.5,192.168.5.2-192.168.5.10,192.168.4.2-192.168.4.5","tolCapacity":1024,"usedCapacity":0},{"type":3,"disposeIp":"192.168.2.1,192.168.2.2","tolCapacity":0,"usedCapacity":0}]},{"id":"123","type":0,"status":19,"message":"没有这个设备"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589444539710,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"type\":0,\"name\":\"中移杭研实验室清洗设备\",\"ip\":\"10.88.77.15\",\"areaCode\":0,\"manufacturer\":\"DPTech\",\"model\":\"UMC\",\"version\":\"Virtual_Device_1.0.0\",\"readme\":\"实验室测试设备\",\"status\":0,\"message\":\"成功\",\"capacity\":[{\"type\":0,\"disposeIp\":\"192.168.3.2-192.168.3.5,192.168.5.2-192.168.5.10,192.168.4.2-192.168.4.5\",\"tolCapacity\":1024,\"usedCapacity\":0},{\"type\":3,\"disposeIp\":\"192.168.2.1,192.168.2.2\",\"tolCapacity\":0,\"usedCapacity\":0}]},{\"id\":\"123\",\"type\":0,\"status\":19,\"message\":\"没有这个设备\"}]}"
}

启动处置任务

  • 请求命令
    字段 内容
    Request URI dispose/task/start
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":3,"cryptoType":0,"timeStamp":1598597142580,"msgContent":"{"type":0, "disposeIp":"192.168.5.3", "disposeTime":10, "flowDirection":2, "attackType":[1]}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598597142580,
	"msgContent": {
		"type": 0,
		"disposeIp": "192.168.5.3",
		"disposeTime": 10,
		"flowDirection": 2,
		"attackType": [
			1
		]
	}
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":3,"cryptoType":0,"timeStamp":1598863603232,"code":200,"msgContent":"{"taskId":"75","status":0,"message":["成功"]}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598863603232,
	"code": 200,
	"msgContent": {
		"taskId": "75",
		"status": 0,
		"message": [
			"成功"
		]
	}
}

停止指定处置任务

  • 请求命令
    字段 内容
    Request URI dispose/task/stop
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":3,"cryptoType":0,"timeStamp":1598597142580,"msgContent":"{"taskId":["81"]}"}
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598597142580,
	"msgContent": {
		"taskId": [
			"81"
		]
	}
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":3,"cryptoType":0,"timeStamp":1598946105967,"code":200,"msgContent":"{"taskId":"81","disposeDevice":["573"],"type":0,"disposeIp":"192.168.5.3","leftTime":"9","status":0,"message":["成功"]}
    }
{
	"ver": 3,
	"cryptoType": 0,
	"timeStamp": 1598946105967,
	"code": 200,
	"msgContent": [
		{
			"taskId": "81",
			"disposeDevice": [
				"573"
			],
			"type": 0,
			"disposeIp": "192.168.5.3",
			"leftTime": "9",
			"status": 0,
			"message": [
				"成功"
			]
		}
	]
}

停止某处置IP处置任务

  • 请求命令
    字段 内容
    Request URI dispose/task/stop_ip
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent": "{"items":[{"id":"1","type":0,"disposeIp":"192.168.3.3"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1587604296988,
    "msgContent": "{\"items\":[{\"id\":\"1\",\"type\":0,\"disposeIp\":\"192.168.3.3\"}]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589422325694,"code":200,"msgContent":"{"items":[{"id":"1","taskId":"61","type":0,"disposeIp":"192.168.3.3","leftTime":120,"status":0,"message":"成功"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589422325694,
    "code": 200,
    "msgContent": "{\"items\":[{\"id\":\"1\",\"taskId\":\"61\",\"type\":0,\"disposeIp\":\"192.168.3.3\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"}]}"
}

停止指定能力节点全部处置任务

  • 请求命令
    字段 内容
    Request URI dispose/task/stop_node
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent": "{"items":[{"id":"1","type":0}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1587604296988,
    "msgContent": "{\"items\":[{\"id\":\"1\",\"type\":0}]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589422781798,"code":200,"msgContent":"{"items":[{"id":"1","taskId":"64","type":0,"disposeIp":"192.168.5.3","leftTime":120,"status":0,"message":"成功"},{"id":"1","taskId":"62","type":0,"disposeIp":"192.168.3.4","leftTime":120,"status":0,"message":"成功"},{"id":"1","taskId":"63","type":0,"disposeIp":"192.168.5.2","leftTime":120,"status":0,"message":"成功"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589422781798,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"taskId\":\"64\",\"type\":0,\"disposeIp\":\"192.168.5.3\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"1\",\"taskId\":\"62\",\"type\":0,\"disposeIp\":\"192.168.3.4\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"1\",\"taskId\":\"63\",\"type\":0,\"disposeIp\":\"192.168.5.2\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"}]}"
}

停止全部处置任务

  • 请求命令
    字段 内容
    Request URI dispose/task/stop_all
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent":"{"type":0}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1587604296988,
    "msgContent":"{\"type\":0}"}
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589426197759,"code":200,"msgContent":"{"items":[{"id":"1","taskId":"66","type":0,"disposeIp":"192.168.5.7","leftTime":120,"status":0,"message":"成功"},{"id":"1","taskId":"67","type":0,"disposeIp":"192.168.5.8","leftTime":120,"status":0,"message":"成功"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589426197759,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"taskId\":\"66\",\"type\":0,\"disposeIp\":\"192.168.5.7\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"},{\"id\":\"1\",\"taskId\":\"67\",\"type\":0,\"disposeIp\":\"192.168.5.8\",\"leftTime\":120,\"status\":0,\"message\":\"成功\"}]}"
}

获取指定能力节点全部处置任务

  • 请求命令
    字段 内容
    Request URI dispose/task/get_node
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent":"{"id": ["1","123"],"type":0}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1587604296988,
    "msgContent":"{\"id\": [\"1\",\"123\"],\"type\":0}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589431031587,"code":200,"msgContent":"{"items":[{"id":"1","taskArray":[{"taskId":"66","type":0,"disposeIp":"192.168.5.7","startTime":1589425731,"disposeTime":7200,"flowAttack":0,"flowClean":0},{"taskId":"67","type":0,"disposeIp":"192.168.5.8","startTime":1589425749,"disposeTime":7200,"flowAttack":0,"flowClean":0}],"status":0,"message":"成功"},{"id":"123","status":30,"message":"没有该任务"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589431031587,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"taskArray\":[{\"taskId\":\"66\",\"type\":0,\"disposeIp\":\"192.168.5.7\",\"startTime\":1589425731,\"disposeTime\":7200,\"flowAttack\":0,\"flowClean\":0},{\"taskId\":\"67\",\"type\":0,\"disposeIp\":\"192.168.5.8\",\"startTime\":1589425749,\"disposeTime\":7200,\"flowAttack\":0,\"flowClean\":0}],\"status\":0,\"message\":\"成功\"},{\"id\":\"123\",\"status\":30,\"message\":\"没有该任务\"}]}"
}

获取处置任务详细信息

  • 请求命令
    字段 内容
    Request URI dispose/task/get
    Content type application/json;charset=UTF-8
    Authorization "Bearer b8f01b8303cd9fcb7d3c9ed1b1c54d4a6e04bac3a66ab7df6ba81f690882ca2e"
    Body {"ver":2,"cryptoType":0,"timeStamp":1587604296988,"msgContent":"{"taskId":["60", "2"]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1587604296988,
    "msgContent":"{\"taskId\":[\"60\", \"2\"]}"
}
  • 响应消息
    字段 内容
    Content type application/json;charset=UTF-8
    Body {"ver":2,"cryptoType":0,"timeStamp":1589436408900,"code":200,"msgContent":"{"items":[{"id":"1","taskId":"60","type":0,"disposeIp":"192.168.3.2","startTime":1589421336,"disposeTime":120,"flowDirection":2,"attackType":[0],"flowBandWidth":1024,"flowAttack":0,"flowClean":0,"status":0,"message":"成功"},{"id":"-1","taskId":"2","startTime":0,"disposeTime":0,"status":30,"message":"没有该任务"}]}"}
{
    "ver": 2,
    "cryptoType": 0,
    "timeStamp": 1589436408900,
    "code": 200,
    "msgContent":"{\"items\":[{\"id\":\"1\",\"taskId\":\"60\",\"type\":0,\"disposeIp\":\"192.168.3.2\",\"startTime\":1589421336,\"disposeTime\":120,\"flowDirection\":2,\"attackType\":[0],\"flowBandWidth\":1024,\"flowAttack\":0,\"flowClean\":0,\"status\":0,\"message\":\"成功\"},{\"id\":\"-1\",\"taskId\":\"2\",\"startTime\":0,\"disposeTime\":0,\"status\":30,\"message\":\"没有该任务\"}]}"
}