summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.ts
blob: 624f9c7a85fcf275a424bfd19786c39216dae0e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
import { Component, OnDestroy, OnInit } from '@angular/core';
import { DesignerStore } from '../designer.store';
import { PackageCreationStore } from '../../package-creation/package-creation.store';
import { Subject } from 'rxjs';
import { distinctUntilChanged, takeUntil } from 'rxjs/operators';
import { CBAPackage } from '../../package-creation/mapping-models/CBAPacakge.model';
import { TemplateAndMapping } from '../../package-creation/template-mapping/TemplateAndMapping';
import { FunctionsStore } from '../functions.store';
import { NodeProcess, NodeTemplate } from '../model/desinger.nodeTemplate.model';

@Component({
    selector: 'app-functions-attribute',
    templateUrl: './functions-attribute.component.html',
    styleUrls: ['./functions-attribute.component.css']
})
export class FunctionsAttributeComponent implements OnInit, OnDestroy {

    ngUnsubscribe = new Subject();
    designerDashboardState: DecodeSuccessCallback;
    cbaPackage: CBAPackage;
    templateAndMappingMap = new Map<string, TemplateAndMapping>();
    selectedTemplates = new Map<string, TemplateAndMapping>();
    fileToDelete: string;
    requiredInputs = new Map<string, {}>();
    requiredOutputs = new Map<string, {}>();
    OptionalInputs = new Map<string, {}>();
    optionalOutputs = new Map<string, {}>();
    artifactPrefix = false;
    currentFuncion = new NodeProcess();
    nodeTemplates = new NodeTemplate('');

    constructor(
        private designerStore: DesignerStore,
        private packageCreationStore: PackageCreationStore,
        private functionStore: FunctionsStore
    ) {
    }

    ngOnInit() {
        this.designerStore.state$
            .pipe(
                distinctUntilChanged((a: any, b: any) => JSON.stringify(a) === JSON.stringify(b)),
                takeUntil(this.ngUnsubscribe))
            .subscribe(designerDashboardState => {
                this.designerDashboardState = designerDashboardState;
            });

        this.packageCreationStore.state$
            .subscribe(cbaPackage => {
                this.cbaPackage = cbaPackage;
                console.log('File name =>================== ');
                console.log(this.cbaPackage.templates.files);
                this.cbaPackage.templates.files.forEach((value, key) => {
                    console.log('File name => ' + key);
                    const templateAndMapping = new TemplateAndMapping();
                    templateAndMapping.isTemplate = true;
                    const isFromTemplate = true;
                    this.setIsMappingOrTemplate(key, templateAndMapping, isFromTemplate);
                });

                this.cbaPackage.mapping.files.forEach((value, key) => {
                    const templateAndMapping = new TemplateAndMapping();
                    templateAndMapping.isMapping = true;
                    const isFromTemplate = false;
                    this.setIsMappingOrTemplate(key, templateAndMapping, isFromTemplate);
                });
            });
        this.getNodeType('component-resource-resolution');

    }

    ngOnDestroy() {
        this.ngUnsubscribe.next();
        this.ngUnsubscribe.complete();
    }

    displayFunctionData() {
        this.selectedTemplates.forEach((value, key) => {
            console.log(key);
            console.log(value);

            if (value.isMapping) {
                this.nodeTemplates.artifacts[key + '-mapping'] = {
                    type: 'artifact-mapping-resource',
                    file: 'Templates/' + key + '-mapping.json'
                };
            }

            if (value.isTemplate) {
                this.nodeTemplates.artifacts[key + '-template'] = {
                    type: 'artifact-template-resource',
                    file: 'Templates/' + key + '-template.vtl'
                };
            }
        });
        this.nodeTemplates.interfaces = {
            ResourceResolutionComponent: {
                operations: {
                    process: {
                        ...this.currentFuncion
                    }
                }
            }
        };
        setTimeout(() => {
            console.log(this.currentFuncion);
            console.log(this.nodeTemplates);

        }, 1500);
    }
    // Template logic
    private setIsMappingOrTemplate(key: string, templateAndMapping: TemplateAndMapping, isFromTemplate: boolean) {
        const nameOfFile = isFromTemplate ?
            key.split('/')[1].split('.')[0].split('-template')[0]
            : key.split('/')[1].split('.')[0].split('-mapping')[0];
        // const fullName = nameOfFile + ',' + key.split('.');
        if (this.templateAndMappingMap.has(nameOfFile)) {
            const templateAndMappingExisted = this.templateAndMappingMap.get(nameOfFile);
            !isFromTemplate ? templateAndMappingExisted.isMapping = true : templateAndMappingExisted.isTemplate = true;
            this.templateAndMappingMap.set(nameOfFile, templateAndMappingExisted);
        } else {
            this.templateAndMappingMap.set(nameOfFile, templateAndMapping);
        }

    }

