diff options
author | luxin <luxin7@huawei.com> | 2017-07-03 10:19:19 +0800 |
---|---|---|
committer | luxin <luxin7@huawei.com> | 2017-07-03 10:19:19 +0800 |
commit | 056dcab91efc64b5f9fc39825f9242e7fa0b9d05 (patch) | |
tree | d1af18cb6bfa6d3d61f0f77ff958d5a3ce7d6d06 /ResmanagementService/service/src/integration-test/resources | |
parent | d0ad118ba98d809ddc8eece49cf1fe1dfc83fc74 (diff) |
Upload nfvo resmanagement code
Change-Id: Ibe023d4b09e1105b84eb43153b4d4037cae691db
Signed-off-by: luxin <luxin7@huawei.com>
Diffstat (limited to 'ResmanagementService/service/src/integration-test/resources')
59 files changed, 1357 insertions, 0 deletions
diff --git a/ResmanagementService/service/src/integration-test/resources/mocoserver/getcpulimits.json b/ResmanagementService/service/src/integration-test/resources/mocoserver/getcpulimits.json new file mode 100644 index 0000000..c2eb426 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/mocoserver/getcpulimits.json @@ -0,0 +1,26 @@ +{ + "request": { + "uri": "/openoapi/vimdriver/v1/limits/1234/cpumemory", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "query": { + "vimId": "123" + } + }, + "response": { + "status": 200, + "json": { + "limits": { + "rate": [], + "absolute": { + "maxTotalVolumes": 1000, + "totalVolumesUsed": 14, + "maxTotalVolumeGigabytes": 42000, + "totalGigabytesUsed":1054 + } + } + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/mocoserver/getdisklimits.json b/ResmanagementService/service/src/integration-test/resources/mocoserver/getdisklimits.json new file mode 100644 index 0000000..a99b0df --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/mocoserver/getdisklimits.json @@ -0,0 +1,24 @@ +{ + "request": { + "uri": "/openoapi/vimdriver/v1/limits/1234/disk", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "query": { + "vimId": "123" + } + }, + "response": { + "status": 200, + "json": { + "vimId": "123", + "vimName": "vim1", + "limits": { + "volumes": 1000, + "gigabytes": 42000, + "snapshots": 100 + } + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/mocoserver/gethost.json b/ResmanagementService/service/src/integration-test/resources/mocoserver/gethost.json new file mode 100644 index 0000000..427d208 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/mocoserver/gethost.json @@ -0,0 +1,51 @@ +{
+ "request": {
+ "uri": "/openoapi/vimdriver/v1/[a-zA-Z0-9\\-\\_]{1,36}/hosts/[a-zA-Z0-9\\-\\_]{1,36}",
+ "method": "get",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "query": {
+ "vimId": "123",
+ "tenantId": "1234"
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "hosts": [{
+ "resource": {
+ "cpu": 1,
+ "disk_gb": 1028,
+ "host": "c1a7de0ac9d94e4baceae031d05caae3",
+ "memory_mb": 8192,
+ "project": "(total)"
+ },
+ "vimId": "123",
+ "vimName": "vim"
+ },
+ {
+ "resource": {
+ "cpu": 0,
+ "disk_gb": 0,
+ "host": "c1a7de0ac9d94e4baceae031d05caae3",
+ "memory_mb": 512,
+ "project": "(used_now)"
+ },
+ "vimId": "123",
+ "vimName": "vim"
+ },
+ {
+ "resource": {
+ "cpu": 0,
+ "disk_gb": 0,
+ "host": "c1a7de0ac9d94e4baceae031d05caae3",
+ "memory_mb": 0,
+ "project": "(used_max)"
+ },
+ "vimId": "123",
+ "vimName": "vim"
+ }]
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/mocoserver/gethosts.json b/ResmanagementService/service/src/integration-test/resources/mocoserver/gethosts.json new file mode 100644 index 0000000..58d315b --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/mocoserver/gethosts.json @@ -0,0 +1,26 @@ +{
+ "request": {
+ "uri": "/openoapi/vimdriver/v1/[a-zA-Z0-9\\-\\_]{1,36}/hosts",
+ "method": "get",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "query": {
+ "vimId": "123",
+ "tenantId": "1234"
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "hosts": [
+ {
+ "host_name": "09c025b0efc64211bd23fc50fa974cdf",
+ "service": "compute",
+ "zone": "nova",
+ "vimId": "123",
+ "vimName": "vim"
+ }]
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/mocoserver/getnetworks.json b/ResmanagementService/service/src/integration-test/resources/mocoserver/getnetworks.json new file mode 100644 index 0000000..e8afa28 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/mocoserver/getnetworks.json @@ -0,0 +1,54 @@ +{
+ "request": {
+ "uri": "/openoapi/vimdriver/v1/networks",
+ "method": "get",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "query": {
+ "vimId": "123",
+ "tenantId": "1234"
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "networks": [{
+ "status": "ACTIVE",
+ "subnets": ["54d6f61d-db07-451c-9ab3-b9609b6b6f0b"],
+ "name": "private-network",
+ "provider:physical_network": null,
+ "admin_state_up": true,
+ "project_id": "4fd44f30292945e481c7b8a0c8908869",
+ "tenant_id": "4fd44f30292945e481c7b8a0c8908869",
+ "qos_policy_id": "6a8454ade84346f59e8d40665f878b2e",
+ "provider:network_type": "local",
+ "router:external": true,
+ "mtu": 0,
+ "shared": true,
+ "id": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
+ "provider:segmentation_id": null,
+ "vimId": "123",
+ "vimName": "vim"
+ },
+ {
+ "status": "ACTIVE",
+ "subnets": ["08eae331-0402-425a-923c-34f7cfe39c1b"],
+ "name": "private",
+ "provider:physical_network": null,
+ "admin_state_up": true,
+ "project_id": "26a7980765d0414dbc1fc1f88cdb7e6e",
+ "tenant_id": "26a7980765d0414dbc1fc1f88cdb7e6e",
+ "qos_policy_id": "bfdb6c39f71e4d44b1dfbda245c50819",
+ "provider:network_type": "local",
+ "router:external": true,
+ "mtu": 0,
+ "shared": true,
+ "id": "db193ab3-96e3-4cb3-8fc5-05f4296d0324",
+ "provider:segmentation_id": null,
+ "vimId": "123",
+ "vimName": "vim"
+ }]
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/mocoserver/getports.json b/ResmanagementService/service/src/integration-test/resources/mocoserver/getports.json new file mode 100644 index 0000000..37902ca --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/mocoserver/getports.json @@ -0,0 +1,60 @@ +{
+ "request": {
+ "uri": "/openoapi/vimdriver/v1/ports",
+ "method": "get",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "query": {
+ "vimId": "123",
+ "tenantId": "1234"
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "ports": [{
+ "status": "ACTIVE",
+ "name": "",
+ "allowed_address_pairs": [],
+ "admin_state_up": true,
+ "network_id": "70c1db1f-b701-45bd-96e0-a313ee3430b3",
+ "project_id": "",
+ "tenant_id": "",
+ "extra_dhcp_opts": [],
+ "device_owner": "network:router_gateway",
+ "mac_address": "fa:16:3e:58:42:ed",
+ "fixed_ips": [{
+ "subnet_id": "008ba151-0b8c-4a67-98b5-0d2b87666062",
+ "ip_address": "172.24.4.2"
+ }],
+ "id": "d80b1a3b-4fc1-49f3-952e-1e2ab7081d8b",
+ "security_groups": [],
+ "device_id": "9ae135f4-b6e0-4dad-9e91-3c223e385824",
+ "vimId": "123",
+ "vimName": "vim"
+ },
+ {
+ "status": "ACTIVE",
+ "name": "",
+ "allowed_address_pairs": [],
+ "admin_state_up": true,
+ "network_id": "f27aa545-cbdd-4907-b0c6-c9e8b039dcc2",
+ "project_id": "d397de8a63f341818f198abb0966f6f3",
+ "tenant_id": "d397de8a63f341818f198abb0966f6f3",
+ "extra_dhcp_opts": [],
+ "device_owner": "network:router_interface",
+ "mac_address": "fa:16:3e:bb:3c:e4",
+ "fixed_ips": [{
+ "subnet_id": "288bf4a1-51ba-43b6-9d0a-520e9005db17",
+ "ip_address": "10.0.0.1"
+ }],
+ "id": "f71a6703-d6de-4be1-a91a-a570ede1d159",
+ "security_groups": [],
+ "device_id": "9ae135f4-b6e0-4dad-9e91-3c223e385824",
+ "vimId": "123",
+ "vimName": "vim"
+ }]
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/mocoserver/sendmsgmonitor1.json b/ResmanagementService/service/src/integration-test/resources/mocoserver/sendmsgmonitor1.json new file mode 100644 index 0000000..9cbc812 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/mocoserver/sendmsgmonitor1.json @@ -0,0 +1,31 @@ +{
+ "request": {
+ "uri": "/openoapi/umcres/v1/resinfo",
+ "method": "post",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "json": {
+ "operationType": "create",
+ "resourceType": "HOST",
+ "label": "09c025b0efc64211bd23fc50fa974cdf",
+ "data": [{
+ "cpu": "1",
+ "disk": "1028",
+ "id": "12345678",
+ "memory": "8192",
+ "name": "09c025b0efc64211bd23fc50fa974cdf",
+ "vimId": "123",
+ "vimName": "vim"
+ }]
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "result": "SUCCESS",
+ "info": "resource monitor info add ok",
+ "oid": ["12345678"]
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/mocoserver/sendmsgmonitor2.json b/ResmanagementService/service/src/integration-test/resources/mocoserver/sendmsgmonitor2.json new file mode 100644 index 0000000..631cf55 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/mocoserver/sendmsgmonitor2.json @@ -0,0 +1,31 @@ +{
+ "request": {
+ "uri": "/openoapi/umcres/v1/resinfo",
+ "method": "post",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "json": {
+ "operationType": "update",
+ "resourceType": "HOST",
+ "label": "09c025b0efc64211bd23fc50fa974cdf",
+ "data": [{
+ "cpu": "20",
+ "disk": "100",
+ "id": "12345678",
+ "memory": "8",
+ "name": "09c025b0efc64211bd23fc50fa974cdf",
+ "vimId": "123",
+ "vimName": "456"
+ }]
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "result":"SUCCESS",
+ "info":"resource monitor info update ok",
+ "oid":["12345678"]
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/mocoserver/sendmsgmonitor3.json b/ResmanagementService/service/src/integration-test/resources/mocoserver/sendmsgmonitor3.json new file mode 100644 index 0000000..4452178 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/mocoserver/sendmsgmonitor3.json @@ -0,0 +1,23 @@ +{
+ "request": {
+ "uri": "/openoapi/umcres/v1/resinfo",
+ "method": "delete",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "json": {
+ "operationType": "delete",
+ "resourceType": "HOST",
+ "label": "09c025b0efc64211bd23fc50fa974cdf",
+ "deleteIds": ["12345678"]
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "result":"SUCCESS",
+ "info":"resource monitor info delete ok",
+ "oid":["12345678"]
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/server.properties b/ResmanagementService/service/src/integration-test/resources/server.properties new file mode 100644 index 0000000..44f3fdf --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/server.properties @@ -0,0 +1,14 @@ + +## Integration Test Server Configuration File + +## Server IpAddress +serverip=127.0.0.1 + +## Server Port +serverport=8080 + +## Http Moco Server Port +mocohttpport=12306 + +## Https Moco Server Port +mocohttpsport=12307
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/createhostsfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/createhostsfail1.json new file mode 100644 index 0000000..2966f48 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/createhostsfail1.json @@ -0,0 +1,24 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/hosts", + "method": "post", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id":"12345678", + "name": "hostName", + "cpu": "20", + "memory": "8", + "disk": "100", + "vimId": "123", + "vimName": "456" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.service.host.add.id.check" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/createhostssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/createhostssuccess1.json new file mode 100644 index 0000000..4573a0c --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/createhostssuccess1.json @@ -0,0 +1,24 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/hosts", + "method": "post", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id":"12345678", + "name": "hostName", + "cpu": "20", + "memory": "8", + "disk": "100", + "vimId": "123", + "vimName": "456" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.add.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/deletehostsfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/deletehostsfail1.json new file mode 100644 index 0000000..5144c9a --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/deletehostsfail1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/hosts?id=aaaa", + "method": "delete", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.del.error" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/deletehostssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/deletehostssuccess1.json new file mode 100644 index 0000000..98f3d13 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/deletehostssuccess1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/hosts?id=12345678", + "method": "delete", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.del.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/modhostsfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/modhostsfail1.json new file mode 100644 index 0000000..de24b26 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/modhostsfail1.json @@ -0,0 +1,24 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/hosts", + "method": "put", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id":"aaaa", + "name": "newName", + "cpu": "20", + "memory": "8", + "disk": "100", + "vimId": "123", + "vimName": "456" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.update.error" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/modhostssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/modhostssuccess1.json new file mode 100644 index 0000000..3280951 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/modhostssuccess1.json @@ -0,0 +1,24 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/hosts", + "method": "put", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id":"12345678", + "name": "hostName", + "cpu": "20", + "memory": "8", + "disk": "100", + "vimId": "123", + "vimName": "456" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.update.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/queryhostsbyidfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/queryhostsbyidfail1.json new file mode 100644 index 0000000..fe528b2 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/queryhostsbyidfail1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/hosts/aaaa", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "hosts": [] + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/queryhostsbyidsuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/queryhostsbyidsuccess1.json new file mode 100644 index 0000000..0cccaa0 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/hostroa/queryhostsbyidsuccess1.json @@ -0,0 +1,23 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/hosts/12345678", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "hosts": [{ + "cpu": "20", + "disk": "100", + "id": "12345678", + "memory": "8", + "name": "hostName", + "vimId": "123", + "vimName": "456" + }] + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/limitsroa/querycpulimitssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/limitsroa/querycpulimitssuccess1.json new file mode 100644 index 0000000..8b24164 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/limitsroa/querycpulimitssuccess1.json @@ -0,0 +1,23 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/limits/1234/cpu?vimId=123", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "limits": { + "rate": [], + "absolute": { + "maxTotalVolumes": 1000, + "totalVolumesUsed": 14, + "maxTotalVolumeGigabytes": 42000, + "totalGigabytesUsed":1054 + } + } + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/limitsroa/querydisklimitssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/limitsroa/querydisklimitssuccess1.json new file mode 100644 index 0000000..7da9cdb --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/limitsroa/querydisklimitssuccess1.json @@ -0,0 +1,21 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/limits/1234/disk?vimId=123", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "vimId": "123", + "vimName": "vim1", + "limits": { + "volumes": 1000, + "gigabytes": 42000, + "snapshots": 100 + } + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/createlocationsfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/createlocationsfail1.json new file mode 100644 index 0000000..c490bc9 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/createlocationsfail1.json @@ -0,0 +1,23 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/locations", + "method": "post", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "12345678", + "country": "china", + "location": "shenzhen", + "latitude": "11", + "longitude": "22.2", + "description": "" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.service.base.location.add.entity.check" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/createlocationssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/createlocationssuccess1.json new file mode 100644 index 0000000..fb4b97a --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/createlocationssuccess1.json @@ -0,0 +1,23 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/locations", + "method": "post", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "12345678", + "country": "china", + "location": "shenzhen", + "latitude": "11", + "longitude": "22.2", + "description": "" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.add.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/deletelocationsfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/deletelocationsfail1.json new file mode 100644 index 0000000..136096d --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/deletelocationsfail1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/locations/aaaa", + "method": "delete", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.del.error" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/deletelocationssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/deletelocationssuccess1.json new file mode 100644 index 0000000..eaaf8d9 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/deletelocationssuccess1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/locations/12345678", + "method": "delete", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.del.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/modlocationsfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/modlocationsfail1.json new file mode 100644 index 0000000..d362898 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/modlocationsfail1.json @@ -0,0 +1,23 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/locations", + "method": "put", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "aaaa", + "country": "china", + "location": "shenzhen", + "latitude": "11.1", + "longitude": "22.2", + "description": "" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.service.base.location.update.modified.check" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/modlocationssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/modlocationssuccess1.json new file mode 100644 index 0000000..3205272 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/modlocationssuccess1.json @@ -0,0 +1,23 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/locations", + "method": "put", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "12345678", + "country": "china", + "location": "shenzhen", + "latitude": "11.1", + "longitude": "22.2", + "description": "" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.update.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/querylocationsbyidfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/querylocationsbyidfail1.json new file mode 100644 index 0000000..b49a37d --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/querylocationsbyidfail1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/locations/aaaa", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "locations": [] + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/querylocationsbyidsuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/querylocationsbyidsuccess1.json new file mode 100644 index 0000000..387adc9 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/locationroa/querylocationsbyidsuccess1.json @@ -0,0 +1,22 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/locations/12345678", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "locations": [{ + "country": "china", + "description": "", + "id": "12345678", + "latitude": "11", + "location": "shenzhen", + "longitude": "22.2" + }] + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/createnetworksfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/createnetworksfail1.json new file mode 100644 index 0000000..014d49f --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/createnetworksfail1.json @@ -0,0 +1,26 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/networks", + "method": "post", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "12345678", + "name": "name1", + "tenantId": "111111", + "status": "active", + "vimId": "123", + "vimName": "vimName", + "physicalNetwork": "physnet1", + "networkType": "vlan", + "segmentationId": "26" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.service.base.network.add.entity.check" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/createnetworkssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/createnetworkssuccess1.json new file mode 100644 index 0000000..b909858 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/createnetworkssuccess1.json @@ -0,0 +1,26 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/networks", + "method": "post", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "12345678", + "name": "name1", + "tenantId": "111111", + "status": "active", + "vimId": "123", + "vimName": "vimName", + "physicalNetwork": "physnet1", + "networkType": "vlan", + "segmentationId": "26" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.add.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/deletenetworksfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/deletenetworksfail1.json new file mode 100644 index 0000000..d3a5e5a --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/deletenetworksfail1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/networks?id=aaaa", + "method": "delete", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.del.error" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/deletenetworkssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/deletenetworkssuccess1.json new file mode 100644 index 0000000..1e56c4b --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/deletenetworkssuccess1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/networks?id=12345678", + "method": "delete", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.del.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/modnetworksfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/modnetworksfail1.json new file mode 100644 index 0000000..2852a2a --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/modnetworksfail1.json @@ -0,0 +1,26 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/networks", + "method": "put", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "aaaa", + "name": "newName1", + "tenantId": "111111", + "status": "active", + "vimId": "123", + "vimName": "vimName", + "physicalNetwork": "physnet1", + "networkType": "vlan", + "segmentationId": "26" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.update.error" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/modnetworkssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/modnetworkssuccess1.json new file mode 100644 index 0000000..fc6aed8 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/modnetworkssuccess1.json @@ -0,0 +1,26 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/networks", + "method": "put", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "12345678", + "name": "newName1", + "tenantId": "111111", + "status": "active", + "vimId": "123", + "vimName": "vimName", + "physicalNetwork": "physnet1", + "networkType": "vlan", + "segmentationId": "26" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.update.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/querynetworksbyidfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/querynetworksbyidfail1.json new file mode 100644 index 0000000..ae888cf --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/querynetworksbyidfail1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/networks/aaaa", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "networks": [] + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/querynetworksbyidsuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/querynetworksbyidsuccess1.json new file mode 100644 index 0000000..b933eb4 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/networkroa/querynetworksbyidsuccess1.json @@ -0,0 +1,25 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/networks/12345678", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "networks": [{ + "id": "12345678", + "name": "name1", + "tenant_id": "111111", + "status": "active", + "vimId": "123", + "vimName": "vimName", + "provider:physical_network": "physnet1", + "provider:network_type": "vlan", + "provider:segmentation_id": "26" + }] + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/portroa/createportsfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/createportsfail1.json new file mode 100644 index 0000000..7270bf4 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/createportsfail1.json @@ -0,0 +1,24 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/ports", + "method": "post", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "12345678", + "name": "portName", + "networkId": "1111", + "status": "ACTIVE", + "tenantId": "123456", + "vimId": "11", + "vimName": "22" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.service.port.add.id.check" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/portroa/createportssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/createportssuccess1.json new file mode 100644 index 0000000..b31d469 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/createportssuccess1.json @@ -0,0 +1,24 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/ports", + "method": "post", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "12345678", + "name": "portName", + "networkId": "1111", + "status": "ACTIVE", + "tenantId": "123456", + "vimId": "11", + "vimName": "22" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.add.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/portroa/deleteportsfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/deleteportsfail1.json new file mode 100644 index 0000000..c4e3659 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/deleteportsfail1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/ports?id=aaaa", + "method": "delete", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.del.error" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/portroa/deleteportssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/deleteportssuccess1.json new file mode 100644 index 0000000..843593d --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/deleteportssuccess1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/ports?id=12345678", + "method": "delete", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.del.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/portroa/modportsfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/modportsfail1.json new file mode 100644 index 0000000..6c3f521 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/modportsfail1.json @@ -0,0 +1,24 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/ports", + "method": "put", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "aaaa", + "name": "portName", + "networkId": "1111", + "status": "ACTIVE", + "tenantId": "123456", + "vimId": "11", + "vimName": "22" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.update.error" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/portroa/modportssuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/modportssuccess1.json new file mode 100644 index 0000000..583764c --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/modportssuccess1.json @@ -0,0 +1,24 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/ports", + "method": "put", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "id": "12345678", + "name": "newName", + "networkId": "1111", + "status": "ACTIVE", + "tenantId": "123456", + "vimId": "11", + "vimName": "22" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.update.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/portroa/queryportsbyidfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/queryportsbyidfail1.json new file mode 100644 index 0000000..6a1007f --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/queryportsbyidfail1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/ports/aaaa", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "ports": [] + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/portroa/queryportsbyidsuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/queryportsbyidsuccess1.json new file mode 100644 index 0000000..4fe360f --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/portroa/queryportsbyidsuccess1.json @@ -0,0 +1,23 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/ports/12345678", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "ports": [{ + "id": "12345678", + "name": "portName", + "networkId": "1111", + "status": "ACTIVE", + "tenantId": "123456", + "vimId": "11", + "vimName": "22" + }] + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/addresourcefail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/addresourcefail1.json new file mode 100644 index 0000000..a604f52 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/addresourcefail1.json @@ -0,0 +1,18 @@ +{
+ "request": {
+ "uri": "/openoapi/resmgr/v1/resoperate/resmgr/vims?tenantId=1234",
+ "method": "post",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "json": {
+
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "msg": "org.openo.nfvo.resmanage.service.group.resoperate.add.res.no.vimId"
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/addresourcesuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/addresourcesuccess1.json new file mode 100644 index 0000000..b23f38f --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/addresourcesuccess1.json @@ -0,0 +1,18 @@ +{
+ "request": {
+ "uri": "/openoapi/resmgr/v1/resoperate/resmgr/vims?tenantId=1234&vimId=123",
+ "method": "post",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "json": {
+
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "msg": "org.openo.nfvo.resmanage.common.add.success"
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/deleteresourcefail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/deleteresourcefail1.json new file mode 100644 index 0000000..d60484c --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/deleteresourcefail1.json @@ -0,0 +1,15 @@ +{
+ "request": {
+ "uri": "/openoapi/resmgr/v1/resoperate",
+ "method": "delete",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "msg": "org.openo.nfvo.resmanage.service.group.resoperate.res.no.vimId"
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/deleteresourcesuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/deleteresourcesuccess1.json new file mode 100644 index 0000000..4b099ae --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/deleteresourcesuccess1.json @@ -0,0 +1,15 @@ +{
+ "request": {
+ "uri": "/openoapi/resmgr/v1/resoperate?vimId=123",
+ "method": "delete",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "msg": "org.openo.nfvo.resmanage.common.del.success"
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/modresourcefail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/modresourcefail1.json new file mode 100644 index 0000000..0a54e89 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/modresourcefail1.json @@ -0,0 +1,17 @@ +{
+ "request": {
+ "uri": "/openoapi/resmgr/v1/resoperate/updateres?tenantId=1234",
+ "method": "put",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "json": {
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "msg": "org.openo.nfvo.resmanage.service.group.resoperate.add.res.no.result"
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/modresourcesuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/modresourcesuccess1.json new file mode 100644 index 0000000..c3196c1 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/resoperateroa/modresourcesuccess1.json @@ -0,0 +1,17 @@ +{
+ "request": {
+ "uri": "/openoapi/resmgr/v1/resoperate/updateres?tenantId=1234&vimId=123",
+ "method": "put",
+ "headers": {
+ "Content-Type": "application/json;charset=UTF-8"
+ },
+ "json": {
+ }
+ },
+ "response": {
+ "status": 200,
+ "json": {
+ "msg": "org.openo.nfvo.resmanage.common.update.success"
+ }
+ }
+}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/createsitesfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/createsitesfail1.json new file mode 100644 index 0000000..5584c1e --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/createsitesfail1.json @@ -0,0 +1,30 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/datacenters", + "method": "post", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "country": "china", + "id": "12345678", + "location": "shanghai", + "name": "shanghai", + "status": "active", + "totalCPU": "100", + "totalDisk": "100", + "totalMemory": "100", + "usedCPU": "10", + "usedDisk": "10", + "usedMemory": "10", + "vimId": "123", + "vimName": "vimName" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.service.base.site.add.id.check" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/createsitessuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/createsitessuccess1.json new file mode 100644 index 0000000..af0d3af --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/createsitessuccess1.json @@ -0,0 +1,30 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/datacenters", + "method": "post", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "country": "china", + "id": "12345678", + "location": "shanghai", + "name": "shanghai", + "status": "active", + "totalCPU": "100", + "totalDisk": "100", + "totalMemory": "100", + "usedCPU": "0", + "usedDisk": "0", + "usedMemory": "0", + "vimId": "123", + "vimName": "vimName" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.add.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/deletesitesfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/deletesitesfail1.json new file mode 100644 index 0000000..aacd3fe --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/deletesitesfail1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/datacenters/aaaa", + "method": "delete", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.del.error" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/deletesitessuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/deletesitessuccess1.json new file mode 100644 index 0000000..d4b083b --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/deletesitessuccess1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/datacenters/12345678", + "method": "delete", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.del.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/modsitesfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/modsitesfail1.json new file mode 100644 index 0000000..2c1be4e --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/modsitesfail1.json @@ -0,0 +1,30 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/datacenters", + "method": "put", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "country": "china", + "id": "aaaa", + "location": "shanghai", + "name": "newName", + "status": "active", + "totalCPU": "100", + "totalDisk": "100", + "totalMemory": "100", + "usedCPU": "0", + "usedDisk": "0", + "usedMemory": "0", + "vimId": "123", + "vimName": "vimName" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.update.error" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/modsitessuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/modsitessuccess1.json new file mode 100644 index 0000000..da19356 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/modsitessuccess1.json @@ -0,0 +1,30 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/datacenters", + "method": "put", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + }, + "json": { + "country": "china", + "id": "12345678", + "location": "shanghai", + "name": "newName", + "status": "active", + "totalCPU": "100", + "totalDisk": "100", + "totalMemory": "100", + "usedCPU": "0", + "usedDisk": "0", + "usedMemory": "0", + "vimId": "123", + "vimName": "vimName" + } + }, + "response": { + "status": 200, + "json": { + "msg": "org.openo.nfvo.resmanage.common.update.success" + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/querysitesbyidfail1.json b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/querysitesbyidfail1.json new file mode 100644 index 0000000..b12b02c --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/querysitesbyidfail1.json @@ -0,0 +1,15 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/datacenters/aaaa", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "datacenters": [] + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/querysitesbyidsuccess1.json b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/querysitesbyidsuccess1.json new file mode 100644 index 0000000..984a7eb --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/testcase/siteroa/querysitesbyidsuccess1.json @@ -0,0 +1,29 @@ +{ + "request": { + "uri": "/openoapi/resmgr/v1/datacenters/12345678", + "method": "get", + "headers": { + "Content-Type": "application/json;charset=UTF-8" + } + }, + "response": { + "status": 200, + "json": { + "datacenters": [{ + "country": "china", + "id": "12345678", + "location": "shanghai", + "name": "shanghai", + "status": "active", + "totalCPU": "100", + "totalDisk": "100", + "totalMemory": "100", + "usedCPU": "0", + "usedDisk": "0", + "usedMemory": "0", + "vimId": "123", + "vimName": "vimName" + }] + } + } +}
\ No newline at end of file diff --git a/ResmanagementService/service/src/integration-test/resources/urlconfig.json b/ResmanagementService/service/src/integration-test/resources/urlconfig.json new file mode 100644 index 0000000..9d07650 --- /dev/null +++ b/ResmanagementService/service/src/integration-test/resources/urlconfig.json @@ -0,0 +1,18 @@ +[ + { + "url": "/svc/ipsec/v1", + "prefix": "/org.openo.sdno.ipsecservice" + }, + { + "url": "/v2.0/tokens", + "prefix": "" + }, + { + "url": "/v2.0/networks", + "prefix": "" + }, + { + "url": "/rest/v1/resmanage/virtualnetworks", + "prefix": "" + } +]
\ No newline at end of file |