diff options
Diffstat (limited to 'ResmanagementService/service/src/integration-test/resources/mocoserver')
9 files changed, 326 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 |