    addTemplates() { }
    setArtifact(predefined: boolean) {
        if (predefined) {

        } else {
            this.currentFuncion.inputs['artifact-prefix-names'] = { get_input: 'template-prefix' };
        }
    }
    addToInputs(optionalInput) {
        this.requiredInputs.set(optionalInput, this.OptionalInputs.get(optionalInput));
        this.OptionalInputs.delete(optionalInput);
    }

    setTemplate(file: string) {
        if (this.selectedTemplates.has(file)) {
            this.selectedTemplates.delete(file);
        } else {
            this.selectedTemplates.set(file, this.templateAndMappingMap.get(file));
        }
        console.log(this.selectedTemplates);
    }

    getKeys(map: Map<string, any>) {
        return Array.from(map.keys());
    }
    getValue(file: string, map: Map<string, any>) {
        return map.get(file);
    }

    getObjectKey(object) {
        // console.log(object);
        return Object.keys(object);
    }
    getObjectValue(object) {
        return Object.values(object);
    }
    getNodeType(nodeName: string) {
        this.functionStore.state$
            .subscribe(state => {
                console.log(state);
                const functions = state.serverFunctions;
                // tslint:disable-next-line: prefer-for-of
                for (let i = 0; i < functions.length; i++) {
                    if (functions[i].modelName === nodeName) {
                        // tslint:disable: no-string-literal
                        console.log(functions[i].definition['interfaces']);
                        this.getInputFields(functions[i].definition['interfaces'], 'ResourceResolutionComponent', 'inputs');
                        this.getInputFields(functions[i].definition['interfaces'], 'ResourceResolutionComponent', 'outputs');
                        break;
                    }
                }
            });
    }

