aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cds-ui/client/src/app/common/shared/pipes/sort.pipe.ts54
-rw-r--r--cds-ui/client/src/app/common/shared/shared.module.ts8
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts5
-rw-r--r--cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts2
-rwxr-xr-xcomponents/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/activation-blueprint.json13
-rwxr-xr-xcomponents/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/resources_definition_types.json6
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/capability_python/Environments/source-db.properties1
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/artifact_types.json34
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/data_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/node_types.json86
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/policy_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/relationship_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/remote_ansible.json124
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/resources_definition_types.json3
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/remote_ansible/TOSCA-Metadata/TOSCA.meta5
-rw-r--r--components/model-catalog/definition-type/starter-type/node_type/component-remote-ansible-executor.json65
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/cloud_env.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/dcae_collector_ip.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/dcae_collector_port.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/demo_artifacts_version.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/gre_ipaddr.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/install_script_version.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/int_pktgen_private_net_id.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/int_pktgen_private_subnet_id.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/int_private_net_id.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/int_private_subnet_id.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/keypair.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/management-prefix-id.json49
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/nb_api_version.json37
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json56
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json58
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json68
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json71
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json68
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/pg_int.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/pktgen_private_net_cidr.json51
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/pktgen_private_net_id.json38
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json49
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/private1-prefix-id.json49
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/private2-prefix-id.json49
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/pub_key.json71
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json57
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/sec_group.json59
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vdns_flavor_name.json39
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vdns_image_name.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vdns_int_private_ip_0.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vdns_name_0.json38
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vdns_onap_private_ip_0.json37
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json58
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vf-module-model-customization-uuid.json31
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json58
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vf_module_id.json19
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json58
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vip.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vlb_0_int_pktgen_private_port_0_mac.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vlb_flavor_name.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vlb_image_name.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vlb_int_pktgen_private_ip_0.json38
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vlb_int_private_ip_0.json38
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vlb_name_0.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vlb_onap_private_ip_0.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vlb_private_net_cidr.json49
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vlb_private_net_id.json37
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vm-type.json58
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vnf-id.json53
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json81
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vnf_id.json19
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json58
-rwxr-xr-xcomponents/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json58
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vpg_flavor_name.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vpg_image_name.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vpg_int_pktgen_private_ip_0.json37
-rw-r--r--components/model-catalog/resource-dictionary/starter-dictionary/vpg_onap_private_ip_0.json37
-rwxr-xr-xms/blueprintsprocessor/application/pom.xml4
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/pom.xml64
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt282
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt243
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/keystore.p12bin0 -> 2588 bytes
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml35
-rw-r--r--ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/payload/requests/sample-remote-ansible-request.json29
-rwxr-xr-xms/blueprintsprocessor/functions/pom.xml1
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt3
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt12
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt29
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt79
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt9
-rwxr-xr-xms/blueprintsprocessor/parent/pom.xml5
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintImportService.kt4
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintVelocityTemplateService.kt1
-rw-r--r--ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateServiceTest.kt35
-rwxr-xr-xms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/default-variable-value-data.json3
-rwxr-xr-xms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/default-variable-value-velocity-template.vtl2
-rw-r--r--ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnf-name.json46
93 files changed, 3399 insertions, 447 deletions
diff --git a/cds-ui/client/src/app/common/shared/pipes/sort.pipe.ts b/cds-ui/client/src/app/common/shared/pipes/sort.pipe.ts
new file mode 100644
index 000000000..f878a2256
--- /dev/null
+++ b/cds-ui/client/src/app/common/shared/pipes/sort.pipe.ts
@@ -0,0 +1,54 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2019 IBM Intellectual propertyNameerty. 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 { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'sort',
+ pure:false,
+})
+export class SortPipe implements PipeTransform {
+
+ transform(arrayData: any[], direcion: string, propertyName?: string): any {
+ if (!arrayData) {
+ return [];
+ }
+ if (!direcion || !propertyName) {
+ return arrayData
+ }
+ if (arrayData.length > 0) {
+ const _direction = direcion === 'asc' ? -1 : 1,
+ isArray = Array.isArray(arrayData),
+ arrayDataType = typeof arrayData[0],
+ flag = isArray && arrayDataType === 'object' ? true : isArray && arrayDataType !== 'object' ? false : true;
+ arrayData.sort((a, b) => {
+ a = flag ? a[propertyName] : a;
+ b = flag ? b[propertyName] : b;
+ if (typeof a === 'string') {
+ return a.toLowerCase() > b.toLowerCase() ? -1 * _direction : 1 * _direction;
+ } else if (typeof a === 'number') {
+ return a - b > 0 ? -1 * _direction : 1 * _direction;
+ }
+ });
+ }
+ return arrayData;
+ }
+} \ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/shared.module.ts b/cds-ui/client/src/app/common/shared/shared.module.ts
index 6ca5b13a5..b036f5967 100644
--- a/cds-ui/client/src/app/common/shared/shared.module.ts
+++ b/cds-ui/client/src/app/common/shared/shared.module.ts
@@ -29,20 +29,22 @@ import { RouterModule } from "@angular/router";
import { SearchPipe } from './pipes/search.pipe';
import { SearchDialog } from './components/search-dialog/search-dialog.component';
import { AppMaterialModule } from '../modules/app-material.module';
+import { SortPipe } from './pipes/sort.pipe';
@NgModule({
declarations: [
HomeComponent,
CBAWizardComponent,
SearchPipe,
- SearchDialog
-
+ SearchDialog,
+ SortPipe
],
exports: [
HomeComponent,
CBAWizardComponent,
SearchPipe,
- SearchDialog
+ SearchDialog,
+ SortPipe
],
imports: [
AppMaterialModule,
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
index 09fa00315..b982fa29f 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts
@@ -38,6 +38,7 @@ import { LoadBlueprintSuccess, SetBlueprintState } from '../../../../common/core
import { ApiService } from 'src/app/common/core/services/api.service';
import { IMetaData } from 'src/app/common/core/store/models/metadata.model';
import { EditorService } from './editor.service';
+import { SortPipe } from '../../../../common/shared/pipes/sort.pipe';
interface Node {
name: string;
@@ -390,6 +391,7 @@ export class EditorComponent implements OnInit {
newFileNode.data = '';
this.filesData.push(newFileNode);
}
+ this.filesData = new SortPipe().transform(this.filesData, 'asc', 'name');
this.arrangeTreeData(this.filesData);
}
}
@@ -431,7 +433,9 @@ export class EditorComponent implements OnInit {
if (this.validfile) {
this.fetchTOSACAMetadata();
+ this.paths = new SortPipe().transform(this.paths, 'asc', 'name');
this.filesData = this.paths;
+ this.paths = new SortPipe().transform(this.paths, 'asc', 'name');
this.tree = this.arrangeTreeData(this.paths);
} else {
alert('Please update proper file with TOSCA metadata');
@@ -505,6 +509,7 @@ export class EditorComponent implements OnInit {
i = i - 1;
}
}
+ this.filesData = new SortPipe().transform(this.filesData, 'asc', 'name');
this.arrangeTreeData(this.filesData);
}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
index c232414e0..92003c919 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
@@ -29,6 +29,7 @@ import { IBlueprintState } from '../../../../common/core/store/models/blueprintS
import { IAppState } from '../../../../common/core/store/state/app.state';
import { LoadBlueprintSuccess, SET_BLUEPRINT_STATE, SetBlueprintState } from '../../../../common/core/store/actions/blueprint.action';
import { json } from 'd3';
+import { SortPipe } from '../../../../common/shared/pipes/sort.pipe';
@Component({
selector: 'app-search-template',
@@ -116,6 +117,7 @@ export class SearchTemplateComponent implements OnInit {
if(this.validfile) {
this.fetchTOSACAMetadata();
+ this.paths = new SortPipe().transform(this.paths, 'asc', 'name');
this.tree = this.arrangeTreeData(this.paths);
} else {
alert('Please update proper file with TOSCA metadata');
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/activation-blueprint.json b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/activation-blueprint.json
index b02397e85..9ce89a97b 100755
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/activation-blueprint.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/activation-blueprint.json
@@ -19,6 +19,19 @@
}, {
"file" : "Definitions/policy_types.json"
} ],
+ "dsl_definitions": {
+ "dynamic-db-source": {
+ "type": "maria-db",
+ "url": "jdbc:mysql://localhost:3306/sdnctl",
+ "username": "sdnctl",
+ "password": {
+ "get_attribute": [
+ "BPP",
+ "dynamic-db-source.password"
+ ]
+ }
+ }
+ },
"topology_template" : {
"inputs" : {
"request-id" : {
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/resources_definition_types.json
index 265377be4..3d10a7c5f 100755
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/resources_definition_types.json
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/resources_definition_types.json
@@ -15,12 +15,14 @@
"primary-db": {
"type": "source-processor-db",
"properties": {
- "query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
+ "endpoint-selector": "dynamic-db-source",
+ "query": "SELECT artifact_name FROM sdnctl.BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
"input-key-mapping": {
},
"output-key-mapping": {
"service-instance-id": "artifact_name"
- }
+ },
+ "key-dependencies" : []
}
},
"capability": {
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Environments/source-db.properties b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Environments/source-db.properties
new file mode 100644
index 000000000..49a7eb47b
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Environments/source-db.properties
@@ -0,0 +1 @@
+dynamic-db-source.password=sdnctl \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/artifact_types.json
new file mode 100644
index 000000000..6e5cfc3a1
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/artifact_types.json
@@ -0,0 +1,34 @@
+{
+ "artifact_types" : {
+ "artifact-directed-graph" : {
+ "description" : "Directed Graph File",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "json", "xml" ]
+ },
+ "artifact-mapping-resource" : {
+ "description" : "Resource Mapping File used along with Configuration template",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "json" ]
+ },
+ "artifact-script-ansible" : {
+ "description" : "Ansible Script file",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "yaml" ]
+ },
+ "artifact-script-python" : {
+ "description" : "Python Script file",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "py" ]
+ },
+ "artifact-template-velocity" : {
+ "description" : " Velocity Template used for Configuration",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.artifacts.Implementation",
+ "file_ext" : [ "vtl" ]
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/data_types.json
new file mode 100644
index 000000000..8c304c40b
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/data_types.json
@@ -0,0 +1,3 @@
+{
+ "data_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/node_types.json
new file mode 100644
index 000000000..5f0deeb98
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/node_types.json
@@ -0,0 +1,86 @@
+{
+ "node_types" : {
+ "component-remote-ansible-executor" : {
+ "description" : "Remote Ansible (AWX) Execution Component.",
+ "version" : "1.0.0",
+ "attributes" : {
+ "ansible-command-status" : {
+ "required" : false,
+ "type" : "string"
+ },
+ "ansible-command-logs" : {
+ "required" : false,
+ "type" : "string"
+ }
+ },
+ "capabilities" : {
+ "component-node" : {
+ "type" : "tosca.capabilities.Node"
+ }
+ },
+ "interfaces" : {
+ "ComponentRemoteAnsibleExecutor" : {
+ "operations" : {
+ "process" : {
+ "inputs" : {
+ "job-template-name" : {
+ "description" : "Job template to execute in AWX",
+ "required" : true,
+ "type" : "string"
+ },
+ "limit" : {
+ "description" : "Limit to this comma-separated list of hosts.",
+ "required" : false,
+ "type" : "string"
+ },
+ "inventory" : {
+ "description" : "Use this hosts inventory ID for this run.",
+ "required" : false,
+ "type" : "string"
+ },
+ "tags" : {
+ "description" : "Limit this run to comma-separated list of tags.",
+ "required" : false,
+ "type" : "string"
+ },
+ "skip-tags" : {
+ "description" : "Skip this comma-separated list of tags for this run.",
+ "required" : false,
+ "type" : "string"
+ },
+ "extra-vars" : {
+ "description" : "Specify extra args for this run.",
+ "required" : false,
+ "type" : "json"
+ },
+ "endpoint-selector" : {
+ "description" : "Remote AWX Server selector name.",
+ "required" : false,
+ "type" : "string",
+ "default" : "awx-remote-server"
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from" : "tosca.nodes.Component"
+ },
+
+ "tosca.nodes.Component" : {
+ "description" : "This is default Component Node",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
+ "tosca.nodes.ResourceSource" : {
+ "description" : "TOSCA base type for Resource Sources",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ },
+ "tosca.nodes.Workflow" : {
+ "description" : "This is Directed Graph Node Type",
+ "version" : "1.0.0",
+ "derived_from" : "tosca.nodes.Root"
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/policy_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/policy_types.json
new file mode 100644
index 000000000..1e44cc70a
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/policy_types.json
@@ -0,0 +1,3 @@
+{
+ "policy_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/relationship_types.json
new file mode 100644
index 000000000..4ddd7a57c
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/relationship_types.json
@@ -0,0 +1,3 @@
+{
+ "relationship_types" : { }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/remote_ansible.json b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/remote_ansible.json
new file mode 100644
index 000000000..53ca04a5d
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/remote_ansible.json
@@ -0,0 +1,124 @@
+{
+ "tosca_definitions_version": "controller_blueprint_1_0_0",
+ "metadata": {
+ "template_author": "Serge Simard",
+ "author-email": "serge@agilitae.com",
+ "user-groups": "ADMIN, OPERATION",
+ "template_name": "remote_ansible",
+ "template_version": "1.0.0",
+ "template_tags": "tosca"
+ },
+ "imports": [
+ {
+ "file": "Definitions/data_types.json"
+ },
+ {
+ "file": "Definitions/relationship_types.json"
+ },
+ {
+ "file": "Definitions/artifact_types.json"
+ },
+ {
+ "file": "Definitions/node_types.json"
+ },
+ {
+ "file": "Definitions/policy_types.json"
+ }
+ ],
+ "dsl_definitions": {
+ "ansible-remote-endpoint": {
+ "type": "token-auth",
+ "url": "http://142.44.184.236",
+ "token": "Bearer J9gEtMDqf7P4YsJ74fioY9VAhLDIs1"
+ }
+ },
+ "topology_template": {
+ "workflows": {
+ "execute-remote-ansible": {
+ "steps": {
+ "process": {
+ "description": "Execute Remote Ansible Script",
+ "target": "execute-remote-ansible",
+ "activities": [
+ {
+ "call_operation": ""
+ }
+ ]
+ }
+ },
+ "inputs": {
+ "endpoint-selector": {
+ "required": true,
+ "type": "string"
+ },
+ "job-template-name": {
+ "required": true,
+ "type": "string"
+ },
+ "limit": {
+ "required": false,
+ "type": "string"
+ },
+ "inventory": {
+ "required": false,
+ "type": "string"
+ },
+ "tags": {
+ "required": false,
+ "type": "string"
+ },
+ "skip-tags": {
+ "required": false,
+ "type": "string"
+ },
+ "extra-vars" : {
+ "required" : false,
+ "type" : "json"
+ }
+ },
+ "outputs": {
+ "ansible-command-status": {
+ "type": "string",
+ "value": {
+ "get_attribute": [
+ "execute-remote-ansible",
+ "ansible-command-status"
+ ]
+ }
+ },
+ "ansible-command-logs": {
+ "type": "string",
+ "value": {
+ "get_attribute": [
+ "execute-remote-ansible",
+ "ansible-command-logs"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "node_templates": {
+ "execute-remote-ansible": {
+ "type": "component-remote-ansible-executor",
+ "interfaces": {
+ "ComponentRemoteAnsibleExecutor": {
+ "operations": {
+ "process": {
+ "inputs": {
+ "endpoint-selector": { "get_input": "endpoint-selector" },
+ "job-template-name": { "get_input": "job-template-name" },
+ "limit": { "get_input": "limit" },
+ "inventory": { "get_input": "inventory" },
+ "extra-vars": { "get_input": "extra-vars" },
+ "tags": { "get_input": "tags" },
+ "skip-tags": { "get_input": "skip-tags" }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/resources_definition_types.json
new file mode 100644
index 000000000..0e0dcd235
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/Definitions/resources_definition_types.json
@@ -0,0 +1,3 @@
+{
+
+} \ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/TOSCA-Metadata/TOSCA.meta
new file mode 100644
index 000000000..17448a835
--- /dev/null
+++ b/components/model-catalog/blueprint-model/test-blueprint/remote_ansible/TOSCA-Metadata/TOSCA.meta
@@ -0,0 +1,5 @@
+TOSCA-Meta-File-Version: 1.0.0
+CSAR-Version: 1.0
+Created-By: Serge Simard <serge@agilitae.com>
+Entry-Definitions: Definitions/remote_ansible.json
+Template-Tags: Serge Simard, remote_ansible \ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-remote-ansible-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-remote-ansible-executor.json
new file mode 100644
index 000000000..498db8246
--- /dev/null
+++ b/components/model-catalog/definition-type/starter-type/node_type/component-remote-ansible-executor.json
@@ -0,0 +1,65 @@
+{
+ "description": "This is Remote Ansible Playbook (AWX) Execution Component.",
+ "version": "1.0.0",
+ "attributes": {
+ "ansible-command-status": {
+ "required": true,
+ "type": "string"
+ },
+ "ansible-command-logs": {
+ "required": true,
+ "type": "string"
+ }
+ },
+ "capabilities": {
+ "component-node": {
+ "type": "tosca.capabilities.Node"
+ }
+ },
+ "interfaces": {
+ "ComponentRemoteAnsibleExecutor": {
+ "operations": {
+ "process": {
+ "inputs": {
+ "job-template-name": {
+ "description": "Primary key or name of the job template to launch new job.",
+ "required": true,
+ "type": "string"
+ },
+ "limit": {
+ "description": "Specify host limit for job template to run.",
+ "required": false,
+ "type": "string"
+ },
+ "inventory": {
+ "description": "Specify inventory for job template to run.",
+ "required": false,
+ "type": "string"
+ },
+ "extra-vars" : {
+ "required" : false,
+ "type" : "json",
+ "description": "json formatted text that contains extra variables to pass on."
+ },
+ "tags": {
+ "description": "Specify tagged actions in the playbook to run.",
+ "required": false,
+ "type": "string"
+ },
+ "skip-tags": {
+ "description": "Specify tagged actions in the playbook to omit.",
+ "required": false,
+ "type": "string"
+ },
+ "endpoint-selector": {
+ "description": "Remote AWX Server selector name.",
+ "required": true,
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "derived_from": "tosca.nodes.Component"
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/cloud_env.json b/components/model-catalog/resource-dictionary/starter-dictionary/cloud_env.json
new file mode 100644
index 000000000..adb8bd402
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/cloud_env.json
@@ -0,0 +1,37 @@
+{
+ "tags": "cloud_env",
+ "name": "cloud_env",
+ "property": {
+ "description": "cloud_env",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/cloud_env",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "cloud_env": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/dcae_collector_ip.json b/components/model-catalog/resource-dictionary/starter-dictionary/dcae_collector_ip.json
new file mode 100644
index 000000000..007dc53d8
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/dcae_collector_ip.json
@@ -0,0 +1,37 @@
+{
+ "tags": "dcae_collector_ip",
+ "name": "dcae_collector_ip",
+ "property": {
+ "description": "dcae_collector_ip",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/dcae_collector_ip",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "dcae_collector_ip": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/dcae_collector_port.json b/components/model-catalog/resource-dictionary/starter-dictionary/dcae_collector_port.json
new file mode 100644
index 000000000..7b598614d
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/dcae_collector_port.json
@@ -0,0 +1,37 @@
+{
+ "tags": "dcae_collector_port",
+ "name": "dcae_collector_port",
+ "property": {
+ "description": "dcae_collector_port",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/dcae_collector_port",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "dcae_collector_port": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/demo_artifacts_version.json b/components/model-catalog/resource-dictionary/starter-dictionary/demo_artifacts_version.json
new file mode 100644
index 000000000..83ee0353a
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/demo_artifacts_version.json
@@ -0,0 +1,37 @@
+{
+ "tags": "demo_artifacts_version",
+ "name": "demo_artifacts_version",
+ "property": {
+ "description": "demo_artifacts_version",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/demo_artifacts_version",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "demo_artifacts_version": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/gre_ipaddr.json b/components/model-catalog/resource-dictionary/starter-dictionary/gre_ipaddr.json
new file mode 100644
index 000000000..7a57153aa
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/gre_ipaddr.json
@@ -0,0 +1,37 @@
+{
+ "tags": "gre_ipaddr",
+ "name": "gre_ipaddr",
+ "property": {
+ "description": "gre_ipaddr",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/gre_ipaddr",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "gre_ipaddr": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/install_script_version.json b/components/model-catalog/resource-dictionary/starter-dictionary/install_script_version.json
new file mode 100644
index 000000000..90bccfba1
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/install_script_version.json
@@ -0,0 +1,37 @@
+{
+ "tags": "install_script_version",
+ "name": "install_script_version",
+ "property": {
+ "description": "install_script_version",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/install_script_version",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "install_script_version": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/int_pktgen_private_net_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/int_pktgen_private_net_id.json
new file mode 100644
index 000000000..6d6524100
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/int_pktgen_private_net_id.json
@@ -0,0 +1,37 @@
+{
+ "tags": "int_pktgen_private_net_id",
+ "name": "int_pktgen_private_net_id",
+ "property": {
+ "description": "int_pktgen_private_net_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/int_pktgen_private_net_id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "int_pktgen_private_net_id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/int_pktgen_private_subnet_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/int_pktgen_private_subnet_id.json
new file mode 100644
index 000000000..dc810347b
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/int_pktgen_private_subnet_id.json
@@ -0,0 +1,37 @@
+{
+ "tags": "int_pktgen_private_subnet_id",
+ "name": "int_pktgen_private_subnet_id",
+ "property": {
+ "description": "int_pktgen_private_subnet_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/int_pktgen_private_subnet_id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "int_pktgen_private_subnet_id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/int_private_net_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/int_private_net_id.json
new file mode 100644
index 000000000..9110f038d
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/int_private_net_id.json
@@ -0,0 +1,37 @@
+{
+ "tags": "int_private_net_id",
+ "name": "int_private_net_id",
+ "property": {
+ "description": "int_private_net_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/int_private_net_id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "int_private_net_id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/int_private_subnet_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/int_private_subnet_id.json
new file mode 100644
index 000000000..202a55563
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/int_private_subnet_id.json
@@ -0,0 +1,37 @@
+{
+ "tags": "int_private_subnet_id",
+ "name": "int_private_subnet_id",
+ "property": {
+ "description": "int_private_subnet_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/int_private_subnet_id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "int_private_subnet_id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/keypair.json b/components/model-catalog/resource-dictionary/starter-dictionary/keypair.json
new file mode 100644
index 000000000..03109abab
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/keypair.json
@@ -0,0 +1,37 @@
+{
+ "tags": "keypair",
+ "name": "keypair",
+ "property": {
+ "description": "keypair",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/keypair",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "keypair": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/management-prefix-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/management-prefix-id.json
new file mode 100644
index 000000000..751e99305
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/management-prefix-id.json
@@ -0,0 +1,49 @@
+{
+ "tags": "management-prefix-id",
+ "name": "management-prefix-id",
+ "property": {
+ "description": "management-prefix-id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/management-prefix-id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "management-prefix-id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"management\"",
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "management-prefix-id": "prefix_id"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/nb_api_version.json b/components/model-catalog/resource-dictionary/starter-dictionary/nb_api_version.json
new file mode 100644
index 000000000..a4e6c11a7
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/nb_api_version.json
@@ -0,0 +1,37 @@
+{
+ "tags": "nb_api_version",
+ "name": "nb_api_version",
+ "property": {
+ "description": "nb_api_version",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/nb_api_version",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "nb_api_version": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json b/components/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json
index 8b8884200..3709c0b65 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json
@@ -1,21 +1,37 @@
-{
- "name" : "nexus_artifact_repo",
- "tags" : "nexus_artifact_repo",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "nexus_artifact_repo",
- "type" : "string"
- },
- "sources" : {
- "default": {
- "type": "source-default",
- "properties": {
- }
- },
- "input" : {
- "type" : "source-input",
- "properties" : {
- }
- }
- }
+{
+ "tags": "nexus_artifact_repo",
+ "name": "nexus_artifact_repo",
+ "property": {
+ "description": "nexus_artifact_repo",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/nexus_artifact_repo",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "nexus_artifact_repo": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json b/components/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json
index 710042d5f..4cc28dc43 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json
@@ -1,25 +1,35 @@
-{
- "name" : "nfc-naming-code",
- "tags" : "nfc-naming-code",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "nfc-naming-code",
- "type" : "string"
- },
- "sources" : {
- "processor-db" : {
- "type" : "source-processor-db",
- "properties" : {
- "type" : "SQL",
- "query" : "select nfc_naming_code as nfc_naming_code from sdnctl.VFC_MODEL where customization_uuid=:vfccustomizationuuid",
- "input-key-mapping" : {
- "vfccustomizationuuid" : "vfccustomizationuuid"
- },
- "output-key-mapping" : {
- "nfc-naming-code" : "nfc_naming_code"
- },
- "key-dependencies" : [ "vfccustomizationuuid" ]
- }
- }
- }
+{
+ "tags": "nfc-naming-code",
+ "name": "nfc-naming-code",
+ "property": {
+ "description": "nfc-naming-code",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select nfc_naming_code as nfc_naming_code from sdnctl.VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "input-key-mapping": {
+ "vfccustomizationuuid": "vfccustomizationuuid"
+ },
+ "output-key-mapping": {
+ "nfc-naming-code": "nfc_naming_code"
+ },
+ "key-dependencies": [
+ "vfccustomizationuuid"
+ ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json
index 559ec3e81..90d674c50 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json
@@ -1,21 +1,49 @@
-{
- "name" : "onap_private_net_cidr",
- "tags" : "onap_private_net_cidr",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "onap_private_net_cidr",
- "type" : "string"
- },
- "sources" : {
- "processor-db" : {
- "type" : "source-processor-db",
- "properties" : {
- "type" : "SQL",
- "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private\"",
- "output-key-mapping" : {
- "onap_private_net_cidr" : "prefix"
- }
- }
- }
- }
+{
+ "tags": "onap_private_net_cidr",
+ "name": "onap_private_net_cidr",
+ "property": {
+ "description": "onap_private_net_cidr",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/onap_private_net_cidr",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "onap_private_net_cidr": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"management\"",
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "onap_private_net_cidr": "prefix"
+ }
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json
index 3dd74f7d4..c805e326d 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json
@@ -1,33 +1,38 @@
-{
- "name": "onap_private_net_id",
- "tags": "onap_private_net_id",
- "updated-by": "Singal, Kapil <ks220y@att.com>",
- "property": {
- "type": "string",
- "description": "onap_private_net_id"
- },
- "sources": {
- "input": {
- "type": "source-input"
- },
- "primary-config-data": {
- "type": "source-rest",
- "properties": {
- "type": "JSON",
- "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/onap_private_net_id",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "onap_private_net_id": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
- }
- }
- }
-} \ No newline at end of file
+{
+ "tags": "onap_private_net_id",
+ "name": "onap_private_net_id",
+ "property": {
+ "description": "onap_private_net_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/onap_private_net_id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "onap_private_net_id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+
+ } \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json
index 6cb22c3d6..80f62ea8b 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json
@@ -1,33 +1,37 @@
-{
- "name": "onap_private_subnet_id",
- "tags": "onap_private_subnet_id",
- "updated-by": "Singal, Kapil <ks220y@att.com>",
- "property": {
- "type": "string",
- "description": "onap_private_subnet_id"
- },
- "sources": {
- "input": {
- "type": "source-input"
- },
- "primary-config-data": {
- "type": "source-rest",
- "properties": {
- "type": "JSON",
- "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/onap_private_subnet_id",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "onap_private_subnet_id": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
- }
- }
- }
+{
+ "tags": "onap_private_subnet_id",
+ "name": "onap_private_subnet_id",
+ "property": {
+ "description": "onap_private_subnet_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/onap_private_subnet_id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "onap_private_subnet_id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/pg_int.json b/components/model-catalog/resource-dictionary/starter-dictionary/pg_int.json
new file mode 100644
index 000000000..d1a4b79f9
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/pg_int.json
@@ -0,0 +1,37 @@
+{
+ "tags": "pg_int",
+ "name": "pg_int",
+ "property": {
+ "description": "pg_int",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/pg_int",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "pg_int": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/pktgen_private_net_cidr.json b/components/model-catalog/resource-dictionary/starter-dictionary/pktgen_private_net_cidr.json
new file mode 100644
index 000000000..6210bf903
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/pktgen_private_net_cidr.json
@@ -0,0 +1,51 @@
+ {
+ "tags": "pktgen_private_net_cidr",
+ "name": "pktgen_private_net_cidr",
+ "property": {
+ "description": "pktgen_private_net_cidr",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/pktgen_private_net_cidr",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "pktgen_private_net_cidr": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ },
+
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private2\"",
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "onap_private_net_cidr": "prefix"
+ }
+ }
+ }
+ }
+ }
+ \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/pktgen_private_net_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/pktgen_private_net_id.json
new file mode 100644
index 000000000..a81938866
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/pktgen_private_net_id.json
@@ -0,0 +1,38 @@
+ {
+ "tags": "pktgen_private_net_id",
+ "name": "pktgen_private_net_id",
+ "property": {
+ "description": "pktgen_private_net_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/pktgen_private_net_id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "pktgen_private_net_id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+ }
+ \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json
index 3365d6685..31ab6a909 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json
@@ -1,21 +1,30 @@
-{
- "name" : "private-prefix-id",
- "tags" : "private-prefix-id",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "private-prefix-id",
- "type" : "string"
- },
- "sources" : {
- "processor-db" : {
- "type" : "source-processor-db",
- "properties" : {
- "type" : "SQL",
- "query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"private\"",
- "output-key-mapping" : {
- "private-prefix-id" : "prefix_id"
- }
- }
- }
- }
+{
+ "tags": "private-prefix-id",
+ "name": "private-prefix-id",
+ "property": {
+ "description": "private-prefix-id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"private\"",
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "private-prefix-id": "prefix_id"
+ }
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/private1-prefix-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/private1-prefix-id.json
new file mode 100644
index 000000000..7eff98ddb
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/private1-prefix-id.json
@@ -0,0 +1,49 @@
+{
+ "tags": "private1-prefix-id",
+ "name": "private1-prefix-id",
+ "property": {
+ "description": "private1-prefix-id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/private1-prefix-id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "private1-prefix-id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"private1\"",
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "private1-prefix-id": "prefix_id"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/private2-prefix-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/private2-prefix-id.json
new file mode 100644
index 000000000..f3f0ae107
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/private2-prefix-id.json
@@ -0,0 +1,49 @@
+{
+ "tags": "private2-prefix-id",
+ "name": "private2-prefix-id",
+ "property": {
+ "description": "private2-prefix-id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/private2-prefix-id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "private2-prefix-id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"private2\"",
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "private2-prefix-id": "prefix_id"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/pub_key.json b/components/model-catalog/resource-dictionary/starter-dictionary/pub_key.json
index fe172cafd..441a3c805 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/pub_key.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/pub_key.json
@@ -1,34 +1,37 @@
-{
- "name": "pub_key",
- "tags": "pub_key",
- "updated-by": "Singal, Kapil <ks220y@att.com>",
- "property": {
- "type": "string",
- "description": "pub_key"
- },
- "sources": {
- "input": {
- "type": "source-input"
- },
- "primary-config-data": {
- "type": "source-rest",
- "properties": {
- "type": "JSON",
- "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/pub_key",
- "path": "/param/0/value",
- "input-key-mapping": {
- "service-instance-id": "service-instance-id",
- "vnf-id": "vnf-id"
- },
- "output-key-mapping": {
- "pub_key": "value"
- },
- "key-dependencies": [
- "service-instance-id",
- "vnf-id"
- ]
- }
- }
- }
-}
-
+{
+ "tags": "pub_key",
+ "name": "pub_key",
+ "property": {
+ "description": "pub_key",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/pub_key",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "pub_key": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json
index a4fbc9573..7c274132f 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json
@@ -1,19 +1,38 @@
-{
- "name": "public_net_id",
- "tags": "public_net_id",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property": {
- "type": "string",
- "description" : "public_net_id"
- },
- "sources": {
- "default": {
- "type": "source-default",
- "properties": {
- }
- },
- "input": {
- "type": "source-input"
- }
- }
-}
+ {
+ "tags": "public_net_id",
+ "name": "public_net_id",
+ "property": {
+ "description": "public_net_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/public_net_id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "public_net_id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+
+ } \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sec_group.json b/components/model-catalog/resource-dictionary/starter-dictionary/sec_group.json
index 38f07e85d..14437c913 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/sec_group.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/sec_group.json
@@ -1,21 +1,38 @@
-{
- "name" : "sec_group",
- "tags" : "sec_group",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "sec_group",
- "type" : "string"
- },
- "sources" : {
- "default": {
- "type": "source-default",
- "properties": {
- }
- },
- "input" : {
- "type" : "source-input",
- "properties" : {
- }
- }
- }
-} \ No newline at end of file
+ {
+ "tags": "sec_group",
+ "name": "sec_group",
+ "property": {
+ "description": "sec_group",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/sec_group",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "sec_group": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+
+ } \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vdns_flavor_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vdns_flavor_name.json
new file mode 100644
index 000000000..323c33e44
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vdns_flavor_name.json
@@ -0,0 +1,39 @@
+ {
+
+ "tags": "vdns_flavor_name",
+ "name": "vdns_flavor_name",
+ "property": {
+ "description": "vdns_flavor_name",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_flavor_name",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vdns_flavor_name": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+
+ } \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vdns_image_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vdns_image_name.json
new file mode 100644
index 000000000..bc7089160
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vdns_image_name.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vdns_image_name",
+ "name": "vdns_image_name",
+ "property": {
+ "description": "vdns_image_name",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_image_name",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vdns_image_name": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vdns_int_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vdns_int_private_ip_0.json
new file mode 100644
index 000000000..715cbc7bb
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vdns_int_private_ip_0.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vdns_int_private_ip_0",
+ "name": "vdns_int_private_ip_0",
+ "property": {
+ "description": "vdns_int_private_ip_0",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_int_private_ip_0",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vdns_int_private_ip_0": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vdns_name_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vdns_name_0.json
new file mode 100644
index 000000000..c02e09d60
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vdns_name_0.json
@@ -0,0 +1,38 @@
+ {
+ "tags": "vdns_name_0",
+ "name": "vdns_name_0",
+ "property": {
+ "description": "vdns_name_0",
+ "type": "string"
+ },
+ "updated-by": "Singal, Kapil <ks220y@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_name_0",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vdns_name_0": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+
+ } \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vdns_onap_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vdns_onap_private_ip_0.json
new file mode 100644
index 000000000..420df6a9f
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vdns_onap_private_ip_0.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vdns_onap_private_ip_0",
+ "name": "vdns_onap_private_ip_0",
+ "property": {
+ "description": "vdns_onap_private_ip_0",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vdns_onap_private_ip_0",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vdns_onap_private_ip_0": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json
index e17de2bd9..5e5f0719e 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json
@@ -1,25 +1,35 @@
-{
- "name" : "vf-module-label",
- "tags" : "vf-module-label",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "vf-module-label",
- "type" : "string"
- },
- "sources" : {
- "processor-db" : {
- "type" : "source-processor-db",
- "properties" : {
- "type" : "SQL",
- "query" : "select sdnctl.VF_MODULE_MODEL.vf_module_label as vf_module_label from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
- "input-key-mapping" : {
- "customizationid" : "vf-module-model-customization-uuid"
- },
- "output-key-mapping" : {
- "vf-module-label" : "vf_module_label"
- },
- "key-dependencies" : [ "vf-module-model-customization-uuid" ]
- }
- }
- }
+{
+ "tags": "vf-module-label",
+ "name": "vf-module-label",
+ "property": {
+ "description": "vf-module-label",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select sdnctl.VF_MODULE_MODEL.vf_module_label as vf_module_label from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
+ "input-key-mapping": {
+ "customizationid": "vf-module-model-customization-uuid"
+ },
+ "output-key-mapping": {
+ "vf-module-label": "vf_module_label"
+ },
+ "key-dependencies": [
+ "vf-module-model-customization-uuid"
+ ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-model-customization-uuid.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-model-customization-uuid.json
index 6736e4feb..25760c8a7 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-model-customization-uuid.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-model-customization-uuid.json
@@ -1,15 +1,18 @@
-{
- "name" : "vf-module-model-customization-uuid",
- "tags" : "vf-module-model-customization-uuid",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "vf-module-model-customization-uuid",
- "type" : "string"
- },
- "sources" : {
- "input" : {
- "type" : "source-input",
- "properties" : { }
- }
- }
+{
+ "tags": "vf-module-model-customization-uuid",
+ "name": "vf-module-model-customization-uuid",
+ "property": {
+ "description": "vf-module-model-customization-uuid",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json
index abbe8172e..f9706820d 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json
@@ -1,25 +1,35 @@
-{
- "name" : "vf-module-type",
- "tags" : "vf-module-type",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "vf-module-type",
- "type" : "string"
- },
- "sources" : {
- "processor-db" : {
- "type" : "source-processor-db",
- "properties" : {
- "type" : "SQL",
- "query" : "select vf_module_type as vf_module_type from sdnctl.VF_MODULE_MODEL where customization_uuid=:customizationid",
- "input-key-mapping" : {
- "customizationid" : "vf-module-model-customization-uuid"
- },
- "output-key-mapping" : {
- "vf-module-type" : "vf_module_type"
- },
- "key-dependencies" : [ "vf-module-model-customization-uuid" ]
- }
- }
- }
+{
+ "tags": "vf-module-type",
+ "name": "vf-module-type",
+ "property": {
+ "description": "vf-module-type",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select vf_module_type as vf_module_type from sdnctl.VF_MODULE_MODEL where customization_uuid=:customizationid",
+ "input-key-mapping": {
+ "customizationid": "vf-module-model-customization-uuid"
+ },
+ "output-key-mapping": {
+ "vf-module-type": "vf_module_type"
+ },
+ "key-dependencies": [
+ "vf-module-model-customization-uuid"
+ ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf_module_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf_module_id.json
new file mode 100644
index 000000000..d78ba5546
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vf_module_id.json
@@ -0,0 +1,19 @@
+ {
+ "tags": "vf_module_id",
+ "name": "vf_module_id",
+ "property": {
+ "description": "vf_module_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ }
+ }
+
+ } \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json b/components/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json
index 7ed76745d..1f8c1d21f 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json
@@ -1,25 +1,35 @@
-{
- "name" : "vfccustomizationuuid",
- "tags" : "vfccustomizationuuid, tosca.datatypes.Root, data_type",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "vfccustomizationuuid",
- "type" : "string"
- },
- "sources" : {
- "processor-db" : {
- "type" : "source-processor-db",
- "properties" : {
- "type" : "SQL",
- "query" : "select sdnctl.VF_MODULE_TO_VFC_MAPPING.vfc_customization_uuid as vnf_customid from sdnctl.VF_MODULE_TO_VFC_MAPPING where vm_count = 1 and sdnctl.VF_MODULE_TO_VFC_MAPPING.vf_module_customization_uuid=:vfmodulecustomizationuuid",
- "input-key-mapping" : {
- "vfmodulecustomizationuuid" : "vf-module-model-customization-uuid"
- },
- "output-key-mapping" : {
- "vfccustomizationuuid" : "vnf_customid"
- },
- "key-dependencies" : [ "vf-module-model-customization-uuid" ]
- }
- }
- }
+{
+ "tags": "vfccustomizationuuid",
+ "name": "vfccustomizationuuid",
+ "property": {
+ "description": "vfccustomizationuuid",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select sdnctl.VF_MODULE_TO_VFC_MAPPING.vfc_customization_uuid as vnf_customid from sdnctl.VF_MODULE_TO_VFC_MAPPING where vm_count = 1 and sdnctl.VF_MODULE_TO_VFC_MAPPING.vf_module_customization_uuid=:vfmodulecustomizationuuid",
+ "input-key-mapping": {
+ "vfmodulecustomizationuuid": "vf-module-model-customization-uuid"
+ },
+ "output-key-mapping": {
+ "vfccustomizationuuid": "vnf_customid"
+ },
+ "key-dependencies": [
+ "vf-module-model-customization-uuid"
+ ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vip.json b/components/model-catalog/resource-dictionary/starter-dictionary/vip.json
new file mode 100644
index 000000000..cbc0c5b82
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vip.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vip",
+ "name": "vip",
+ "property": {
+ "description": "vip",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vip",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vip": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vlb_0_int_pktgen_private_port_0_mac.json b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_0_int_pktgen_private_port_0_mac.json
new file mode 100644
index 000000000..74fae4619
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_0_int_pktgen_private_port_0_mac.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vlb_0_int_pktgen_private_port_0_mac",
+ "name": "vlb_0_int_pktgen_private_port_0_mac",
+ "property": {
+ "description": "vlb_0_int_pktgen_private_port_0_mac",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_0_int_pktgen_private_port_0_mac",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vlb_0_int_pktgen_private_port_0_mac": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vlb_flavor_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_flavor_name.json
new file mode 100644
index 000000000..c1bdb601b
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_flavor_name.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vlb_flavor_name",
+ "name": "vlb_flavor_name",
+ "property": {
+ "description": "vlb_flavor_name",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_flavor_name",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vlb_flavor_name": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vlb_image_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_image_name.json
new file mode 100644
index 000000000..e04697fd9
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_image_name.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vlb_image_name",
+ "name": "vlb_image_name",
+ "property": {
+ "description": "vlb_image_name",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_image_name",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vlb_image_name": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vlb_int_pktgen_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_int_pktgen_private_ip_0.json
new file mode 100644
index 000000000..99448b8cf
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_int_pktgen_private_ip_0.json
@@ -0,0 +1,38 @@
+ {
+ "tags": "vlb_int_pktgen_private_ip_0",
+ "name": "vlb_int_pktgen_private_ip_0",
+ "property": {
+ "description": "vlb_int_pktgen_private_ip_0",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_int_pktgen_private_ip_0",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vlb_int_pktgen_private_ip_0": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+ }
+ \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vlb_int_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_int_private_ip_0.json
new file mode 100644
index 000000000..9c0855bac
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_int_private_ip_0.json
@@ -0,0 +1,38 @@
+ {
+ "tags": "vlb_int_private_ip_0",
+ "name": "vlb_int_private_ip_0",
+ "property": {
+ "description": "vlb_int_private_ip_0",
+ "type": "string"
+ },
+ "updated-by": "Singal, Kapil <ks220y@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_int_private_ip_0",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vlb_int_private_ip_0": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+
+ } \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vlb_name_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_name_0.json
new file mode 100644
index 000000000..4be4c8249
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_name_0.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vlb_name_0",
+ "name": "vlb_name_0",
+ "property": {
+ "description": "vlb_name_0",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_name_0",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vlb_name_0": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vlb_onap_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_onap_private_ip_0.json
new file mode 100644
index 000000000..5a38f92c4
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_onap_private_ip_0.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vlb_onap_private_ip_0",
+ "name": "vlb_onap_private_ip_0",
+ "property": {
+ "description": "vlb_onap_private_ip_0",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_onap_private_ip_0",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "private2-prefix-id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vlb_private_net_cidr.json b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_private_net_cidr.json
new file mode 100644
index 000000000..3cda76743
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_private_net_cidr.json
@@ -0,0 +1,49 @@
+{
+ "tags": "vlb_private_net_cidr",
+ "name": "vlb_private_net_cidr",
+ "property": {
+ "description": "vlb_private_net_cidr",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_private_net_cidr",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vlb_private_net_cidr": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"private1\"",
+ "input-key-mapping": {},
+ "output-key-mapping": {
+ "vlb_private_net_cidr": "prefix"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vlb_private_net_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_private_net_id.json
new file mode 100644
index 000000000..563dd4579
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vlb_private_net_id.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vlb_private_net_id",
+ "name": "vlb_private_net_id",
+ "property": {
+ "description": "vlb_private_net_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vlb_private_net_id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vlb_private_net_id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json b/components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json
index a0bb60743..58e7105e2 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json
@@ -1,25 +1,35 @@
-{
- "name" : "vm-type",
- "tags" : "vm-type",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "vm-type",
- "type" : "string"
- },
- "sources" : {
- "processor-db" : {
- "type" : "source-processor-db",
- "properties" : {
- "type" : "SQL",
- "query" : "select VFC_MODEL.vm_type as vm_type from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
- "input-key-mapping" : {
- "vfccustomizationuuid" : "vfccustomizationuuid"
- },
- "output-key-mapping" : {
- "vm-type" : "vm_type"
- },
- "key-dependencies" : [ "vfccustomizationuuid" ]
- }
- }
- }
+{
+ "tags": "vm-type",
+ "name": "vm-type",
+ "property": {
+ "description": "vm-type",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select VFC_MODEL.vm_type as vm_type from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "input-key-mapping": {
+ "vfccustomizationuuid": "vfccustomizationuuid"
+ },
+ "output-key-mapping": {
+ "vm-type": "vm_type"
+ },
+ "key-dependencies": [
+ "vfccustomizationuuid"
+ ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnf-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnf-id.json
index 7f3a18ffc..f1799579f 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vnf-id.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vnf-id.json
@@ -1,15 +1,38 @@
-{
- "name" : "vnf-id",
- "tags" : "vnf-id",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "vnf-id",
- "type" : "string"
- },
- "sources" : {
- "input" : {
- "type" : "source-input",
- "properties" : { }
- }
- }
-} \ No newline at end of file
+ {
+ "tags": "vnf-id",
+ "name": "vnf-id",
+ "property": {
+ "description": "vnf-id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf-id",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vnf-id": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+ }
+ \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json
index 4c0320aca..09b738033 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json
@@ -1,28 +1,55 @@
-{
- "name" : "vnf-name",
- "tags" : "vnf-name, tosca.datatypes.Root, data_type",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "vnf-name",
- "type" : "string"
- },
- "sources" : {
- "primary-config-data" : {
- "type" : "source-rest",
- "properties" : {
- "type" : "JSON",
- "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name",
- "path" : "/param/0/value",
- "expression-type" : "JSON_POINTER",
- "input-key-mapping" : {
- "service-instance-id" : "service-instance-id",
- "vnf-id" : "vnf-id"
- },
- "output-key-mapping" : {
- "vnf-name" : "value"
- },
- "key-dependencies" : [ "service-instance-id", "vnf-id" ]
- }
- }
- }
+{
+ "tags": "vnf-name",
+ "name": "vnf-name",
+ "property": {
+ "description": "vnf-name",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-name/vnf-data/vnf-topology/vnf-parameters-data/param/vnf-name",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-name": "vnf-name"
+ },
+ "output-key-mapping": {
+ "vnf-name": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-name"
+ ]
+ }
+ },
+ "primary-aai-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "verb": "GET",
+ "url-path": "/aai/v14/network/generic-vnfs/generic-vnf/$vnf-id",
+ "path": "",
+ "input-key-mapping": {
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vnf-name": "vnf-name"
+ },
+ "key-dependencies": [
+ "vnf-id"
+ ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnf_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnf_id.json
new file mode 100644
index 000000000..7afb3bf0a
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vnf_id.json
@@ -0,0 +1,19 @@
+ {
+ "tags": "vnf_id",
+ "name": "vnf_id",
+ "property": {
+ "description": "vnf_id",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ }
+ }
+
+ } \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json
index 40604ccdd..855ca2223 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json
@@ -1,25 +1,35 @@
-{
- "name" : "vnfc-model-invariant-uuid",
- "tags" : "vnfc-model-invariant-uuid",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "vnfc-model-invariant-uuid for SRIOV VPE template",
- "type" : "string"
- },
- "sources" : {
- "processor-db" : {
- "type" : "source-processor-db",
- "properties" : {
- "type" : "SQL",
- "query" : "select VFC_MODEL.invariant_uuid as vfc_invariant_uuid from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
- "input-key-mapping" : {
- "vfccustomizationuuid" : "vfccustomizationuuid"
- },
- "output-key-mapping" : {
- "vnfc-model-invariant-uuid" : "vfc_invariant_uuid"
- },
- "key-dependencies" : [ "vfccustomizationuuid" ]
- }
- }
- }
+{
+ "tags": "vnfc-model-invariant-uuid",
+ "name": "vnfc-model-invariant-uuid",
+ "property": {
+ "description": "vnfc-model-invariant-uuid",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select VFC_MODEL.invariant_uuid as vfc_invariant_uuid from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "input-key-mapping": {
+ "vfccustomizationuuid": "vfccustomizationuuid"
+ },
+ "output-key-mapping": {
+ "vnfc-model-invariant-uuid": "vfc_invariant_uuid"
+ },
+ "key-dependencies": [
+ "vfccustomizationuuid"
+ ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json
index 75bb2e5d2..b6027fef1 100755
--- a/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json
@@ -1,25 +1,35 @@
-{
- "name" : "vnfc-model-version",
- "tags" : "vnfc-model-version",
- "updated-by" : "Singal, Kapil <ks220y@att.com>",
- "property" : {
- "description" : "vnfc-model-version for SRIOV VPE template",
- "type" : "string"
- },
- "sources" : {
- "processor-db" : {
- "type" : "source-processor-db",
- "properties" : {
- "type" : "SQL",
- "query" : "select VFC_MODEL.version as vnfc_model_version from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
- "input-key-mapping" : {
- "vfccustomizationuuid" : "vfccustomizationuuid"
- },
- "output-key-mapping" : {
- "vnfc-model-version" : "vnfc_model_version"
- },
- "key-dependencies" : [ "vfccustomizationuuid" ]
- }
- }
- }
+{
+ "tags": "vnfc-model-version",
+ "name": "vnfc-model-version",
+ "property": {
+ "description": "vnfc-model-version",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "processor-db": {
+ "type": "source-processor-db",
+ "properties": {
+ "endpoint-selector": "dynamic-db-source",
+ "type": "SQL",
+ "query": "select VFC_MODEL.version as vnfc_model_version from VFC_MODEL where customization_uuid=:vfccustomizationuuid",
+ "input-key-mapping": {
+ "vfccustomizationuuid": "vfccustomizationuuid"
+ },
+ "output-key-mapping": {
+ "vnfc-model-version": "vnfc_model_version"
+ },
+ "key-dependencies": [
+ "vfccustomizationuuid"
+ ]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vpg_flavor_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_flavor_name.json
new file mode 100644
index 000000000..6a4b1bc73
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_flavor_name.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vpg_flavor_name",
+ "name": "vpg_flavor_name",
+ "property": {
+ "description": "vpg_flavor_name",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_flavor_name",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vpg_flavor_name": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vpg_image_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_image_name.json
new file mode 100644
index 000000000..cfeab71ca
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_image_name.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vpg_image_name",
+ "name": "vpg_image_name",
+ "property": {
+ "description": "vpg_image_name",
+ "type": "string"
+ },
+ "updated-by": "MALAKOV, YURIY <yuriy.malakov@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_image_name",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vpg_image_name": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vpg_int_pktgen_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_int_pktgen_private_ip_0.json
new file mode 100644
index 000000000..d35cc1e4f
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_int_pktgen_private_ip_0.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vpg_int_pktgen_private_ip_0",
+ "name": "vpg_int_pktgen_private_ip_0",
+ "property": {
+ "description": "vpg_int_pktgen_private_ip_0",
+ "type": "string"
+ },
+ "updated-by": "Singal, Kapil <ks220y@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_int_pktgen_private_ip_0",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vpg_int_pktgen_private_ip_0": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vpg_onap_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_onap_private_ip_0.json
new file mode 100644
index 000000000..b6865acf4
--- /dev/null
+++ b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_onap_private_ip_0.json
@@ -0,0 +1,37 @@
+{
+ "tags": "vpg_onap_private_ip_0",
+ "name": "vpg_onap_private_ip_0",
+ "property": {
+ "description": "vpg_onap_private_ip_0",
+ "type": "string"
+ },
+ "updated-by": "Singal, Kapil <ks220y@att.com>",
+ "sources": {
+ "input": {
+ "type": "source-input"
+ },
+ "default": {
+ "type": "source-default",
+ "properties": {}
+ },
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vpg_onap_private_ip_0",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vpg_onap_private_ip_0": "value"
+ },
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-id"
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml
index 490487687..06726ad11 100755
--- a/ms/blueprintsprocessor/application/pom.xml
+++ b/ms/blueprintsprocessor/application/pom.xml
@@ -51,6 +51,10 @@
</dependency>
<dependency>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
+ <artifactId>ansible-awx-executor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>netconf-executor</artifactId>
</dependency>
<dependency>
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/pom.xml b/ms/blueprintsprocessor/functions/ansible-awx-executor/pom.xml
new file mode 100644
index 000000000..8eafc4abf
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/pom.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © 2019 Bell Canada.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>functions</artifactId>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <version>0.5.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
+ <artifactId>ansible-awx-executor</artifactId>
+ <name>Blueprints Processor Function - Ansible AWX Executor</name>
+ <description>Blueprints Processor Function - Ansible Executor</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.python</groupId>
+ <artifactId>jython-standalone</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>rest-lib</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.controllerblueprints</groupId>
+ <artifactId>blueprint-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId>
+ <artifactId>processor-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>${apache.httpcomponents.client.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-security</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
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
new file mode 100644
index 000000000..6e8cdc243
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt
@@ -0,0 +1,282 @@
+/*
+ * Copyright © 2019 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file 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.
+ */
+
+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.URLEncoder
+import java.util.NoSuchElementException
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.*
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
+import org.onap.ccsdk.cds.controllerblueprints.core.*
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.slf4j.LoggerFactory
+import org.springframework.beans.factory.config.ConfigurableBeanFactory
+import org.springframework.context.annotation.Scope
+import org.springframework.http.HttpMethod
+import org.springframework.stereotype.Component
+
+/**
+ * ComponentRemoteAnsibleExecutor
+ *
+ * Component that launches a run of a job template (INPUT_JOB_TEMPLATE_NAME) representing an Ansible playbook,
+ * and its parameters, via the AWX server identified by the INPUT_ENDPOINT_SELECTOR parameter.
+ *
+ * It supports extra_vars, limit, tags, skip-tags, inventory (by name or Id) Ansible parameters.
+ * It reports the results of the execution via properties, named execute-command-status and execute-command-logs
+ *
+ * @author Serge Simard
+ */
+@Component("component-remote-ansible-executor")
+@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+open class ComponentRemoteAnsibleExecutor(private val blueprintRestLibPropertyService: BluePrintRestLibPropertyService)
+ : AbstractComponentFunction() {
+
+ private val log = LoggerFactory.getLogger(ComponentRemoteAnsibleExecutor::class.java)!!
+
+ // HTTP related constants
+ private val HTTP_SUCCESS = 200..202
+ private val GET = HttpMethod.GET.name
+ private val POST = HttpMethod.POST.name
+
+ companion object {
+ // input fields names accepted by this executor
+ const val INPUT_ENDPOINT_SELECTOR = "endpoint-selector"
+ const val INPUT_JOB_TEMPLATE_NAME = "job-template-name"
+ const val INPUT_LIMIT_TO_HOST = "limit"
+ const val INPUT_INVENTORY = "inventory"
+ const val INPUT_EXTRA_VARS = "extra-vars"
+ const val INPUT_TAGS = "tags"
+ const val INPUT_SKIP_TAGS = "skip-tags"
+
+ // output fields names populated by this executor
+ const val ATTRIBUTE_EXEC_CMD_STATUS = "ansible-command-status"
+ const val ATTRIBUTE_EXEC_CMD_LOG = "ansible-command-logs"
+
+ const val CHECKDELAY: Long = 10000
+ }
+
+ override suspend fun processNB(executionRequest: ExecutionServiceInput) {
+
+ try {
+ val restClientService = getAWXRestClient()
+
+ val jobTemplateName = getOperationInput(INPUT_JOB_TEMPLATE_NAME).asText()
+ val jtId = lookupJobTemplateIDByName(restClientService, jobTemplateName)
+ if (jtId.isNotEmpty()) {
+ runJobTemplateOnAWX(restClientService, jobTemplateName, jtId)
+ } else {
+ val message = "Job template ${jobTemplateName} does not exists"
+ log.error(message)
+ setNodeOutputErrors("Failed", message)
+ }
+ } catch (e: Exception) {
+ log.error("Failed to process on remote executor (${e.message})", e)
+ setNodeOutputErrors("Failed", "Failed to process on remote executor (${e.message})")
+ }
+ }
+
+
+ override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
+ val message = "Error in ComponentRemoteAnsibleExecutor : ${runtimeException.message}"
+ log.error(message,runtimeException)
+ setNodeOutputErrors("Failed", message)
+ }
+
+ /** Creates a TokenAuthRestClientService, since this executor expect type property to be "token-auth" and the
+ * token to be an OAuth token (access_token response field) generated via the AWX /api/o/token rest endpoint
+ * The token field is of the form "Bearer access_token_from_response", for example :
+ * "blueprintsprocessor.restclient.awx.type=token-auth"
+ * "blueprintsprocessor.restclient.awx.url=http://ipaddress"
+ * "blueprintsprocessor.restclient.awx.token=Bearer J9gEtMDqf7P4YsJ74fioY9VAhLDIs1"
+ */
+ private fun getAWXRestClient(): BlueprintWebClientService {
+
+ val endpointSelector = getOperationInput(INPUT_ENDPOINT_SELECTOR).asText()// TODO not asText
+
+ try {
+ return blueprintRestLibPropertyService.blueprintWebClientService(endpointSelector)
+ } catch (e : NoSuchElementException) {
+ throw IllegalArgumentException("No value provided for input selector $endpointSelector", e)
+ }
+ }
+
+ /**
+ * Finds the job template ID based on the job template name provided in the request
+ */
+ private fun lookupJobTemplateIDByName(awxClient : BlueprintWebClientService, job_template_name: String?): String {
+ val mapper = ObjectMapper()
+
+ // Get Job Template details by name
+ var response = awxClient.exchangeResource(GET, "/api/v2/job_templates/${job_template_name}/", "")
+ val jtDetails: JsonNode = mapper.readTree(response.body)
+ return jtDetails.at("/id").asText()
+ }
+
+ /**
+ * Performs the job template execution on AWX, ie. prepare arguments as per job template
+ * requirements (ask fields) and provided overriding values. Then it launches the run, and monitors
+ * its execution. Finally, it retrieves the job results via the stdout api.
+ * The status and output attributes are populated in the process.
+ */
+ private fun runJobTemplateOnAWX(awxClient : BlueprintWebClientService, job_template_name: String?, jtId: String) {
+ val mapper = ObjectMapper()
+
+ setNodeOutputProperties( "preparing".asJsonPrimitive(), "".asJsonPrimitive())
+
+ // Get Job Template requirements
+ var response = awxClient.exchangeResource(GET, "/api/v2/job_templates/${jtId}/launch/","")
+ val jtLaunchReqs: JsonNode = mapper.readTree(response.body)
+ var payload = prepareLaunchPayload(awxClient, jtLaunchReqs)
+ log.info("Running job with $payload, for requestId $processId.")
+
+ // Launch the job for the targeted template
+ var jtLaunched : JsonNode = JacksonUtils.jsonNode("{}") as ObjectNode
+ response = awxClient.exchangeResource(POST, "/api/v2/job_templates/${jtId}/launch/", payload)
+ if (response.status in HTTP_SUCCESS) {
+ jtLaunched = mapper.readTree(response.body)
+ val fieldsIgnored: JsonNode = jtLaunched.at("/ignored_fields")
+ if (fieldsIgnored.rootFieldsToMap().isNotEmpty()) {
+ log.warn("Ignored fields : $fieldsIgnored, for requestId $processId.")
+ }
+ }
+
+ if (response.status in HTTP_SUCCESS) {
+ val jobId: String = jtLaunched.at("/id").asText()
+
+ // Poll current job status while job is not executed
+ var jobStatus = "unknown"
+ var jobEndTime = "null"
+ while (jobEndTime == "null") {
+ response = awxClient.exchangeResource(GET, "/api/v2/jobs/${jobId}/", "")
+ val jobLaunched: JsonNode = mapper.readTree(response.body)
+ jobStatus = jobLaunched.at("/status").asText()
+ jobEndTime = jobLaunched.at("/finished").asText()
+ Thread.sleep(CHECKDELAY)
+ }
+
+ log.info("Execution of job template $job_template_name in job #$jobId finished with status ($jobStatus) for requestId $processId")
+
+ // Get job execution results (stdout)
+ val plainTextHeaders = mutableMapOf<String, String>()
+ plainTextHeaders["Content-Type"] = "text/plain ;utf-8"
+ response = awxClient.exchangeResource(GET, "/api/v2/jobs/${jobId}/stdout/?format=txt","", plainTextHeaders)
+
+ setNodeOutputProperties( jobStatus.asJsonPrimitive(), response.body.asJsonPrimitive())
+ } else {
+ // The job template requirements were not fulfilled with the values passed in. The message below will
+ // provide more information via the response, like the ignored_fields, or variables_needed_to_start,
+ // or resources_needed_to_start, in order to help user pinpoint the problems with the request.
+ val message = "Execution of job template $job_template_name could not be started for requestId $processId." +
+ " (Response: ${response.body}) "
+ log.error(message)
+ setNodeOutputErrors( response.status.toString(), message)
+ }
+ }
+
+ /**
+ * Prepares the JSON payload expected by the job template api,
+ * by applying the overrides that were provided
+ * and allowed by the template definition flags in jtLaunchReqs
+ */
+ private fun prepareLaunchPayload(awxClient : BlueprintWebClientService, jtLaunchReqs: JsonNode): String {
+ val payload = JacksonUtils.jsonNode("{}") as ObjectNode
+
+ // Parameter defaults
+ val limitProp = getOptionalOperationInput(INPUT_LIMIT_TO_HOST)?.asText()
+ val tagsProp = getOptionalOperationInput(INPUT_TAGS)?.asText()
+ val skipTagsProp = getOptionalOperationInput(INPUT_SKIP_TAGS)?.asText()
+ val inventoryProp : String? = getOptionalOperationInput(INPUT_INVENTORY)?.asText()
+ val extraArgs : JsonNode = getOperationInput(INPUT_EXTRA_VARS)
+
+ val askLimitOnLaunch = jtLaunchReqs.at( "/ask_limit_on_launch").asBoolean()
+ if (askLimitOnLaunch && limitProp!!.isNotEmpty()) {
+ payload.put(INPUT_LIMIT_TO_HOST, limitProp)
+ }
+ val askTagsOnLaunch = jtLaunchReqs.at("/ask_tags_on_launch").asBoolean()
+ if (askTagsOnLaunch && tagsProp!!.isNotEmpty()) {
+ payload.put(INPUT_TAGS, tagsProp)
+ }
+ if (askTagsOnLaunch && skipTagsProp!!.isNotEmpty()) {
+ payload.put("skip_tags", skipTagsProp)
+ }
+ val askInventoryOnLaunch = jtLaunchReqs.at("/ask_inventory_on_launch").asBoolean()
+ if (askInventoryOnLaunch && inventoryProp != null) {
+ var inventoryKeyId = inventoryProp.toIntOrNull()
+ if (inventoryKeyId == null) {
+ inventoryKeyId = resolveInventoryIdByName(awxClient, inventoryProp)
+ }
+ payload.put(INPUT_INVENTORY, inventoryKeyId)
+ }
+ val askVariablesOnLaunch = jtLaunchReqs.at("/ask_variables_on_launch").asBoolean()
+ if (askVariablesOnLaunch && extraArgs != null) {
+ payload.put("extra_vars", extraArgs)
+ }
+
+ val strPayload = "$payload"
+
+ return strPayload
+ }
+
+ private fun resolveInventoryIdByName(awxClient : BlueprintWebClientService, inventoryProp: String): Int? {
+ var invId : Int? = null
+
+ // Get Inventory by name
+ val encoded = URLEncoder.encode(inventoryProp)
+ val response = awxClient.exchangeResource(GET,"/api/v2/inventories/?name=$encoded","")
+ //, getRequestHeaders("awx"))
+ if (response.status in HTTP_SUCCESS) {
+ val mapper = ObjectMapper()
+
+ // Extract the inventory ID from response
+ val invDetails = mapper.readTree(response.body)
+ val nbInvFound = invDetails.at("/count").asInt()
+ if (nbInvFound == 1) {
+ invId = invDetails["results"][0]["id"].asInt()
+ }
+ if (invId == null) {
+ log.error("Could not resolve inventory $inventoryProp by name...")
+ } else {
+ log.info("Resolved inventory $inventoryProp to ID #: $invId")
+ }
+ }
+ return invId
+ }
+
+ /**
+ * Utility function to set the output properties of the executor node
+ */
+ private fun setNodeOutputProperties(status: JsonNode, message: JsonNode) {
+ setAttribute(ATTRIBUTE_EXEC_CMD_STATUS, status)
+ log.info("Executor status: $status")
+ setAttribute(ATTRIBUTE_EXEC_CMD_LOG, message)
+ log.info("Executor message: $message")
+ }
+
+ /**
+ * Utility function to set the output properties and errors of the executor node, in cas of errors
+ */
+ private fun setNodeOutputErrors(status: String, message: String) {
+ setAttribute(ATTRIBUTE_EXEC_CMD_STATUS, status.asJsonPrimitive())
+ setAttribute(ATTRIBUTE_EXEC_CMD_LOG, message.asJsonPrimitive())
+
+ addError("error", ATTRIBUTE_EXEC_CMD_LOG, "$status : $message")
+ }
+} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt
new file mode 100644
index 000000000..b7f1ed5f9
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt
@@ -0,0 +1,243 @@
+/*
+ * Copyright © 2019 IBM.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file 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.
+ */
+
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.ansible.executor
+
+import com.fasterxml.jackson.databind.JsonNode
+import com.fasterxml.jackson.databind.ObjectMapper
+import io.mockk.every
+import io.mockk.mockk
+import kotlinx.coroutines.runBlocking
+import org.junit.Ignore
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintProperties
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
+import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+import org.slf4j.LoggerFactory
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
+import org.springframework.boot.test.context.SpringBootTest
+import org.springframework.test.context.ContextConfiguration
+import org.springframework.test.context.TestPropertySource
+import org.springframework.test.context.junit4.SpringRunner
+
+@RunWith(SpringRunner::class)
+@EnableAutoConfiguration(exclude = [DataSourceAutoConfiguration::class])
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
+@ContextConfiguration(classes = [BluePrintRestLibConfiguration::class,
+ BlueprintPropertyConfiguration::class,
+ BluePrintProperties::class,
+ BluePrintProperties::class])
+@TestPropertySource(properties =
+[
+ "server.port=8443",
+ "server.ssl.enabled=true",
+ "server.ssl.key-store=classpath:keystore.p12",
+ "server.ssl.key-store-password=changeit",
+ "server.ssl.keyStoreType=PKCS12",
+ "server.ssl.keyAlias=tomcat",
+ "blueprintsprocessor.restclient.awx.type=token-auth",
+ "blueprintsprocessor.restclient.awx.url=http://142.44.184.236",
+ "blueprintsprocessor.restclient.awx.token=Bearer J9gEtMDqf7P4YsJ74fioY9VAhLDIs1",
+ "blueprintsprocessor.restclient.future.keyStoreInstance=PKCS12",
+ "blueprintsprocessor.restclient.future.sslTrust=src/test/resources/keystore.p12",
+ "blueprintsprocessor.restclient.future.sslTrustPassword=changeit"
+])
+class ComponentRemoteAnsibleExecutorTest {
+
+ @Autowired
+ lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
+
+ @Transient
+ private val log = LoggerFactory.getLogger(ComponentRemoteAnsibleExecutorTest::class.java)
+
+ @Test
+ @Ignore
+ fun testComponentRemoteAnsibleExecutor() {
+ runBlocking {
+
+ val awxRemoteExecutor = ComponentRemoteAnsibleExecutor(bluePrintRestLibPropertyService)
+
+ val executionServiceInput = JacksonUtils.readValueFromClassPathFile(
+ "payload/requests/sample-remote-ansible-request.json",
+ ExecutionServiceInput::class.java)!!
+
+ log.info("Request Inputs : " + executionServiceInput.payload)
+
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime("123456-1000",
+ "./../../../../components/model-catalog/blueprint-model/test-blueprint/remote_ansible")
+ awxRemoteExecutor.bluePrintRuntimeService = bluePrintRuntimeService
+
+ val workflowName = executionServiceInput.actionIdentifiers.actionName
+
+ // Assign Workflow inputs
+ val input = executionServiceInput.payload.get("$workflowName-request")
+ bluePrintRuntimeService.assignWorkflowInputs(workflowName, input)
+
+ val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-ansible")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemoteAnsibleExecutor")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
+
+ val stepInputData = StepData().apply {
+ name = "execute-remote-ansible"
+ properties = stepMetaData
+ }
+ executionServiceInput.stepData = stepInputData
+
+ awxRemoteExecutor.applyNB(executionServiceInput)
+ }
+ }
+
+ /**
+ * Test cases for Ansible executor to work with the process NB of remote
+ * executor.
+ */
+ @Test
+ @Ignore
+ fun testComponentRemoteAnsibleExecutorProcessNB() {
+ runBlocking {
+ // val remoteScriptExecutionService = MockRemoteScriptExecutionService(bluePrintRestLibPropertyService)
+ val componentRemoteAnsibleExecutor = ComponentRemoteAnsibleExecutor(bluePrintRestLibPropertyService)
+ val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("123456-1000")
+ val input = getMockedOutput(bluePrintRuntime)
+ componentRemoteAnsibleExecutor.bluePrintRuntimeService = bluePrintRuntime
+ componentRemoteAnsibleExecutor.applyNB(input)
+ }
+ }
+
+ /**
+ * Mocked input information for remote Ansible executor.
+ */
+ fun getMockedOutput(svc: DefaultBluePrintRuntimeService):
+ ExecutionServiceInput {
+ val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
+
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-ansible")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemoteAnsibleExecutor")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
+
+ val mapper = ObjectMapper()
+ val rootNode = mapper.createObjectNode()
+ rootNode.put("ip-address", "0.0.0.0")
+ rootNode.put("type", "rest")
+
+ val operationalInputs: MutableMap<String, JsonNode> = hashMapOf()
+ operationalInputs.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-ansible")
+ operationalInputs.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemoteAnsibleExecutor")
+ operationalInputs.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ operationalInputs.putJsonElement("endpoint-selector", "aai")
+// operationalInputs.putJsonElement("dynamic-properties", rootNode)
+// operationalInputs.putJsonElement("command", "./run.sh")
+ operationalInputs.putJsonElement("job-template-name", "CDS_job_template2")
+
+ every {
+ svc.resolveNodeTemplateInterfaceOperationInputs(
+ "execute-remote-ansible",
+ "ComponentRemoteAnsibleExecutor", "process")
+ } returns operationalInputs
+
+ val stepInputData = StepData().apply {
+ name = "execute-remote-ansible"
+ properties = stepMetaData
+ }
+
+ val executionServiceInput = JacksonUtils
+ .readValueFromClassPathFile(
+ "payload/requests/sample-remote-ansible-request.json",
+ ExecutionServiceInput::class.java)!!
+ executionServiceInput.stepData = stepInputData
+
+ val operationOutputs = hashMapOf<String, JsonNode>()
+ every {
+ svc.resolveNodeTemplateInterfaceOperationOutputs(
+ "execute-remote-ansible",
+ "ComponentRemoteAnsibleExecutor", "process")
+ } returns operationOutputs
+ val bluePrintRuntimeService = BluePrintMetadataUtils
+ .getBluePrintRuntime("123456-1000",
+ "./../../../../components/model-" +
+ "catalog/blueprint-model/test-blueprint/" +
+ "remote_ansible")
+// every {
+// svc.resolveNodeTemplateArtifactDefinition("execute-remote-ansible", "component-script")
+// } returns bluePrintRuntimeService.resolveNodeTemplateArtifactDefinition("execute-remote-ansible",
+// "component-script")
+ every {
+ svc.setNodeTemplateAttributeValue(
+ "execute-remote-ansible",
+ "execute-command-status",
+ "successful".asJsonPrimitive())
+ } returns Unit
+
+ every {
+ svc.setNodeTemplateAttributeValue(
+ "execute-remote-ansible",
+ "execute-command-logs", "N/A".asJsonPrimitive())
+ } returns Unit
+
+ every {
+ svc.setNodeTemplateAttributeValue(
+ "execute-remote-ansible",
+ "execute-command-logs",
+ "processed successfully".asJsonPrimitive())
+ } returns Unit
+
+ every {
+ svc.bluePrintContext()
+ } returns bluePrintRuntimeService.bluePrintContext()
+ return executionServiceInput
+ }
+}
+
+//class MockRemoteScriptExecutionService : RemoteScriptExecutionService {
+// override suspend fun init(selector: String) {
+// }
+//
+// override suspend fun prepareEnv(prepareEnvInput: PrepareRemoteEnvInput): RemoteScriptExecutionOutput {
+// assertEquals(prepareEnvInput.requestId, "123456-1000", "failed to match request id")
+// assertNotNull(prepareEnvInput.packages, "failed to get packages")
+//
+// val remoteScriptExecutionOutput = mockk<RemoteScriptExecutionOutput>()
+// every { remoteScriptExecutionOutput.response } returns "prepared successfully"
+// every { remoteScriptExecutionOutput.status } returns StatusType.SUCCESS
+// return remoteScriptExecutionOutput
+// }
+//
+// override suspend fun executeCommand(remoteExecutionInput: RemoteScriptExecutionInput): RemoteScriptExecutionOutput {
+// assertEquals(remoteExecutionInput.requestId, "123456-1000", "failed to match request id")
+//
+// val remoteScriptExecutionOutput = mockk<RemoteScriptExecutionOutput>()
+// every { remoteScriptExecutionOutput.response } returns "processed successfully"
+// every { remoteScriptExecutionOutput.status } returns StatusType.SUCCESS
+// return remoteScriptExecutionOutput
+// }
+//
+// override suspend fun close() {
+//
+// }
+//}
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/keystore.p12 b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/keystore.p12
new file mode 100644
index 000000000..96b0d3ac3
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/keystore.p12
Binary files differ
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml
new file mode 100644
index 000000000..5b36ac046
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/logback-test.xml
@@ -0,0 +1,35 @@
+<!--
+ ~ Copyright © 2017-2018 AT&T Intellectual Property.
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file 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.
+ -->
+
+<configuration>
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} %-5level %logger{55} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+
+ <logger name="org.springframework" level="warn"/>
+ <logger name="org.hibernate" level="info"/>
+ <logger name="org.onap.ccsdk.cds.blueprintsprocessor" level="info"/>
+
+ <root level="warn">
+ <appender-ref ref="STDOUT"/>
+ </root>
+
+</configuration>
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/payload/requests/sample-remote-ansible-request.json b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/payload/requests/sample-remote-ansible-request.json
new file mode 100644
index 000000000..6169da9c7
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/resources/payload/requests/sample-remote-ansible-request.json
@@ -0,0 +1,29 @@
+{
+ "actionIdentifiers": {
+ "blueprintName": "remote_ansible",
+ "blueprintVersion": "1.0.0",
+ "actionName": "execute-remote-ansible",
+ "mode": "sync"
+ },
+ "commonHeader": {
+ "flags": {
+ "force": true,
+ "ttl": 3600
+ },
+ "originatorId": "mock",
+ "requestId": "123456-2000",
+ "subRequestId": "sub-123456-1000",
+ "timestamp": "2012-04-23T18:25:43.511Z"
+ },
+ "payload": {
+ "execute-remote-ansible-request": {
+ "endpoint-selector": "awx",
+ "job-template-name": "hello_world_job_template",
+ "inventory": "Demo Inventory",
+ "extra-vars": {
+ "site_id": "3 - Belmont",
+ "tor_group": "vEPC"
+ }
+ }
+ }
+}
diff --git a/ms/blueprintsprocessor/functions/pom.xml b/ms/blueprintsprocessor/functions/pom.xml
index a635c9f4c..9983b01a7 100755
--- a/ms/blueprintsprocessor/functions/pom.xml
+++ b/ms/blueprintsprocessor/functions/pom.xml
@@ -29,6 +29,7 @@
<description>Blueprints Processor Functions</description>
<modules>
<module>resource-resolution</module>
+ <module>ansible-awx-executor</module>
<module>python-executor</module>
<module>netconf-executor</module>
<module>restconf-executor</module>
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt
index e8b61a8fe..987390fdb 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt
@@ -124,7 +124,8 @@ open class DatabaseResourceAssignmentProcessor(private val bluePrintDBLibPropert
checkNotEmpty(resourceAssignment.dictionaryName) {
"resource assignment dictionary name is not defined for template key (${resourceAssignment.name})"
}
- checkEquals(ResourceDictionaryConstants.SOURCE_PROCESSOR_DB, resourceAssignment.dictionarySource) {
+ check(resourceAssignment.dictionarySource in arrayOf(ResourceDictionaryConstants.SOURCE_PROCESSOR_DB, ResourceDictionaryConstants.SOURCE_PRIMARY_DB))
+ {
"resource assignment source is not ${ResourceDictionaryConstants.SOURCE_PROCESSOR_DB} but it is ${resourceAssignment.dictionarySource}"
}
}
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 656e86169..1a943d110 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
@@ -21,6 +21,7 @@ import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.node.NullNode
import com.fasterxml.jackson.databind.node.ObjectNode
+import com.fasterxml.jackson.databind.node.TextNode
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.controllerblueprints.core.*
@@ -122,7 +123,7 @@ class ResourceAssignmentUtils {
if (isNotEmpty(it.name) && it.property != null) {
val rName = it.name
val type = nullToEmpty(it.property?.type).toLowerCase()
- val value = it.property?.value
+ val value = useDefaultValueIfNull(it, rName)
logger.info("Generating Resource name ($rName), type ($type), value ($value)")
root.set(rName, value)
}
@@ -136,6 +137,15 @@ class ResourceAssignmentUtils {
return result
}
+ private fun useDefaultValueIfNull(resourceAssignment: ResourceAssignment, resourceAssignmentName: String): JsonNode {
+ if (resourceAssignment.property?.value == null) {
+ val defaultValue = "\${$resourceAssignmentName}"
+ return TextNode(defaultValue)
+ } else {
+ return resourceAssignment.property!!.value!!
+ }
+ }
+
fun transformToRARuntimeService(blueprintRuntimeService: BluePrintRuntimeService<*>,
templateArtifactName: String): ResourceAssignmentRuntimeService {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt
index 89674ea24..f73197e0b 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt
@@ -49,7 +49,7 @@ class DatabaseResourceResolutionProcessorTest {
lateinit var databaseResourceAssignmentProcessor: DatabaseResourceAssignmentProcessor
@Test
- fun `test database resource resolution`() {
+ fun `test database resource resolution processor db`() {
runBlocking {
val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration")
@@ -74,4 +74,31 @@ class DatabaseResourceResolutionProcessorTest {
println(processorName)
}
}
+
+ @Test
+ fun `test database resource resolution primary db`() {
+ runBlocking {
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
+ "./../../../../components/model-catalog/blueprint-model/test-blueprint/capability_python")
+
+ val resourceAssignmentRuntimeService = ResourceAssignmentRuntimeService("1234", bluePrintContext)
+
+ databaseResourceAssignmentProcessor.raRuntimeService = resourceAssignmentRuntimeService
+ databaseResourceAssignmentProcessor.resourceDictionaries = ResourceAssignmentUtils
+ .resourceDefinitions(bluePrintContext.rootPath)
+
+ val resourceAssignment = ResourceAssignment().apply {
+ name = "service-instance-id"
+ dictionaryName = "service-instance-id"
+ dictionarySource = "primary-db"
+ property = PropertyDefinition().apply {
+ type = "string"
+ }
+ }
+
+ val processorName = databaseResourceAssignmentProcessor.applyNB(resourceAssignment)
+ assertNotNull(processorName, "couldn't get Database resource assignment processor name")
+ println(processorName)
+ }
+ }
} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt
new file mode 100644
index 000000000..9b87c12eb
--- /dev/null
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt
@@ -0,0 +1,79 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+
+package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils
+
+import com.fasterxml.jackson.databind.node.TextNode
+import org.junit.Test
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
+import kotlin.test.assertEquals
+
+class ResourceAssignmentUtilsTest {
+
+ @Test
+ fun `generateResourceDataForAssignments - positive test`() {
+ //given a valid resource assignment
+ val validResourceAssignment = createResourceAssignmentForTest("valid_value")
+
+ //and a list containing that resource assignment
+ val resourceAssignmentList = listOf<ResourceAssignment>(validResourceAssignment)
+
+ //when the values of the resources are evaluated
+ val outcome = ResourceAssignmentUtils.generateResourceDataForAssignments(resourceAssignmentList)
+
+ //then the assignment should produce a valid result
+ val expected = "{\n" + " \"pnf-id\" : \"valid_value\"\n" + "}"
+ assertEquals(expected, outcome, "unexpected outcome generated")
+
+ }
+
+ @Test
+ fun `generateResourceDataForAssignments - resource without value is not resolved as null`() {
+ //given a valid resource assignment
+ val resourceAssignmentWithNullValue = createResourceAssignmentForTest(null)
+
+ //and a list containing that resource assignment
+ val resourceAssignmentList = listOf<ResourceAssignment>(resourceAssignmentWithNullValue)
+
+ //when the values of the resources are evaluated
+ val outcome = ResourceAssignmentUtils.generateResourceDataForAssignments(resourceAssignmentList)
+
+ //then the assignment should produce a valid result
+ val expected = "{\n" + " \"pnf-id\" : \"\${pnf-id}\"\n" + "}"
+ assertEquals(expected, outcome, "unexpected outcome generated")
+
+ }
+
+ private fun createResourceAssignmentForTest(resourceValue: String?): ResourceAssignment {
+ val valueForTest = if (resourceValue == null) null else TextNode(resourceValue)
+ val resourceAssignmentForTest = ResourceAssignment().apply {
+ name = "pnf-id"
+ dictionaryName = "pnf-id"
+ dictionarySource = "input"
+ property = PropertyDefinition().apply {
+ type = "string"
+ value = valueForTest
+ }
+ }
+ return resourceAssignmentForTest
+ }
+} \ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
index a6bbc39d8..da4d9933f 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
@@ -56,6 +56,9 @@ open class BluePrintRestLibPropertyService(private var bluePrintProperties:
RestLibConstants.TYPE_BASIC_AUTH -> {
basicAuthRestClientProperties(prefix)
}
+ RestLibConstants.TYPE_TOKEN_AUTH -> {
+ tokenRestClientProperties(prefix)
+ }
RestLibConstants.TYPE_SSL_BASIC_AUTH -> {
sslBasicAuthRestClientProperties(prefix)
}
@@ -141,6 +144,12 @@ open class BluePrintRestLibPropertyService(private var bluePrintProperties:
}
}
+ private fun tokenRestClientProperties(prefix: String):
+ TokenAuthRestClientProperties {
+ return bluePrintProperties.propertyBeanType(
+ prefix, TokenAuthRestClientProperties::class.java)
+ }
+
private fun basicAuthRestClientProperties(prefix: String):
BasicAuthRestClientProperties {
return bluePrintProperties.propertyBeanType(
diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml
index 85d57b9fd..82c2e6153 100755
--- a/ms/blueprintsprocessor/parent/pom.xml
+++ b/ms/blueprintsprocessor/parent/pom.xml
@@ -379,6 +379,11 @@
</dependency>
<dependency>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
+ <artifactId>ansible-awx-executor</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>netconf-executor</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintImportService.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintImportService.kt
index a3e9cd103..5f6505309 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintImportService.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintImportService.kt
@@ -85,7 +85,7 @@ class BluePrintImportService(private val parentServiceTemplate: ServiceTemplate,
serviceTemplate = ServiceTemplateUtils.getServiceTemplate(importDefinition.file)
}
} catch (e: Exception) {
- throw BluePrintException("failed to populate service template for ${importDefinition.file}", e)
+ throw BluePrintException("failed to populate service template for ${importDefinition.file} original error: ${e.message}", e)
}
if (serviceTemplate == null) {
throw BluePrintException("failed to populate service template for : ${importDefinition.file}")
@@ -94,4 +94,4 @@ class BluePrintImportService(private val parentServiceTemplate: ServiceTemplate,
}
-} \ No newline at end of file
+}
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintVelocityTemplateService.kt b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintVelocityTemplateService.kt
index 496182ee7..43e6d221f 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintVelocityTemplateService.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintVelocityTemplateService.kt
@@ -82,4 +82,3 @@ object BluePrintVelocityTemplateService {
}
}
-
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateServiceTest.kt b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateServiceTest.kt
index 02505acad..6f961c8ed 100644
--- a/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateServiceTest.kt
+++ b/ms/controllerblueprints/modules/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateServiceTest.kt
@@ -26,6 +26,7 @@ import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.test.context.junit4.SpringRunner
import kotlin.test.BeforeTest
+import kotlin.test.assertEquals
import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
@@ -97,5 +98,39 @@ class BluePrintTemplateServiceTest {
assertNotNull(content, "failed to generate content for velocity template")
}
}
+
+ @Test
+ fun `no value variable should evaluate to default value - standalone template mesh test`() {
+ runBlocking {
+ val template = JacksonUtils.getClassPathFileContent("templates/default-variable-value-velocity-template.vtl")
+ val json = JacksonUtils.getClassPathFileContent("templates/default-variable-value-data.json")
+
+ val content = BluePrintVelocityTemplateService.generateContent(template, json)
+ //first line represents a variable whose value was successfully retrieved, second line contains a variable
+ // whose value could not be evaluated
+ val expected = "sample-hostname\n\${node0_backup_router_address}"
+ assertEquals(expected, content, "No value variable should use default value")
+ }
+ }
+
+ @Test
+ fun `no value variable should evaluate to default value - blueprint processing test`() {
+ runBlocking {
+ val bluePrintTemplateService = BluePrintTemplateService()
+
+ val templateFile = "templates/default-variable-value-velocity-template.vtl"
+ val jsonFile = "templates/default-variable-value-data.json"
+
+ val content = bluePrintTemplateService.generateContentFromFiles(templateFile,
+ BluePrintConstants.ARTIFACT_VELOCITY_TYPE_NAME, jsonFile, false, mutableMapOf())
+
+ //first line represents a variable whose value was successfully retrieved, second line contains a variable
+ // whose value could not be evaluated
+ val expected = "sample-hostname\n\${node0_backup_router_address}"
+ assertEquals(expected, content, "No value variable should use default value")
+ }
+
+ }
+
}
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/default-variable-value-data.json b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/default-variable-value-data.json
new file mode 100755
index 000000000..940ca8d73
--- /dev/null
+++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/default-variable-value-data.json
@@ -0,0 +1,3 @@
+{
+ "node0_hostname": "sample-hostname"
+}
diff --git a/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/default-variable-value-velocity-template.vtl b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/default-variable-value-velocity-template.vtl
new file mode 100755
index 000000000..ce2458e2e
--- /dev/null
+++ b/ms/controllerblueprints/modules/blueprint-core/src/test/resources/templates/default-variable-value-velocity-template.vtl
@@ -0,0 +1,2 @@
+$node0_hostname
+${node0_backup_router_address} \ No newline at end of file
diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnf-name.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnf-name.json
index 4c0320aca..bcfea9f24 100644
--- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnf-name.json
+++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnf-name.json
@@ -7,21 +7,41 @@
"type" : "string"
},
"sources" : {
- "primary-config-data" : {
- "type" : "source-rest",
- "properties" : {
- "type" : "JSON",
- "url-path" : "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-id/vnf-data/vnf-topology/vnf-parameters-data/param/vnf_name",
- "path" : "/param/0/value",
- "expression-type" : "JSON_POINTER",
- "input-key-mapping" : {
- "service-instance-id" : "service-instance-id",
- "vnf-id" : "vnf-id"
+ "primary-config-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "url-path": "config/GENERIC-RESOURCE-API:services/service/$service-instance-id/service-data/vnfs/vnf/$vnf-name/vnf-data/vnf-topology/vnf-parameters-data/param/vnf-name",
+ "path": "/param/0/value",
+ "input-key-mapping": {
+ "service-instance-id": "service-instance-id",
+ "vnf-name": "vnf-name"
},
- "output-key-mapping" : {
- "vnf-name" : "value"
+ "output-key-mapping": {
+ "vnf-name": "value"
},
- "key-dependencies" : [ "service-instance-id", "vnf-id" ]
+ "key-dependencies": [
+ "service-instance-id",
+ "vnf-name"
+ ]
+ }
+ },
+ "primary-aai-data": {
+ "type": "source-rest",
+ "properties": {
+ "type": "JSON",
+ "verb": "GET",
+ "url-path": "/aai/v14/network/generic-vnfs/generic-vnf/$vnf-id",
+ "path": "",
+ "input-key-mapping": {
+ "vnf-id": "vnf-id"
+ },
+ "output-key-mapping": {
+ "vnf-name": "vnf-name"
+ },
+ "key-dependencies": [
+ "vnf-id"
+ ]
}
}
}