aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cds-ui/client/src/app/common/core/services/loader.service.ts43
-rw-r--r--cds-ui/client/src/app/common/core/services/notification-handler.service.ts51
-rw-r--r--cds-ui/client/src/app/common/shared/components/notification/notification.component.html24
-rw-r--r--cds-ui/client/src/app/common/shared/components/notification/notification.component.scss20
-rw-r--r--cds-ui/client/src/app/common/shared/components/notification/notification.component.spec.ts46
-rw-r--r--cds-ui/client/src/app/common/shared/components/notification/notification.component.ts71
-rw-r--r--cds-ui/client/src/app/common/shared/components/notification/notification.service.spec.ts33
-rw-r--r--cds-ui/client/src/app/common/shared/components/notification/notification.service.ts77
-rw-r--r--cds-ui/client/src/app/common/shared/components/notification/notification.ts38
-rw-r--r--cds-ui/client/src/test.ts41
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/properties-capability-source.json26
-rw-r--r--components/scripts/python/ccsdk_restconf/restconf_client.py2
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt7
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfConstant.kt4
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt2
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt2
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt2
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt2
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt3
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt4
20 files changed, 489 insertions, 9 deletions
diff --git a/cds-ui/client/src/app/common/core/services/loader.service.ts b/cds-ui/client/src/app/common/core/services/loader.service.ts
new file mode 100644
index 000000000..1d2d1f082
--- /dev/null
+++ b/cds-ui/client/src/app/common/core/services/loader.service.ts
@@ -0,0 +1,43 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+
+import { Injectable } from '@angular/core';
+import { Observable, Subject } from 'rxjs';
+
+@Injectable()
+export class LoaderService {
+
+ public subject = new Subject<boolean>();
+
+ constructor() {
+ }
+
+ showLoader() {
+ this.subject.next(true);
+ }
+
+ hideLoader() {
+ this.subject.next(false);
+ }
+
+} \ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/services/notification-handler.service.ts b/cds-ui/client/src/app/common/core/services/notification-handler.service.ts
new file mode 100644
index 000000000..296b71e53
--- /dev/null
+++ b/cds-ui/client/src/app/common/core/services/notification-handler.service.ts
@@ -0,0 +1,51 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+
+import { Injectable } from '@angular/core';
+
+// import { NotificationService } from '../../shared/components/notification/notification.service';
+
+@Injectable()
+export class NotificationHandlerService {
+
+ constructor(
+ // private alert: NotificationService
+ ) { }
+
+
+ success(message: string) {
+ // this.alert.success(message);
+ }
+
+ error(message: string) {
+ // this.alert.error(message);
+ }
+
+ info(message: string) {
+ // this.alert(new Notification({ message, type: NotificationType.Info }));
+ }
+
+ warn(message: string) {
+ // this.alert(new Notification({ message, type: NotificationType.Warning }));
+ }
+} \ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/components/notification/notification.component.html b/cds-ui/client/src/app/common/shared/components/notification/notification.component.html
new file mode 100644
index 000000000..f240908a6
--- /dev/null
+++ b/cds-ui/client/src/app/common/shared/components/notification/notification.component.html
@@ -0,0 +1,24 @@
+<!-- ============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+
+<div *ngFor="let alert of alerts" class="{{ cssStyles(alert) }} alert-dismissable">
+ {{alert.message}}
+ <a class="close" (click)="closeNotification(alert)">&times;</a>
+</div>
diff --git a/cds-ui/client/src/app/common/shared/components/notification/notification.component.scss b/cds-ui/client/src/app/common/shared/components/notification/notification.component.scss
new file mode 100644
index 000000000..93f5c9dea
--- /dev/null
+++ b/cds-ui/client/src/app/common/shared/components/notification/notification.component.scss
@@ -0,0 +1,20 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/ \ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/components/notification/notification.component.spec.ts b/cds-ui/client/src/app/common/shared/components/notification/notification.component.spec.ts
new file mode 100644
index 000000000..c86d6a0e9
--- /dev/null
+++ b/cds-ui/client/src/app/common/shared/components/notification/notification.component.spec.ts
@@ -0,0 +1,46 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { NotificationComponent } from './notification.component';
+
+describe('NotificationComponent', () => {
+ let component: NotificationComponent;
+ let fixture: ComponentFixture<NotificationComponent>;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ NotificationComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(NotificationComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/cds-ui/client/src/app/common/shared/components/notification/notification.component.ts b/cds-ui/client/src/app/common/shared/components/notification/notification.component.ts
new file mode 100644
index 000000000..8a70b03af
--- /dev/null
+++ b/cds-ui/client/src/app/common/shared/components/notification/notification.component.ts
@@ -0,0 +1,71 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Component, OnInit, Input } from '@angular/core';
+
+import { Notification, NotificationType } from './notification';
+import { NotificationService } from './notification.service';
+
+@Component({
+ selector: 'app-notification',
+ templateUrl: './notification.component.html',
+ styleUrls: ['./notification.component.scss']
+})
+export class NotificationComponent implements OnInit {
+
+ @Input() id: string;
+
+ alerts: Notification[] = [];
+
+ constructor(private alertService: NotificationService) { }
+
+ ngOnInit() {
+ this.alertService.getAlert(this.id).subscribe((alert: Notification) => {
+ if (!alert.message) {
+ this.alerts = [];
+ return;
+ }
+ this.alerts.push(alert);
+ });
+ }
+
+
+ cssStyles(alert: Notification) {
+ if (!alert) {
+ return;
+ }
+ switch (alert.type) {
+ case NotificationType.Success:
+ return 'alert alert-success';
+ case NotificationType.Error:
+ return 'alert alert-danger';
+ case NotificationType.Info:
+ return 'alert alert-info';
+ case NotificationType.Warning:
+ return 'alert alert-warning';
+ }
+}
+
+ closeNotification(alert: Notification) {
+ this.alerts = this.alerts.filter(x => x !== alert);
+ }
+
+}
diff --git a/cds-ui/client/src/app/common/shared/components/notification/notification.service.spec.ts b/cds-ui/client/src/app/common/shared/components/notification/notification.service.spec.ts
new file mode 100644
index 000000000..0270d2716
--- /dev/null
+++ b/cds-ui/client/src/app/common/shared/components/notification/notification.service.spec.ts
@@ -0,0 +1,33 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { TestBed } from '@angular/core/testing';
+
+import { NotificationService } from './notification.service';
+
+describe('NotificationService', () => {
+ beforeEach(() => TestBed.configureTestingModule({}));
+
+ it('should be created', () => {
+ const service: NotificationService = TestBed.get(NotificationService);
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/cds-ui/client/src/app/common/shared/components/notification/notification.service.ts b/cds-ui/client/src/app/common/shared/components/notification/notification.service.ts
new file mode 100644
index 000000000..83c0504ac
--- /dev/null
+++ b/cds-ui/client/src/app/common/shared/components/notification/notification.service.ts
@@ -0,0 +1,77 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Injectable } from '@angular/core';
+import { Router, NavigationStart } from '@angular/router';
+import { Observable, Subject } from 'rxjs';
+// import { Subject } from 'rxjs/Subject';
+
+import { Notification, NotificationType} from './notification';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class NotificationService {
+
+ private subject = new Subject<Notification>();
+ private keepAfterRouteChange = false;
+
+ constructor(private router: Router) {
+ router.events.subscribe(event => {
+ if (event instanceof NavigationStart) {
+ if (this.keepAfterRouteChange) {
+ this.keepAfterRouteChange = false;
+ } else {
+ this.clear();
+ }
+ }
+ });
+ }
+
+ getAlert(alertId?: string): Observable<any> {
+ return this.subject.asObservable();
+ }
+
+ success(message: string) {
+ this.alert(new Notification({ message, type: NotificationType.Success }));
+ }
+
+ error(message: string) {
+ this.alert(new Notification({ message, type: NotificationType.Error }));
+ }
+
+ info(message: string) {
+ this.alert(new Notification({ message, type: NotificationType.Info }));
+ }
+
+ warn(message: string) {
+ this.alert(new Notification({ message, type: NotificationType.Warning }));
+ }
+
+ alert(alert: Notification) {
+ this.keepAfterRouteChange = alert.keepAfterRouteChange;
+ this.subject.next(alert);
+ }
+
+ clear(alertId?: string) {
+ this.subject.next(new Notification({ alertId }));
+ }
+}
diff --git a/cds-ui/client/src/app/common/shared/components/notification/notification.ts b/cds-ui/client/src/app/common/shared/components/notification/notification.ts
new file mode 100644
index 000000000..95f3f17b0
--- /dev/null
+++ b/cds-ui/client/src/app/common/shared/components/notification/notification.ts
@@ -0,0 +1,38 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+export class Notification {
+ type: NotificationType;
+ message: string;
+ alertId: string;
+ keepAfterRouteChange: boolean;
+
+ constructor(init?:Partial<Notification>) {
+ Object.assign(this, init);
+ }
+}
+
+export enum NotificationType {
+ Success,
+ Error,
+ Info,
+ Warning
+} \ No newline at end of file
diff --git a/cds-ui/client/src/test.ts b/cds-ui/client/src/test.ts
new file mode 100644
index 000000000..d9ed820e1
--- /dev/null
+++ b/cds-ui/client/src/test.ts
@@ -0,0 +1,41 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import 'zone.js/dist/zone-testing';
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting
+} from '@angular/platform-browser-dynamic/testing';
+
+declare const require: any;
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting()
+);
+// Then we find all the tests.
+const context = require.context('./', true, /\.spec\.ts$/);
+// And load the modules.
+context.keys().map(context);
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/properties-capability-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/properties-capability-source.json
new file mode 100644
index 000000000..950c4a2df
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/properties-capability-source.json
@@ -0,0 +1,26 @@
+{
+ "name": "properties-capability-source",
+ "updated-by": "Steve Alphonse Siani, alphonse.steve.siani.djissitchi@ibm.com",
+ "tags": "properties-capability-source",
+ "property" :{
+ "description": "Data dictionary used to read properties.",
+ "type": "string"
+ },
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "capability": {
+ "type": "source-capability",
+ "properties" : {
+ "script-type" : "jython",
+ "script-class-reference" : "Scripts/python/ResolvProperties.py",
+ "instance-dependencies" : []
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/scripts/python/ccsdk_restconf/restconf_client.py b/components/scripts/python/ccsdk_restconf/restconf_client.py
index 92069c571..6d18b03c5 100644
--- a/components/scripts/python/ccsdk_restconf/restconf_client.py
+++ b/components/scripts/python/ccsdk_restconf/restconf_client.py
@@ -47,7 +47,7 @@ class RestconfClient:
expected_result = '"netconf-node-topology:connection-status":"connected"'
while counter < self.__odl_status_check_limit:
result = web_client_service.exchangeResource("GET", url, "")
- if expected_result in result:
+ if expected_result in result.body:
self.__log.info("NF was mounted successfully on ODL")
return None
sleep(self.__odl_status_check_pause)
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt
index 96a7bb712..f145d9677 100644
--- a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt
@@ -19,6 +19,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.functions.ansible.executor
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.node.ObjectNode
+import java.net.URI
import java.net.URLEncoder
import java.util.NoSuchElementException
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.*
@@ -132,8 +133,12 @@ open class ComponentRemoteAnsibleExecutor(private val blueprintRestLibPropertySe
private fun lookupJobTemplateIDByName(awxClient : BlueprintWebClientService, job_template_name: String?): String {
val mapper = ObjectMapper()
+ val encodedJTName = URI(null,null,
+ "/api/v2/job_templates/${job_template_name}/",
+ null,null).rawPath
+
// Get Job Template details by name
- var response = awxClient.exchangeResource(GET, "/api/v2/job_templates/${job_template_name}/", "")
+ var response = awxClient.exchangeResource(GET, encodedJTName,"")
val jtDetails: JsonNode = mapper.readTree(response.body)
return jtDetails.at("/id").asText()
}
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfConstant.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfConstant.kt
index 8722bb031..03177e8ec 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfConstant.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/utils/NetconfConstant.kt
@@ -79,7 +79,7 @@ object RpcMessageUtils {
const val INTERLEAVE_CAPABILITY_STRING = "urn:ietf:params:netconf:capability:interleave:1.0"
- const val CAPABILITY_REGEX = "capability>\\s*(.*?)\\s*capability>"
+ const val CAPABILITY_REGEX = "capability>\\s*(.*?)\\s*</capability>"
const val SESSION_ID_REGEX = "session-id>\\s*(.*?)\\s*session-id>"
@@ -87,4 +87,4 @@ object RpcMessageUtils {
const val NETCONF_10_CAPABILITY = "urn:ietf:params:netconf:base:1.0"
const val NETCONF_11_CAPABILITY = "urn:ietf:params:netconf:base:1.1"
-} \ No newline at end of file
+}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
index 4642a7c13..4ef1cfbb3 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
@@ -95,6 +95,7 @@ open class ComponentRemotePythonExecutor(private val remoteScriptExecutionServic
packages = packages
)
val prepareEnvOutput = remoteScriptExecutionService.prepareEnv(prepareEnvInput)
+ log.info("$ATTRIBUTE_PREPARE_ENV_LOG - ${prepareEnvOutput.response}")
setAttribute(ATTRIBUTE_PREPARE_ENV_LOG, prepareEnvOutput.response.asJsonPrimitive())
setAttribute(ATTRIBUTE_EXEC_CMD_LOG, "N/A".asJsonPrimitive())
check(prepareEnvOutput.status == StatusType.SUCCESS) {
@@ -110,6 +111,7 @@ open class ComponentRemotePythonExecutor(private val remoteScriptExecutionServic
command = scriptCommand,
properties = properties)
val remoteExecutionOutput = remoteScriptExecutionService.executeCommand(remoteExecutionInput)
+ log.info("$ATTRIBUTE_EXEC_CMD_LOG - ${remoteExecutionOutput.response}")
setAttribute(ATTRIBUTE_EXEC_CMD_LOG, remoteExecutionOutput.response.asJsonPrimitive())
check(remoteExecutionOutput.status == StatusType.SUCCESS) {
"failed to get prepare remote command response status for requestId(${remoteExecutionOutput.requestId})"
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
index 1a7c50676..7a8d6ec5c 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
@@ -81,7 +81,7 @@ open class CapabilityResourceResolutionProcessor(private val applicationContext:
override suspend fun recoverNB(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
raRuntimeService.getBluePrintError()
- .addError("Failed in ComponentNetconfExecutor : ${runtimeException.message}")
+ .addError("Failed in CapabilityResourceResolutionProcessor : ${runtimeException.message}")
}
suspend fun scriptInstance(scriptType: String, scriptClassReference: String, instanceDependencies: List<String>)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
index 1cc44a2cb..39ffe5ea9 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
@@ -121,7 +121,7 @@ abstract class ResourceAssignmentProcessor : BlueprintFunctionNode<ResourceAssig
try {
process(resourceAssignment)
} catch (runtimeException: RuntimeException) {
- log.error("failed in ${getName()} : ${runtimeException.message}", runtimeException)
+ log.error("failed in ResourceAssignmentProcessor : ${runtimeException.message}", runtimeException)
recover(runtimeException, resourceAssignment)
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt
index 1a943d110..8a8bfbf32 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt
@@ -70,7 +70,7 @@ class ResourceAssignmentUtils {
try {
if (resourceProp.type.isNotEmpty()) {
logger.info("Setting Resource Value ($value) for Resource Name " +
- "(${resourceAssignment.dictionaryName}) of type (${resourceProp.type})")
+ "(${resourceAssignment.name}) of type (${resourceProp.type})")
setResourceValue(resourceAssignment, raRuntimeService, value)
resourceAssignment.updatedDate = Date()
resourceAssignment.updatedBy = BluePrintConstants.USER_SYSTEM
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
index 8f39a5a5c..0819ed74b 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
@@ -547,7 +547,8 @@ open class DefaultBluePrintRuntimeService(private var id: String, private var bl
workflowDynamicInputs?.let {
bluePrintContext.dataTypeByName("dt-$dynamicInputPropertiesName")?.properties?.forEach { propertyName, property ->
- val valueNode: JsonNode = workflowDynamicInputs.at(BluePrintConstants.PATH_DIVIDER + propertyName)
+ val valueNode: JsonNode = workflowDynamicInputs.at(BluePrintConstants.PATH_DIVIDER + propertyName).returnNullIfMissing()
+ ?: property.defaultValue
?: NullNode.getInstance()
setInputValue(propertyName, property, valueNode)
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
index c51f48290..60ed6343a 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
@@ -65,7 +65,9 @@ class BluePrintMetadataUtils {
envDir.listFiles()
.filter { it.name.endsWith(".properties") }
.forEach {
- properties.load(it.inputStream())
+ val istream = it.inputStream()
+ properties.load(istream)
+ istream.close()
}
}
return properties