    getInputFields(interfaces, nodeName, type) {
        console.log(interfaces[nodeName]['operations']['process'][type]);
        const fields = interfaces[nodeName]['operations']['process'][type];

        for (const [key, value] of Object.entries(fields)) {
            if (key === 'artifact-prefix-names') {
                this.artifactPrefix = true;
            } else if (value['required']) {
                console.log('This field is required = ' + key);
                if (type === 'inputs') {
                    this.requiredInputs.set(key, Object.assign({}, value));
                } else {
                    this.requiredOutputs.set(key, Object.assign({}, value));
                }
            } else {
                console.log('This field is Optional ' + key);
                if (type === 'inputs') {
                    this.OptionalInputs.set(key, Object.assign({}, value));
                } else {
                    this.optionalOutputs.set(key, Object.assign({}, value));
                }
            }
        }

        // console.log(this.requiredOutputs);
    }


}
class="p">: { "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/image_name", "path" : "/param/0/value", "input-key-mapping" : { "service-instance-id" : "service-instance-id", "vnf-id" : "vnf-id" }, "output-key-mapping" : { "image_name" : "value" }, "key-dependencies" : [ "service-instance-id", "vnf-id" ] } } } }, "key_name" : { "tags" : "key_name", "name" : "key_name", "property" : { "description" : "key_name", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input" }, "sdnc" : { "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/key_name", "path" : "/param/0/value", "input-key-mapping" : { "service-instance-id" : "service-instance-id", "vnf-id" : "vnf-id" }, "output-key-mapping" : { "key_name" : "value" }, "key-dependencies" : [ "service-instance-id", "vnf-id" ] } } } }, "nexus_artifact_repo" : { "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" : { } }, "sdnc" : { "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" ] } } } }, "nf-role" : { "tags" : "nf-role", "name" : "nf-role", "property" : { "description" : "vnf/nf-role", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "default" : { "type" : "source-default", "properties" : { } }, "processor-db" : { "type" : "source-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.VF_MODEL.nf_role as vf_model_role from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnfmodelcustomizationuuid", "input-key-mapping" : { "vnfmodelcustomizationuuid" : "vnf-model-customization-uuid" }, "output-key-mapping" : { "nf-role" : "vf_model_role" }, "key-dependencies" : [ "vnf-model-customization-uuid" ] } } } }, "nfc-naming-code" : { "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-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" ] } } } }, "onap_private_net_cidr" : { "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" : { } }, "sdnc" : { "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-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" } } } } }, "onap_private_net_id" : { "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" : { } }, "sdnc" : { "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" ] } } } }, "onap_private_subnet_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" : { } }, "sdnc" : { "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" ] } } } }, "private-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-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" } } } } }, "protected-prefix-id" : { "tags" : "protected-prefix-id", "name" : "protected-prefix-id", "property" : { "description" : "protected-prefix-id", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "processor-db" : { "type" : "source-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"protected\"", "output-key-mapping" : { "protected-prefix-id" : "prefix_id" } } } } }, "protected_private_net_cidr" : { "tags" : "protected_private_net_cidr", "name" : "protected_private_net_cidr", "property" : { "description" : "protected_private_net_cidr", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "processor-db" : { "type" : "source-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"protected\"", "output-key-mapping" : { "protected_private_net_cidr" : "prefix" } } } } }, "pub_key" : { "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" : { } }, "sdnc" : { "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" ] } } } }, "public_net_id" : { "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" : { } }, "sdnc" : { "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" ] } } } }, "sec_group" : { "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" : { } }, "sdnc" : { "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" ] } } } }, "service-instance-id" : { "tags" : "service-instance-id, tosca.datatypes.Root, data_type", "name" : "service-instance-id", "property" : { "description" : "To be provided", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } }, "any-db" : { "type" : "source-db", "properties" : { "query" : "SELECT artifact_name FROM BLUEPRINT_MODEL where artifact_version=\"1.0.0\"", "input-key-mapping" : { }, "output-key-mapping" : { "service-instance-id" : "artifact_name" } } }, "processor-db" : { "type" : "source-db", "properties" : { "query" : "SELECT artifact_name FROM BLUEPRINT_MODEL where artifact_version=\"1.0.0\"", "input-key-mapping" : { }, "output-key-mapping" : { "service-instance-id" : "artifact_name" } } }, "capability" : { "type" : "source-capability", "properties" : { "script-type" : "jython", "script-class-reference" : "SampleRAProcessor", "instance-dependencies" : [ ] } } } }, "unprotected-prefix-id" : { "tags" : "unprotected-prefix-id", "name" : "unprotected-prefix-id", "property" : { "description" : "unprotected-prefix-id", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "processor-db" : { "type" : "source-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = \"unprotected\"", "output-key-mapping" : { "unprotected-prefix-id" : "prefix_id" } } } } }, "unprotected_private_net_cidr" : { "tags" : "unprotected_private_net_cidr", "name" : "unprotected_private_net_cidr", "property" : { "description" : "unprotected_private_net_cidr", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "processor-db" : { "type" : "source-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = \"unprotected\"", "output-key-mapping" : { "unprotected_private_net_cidr" : "prefix" } } } } }, "vf-module-id" : { "tags" : "vf-module-id", "name" : "vf-module-id", "property" : { "description" : "vf-module-id", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } } } }, "vf-module-label" : { "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-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" ] } } } }, "vf-module-model-customization-uuid" : { "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" : { } } } }, "vf-module-type" : { "tags" : "vf-module-type", "name" : "vf-module-type", "property" : { "description" : "vf-module-type", "type" : "string" }, "updated-by" : "adetalhouet", "sources" : { "processor-db" : { "type" : "source-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.demo.value as value from sdnctl.demo where sdnctl.demo.id=:vfmoduleid", "input-key-mapping" : { "vfmoduleid" : "vf-module-number" }, "output-key-mapping" : { "vf-module-type" : "value" }, "key-dependencies" : [ "vf-module-number" ] } } } }, "vf-naming-policy" : { "tags" : "vf-naming-policy", "name" : "vf-naming-policy", "property" : { "description" : "vf-naming-policy", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "default" : { "type" : "source-default", "properties" : { } }, "processor-db" : { "type" : "source-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.VF_MODEL.naming_policy as vf_naming_policy from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnf_model_customization_uuid", "input-key-mapping" : { "vnf_model_customization_uuid" : "vnf-model-customization-uuid" }, "output-key-mapping" : { "vf-naming-policy" : "vf_naming_policy" }, "key-dependencies" : [ "vnf-model-customization-uuid" ] } } } }, "vf-nf-code" : { "tags" : "vf-nf-code", "name" : "vf-nf-code", "property" : { "description" : "vf-nf-code", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "processor-db" : { "type" : "source-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.VF_MODEL.nf_code as vf_nf_code from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:customizationid", "input-key-mapping" : { "customizationid" : "vnf-model-customization-uuid" }, "output-key-mapping" : { "vf-nf-code" : "vf_nf_code" }, "key-dependencies" : [ "vnf-model-customization-uuid" ] } } } }, "vf_module_name" : { "tags" : "vf_module_name", "name" : "vf_module_name", "property" : { "description" : "vf_module_name", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } } } }, "vfccustomizationuuid" : { "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-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" ] } } } }, "vfw_name_0" : { "tags" : "vfw_name_0", "name" : "vfw_name_0", "property" : { "description" : "vfw_name_0", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } } } }, "vfw_private_ip_0" : { "tags" : "vfw_private_ip_0", "name" : "vfw_private_ip_0", "property" : { "description" : "vfw_private_ip_0", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } }, "sdnc" : { "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/vfw_private_ip_0", "path" : "/param/0/value", "expression-type" : "JSON_POINTER", "input-key-mapping" : { "service-instance-id" : "service-instance-id", "vnf-id" : "vnf-id" }, "output-key-mapping" : { "vfw_private_ip_0" : "value" }, "key-dependencies" : [ "service-instance-id", "vnf-id" ] } } } }, "vfw_private_ip_1" : { "tags" : "vfw_private_ip_1", "name" : "vfw_private_ip_1", "property" : { "description" : "vfw_private_ip_1", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } }, "sdnc" : { "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/vfw_private_ip_1", "path" : "/param/0/value", "expression-type" : "JSON_POINTER", "input-key-mapping" : { "service-instance-id" : "service-instance-id", "vnf-id" : "vnf-id" }, "output-key-mapping" : { "vfw_private_ip_1" : "value" }, "key-dependencies" : [ "service-instance-id", "vnf-id" ] } } } }, "vfw_private_ip_2" : { "tags" : "vfw_private_ip_2", "name" : "vfw_private_ip_2", "property" : { "description" : "vfw_private_ip_2", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input" } } }, "vm-type" : { "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-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" ] } } } }, "vnf-id" : { "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" : { } }, "sdnc" : { "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" ] } } } }, "vnf-model-customization-uuid" : { "tags" : "vnf-model-customization-uuid", "name" : "vnf-model-customization-uuid", "property" : { "description" : "vnf-model-customization-uuid", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } } } }, "vnf-name" : { "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" : { } }, "sdnc" : { "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" ] } }, "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" ] } } } }, "vnf_name" : { "tags" : "vnf_name", "name" : "vnf_name", "property" : { "description" : "vnf_name", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "default" : { "type" : "source-default", "properties" : { } }, "input" : { "type" : "source-input", "properties" : { } }, "sdnc" : { "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", "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" ] } } } }, "vnfc-model-invariant-uuid" : { "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-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" ] } } } }, "vnfc-model-version" : { "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-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" ] } } } }, "vpg_name_0" : { "tags" : "vpg_name_0", "name" : "vpg_name_0", "property" : { "description" : "vpg_name_0", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } } } }, "vpg_private_ip_0" : { "tags" : "vpg_private_ip_0", "name" : "vpg_private_ip_0", "property" : { "description" : "vpg_private_ip_0", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } }, "sdnc" : { "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_private_ip_0", "path" : "/param/0/value", "expression-type" : "JSON_POINTER", "input-key-mapping" : { "service-instance-id" : "service-instance-id", "vnf-id" : "vnf-id" }, "output-key-mapping" : { "vpg_private_ip_0" : "value" }, "key-dependencies" : [ "service-instance-id", "vnf-id" ] } } } }, "vpg_private_ip_1" : { "tags" : "vpg_private_ip_1", "name" : "vpg_private_ip_1", "property" : { "description" : "vpg_private_ip_1", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } } } }, "vsn_name_0" : { "tags" : "vsn_name_0", "name" : "vsn_name_0", "property" : { "description" : "vsn_name_0", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } } } }, "vsn_private_ip_0" : { "tags" : "vsn_private_ip_0", "name" : "vsn_private_ip_0", "property" : { "description" : "vsn_private_ip_0", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input", "properties" : { } }, "sdnc" : { "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/vsn_private_ip_0", "path" : "/param/0/value", "expression-type" : "JSON_POINTER", "input-key-mapping" : { "service-instance-id" : "service-instance-id", "vnf-id" : "vnf-id" }, "output-key-mapping" : { "vsn_private_ip_0" : "value" }, "key-dependencies" : [ "service-instance-id", "vnf-id" ] } } } }, "vsn_private_ip_1" : { "tags" : "vsn_private_ip_1", "name" : "vsn_private_ip_1", "property" : { "description" : "vsn_private_ip_1", "type" : "string" }, "updated-by" : "Singal, Kapil <ks220y@att.com>", "sources" : { "input" : { "type" : "source-input" } } } }