From 184e1ed3e83effc39b6f7f92c9f4b9d874c4cfe7 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Mon, 17 Sep 2018 10:52:09 -0400 Subject: add single transaction api to aaiclient fixed marshalling when issuing a patch request added support for single transaction api in A&AI Change-Id: Icf755f547523cc7dbf931e198177847a5a1c6ea1 Issue-ID: SO-1060 Signed-off-by: Benjamin, Max (mb388a) --- .../aai/singletransaction/sample-request.json | 26 +++++++++++++++++++ .../singletransaction/sample-response-failure.json | 30 ++++++++++++++++++++++ .../aai/singletransaction/sample-response.json | 22 ++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 common/src/test/resources/__files/aai/singletransaction/sample-request.json create mode 100644 common/src/test/resources/__files/aai/singletransaction/sample-response-failure.json create mode 100644 common/src/test/resources/__files/aai/singletransaction/sample-response.json (limited to 'common/src/test/resources') diff --git a/common/src/test/resources/__files/aai/singletransaction/sample-request.json b/common/src/test/resources/__files/aai/singletransaction/sample-request.json new file mode 100644 index 0000000000..f0761a07b6 --- /dev/null +++ b/common/src/test/resources/__files/aai/singletransaction/sample-request.json @@ -0,0 +1,26 @@ +{ + "operations": [ + { + "action": "put", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "body": { + "hostname": "pserver-hostname", + "fqdn": "pserver-bulk-process-single-transactions-multiple-actions-1-fqdn" + } + }, + { + "action": "patch", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "body": { + "fqdn": "patched-fqdn" + } + }, + { + "action": "put", + "uri": "/cloud-infrastructure/complexes/complex/my-complex", + "body": { + "city": "my-city" + } + } + ] +} \ No newline at end of file diff --git a/common/src/test/resources/__files/aai/singletransaction/sample-response-failure.json b/common/src/test/resources/__files/aai/singletransaction/sample-response-failure.json new file mode 100644 index 0000000000..d0b0e39924 --- /dev/null +++ b/common/src/test/resources/__files/aai/singletransaction/sample-response-failure.json @@ -0,0 +1,30 @@ +{ + "operation-responses": [ + { + "action": "put", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "response-status-code": 201, + "response-body": null + }, + { + "action": "patch", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "response-status-code": 200, + "response-body": null + }, + { + "action": "put", + "uri": "/cloud-infrastructure/complexes/complex/my-complex", + "response-status-code": 400, + "response-body": { + "requestError": { + "serviceException": { + "messageId": "SVC3003", + "text": "another error message", + "variables": [] + } + } + } + } + ] +} \ No newline at end of file diff --git a/common/src/test/resources/__files/aai/singletransaction/sample-response.json b/common/src/test/resources/__files/aai/singletransaction/sample-response.json new file mode 100644 index 0000000000..a5b322ee2e --- /dev/null +++ b/common/src/test/resources/__files/aai/singletransaction/sample-response.json @@ -0,0 +1,22 @@ +{ + "operation-responses": [ + { + "action": "put", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "response-status-code": 201, + "response-body": null + }, + { + "action": "patch", + "uri": "/cloud-infrastructure/pservers/pserver/pserver-hostname", + "response-status-code": 200, + "response-body": null + }, + { + "action": "put", + "uri": "/cloud-infrastructure/complexes/complex/my-complex", + "response-status-code": 201, + "response-body": null + } + ] +} \ No newline at end of file -- cgit 1.2.3-korg