summaryrefslogtreecommitdiffstats
path: root/restclient
diff options
context:
space:
mode:
authorMatthieuGeerebaert <matthieu.geerebaert@orange.com>2018-03-29 00:42:08 +0200
committerMatthieuGeerebaert <matthieu.geerebaert@orange.com>2018-04-03 23:48:32 +0200
commit7d695d108ce9f5fd5ee977fe12e47b704f507623 (patch)
tree42b4d6e72ef5546c2c9c100323b2db1b33c4ab84 /restclient
parent9ac6c3cc7e3f4aec9ba69e7a5bb0800471c4e8dc (diff)
Add serviceOrder rest services
- Add create, get, find serviceOrder operations - Add tests - Add Mongo / Mysql / H2 datasource management ( H2 test ) - Add VSCode restclient samples with .settings to play with serviceOrder operations - Resolve conflict 40291, with cherry pick Change-Id: I81a76a211fe5526a3a31deb945770f0a5e2c195f Issue-ID: EXTAPI-42 Signed-off-by: MatthieuGeerebaert <matthieu.geerebaert@orange.com>
Diffstat (limited to 'restclient')
-rw-r--r--restclient/.vscode/settings.json12
-rw-r--r--restclient/json/serviceOrder_create_in_completed.json43
-rw-r--r--restclient/json/serviceOrder_create_in_rejected.json29
-rw-r--r--restclient/onap.http60
-rw-r--r--restclient/serviceOrder.http29
5 files changed, 173 insertions, 0 deletions
diff --git a/restclient/.vscode/settings.json b/restclient/.vscode/settings.json
new file mode 100644
index 0000000..1753f9a
--- /dev/null
+++ b/restclient/.vscode/settings.json
@@ -0,0 +1,12 @@
+{
+ // CHARLES WEB DEBUGGING PROXY
+ //"http.proxy": "http://localhost:8888/",
+ "http.proxyStrictSSL" :false,
+ // REST CLIENT
+ "rest-client.fontSize":12,
+ "rest-client.environmentVariables": {
+ "ONAP external api nbi local": {
+ "serviceOrder.url": "http://localhost:8080/nbi/api/v1"
+ }
+ }
+} \ No newline at end of file
diff --git a/restclient/json/serviceOrder_create_in_completed.json b/restclient/json/serviceOrder_create_in_completed.json
new file mode 100644
index 0000000..64fcec9
--- /dev/null
+++ b/restclient/json/serviceOrder_create_in_completed.json
@@ -0,0 +1,43 @@
+{
+ "externalId": "LudONAP001",
+ "priority": "1",
+ "description": "Ludo first ONAP Order",
+ "category": "Consumer",
+ "requestedStartDate": "2018-02-28T13:33:37.299Z",
+ "requestedCompletionDate": "2018-02-28T13:33:37.299Z",
+ "relatedParty": [
+ {
+ "id": "6490",
+ "role": "ONAPcustomer",
+ "name": "Jean Pontus",
+ "@referredType": "individual"
+ }
+ ],
+ "orderItem": [
+ {
+ "id": "A",
+ "action": "add",
+ "service": {
+ "serviceState": "active",
+ "serviceSpecification": {
+ "id": "1e3feeb0-8e36-46c6-862c-236d9c626439"
+ }
+ }
+ },
+ {
+ "id": "B",
+ "action": "add",
+ "service": {
+ "serviceState": "active",
+ "serviceSpecification": {
+ "id": "1e3feeb0-8e36-46c6-862c-236d9c626439"
+ }
+ },
+ "orderItemRelationship": [
+ {
+ "id": "A"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/restclient/json/serviceOrder_create_in_rejected.json b/restclient/json/serviceOrder_create_in_rejected.json
new file mode 100644
index 0000000..fa0426c
--- /dev/null
+++ b/restclient/json/serviceOrder_create_in_rejected.json
@@ -0,0 +1,29 @@
+{
+ "externalId": "LudONAP001",
+ "priority": "1",
+ "description": "Ludo first ONAP Order",
+ "category": "Consumer",
+ "requestedStartDate": "2018-02-28T13:33:37.299Z",
+ "requestedCompletionDate": "2018-02-28T13:33:37.299Z",
+ "relatedParty": [
+ {
+ "id": "6490",
+ "role": "ONAPcustomer",
+ "name": "Jean Pontus",
+ "@referredType": "individual"
+ }
+ ],
+ "orderItem": [
+ {
+ "id": "1",
+ "action": "add",
+ "service": {
+ "id": "vFW0001",
+ "serviceState": "active",
+ "serviceSpecification": {
+ "id": "1e3feeb0-8e36-46c6-862c-236d9c626439"
+ }
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/restclient/onap.http b/restclient/onap.http
new file mode 100644
index 0000000..cbec294
--- /dev/null
+++ b/restclient/onap.http
@@ -0,0 +1,60 @@
+
+## SDC Get catalog service list
+
+GET {{sdc.url}}/sdc/v1/catalog/services HTTP/1.1
+Accept: application/json
+Authorization: {{sdc.token}}
+USER_ID: {{sdc.userId}}
+X-TransactionId: {{sdc.transactionId}}
+X-FromAppId: {{sdc.appId}}
+x-ecomp-instanceid: {{sdc.instanceId}}
+
+### SDC Get Vendor Software Products
+
+GET {{sdc.url}}/onboarding-api/v1.0/vendor-software-products HTTP/1.1
+Accept: application/json
+Authorization: {{sdc.token}}
+USER_ID: {{sdc.userId}}
+X-TransactionId: {{sdc.transactionId}}
+X-FromAppId: {{sdc.appId}}
+x-ecomp-instanceid: {{sdc.instanceId}}
+
+### SO Query orchestrationRequests
+
+GET {{so.url}} HTTP/1.1
+Accept: application/json
+Authorization: {{so.token}}
+X-TransactionId: {{so.transactionId}}
+X-FromAppId: {{so.appId}}
+
+### AAI Get all Customer Accounts
+
+GET {{aai.url}}/business/customers HTTP/1.1
+Accept: application/json
+Authorization: {{aai.token}}
+X-TransactionId: {{aai.transactionId}}
+X-FromAppId: {{aai.appId}}
+
+### AAI vnfs
+
+GET {{aai.url}}/network/generic-vnfs HTTP/1.1
+Accept: application/json
+Authorization: {{aai.token}}
+X-TransactionId: {{aai.transactionId}}
+X-FromAppId: {{aai.appId}}
+
+## AAI Services list
+
+GET {{aai.url}}/service-design-and-creation/services HTTP/1.1
+Accept: application/json
+Authorization: {{aai.token}}
+X-TransactionId: {{aai.transactionId}}
+X-FromAppId: {{aai.appId}}
+
+## AAI Serivce Instance for service vMRFaaS3
+
+GET {{aai.url}}/business/customers/customer/Sina/service-subscriptions/service-subscription/vIMS/service-instances/ HTTP/1.1
+Accept: application/json
+Authorization: {{aai.token}}
+X-TransactionId: {{aai.transactionId}}
+X-FromAppId: {{aai.appId}} \ No newline at end of file
diff --git a/restclient/serviceOrder.http b/restclient/serviceOrder.http
new file mode 100644
index 0000000..c8c6905
--- /dev/null
+++ b/restclient/serviceOrder.http
@@ -0,0 +1,29 @@
+### Create REJECTED
+POST {{serviceOrder.url}}/serviceOrder
+ ?fields=id,state,description,relatedParty.id,toto
+Accept: application/json
+Content-Type: application/json
+
+< ./json/serviceOrder_create_in_rejected.json
+
+### Create COMPLETED
+POST {{serviceOrder.url}}/serviceOrder
+ ?fields=id,state,description,relatedParty.id,toto
+Accept: application/json
+Content-Type: application/json
+
+< ./json/serviceOrder_create_in_completed.json
+
+### List
+GET {{serviceOrder.url}}/serviceOrder/
+Accept: application/json
+
+### List with fields
+GET {{serviceOrder.url}}/serviceOrder
+ ?fields=id,state,description,relatedParty.id
+Accept: application/json
+
+### List COMPLETED
+GET {{serviceOrder.url}}/serviceOrder
+ ?state=COMPLETED
+Accept: application/json \ No newline at end of file