Merge "use config value instead hard code of url" into casablanca
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Wed, 28 Nov 2018 14:21:52 +0000 (14:21 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 28 Nov 2018 14:21:52 +0000 (14:21 +0000)
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/ResourceRequestBuilder.java
common/src/main/java/org/onap/so/client/HttpClient.java
docs/release_notes/release-notes.rst
so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts
so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts

index b4851ee..5e05637 100644 (file)
@@ -47,6 +47,9 @@ import org.onap.so.bpmn.core.json.JsonUtils;
 import org.onap.so.client.HttpClient;
 import org.onap.so.logger.MessageEnum;
 import org.onap.so.logger.MsoLogger;
+import org.onap.so.rest.APIResponse;
+import org.onap.so.rest.RESTClient;
+import org.onap.so.rest.RESTConfig;
 import org.onap.so.utils.TargetEntity;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -261,10 +264,20 @@ public class ResourceRequestBuilder {
 
     private static String getCsarFromUuid(String uuid) throws Exception {
                String catalogEndPoint = UrnPropertiesReader.getVariable("mso.catalog.db.endpoint");
-       HttpClient client = new HttpClient(UriBuilder.fromUri(catalogEndPoint).path(SERVICE_URL_TOSCA_CSAR).queryParam("serviceModelUuid", uuid).build().toURL(), "application/json", TargetEntity.CATALOG_DB);
-       
-        Response response = client.get();
-        String value = response.readEntity(String.class);
+
+        RESTClient restClient = new RESTClient(new RESTConfig(
+                UriBuilder.fromUri(catalogEndPoint)
+                        .path(SERVICE_URL_TOSCA_CSAR)
+                        .queryParam("serviceModelUuid", uuid)
+                        .build().toURL().toString()
+        ));
+
+        restClient.addHeader("Accept", "application/json");
+        restClient.addAuthorizationHeader(UrnPropertiesReader.getVariable("mso.db.auth"));
+
+        APIResponse apiResponse = restClient.httpGet();
+
+        String value = apiResponse.getResponseBodyAsString();
 
         HashMap<String, String> map = new Gson().fromJson(value, new TypeToken<HashMap<String, String>>() {}.getType());
 
index 9c4b573..b991e79 100644 (file)
@@ -42,8 +42,6 @@ public class HttpClient extends RestClient {
 
        @Override
        protected void initializeHeaderMap(Map<String, String> headerMap) {
-               headerMap.put("Authorization", "Basic YnBlbDpwYXNzd29yZDEk");
-               headerMap.put("content-type", "application/json");
        }
 
        @Override
index 4ca1a01..45daa9f 100644 (file)
@@ -8,6 +8,44 @@ Service Orchestrator Release Notes
 
 The SO provides the highest level of service orchestration in the ONAP architecture. 
 
+Version: 1.3.3
+--------------
+
+:Release Date: 2018-11-30
+
+This is the official release package that was tested against the 72 hour stability test in integration environment.
+
+Casablanca Release branch
+*New Features**
+
+Below  features are delivered in this release:
+* Support PNF resource type.
+* Extend the support of homing to vFW, vCPE usecases.
+* Workflow Designer Integration.
+* Monitoring BPMN worflow capabilities through UI.
+* Support to the CCVPN Usecase.
+* SO internal architecture improvements.
+
+**Bug Fixes**
+
+       The defects fixed in this release could be found `here <https://jira.onap.org/issues/?jql=project%20%3D%20SO%20AND%20affectedVersion%20%3D%20%22Beijing%20Release%22%20AND%20status%20%3D%20Closed%20>`_.
+
+**Known Issues**
+
+       There are some issues around the HPA and CCVPN that have been resolved in the patch release of 1.3.4.
+       SO-1249
+       
+       The other open issues are
+       SO-1257
+       SO-1248
+       SO-1219
+       These will be addressed in the next release.
+
+**Security Notes**
+
+       SO code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been addressed, items that remain open have been assessed for risk and determined to be false positive. The SO open Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=28377799>`_.
+
+
 Version: 1.3.1
 --------------
 
index 7967390..2e8f423 100644 (file)
@@ -30,6 +30,7 @@ import { environment } from '../environments/environment';
 import { HttpResponse } from '@angular/common/http';\r
 import { PII } from './model/processInstance.model';\r
 import { HttpErrorHandlerService } from './http-error-handler.service';\r
+import { ACTINST } from './model/activityInstance.model';\r
 \r
 \r
 @Injectable({\r
@@ -59,12 +60,12 @@ export class DataService {
   }\r
 \r
   // HTTP GET to return Activity instancs using ProcessInstanceID\r
-  getActivityInstance(processInstanceId) {\r
+  getActivityInstance(processInstanceId): Promise<ACTINST[]> {\r
     var url = environment.soMonitoringBackendURL + 'activity-instance/' + processInstanceId;\r
-    return this.http.get(url)\r
+    return this.http.get<ACTINST[]>(url)\r
       .pipe(\r
         catchError(this.httpErrorHandlerService.handleError("GET", url))\r
-      );\r
+      ).toPromise();\r
   }\r
 \r
   // HTTP GET to return Activity Instance using ProcessInstanceID\r
index 4c19ba1..bb464a9 100644 (file)
@@ -43,7 +43,6 @@ import { NgxSpinnerService } from 'ngx-spinner';
 })\r
 \r
 export class DetailsComponent implements OnInit {\r
-\r
   bpmnViewer: any;\r
 \r
   processInstanceID: string;\r
@@ -67,8 +66,8 @@ export class DetailsComponent implements OnInit {
   constructor(private route: ActivatedRoute, private data: DataService, private popup: ToastrNotificationService,\r
     private router: Router, private spinner: NgxSpinnerService) { }\r
 \r
-  getActInst(procInstId: string) {\r
-    this.data.getActivityInstance(procInstId).subscribe(\r
+  async getActInst(procInstId: string) {\r
+    await this.data.getActivityInstance(procInstId).then(\r
       (data: ACTINST[]) => {\r
         this.activityInstance = data;\r
         console.log(data);\r
@@ -90,7 +89,7 @@ export class DetailsComponent implements OnInit {
       });\r
   }\r
 \r
-  async  getProcInstance(procInstId) {\r
+  async getProcInstance(procInstId) {\r
     await this.data.getProcessInstance(procInstId).then(\r
       async (data: PII) => {\r
         this.processInstance = data;\r
@@ -160,4 +159,5 @@ export class DetailsComponent implements OnInit {
         this.getVarInst(this.processInstanceID);\r
       });\r
   }\r
+\r
 }\r