Merge "Update Swagger files"
authorEric Debeau <eric.debeau@orange.com>
Wed, 13 Mar 2019 10:56:42 +0000 (10:56 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 13 Mar 2019 10:56:42 +0000 (10:56 +0000)
INFO.yaml
src/main/java/org/onap/nbi/OnapComponentsUrlPaths.java
src/main/java/org/onap/nbi/apis/servicecatalog/SdcClient.java
src/test/resources/karatetest/features/04--StatusRessourceTest.feature
src/test/resources/mappings/aai/aai_get_healtcheck.json [new file with mode: 0644]
src/test/resources/mappings/sdc/sdc_get_healthcheck.json [new file with mode: 0644]

index b7ce905..241df2c 100644 (file)
--- a/INFO.yaml
+++ b/INFO.yaml
 project: 'externalapi-nbi'
 project_creation_date: '2017-06-29'
 lifecycle_state: 'Incubation'
+project_category: ''
 project_lead: &onap_releng_ptl
-    name: 'Matthieu Geerebaert'
-      email: 'matthieu.geerebaert@orange.com'
-      id: 'matthieugeerebaert'
-      company: 'Orange'
-      timezone: 'Europe/Paris'
+    name: 'Matthieu Geerebaert'
+    email: 'matthieu.geerebaert@orange.com'
+    id: 'matthieugeerebaert'
+    company: 'Orange'
+    timezone: 'Europe/Paris'
 primary_contact: *onap_releng_ptl
 issue_tracking:
     type: 'jira'
     url: 'https://jira.onap.org/projects/EXTAPI'
     key: 'EXTAPI'
+mailing_list:
+realtime_discussion:
+repositories:
 meetings:
     - type: 'zoom'
       agenda: ''
@@ -38,7 +42,6 @@ meetings:
       repeats: 'weekly'
       time: '14:00 UTC'
 committers:
-    - <<: *onap_releng_ptl
     - name: 'Andy Mayer'
       email: 'am803u@att.com'
       id: 'ajmayer'
@@ -64,5 +67,10 @@ committers:
       id: 'matthieugeerebaert'
       company: 'Orange'
       timezone: 'Europe/Paris'
+    - name: 'Adrian O Sullivan'
+      email: 'adrian.osullivan@huawei.com'
+      id: 'aosull01'
+      company: 'Huawei'
+      timezone: 'Europe/Dublin'
 tsc:
     approval: 'https://lists.onap.org/pipermail/onap-tsc'
index 428788d..0796c2f 100644 (file)
@@ -27,7 +27,7 @@ public final class OnapComponentsUrlPaths {
     public static final String SDC_ROOT_URL = "/sdc/v1/catalog/services";
     public static final String SDC_GET_PATH = "/metadata";
     public static final String SDC_TOSCA_PATH = "/toscaModel";
-    public static final String SDC_HEALTH_CHECK = "/sdc/v1/artifactTypes";
+    public static final String SDC_HEALTH_CHECK = "/sdc2/rest/healthCheck";
 
 
     // AAI
@@ -39,7 +39,7 @@ public final class OnapComponentsUrlPaths {
     public static final String AAI_PUT_SERVICE_FOR_CUSTOMER_PATH =
             "/aai/v14/business/customers/customer/$customerId/service-subscriptions/service-subscription/";
     public static final String AAI_HEALTH_CHECK =
-        "/aai/v14/business/customers";
+        "aai/util/echo?action=long";
     public static final String AAI_GET_SERVICE =
             "/aai/v14/nodes/service-instances/service-instance/$serviceId";
     public static final String AAI_GET_SERVICE_CUSTOMER =
index 419a34a..0be415c 100644 (file)
@@ -115,11 +115,11 @@ public class SdcClient {
 
     }
 
-    public List<LinkedHashMap> callCheckConnectivity() {
+    public LinkedHashMap callCheckConnectivity() {
 
         UriComponentsBuilder callURI = UriComponentsBuilder.fromHttpUrl(sdcHealthCheck);
         ResponseEntity<Object> response = callSdc(callURI.build().encode().toUri());
-        return (List<LinkedHashMap>) response.getBody();
+        return (LinkedHashMap) response.getBody();
 
     }
 
index 5db5c78..a21b9b3 100644 (file)
@@ -36,10 +36,9 @@ And match response.status == 'ok'
 And match response.name == 'nbi'
 And assert response.components.length == 4
 And match each response.components contains {  status: 'ko'}
-* call Context.startServers();
 
 Scenario: testFullHealthCheckWithSDCNotResponding
-* call Context.removeWireMockMapping("/sdc/v1/artifactTypes");
+* call Context.removeWireMockMapping("/sdc2/rest/healthCheck");
 Given path 'status'
 And params {fullStatus :true}
 When method get
@@ -48,4 +47,3 @@ And match response.status == 'ok'
 And match response.name == 'nbi'
 And assert response.components.length == 4
 And match response.components contains [{name:'sdc connectivity', status: 'ko'},{name:'so connectivity', status: 'ok'},{name:'aai connectivity', status: 'ok'},{name:'dmaap connectivity', status: 'ok'},]
-* call Context.startServers();
diff --git a/src/test/resources/mappings/aai/aai_get_healtcheck.json b/src/test/resources/mappings/aai/aai_get_healtcheck.json
new file mode 100644 (file)
index 0000000..ed8939e
--- /dev/null
@@ -0,0 +1,30 @@
+{
+  "request": {
+    "method": "GET",
+    "url": "/aai/util/echo?action=long"
+  },
+  "response": {
+    "status": 200,
+    "jsonBody":{
+      "responseMessages": {
+        "responseMessage": [
+          {
+            "messageId": "INF0001",
+            "text": "Success X-FromAppId=%1 X-TransactionId=%2 (msg=%3) (rc=%4)",
+            "variables": {
+              "variable": [
+                "AAI",
+                "808b54e3-e563-4144-a1b9-e24e2ed93d4f",
+                "Successful health check:OK",
+                "0.0.0002"
+              ]
+            }
+          }
+        ]
+      }
+    },
+    "headers": {
+      "Content-Type": "application/xml"
+    }
+  }
+}
diff --git a/src/test/resources/mappings/sdc/sdc_get_healthcheck.json b/src/test/resources/mappings/sdc/sdc_get_healthcheck.json
new file mode 100644 (file)
index 0000000..787a33a
--- /dev/null
@@ -0,0 +1,92 @@
+{
+    "request": {
+        "method": "GET",
+        "url": "/sdc2/rest/healthCheck"
+    },
+    "response": {
+        "status": 200,
+        "jsonBody":
+        {
+            "sdcVersion": "1.3.6",
+            "siteMode": "unknown",
+            "componentsInfo": [
+                {
+                    "healthCheckComponent": "BE",
+                    "healthCheckStatus": "UP",
+                    "version": "1.3.6",
+                    "description": "OK"
+                },
+                {
+                    "healthCheckComponent": "TITAN",
+                    "healthCheckStatus": "UP",
+                    "description": "OK"
+                },
+                {
+                    "healthCheckComponent": "ES",
+                    "healthCheckStatus": "UP",
+                    "version": "1.3.6",
+                    "description": "OK"
+                },
+                {
+                    "healthCheckComponent": "DE",
+                    "healthCheckStatus": "UP",
+                    "description": "OK"
+                },
+                {
+                    "healthCheckComponent": "CASSANDRA",
+                    "healthCheckStatus": "UP",
+                    "description": "OK"
+                },
+                {
+                    "healthCheckComponent": "ON_BOARDING",
+                    "healthCheckStatus": "UP",
+                    "version": "1.3.6",
+                    "description": "OK",
+                    "componentsInfo": [
+                        {
+                            "healthCheckComponent": "ZU",
+                            "healthCheckStatus": "UP",
+                            "description": "OK"
+                        },
+                        {
+                            "healthCheckComponent": "BE",
+                            "healthCheckStatus": "UP",
+                            "version": "1.3.6",
+                            "description": "OK"
+                        },
+                        {
+                            "healthCheckComponent": "CAS",
+                            "healthCheckStatus": "UP",
+                            "version": "2.1.17",
+                            "description": "OK"
+                        }
+                    ]
+                },
+                {
+                    "healthCheckComponent": "DCAE",
+                    "healthCheckStatus": "UP",
+                    "version": "1.3.0",
+                    "description": "OK",
+                    "componentsInfo": [
+                        {
+                            "healthCheckComponent": "BE",
+                            "healthCheckStatus": "UP",
+                            "version": "1.3.0",
+                            "description": "OK"
+                        },
+                        {
+                            "healthCheckComponent": "TOSCA_LAB",
+                            "healthCheckStatus": "UP",
+                            "version": "1.3.0",
+                            "description": "OK"
+                        }
+                    ]
+                }
+            ]
+        }
+        ,
+        "headers": {
+            "Content-Type": "application/json"
+        }
+    }
+}
\ No newline at end of file