Migrate "ms/blueprintsprocess" from ccsdk/apps
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Fri, 22 Mar 2019 18:03:50 +0000 (11:03 -0700)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Fri, 22 Mar 2019 18:04:20 +0000 (11:04 -0700)
Migrate code from ccsdk/apps ms/blueprintsprocess
subfolder into ccsdk/cds

Issue-ID: CIMAN-245
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
466 files changed:
.gitignore [new file with mode: 0644]
.gitreview [new file with mode: 0644]
INFO.yaml [new file with mode: 0644]
TagVersion.groovy [new file with mode: 0644]
cds-ui/.dockerignore [new file with mode: 0644]
cds-ui/Dockerfile [new file with mode: 0644]
cds-ui/client/.editorconfig [new file with mode: 0644]
cds-ui/client/LICENSE.txt [new file with mode: 0644]
cds-ui/client/README.md [new file with mode: 0644]
cds-ui/client/angular.json [new file with mode: 0644]
cds-ui/client/package.json [new file with mode: 0644]
cds-ui/client/pom.xml [new file with mode: 0644]
cds-ui/client/src/app/app-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/app.component.html [new file with mode: 0644]
cds-ui/client/src/app/app.component.scss [new file with mode: 0644]
cds-ui/client/src/app/app.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/app.component.ts [new file with mode: 0644]
cds-ui/client/src/app/app.module.ts [new file with mode: 0644]
cds-ui/client/src/app/common/constants/app-constants.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/README.md [new file with mode: 0644]
cds-ui/client/src/app/common/core/core.module.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/services/api.service.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/README.md [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/actions/blueprint.action.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/actions/resources.action.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/effects/blueprint.effects.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/effects/resources.effects.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/blueprint-http.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/blueprint.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/blueprintState.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/entrySchema.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/imports.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/itopologytemplate.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/metadata.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/propertyData.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/resources-http.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/resources.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/resourcesState.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/models/sourcesData.model.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/reducers/app.reducer.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/reducers/blueprint.reducer.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/reducers/resources.reducer.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/selectors/blueprint.selectors.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/selectors/resources.selectors.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/state/app.state.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/state/blueprint.state.ts [new file with mode: 0644]
cds-ui/client/src/app/common/core/store/state/resources.state.ts [new file with mode: 0644]
cds-ui/client/src/app/common/modules/README.md [new file with mode: 0644]
cds-ui/client/src/app/common/modules/app-material.module.ts [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/header/header.component.html [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/header/header.component.scss [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/header/header.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/header/header.component.ts [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/home/home.component.html [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/home/home.component.scss [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/home/home.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/common/shared/components/home/home.component.ts [new file with mode: 0644]
cds-ui/client/src/app/common/shared/directives/README.md [new file with mode: 0644]
cds-ui/client/src/app/common/shared/pipes/README.md [new file with mode: 0644]
cds-ui/client/src/app/common/shared/pipes/search.pipe.ts [new file with mode: 0644]
cds-ui/client/src/app/common/shared/shared.module.ts [new file with mode: 0644]
cds-ui/client/src/app/common/utility/README.md [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/blueprint-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/blueprint.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/README.md [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-definition-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit-routing.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.html [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.scss [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.spec.ts [new file with mode: 0644]
cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts [new file with mode: 0644]
cds-ui/client/src/assets/.gitkeep [new file with mode: 0644]
cds-ui/client/src/assets/activation-blueprint.json [new file with mode: 0644]
cds-ui/client/src/assets/sample-licenses.json [new file with mode: 0644]
cds-ui/client/src/browserslist [new file with mode: 0644]
cds-ui/client/src/environments/environment.dev.ts [new file with mode: 0644]
cds-ui/client/src/environments/environment.prod.ts [new file with mode: 0644]
cds-ui/client/src/environments/environment.ts [new file with mode: 0644]
cds-ui/client/src/index.html [new file with mode: 0644]
cds-ui/client/src/karma.conf.js [new file with mode: 0644]
cds-ui/client/src/main.ts [new file with mode: 0644]
cds-ui/client/src/polyfills.ts [new file with mode: 0644]
cds-ui/client/src/styles.scss [new file with mode: 0644]
cds-ui/client/src/tsconfig.app.json [new file with mode: 0644]
cds-ui/client/src/tsconfig.spec.json [new file with mode: 0644]
cds-ui/client/src/tslint.json [new file with mode: 0644]
cds-ui/client/tsconfig.json [new file with mode: 0644]
cds-ui/common/README.md [new file with mode: 0644]
cds-ui/server/.npmrc [new file with mode: 0644]
cds-ui/server/.prettierignore [new file with mode: 0644]
cds-ui/server/.prettierrc [new file with mode: 0644]
cds-ui/server/.yo-rc.json [new file with mode: 0644]
cds-ui/server/README.md [new file with mode: 0644]
cds-ui/server/index.js [new file with mode: 0644]
cds-ui/server/index.ts [new file with mode: 0644]
cds-ui/server/package.json [new file with mode: 0644]
cds-ui/server/pom.xml [new file with mode: 0644]
cds-ui/server/public/index.html [new file with mode: 0644]
cds-ui/server/src/application.ts [new file with mode: 0644]
cds-ui/server/src/controllers/README.md [new file with mode: 0644]
cds-ui/server/src/controllers/blueprint-rest.controller.ts [new file with mode: 0644]
cds-ui/server/src/controllers/index.ts [new file with mode: 0644]
cds-ui/server/src/controllers/ping.controller.ts [new file with mode: 0644]
cds-ui/server/src/datasources/README.md [new file with mode: 0644]
cds-ui/server/src/datasources/db.datasource.json [new file with mode: 0644]
cds-ui/server/src/datasources/db.datasource.ts [new file with mode: 0644]
cds-ui/server/src/datasources/index.ts [new file with mode: 0644]
cds-ui/server/src/datasources/rest.config.json [new file with mode: 0644]
cds-ui/server/src/datasources/rest.datasource.ts [new file with mode: 0644]
cds-ui/server/src/index.ts [new file with mode: 0644]
cds-ui/server/src/migrate.ts [new file with mode: 0644]
cds-ui/server/src/models/README.md [new file with mode: 0644]
cds-ui/server/src/models/blueprint.model.ts [new file with mode: 0644]
cds-ui/server/src/models/index.ts [new file with mode: 0644]
cds-ui/server/src/repositories/README.md [new file with mode: 0644]
cds-ui/server/src/repositories/blueprint.repository.ts [new file with mode: 0644]
cds-ui/server/src/repositories/index.ts [new file with mode: 0644]
cds-ui/server/src/sequence.ts [new file with mode: 0644]
cds-ui/server/src/services/rest.service.ts [new file with mode: 0644]
cds-ui/server/tsconfig.json [new file with mode: 0644]
cds-ui/server/tslint.build.json [new file with mode: 0644]
cds-ui/server/tslint.json [new file with mode: 0644]
components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json [new file with mode: 0644]
components/model-catalog/blueprint-model/service-blueprint/vFW/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base_template.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vFW_vNF_Artifact.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/artifact_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/baseconfig-mapping.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/data_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/hostname-mapping.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/policy_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/relationship_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-db.properties [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-rest.properties [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Plans/CONFIG_ActivateNetconf_1.0.0.xml [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Plans/CONFIG_AssignActivateNetconf_1.0.0.xml [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Plans/CONFIG_ResourceAssignment_1.0.0.xml [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/kotlin/ResourceAssignmentProcessor.cba.kts [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/kotlin/ScriptComponent.cba.kts [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/NetconfRpcExample.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SamplePythonComponentNode.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SampleRAProcessor.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/__init__.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Templates/baseconfig-template.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Templates/hostname-template.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/activation-blueprint.json [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/artifact_types.json [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/baseconfig-mapping.json [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/data_types.json [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/node_types.json [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/policy_types.json [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/relationship_types.json [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/resources_definition_types.json [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Plans/CONFIG_AssignActivateNetconf_1.0.0.xml [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/kotlin/ResourceAssignmentProcessor.cba.kts [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/kotlin/ScriptComponent.cba.kts [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/DefaultGetNetConfig.py [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SampleRAProcessor.py [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/TOSCA-Metadata/TOSCA.meta [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_python/Templates/baseconfig-template.vtl [new file with mode: 0755]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/artifact_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-assign-pnf-mapping.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/policy_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/relationship_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configAssign.xml [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configDeploy.xml [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-restconf-configlet-template.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/activation-blueprint.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/artifact_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/data_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/node_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/policy_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/relationship_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/resources_definition_types.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Plans/ConfigDeploy.xml [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Plans/ResourceAssignment.xml [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Plans/Rollback.xml [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/README [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/NetconfRpcExample.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/Rollback.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/__init__.py [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/TOSCA-Metadata/TOSCA.meta [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Templates/hostname-mapping.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Templates/hostname-template.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Templates/junos-rollback-RPC-mapping.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Templates/junos-rollback-RPC-template.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vf-module-1-mapping.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vf-module-1-template.vtl [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vfw-interface-mapping.json [new file with mode: 0644]
components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vfw-interface-template.vtl [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/artifact_type/artifact-bpmn-camunda.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/artifact_type/artifact-dictionary-resource.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/artifact_type/artifact-directed-graph.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/artifact_type/artifact-mapping-resource.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/artifact_type/artifact-script-jython.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/artifact_type/artifact-script-kotlin.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/artifact_type/artifact-script-python.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/artifact_type/artifact-template-velocity.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/artifact_type/tosca.artifacts.Implementation.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/data_type/datatype-property.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/data_type/datatype-resource-assignment.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/data_type/dt-license-key.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/data_type/dt-netbox-ip.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/data_type/dt-v4-aggregate.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/data_type/tosca.datatypes.Credential.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/artifact-config-template.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/component-config-generator.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/component-jython-executor.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/component-netconf-executor.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/component-resource-resolution.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/component-restconf-executor.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/dg-generic.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/source-capability.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/source-default.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/source-input.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/source-rest.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Artifact.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Component.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.DG.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.ResourceSource.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Vnf.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Jython.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Kotlin.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Python.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/node_type/vnf-netconf-device.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.AttachesTo.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.ConnectsTo.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.DependsOn.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.HostedOn.json [new file with mode: 0644]
components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.RoutesTo.json [new file with mode: 0644]
components/model-catalog/proto-definition/pom.xml [new file with mode: 0644]
components/model-catalog/proto-definition/proto/BluePrintCommon.proto [new file with mode: 0644]
components/model-catalog/proto-definition/proto/BluePrintManagement.proto [new file with mode: 0644]
components/model-catalog/proto-definition/proto/BluePrintProcessing.proto [new file with mode: 0644]
components/model-catalog/proto-definition/src/main/README.md [new file with mode: 0644]
components/model-catalog/proto-definition/src/test/README.md [new file with mode: 0644]
components/model-catalog/resource-dictionary/starter-dictionary/address.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/aic-cloud-region.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/aic_clli.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/availability_zone_0.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/default-source.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/entity.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/hostname.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/image_name.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/input-source.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/key_name.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/mdsal-source.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/name_0.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/nexus_artifact_repo.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/nf-role.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/nfc-naming-code.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_cidr.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/onap_private_net_id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/onap_private_subnet_id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/pnf-id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/pnf-name.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/primary-db-source.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/starter-dictionary/private-prefix-id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/protected-prefix-id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/protected_private_net_cidr.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/protected_private_subnet_id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/pub_key.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/public_net_id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/sample-default-source.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/starter-dictionary/sample-input-source.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/starter-dictionary/sample-licenses.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/starter-dictionary/sample-mdsal-source.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/starter-dictionary/sample-primary-db-source.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/starter-dictionary/sample-v4-ip-type.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/starter-dictionary/sec_group.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/status.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/unprotected-prefix-id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_net_cidr.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_subnet_id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vf-module-id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vf-module-label.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vf-module-model-customization-uuid.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vf-module-type.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vf-naming-policy.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vf-nf-code.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vf_module_name.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vfccustomizationuuid.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vfw_name_0.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_0.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_1.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_2.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vnf-id.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vnf-model-customization-uuid.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vnf-name.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vnf_name.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-invariant-uuid.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vnfc-model-version.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/volume-name.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/volume_group_name.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vpg_name_0.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_0.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_1.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vsn_name_0.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_0.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_1.json [new file with mode: 0755]
components/model-catalog/resource-dictionary/test-dictionary/create_netbox_ip.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/test-dictionary/delete_netbox_ip.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/test-dictionary/hostname.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/test-dictionary/interface-description.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/test-dictionary/interface-name.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/test-dictionary/prefix-id.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/test-dictionary/unit-number.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/test-dictionary/vf-module-number.json [new file with mode: 0644]
components/model-catalog/resource-dictionary/test-dictionary/vf-module-type.json [new file with mode: 0644]
components/parent/pom.xml [new file with mode: 0644]
components/pom.xml [new file with mode: 0644]
components/scripts/python/ccsdk_blueprints/__init__.py [new file with mode: 0644]
components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py [new file with mode: 0644]
components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py [new file with mode: 0644]
components/scripts/python/ccsdk_blueprints/blueprint_constants.py [new file with mode: 0644]
components/scripts/python/ccsdk_blueprints/blueprint_runtime_service.py [new file with mode: 0644]
components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py [new file with mode: 0644]
components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py [new file with mode: 0644]
components/scripts/python/ccsdk_netconf/__init__.py [new file with mode: 0644]
components/scripts/python/ccsdk_netconf/common.py [new file with mode: 0644]
components/scripts/python/ccsdk_netconf/netconf_constant.py [new file with mode: 0644]
components/scripts/python/ccsdk_netconf/netconfclient.py [new file with mode: 0644]
docs/CBA/CDS_Architecture_Design.pptx [new file with mode: 0644]
docs/CBA/index.rst [new file with mode: 0644]
docs/CBA/media/CDS_architecture.jpg [new file with mode: 0644]
docs/CBA/media/image0.PNG [new file with mode: 0644]
docs/CBA/media/image0.jpg [new file with mode: 0644]
docs/CBA/media/image1.PNG [new file with mode: 0644]
docs/CBA/media/image1.jpg [new file with mode: 0644]
docs/CBA/media/image2.PNG [new file with mode: 0644]
docs/CBA/media/image2.jpg [new file with mode: 0644]
docs/CBA/resourceassignment.rst [new file with mode: 0644]
docs/datadictionary/index.rst [new file with mode: 0644]
docs/index.rst [new file with mode: 0644]
docs/logging.rst [new file with mode: 0644]
docs/release-notes.rst [new file with mode: 0644]
pom.xml [new file with mode: 0644]
version.properties [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..398da37
--- /dev/null
@@ -0,0 +1,82 @@
+# Node.js
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+node_modules/
+jspm_packages/
+dist/
+
+# TypeScript v1 declaration files
+typings/
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variables file
+.env
+.env.test
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+
+# next.js build output
+.next
+
+# nuxt.js build output
+.nuxt
+
+# vuepress build output
+.vuepress/dist
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
diff --git a/.gitreview b/.gitreview
new file mode 100644 (file)
index 0000000..70f5665
--- /dev/null
@@ -0,0 +1,4 @@
+[gerrit]
+host=gerrit.onap.org
+port=29418
+project=ccsdk/cds.git
diff --git a/INFO.yaml b/INFO.yaml
new file mode 100644 (file)
index 0000000..080086d
--- /dev/null
+++ b/INFO.yaml
@@ -0,0 +1,71 @@
+---
+project: 'ccsdk-cds'
+project_creation_date: '2018-07-16'
+lifecycle_state: 'Incubation'
+project_category: ''
+project_lead: &onap_releng_ptl
+    name: 'Dan Timoney'
+    email: 'dtimoney@att.com'
+    id: 'djtimoney'
+    company: 'ATT'
+    timezone: 'America/New York'
+primary_contact: *onap_releng_ptl
+issue_tracking:
+    type: 'jira'
+    url: 'https://jira.onap.org/projects/CCSDK'
+    key: 'CCDSK'
+mailing_list:
+    type: 'groups.io'
+    url: 'lists.onap.org'
+    tag: '<[sub-project_name]>'
+realtime_discussion: ''
+meetings:
+    - type: 'zoom'
+      agenda: 'https://wiki.onap.org/display/DW/Common+Controller+SDK+Project'
+      url: 'https://wiki.onap.org/display/DW/Common+Controller+SDK+Project#CommonControllerSDKProject-MeetingMinutes'
+      server: 'n/a'
+      channel: 'n/a'
+      repeats: 'weekly'
+      time: '13:00 UTC'
+committers:
+    - <<: *onap_releng_ptl
+    - name: 'Jack Lucas'
+      email: 'jflucas@research.att.com'
+      company: 'ATT'
+      id: 'jackl'
+      timezone: 'America/New York'
+    - name: 'Jun (Nicolas) Hu'
+      email: 'jh245g@att.com'
+      company: 'ATT'
+      id: 'jh245g'
+      timezone: 'America/New York'
+    - name: 'Gaurav Agrawal'
+      email: 'gaurav.agrawal@huawei.com'
+      company: 'Huawei'
+      id: 'agrawalgaurav'
+      timezone: 'Asia/Kolkata'
+repositories:
+    - ccsdk-apps
+    - ccsdk-cds
+    - ccsdk-distribution
+    - ccsdk-features
+    - ccsdk-parent
+    - ccsdk-platform-blueprints
+    - ccsdk-platform-plugins
+    - ccsdk-sli-adaptors
+    - ccsdk-sli-core
+    - ccsdk-sli-northbound
+    - ccsdk-sli-plugins
+    - ccsdk-storage-esaas
+    - ccsdk-utils
+tsc:
+    approval: 'https://lists.onap.org/pipermail/onap-tsc'
+    changes:
+        - type: 'Deletion'
+          name: 'Ryan Goulding'
+          link: 'https://lists.onap.org/g/onap-tsc/message/4261'
+    changes:
+        - type: 'Addition'
+          name: 'Gaurav Agrawal'
+          link: 'https://lists.onap.org/g/onap-tsc/message/4324'
+
diff --git a/TagVersion.groovy b/TagVersion.groovy
new file mode 100644 (file)
index 0000000..68a8b78
--- /dev/null
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CCSDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ *                             reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ *
+ */
+
+package org.onap.ccsdk.distribution
+
+
+def versionArray;
+if ( project.properties['ccsdk.project.version'] != null ) {
+       versionArray = project.properties['ccsdk.project.version'].split('\\.');
+}
+
+if ( project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT") ) {
+       patchArray = versionArray[2].split('-');
+       project.properties['project.docker.latestminortag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest";
+       project.properties['project.docker.latestfulltag.version']=versionArray[0] + '.' + versionArray[1] + '.' + patchArray[0] + "-SNAPSHOT-latest";
+       project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + '.' + patchArray[0] + "-SNAPSHOT-"+project.properties['ccsdk.build.timestamp'];
+} else {
+       project.properties['project.docker.latestminortag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+       project.properties['project.docker.latestfulltag.version']=versionArray[0] + '.' + versionArray[1] + '.' + versionArray[2] + "-STAGING-latest";
+       project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + '.' + versionArray[2] + "-STAGING-"+project.properties['ccsdk.build.timestamp'];
+}
diff --git a/cds-ui/.dockerignore b/cds-ui/.dockerignore
new file mode 100644 (file)
index 0000000..00137e3
--- /dev/null
@@ -0,0 +1,85 @@
+# editor config
+.editorconfig
+
+# Node.js
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+client/node_modules/
+client/jspm_packages/
+client/dist/
+
+# TypeScript v1 declaration files
+typings/
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variables file
+.env
+.env.test
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+
+# next.js build output
+.next
+
+# nuxt.js build output
+.nuxt
+
+# vuepress build output
+.vuepress/dist
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
diff --git a/cds-ui/Dockerfile b/cds-ui/Dockerfile
new file mode 100644 (file)
index 0000000..5bf65f4
--- /dev/null
@@ -0,0 +1,35 @@
+# Building client html and js files
+FROM alpine:3.8 as builder
+
+RUN apk add --no-cache npm
+
+WORKDIR /opt/cds-ui/client/
+
+COPY client/package.json /opt/cds-ui/client/
+
+RUN npm install
+
+COPY client /opt/cds-ui/client/
+
+RUN npm run build
+
+
+# Building and creating server
+FROM alpine:3.8
+
+WORKDIR /opt/cds-ui/
+
+RUN apk add --no-cache npm
+
+COPY server/package.json /opt/cds-ui/
+
+RUN npm install
+
+COPY server /opt/cds-ui/
+COPY --from=builder /opt/cds-ui/server/public /opt/cds-ui/public
+
+RUN npm run build
+
+EXPOSE 3000
+
+CMD [ "npm", "start" ]
diff --git a/cds-ui/client/.editorconfig b/cds-ui/client/.editorconfig
new file mode 100644 (file)
index 0000000..e89330a
--- /dev/null
@@ -0,0 +1,13 @@
+# Editor configuration, see https://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false
diff --git a/cds-ui/client/LICENSE.txt b/cds-ui/client/LICENSE.txt
new file mode 100644 (file)
index 0000000..b498ede
--- /dev/null
@@ -0,0 +1,20 @@
+============LICENSE_START==========================================
+ONAP : CCSDK-CDS
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+============LICENSE_END============================================
diff --git a/cds-ui/client/README.md b/cds-ui/client/README.md
new file mode 100644 (file)
index 0000000..8af8748
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+# CdsUi
+
+This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.1.0.
+
+## Development server
+
+Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
+
+## Code scaffolding
+
+Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
+
+## Build
+
+Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
+
+## Running unit tests
+
+Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Running end-to-end tests
+
+Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
+
+## Further help
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
diff --git a/cds-ui/client/angular.json b/cds-ui/client/angular.json
new file mode 100644 (file)
index 0000000..96b4df0
--- /dev/null
@@ -0,0 +1,149 @@
+{
+    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+    "version": 1,
+    "newProjectRoot": "projects",
+    "projects": {
+        "cds-ui": {
+            "root": "",
+            "sourceRoot": "src",
+            "projectType": "application",
+            "prefix": "app",
+            "schematics": {
+                "@schematics/angular:component": {
+                    "styleext": "scss"
+                }
+            },
+            "architect": {
+                "build": {
+                    "builder": "@angular-devkit/build-angular:browser",
+                    "options": {
+                        "outputPath": "../server/public",
+                        "index": "src/index.html",
+                        "main": "src/main.ts",
+                        "polyfills": "src/polyfills.ts",
+                        "tsConfig": "src/tsconfig.app.json",
+                        "assets": [
+                            "src/favicon.ico",
+                            "src/assets"
+                        ],
+                        "styles": [
+                            "src/styles.scss",
+                            "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
+                            "./node_modules/material-design-icons/iconfont/material-icons.css",
+                            "./node_modules/font-awesome/css/font-awesome.css"
+                        ],
+                        "scripts": [
+                            "./node_modules/ace-builds/src-min/ace.js",
+                            "./node_modules/ace-builds/src-min/theme-eclipse.js",
+                            "./node_modules/ace-builds/src-min/mode-json.js",
+                            "./node_modules/ace-builds/src-min/mode-javascript.js",
+                            "./node_modules/ace-builds/src-min/mode-python.js",
+                            "./node_modules/ace-builds/src-min/mode-xml.js",
+                            "./node_modules/ace-builds/src-min/mode-kotlin.js",
+                            "./node_modules/ace-builds/src-min/mode-text.js",
+                            "./node_modules/ace-builds/src-min/mode-velocity.js",
+                            "./node_modules/ace-builds/src-min/mode-yaml.js"
+                        ]
+                    },
+                    "configurations": {
+                        "production": {
+                            "fileReplacements": [{
+                                "replace": "src/environments/environment.ts",
+                                "with": "src/environments/environment.prod.ts"
+                            }],
+                            "optimization": true,
+                            "outputHashing": "all",
+                            "sourceMap": false,
+                            "extractCss": true,
+                            "namedChunks": false,
+                            "aot": true,
+                            "extractLicenses": true,
+                            "vendorChunk": false,
+                            "buildOptimizer": true,
+                            "budgets": [{
+                                "type": "initial",
+                                "maximumWarning": "2mb",
+                                "maximumError": "5mb"
+                            }]
+                        }
+                    }
+                },
+                "serve": {
+                    "builder": "@angular-devkit/build-angular:dev-server",
+                    "options": {
+                        "browserTarget": "cds-ui:build"
+                    },
+                    "configurations": {
+                        "production": {
+                            "browserTarget": "cds-ui:build:production"
+                        }
+                    }
+                },
+                "extract-i18n": {
+                    "builder": "@angular-devkit/build-angular:extract-i18n",
+                    "options": {
+                        "browserTarget": "cds-ui:build"
+                    }
+                },
+                "test": {
+                    "builder": "@angular-devkit/build-angular:karma",
+                    "options": {
+                        "main": "src/test.ts",
+                        "polyfills": "src/polyfills.ts",
+                        "tsConfig": "src/tsconfig.spec.json",
+                        "karmaConfig": "src/karma.conf.js",
+                        "styles": [
+                            "src/styles.scss"
+                        ],
+                        "scripts": [],
+                        "assets": [
+                            "src/favicon.ico",
+                            "src/assets"
+                        ]
+                    }
+                },
+                "lint": {
+                    "builder": "@angular-devkit/build-angular:tslint",
+                    "options": {
+                        "tsConfig": [
+                            "src/tsconfig.app.json",
+                            "src/tsconfig.spec.json"
+                        ],
+                        "exclude": [
+                            "**/node_modules/**"
+                        ]
+                    }
+                }
+            }
+        },
+        "cds-ui-e2e": {
+            "root": "e2e/",
+            "projectType": "application",
+            "prefix": "",
+            "architect": {
+                "e2e": {
+                    "builder": "@angular-devkit/build-angular:protractor",
+                    "options": {
+                        "protractorConfig": "e2e/protractor.conf.js",
+                        "devServerTarget": "cds-ui:serve"
+                    },
+                    "configurations": {
+                        "production": {
+                            "devServerTarget": "cds-ui:serve:production"
+                        }
+                    }
+                },
+                "lint": {
+                    "builder": "@angular-devkit/build-angular:tslint",
+                    "options": {
+                        "tsConfig": "e2e/tsconfig.e2e.json",
+                        "exclude": [
+                            "**/node_modules/**"
+                        ]
+                    }
+                }
+            }
+        }
+    },
+    "defaultProject": "cds-ui"
+}
\ No newline at end of file
diff --git a/cds-ui/client/package.json b/cds-ui/client/package.json
new file mode 100644 (file)
index 0000000..04dd308
--- /dev/null
@@ -0,0 +1,67 @@
+{
+    "name": "cds-ui",
+    "version": "0.0.0",
+    "scripts": {
+        "ng": "ng",
+        "start": "ng serve",
+        "build": "ng build",
+        "test": "ng test",
+        "lint": "ng lint",
+        "e2e": "ng e2e"
+    },
+    "private": true,
+    "dependencies": {
+        "@angular/animations": "7.1.0",
+        "@angular/cdk": "^7.1.1",
+        "@angular/common": "7.1.0",
+        "@angular/compiler": "7.1.0",
+        "@angular/core": "7.1.0",
+        "@angular/forms": "7.1.0",
+        "@angular/material": "^7.1.1",
+        "@angular/platform-browser": "7.1.0",
+        "@angular/platform-browser-dynamic": "7.1.0",
+        "@angular/router": "7.1.0",
+        "@material/chips": "^0.43.0",
+        "@ngrx/core": "^1.2.0",
+        "@ngrx/effects": "^6.1.2",
+        "@ngrx/router-store": "^6.1.2",
+        "@ngrx/store": "^6.1.2",
+        "@ngrx/store-devtools": "^6.1.2",
+        "@types/d3": "^5.7.0",
+        "ang-jsoneditor": "1.6.1",
+        "core-js": "^2.5.4",
+        "d3": "^5.9.1",
+        "file-saver": "^2.0.1",
+        "font-awesome": "^4.7.0",
+        "hammerjs": "^2.0.8",
+        "jsoneditor": "^5.31.1",
+        "jszip": "^3.2.0",
+        "material-design-icons": "^3.0.1",
+        "ng2-ace-editor": "^0.3.9",
+        "rxjs": "6.3.3",
+        "stream": "0.0.2",
+        "tslib": "^1.9.0",
+        "zone.js": "0.8.26"
+    },
+    "devDependencies": {
+        "@angular-devkit/build-angular": "0.11.0",
+        "@angular/cli": "7.1.0",
+        "@angular/compiler-cli": "7.1.0",
+        "@angular/language-service": "7.1.0",
+        "@types/node": "8.9.4",
+        "@types/jasmine": "2.8.8",
+        "@types/jasminewd2": "2.0.3",
+        "codelyzer": "4.5.0",
+        "jasmine-core": "2.99.1",
+        "jasmine-spec-reporter": "4.2.1",
+        "karma": "3.1.1",
+        "karma-chrome-launcher": "2.2.0",
+        "karma-coverage-istanbul-reporter": "2.0.1",
+        "karma-jasmine": "1.1.2",
+        "karma-jasmine-html-reporter": "^0.2.2",
+        "protractor": "5.4.0",
+        "ts-node": "7.0.0",
+        "tslint": "5.11.0",
+        "typescript": "3.1.6"
+    }
+}
diff --git a/cds-ui/client/pom.xml b/cds-ui/client/pom.xml
new file mode 100644 (file)
index 0000000..573ab1f
--- /dev/null
@@ -0,0 +1,99 @@
+<!-- 
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================ -->
+
+<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">
+    <modelVersion>4.0.0</modelVersion>
+    
+    <parent>
+        <groupId>org.onap.ccsdk.cds</groupId>
+        <artifactId>controller-design-studio</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../..</relativePath>
+    </parent>
+    
+    <groupId>org.onap.ccsdk.cds</groupId>
+    <artifactId>controller-design-studio-client</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>cds-ui</name>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <npm.executable>npm</npm.executable>
+        <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+    </properties>
+
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.github.eirslett</groupId>
+                <artifactId>frontend-maven-plugin</artifactId>
+                <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
+                <version>1.3</version>
+                <configuration>
+                    <nodeVersion>v8.12.0</nodeVersion>
+                    <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
+                    <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
+                    <installDirectory>./</installDirectory>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>install node and npm</id>
+                        <goals>
+                            <goal>install-node-and-npm</goal>
+                        </goals>
+                        <phase>generate-resources</phase>
+                    </execution>
+
+                    <execution>
+                        <id>npm install</id>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+
+                        <phase>generate-resources</phase>
+
+                        <configuration>
+                            <arguments>install</arguments>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>npm build</id>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+
+                        <phase>generate-resources</phase>
+
+                        <configuration>
+                            <arguments>run build</arguments>
+                        </configuration>
+                    </execution>
+
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/cds-ui/client/src/app/app-routing.module.ts b/cds-ui/client/src/app/app-routing.module.ts
new file mode 100644 (file)
index 0000000..96dfce1
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { HomeComponent } from './common/shared/components/home/home.component';
+
+
+const routes: Routes = [
+{
+  path: '',
+  component: HomeComponent,
+   children: [
+    {
+      path: 'blueprint',
+      loadChildren: './feature-modules/blueprint/blueprint.module#BlueprintModule'
+    },
+    {
+      path: 'resource-definition',
+      loadChildren: './feature-modules/resource-definition/resource-definition.module#ResourceDefinitionModule'
+    }
+  ]
+}
+];
+
+@NgModule({
+  imports: [RouterModule.forRoot(routes)],
+  exports: [RouterModule]
+})
+export class AppRoutingModule { }
diff --git a/cds-ui/client/src/app/app.component.html b/cds-ui/client/src/app/app.component.html
new file mode 100644 (file)
index 0000000..88446ca
--- /dev/null
@@ -0,0 +1,23 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+
+
+<router-outlet></router-outlet>
diff --git a/cds-ui/client/src/app/app.component.scss b/cds-ui/client/src/app/app.component.scss
new file mode 100644 (file)
index 0000000..bf7a36c
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+.example-container {
+    // position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+  }
+  
+  .example-events {
+    width: 300px;
+    height: 200px;
+    overflow: auto;
+    border: 1px solid #555;
+  }
\ No newline at end of file
diff --git a/cds-ui/client/src/app/app.component.spec.ts b/cds-ui/client/src/app/app.component.spec.ts
new file mode 100644 (file)
index 0000000..f59f48b
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { TestBed, async } from '@angular/core/testing';
+import { RouterTestingModule } from '@angular/router/testing';
+import { AppComponent } from './app.component';
+
+describe('AppComponent', () => {
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      imports: [
+        RouterTestingModule
+      ],
+      declarations: [
+        AppComponent
+      ],
+    }).compileComponents();
+  }));
+
+  it('should create the app', () => {
+    const fixture = TestBed.createComponent(AppComponent);
+    const app = fixture.debugElement.componentInstance;
+    expect(app).toBeTruthy();
+  });
+
+  it(`should have as title 'cds-ui'`, () => {
+    const fixture = TestBed.createComponent(AppComponent);
+    const app = fixture.debugElement.componentInstance;
+    expect(app.title).toEqual('cds-ui');
+  });
+
+  it('should render title in a h1 tag', () => {
+    const fixture = TestBed.createComponent(AppComponent);
+    fixture.detectChanges();
+    const compiled = fixture.debugElement.nativeElement;
+    expect(compiled.querySelector('h1').textContent).toContain('Welcome to cds-ui!');
+  });
+});
diff --git a/cds-ui/client/src/app/app.component.ts b/cds-ui/client/src/app/app.component.ts
new file mode 100644 (file)
index 0000000..1064179
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { Component } from '@angular/core';
+import { Router } from '@angular/router';
+import { Observable} from 'rxjs';
+import { Store } from '@ngrx/store';
+
+@Component({
+  selector: 'app-root',
+  templateUrl: './app.component.html',
+  styleUrls: ['./app.component.scss']
+})
+export class AppComponent {
+
+  constructor(private router: Router) {
+   }
+}
diff --git a/cds-ui/client/src/app/app.module.ts b/cds-ui/client/src/app/app.module.ts
new file mode 100644 (file)
index 0000000..e4cc4a1
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { BrowserModule } from '@angular/platform-browser';
+import { NgModule } from '@angular/core';
+import { StoreModule } from '@ngrx/store';
+import { CommonModule } from '@angular/common';
+import { ReactiveFormsModule } from '@angular/forms';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { MatIconModule } from '@angular/material/icon';
+import { HttpClientModule } from '@angular/common/http';
+
+import { AppRoutingModule } from './app-routing.module';
+import { AppComponent } from './app.component';
+import { SharedModule } from './common/shared/shared.module';
+import { CoreModule } from './common/core/core.module';
+import { AppMaterialModule } from './common/modules/app-material.module';
+import { ResourceDefinitionModule } from './feature-modules/resource-definition/resource-definition.module';
+
+@NgModule({ 
+  declarations: [
+    AppComponent
+  ],
+  imports: [
+    BrowserModule,
+    CommonModule,
+    AppRoutingModule,
+    ReactiveFormsModule,
+    BrowserAnimationsModule,
+    HttpClientModule,
+    AppMaterialModule,
+    SharedModule,
+    CoreModule,
+    ResourceDefinitionModule
+  ],
+  providers: [],
+  bootstrap: [AppComponent]
+})
+export class AppModule { }
diff --git a/cds-ui/client/src/app/common/constants/app-constants.ts b/cds-ui/client/src/app/common/constants/app-constants.ts
new file mode 100644 (file)
index 0000000..0efabeb
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+export const GlobalContants = {
+    endpoints: {
+
+    },
+    // cbawizard: {
+    //     stepsRequired: {stepCount: 3, 
+    //                     steps: [{name:'CBA Metadata', componentURL:'/controllerBlueprint/selectTemplate'}, 
+    //                             {name:'Controller Blueprint Designer', componentURL:'/controllerBlueprint/modifyTemplate'}, 
+    //                             {name:'Test', componentURL:'/controllerBlueprint/testTemplate'},
+    //                             {name:'Deploy', componentURL:'/controllerBlueprint/deployTemplate'}]
+    //                     }
+    // }
+    cbawizard: {
+        stepsRequired: 
+        {
+            stepCount: 4,
+            steps: [{
+                name: 'CBA Metadata',
+                componentURL: '/controllerBlueprint/selectTemplate',
+                label: 'CBA Metadata',
+                link: '/blueprint/selectTemplate',
+                index: 0,
+                component: 'SelectTemplateComponent'
+            },
+            {
+                name: 'Controller Blueprint Designer',
+                componentURL: '/controllerBlueprint/modifyTemplate',
+                label: 'Controller Blueprint Designer',
+                link: '/blueprint/modifyTemplate',
+                index: 1,
+                component: 'ModifyTemplateComponent'
+            },
+            {
+                name: 'Test',
+                componentURL: '/controllerBlueprint/testTemplate',
+                label: 'Test',
+                link: '/blueprint/testTemplate',
+                index: 2,
+                component: 'TestTemplateComponent'
+            },
+            {
+                name: 'Deploy',
+                componentURL: '/controllerBlueprint/deployTemplate',
+                label: 'Deploy',
+                link: '/blueprint/deployTemplate',
+                index: 3,
+                component: 'DeployTemplateComponent'
+            }]
+        }
+    },
+    datadictionary: {
+        stepsRequired: 
+        {
+            stepCount: 3,
+            steps: [{
+                      name: 'Resource Creation', componentURL: '/dataDictionary/selectTemplate',
+                      label: 'Resource Creation',
+                      component: 'ResourceCreationComponent'
+
+                    },
+                   {
+                      name: 'Edit/Validate', componentURL: '/dataDictionary/modifyTemplate',
+                      label: 'Edit/Validate',
+                      component: 'ResourceEditComponent'
+                   },
+                   {
+                      name: 'Save', componentURL: '/dataDictionary/saveTemplate',
+                      label: 'Save Resource',
+                      component: 'SaveResourceComponent'
+                   }]
+       }
+
+    }
+};
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/README.md b/cds-ui/client/src/app/common/core/README.md
new file mode 100644 (file)
index 0000000..6b30b8a
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+This folder contains Core services. Services which should have single instance across the application.
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/core.module.ts b/cds-ui/client/src/app/common/core/core.module.ts
new file mode 100644 (file)
index 0000000..807065e
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { StoreModule, Store } from '@ngrx/store';
+import { EffectsModule } from '@ngrx/effects';
+import { StoreRouterConnectingModule } from '@ngrx/router-store';
+import { HttpClientModule } from '@angular/common/http';
+
+import { appReducers } from './store/reducers/app.reducer';
+import { BlueprintEffects } from './store/effects/blueprint.effects';
+import { ResourcesEffects } from './store/effects/resources.effects';
+import { ApiService } from './services/api.service';
+// import { BlueprintService } from './services/blueprint.service';
+
+@NgModule({
+  declarations: [
+  ],
+  imports: [
+    CommonModule,
+    StoreModule.forRoot(appReducers),
+    EffectsModule.forRoot([BlueprintEffects,ResourcesEffects]),
+    StoreRouterConnectingModule.forRoot({stateKey: 'router'}),
+    HttpClientModule
+  ],
+  providers : [ ApiService ]
+})
+export class CoreModule { }
diff --git a/cds-ui/client/src/app/common/core/services/api.service.ts b/cds-ui/client/src/app/common/core/services/api.service.ts
new file mode 100644 (file)
index 0000000..0ee3c6a
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { Observable } from 'rxjs';
+
+//import { IBlueprintHttp } from '../store/models/blueprint-http.model';
+
+@Injectable()
+export class ApiService {
+  // blueprintUrl = '../../constants/blueprint.json';
+
+  constructor(private _http: HttpClient) {
+  }
+
+  get(url: string, params?: any): Observable<any> {
+            return this._http.get(url);
+  }
+
+  post() {
+    // to do
+  }
+
+  put() {
+      // to do
+  }
+
+  delete() {
+      // to do
+  }
+
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/README.md b/cds-ui/client/src/app/common/core/store/README.md
new file mode 100644 (file)
index 0000000..c9584c8
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+This folder contains the code related to ngrx/store, for application state management.
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/actions/blueprint.action.ts b/cds-ui/client/src/app/common/core/store/actions/blueprint.action.ts
new file mode 100644 (file)
index 0000000..8dc5067
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Injectable } from '@angular/core';
+import { Action, Store } from '@ngrx/store';
+import { IBlueprint } from '../models/blueprint.model';
+import { IBlueprintState } from '../models/blueprintState.model';
+
+export const LOAD_BLUEPRINT = 'LOAD_BLUEPRINT';
+export const LOAD_BLUEPRINT_SUCCESS = 'LOAD_BLUEPRINT_SUCCESS';
+export const LOAD_BLUEPRINT_FAILURE = 'LOAD_BLUEPRINT_FAILURE';
+export const UPDATE_BLUEPRINT ='UPDATE_BLUEPRINT';
+export const UPDATE_BLUEPRINT_SUCCESS = 'UPDATE_BLUEPRINT_SUCCESS';
+export const UPDATE_BLUEPRINT_FAILURE = 'UPDATE_BLUEPRINT_FAILURE';
+export const SAVE_BLUEPRINT = 'SAVE_BLUEPRINT';
+export const SAVE_BLUEPRINT_SUCCESS = 'SAVE_BLUEPRINT_SUCCESS';
+export const SAVE_BLUEPRINT_FAILURE = 'SAVE_BLUEPRINT_FAILURE';
+
+export const SET_BLUEPRINT = 'SET Blueprint';
+export const REMOVE_BLUEPRINT = 'Remove Blueprint';
+
+export const SET_BLUEPRINT_STATE = 'SET Blueprint state';
+
+
+export class LoadBlueprint implements Action {
+    readonly type = LOAD_BLUEPRINT;
+    constructor(public startLoadSuccess?: boolean) {}
+}
+
+export class LoadBlueprintSuccess implements Action {
+    readonly type = LOAD_BLUEPRINT_SUCCESS;
+    constructor(public payload: IBlueprint) {}
+}
+
+export class LoadBlueprintFailure implements Action {
+    readonly type = LOAD_BLUEPRINT_FAILURE;
+    constructor(public error: any) {}
+}
+
+export class SetBlueprintState implements Action {
+    readonly type = SET_BLUEPRINT_STATE;
+    constructor(public payload: IBlueprintState) {}
+}
+
+// export class SetBlueprint implements Action {
+//     readonly type = SET_BLUEPRINT;
+//     constructor(public payload: Blueprint) {}
+// }
+
+// export class RemoveBlueprint implements Action {
+//     readonly type = REMOVE_BLUEPRINT;
+//     constructor(public payload: Blueprint) {}
+// }
+
+export class UpdateBlueprint implements Action {
+    readonly type = UPDATE_BLUEPRINT;
+    constructor(public payload: IBlueprint) {}
+}
+
+export type Actions = LoadBlueprint | LoadBlueprintSuccess | LoadBlueprintFailure | SetBlueprintState;
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/actions/resources.action.ts b/cds-ui/client/src/app/common/core/store/actions/resources.action.ts
new file mode 100644 (file)
index 0000000..d5a723b
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+import { Injectable } from '@angular/core';
+import { Action, Store } from '@ngrx/store';
+import { IResources } from '../models/resources.model';
+import { IResourcesState } from '../models/resourcesState.model';
+
+export const LOAD_RESOURCES = 'LOAD_RESOURCES';
+export const LOAD_RESOURCES_SUCCESS = 'LOAD_RESOURCES_SUCCESS';
+export const LOAD_RESOURCES_FAILURE = 'LOAD_RESOURCES_FAILURE';
+export const UPDATE_RESOURCES ='UPDATE_RESOURCES';
+export const SET_RESOURCES_STATE = 'SET Resources state';
+
+
+export class LoadResources implements Action {
+    readonly type = LOAD_RESOURCES;
+    constructor(public startLoadSuccess?: boolean) {}
+}
+
+export class LoadResourcesSuccess implements Action {
+    readonly type = LOAD_RESOURCES_SUCCESS;
+    constructor(public payload: IResources) {}
+}
+
+export class LoadResourcesFailure implements Action {
+    readonly type = LOAD_RESOURCES_FAILURE;
+    constructor(public error: any) {}
+}
+
+export class SetResourcesState implements Action {
+    readonly type = SET_RESOURCES_STATE;
+    constructor(public payload: IResourcesState) {}
+}
+
+export class UpdateResources implements Action {
+    readonly type = UPDATE_RESOURCES;
+    constructor(public payload: IResources) {}
+}
+
+export type Actions = LoadResources | LoadResourcesSuccess | LoadResourcesFailure | SetResourcesState;
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/effects/blueprint.effects.ts b/cds-ui/client/src/app/common/core/store/effects/blueprint.effects.ts
new file mode 100644 (file)
index 0000000..e1b1c2f
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Injectable } from '@angular/core';
+import { Effect, ofType, Actions } from '@ngrx/effects';
+import { Store, select } from '@ngrx/store';
+import { of } from 'rxjs';
+import { switchMap, map, withLatestFrom, catchError } from 'rxjs/operators';
+
+import { IAppState } from '../state/app.state';
+import * as BlueprintActions from '../actions/blueprint.action';
+// import { IBlueprintHttp } from '../models/blueprint-http.model';
+// import { BlueprintService } from '../../services/blueprint.service';
+// import { BlueprintService } from '../../../feature-modules/blueprint/blueprint.service';
+
+@Injectable()
+export class BlueprintEffects {
+
+  
+  constructor(
+   // private blueprintService: BlueprintService,
+    private _actions$: Actions,
+    private _store: Store<IAppState>
+  ) {}
+    
+  // @Effect()
+  // getBlueprint$ = this._actions$.pipe(
+  //   ofType<BlueprintActions.LoadBlueprint>(BlueprintActions.LOAD_BLUEPRINT),
+  //   switchMap(() => 
+  //     this.blueprintService.loadBlueprint().pipe(
+  //     map((blueprintResponse: any) => new  BlueprintActions.LoadBlueprintSuccess(blueprintResponse)),
+  //     catchError((error : any) => of(new BlueprintActions.LoadBlueprintSuccess(error)))
+  //   ),
+   // ,
+    // switchMap((blueprintResponse: any) => of(new BlueprintActions.LoadBlueprintSuccess(blueprintResponse)))
+//   ),
+// )
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/effects/resources.effects.ts b/cds-ui/client/src/app/common/core/store/effects/resources.effects.ts
new file mode 100644 (file)
index 0000000..f48f284
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Injectable } from '@angular/core';
+import { Effect, ofType, Actions } from '@ngrx/effects';
+import { Store, select } from '@ngrx/store';
+import { of } from 'rxjs';
+import { switchMap, map, withLatestFrom, catchError } from 'rxjs/operators';
+
+import { IAppState } from '../state/app.state';
+import * as ResourcesActions from '../actions/resources.action';
+
+@Injectable()
+export class ResourcesEffects {
+
+  constructor(
+    private _actions$: Actions,
+    private _store: Store<IAppState>
+  ) {}
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/blueprint-http.model.ts b/cds-ui/client/src/app/common/core/store/models/blueprint-http.model.ts
new file mode 100644 (file)
index 0000000..e0e98d5
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { IBlueprint } from '../models/blueprint.model';
+
+export interface IBlueprintHttp {
+  blueprint: IBlueprint;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/blueprint.model.ts b/cds-ui/client/src/app/common/core/store/models/blueprint.model.ts
new file mode 100644 (file)
index 0000000..f4989fb
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { IMetaData } from './metadata.model';
+import { IImportModel } from './imports.model';
+import { ITopologyTemplate } from './itopologytemplate.model';
+
+export interface IBlueprint {
+        metadata: IMetaData;
+        fileImports: Array<IImportModel>
+        toplogyTemplates: ITopologyTemplate;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/blueprintState.model.ts b/cds-ui/client/src/app/common/core/store/models/blueprintState.model.ts
new file mode 100644 (file)
index 0000000..6d26592
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { IMetaData } from './metadata.model';
+import { IImportModel } from './imports.model';
+import { IBlueprint } from './blueprint.model';
+
+
+export interface IBlueprintState {
+    blueprint: IBlueprint,
+    name?: string;
+    files?: any;
+    filesData?: any;
+    isLoadSuccess?: boolean;
+    isUpdateSuccess?: boolean;
+    isSaveSuccess?: boolean;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/entrySchema.model.ts b/cds-ui/client/src/app/common/core/store/models/entrySchema.model.ts
new file mode 100644 (file)
index 0000000..8e96590
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+export interface IEntrySchema{
+  Type:string;  
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/imports.model.ts b/cds-ui/client/src/app/common/core/store/models/imports.model.ts
new file mode 100644 (file)
index 0000000..9510ed3
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+export interface IImportModel {
+    file: string;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/itopologytemplate.model.ts b/cds-ui/client/src/app/common/core/store/models/itopologytemplate.model.ts
new file mode 100644 (file)
index 0000000..7457f2f
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+export interface ITopologyTemplate {
+    inputs: object[];
+       node_template: object[];
+       workflow: object[];
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/metadata.model.ts b/cds-ui/client/src/app/common/core/store/models/metadata.model.ts
new file mode 100644 (file)
index 0000000..6ee4275
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+export interface IMetaData {
+    template_author: string;
+    author_email: String;
+    user_groups: string;
+    template_name: string;
+    template_version: string;
+    template_tags: string;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/propertyData.model.ts b/cds-ui/client/src/app/common/core/store/models/propertyData.model.ts
new file mode 100644 (file)
index 0000000..94cff89
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+import {IEntrySchema} from './entrySchema.model';
+
+export interface IPropertyData{  
+    discription:string;
+    _type:string;
+    required:boolean;
+    entry_schema:IEntrySchema;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/resources-http.model.ts b/cds-ui/client/src/app/common/core/store/models/resources-http.model.ts
new file mode 100644 (file)
index 0000000..3f2556a
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+import { IResources } from '../models/resources.model';
+
+export interface IResourcesHttp {
+  resources: IResources;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/resources.model.ts b/cds-ui/client/src/app/common/core/store/models/resources.model.ts
new file mode 100644 (file)
index 0000000..019c268
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { ISourcesData } from './sourcesData.model';
+import { IPropertyData } from './propertyData.model';
+
+export interface IResources { 
+    name:string ;
+    tags:string;
+    updated_bt:string;
+    property: IPropertyData;
+    sources: ISourcesData;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/resourcesState.model.ts b/cds-ui/client/src/app/common/core/store/models/resourcesState.model.ts
new file mode 100644 (file)
index 0000000..7dacf32
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { IResources } from './resources.model';
+
+export interface IResourcesState {
+    resources: IResources,
+    isLoadSuccess: boolean;
+    isUpdateSuccess: boolean;
+    isSaveSuccess: boolean;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/models/sourcesData.model.ts b/cds-ui/client/src/app/common/core/store/models/sourcesData.model.ts
new file mode 100644 (file)
index 0000000..ed43fc9
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+export interface ISourcesData{
+sources: object[];  
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/reducers/app.reducer.ts b/cds-ui/client/src/app/common/core/store/reducers/app.reducer.ts
new file mode 100644 (file)
index 0000000..6f58320
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { ActionReducerMap } from '@ngrx/store';
+import { routerReducer } from '@ngrx/router-store';
+
+import { IAppState } from '../state/app.state';
+import { blueprintReducer } from '../reducers/blueprint.reducer';
+import { resourcesReducer } from '../reducers/resources.reducer';
+
+export const appReducers: ActionReducerMap<IAppState, any> = {
+    router: routerReducer,
+    blueprint: blueprintReducer,
+    resources:resourcesReducer
+};
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/reducers/blueprint.reducer.ts b/cds-ui/client/src/app/common/core/store/reducers/blueprint.reducer.ts
new file mode 100644 (file)
index 0000000..37a659d
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Action } from '@ngrx/store';
+import { IBlueprint } from '../models/blueprint.model';
+import { IBlueprintState } from '../models/blueprintState.model';
+import { initialBlueprintState } from '../state/blueprint.state';
+import * as BlueprintActions from '../actions/blueprint.action';
+
+// const initialState: BlueprintState = {
+//     blueprint: {
+//         metadata: {
+//             template_author: '',
+//             author_email: '',
+//             user_groups: '',
+//             template_name: '',
+//             template_version: '',
+//             template_tags: ''
+//         },
+//         fileImports: [{file:''}],
+//         toplogyTemplates: 'temp'        
+//     },
+//     isLoadSuccess: false,
+//     isUpdateSuccess: false,
+//     isSaveSuccess: false
+// }
+
+
+export function blueprintReducer(state: IBlueprintState = initialBlueprintState, action: BlueprintActions.Actions) : IBlueprintState {
+    switch(action.type) {
+        case BlueprintActions.LOAD_BLUEPRINT_SUCCESS:
+            return {...state,
+                    blueprint: action.payload
+                    }
+        case BlueprintActions.SET_BLUEPRINT_STATE :
+            return {...state,
+                    blueprint: action.payload.blueprint,
+                    name: action.payload.name,
+                    files: action.payload.files,
+                    filesData: action.payload.filesData
+                    }
+        default:
+            return state;
+    }
+}
diff --git a/cds-ui/client/src/app/common/core/store/reducers/resources.reducer.ts b/cds-ui/client/src/app/common/core/store/reducers/resources.reducer.ts
new file mode 100644 (file)
index 0000000..c9d587d
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+import { Action } from '@ngrx/store';
+import { IResources } from '../models/resources.model';
+import { IResourcesState } from '../models/resourcesState.model';
+import { initialResourcesState } from '../state/resources.state';
+import * as ResourcesActions from '../actions/resources.action';
+
+export function resourcesReducer(state: IResourcesState = initialResourcesState, action: ResourcesActions.Actions) : IResourcesState {
+    switch(action.type) {
+        case ResourcesActions.LOAD_RESOURCES_SUCCESS:
+            return {...state,
+                    resources: action.payload
+                    }
+        default:
+            return state;
+    }
+}
diff --git a/cds-ui/client/src/app/common/core/store/selectors/blueprint.selectors.ts b/cds-ui/client/src/app/common/core/store/selectors/blueprint.selectors.ts
new file mode 100644 (file)
index 0000000..d23221c
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { createSelector } from '@ngrx/store';
+
+import { IAppState } from '../state/app.state';
+import { IBlueprintState } from '../models/blueprintState.model';
+
+const selectBlueprintFromAppState = (state: IAppState) => state.blueprint;
+
+export const selectBlueprint = createSelector(
+    selectBlueprintFromAppState,
+  (state: IBlueprintState) => state.blueprint
+);
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/selectors/resources.selectors.ts b/cds-ui/client/src/app/common/core/store/selectors/resources.selectors.ts
new file mode 100644 (file)
index 0000000..96ec4d3
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+import { createSelector } from '@ngrx/store';
+
+import { IAppState } from '../state/app.state';
+import { IResourcesState } from '../models/resourcesState.model';
+
+const selectResourcesFromAppState = (state: IAppState) => state.resources;
+
+export const selectResources = createSelector(
+    selectResourcesFromAppState,
+  (state: IResourcesState) => state.resources
+);
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/state/app.state.ts b/cds-ui/client/src/app/common/core/store/state/app.state.ts
new file mode 100644 (file)
index 0000000..052eb2c
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { RouterReducerState     } from '@ngrx/router-store';
+import { IBlueprintState } from '../models/blueprintState.model';
+import { initialBlueprintState } from './blueprint.state';
+import { IResourcesState } from '../models/resourcesState.model';
+import { initialResourcesState } from './resources.state';
+
+export interface IAppState {
+    router? : RouterReducerState,
+    blueprint: IBlueprintState,
+    resources: IResourcesState
+}
+
+export const initialAppState: IAppState = {
+    blueprint: initialBlueprintState,
+    resources: initialResourcesState
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/state/blueprint.state.ts b/cds-ui/client/src/app/common/core/store/state/blueprint.state.ts
new file mode 100644 (file)
index 0000000..19a8376
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { IBlueprintState } from '../models/blueprintState.model';
+import { IBlueprint } from '../models/blueprint.model';
+
+
+export const initialBlueprintState : IBlueprintState = {
+    blueprint : {} as IBlueprint,
+    name: '',
+    files: [],
+    filesData: [],
+    isLoadSuccess: false,
+    isUpdateSuccess: false,
+    isSaveSuccess: false,
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/core/store/state/resources.state.ts b/cds-ui/client/src/app/common/core/store/state/resources.state.ts
new file mode 100644 (file)
index 0000000..046667a
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+import { IResourcesState } from '../models/resourcesState.model';
+import { IResources } from '../models/resources.model';
+
+export const initialResourcesState : IResourcesState = {
+    resources : {} as IResources,
+    isLoadSuccess: false,
+    isUpdateSuccess: false,
+    isSaveSuccess: false,
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/modules/README.md b/cds-ui/client/src/app/common/modules/README.md
new file mode 100644 (file)
index 0000000..196842e
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+This folder contains common module. All the third party imports/libraries, that could be used at many components, should be imported here into a single module and that module can be used across.
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/modules/app-material.module.ts b/cds-ui/client/src/app/common/modules/app-material.module.ts
new file mode 100644 (file)
index 0000000..9ad2063
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { MatAutocompleteModule,
+  MatBottomSheetModule,
+  MatButtonModule,
+  MatButtonToggleModule,
+  MatCardModule,
+  MatCheckboxModule,
+  MatChipsModule,
+  MatDatepickerModule,
+  MatDialogModule,
+  MatDividerModule,
+  MatExpansionModule,
+  MatGridListModule,
+  MatIconModule,
+  MatInputModule,
+  MatListModule,
+  MatMenuModule,
+  MatNativeDateModule,
+  MatPaginatorModule,
+  MatProgressBarModule,
+  MatProgressSpinnerModule,
+  MatRadioModule,
+  MatRippleModule,
+  MatSelectModule,
+  MatSidenavModule,
+  MatSliderModule,
+  MatSlideToggleModule,
+  MatSnackBarModule,
+  MatSortModule,
+  MatStepperModule,
+  MatTableModule,
+  MatTabsModule,
+  MatToolbarModule,
+  MatTooltipModule,
+  MatTreeModule,
+  MatFormFieldModule } from '@angular/material';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    MatAutocompleteModule,
+  MatBottomSheetModule,
+  MatButtonModule,
+  MatButtonToggleModule,
+  MatCardModule,
+  MatCheckboxModule,
+  MatChipsModule,
+  MatDatepickerModule,
+  MatDialogModule,
+  MatDividerModule,
+  MatExpansionModule,
+  MatGridListModule,
+  MatIconModule,
+  MatInputModule,
+  MatMenuModule,
+  MatNativeDateModule,
+  MatPaginatorModule,
+  MatProgressBarModule,
+  MatProgressSpinnerModule,
+  MatRadioModule,
+  MatRippleModule,
+  MatSelectModule,
+  MatSidenavModule,
+  MatSliderModule,
+  MatSlideToggleModule,
+  MatSnackBarModule,
+  MatSortModule,
+  MatStepperModule,
+  MatTableModule,
+  MatTabsModule,
+  MatToolbarModule,
+  MatTooltipModule,
+  MatTreeModule,
+  MatListModule,
+  MatFormFieldModule
+  ],
+  exports: [
+    MatAutocompleteModule,
+  MatBottomSheetModule,
+  MatButtonModule,
+  MatButtonToggleModule,
+  MatCardModule,
+  MatCheckboxModule,
+  MatChipsModule,
+  MatDatepickerModule,
+  MatDialogModule,
+  MatDividerModule,
+  MatExpansionModule,
+  MatGridListModule,
+  MatIconModule,
+  MatInputModule,
+  MatListModule,
+  MatMenuModule,
+  MatNativeDateModule,
+  MatPaginatorModule,
+  MatProgressBarModule,
+  MatProgressSpinnerModule,
+  MatRadioModule,
+  MatRippleModule,
+  MatSelectModule,
+  MatSidenavModule,
+  MatSliderModule,
+  MatSlideToggleModule,
+  MatSnackBarModule,
+  MatSortModule,
+  MatStepperModule,
+  MatTableModule,
+  MatTabsModule,
+  MatToolbarModule,
+  MatTooltipModule,
+  MatTreeModule,
+  MatFormFieldModule
+  ]
+})
+export class AppMaterialModule { }
diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.html
new file mode 100644 (file)
index 0000000..b7c59b2
--- /dev/null
@@ -0,0 +1,62 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+<!-- <mat-card class="CBAform">
+  <mat-card-content>
+    <mat-horizontal-stepper [linear]=true #stepper (selectionChange)="changeRoute($event)">
+      <div *ngFor="let step of stepDetails">
+          <mat-step>
+              <ng-template matStepLabel>{{step.name}}
+              </ng-template>
+            </mat-step>
+      </div>
+    </mat-horizontal-stepper>
+  </mat-card-content>
+</mat-card> -->
+
+<!-- <mat-card class="CBAform">
+  <mat-card-content>
+    <mat-horizontal-stepper [linear]=true #stepper (selectionChange)="changeRoute($event)">
+      <a *ngFor="let routeLink of stepsRequired; let i = index;">
+          <mat-step style="display: none;">
+              <ng-template matStepLabel>{{routeLink.label}}
+              </ng-template>
+            </mat-step>
+          </a>
+    </mat-horizontal-stepper>
+  </mat-card-content>
+</mat-card> -->
+
+<mat-card class="CBAform">
+  <!-- <label>{{appName}}</label> -->
+  <mat-card-content>
+    <mat-horizontal-stepper [linear]=true #stepper >
+      <!-- <mat-step style="display: none;" *ngFor="let routeLink of stepsRequired; let i = index;"> -->
+        <mat-step style="display: none;" *ngFor="let routeLink of steps">
+        <ng-template matStepLabel>{{routeLink.label}}</ng-template>
+        <!-- {{appToLoad.component}} -->
+        <template #steppercontainer> </template>
+      </mat-step>
+      <div style="position:relative">
+        <button mat-button matStepperNext style="color:white;background:gray; right: 20px; position: absolute;bottom:5px; ">Next</button>
+      </div>
+    </mat-horizontal-stepper>
+  </mat-card-content>
+</mat-card>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.scss
new file mode 100644 (file)
index 0000000..119a7d7
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+// .mat-horizontal-content-container {
+//     display: none !important;
+// }
+
+.mat-card {
+    padding: 0px !important;
+}
+
+mat-horizontal-stepper .mat-horizontal-content-container {
+    display: none !important;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.spec.ts b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.spec.ts
new file mode 100644 (file)
index 0000000..62aca17
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { CBAWizardComponent } from './cbawizard.component';
+
+describe('CBAWizardComponent', () => {
+  let component: CBAWizardComponent;
+  let fixture: ComponentFixture<CBAWizardComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ CBAWizardComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(CBAWizardComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts b/cds-ui/client/src/app/common/shared/components/cbawizard/cbawizard.component.ts
new file mode 100644 (file)
index 0000000..fc284b3
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { Component, OnInit, Input, Output, EventEmitter, ViewChild } from '@angular/core';
+import { Router } from '@angular/router';
+import { MatStepper } from '@angular/material';
+
+import { GlobalContants } from '../../../constants/app-constants';
+
+@Component({
+  selector: 'app-cbawizard',
+  templateUrl: './cbawizard.component.html',
+  styleUrls: ['./cbawizard.component.scss']
+})
+export class CBAWizardComponent implements OnInit {
+  // @Input() stepsRequired: any[];
+  @Input() appName: any;
+  @ViewChild('stepper') stepper: MatStepper;
+  @Output() stepChanged = new EventEmitter();
+  public stepDetails = GlobalContants.cbawizard.stepsRequired.steps;
+  private routeLinks : any[];
+  activeLinkIndex = -1;
+  stepsRequired: any;
+  steps: any[];
+  
+  constructor(private router: Router) {
+  //   this.routeLinks = [
+  //     {
+  //         label: 'CBA Metadata',
+  //         link: '/blueprint/selectTemplate',
+  //         index: 0
+  //     }, {
+  //         label: 'Controller Blueprint Designer',
+  //         link: '/blueprint/modifyTemplate',
+  //         index: 1
+  //     }, {
+  //         label: 'Test',
+  //         link: '/blueprint/testTemplate',
+  //         index: 2
+  //     }, {
+  //         label: 'Deploy',
+  //         link: '/blueprint/deployTemplate',
+  //         index: 3
+  //     }
+  // ];
+
+  }
+
+  ngOnInit() {
+  //   this.router.events.subscribe((res) => {
+  //     this.activeLinkIndex = this.routeLinks.indexOf(this.routeLinks.find(tab => tab.link === this.router.url));
+  //     this.stepper.selectedIndex = this.activeLinkIndex; 
+  // });
+  //  this.stepsRequired.forEach((step, index)=>{
+  //   if(step.link == this.router.url) {
+  //     this.stepper.selectedIndex = step.index
+  //   }
+  //  });
+   if (this.appName == "cba") {
+    this.stepsRequired = GlobalContants.cbawizard.stepsRequired.stepCount;
+    this.steps = GlobalContants.cbawizard.stepsRequired.steps;
+    // this.createComponent();
+  }
+  if (this.appName == "datadict") {
+    this.stepsRequired = GlobalContants.datadictionary.stepsRequired.stepCount;
+    this.steps = GlobalContants.datadictionary.stepsRequired.steps;
+    // this.createComponent();
+  }
+  }
+
+  changeRoute(event){
+    this.stepsRequired.forEach((step, index)=>{
+      if(index == event.selectedIndex) {
+        this.router.navigate([step.link]);
+      }
+    });
+  }
+
+}
diff --git a/cds-ui/client/src/app/common/shared/components/header/header.component.html b/cds-ui/client/src/app/common/shared/components/header/header.component.html
new file mode 100644 (file)
index 0000000..e1ed842
--- /dev/null
@@ -0,0 +1,23 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+<mat-toolbar color="primary">
+  <span>Controller Blueprint Design Studio</span>
+</mat-toolbar>
diff --git a/cds-ui/client/src/app/common/shared/components/header/header.component.scss b/cds-ui/client/src/app/common/shared/components/header/header.component.scss
new file mode 100644 (file)
index 0000000..22941b5
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/components/header/header.component.spec.ts b/cds-ui/client/src/app/common/shared/components/header/header.component.spec.ts
new file mode 100644 (file)
index 0000000..99bb63b
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HeaderComponent } from './header.component';
+
+describe('HeaderComponent', () => {
+  let component: HeaderComponent;
+  let fixture: ComponentFixture<HeaderComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ HeaderComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(HeaderComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/common/shared/components/header/header.component.ts b/cds-ui/client/src/app/common/shared/components/header/header.component.ts
new file mode 100644 (file)
index 0000000..40a3375
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-header',
+  templateUrl: './header.component.html',
+  styleUrls: ['./header.component.scss']
+})
+export class HeaderComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}
diff --git a/cds-ui/client/src/app/common/shared/components/home/home.component.html b/cds-ui/client/src/app/common/shared/components/home/home.component.html
new file mode 100644 (file)
index 0000000..f8cfc88
--- /dev/null
@@ -0,0 +1,48 @@
+<!-- ============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================ 
+-->
+<!-- <mat-toolbar color="warn">
+  <mat-toolbar-row>
+    <button type="button" aria-label="Toggle sidenav" mat-icon-button (click)="drawer.toggle()" color="primary">
+      <mat-icon aria-label="Side nav toggle icon">menu</mat-icon>
+    </button>
+    <span>MY Image</span>
+  </mat-toolbar-row>
+</mat-toolbar> -->
+<mat-toolbar color="primary">
+    <mat-toolbar-row>
+        <!-- <button type="button" aria-label="Toggle sidenav" mat-icon-button (click)="drawer.toggle()" color="primary"> -->
+        <a class="menuBar" (click)="drawer.toggle()">&#9776;</a>
+        <!-- </button> -->
+        <span class="title">Controller Blueprint Design Studio</span>
+    </mat-toolbar-row>
+</mat-toolbar>
+<mat-sidenav-container class="example-container">
+    <mat-sidenav #drawer mode="side" [(opened)]="opened" (opened)="events.push('open!')" (closed)="events.push('close!')">
+        <mat-toolbar color="" primary>Menu</mat-toolbar>
+        <mat-nav-list>
+            <a mat-list-item [routerLink]="['/blueprint']">Controller Blueprint</a>
+            <a mat-list-item [routerLink]="['/resource-definition']">Resource Definition</a>
+        </mat-nav-list>
+    </mat-sidenav>
+
+    <mat-sidenav-content (click)="drawer.close()">
+        <router-outlet></router-outlet>
+    </mat-sidenav-content>
+</mat-sidenav-container>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/components/home/home.component.scss b/cds-ui/client/src/app/common/shared/components/home/home.component.scss
new file mode 100644 (file)
index 0000000..df9a48d
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+// .example-container {
+//     // position: absolute;
+//     top: 0;
+//     bottom: 0;
+//     left: 0;
+//     right: 0;
+//   }
+  
+//   .example-events {
+//     width: 300px;
+//     height: 200px;
+//     overflow: auto;
+//     border: 1px solid #555;
+//   }
+.mat-sidenav-container{
+    height: 652px;
+}
+.mat-button.mat-primary, .mat-icon-button.mat-primary, .mat-stroked-button.mat-primary {
+    color: white !important;
+}
+.menuBar{
+    cursor: pointer;
+}
+.title{
+    margin: 1em;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/components/home/home.component.spec.ts b/cds-ui/client/src/app/common/shared/components/home/home.component.spec.ts
new file mode 100644 (file)
index 0000000..5bfec03
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { HomeComponent } from './home.component';
+
+describe('HomeComponent', () => {
+  let component: HomeComponent;
+  let fixture: ComponentFixture<HomeComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ HomeComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(HomeComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/common/shared/components/home/home.component.ts b/cds-ui/client/src/app/common/shared/components/home/home.component.ts
new file mode 100644 (file)
index 0000000..d5ea7f6
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-home',
+  templateUrl: './home.component.html',
+  styleUrls: ['./home.component.scss']
+})
+export class HomeComponent implements OnInit {
+  events: string[] = [];
+  opened: boolean = true;
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}
diff --git a/cds-ui/client/src/app/common/shared/directives/README.md b/cds-ui/client/src/app/common/shared/directives/README.md
new file mode 100644 (file)
index 0000000..d82b915
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+This folder contains common directives used across the application.
diff --git a/cds-ui/client/src/app/common/shared/pipes/README.md b/cds-ui/client/src/app/common/shared/pipes/README.md
new file mode 100644 (file)
index 0000000..8470fee
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+This folder contains common pipes used across the application
\ No newline at end of file
diff --git a/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts b/cds-ui/client/src/app/common/shared/pipes/search.pipe.ts
new file mode 100644 (file)
index 0000000..b0d37c3
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+  name: 'search'
+})
+
+export class SearchPipe implements PipeTransform{
+   
+    transform(items: any[], searchText: string): any[] {
+        if(!items) return [];
+        if(!searchText) return items;
+        searchText = searchText.toLowerCase();
+        return items.filter( it => {
+            return it.toLowerCase().includes(searchText);
+        });
+    } 
+}
\ 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
new file mode 100644 (file)
index 0000000..8db020d
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { HomeComponent } from './components/home/home.component';
+import { CBAWizardComponent } from './components/cbawizard/cbawizard.component';
+import { MatToolbarModule,MatIconModule, MatButtonModule, MatSidenavModule,  MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule} from '@angular/material';
+import { RouterModule } from "@angular/router";
+import { SearchPipe } from './pipes/search.pipe';
+
+@NgModule({
+  declarations: [
+    HomeComponent,
+    CBAWizardComponent,
+    SearchPipe
+    
+  ],
+  exports: [
+    HomeComponent,
+    CBAWizardComponent,
+    SearchPipe
+  ],
+  imports: [
+    CommonModule,
+    MatToolbarModule,
+    MatButtonModule,
+    MatSidenavModule,
+    MatIconModule,
+    MatListModule,
+    MatGridListModule,
+    MatCardModule,
+    MatMenuModule,
+    MatTableModule,
+    MatPaginatorModule,
+    MatSortModule,
+    MatInputModule,
+    MatSelectModule, 
+    MatRadioModule, 
+    MatFormFieldModule, 
+    MatStepperModule,
+    RouterModule
+  ]
+})
+export class SharedModule { }
diff --git a/cds-ui/client/src/app/common/utility/README.md b/cds-ui/client/src/app/common/utility/README.md
new file mode 100644 (file)
index 0000000..e4b0cce
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+This folder contains utility files
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/blueprint-routing.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/blueprint-routing.module.ts
new file mode 100644 (file)
index 0000000..d0ce0c6
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { BlueprintComponent } from './blueprint.component';
+
+
+const routes: Routes = [
+    {
+        path: '',
+        component: BlueprintComponent
+    }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class BlueprintRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.html b/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.html
new file mode 100644 (file)
index 0000000..b38c75b
--- /dev/null
@@ -0,0 +1,43 @@
+<!-- ============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================ -->
+
+<!-- <app-cbawizard [appName]="appName"></app-cbawizard>
+<router-outlet></router-outlet> -->
+<mat-card class="CBAform">
+    <mat-card-content>
+        <mat-horizontal-stepper [linear]="isLinear" #stepper>
+            <mat-step [stepControl]="firstFormGroup">
+                <ng-template matStepLabel>CBA Metadata</ng-template>
+                <app-select-template></app-select-template>
+            </mat-step>
+            <mat-step [stepControl]="secondFormGroup">
+                <ng-template matStepLabel>Controller Blueprint Designer</ng-template>
+                <app-modify-template></app-modify-template>
+            </mat-step>
+            <!-- <mat-step [stepControl]="thirdFormGroup">
+                <ng-template matStepLabel>Deploy</ng-template>
+                <app-deploy-template></app-deploy-template>
+            </mat-step>             -->
+            <mat-step [stepControl]="thirdFormGroup">
+                <ng-template matStepLabel>Test</ng-template>
+                <app-test-template></app-test-template>
+            </mat-step>
+        </mat-horizontal-stepper>
+    </mat-card-content>
+</mat-card>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.scss
new file mode 100644 (file)
index 0000000..63e4565
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+.mat-card {
+    padding: 0px !important;
+}
+
+.matStepNextBtn {
+    color: white;
+    background-color: #3f51b5;
+    margin-right: 2em;
+    border-radius: 2em;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.spec.ts
new file mode 100644 (file)
index 0000000..74ae9b0
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { BlueprintComponent } from './blueprint.component';
+
+describe('BlueprintComponent', () => {
+  let component: BlueprintComponent;
+  let fixture: ComponentFixture<BlueprintComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ BlueprintComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(BlueprintComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/blueprint.component.ts
new file mode 100644 (file)
index 0000000..4612499
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-blueprint',
+  templateUrl: './blueprint.component.html',
+  styleUrls: ['./blueprint.component.scss']
+})
+export class BlueprintComponent implements OnInit {
+  appName: String;
+
+  constructor() {
+    this.appName="cba";
+   }
+
+  ngOnInit() {
+  }
+
+}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/blueprint.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/blueprint.module.ts
new file mode 100644 (file)
index 0000000..3a25e92
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { BlueprintComponent } from './blueprint.component';
+import { BlueprintRoutingModule } from './blueprint-routing.module';
+
+import { SharedModule } from '../../../app/common/shared/shared.module';
+import { SelectTemplateModule } from './select-template/select-template.module';
+import { ModifyTemplateModule } from './modify-template/modify-template.module';
+import { DeployTemplateModule } from './deploy-template/deploy-template.module';
+import { TestTemplateModule } from './test-template/test-template.module';
+
+import { AppMaterialModule } from '../../../app/common/modules/app-material.module';
+
+@NgModule({
+  declarations: [
+    BlueprintComponent 
+  ],
+  imports: [
+    CommonModule,
+    BlueprintRoutingModule,
+    SharedModule,
+    AppMaterialModule,
+    SelectTemplateModule,
+    ModifyTemplateModule,
+    DeployTemplateModule,
+    TestTemplateModule
+  ]
+})
+export class BlueprintModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template-routing.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template-routing.module.ts
new file mode 100644 (file)
index 0000000..65a98a9
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { DeployTemplateComponent } from './deploy-template.component';
+
+const routes: Routes = [
+    {
+        path: '',
+        component: DeployTemplateComponent
+    }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class DeployTemplateRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.html b/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.html
new file mode 100644 (file)
index 0000000..739ef04
--- /dev/null
@@ -0,0 +1,56 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+<div style="height: 556px;">
+<div style="height: 90%;overflow-y: scroll;border: 1px solid grey">
+  <mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
+    <!-- This is the tree node template for leaf nodes -->
+    <mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding>
+      <!-- use a disabled button to provide padding for tree leaf -->
+      <button mat-icon-button disabled></button>
+      <span (click)="fileClicked(node.name)">{{node.name}}</span>
+    </mat-tree-node>
+    <!-- This is the tree node template for expandable nodes -->
+    <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding>
+      <button mat-icon-button matTreeNodeToggle
+              [attr.aria-label]="'toggle ' + node.name">
+        <mat-icon class="mat-icon-rtl-mirror">
+          {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
+        </mat-icon>
+      </button>
+      <span (click)="fileClicked(node.name)">{{node.name}}</span>
+    </mat-tree-node>
+  </mat-tree>
+</div>
+
+<div style="height: 10%">
+  <button style="margin: 1em;
+  background-color: #3f51b5;
+  color: white;
+  border-radius: 2em;
+  padding: 0.5em;">Deploy/Save</button>
+  <button style="margin: 1em;
+  background-color: #3f51b5;
+  color: white;
+  border-radius: 2em;
+  padding: 0.5em;">Download</button>
+</div>
+
+</div>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.scss
new file mode 100644 (file)
index 0000000..22941b5
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.spec.ts
new file mode 100644 (file)
index 0000000..c9be19d
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DeployTemplateComponent } from './deploy-template.component';
+
+describe('DeployTemplateComponent', () => {
+  let component: DeployTemplateComponent;
+  let fixture: ComponentFixture<DeployTemplateComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ DeployTemplateComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(DeployTemplateComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.component.ts
new file mode 100644 (file)
index 0000000..ab636b9
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { Component, OnInit } from '@angular/core';
+import {FlatTreeControl} from '@angular/cdk/tree';
+import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
+
+interface FoodNode {
+  name: string;
+  children?: FoodNode[];
+}
+
+const TREE_DATA: FoodNode[] = [
+  {
+    name: 'Definitions',
+    children: [
+      {name: 'activation-blueprint.json'},
+      {name: 'artifacts_types.json'},
+      {name: 'data_types.json'},
+    ]
+  }, 
+  {
+    name: 'Scripts',
+    children: [
+      {
+        name: 'kotlin',
+        children: [
+          {name: 'ScriptComponent.cba.kts'},
+          {name: 'ResourceAssignmentProcessor.cba.kts'},
+        ]
+      }
+    ]
+  },
+  {
+    name: 'Templates',
+    children: [
+      {
+        name: 'baseconfig-template'
+      }
+    ]
+  },
+  {
+    name: 'TOSCA-Metada',
+    children: [
+      {
+        name: 'TOSCA.meta'
+      }
+    ]
+  },
+];
+
+/** Flat node with expandable and level information */
+interface ExampleFlatNode {
+  expandable: boolean;
+  name: string;
+  level: number;
+}
+
+@Component({
+  selector: 'app-deploy-template',
+  templateUrl: './deploy-template.component.html',
+  styleUrls: ['./deploy-template.component.scss']
+})
+export class DeployTemplateComponent implements OnInit {
+
+  private transformer = (node: FoodNode, level: number) => {
+    return {
+      expandable: !!node.children && node.children.length > 0,
+      name: node.name,
+      level: level,
+    };
+  }
+
+  treeControl = new FlatTreeControl<ExampleFlatNode>(
+      node => node.level, node => node.expandable);
+
+  treeFlattener = new MatTreeFlattener(
+      this.transformer, node => node.level, node => node.expandable, node => node.children);
+
+  dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
+
+  constructor() { 
+    this.dataSource.data = TREE_DATA;
+  }
+
+  hasChild = (_: number, node: ExampleFlatNode) => node.expandable;
+
+  ngOnInit() {
+  }
+
+  fileClicked(file) {
+    console.log('selected file:' + file);
+  }
+
+}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/deploy-template/deploy-template.module.ts
new file mode 100644 (file)
index 0000000..5d5a600
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { DeployTemplateComponent } from './deploy-template.component';
+import { DeployTemplateRoutingModule } from './deploy-template-routing.module';
+import { AppMaterialModule } from '../../../common/modules/app-material.module';
+
+@NgModule({
+  declarations: [
+    DeployTemplateComponent
+  ],
+  exports: [
+    DeployTemplateComponent
+  ],
+  imports: [
+    CommonModule,
+    DeployTemplateRoutingModule,
+    AppMaterialModule
+  ]
+})
+export class DeployTemplateModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.html b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.html
new file mode 100644 (file)
index 0000000..3ab8f24
--- /dev/null
@@ -0,0 +1,139 @@
+<!-- 
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================ -->
+<div class="designerTmp">
+    <div class="outerDiv divone">
+        <mat-accordion>
+            <mat-expansion-panel>
+                <mat-expansion-panel-header style="background-color: #f1f1f1">
+                    <mat-panel-title>
+                        Node types
+                    </mat-panel-title>
+                </mat-expansion-panel-header>
+                <div class="flex-container">
+                    <div class="item-box" *ngFor="let item of todo" cdkDrag>{{item}}</div>
+                </div>
+            </mat-expansion-panel>
+
+            <mat-expansion-panel>
+                <mat-expansion-panel-header style="background-color: #f1f1f1">
+                    <mat-panel-title>
+                        Policy
+                    </mat-panel-title>
+                </mat-expansion-panel-header>
+                <div class="flex-container">
+                    <div class="item-box">Policy 1</div>
+                    <div class="item-box">Policy 1</div>
+                    <div class="item-box">Policy 1</div>
+                </div>
+            </mat-expansion-panel>
+        </mat-accordion>
+    </div>
+    <div class="outerDiv divtwo">
+        <svg id="svgArea" width="1000px" height="100%" style="background-color:white">
+        </svg>
+    </div>
+    <div id="overlay" class="outerDiv divThree">
+        <mat-accordion style="width: 100%">
+
+            <mat-expansion-panel (opened)="panelOpenState = true" (closed)="panelOpenState = false">
+                <mat-expansion-panel-header style="background-color: #f1f1f1">
+                    <mat-panel-title>
+                        Type
+                    </mat-panel-title>
+                </mat-expansion-panel-header>
+
+                <div class="item-list">
+                    <div class="item-box">vnf-netconf-device</div>
+                </div>
+            </mat-expansion-panel>
+
+            <mat-expansion-panel>
+                <mat-expansion-panel-header style="background-color: #f1f1f1">
+                    <mat-panel-title>
+                        Properties
+                    </mat-panel-title>
+                </mat-expansion-panel-header>
+            </mat-expansion-panel>
+
+            <mat-expansion-panel (opened)="panelOpenState = true" (closed)="panelOpenState = false">
+                <mat-expansion-panel-header style="background-color: #f1f1f1">
+                    <mat-panel-title>
+                        Interface
+                    </mat-panel-title>
+                </mat-expansion-panel-header>
+
+                <div class="item-list">
+                    <div class="item-box" *ngFor="let item of review" cdkDrag>{{item}}</div>
+                </div>
+            </mat-expansion-panel>
+
+            <mat-expansion-panel (opened)="panelOpenState = true" (closed)="panelOpenState = false">
+                <mat-expansion-panel-header style="background-color: #f1f1f1">
+                    <mat-panel-title>
+                        Interface
+                    </mat-panel-title>
+                </mat-expansion-panel-header>
+
+                <div class="item-list">
+                    <div class="item-box" *ngFor="let item of review" cdkDrag>{{item}}</div>
+                </div>
+            </mat-expansion-panel>
+
+            <mat-expansion-panel (opened)="panelOpenState = true" (closed)="panelOpenState = false">
+                <mat-expansion-panel-header style="background-color: #f1f1f1">
+                    <mat-panel-title>
+                        Artifacts
+                    </mat-panel-title>
+                </mat-expansion-panel-header>
+
+                <div class="item-list">
+                    <div class="item-box" *ngFor="let item of review" cdkDrag>{{item}}</div>
+                </div>
+            </mat-expansion-panel>
+
+            <mat-expansion-panel (opened)="panelOpenState = true" (closed)="panelOpenState = false">
+                <mat-expansion-panel-header style="background-color: #f1f1f1">
+                    <mat-panel-title>
+                        Inputs
+                    </mat-panel-title>
+                </mat-expansion-panel-header>
+
+                <div class="item-list">
+                    <div class="item-box" *ngFor="let item of review" cdkDrag>{{item}}</div>
+                </div>
+            </mat-expansion-panel>
+
+            <mat-expansion-panel (opened)="panelOpenState = true" (closed)="panelOpenState = false">
+                <mat-expansion-panel-header style="background-color: #f1f1f1">
+                    <mat-panel-title>
+                        Capabilities
+                    </mat-panel-title>
+                </mat-expansion-panel-header>
+
+                <div class="item-list">
+                    <div class="item-box" *ngFor="let item of review" cdkDrag>{{item}}</div>
+                </div>
+            </mat-expansion-panel>
+
+
+
+        </mat-accordion>
+    </div>
+</div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.scss
new file mode 100644 (file)
index 0000000..4af1072
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+.outerDiv {
+    display: flex;
+    // align-items: center;
+    // justify-content: center;
+    margin: 1px;
+    padding: 16px;
+    border-radius: 8px;
+  }
+
+  .divone {
+    height: 100%;
+    width: 18%;
+    background-color: #D7D1D1;
+  }
+.divtwo {
+  height: 100%;
+    width: 100%;
+    background-color: #D7D1D1;
+}
+.divThree{
+  width: 30%;
+  height: 100%;
+  background-color: #D7D1D1;
+}
+
+.flex-container {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.flex-container > div {
+  background-color: #f1f1f1;
+  width: 53px;
+  margin: 2px;
+  text-align: center;
+  line-height: 53px;
+  font-size: 13px;
+}
+.cnv
+{
+  background-image: url('http://i.imgur.com/M3PFd.png');
+  background-position: 39px 32px;
+  background-repeat: repeat;
+  width: 100%
+}
+.designerTmp {
+  display: flex; 
+  flex-direction: row; 
+  height: 490px;
+  width: 100%
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.spec.ts
new file mode 100644 (file)
index 0000000..41d5792
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DesignerComponent } from './designer.component';
+
+describe('DesignerComponent', () => {
+  let component: DesignerComponent;
+  let fixture: ComponentFixture<DesignerComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ DesignerComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(DesignerComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/designer/designer.component.ts
new file mode 100644 (file)
index 0000000..b8f88d9
--- /dev/null
@@ -0,0 +1,246 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Component, OnInit, ViewChild, ElementRef, Output, EventEmitter } from '@angular/core';
+import * as d3 from 'd3';
+import { text } from 'd3';
+
+@Component({
+  selector: 'app-designer',
+  templateUrl: './designer.component.html',
+  styleUrls: ['./designer.component.scss']
+})
+export class DesignerComponent implements OnInit {
+  @Output() onNodeSelect = new EventEmitter();
+  @ViewChild('svgArea') graphContainer: ElementRef;
+  dataForsimulation;
+  svg;
+  svgWidth;
+  svgHeight;
+
+
+  simulation;
+
+  constructor() {    
+    this.dataForsimulation = {"nodes" :[],
+                              "links": []
+                            }
+    
+   
+    d3.json("../../../../../assets/activation-blueprint.json")
+    .then((data)=>{
+      console.log(data);
+      this.buildD3DataNodes(data);
+      //this.buildD3DataLinks(data);
+      this.drawNode();
+    });
+   }
+
+  ngOnInit() {
+  }
+
+  ngAfterContentInit()  {
+    
+  }
+
+  drawNode() {
+    this.svg = d3.select('#svgArea')
+              .style('back-ground-color', 'white');
+    
+    this.svgWidth = this.svg._groups[0][0].width.baseVal.value;
+    this.svgHeight = this.svg._groups[0][0].height.baseVal.value;
+
+    console.log('width', this.svgWidth);
+
+    let xbyMath;
+    let ybyMath;
+    let X= 10;
+    let Y=10;
+
+    let transformString = "translate(" + X + "," + Y + ")";
+    this.dataForsimulation.nodes.forEach((d, i)=> {
+      let id= 'g'+i;
+
+      // xbyMath =  Math.random() * ( this.svgWidth - 50 -  105  ) + ( 105/2 + 10 );
+      // ybyMath =  Math.random() * ( this.svgWidth - 20 -  100  ) + ( 100/2 + 10 );
+
+      xbyMath = Math.floor(Math.random() * ((this.svgWidth-110) - 100 + 1)) + 100;
+      ybyMath = Math.floor(Math.random() * ((this.svgHeight-110) - 100 + 1)) + 100;
+
+      transformString =  "translate(" + xbyMath + "," + ybyMath + ")"; 
+      
+      let gEleId = 'g'+i;
+      let nodeTemprectId = gEleId+name
+      let requirement = gEleId+name+'requirement';
+        this.svg.append('g')
+          .attr('id', gEleId);
+        
+        let firstg = d3.select('#g'+i)
+                    .attr('transform', transformString);
+
+        firstg.append('rect')
+              .attr('id', d.name)
+              .attr("x", 0)
+               .attr("y", 0)
+               .attr("rx", 20)
+                .attr("ry", 20)
+                .attr('width', 100)
+                .attr('height', 100)
+                .attr('fill', 'white')
+                 .attr('stroke', 'black')
+                 .attr('opacity', 0.6)
+                 .on('mouseover', () => this.handleMouseOver());
+
+          d.x = xbyMath;
+          d.y = ybyMath;
+                
+        firstg.append('circle')
+                    .attr('cx', 97)
+                    .attr('cy', 20)
+                    .attr('r', 5)
+                    .attr('fill', 'orange')
+
+        if(d.requirementsArray) {
+          d.requirementsArray.forEach(requirement =>{
+            firstg.append('circle')
+                      .attr('id', d.name+requirement.name)
+                      .attr('cx', 97)
+                      .attr('cy', 60)
+                      .attr('r', 5)
+                      .attr('fill', 'blue')
+            requirement.x = xbyMath + 95;
+            requirement.y = ybyMath + 60;
+          });
+        }
+
+        if(d.capabilitiesArray) {
+          d.capabilitiesArray.forEach(capability =>{
+            firstg.append('circle')
+                        .attr('id', d.name+capability.name)
+                        .attr('cx', 97)
+                        .attr('cy', 40)
+                        .attr('r', 5)
+                        .attr('fill', 'green');
+            capability.x = xbyMath + 97;
+            capability.y = ybyMath + 40;
+          }); 
+        }
+          
+        
+        firstg.append('text')
+                    .attr('x', 0)
+                    .attr('y', 115)
+                    .text(d.name);
+          
+       // X = X +120;
+       // Y = 10;
+    });
+    this.buildD3DataLinks();
+  }
+
+  buildD3DataNodes(data) {
+    let d3data;
+    d3data = data.topology_template.node_templates;
+    console.log('d3data:', d3data);
+    let finalData = [];
+    for (var property1 in d3data) {
+      d3data[property1].name = property1;
+      this.dataForsimulation.nodes.push(d3data[property1]);
+      finalData.push(d3data[property1]);
+    }
+
+    this.dataForsimulation.nodes.forEach(node => {
+      for( var nodeProperty in node) {
+        if(nodeProperty == 'requirements' || nodeProperty == 'capabilities') {
+            let arrayName = nodeProperty + 'Array';
+            node[arrayName] = [];
+            for(var reqProperty in node[nodeProperty]) {
+              node[nodeProperty][reqProperty].name = reqProperty;
+              node[arrayName].push(node[nodeProperty][reqProperty])
+            }
+            
+        console.log('node array:', + node[arrayName]);
+        }
+      }
+    });
+    console.log( this.dataForsimulation);
+  
+  
+  }
+
+ buildD3DataLinks() {
+  this.dataForsimulation.nodes.forEach((node) => {
+    if(node.requirementsArray && node.requirementsArray.length > 0) {
+      node.requirementsArray.forEach(requirement => {
+        let linkObject = {};
+        linkObject['sourceName'] = node.name + requirement.name;
+        linkObject['sourceid'] = node.name + requirement.name;
+        linkObject['sourceX'] = requirement.x;
+        linkObject['sourceY'] = requirement.y;
+        linkObject['targetNode'] = requirement.node;
+        linkObject['targetCapabilility'] = requirement.capability;
+        linkObject['ele'] = d3.select('#'+ linkObject['sourceid']);
+        this.dataForsimulation.links.push(linkObject);
+      });      
+    }
+  });
+
+  this.capabilityTargets();
+ }
+
+ capabilityTargets() {
+   this.dataForsimulation.links.forEach(link=>{
+    this.dataForsimulation.nodes.forEach(node=>{
+          if(node.name == link.targetNode && node.capabilitiesArray) {
+            node.capabilitiesArray.forEach(capability=>{
+              if(capability.name == link.targetCapabilility) {
+                link['targetX'] = capability.x;
+                link['targetY'] = capability.y;
+              }
+            })
+          }
+      });
+   });
+
+   this.drawlink();
+ }
+
+ drawlink() {
+   this.dataForsimulation.links.forEach(link=>{
+      this.svg.append('line')
+      .attr('x1', link.sourceX)
+      .attr('y1', link.sourceY)
+      .attr('x2', link.targetX)
+      .attr('y2', link.targetY)
+      .attr('stroke','gray')
+      .attr('stroke-width', 2);
+   });
+ }
+
+ handleMouseOver() {
+  console.log('mouse over');
+ }
+
+ trigerNodeSelectEvent(d) {
+  this.onNodeSelect.emit(d);
+}
+
+}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.html
new file mode 100644 (file)
index 0000000..308f9cc
--- /dev/null
@@ -0,0 +1,42 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================ -->
+
+<div class="container">
+    <div class="fileViewContainer">
+        <mat-tree [dataSource]="dataSource" [treeControl]="treeControl" style="background-color: #ebebeb">
+            <mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)="selectFileToView(node);activeNode = node" [ngClass]="{ 'background-highlight': activeNode === node }">
+                <button mat-icon-button disabled></button>
+                <button mat-icon-button (click)="selectFileToView(node)">{{node.name}}</button>
+            </mat-tree-node>
+            <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding>
+                <button mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
+                <mat-icon class="mat-icon-rtl-mirror">
+                  {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
+                </mat-icon>
+              </button>
+                <button mat-icon-button>{{node.name}}</button>
+            </mat-tree-node>
+        </mat-tree>
+    </div>
+    <div class="editorConatiner">
+        <i class="fa fa-save save-icon" style="font-size:24px" (click)="updateBlueprint()"></i>
+        <ace-editor [(text)]="text" [(mode)]="mode" #editor class="aceEditor"></ace-editor>
+    </div>
+</div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.scss
new file mode 100644 (file)
index 0000000..2f16af7
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+.container {
+    display: flex;
+    flex-direction: row;
+    margin-top: 8px;
+    .fileViewContainer {
+        width: 20%;
+        margin: 2px;
+        height: 490px !important;
+        overflow-x: scroll;
+        overflow-y: scroll;
+        background-color: #ebebeb;
+    }
+    .editorConatiner {
+        width: 80%;
+        background-color: gainsboro;
+        height: 490px !important;
+    }
+}
+
+.aceEditor {
+    overflow: hidden;
+    height: 100% !important;
+    background-color: white !important;
+    border: 1px solid #3f51b5;
+    // border-left: 5px solid #3f51b5;
+}
+.savebtn {
+    color: white;
+    background-color: #3f51b5;
+    position: absolute;
+    bottom: 5px;
+}
+.save-icon{
+    position: absolute;
+    left: 59em;
+    color: #3f51b5;
+    font-size: 24px;
+    cursor: pointer;
+    z-index: 1;
+}
+
+.background-highlight {
+    background-color: whitesmoke !important;
+  }
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/editor/editor.component.spec.ts
new file mode 100644 (file)
index 0000000..64dcd11
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { EditorComponent } from './editor.component';
+
+describe('EditorComponent', () => {
+  let component: EditorComponent;
+  let fixture: ComponentFixture<EditorComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ EditorComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(EditorComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
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
new file mode 100644 (file)
index 0000000..e48177d
--- /dev/null
@@ -0,0 +1,242 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { FlatTreeControl } from '@angular/cdk/tree';
+import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
+import { IBlueprint } from 'src/app/common/core/store/models/blueprint.model';
+import "ace-builds/webpack-resolver";
+import 'brace';
+import 'brace/ext/language_tools';
+import 'ace-builds/src-min-noconflict/snippets/html';
+import * as JSZip from 'jszip';
+import { saveAs } from 'file-saver';
+
+import { IAppState } from '../../../../common/core/store/state/app.state';
+import { Store } from '@ngrx/store';
+import { Observable } from 'rxjs';
+import { IBlueprintState } from 'src/app/common/core/store/models/blueprintState.model';
+import { LoadBlueprintSuccess, SetBlueprintState } from '../../../../common/core/store/actions/blueprint.action'
+
+
+interface Node {
+  name: string;
+  children?: Node[];
+  data?: any
+}
+
+const TREE_DATA: Node[] = [
+  {
+    name: 'Definitions',
+    children: [
+      { name: 'activation-blueprint.json' },
+      { name: 'artifacts_types.json' },
+      { name: 'data_types.json' },
+    ]
+  }
+];
+
+/** Flat node with expandable and level information */
+interface ExampleFlatNode {
+  expandable: boolean;
+  name: string;
+  level: number;
+}
+
+
+@Component({
+  selector: 'app-editor',
+  templateUrl: './editor.component.html',
+  styleUrls: ['./editor.component.scss']
+})
+export class EditorComponent implements OnInit {
+
+  @ViewChild('editor') editor;
+  blueprintdata: IBlueprint;
+  blueprint: IBlueprint;
+  bpState: Observable<IBlueprintState>;
+  text: string;
+  filesTree: any = [];
+  filesData: any = [];
+  selectedFile: string;
+  zipFolder: any;
+  blueprintName: string;
+  fileExtension: string;
+  mode: string;
+  private zipFile: JSZip = new JSZip();
+  activeNode: any;
+
+  private transformer = (node: Node, level: number) => {
+    return {
+      expandable: !!node.children && node.children.length > 0,
+      name: node.name,
+      level: level,
+    };
+  }
+
+  treeControl = new FlatTreeControl<ExampleFlatNode>(
+    node => node.level, node => node.expandable);
+
+  treeFlattener = new MatTreeFlattener(
+    this.transformer, node => node.level, node => node.expandable, node => node.children);
+
+  dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
+
+  constructor(private store: Store<IAppState>) {
+    this.dataSource.data = TREE_DATA;
+    this.bpState = this.store.select('blueprint');
+    // this.dataSource.data = TREE_DATA;
+  }
+
+  hasChild = (_: number, node: ExampleFlatNode) => node.expandable;
+
+  ngOnInit() {
+    this.editorContent();
+    this.dataSource.data = this.filesTree;
+  }
+
+  fileClicked(file) {
+    console.log('selected file:' + file);
+  }
+  editorContent() {
+    this.editor.setTheme("eclipse");
+    this.editor.getEditor().setOptions({
+      // enableBasicAutocompletion: true,
+      fontSize: "100%",
+      printMargin: false,
+    });
+    this.editor.getEditor().commands.addCommand({
+      name: "showOtherCompletions",
+      bindKey: "Ctrl-.",
+      exec: function (editor) {
+
+      }
+    })
+    this.bpState.subscribe(
+      blueprintdata => {
+        var blueprintState: IBlueprintState = { blueprint: blueprintdata.blueprint, isLoadSuccess: blueprintdata.isLoadSuccess, isSaveSuccess: blueprintdata.isSaveSuccess, isUpdateSuccess: blueprintdata.isUpdateSuccess };
+        this.blueprintdata = blueprintState.blueprint;
+        this.filesTree = blueprintdata.files;
+        this.filesData = blueprintdata.filesData;
+        this.dataSource.data = this.filesTree;
+        this.blueprintName = blueprintdata.name;
+        let blueprint = [];
+        for (let key in this.blueprintdata) {
+          if (this.blueprintdata.hasOwnProperty(key)) {
+            blueprint.push(this.blueprintdata[key]);
+          }
+        }
+        // this.text = JSON.stringify(this.blueprintdata, null, '\t');
+        // this.editor.getEditor().getSession().setMode("ace/mode/json");
+        this.editor.getEditor().getSession().setTabSize(2);
+        this.editor.getEditor().getSession().setUseWrapMode(true);
+        this.setEditorMode();
+      })
+  }
+
+  updateBlueprint() {
+    console.log(this.blueprint);
+    this.filesData.forEach(fileNode => {
+      if (fileNode.name.includes(this.blueprintName.trim()) && fileNode.name.includes(this.selectedFile.trim())) {
+        fileNode.data = this.text;
+      } else if (fileNode.name.includes(this.selectedFile.trim())) {
+        fileNode.data = this.text;
+      }
+    });
+
+    if (this.selectedFile == this.blueprintName.trim()) {
+      this.blueprint = JSON.parse(this.text);
+    } else {
+      this.blueprint = this.blueprintdata;
+    }
+
+    let blueprintState = {
+      blueprint: this.blueprint,
+      name: this.blueprintName,
+      files: this.filesTree,
+      filesData: this.filesData
+    }
+    this.store.dispatch(new SetBlueprintState(blueprintState));
+    // console.log(this.text);
+  }
+
+  selectFileToView(file) {
+    this.selectedFile = file.name;
+    this.filesData.forEach((fileNode) => {
+      if (fileNode.name.includes(file.name)) {
+        this.text = fileNode.data;
+      }
+    })
+    this.fileExtension = this.selectedFile.substr(this.selectedFile.lastIndexOf('.') + 1);
+    // console.log(this.fileExtension);
+    this.setEditorMode();
+  }
+
+  SaveToBackend() {
+    this.zipFile.generateAsync({ type: "blob" })
+      .then(blob => {
+
+      });
+  }
+
+  deploy() {
+    // to do
+  }
+
+  create() {
+    this.filesData.forEach((path) => {
+      this.zipFile.file(path.name, path.data);
+    });
+  }
+
+  download() {
+    this.create();
+    var zipFilename = "baseconfiguration.zip";
+    this.zipFile.generateAsync({ type: "blob" })
+      .then(blob => {
+        saveAs(blob, zipFilename);
+      });
+  }
+  setEditorMode() {
+    switch (this.fileExtension) {
+      case "xml":
+        this.mode = 'xml';
+        break;
+      case "py":
+        this.mode = 'python';
+        break;
+      case "kts":
+        this.mode = 'kotlin';
+        break;
+      case "txt":
+        this.mode = 'text';
+        break;
+      case "meta":
+        this.mode = 'text';
+        break;
+      case "vtl":
+        this.mode = 'velocity';
+        break;
+      default:
+        this.mode = 'json';
+    }
+  }
+}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template-routing.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template-routing.module.ts
new file mode 100644 (file)
index 0000000..d1d140f
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { ModifyTemplateComponent } from './modify-template.component';
+
+
+const routes: Routes = [
+    {
+        path: '',
+        component: ModifyTemplateComponent
+    }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class ModifyTemplateRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.html b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.html
new file mode 100644 (file)
index 0000000..a77be5b
--- /dev/null
@@ -0,0 +1,47 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+
+<div class="modifyTemp">
+  <app-designer *ngIf="designerMode" (onNodeSelect)="on = !on; viewNodeDetails($event)"></app-designer>
+  <app-editor class="editor-selector" *ngIf="editorMode"></app-editor>
+</div>
+
+<div style="display: flex;flex-direction: row">
+    <div style="width: 30em;">
+    <button class="btn-active" (click) ="changeView()">{{viewText}}</button>
+    </div>
+    <div style="width: 16em">        
+    </div>
+    <div style="width: 100%;height: 3em;">
+        <div style="display: flex;flex-direction: row-reverse">        
+        <button class="btn-active" (click)="downloadCBA()">Download</button>
+        <button [disabled]="!isEnriched" [ngClass]="{ 'mat-button-active': isEnriched, 'mat-button-disablled': !isEnriched}" mat-button [matMenuTriggerFor]="menu">Deploy</button>
+         <mat-menu #menu="matMenu">
+                  <button mat-menu-item>Deploy</button>
+                  <button mat-menu-item>Test</button>
+          </mat-menu>
+        <button [disabled]="!isEnriched" [ngClass]="{ 'btn-active': isEnriched, 'btn-disablled': !isEnriched}" class="btn-active">Publish</button>        
+        <button class="btn-active">Save</button>
+        <button class="btn-active">Enrich</button>
+  
+        </div>
+    </div>
+  </div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.scss
new file mode 100644 (file)
index 0000000..609d6fa
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+.modifyTemp {
+    display: flex; 
+    flex-direction: row; 
+    height: 524px;
+    width: 100%
+}
+
+.enrich-btn {
+  cursor: pointer;
+  position: absolute;
+  top: 3.6em;
+  right: 10em;
+  padding: 6px;
+  color: white;
+  background-color:#3f51b5;
+  margin-right: 2em;
+  border-radius: 2em;
+  z-index: 1;
+}
+
+.toggle-view-btn {
+  cursor: pointer;
+  position: absolute;
+  top: 3.6em;
+  right: 3em;
+  padding: 6px;
+  color: white;
+  background-color:#3f51b5;
+  border-radius: 2em;
+  z-index: 1;
+}
+
+.editor-selector {
+  width: 100%;
+}
+
+.mat-button-active{
+  margin: 0.5em;
+    background-color: #3f51b5 !important;
+    color: white !important;
+    border-radius: 4px;
+    border: none;
+    line-height: none !important;
+    // padding: 0.5em;
+    min-width: 6em;
+    cursor: pointer;
+}
+
+.mat-button-disablled {
+    background-color: #c5cae8 !important;
+    border-radius: 4px;
+    color: darkgray !important;
+    line-height: none !important;
+    margin: 0.5em;
+    // padding: 0.5em;
+    min-width: 6em;
+    cursor: initial;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.spec.ts
new file mode 100644 (file)
index 0000000..a2bd046
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ModifyTemplateComponent } from './modify-template.component';
+
+describe('ModifyTemplateComponent', () => {
+  let component: ModifyTemplateComponent;
+  let fixture: ComponentFixture<ModifyTemplateComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ModifyTemplateComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ModifyTemplateComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.component.ts
new file mode 100644 (file)
index 0000000..e39ce01
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Component, OnInit, ViewChild } from '@angular/core';
+
+import { EditorComponent } from './editor/editor.component';
+
+@Component({
+  selector: 'app-modify-template',
+  templateUrl: './modify-template.component.html',
+  styleUrls: ['./modify-template.component.scss']
+})
+export class ModifyTemplateComponent implements OnInit {
+
+  isEnriched: boolean = false;
+  designerMode: boolean = false;
+  editorMode: boolean = true;
+  viewText: string = "Designer View";
+
+  @ViewChild(EditorComponent) editorComp: EditorComponent;
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+  viewNodeDetails(nodeTemplate) {
+    console.log(nodeTemplate);
+  }
+
+  changeView() {
+    if(this.viewText == 'Editor View') {
+      this.editorMode =  true;
+      this.designerMode = false;
+      this.viewText = 'Designer View'
+    } else {
+      this.editorMode =  false;
+      this.designerMode = true;
+      this.viewText = 'Editor View'
+    }
+  }
+
+  downloadCBA() {
+    this.editorComp.download();
+  }
+
+}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/modify-template/modify-template.module.ts
new file mode 100644 (file)
index 0000000..3aef2a7
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { CdkTableModule } from '@angular/cdk/table';
+
+import { ModifyTemplateComponent } from './modify-template.component';
+import { ModifyTemplateRoutingModule } from './modify-template-routing.module';
+import { AppMaterialModule } from '../../../common/modules/app-material.module';
+import { DesignerComponent } from './designer/designer.component';
+import { EditorComponent } from './editor/editor.component';
+import { AceEditorModule } from 'ng2-ace-editor';
+
+@NgModule({
+  declarations: [
+    ModifyTemplateComponent,
+    DesignerComponent,
+    EditorComponent
+  ],
+  exports: [
+    ModifyTemplateComponent,
+    DesignerComponent,
+    AceEditorModule
+  ],
+  imports: [
+    CommonModule,
+    CdkTableModule,
+    AppMaterialModule,
+    ModifyTemplateRoutingModule,
+    AceEditorModule
+  ]
+})
+export class ModifyTemplateModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.html b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.html
new file mode 100644 (file)
index 0000000..cdfea25
--- /dev/null
@@ -0,0 +1,46 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+
+<form [formGroup]="CBAMetadataForm" (ngSubmit)="UploadMetadata()">
+    <div class="formDisplay">
+        <mat-form-field class="form-field">
+            <input matInput placeholder="Template Author" id="CBA_File_Name" formControlName="template_author">
+        </mat-form-field>
+        <mat-form-field class="form-field">
+            <input matInput placeholder="Author Email" id="author_email" formControlName="author_email">
+        </mat-form-field>
+        <mat-form-field class="form-field">
+            <input matInput placeholder="User Groups" id="user_groups" formControlName="user_groups">
+        </mat-form-field>
+    </div>
+    <div class="formDisplay">
+        <mat-form-field class="form-field">
+            <input matInput placeholder="Template Name" id="template_name" formControlName="template_name">
+        </mat-form-field>
+        <mat-form-field class="form-field">
+            <input matInput placeholder="Template Version" id="template_version" formControlName="template_version">
+        </mat-form-field>
+        <mat-form-field class="form-field">
+            <input matInput placeholder="Template Tags" id="template_tags" formControlName="template_tags">
+        </mat-form-field>
+    </div>
+    <button mat-button class="matBtn" type="submit" [disabled]="!CBAMetadataForm.valid">Save Metadata</button>
+</form>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.scss
new file mode 100644 (file)
index 0000000..1e49773
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+.form-field {
+    width: 50%;
+    margin: 10px;
+}
+
+.formDisplay {
+    display: flex;
+    flex-direction: row;
+}
+
+.matBtn {
+    color: white;
+    background:#3f51b5;
+    margin-top: 10px;
+    position: absolute;
+    border-radius: 4px;
+    min-width: 6em;
+    cursor: pointer;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.spec.ts
new file mode 100644 (file)
index 0000000..a903ae0
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { MetadataComponent } from './metadata.component';
+
+describe('MetadataComponent', () => {
+  let component: MetadataComponent;
+  let fixture: ComponentFixture<MetadataComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ MetadataComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(MetadataComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts
new file mode 100644 (file)
index 0000000..2327a58
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Component, OnInit } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { Observable } from 'rxjs';
+import { Store } from '@ngrx/store';
+import { A11yModule } from '@angular/cdk/a11y';
+
+import { IAppState } from '../../../../common/core/store/state/app.state';
+import { IBlueprintState } from 'src/app/common/core/store/models/blueprintState.model';
+import { IBlueprint } from 'src/app/common/core/store/models/blueprint.model';
+import { IMetaData } from '../../../../common/core/store/models/metadata.model';
+import { LoadBlueprintSuccess } from 'src/app/common/core/store/actions/blueprint.action';
+
+@Component({
+  selector: 'app-metadata',
+  templateUrl: './metadata.component.html',
+  styleUrls: ['./metadata.component.scss']
+})
+export class MetadataComponent implements OnInit {
+  CBAMetadataForm: FormGroup;
+  metadata: IMetaData;
+  bpState: Observable<IBlueprintState>;
+  blueprint: IBlueprint;
+  
+  constructor(private formBuilder: FormBuilder, private store: Store<IAppState>) {
+    this.bpState = this.store.select('blueprint');
+    this.CBAMetadataForm = this.formBuilder.group({
+      template_author: ['', Validators.required],
+      author_email: ['', Validators.required],
+      user_groups: ['', Validators.required],
+      template_name: ['', Validators.required],
+      template_version: ['', Validators.required],
+      template_tags: ['', Validators.required]
+    });
+  }
+
+  ngOnInit() {
+    this.bpState.subscribe(
+      blueprintdata => {
+        var blueprintState: IBlueprintState = { blueprint: blueprintdata.blueprint, isLoadSuccess: blueprintdata.isLoadSuccess, isSaveSuccess: blueprintdata.isSaveSuccess, isUpdateSuccess: blueprintdata.isUpdateSuccess };
+        this.metadata = blueprintState.blueprint.metadata;
+        this.blueprint = blueprintState.blueprint;
+        let metadatavalues = [];
+        for (let key in this.metadata) {
+          if (this.metadata.hasOwnProperty(key)) {
+            metadatavalues.push(this.metadata[key]);
+          }
+        }
+        let temp_author = metadatavalues[0];
+        console.log(temp_author);
+        this.CBAMetadataForm = this.formBuilder.group({
+          template_author: [metadatavalues[0], Validators.required],
+          author_email: [metadatavalues[1], Validators.required],
+          user_groups: [metadatavalues[2], Validators.required],
+          template_name: [metadatavalues[3], Validators.required],
+          template_version: [metadatavalues[4], Validators.required],
+          template_tags: [metadatavalues[5], Validators.required]
+        });
+      })
+  }
+
+  UploadMetadata() {
+    this.metadata = Object.assign({}, this.CBAMetadataForm.value);
+    this.blueprint.metadata = this.metadata;
+    this.store.dispatch(new LoadBlueprintSuccess(this.blueprint));
+  }
+
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.html
new file mode 100644 (file)
index 0000000..b58be9f
--- /dev/null
@@ -0,0 +1,26 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+<div>
+    <input type="file" accept=".zip" (change)="fileChanged($event)">
+</div>
+<div>
+    <button mat-button matStepperNext (click)="updateBlueprintState()" [ngClass] = "{'mat-upload-btn-disabled': !validfile, 'matStepNextBtn': validfile}" [disabled]="!validfile">Upload</button>
+</div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.scss
new file mode 100644 (file)
index 0000000..beb05e2
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+.matStepNextBtn {
+    color: white;
+    background-color: #3f51b5;
+    margin-top: 10px;
+    position: absolute;
+    margin-bottom: 5px;
+    border-radius: 4px;
+    min-width: 6em;
+    cursor: pointer;
+}
+
+.mat-upload-btn-disabled {
+    background-color: #c5cae8;
+    margin-top: 10px;
+    border-radius: 4px;
+    margin-bottom: 5px;
+    color: darkgray;
+    min-width: 6em;
+    border: none;
+    cursor: initial;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.spec.ts
new file mode 100644 (file)
index 0000000..5bf914c
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SearchTemplateComponent } from './search-template.component';
+
+describe('SearchTemplateComponent', () => {
+  let component: SearchTemplateComponent;
+  let fixture: ComponentFixture<SearchTemplateComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ SearchTemplateComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(SearchTemplateComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
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
new file mode 100644 (file)
index 0000000..777faee
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Component, OnInit, EventEmitter, Output, ViewChild } from '@angular/core';
+import { Store } from '@ngrx/store';
+import * as JSZip from 'jszip';
+import { Observable } from 'rxjs';
+
+import { IBlueprint } from '../../../../common/core/store/models/blueprint.model';
+import { IBlueprintState } from '../../../../common/core/store/models/blueprintState.model';
+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';
+
+@Component({
+  selector: 'app-search-template',
+  templateUrl: './search-template.component.html',
+  styleUrls: ['./search-template.component.scss']
+})
+export class SearchTemplateComponent implements OnInit {
+  file: File;
+  localBluePrintData: IBlueprint;
+  fileText: object[];
+  blueprintState: IBlueprintState;
+  bpState: Observable<IBlueprintState>;
+  validfile: boolean = false;
+
+  @ViewChild('fileInput') fileInput;
+  result: string = '';
+
+  private paths = [];
+  private tree;
+  private zipFile: JSZip = new JSZip();
+  private fileObject: any;
+  private activationBlueprint: any;
+  private tocsaMetadaData: any;
+  private blueprintName: string;
+
+  constructor(private store: Store<IAppState>) { }
+
+  ngOnInit() {
+  }
+
+  fileChanged(e: any) {
+    this.file = e.target.files[0];
+    this.zipFile.files = {};
+    this.zipFile.loadAsync(this.file)
+      .then((zip) => {
+        if(zip) {            
+          this.buildFileViewData(zip);
+        }
+      });
+  }
+
+  updateBlueprintState() {
+    let data: IBlueprint = this.activationBlueprint ? JSON.parse(this.activationBlueprint.toString()) : this.activationBlueprint;
+    let blueprintState = {
+      blueprint: data,
+      name: this.blueprintName,
+      files: this.tree,
+      filesData: this.paths
+    }
+    this.store.dispatch(new SetBlueprintState(blueprintState))
+    // this.store.dispatch(new LoadBlueprintSuccess(data));
+  }
+
+  async buildFileViewData(zip) {
+    this.validfile = false;
+    this.paths = [];
+    for (var file in zip.files) {
+      this.fileObject = {
+        name: zip.files[file].name,
+        data: ''
+      };
+      const value = <any>await  zip.files[file].async('string');
+      this.fileObject.data = value;
+      this.paths.push(this.fileObject); 
+    }
+
+    if(this.paths) {
+      this.paths.forEach(path =>{
+        if(path.name.includes("TOSCA.meta")) {
+          this.validfile = true
+        }
+      });
+    } else {
+      alert('Please update proper file');
+    }
+
+    if(this.validfile) {      
+      this.fetchTOSACAMetadata();
+      this.tree = this.arrangeTreeData(this.paths);
+    } else {
+      alert('Please update proper file with TOSCA metadata');
+    }
+  }
+
+  arrangeTreeData(paths) {
+    const tree = [];
+
+    paths.forEach((path) => {
+
+      const pathParts = path.name.split('/');
+      pathParts.shift();
+      let currentLevel = tree;
+
+      pathParts.forEach((part) => {
+        const existingPath = currentLevel.filter(level => level.name === part);
+
+        if (existingPath.length > 0) {
+          currentLevel = existingPath[0].children;
+        } else {
+          const newPart = {
+            name: part,
+            children: [],
+            data: path.data
+          };
+          if(part.trim() == this.blueprintName.trim()) { 
+            this.activationBlueprint = path.data; 
+            newPart.data = JSON.parse(this.activationBlueprint.toString());            
+            console.log('newpart', newPart);
+          }
+          if(newPart.name !== '') {            
+              currentLevel.push(newPart);
+              currentLevel = newPart.children;
+          }
+        }
+      });
+    });
+    console.log('tree', tree);
+    return tree;
+  }
+
+  fetchTOSACAMetadata() {
+    let toscaData = {};
+    this.paths.forEach(file =>{
+      if(file.name.includes('TOSCA.meta')) {
+        let keys = file.data.split("\n");
+        keys.forEach((key)=>{
+          let propertyData = key.split(':');
+          toscaData[propertyData[0]] = propertyData[1];
+        });
+      }
+    });
+    this.blueprintName = (((toscaData['Entry-Definitions']).split('/'))[1]).toString();;
+    console.log(toscaData);
+  }
+}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template-routing.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template-routing.module.ts
new file mode 100644 (file)
index 0000000..ab310bd
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { SelectTemplateComponent } from './select-template.component';
+import { TemplateOptionsComponent }  from './template-options/template-options.component';
+
+const routes: Routes = [
+    {
+        path: '',
+        component: SelectTemplateComponent
+    }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class SelectTemplateRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.html b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.html
new file mode 100644 (file)
index 0000000..d11b371
--- /dev/null
@@ -0,0 +1,49 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+<mat-vertical-stepper linear>
+    <mat-step [stepControl]="step1FormGroup">
+        <ng-template matStepLabel>Choose CBA Template file</ng-template>
+        <div class="matStepContent">
+            <app-template-options></app-template-options>
+            <br>
+            <div>
+                <button mat-button matStepperNext class="matStepNextBtn">Proceed</button>
+            </div>
+        </div>
+    </mat-step>
+
+    <mat-step [stepControl]="step2FormGroup">
+        <ng-template matStepLabel>Browse CBA Template file</ng-template>
+        <div class="matStepContent">
+            <app-search-template (cbaFile)="fileChange($event)"></app-search-template>
+            <!-- <div>
+                <button mat-button matStepperNext class="matStepNextBtn">Upload</button>
+            </div>-->
+        </div>
+    </mat-step>
+    <mat-step [stepControl]="step3FormGroup">
+        <ng-template matStepLabel>Enter Metadata details</ng-template>
+        <div class="matStepContent">
+            <app-metadata (metadataform)="metaDataDetail($event)"></app-metadata>
+        </div>
+    </mat-step>
+</mat-vertical-stepper>
+<button mat-button matStepperNext class="matStepNextBtn">Next</button>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.scss
new file mode 100644 (file)
index 0000000..37d1feb
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+.matStepNextBtn {
+    color: white;
+    background-color: #3f51b5;
+    margin-top: 10px;
+    position: absolute;
+    margin-bottom: 5px;
+    border-radius: 4px;    
+    min-width: 6em;
+    cursor: pointer;
+}
+
+.matStepContent {
+    margin-top: 15px !important;
+    margin-bottom: 20px !important;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.spec.ts
new file mode 100644 (file)
index 0000000..92ce13e
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SelectTemplateComponent } from './select-template.component';
+
+describe('SelectTemplateComponent', () => {
+  let component: SelectTemplateComponent;
+  let fixture: ComponentFixture<SelectTemplateComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ SelectTemplateComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(SelectTemplateComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.component.ts
new file mode 100644 (file)
index 0000000..d9591dd
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { Component, OnInit } from '@angular/core';
+import { Observable } from 'rxjs';
+import { Store } from '@ngrx/store';
+import { IBlueprint } from 'src/app/common/core/store/models/blueprint.model';
+import { IBlueprintState } from 'src/app/common/core/store/models/blueprintState.model';
+import { IMetaData } from 'src/app/common/core/store/models/metadata.model';
+import { IImportModel } from 'src/app/common/core/store/models/imports.model';
+import { ITopologyTemplate } from 'src/app/common/core/store/models/itopologytemplate.model';
+
+@Component({
+  selector: 'app-select-template',
+  templateUrl: './select-template.component.html',
+  styleUrls: ['./select-template.component.scss']
+})
+export class SelectTemplateComponent implements OnInit {
+  blueprint: IBlueprint;
+  topologyTemplate: ITopologyTemplate;
+  metaData: IMetaData;
+  blueprintState: IBlueprintState;
+  importModel: IImportModel;
+
+  constructor(private store: Store<IBlueprintState>) {
+    // this.importModel.file = '';
+  }
+
+  ngOnInit() {
+  }
+  fileChange(topologyTemp: ITopologyTemplate) {
+    this.topologyTemplate = topologyTemp;
+    console.log(topologyTemp);
+  }
+  metaDataDetail(data: IMetaData) {
+    
+    this.metaData = data;
+    console.log("parent" + this.metaData.author_email);
+  }
+  upload() {
+
+  }
+  // saveBlueprintModel(){
+  //   this.blueprint.toplogyTemplates=this.topologyTemplate;
+  //   this.blueprint.metadata= this.metaData;
+  //  // this.store.dispatch(new CreateBlueprint(this.blueprint));
+  // }
+}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.module.ts
new file mode 100644 (file)
index 0000000..16947d4
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { ReactiveFormsModule } from '@angular/forms';
+import { TemplateOptionsComponent } from './template-options/template-options.component';
+import { SearchTemplateComponent } from './search-template/search-template.component';
+import { MetadataComponent } from './metadata/metadata.component';
+import { SelectTemplateComponent } from './select-template.component';
+import { SelectTemplateRoutingModule } from './select-template-routing.module';
+import { AppMaterialModule } from 'src/app/common/modules/app-material.module';
+
+@NgModule({
+  declarations: [
+    TemplateOptionsComponent,
+    SearchTemplateComponent,
+    MetadataComponent,
+    SelectTemplateComponent
+  ],
+   exports: [
+    TemplateOptionsComponent,
+    SearchTemplateComponent,
+    MetadataComponent,
+    SelectTemplateComponent
+  ],
+  imports: [
+    CommonModule,
+    SelectTemplateRoutingModule,
+    ReactiveFormsModule,
+    AppMaterialModule
+  ]
+})
+export class SelectTemplateModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.html b/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.html
new file mode 100644 (file)
index 0000000..9c2d721
--- /dev/null
@@ -0,0 +1,25 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+<mat-radio-group>
+  <mat-radio-button value="1" (click)="selected(1)">Upload Template file</mat-radio-button><br><br>
+  <mat-radio-button value="2" (click)="selected(2)">Starter Template</mat-radio-button><br><br>
+  <mat-radio-button value="3" (click)="selected(3)">Existing Model File</mat-radio-button>
+</mat-radio-group>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.scss
new file mode 100644 (file)
index 0000000..22941b5
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.spec.ts
new file mode 100644 (file)
index 0000000..dcbdd7d
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TemplateOptionsComponent } from './template-options.component';
+
+describe('TemplateOptionsComponent', () => {
+  let component: TemplateOptionsComponent;
+  let fixture: ComponentFixture<TemplateOptionsComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ TemplateOptionsComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(TemplateOptionsComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/template-options/template-options.component.ts
new file mode 100644 (file)
index 0000000..3b598b2
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Component, OnInit, Output, EventEmitter} from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+@Component({
+  selector: 'app-template-options',
+  templateUrl: './template-options.component.html',
+  styleUrls: ['./template-options.component.scss']
+})
+export class TemplateOptionsComponent implements OnInit {
+  selectedOption: string;
+  @Output() option = new EventEmitter();
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+  selected(value){
+    console.log(value);
+    this.option.emit(value);
+  }
+  // loadTemplateData() {
+  //  // to do
+  // }
+}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template-routing.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template-routing.module.ts
new file mode 100644 (file)
index 0000000..321f80c
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { TestTemplateComponent } from './test-template.component';
+
+const routes: Routes = [
+    {
+        path: '',
+        component: TestTemplateComponent
+    }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class TestTemplateRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.html b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.html
new file mode 100644 (file)
index 0000000..da3580c
--- /dev/null
@@ -0,0 +1,39 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+<div class="testTemplateContainer">
+
+    <div class="editorContainer">
+        <div class="editorDiv">
+            <p>Request</p>
+            <ace-editor [(text)]="text" mode="json" [theme]="eclipse" [options]="options" #editor class="aceEditor"></ace-editor>
+            <div class="btnContainer">
+                <button class="button">Submit</button>
+                <button class="button">Clear</button>
+            </div>
+        </div>
+
+        <div class="editorDiv">
+            <p>Response</p>
+            <ace-editor [(text)]="text" mode="json" [theme]="eclipse" [options]="options" #editor class="aceEditor"></ace-editor>
+        </div>
+    </div>
+
+</div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.scss b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.scss
new file mode 100644 (file)
index 0000000..49d5599
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+.aceEditor {
+    overflow: hidden;
+    // height: 100% !important;
+    min-height: 27rem;
+    background-color: white !important;
+    border: 1px solid #3f87a6;
+    border-left: 3px solid #3f87a6;
+    line-height: 1.2;
+    width: 99%;
+}
+
+.button {
+    margin: 1em;
+    background-color: #3f51b5;
+    color: white;
+    border-radius: 2em;
+    padding: 0.5em;
+    min-width: 6em;
+}
+
+.testTemplateContainer {
+    display: flex;
+    flex-direction: row
+}
+.editorContainer {
+    width: 100%;
+    display: flex;
+    flex-direction: row;
+    margin-left: 1em
+}
+
+.editorDiv {
+    width: 50%; 
+    margin: 2px;
+}
+
+.btnContainer {
+    height: 10%
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.spec.ts b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.spec.ts
new file mode 100644 (file)
index 0000000..e4adb2e
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TestTemplateComponent } from './test-template.component';
+
+describe('TestTemplateComponent', () => {
+  let component: TestTemplateComponent;
+  let fixture: ComponentFixture<TestTemplateComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ TestTemplateComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(TestTemplateComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.component.ts
new file mode 100644 (file)
index 0000000..9a7a570
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { FlatTreeControl } from '@angular/cdk/tree';
+import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree';
+import { Observable, Subscription } from 'rxjs';
+import { Store } from '@ngrx/store';
+
+import { IAppState } from '../../../common/core/store/state/app.state';
+import { IBlueprintState } from 'src/app/common/core/store/models/blueprintState.model';
+import { IBlueprint } from 'src/app/common/core/store/models/blueprint.model';
+import { IMetaData } from '../../../common/core/store/models/metadata.model';
+import { LoadBlueprintSuccess } from 'src/app/common/core/store/actions/blueprint.action';
+
+import "ace-builds/webpack-resolver";
+import 'brace';
+import 'brace/ext/language_tools';
+import 'ace-builds/src-min-noconflict/snippets/html';
+
+@Component({
+  selector: 'app-test-template',
+  templateUrl: './test-template.component.html',
+  styleUrls: ['./test-template.component.scss']
+})
+export class TestTemplateComponent implements OnInit {
+  private blueprintpState: Subscription;
+  private request;
+  private workflows = [];
+  @ViewChild('editor') editor;
+  options: any = { fontSize: "100%", printMargin: false, tabSize: 2 };
+
+  constructor(private store: Store<IAppState>) {
+    this.blueprintpState = this.store.select('blueprint')
+      .subscribe((data: any) => {
+        console.log(data);
+        if (data && data.blueprint && data.blueprint.topology_template && data.blueprint.topology_template.workflows) {
+          this.buildWorkflowData(data.blueprint.topology_template.workflows);
+          // this.request = JSON.stringify(data.blueprint.topology_template.workflows[0], undefined, 4);
+        }
+      });
+
+  }
+
+  ngOnInit() {
+  }
+
+  fileClicked(file) {
+    console.log('selected file:' + file);
+  }
+
+  buildWorkflowData(data) {
+    this.workflows = [];
+    for (var property1 in data) {
+      data[property1].name = property1;
+      this.workflows.push(data[property1])
+    }
+    this.request = this.workflows[0];
+  }
+
+  createRequest(workflow) {
+    this.request = JSON.stringify(workflow, undefined, 4);
+
+  }
+
+}
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.module.ts b/cds-ui/client/src/app/feature-modules/blueprint/test-template/test-template.module.ts
new file mode 100644 (file)
index 0000000..ea5b5ff
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { TestTemplateComponent } from './test-template.component';
+import { TestTemplateRoutingModule } from './test-template-routing.module';
+import { AppMaterialModule } from '../../../common/modules/app-material.module';
+import { AceEditorModule } from 'ng2-ace-editor';
+
+@NgModule({
+  declarations: [
+    TestTemplateComponent
+  ],
+  exports: [
+    TestTemplateComponent
+  ],
+  imports: [
+    CommonModule,
+    AppMaterialModule,
+    TestTemplateRoutingModule,
+    AceEditorModule
+  ]
+})
+export class TestTemplateModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/README.md b/cds-ui/client/src/app/feature-modules/resource-definition/README.md
new file mode 100644 (file)
index 0000000..c50b363
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+This folder contains the code related to data dictionary.
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model-routing.module.ts
new file mode 100644 (file)
index 0000000..3935b65
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+const routes: Routes = [];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class ExistingModelRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html
new file mode 100644 (file)
index 0000000..4910663
--- /dev/null
@@ -0,0 +1,22 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+
+<app-search-resource></app-search-resource>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.scss
new file mode 100644 (file)
index 0000000..cafd2bf
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.spec.ts
new file mode 100644 (file)
index 0000000..97b3d73
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ExistingModelComponent } from './existing-model.component';
+
+describe('ExistingModelComponent', () => {
+  let component: ExistingModelComponent;
+  let fixture: ComponentFixture<ExistingModelComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ExistingModelComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ExistingModelComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts
new file mode 100644 (file)
index 0000000..f780ef8
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-existing-model',
+  templateUrl: './existing-model.component.html',
+  styleUrls: ['./existing-model.component.scss']
+})
+export class ExistingModelComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts
new file mode 100644 (file)
index 0000000..2963cfc
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { SearchResourceComponent } from './search-resource/search-resource.component';
+import { ExistingModelRoutingModule } from './existing-model-routing.module';
+import { ExistingModelComponent } from './existing-model.component';
+
+@NgModule({
+  declarations: [ExistingModelComponent,SearchResourceComponent],
+  imports: [
+    CommonModule,
+    ExistingModelRoutingModule,
+    SearchResourceComponent,
+  ],
+  exports:[ExistingModelComponent,
+    SearchResourceComponent]
+})
+export class ExistingModelModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html
new file mode 100644 (file)
index 0000000..ab69628
--- /dev/null
@@ -0,0 +1,31 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+<form class="example-form" [formGroup]="myControl">
+  <mat-form-field class="example-full-width">
+    <input type="text" [(ngModel)]="searchText" placeholder="Search Resources" matInput [matAutocomplete]="auto" formControlName="search_input">
+    <button matSuffix mat-icon-button><mat-icon>search</mat-icon></button>
+    <mat-autocomplete #auto="matAutocomplete">
+      <mat-option *ngFor="let option of options | search : searchText" [value]="option">
+        {{option}}
+      </mat-option>
+    </mat-autocomplete>
+  </mat-form-field>
+</form>
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.scss
new file mode 100644 (file)
index 0000000..cafd2bf
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.spec.ts
new file mode 100644 (file)
index 0000000..9051a86
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SearchResourceComponent } from './search-resource.component';
+
+describe('SearchResourceComponent', () => {
+  let component: SearchResourceComponent;
+  let fixture: ComponentFixture<SearchResourceComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ SearchResourceComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(SearchResourceComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts
new file mode 100644 (file)
index 0000000..16129b7
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit } from '@angular/core';
+import {FormBuilder, FormGroup, Validators} from '@angular/forms';
+@Component({
+  selector: 'app-search-resource',
+  templateUrl: './search-resource.component.html',
+  styleUrls: ['./search-resource.component.scss']
+})
+export class SearchResourceComponent implements OnInit  {
+
+   myControl: FormGroup;
+
+  constructor(private _formBuilder: FormBuilder)  { }
+  
+  options: string[] = ['One','One1', 'Two', 'Three'];
+    
+    ngOnInit() {
+    this.myControl = this._formBuilder.group({
+      search_input: ['', Validators.required]
+    });
+  }
+    
+}
+
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template-routing.module.ts
new file mode 100644 (file)
index 0000000..896d5aa
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+const routes: Routes = [];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class NewTemplateRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.html
new file mode 100644 (file)
index 0000000..944c7c6
--- /dev/null
@@ -0,0 +1,24 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+
+<p>
+  new-template works!
+</p>
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.scss
new file mode 100644 (file)
index 0000000..cafd2bf
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.spec.ts
new file mode 100644 (file)
index 0000000..b0b701e
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { NewTemplateComponent } from './new-template.component';
+
+describe('NewTemplateComponent', () => {
+  let component: NewTemplateComponent;
+  let fixture: ComponentFixture<NewTemplateComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ NewTemplateComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(NewTemplateComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.component.ts
new file mode 100644 (file)
index 0000000..3d1412a
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-new-template',
+  templateUrl: './new-template.component.html',
+  styleUrls: ['./new-template.component.scss']
+})
+export class NewTemplateComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/new-template/new-template.module.ts
new file mode 100644 (file)
index 0000000..666ac34
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { NewTemplateRoutingModule } from './new-template-routing.module';
+
+@NgModule({
+  declarations: [],
+  imports: [
+    CommonModule,
+    NewTemplateRoutingModule
+  ]
+})
+export class NewTemplateModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation-routing.module.ts
new file mode 100644 (file)
index 0000000..6b7a238
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+import { ResourceCreationComponent } from './resource-creation.component' ;
+const routes: Routes = [
+    {
+        path: '',
+        component: ResourceCreationComponent
+    }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class ResourceCreationRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.html
new file mode 100644 (file)
index 0000000..8ace910
--- /dev/null
@@ -0,0 +1,45 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+<mat-card class="ver-card">
+<mat-card-header>
+</mat-card-header>
+<mat-card-content>
+<mat-vertical-stepper linear>
+  <mat-step [stepControl]="step1FormGroup">
+    <ng-template matStepLabel>Choose Resource file</ng-template>
+    <br>
+    <app-resource-template-options (options)="selectedOption($event)"></app-resource-template-options>
+    <br>
+    <div>
+      <button mat-button matStepperNext class="matStepNextBtn">Proceed</button>
+    </div>
+  </mat-step>
+  <mat-step [stepControl]="step2FormGroup">
+    <ng-template matStepLabel>Browse or Search Resources</ng-template>
+  <app-upload-resource (fileData)=upload($event)></app-upload-resource><br><br>
+  <app-existing-model></app-existing-model>
+    <div>
+      <button mat-button matStepperNext (click)="updateResourcesState()" class="matStepNextBtn">Upload</button>
+    </div>
+  </mat-step>
+ </mat-vertical-stepper>
+ </mat-card-content>
+</mat-card>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.scss
new file mode 100644 (file)
index 0000000..b3b7fe7
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+.matStepNextBtn{
+    color:white;
+    background:#3f51b5; 
+    margin-top: 10px; 
+    position: absolute;
+    border-radius: 1em;
+}
+.ver-card {
+  width: 100%;  
+  background-color: #f1f1f1;
+   padding: 0.01em 16px;
+    margin: 20px 0;
+    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)!important;
+    height: auto;
+}
+.mat-card-header{
+    height:35px;
+}
+.mat-card-content{
+    width: auto;
+    background-color: #fff;
+    padding: 8px 8px;
+    // border-left: 4px solid #4CAF50;
+    word-wrap: break-word;
+    min-height:350px;
+    height: auto;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.spec.ts
new file mode 100644 (file)
index 0000000..77d9c68
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ResourceCreationComponent } from './resource-creation.component';
+
+describe('ResourceCreationComponent', () => {
+  let component: ResourceCreationComponent;
+  let fixture: ComponentFixture<ResourceCreationComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ResourceCreationComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ResourceCreationComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.component.ts
new file mode 100644 (file)
index 0000000..c751e0e
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit } from '@angular/core';
+import { Observable } from 'rxjs';
+import { Store } from '@ngrx/store';
+import { IResources } from 'src/app/common/core/store/models/resources.model';
+import { IAppState } from '../../../common/core/store/state/app.state';
+import { LoadResourcesSuccess } from 'src/app/common/core/store/actions/resources.action';
+
+@Component({
+  selector: 'app-resource-creation',
+  templateUrl: './resource-creation.component.html',
+  styleUrls: ['./resource-creation.component.scss']
+})
+export class ResourceCreationComponent implements OnInit {
+
+  myFile: any;
+  selectedValue: any;
+  constructor(private store: Store<IAppState>) {
+  }
+
+  ngOnInit() {  
+  }
+    
+  upload(value){
+    this.myFile=value; 
+ }
+    
+ updateResourcesState() {
+    let fileReader = new FileReader();
+    fileReader.readAsText(this.myFile);
+    var me = this;
+    fileReader.onload = function () {
+    var data: IResources = JSON.parse(fileReader.result.toString());
+    me.store.dispatch(new LoadResourcesSuccess(data));
+    console.log(data);
+    }
+ }
+
+ selectedOption(value){
+    this.selectedValue=value;
+    console.log(this.selectedValue);        
+ }
+}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.module.ts
new file mode 100644 (file)
index 0000000..7003f4c
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { ResourceCreationRoutingModule } from './resource-creation-routing.module';
+import { ResourceCreationComponent } from './resource-creation.component';
+import { ResourceTemplateOptionsComponent } from './resource-template-options/resource-template-options.component';
+import { MatAutocompleteModule,MatToolbarModule,MatIconModule, MatButtonModule, MatSidenavModule,  MatCheckboxModule, MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule} from '@angular/material';
+import { UploadResourceComponent } from './upload-resource/upload-resource.component';
+import { NewTemplateComponent } from './new-template/new-template.component';
+import { ExistingModelComponent } from './existing-model/existing-model.component';
+import { SearchResourceComponent } from './existing-model/search-resource/search-resource.component';
+import { SharedModule } from '../../../../app/common/shared/shared.module';
+import { FormsModule,ReactiveFormsModule } from '@angular/forms';
+
+@NgModule({
+    
+ declarations: [
+    ResourceCreationComponent,
+    ResourceTemplateOptionsComponent,
+    UploadResourceComponent,
+    NewTemplateComponent,
+    ExistingModelComponent,
+    SearchResourceComponent,
+    
+  ],
+  exports: [
+    ResourceCreationComponent,
+    ResourceTemplateOptionsComponent,
+    UploadResourceComponent,
+    NewTemplateComponent,
+    ExistingModelComponent,
+    SearchResourceComponent,
+    SharedModule
+  ],
+  imports: [
+    CommonModule,
+    SharedModule,
+    FormsModule,
+    ReactiveFormsModule,
+    ResourceCreationRoutingModule,
+    MatToolbarModule,
+    MatIconModule, 
+    MatButtonModule, 
+    MatSidenavModule,  
+    MatCheckboxModule, 
+    MatListModule, 
+    MatGridListModule, 
+    MatCardModule, 
+    MatMenuModule, 
+    MatTableModule, 
+    MatPaginatorModule, 
+    MatSortModule, 
+    MatInputModule, 
+    MatSelectModule, 
+    MatRadioModule, 
+    MatFormFieldModule, 
+    MatStepperModule,
+    MatAutocompleteModule
+    ]
+})
+export class ResourceCreationModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.html
new file mode 100644 (file)
index 0000000..a0e6b15
--- /dev/null
@@ -0,0 +1,24 @@
+<!--\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+-->\r
+<mat-radio-group>\r
+  <mat-radio-button value="1" (click)="selected(1)">Upload Resource File</mat-radio-button><br><br>\r
+  <mat-radio-button value="2" (click)="selected(2)">New Resource</mat-radio-button><br><br>\r
+  <mat-radio-button value="3" (click)="selected(3)">Existing Model Resource</mat-radio-button>\r
+</mat-radio-group>\r
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.scss
new file mode 100644 (file)
index 0000000..2205ac8
--- /dev/null
@@ -0,0 +1,19 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.spec.ts
new file mode 100644 (file)
index 0000000..2061ed2
--- /dev/null
@@ -0,0 +1,45 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+\r
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';\r
+\r
+import { ResourceTemplateOptionsComponent } from './resource-template-options.component';\r
+\r
+describe('ResourceTemplateOptionsComponent', () => {\r
+  let component: ResourceTemplateOptionsComponent;\r
+  let fixture: ComponentFixture<TemplateOptionsComponent>;\r
+\r
+  beforeEach(async(() => {\r
+    TestBed.configureTestingModule({\r
+      declarations: [ ResourceTemplateOptionsComponent ]\r
+    })\r
+    .compileComponents();\r
+  }));\r
+\r
+  beforeEach(() => {\r
+    fixture = TestBed.createComponent(ResourceTemplateOptionsComponent);\r
+    component = fixture.componentInstance;\r
+    fixture.detectChanges();\r
+  });\r
+\r
+  it('should create', () => {\r
+    expect(component).toBeTruthy();\r
+  });\r
+});\r
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.ts
new file mode 100644 (file)
index 0000000..1c6efc9
--- /dev/null
@@ -0,0 +1,44 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+\r
+import { Component, OnInit, Output, EventEmitter} from '@angular/core';\r
+import { HttpClient } from '@angular/common/http';\r
+@Component({\r
+  selector: 'app-resource-template-options',\r
+  templateUrl: './resource-template-options.component.html',\r
+  styleUrls: ['./resource-template-options.component.scss']\r
+})\r
+export class ResourceTemplateOptionsComponent implements OnInit {\r
+  selectedOption: string;\r
+  @Output() option = new EventEmitter();\r
+\r
+  constructor() { }\r
+\r
+  ngOnInit() {\r
+  }\r
+\r
+  selected(value){\r
+    console.log(value);\r
+    this.option.emit(value);\r
+  }\r
+  // loadTemplateData() {\r
+  //  // to do\r
+  // }\r
+}\r
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource-routing.module.ts
new file mode 100644 (file)
index 0000000..73e6459
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+const routes: Routes = [];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class UploadResourceRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.html
new file mode 100644 (file)
index 0000000..3d60dab
--- /dev/null
@@ -0,0 +1,24 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+
+<div>
+    <input #myInput type="file" accept=".json" (change)="fileChanged($event)">
+</div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.scss
new file mode 100644 (file)
index 0000000..cafd2bf
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.spec.ts
new file mode 100644 (file)
index 0000000..9893230
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { UploadResourceComponent } from './upload-resource.component';
+
+describe('UploadResourceComponent', () => {
+  let component: UploadResourceComponent;
+  let fixture: ComponentFixture<UploadResourceComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ UploadResourceComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(UploadResourceComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.ts
new file mode 100644 (file)
index 0000000..ac3561a
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit, EventEmitter, Output } from '@angular/core';
+import { IResources } from 'src/app/common/core/store/models/resources.model';
+import { IResourcesState } from 'src/app/common/core/store/models/resourcesState.model';
+import { LoadResourcesSuccess } from 'src/app/common/core/store/actions/resources.action';
+import { IAppState } from '../../../../common/core/store/state/app.state';
+import { Observable } from 'rxjs';
+import { Store } from '@ngrx/store';
+
+@Component({
+  selector: 'app-upload-resource',
+  templateUrl: './upload-resource.component.html',
+  styleUrls: ['./upload-resource.component.scss']
+})
+export class UploadResourceComponent implements OnInit {
+
+  @Output() fileData = new EventEmitter();
+  file: File;
+  localResourcesData: IResources;
+  fileText: object[];
+  blueprintState: IResourcesState;
+  bpState: Observable<IResourcesState>;
+
+  constructor(private store: Store<IAppState>) { }
+
+  ngOnInit() {
+  }
+
+  fileChanged(e: any) {
+    this.file = e.target.files[0];
+    this.fileData.emit(this.file);  
+  }
+  
+}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.module.ts
new file mode 100644 (file)
index 0000000..3f27c2d
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { UploadResourceRoutingModule } from './upload-resource-routing.module';
+
+
+@NgModule({
+  declarations: [],
+  imports: [
+    CommonModule,
+    UploadResourceRoutingModule
+  ]
+})
+export class UploadResourceModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition-routing.module.ts
new file mode 100644 (file)
index 0000000..2f0b3fe
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { ResourceDefinitionComponent } from './resource-definition.component';
+
+const routes: Routes = [
+    {
+        path: '',
+        component: ResourceDefinitionComponent
+    }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class ResourceDefinitionRoutingModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.html
new file mode 100644 (file)
index 0000000..60a8b94
--- /dev/null
@@ -0,0 +1,39 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+<!-- <app-cbawizard [appName]="appName"></app-cbawizard>
+<router-outlet></router-outlet> -->
+<mat-card class="RDform">
+  <mat-card-content>
+    <mat-horizontal-stepper [linear]="isLinear" #stepper>
+      <mat-step [stepControl]="firstFormGroup">
+        <ng-template matStepLabel>Resource creation Method</ng-template>
+        <app-resource-creation></app-resource-creation><br><br>
+        <div>
+          <button mat-button matStepperNext class="matStepNextBtn">Proceed</button>
+        </div>
+      </mat-step>
+      <mat-step [stepControl]="secondFormGroup">
+        <ng-template matStepLabel>Resource Edit</ng-template>
+        <app-resource-edit></app-resource-edit><br>
+      </mat-step>
+    </mat-horizontal-stepper>
+  </mat-card-content>
+</mat-card>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.scss
new file mode 100644 (file)
index 0000000..c27e7d2
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+.mat-card {
+    padding: 0px !important;
+}
+
+.matStepNextBtn{
+    color:white;
+    background:#3f51b5;
+    margin-top: 10px;
+    position: absolute;
+    margin-bottom: 5px;
+    border-radius: 1em;
+}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.spec.ts
new file mode 100644 (file)
index 0000000..72d72dd
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ResourceDefinitionComponent } from './resource-definition.component';
+
+describe('ResourceDefinitionComponent', () => {
+  let component: ResourceDefinitionComponent;
+  let fixture: ComponentFixture<ResourceDefinitionComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ResourceDefinitionComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ResourceDefinitionComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.component.ts
new file mode 100644 (file)
index 0000000..c2f3dad
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-resource-definition',
+  templateUrl: './resource-definition.component.html',
+  styleUrls: ['./resource-definition.component.scss']
+})
+export class ResourceDefinitionComponent implements OnInit {
+  appName: String;
+
+  constructor() { 
+    this.appName="datadict";
+  }
+
+  ngOnInit() {
+  }
+
+}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-definition.module.ts
new file mode 100644 (file)
index 0000000..0e05653
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { ResourceDefinitionRoutingModule } from './resource-definition-routing.module';
+import { ResourceDefinitionComponent } from './resource-definition.component';
+import { SharedModule } from '../../../app/common/shared/shared.module';
+import { ResourceCreationModule } from './resource-creation/resource-creation.module';
+import { ResourceEditModule } from './resource-edit/resource-edit.module';
+
+import { MatToolbarModule, MatButtonModule, MatSidenavModule,  MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule} from '@angular/material';
+import { MatIconModule } from '@angular/material/icon';
+
+@NgModule({
+  
+    declarations: [ResourceDefinitionComponent],
+  
+    imports: [
+    CommonModule,
+    ResourceDefinitionRoutingModule,
+    SharedModule,
+    ResourceCreationModule,
+    ResourceEditModule,
+    MatToolbarModule,
+    MatButtonModule,
+    MatSidenavModule,
+    MatIconModule,
+    MatListModule,
+    MatGridListModule,
+    MatCardModule,
+    MatMenuModule,
+    MatTableModule,
+    MatPaginatorModule,
+    MatSortModule,
+    MatInputModule,
+    MatSelectModule, 
+    MatRadioModule, 
+    MatFormFieldModule, 
+    MatStepperModule,
+  ]
+})
+export class ResourceDefinitionModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit-routing.module.ts
new file mode 100644 (file)
index 0000000..ae417c4
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+* =================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { ResourceEditComponent } from './resource-edit.component';
+const routes: Routes = [
+    {
+        path: '',
+        component: ResourceEditComponent
+    }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class ResourceEditRoutingModule { }
+
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.html
new file mode 100644 (file)
index 0000000..7df5092
--- /dev/null
@@ -0,0 +1,45 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+
+<mat-card class="metadata-card">
+        <mat-card-header>
+            <mat-card-title>Resource Metadata</mat-card-title>
+        </mat-card-header>
+        <mat-card-content>
+            <app-resource-metadata></app-resource-metadata>
+        </mat-card-content>
+</mat-card>
+
+<mat-card class="sources-card">
+     <mat-card-header>
+          <mat-card-title>
+                Sources
+          </mat-card-title>
+    </mat-card-header>
+    <mat-card-content>
+          <app-sources-template></app-sources-template>
+    </mat-card-content>
+</mat-card>
+
+<mat-card class="submit">
+   <button mat-raised-button>Save</button>
+</mat-card>
+<!-- <router-outlet></router-outlet> -->
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.scss
new file mode 100644 (file)
index 0000000..7c60cf3
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+.metadata-card {
+  width: 100%;  
+  background-color: #f1f1f1;
+  padding: 0.01em 16px;
+  margin: 20px 0;
+  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)!important;
+  height: auto;
+}
+.sources-card {
+  width: 100%;  
+  background-color: #f1f1f1;
+  padding: 0.01em 16px;
+  margin: 20px 0;
+  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)!important;
+  height: auto;
+}
+.mat-raised-button{
+  border: 1px solid grey;
+  background-color: #3f51b5;
+  padding: 1px;
+  color: white;
+  border-radius: 1em;
+}
+.mat-card-title{
+   padding-top: 7px;
+}
+.mat-card-header{
+   height:35px;
+}
+.mat-card-content{
+   width: auto;
+   background-color: #fff;
+   padding: 8px 8px;
+   word-wrap: break-word;
+}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.spec.ts
new file mode 100644 (file)
index 0000000..f88452d
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ResourceEditComponent } from './resource-edit.component';
+
+describe('ResourceEditComponent', () => {
+  let component: ResourceEditComponent;
+  let fixture: ComponentFixture<ResourceEditComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ResourceEditComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ResourceEditComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.ts
new file mode 100644 (file)
index 0000000..5b56703
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-resource-edit',
+  templateUrl: './resource-edit.component.html',
+  styleUrls: ['./resource-edit.component.scss']
+})
+export class ResourceEditComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts
new file mode 100644 (file)
index 0000000..2b25ae3
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { ResourceEditComponent } from './resource-edit.component';
+import { ResourceEditRoutingModule } from './resource-edit-routing.module';
+import { MatExpansionModule,MatToolbarModule,MatIconModule, MatButtonModule, MatSidenavModule,  MatCheckboxModule, MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule} from '@angular/material';
+import { FormsModule,ReactiveFormsModule } from '@angular/forms';
+import { SharedModule } from '../../../../app/common/shared/shared.module';
+import { SourcesTemplateComponent } from './sources-template/sources-template.component';
+import { ResourceMetadataComponent } from './resource-metadata/resource-metadata.component';
+import { DragDropModule } from '@angular/cdk/drag-drop';
+import { NgJsonEditorModule } from 'ang-jsoneditor';
+
+@NgModule({
+  declarations: [ ResourceEditComponent,SourcesTemplateComponent,ResourceMetadataComponent ],
+  imports: [
+   CommonModule,
+   ResourceEditRoutingModule,
+   SharedModule,
+   FormsModule,ReactiveFormsModule,
+   DragDropModule,
+   MatExpansionModule,MatToolbarModule,MatIconModule, MatButtonModule, MatSidenavModule,  MatCheckboxModule, MatListModule, MatGridListModule, MatCardModule, MatMenuModule, MatTableModule, MatPaginatorModule, MatSortModule, MatInputModule, MatSelectModule, MatRadioModule, MatFormFieldModule, MatStepperModule,
+   NgJsonEditorModule
+  ],
+  exports: [ ResourceEditComponent,SharedModule ]
+})
+export class ResourceEditModule { }
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html
new file mode 100644 (file)
index 0000000..0bbc0b7
--- /dev/null
@@ -0,0 +1,45 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/-->
+
+<form [formGroup]="ResourceMetadata">
+       <mat-form-field class="form-field">
+      <input matInput placeholder="Name" formControlName="Resource_Name">
+    </mat-form-field><mat-form-field class="form-field">
+      <input matInput placeholder="Tags" formControlName="_tags">
+    </mat-form-field>
+    <mat-form-field class="form-field">
+      <mat-select matInput placeholder="Data Type" formControlName="_type">
+       <mat-option value="string">string</mat-option>
+       <mat-option value="list">list</mat-option>
+      </mat-select>
+    </mat-form-field>
+    <mat-form-field class="form-field" >
+      <input matInput placeholder="entry_schema" formControlName="entry_schema">
+    </mat-form-field>
+    <mat-form-field class="form-field" >
+      <mat-select matInput placeholder="required" formControlName="required">
+       <mat-option value="true">true</mat-option>
+       <mat-option value="false">false</mat-option>
+      </mat-select>
+    </mat-form-field>
+    <mat-form-field class="form-field" >
+      <textarea matInput placeholder="Description" formControlName="_description"></textarea>
+    </mat-form-field>
+</form>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.scss
new file mode 100644 (file)
index 0000000..d10ad48
--- /dev/null
@@ -0,0 +1,33 @@
+/*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+\r
+\r
+.meta-form {\r
+  width: 100%;\r
+}\r
+\r
+.form-field {\r
+  width: 40%;\r
+  padding:10px;\r
+}\r
+\r
+.form-table {\r
+  width: 100%;\r
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.spec.ts
new file mode 100644 (file)
index 0000000..f157ca5
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ResourceMetadataComponent } from './resource-metadata.component';
+
+describe('ResourceMetadataComponent', () => {
+  let component: ResourceMetadataComponent;
+  let fixture: ComponentFixture<ResourceMetadataComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ResourceMetadataComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ResourceMetadataComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.ts
new file mode 100644 (file)
index 0000000..536be26
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit } from '@angular/core';
+import {FormBuilder, FormGroup, Validators} from '@angular/forms';
+import { IResources } from 'src/app/common/core/store/models/resources.model';
+import { IResourcesState } from 'src/app/common/core/store/models/resourcesState.model';
+import { Observable } from 'rxjs';
+import { Store } from '@ngrx/store';
+import { IAppState } from '../../../../common/core/store/state/app.state';
+import { A11yModule } from '@angular/cdk/a11y';
+import { LoadResourcesSuccess } from 'src/app/common/core/store/actions/resources.action';
+import { IPropertyData } from 'src/app/common/core/store/models/propertyData.model';
+import { IEntrySchema } from 'src/app/common/core/store/models/entrySchema.model';
+
+@Component({
+  selector: 'app-resource-metadata',
+  templateUrl: './resource-metadata.component.html',
+  styleUrls: ['./resource-metadata.component.scss']
+})
+export class ResourceMetadataComponent implements OnInit {
+    entry_schema:IEntrySchema;
+    properties: IPropertyData;
+    ResourceMetadata: FormGroup;
+    resource_name: string;
+    tags: string;
+    rdState: Observable<IResourcesState>;
+    resources: IResources;
+    propertyValues = [];
+    property = [];   
+  
+ constructor(private formBuilder: FormBuilder, private store: Store<IAppState>) { 
+    this.rdState = this.store.select('resources');
+    this.ResourceMetadata = this.formBuilder.group({
+        Resource_Name: ['', Validators.required],
+       _tags: ['', Validators.required],
+       _description : ['', Validators.required],
+       _type: ['', Validators.required],
+       required: ['', Validators.required],
+       entry_schema: ['']
+    });   
+ }
+
+ ngOnInit() {
+    this.rdState.subscribe(
+      resourcesdata => {
+        var resourcesState: IResourcesState = { resources: resourcesdata.resources, isLoadSuccess: resourcesdata.isLoadSuccess, isSaveSuccess: resourcesdata.isSaveSuccess, isUpdateSuccess: resourcesdata.isUpdateSuccess };
+        this.resource_name = resourcesState.resources.name;
+        this.tags = resourcesState.resources.tags;
+        this.resources = resourcesState.resources;
+        this.properties= resourcesState.resources.property;
+        this.propertyValues=  this.checkNested(this.properties);
+        this.ResourceMetadata = this.formBuilder.group({
+       Resource_Name: [this.resource_name, Validators.required],
+        _tags: [this.tags, Validators.required],
+        _description : [ this.propertyValues[0], Validators.required],
+        _type: [ this.propertyValues[1], Validators.required],
+        required: [ this.propertyValues[2], Validators.required],
+        entry_schema: [this.propertyValues[3]]
+      });   
+    })
+ }
+    
+ checkNested(obj) {
+  for (let key in obj) {
+    if (obj.hasOwnProperty(key)) {
+      if (typeof obj[key] == "object"){
+         console.log(`Key: ${key}`)
+         this.checkNested(obj[key]);
+      } else {
+         this.property.push(obj[key]);             
+      }   
+     }
+   }
+   return this.property
+ }
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.html
new file mode 100644 (file)
index 0000000..903c6d3
--- /dev/null
@@ -0,0 +1,56 @@
+<!--/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/-->
+<div cdkDropListGroup>
+  <div class="sources-container">
+       <div
+      cdkDropList
+      [cdkDropListData]="sourcesOptions"
+      class="sources-list"
+      (cdkDropListDropped)="drop($event)">
+       <div class="sources-box" *ngFor="let item of sourcesOptions" cdkDrag>
+               <mat-expansion-panel class="expansion-panel">
+                       <mat-expansion-panel-header>
+                               <mat-panel-title>
+                                       {{item}}
+                               </mat-panel-title>
+                       </mat-expansion-panel-header>
+                       <json-editor [options]="options" [data]="selected(item)" on-change="onChange()"></json-editor>
+                        </mat-expansion-panel>
+       </div>
+    </div>
+  </div>
+
+  <div class="list-container">
+    <h3>Source Options</h3>
+       <mat-form-field>
+       <input [(ngModel)]="searchText" type="input" matInput placeholder="search sources">
+       <button matSuffix mat-icon-button><mat-icon>search</mat-icon></button>
+       <mat-hint>db,mdsal,input,default,..</mat-hint>
+       </mat-form-field>
+       <br><br>
+    <div
+      cdkDropList
+      [cdkDropListData]="option"
+      class="options-list"
+      (cdkDropListDropped)="drop($event)">
+      <div class="options-box" *ngFor="let item of option | search :searchText" cdkDrag>{{item}}</div>
+    </div>
+  </div>
+</div>
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.scss
new file mode 100644 (file)
index 0000000..a76b60a
--- /dev/null
@@ -0,0 +1,113 @@
+ /*\r
+* ============LICENSE_START=======================================================\r
+* ONAP : CDS\r
+* ================================================================================\r
+* Copyright 2019 TechMahindra\r
+*=================================================================================\r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+*     http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+* ============LICENSE_END=========================================================\r
+*/\r
+.sources-container {\r
+  width: 900px;\r
+  max-width: 100%;\r
+  margin: 0 25px 25px 0;\r
+  display: inline-block;\r
+  vertical-align: top;\r
+ border-bottom: solid 1px #ccc; \r
+ border-radius: 4px;\r
+}\r
+.list-container {\r
+  min-width: 200px;\r
+  max-width: 100%;\r
+  margin: 0 25px 25px 0;\r
+  display: inline-block;\r
+  vertical-align: top;\r
+}\r
+.sources-list {\r
+  border: solid 1px #ccc;\r
+  width: 900px;\r
+  min-height: 30px;\r
+  background: white;\r
+  border-radius: 4px;\r
+  overflow: hidden;\r
+  display: block;\r
+  border-bottom: solid 1px #ccc;\r
+}\r
+.options-list {  \r
+  min-height: 30px;\r
+  border-radius: 4px;\r
+  overflow: hidden;\r
+  display: block;\r
+  width: 100%; \r
+}\r
+.sources-box {\r
+  //border-bottom: solid 1px #ccc;\r
+  color: rgba(0, 0, 0, 0.87);\r
+  display: flex;\r
+  flex-direction: row;\r
+  align-items: center;\r
+  justify-content: space-between;\r
+  box-sizing: border-box;\r
+  cursor: move;\r
+  background:white;\r
+  font-size: 14px;\r
+  min-height: 30px;\r
+  \r
+}\r
+.options-box {\r
+  border: solid 1px #ccc;\r
+  color: white;\r
+  display: flex;\r
+  flex-direction: row;\r
+  align-items: center;\r
+  justify-content: space-between;\r
+  box-sizing: border-box;\r
+  cursor: move;\r
+  background:gray;\r
+  font-size: 14px;\r
+  min-height: 30px;\r
+  width: 100px;\r
+ padding-left: 15px;\r
+}\r
+\r
+.cdk-drag-preview {\r
+  box-sizing: border-box;\r
+  border-radius: 4px;\r
+  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),\r
+              0 8px 10px 1px rgba(0, 0, 0, 0.14),\r
+              0 3px 14px 2px rgba(0, 0, 0, 0.12);\r
+}\r
+\r
+.cdk-drag-placeholder {\r
+  opacity: 0;\r
+}\r
+\r
+.cdk-drag-animating {\r
+  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\r
+}\r
+\r
+.sources-box:last-child {\r
+  border: none;\r
+}\r
+\r
+.options-list.cdk-drop-list-dragging .options-box:not(.cdk-drag-placeholder) {\r
+  transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);\r
+}\r
+.expansion-panel{\r
+  border: solid 0.5px #ededed;\r
+  background: white;\r
+  border-radius: 4px;\r
+  overflow: hidden;\r
+  display: block;\r
+  width: 100%;\r
+  }
\ No newline at end of file
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.spec.ts
new file mode 100644 (file)
index 0000000..4a94fed
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SourcesTemplateComponent } from './sources-template.component';
+
+describe('SourcesTemplateComponent', () => {
+  let component: SourcesTemplateComponent;
+  let fixture: ComponentFixture<SourcesTemplateComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ SourcesTemplateComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(SourcesTemplateComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/sources-template/sources-template.component.ts
new file mode 100644 (file)
index 0000000..c43d1de
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : CDS
+* ================================================================================
+* Copyright (C) 2019 TechMahindra
+*=================================================================================
+* 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.
+* ============LICENSE_END=========================================================
+*/
+
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
+import { IResources } from 'src/app/common/core/store/models/resources.model';
+import { IResourcesState } from 'src/app/common/core/store/models/resourcesState.model';
+import { Observable } from 'rxjs';
+import { Store } from '@ngrx/store';
+import { IAppState } from '../../../../common/core/store/state/app.state';
+import { A11yModule } from '@angular/cdk/a11y';
+import { LoadResourcesSuccess } from 'src/app/common/core/store/actions/resources.action';
+import { ISourcesData } from 'src/app/common/core/store/models/sourcesData.model';
+import { JsonEditorComponent, JsonEditorOptions } from 'ang-jsoneditor';
+
+@Component({
+  selector: 'app-sources-template',
+  templateUrl: './sources-template.component.html',
+  styleUrls: ['./sources-template.component.scss']
+})
+export class SourcesTemplateComponent implements OnInit {
+//    rdState: Observable<IResourcesState>;
+//    resources: IResources;
+//    todo = [];
+//    sources:ISourcesData; 
+//    sourcesOptions = [];
+
+    @ViewChild(JsonEditorComponent) editor: JsonEditorComponent;
+    options = new JsonEditorOptions();
+    
+    rdState: Observable<IResourcesState>;
+    resources: IResources;
+    option = ['mdsal','default'];
+    sources:ISourcesData; 
+    sourcesOptions = [];
+    sourcesData = [];
+    
+ constructor(private store: Store<IAppState>) {
+   this.rdState = this.store.select('resources');
+      this.options.mode = 'text';
+    this.options.modes = [ 'text', 'tree', 'view'];
+    this.options.statusBar = false;
+    this.options.onChange = () => console.log(this.editor.get());
+     
+ }
+
+ ngOnInit() {
+    this.rdState.subscribe(
+      resourcesdata => {
+        var resourcesState: IResourcesState = { resources: resourcesdata.resources, isLoadSuccess: resourcesdata.isLoadSuccess, isSaveSuccess: resourcesdata.isSaveSuccess, isUpdateSuccess: resourcesdata.isUpdateSuccess };
+        this.sources = resourcesState.resources.sources;
+        for (let key in this.sources) {
+            this.sourcesOptions.push(key);  
+        }
+        //console.log(this.sourcesOptions);
+    })
+ }
+
+ onChange() {
+     console.log(this.editor.get())
+ };
+    
+ selected(value){
+    console.log(value);
+        this.sourcesData=this.sources[value];
+        return this.sourcesData;    
+ }    
+    
+ drop(event: CdkDragDrop<string[]>) {
+    if (event.previousContainer === event.container) {
+      moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
+    } else {
+      transferArrayItem(event.previousContainer.data,
+                        event.container.data,
+                        event.previousIndex,
+                        event.currentIndex);
+    }
+  }    
+}
diff --git a/cds-ui/client/src/assets/.gitkeep b/cds-ui/client/src/assets/.gitkeep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/cds-ui/client/src/assets/activation-blueprint.json b/cds-ui/client/src/assets/activation-blueprint.json
new file mode 100644 (file)
index 0000000..822cc68
--- /dev/null
@@ -0,0 +1,336 @@
+{
+  "metadata": {
+    "template_author": "Brinda Santh Muthuramalingam",
+    "author-email": "brindasanth@in.ibm.com",
+    "user-groups": "ADMIN, OPERATION",
+    "template_name": "baseconfiguration",
+    "template_version": "1.0.0",
+    "template_tags": "brinda, 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"
+    }
+  ],
+  "topology_template": {
+    "inputs": {
+      "request-id": {
+        "required": true,
+        "type": "string"
+      },
+      "action-name": {
+        "required": true,
+        "type": "string"
+      },
+      "scope-type": {
+        "required": true,
+        "type": "string"
+      },
+      "hostname": {
+        "required": true,
+        "type": "string"
+      }
+    },
+    "node_templates": {
+      "resource-assignment-process": {
+        "type": "dg-generic",
+        "properties": {
+          "content": {
+            "get_artifact": [
+              "SELF",
+              "dg-resource-assignment-process"
+            ]
+          },
+          "dependency-node-templates": [
+            "resource-assignment"
+          ]
+        },
+        "artifacts": {
+          "dg-resource-assignment-process": {
+            "type": "artifact-directed-graph",
+            "file": "Plans/CONFIG_ResourceAssignment_1.0.0.xml"
+          }
+        }
+      },
+      "activate-process": {
+        "type": "dg-generic",
+        "properties": {
+          "content": {
+            "get_artifact": [
+              "SELF",
+              "dg-activate-process"
+            ]
+          },
+          "dependency-node-templates": [
+            "activate-jython"
+          ]
+        },
+        "artifacts": {
+          "dg-activate-process": {
+            "type": "artifact-directed-graph",
+            "file": "Plans/CONFIG_ActivateNetconf_1.0.0.xml"
+          }
+        }
+      },
+      "assign-activate-process": {
+        "type": "dg-generic",
+        "properties": {
+          "content": {
+            "get_artifact": [
+              "SELF",
+              "dg-assign-activate-process"
+            ]
+          },
+          "dependency-node-templates": [
+            "resource-assignment",
+            "activate-jython"
+          ]
+        },
+        "artifacts": {
+          "dg-assign-activate-process": {
+            "type": "artifact-directed-graph",
+            "file": "Plans/CONFIG_AssignActivateNetconf_1.0.0.xml"
+          }
+        }
+      },
+      "resource-assignment": {
+        "type": "component-resource-assignment",
+        "interfaces": {
+          "ResourceAssignmentComponent": {
+            "operations": {
+              "process": {
+                "inputs": {
+                  "action-name": {
+                    "get_input": "action-name"
+                  },
+                  "resource-type": "vnf-type",
+                  "request-id": {
+                    "get_input": "request-id"
+                  },
+                  "resource-id": {
+                    "get_input": "hostname"
+                  },
+                  "artifact-prefix-names": [
+                    "baseconfig"
+                  ]
+                },
+                "outputs": {
+                  "resource-assignment-params": {
+                    "get_attribute": [
+                      "SELF",
+                      "assignment-params"
+                    ]
+                  },
+                  "status": "success"
+                }
+              }
+            }
+          }
+        },
+        "artifacts": {
+          "baseconfig-template": {
+            "type": "artifact-template-velocity",
+            "file": "Templates/baseconfig-template.vtl"
+          },
+          "baseconfig-mapping": {
+            "type": "artifact-mapping-resource",
+            "file": "Definitions/baseconfig-mapping.json"
+          }
+        }
+      },
+      "resource-assignment-py": {
+        "type": "component-resource-assignment",
+        "interfaces": {
+          "ResourceAssignmentComponent": {
+            "operations": {
+              "process": {
+                "implementation": {
+                  "primary": "component-script"
+                },
+                "inputs": {
+                  "action-name": {
+                    "get_input": "action-name"
+                  }
+                },
+                "outputs": {
+                  "resource-assignment-params": "",
+                  "status": ""
+                }
+              }
+            }
+          }
+        },
+        "artifacts": {
+          "component-script": {
+            "type": "artifact-script-jython",
+            "file": "Scripts/python/SamplePythonComponentNode.py"
+          }
+        }
+      },
+      "activate-jython": {
+        "type": "component-jython-executor",
+        "interfaces": {
+          "JythonExecutorComponent": {
+            "operations": {
+              "process": {
+                "implementation": {
+                  "primary": "component-script"
+                },
+                "inputs": {
+                  "instance-dependencies": [
+                    "json-parser-service",
+                    "netconf-rpc-service"
+                  ]
+                },
+                "outputs": {
+                  "response-data": "",
+                  "status": ""
+                }
+              }
+            }
+          }
+        },
+        "artifacts": {
+          "component-script": {
+            "type": "artifact-script-jython",
+            "file": "Scripts/python/SamplePythonComponentNode.py"
+          }
+        }
+      },
+      "activate-netconf": {
+        "type": "component-netconf-executor",
+        "interfaces": {
+          "NetconfExecutorComponent": {
+            "operations": {
+              "process": {
+                "implementation": {
+                  "primary": "component-script"
+                },
+                "inputs": {
+                  "instance-dependencies": [
+                    "json-parser-service",
+                    "netconf-rpc-service"
+                  ]
+                },
+                "outputs": {
+                  "response-data": "",
+                  "status": ""
+                }
+              }
+            }
+          }
+        },
+        "requirements": {
+          "netconf-connection": {
+            "capability": "netconf",
+            "node": "sample-netconf-device",
+            "relationship": "tosca.relationships.ConnectsTo"
+          }
+        },
+        "artifacts": {
+          "component-script": {
+            "type": "artifact-script-jython",
+            "file": "Scripts/python/DefaultGetNetConfig.py"
+          }
+        }
+      },
+      "sample-netconf-device": {
+        "type": "vnf-netconf-device",
+        "capabilities": {
+          "netconf": {
+            "properties": {
+              "login-key": "sample-key",
+              "login-account": "sample-account",
+              "target-ip-address": "localhost",
+              "port-number": 830,
+              "connection-time-out": 30
+            }
+          }
+        }
+      }
+    },
+    "workflows": {
+      "resource-assignment": {
+        "inputs": {
+          "resource-assignment-properties": {
+            "required": true,
+            "type": "dt-resource-assignment-properties"
+          }
+        },
+        "steps": {
+          "call-resource-assignment": {
+            "description": "Resource Assignment Workflow",
+            "target": "resource-assignment-process",
+            "activities": [
+              {
+                "call_operation": "CONFIG.ResourceAssignment"
+              }
+            ]
+          }
+        }
+      },
+      "activate": {
+        "inputs": {
+          "request-id": {
+            "required": true,
+            "type": "string"
+          },
+          "action-name": {
+            "required": true,
+            "type": "string"
+          },
+          "scope-type": {
+            "required": true,
+            "type": "string"
+          },
+          "hostname": {
+            "required": true,
+            "type": "string"
+          }
+        },
+        "steps": {
+          "activate-process": {
+            "description": "Netconf Activation Workflow",
+            "target": "activate-process",
+            "activities": [
+              {
+                "call_operation": "CONFIG.ActivateProcess"
+              }
+            ]
+          }
+        }
+      },
+      "assign-activate": {
+        "inputs": {
+          "assign-activate-properties": {
+            "required": true,
+            "type": "dt-assign-activate-properties"
+          }
+        },
+        "steps": {
+          "activate-process": {
+            "description": "Resource Assign and Netconf Activation Workflow",
+            "target": "assign-activate-process",
+            "activities": [
+              {
+                "call_operation": "CONFIG.AssignActivateProcess"
+              }
+            ]
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/assets/sample-licenses.json b/cds-ui/client/src/assets/sample-licenses.json
new file mode 100644 (file)
index 0000000..c0f78ac
--- /dev/null
@@ -0,0 +1,29 @@
+{\r
+  "tags": "sample-licenses",\r
+  "name": "sample-licenses",\r
+  "property": {\r
+    "description" : " Sample Data for licences",\r
+    "required": true,\r
+    "type": "list",\r
+    "entry_schema": {\r
+      "type": "dt-license-key"\r
+    }\r
+  },\r
+  "updated-by": "brindasanth@onap.com",\r
+  "sources": {\r
+    "primary-config-data": {\r
+      "type": "source-rest",\r
+      "properties": {\r
+        "type": "JSON",\r
+        "url-path": "config/L3VNF-API:services/service-list/",\r
+        "path": "/licenses",\r
+        "input-key-mapping": {\r
+        },\r
+        "output-key-mapping": {\r
+          "licenses": "licenses"\r
+        },\r
+        "key-dependencies": []\r
+      }\r
+    }\r
+  }\r
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/browserslist b/cds-ui/client/src/browserslist
new file mode 100644 (file)
index 0000000..37371cb
--- /dev/null
@@ -0,0 +1,11 @@
+# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
+# For additional information regarding the format and rule options, please see:
+# https://github.com/browserslist/browserslist#queries
+#
+# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
+
+> 0.5%
+last 2 versions
+Firefox ESR
+not dead
+not IE 9-11
\ No newline at end of file
diff --git a/cds-ui/client/src/environments/environment.dev.ts b/cds-ui/client/src/environments/environment.dev.ts
new file mode 100644 (file)
index 0000000..fc398ad
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+export const environment = {
+    production: false,
+    apiHost: '',
+};
\ No newline at end of file
diff --git a/cds-ui/client/src/environments/environment.prod.ts b/cds-ui/client/src/environments/environment.prod.ts
new file mode 100644 (file)
index 0000000..3e68b2c
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+export const environment = {
+  production: true
+};
diff --git a/cds-ui/client/src/environments/environment.ts b/cds-ui/client/src/environments/environment.ts
new file mode 100644 (file)
index 0000000..f891b09
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+// This file can be replaced during build by using the `fileReplacements` array.
+// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
+// The list of file replacements can be found in `angular.json`.
+
+export const environment = {
+  production: false
+};
+
+/*
+ * For easier debugging in development mode, you can import the following file
+ * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
+ *
+ * This import should be commented out in production mode because it will have a negative impact
+ * on performance if an error is thrown.
+ */
+// import 'zone.js/dist/zone-error';  // Included with Angular CLI.
diff --git a/cds-ui/client/src/index.html b/cds-ui/client/src/index.html
new file mode 100644 (file)
index 0000000..32d8175
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+-->
+<!doctype html>
+<html lang="en">
+<head>
+  <meta charset="utf-8">
+  <title>CdsUi</title>
+  <base href="/">
+
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <link rel="icon" type="image/x-icon" href="favicon.ico">
+</head>
+<body>
+  <app-root></app-root>
+</body>
+</html>
diff --git a/cds-ui/client/src/karma.conf.js b/cds-ui/client/src/karma.conf.js
new file mode 100644 (file)
index 0000000..fa6c990
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+// Karma configuration file, see link for more information
+// https://karma-runner.github.io/1.0/config/configuration-file.html
+
+module.exports = function (config) {
+  config.set({
+    basePath: '',
+    frameworks: ['jasmine', '@angular-devkit/build-angular'],
+    plugins: [
+      require('karma-jasmine'),
+      require('karma-chrome-launcher'),
+      require('karma-jasmine-html-reporter'),
+      require('karma-coverage-istanbul-reporter'),
+      require('@angular-devkit/build-angular/plugins/karma')
+    ],
+    client: {
+      clearContext: false // leave Jasmine Spec Runner output visible in browser
+    },
+    coverageIstanbulReporter: {
+      dir: require('path').join(__dirname, '../coverage'),
+      reports: ['html', 'lcovonly', 'text-summary'],
+      fixWebpackSourcePaths: true
+    },
+    reporters: ['progress', 'kjhtml'],
+    port: 9876,
+    colors: true,
+    logLevel: config.LOG_INFO,
+    autoWatch: true,
+    browsers: ['Chrome'],
+    singleRun: false
+  });
+};
\ No newline at end of file
diff --git a/cds-ui/client/src/main.ts b/cds-ui/client/src/main.ts
new file mode 100644 (file)
index 0000000..cc4408c
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { enableProdMode } from '@angular/core';
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app/app.module';
+import { environment } from './environments/environment';
+
+if (environment.production) {
+  enableProdMode();
+}
+
+platformBrowserDynamic().bootstrapModule(AppModule)
+  .catch(err => console.error(err));
diff --git a/cds-ui/client/src/polyfills.ts b/cds-ui/client/src/polyfills.ts
new file mode 100644 (file)
index 0000000..b0b6c8f
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+/**
+ * This file includes polyfills needed by Angular and is loaded before the app.
+ * You can add your own extra polyfills to this file.
+ *
+ * This file is divided into 2 sections:
+ *   1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
+ *   2. Application imports. Files imported after ZoneJS that should be loaded before your main
+ *      file.
+ *
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
+ *
+ * Learn more in https://angular.io/guide/browser-support
+ */
+
+/***************************************************************************************************
+ * BROWSER POLYFILLS
+ */
+
+/** IE9, IE10 and IE11 requires all of the following polyfills. **/
+// import 'core-js/es6/symbol';
+// import 'core-js/es6/object';
+// import 'core-js/es6/function';
+// import 'core-js/es6/parse-int';
+// import 'core-js/es6/parse-float';
+// import 'core-js/es6/number';
+// import 'core-js/es6/math';
+// import 'core-js/es6/string';
+// import 'core-js/es6/date';
+// import 'core-js/es6/array';
+// import 'core-js/es6/regexp';
+// import 'core-js/es6/map';
+// import 'core-js/es6/weak-map';
+// import 'core-js/es6/set';
+
+/**
+ * If the application will be indexed by Google Search, the following is required.
+ * Googlebot uses a renderer based on Chrome 41.
+ * https://developers.google.com/search/docs/guides/rendering
+ **/
+// import 'core-js/es6/array';
+
+/** IE10 and IE11 requires the following for NgClass support on SVG elements */
+// import 'classlist.js';  // Run `npm install --save classlist.js`.
+
+/** IE10 and IE11 requires the following for the Reflect API. */
+// import 'core-js/es6/reflect';
+
+/**
+ * Web Animations `@angular/platform-browser/animations`
+ * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
+ * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
+ **/
+// import 'web-animations-js';  // Run `npm install --save web-animations-js`.
+
+/**
+ * By default, zone.js will patch all possible macroTask and DomEvents
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
+ */
+
+ // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
+ // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
+ // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
+
+ /*
+ * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
+ * with the following flag, it will bypass `zone.js` patch for IE/Edge
+ */
+// (window as any).__Zone_enable_cross_context_check = true;
+
+/***************************************************************************************************
+ * Zone JS is required by default for Angular itself.
+ */
+import 'zone.js/dist/zone';  // Included with Angular CLI.
+
+
+/***************************************************************************************************
+ * APPLICATION IMPORTS
+ */
diff --git a/cds-ui/client/src/styles.scss b/cds-ui/client/src/styles.scss
new file mode 100644 (file)
index 0000000..54eb746
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+/* You can add global styles to this file, and also import other style files */
+@import "~jsoneditor/dist/jsoneditor.min.css";
+.mat-card:not([class*=mat-elevation-z]) {
+    box-shadow: none !important;
+}
+
+.btn-active {
+    margin: 0.5em;
+    background-color: #3f51b5;
+    color: white;
+    border-radius: 4px;
+    border: none;
+    padding: 0.5em;
+    min-width: 6em;
+    cursor: pointer;
+}
+
+.btn-disablled {
+    background-color: #c5cae8;
+    border-radius: 4px;
+    color: darkgray;
+    margin: 0.5em;
+    padding: 0.5em;
+    min-width: 6em;
+    border: none;
+    cursor: initial;
+}
\ No newline at end of file
diff --git a/cds-ui/client/src/tsconfig.app.json b/cds-ui/client/src/tsconfig.app.json
new file mode 100644 (file)
index 0000000..190fd30
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "extends": "../tsconfig.json",
+  "compilerOptions": {
+    "outDir": "../out-tsc/app",
+    "types": []
+  },
+  "exclude": [
+    "test.ts",
+    "**/*.spec.ts"
+  ]
+}
diff --git a/cds-ui/client/src/tsconfig.spec.json b/cds-ui/client/src/tsconfig.spec.json
new file mode 100644 (file)
index 0000000..de77336
--- /dev/null
@@ -0,0 +1,18 @@
+{
+  "extends": "../tsconfig.json",
+  "compilerOptions": {
+    "outDir": "../out-tsc/spec",
+    "types": [
+      "jasmine",
+      "node"
+    ]
+  },
+  "files": [
+    "test.ts",
+    "polyfills.ts"
+  ],
+  "include": [
+    "**/*.spec.ts",
+    "**/*.d.ts"
+  ]
+}
diff --git a/cds-ui/client/src/tslint.json b/cds-ui/client/src/tslint.json
new file mode 100644 (file)
index 0000000..52e2c1a
--- /dev/null
@@ -0,0 +1,17 @@
+{
+    "extends": "../tslint.json",
+    "rules": {
+        "directive-selector": [
+            true,
+            "attribute",
+            "app",
+            "camelCase"
+        ],
+        "component-selector": [
+            true,
+            "element",
+            "app",
+            "kebab-case"
+        ]
+    }
+}
diff --git a/cds-ui/client/tsconfig.json b/cds-ui/client/tsconfig.json
new file mode 100644 (file)
index 0000000..b271fd9
--- /dev/null
@@ -0,0 +1,22 @@
+{
+  "compileOnSave": false,
+  "compilerOptions": {
+    "baseUrl": "./",
+    "outDir": "./dist/out-tsc",
+    "sourceMap": true,
+    "declaration": false,
+    "module": "es2015",
+    "moduleResolution": "node",
+    "emitDecoratorMetadata": true,
+    "experimentalDecorators": true,
+    "importHelpers": true,
+    "target": "es5",
+    "typeRoots": [
+      "node_modules/@types"
+    ],
+    "lib": [
+      "es2018",
+      "dom"
+    ]
+  }
+}
diff --git a/cds-ui/common/README.md b/cds-ui/common/README.md
new file mode 100644 (file)
index 0000000..c24ecda
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+# cds-ui-server
+
+This folder contains sll the common models/resources shared between server and client
diff --git a/cds-ui/server/.npmrc b/cds-ui/server/.npmrc
new file mode 100644 (file)
index 0000000..43c97e7
--- /dev/null
@@ -0,0 +1 @@
+package-lock=false
diff --git a/cds-ui/server/.prettierignore b/cds-ui/server/.prettierignore
new file mode 100644 (file)
index 0000000..c6911da
--- /dev/null
@@ -0,0 +1,2 @@
+dist
+*.json
diff --git a/cds-ui/server/.prettierrc b/cds-ui/server/.prettierrc
new file mode 100644 (file)
index 0000000..f58b81d
--- /dev/null
@@ -0,0 +1,6 @@
+{
+  "bracketSpacing": false,
+  "singleQuote": true,
+  "printWidth": 80,
+  "trailingComma": "all"
+}
diff --git a/cds-ui/server/.yo-rc.json b/cds-ui/server/.yo-rc.json
new file mode 100644 (file)
index 0000000..0967ef4
--- /dev/null
@@ -0,0 +1 @@
+{}
diff --git a/cds-ui/server/README.md b/cds-ui/server/README.md
new file mode 100644 (file)
index 0000000..5591df0
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+# cds-ui-server
+
+[![LoopBack](https://github.com/strongloop/loopback-next/raw/master/docs/site/imgs/branding/Powered-by-LoopBack-Badge-(blue)-@2x.png)](http://loopback.io/)
diff --git a/cds-ui/server/index.js b/cds-ui/server/index.js
new file mode 100644 (file)
index 0000000..b79f7d6
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+const application = require('./dist');
+
+module.exports = application;
+
+if (require.main === module) {
+  // Run the application
+  const config = {
+    rest: {
+      port: +process.env.PORT || 3000,
+      host: process.env.HOST || 'localhost',
+      openApiSpec: {
+        // useful when used with OASGraph to locate your application
+        setServersFromRequest: true,
+      },
+    },
+  };
+  application.main(config).catch(err => {
+    console.error('Cannot start the application.', err);
+    process.exit(1);
+  });
+}
diff --git a/cds-ui/server/index.ts b/cds-ui/server/index.ts
new file mode 100644 (file)
index 0000000..8717b8d
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+export * from './src';
diff --git a/cds-ui/server/package.json b/cds-ui/server/package.json
new file mode 100644 (file)
index 0000000..4d0f946
--- /dev/null
@@ -0,0 +1,64 @@
+{
+  "name": "cds-ui-server",
+  "version": "1.0.0",
+  "description": "Intermediate layer between UI and backend. Implemented in loopback 4",
+  "keywords": [
+    "loopback-application",
+    "loopback"
+  ],
+  "main": "index.js",
+  "engines": {
+    "node": ">=8.9"
+  },
+  "scripts": {
+    "build:apidocs": "lb-apidocs",
+    "build": "lb-tsc es2017 --outDir dist",
+    "build:watch": "lb-tsc --watch",
+    "clean": "lb-clean dist",
+    "lint": "npm run prettier:check && npm run tslint",
+    "lint:fix": "npm run tslint:fix && npm run prettier:fix",
+    "prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"",
+    "prettier:check": "npm run prettier:cli -- -l",
+    "prettier:fix": "npm run prettier:cli -- --write",
+    "tslint": "lb-tslint",
+    "tslint:fix": "npm run tslint -- --fix",
+    "pretest": "npm run clean && npm run build",
+    "test": "lb-mocha --allow-console-logs \"dist/test\"",
+    "posttest": "npm run lint",
+    "test:dev": "lb-mocha --allow-console-logs dist/test/**/*.js && npm run posttest",
+    "migrate": "node ./dist/src/migrate",
+    "prestart": "npm run build",
+    "start": "node .",
+    "prepublishOnly": "npm run test"
+  },
+  "repository": {
+    "type": "git"
+  },
+  "author": "",
+  "license": "",
+  "files": [
+    "README.md",
+    "index.js",
+    "index.d.ts",
+    "dist/src",
+    "dist/index*",
+    "src"
+  ],
+  "dependencies": {
+    "@loopback/boot": "^1.0.8",
+    "@loopback/context": "^1.4.0",
+    "@loopback/core": "^1.1.3",
+    "@loopback/openapi-v3": "^1.1.5",
+    "@loopback/repository": "^1.1.1",
+    "@loopback/rest": "^1.5.1",
+    "@loopback/rest-explorer": "^1.1.4",
+    "@loopback/service-proxy": "^1.0.8",
+    "loopback-connector-rest": "^3.4.1"
+  },
+  "devDependencies": {
+    "@loopback/build": "^1.1.0",
+    "@loopback/testlab": "^1.0.3",
+    "@loopback/tslint-config": "^1.0.0",
+    "@types/node": "^10.11.2"
+  }
+}
diff --git a/cds-ui/server/pom.xml b/cds-ui/server/pom.xml
new file mode 100644 (file)
index 0000000..bac8b03
--- /dev/null
@@ -0,0 +1,99 @@
+<!-- 
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================ -->
+
+<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">
+    <modelVersion>4.0.0</modelVersion>
+    
+    <parent>
+        <groupId>org.onap.ccsdk.cds</groupId>
+        <artifactId>controller-design-studio</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../..</relativePath>
+    </parent>
+    
+    <groupId>org.onap.ccsdk.cds.server</groupId>
+    <artifactId>controller-design-studio-server</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <name>cds-ui-server</name>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <npm.executable>npm</npm.executable>
+        <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+    </properties>
+
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.github.eirslett</groupId>
+                <artifactId>frontend-maven-plugin</artifactId>
+                <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
+                <version>1.3</version>
+                <configuration>
+                    <nodeVersion>v8.12.0</nodeVersion>
+                    <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
+                    <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
+                    <installDirectory>./</installDirectory>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>install node and npm</id>
+                        <goals>
+                            <goal>install-node-and-npm</goal>
+                        </goals>
+                        <phase>generate-resources</phase>
+                    </execution>
+
+                    <execution>
+                        <id>npm install</id>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+
+                        <phase>generate-resources</phase>
+
+                        <configuration>
+                            <arguments>install</arguments>
+                        </configuration>
+                    </execution>
+
+                    <execution>
+                        <id>npm build</id>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+
+                        <phase>generate-resources</phase>
+
+                        <configuration>
+                            <arguments>run build</arguments>
+                        </configuration>
+                    </execution>
+
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/cds-ui/server/public/index.html b/cds-ui/server/public/index.html
new file mode 100644 (file)
index 0000000..81e9728
--- /dev/null
@@ -0,0 +1,19 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================ -->
diff --git a/cds-ui/server/src/application.ts b/cds-ui/server/src/application.ts
new file mode 100644 (file)
index 0000000..463f330
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { BootMixin } from '@loopback/boot';
+import { ApplicationConfig } from '@loopback/core';
+import {
+  RestExplorerBindings,
+  RestExplorerComponent,
+} from '@loopback/rest-explorer';
+import { RepositoryMixin } from '@loopback/repository';
+import { RestApplication } from '@loopback/rest';
+import { ServiceMixin } from '@loopback/service-proxy';
+import * as path from 'path';
+import { MySequence } from './sequence';
+
+export class CdsUiServerApplication extends BootMixin(
+  ServiceMixin(RepositoryMixin(RestApplication)),
+) {
+  constructor(options: ApplicationConfig = {}) {
+    super(options);
+
+    // Set up the custom sequence
+    this.sequence(MySequence);
+
+    // Set up default home page
+    this.static('/', path.join(__dirname, '../../public'));
+
+    // Customize @loopback/rest-explorer configuration here
+    this.bind(RestExplorerBindings.CONFIG).to({
+      path: '/explorer',
+    });
+    this.component(RestExplorerComponent);
+
+    this.projectRoot = __dirname;
+    // Customize @loopback/boot Booter Conventions here
+    this.bootOptions = {
+      controllers: {
+        // Customize ControllerBooter Conventions here
+        dirs: ['controllers'],
+        extensions: ['.controller.js'],
+        nested: true,
+      },
+    };
+  }
+}
diff --git a/cds-ui/server/src/controllers/README.md b/cds-ui/server/src/controllers/README.md
new file mode 100644 (file)
index 0000000..837a462
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+# Controllers
+
+This directory contains source files for the controllers exported by this app.
+
+To add a new empty controller, type in `lb4 controller [<name>]` from the
+command-line of your application's root directory.
+
+For more information, please visit
+[Controller generator](http://loopback.io/doc/en/lb4/Controller-generator.html).
diff --git a/cds-ui/server/src/controllers/blueprint-rest.controller.ts b/cds-ui/server/src/controllers/blueprint-rest.controller.ts
new file mode 100644 (file)
index 0000000..960f09f
--- /dev/null
@@ -0,0 +1,160 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+
+import {
+  Count,
+  CountSchema,
+  Filter,
+  repository,
+  Where,
+} from '@loopback/repository';
+import {
+  post,
+  param,
+  get,
+  getFilterSchemaFor,
+  getWhereSchemaFor,
+  patch,
+  put,
+  del,
+  requestBody,
+} from '@loopback/rest';
+import {Blueprint} from '../models';
+import {BlueprintRepository} from '../repositories';
+
+export class BlueprintRestController {
+  constructor(
+    @repository(BlueprintRepository)
+    public blueprintRepository : BlueprintRepository,
+  ) {}
+
+  @post('/blueprints', {
+    responses: {
+      '200': {
+        description: 'Blueprint model instance',
+        content: {'application/json': {schema: {'x-ts-type': Blueprint}}},
+      },
+    },
+  })
+  async create(@requestBody() blueprint: Blueprint): Promise<Blueprint> {
+    return await this.blueprintRepository.create(blueprint);
+  }
+
+  @get('/blueprints/count', {
+    responses: {
+      '200': {
+        description: 'Blueprint model count',
+        content: {'application/json': {schema: CountSchema}},
+      },
+    },
+  })
+  async count(
+    @param.query.object('where', getWhereSchemaFor(Blueprint)) where?: Where,
+  ): Promise<Count> {
+    return await this.blueprintRepository.count(where);
+  }
+
+  @get('/blueprints', {
+    responses: {
+      '200': {
+        description: 'Array of Blueprint model instances',
+        content: {
+          'application/json': {
+            schema: {type: 'array', items: {'x-ts-type': Blueprint}},
+          },
+        },
+      },
+    },
+  })
+  async find(
+    @param.query.object('filter', getFilterSchemaFor(Blueprint)) filter?: Filter,
+  ): Promise<Blueprint[]> {
+    return await this.blueprintRepository.find(filter);
+  }
+
+  @patch('/blueprints', {
+    responses: {
+      '200': {
+        description: 'Blueprint PATCH success count',
+        content: {'application/json': {schema: CountSchema}},
+      },
+    },
+  })
+  async updateAll(
+    @requestBody() blueprint: Blueprint,
+    @param.query.object('where', getWhereSchemaFor(Blueprint)) where?: Where,
+  ): Promise<Count> {
+    return await this.blueprintRepository.updateAll(blueprint, where);
+  }
+
+  @get('/blueprints/{id}', {
+    responses: {
+      '200': {
+        description: 'Blueprint model instance',
+        content: {'application/json': {schema: {'x-ts-type': Blueprint}}},
+      },
+    },
+  })
+  async findById(@param.path.number('id') id: number): Promise<Blueprint> {
+    return await this.blueprintRepository.findById(id);
+  }
+
+  @patch('/blueprints/{id}', {
+    responses: {
+      '204': {
+        description: 'Blueprint PATCH success',
+      },
+    },
+  })
+  async updateById(
+    @param.path.number('id') id: number,
+    @requestBody() blueprint: Blueprint,
+  ): Promise<void> {
+    await this.blueprintRepository.updateById(id, blueprint);
+  }
+
+  @put('/blueprints/{id}', {
+    responses: {
+      '204': {
+        description: 'Blueprint PUT success',
+      },
+    },
+  })
+  async replaceById(
+    @param.path.number('id') id: number,
+    @requestBody() blueprint: Blueprint,
+  ): Promise<void> {
+    await this.blueprintRepository.replaceById(id, blueprint);
+  }
+
+  @del('/blueprints/{id}', {
+    responses: {
+      '204': {
+        description: 'Blueprint DELETE success',
+      },
+    },
+  })
+  async deleteById(@param.path.number('id') id: number): Promise<void> {
+    await this.blueprintRepository.deleteById(id);
+  }
+}
diff --git a/cds-ui/server/src/controllers/index.ts b/cds-ui/server/src/controllers/index.ts
new file mode 100644 (file)
index 0000000..bf2bd6f
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+export * from './ping.controller';
diff --git a/cds-ui/server/src/controllers/ping.controller.ts b/cds-ui/server/src/controllers/ping.controller.ts
new file mode 100644 (file)
index 0000000..d3098bc
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { Request, RestBindings, get, ResponseObject } from '@loopback/rest';
+import { inject } from '@loopback/context';
+
+/**
+ * OpenAPI response for ping()
+ */
+const PING_RESPONSE: ResponseObject = {
+  description: 'Ping Response',
+  content: {
+    'application/json': {
+      schema: {
+        type: 'object',
+        properties: {
+          greeting: { type: 'string' },
+          date: { type: 'string' },
+          url: { type: 'string' },
+          headers: {
+            type: 'object',
+            properties: {
+              'Content-Type': { type: 'string' },
+            },
+            additionalProperties: true,
+          },
+        },
+      },
+    },
+  },
+};
+
+/**
+ * A simple controller to bounce back http requests
+ */
+export class PingController {
+  constructor(@inject(RestBindings.Http.REQUEST) private req: Request) { }
+
+  // Map to `GET /ping`
+  @get('/ping', {
+    responses: {
+      '200': PING_RESPONSE,
+    },
+  })
+  ping(): object {
+    // Reply with a greeting, the current time, the url, and request headers
+    return {
+      greeting: 'Hello from LoopBack',
+      date: new Date(),
+      url: this.req.url,
+      headers: Object.assign({}, this.req.headers),
+    };
+  }
+}
diff --git a/cds-ui/server/src/datasources/README.md b/cds-ui/server/src/datasources/README.md
new file mode 100644 (file)
index 0000000..2d4d4c3
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+# Datasources
+
+This directory contains config for datasources used by this app.
diff --git a/cds-ui/server/src/datasources/db.datasource.json b/cds-ui/server/src/datasources/db.datasource.json
new file mode 100644 (file)
index 0000000..a68f220
--- /dev/null
@@ -0,0 +1,6 @@
+{
+  "name": "db",
+  "connector": "memory",
+  "localStorage": "",
+  "file": "./data/db.json"
+}
diff --git a/cds-ui/server/src/datasources/db.datasource.ts b/cds-ui/server/src/datasources/db.datasource.ts
new file mode 100644 (file)
index 0000000..f1b19a1
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+import {inject} from '@loopback/core';
+import {juggler} from '@loopback/repository';
+import * as config from './db.datasource.json';
+
+export class DbDataSource extends juggler.DataSource {
+  static dataSourceName = 'db';
+
+  constructor(
+    @inject('datasources.config.db', {optional: true})
+    dsConfig: object = config,
+  ) {
+    super(dsConfig);
+  }
+}
diff --git a/cds-ui/server/src/datasources/index.ts b/cds-ui/server/src/datasources/index.ts
new file mode 100644 (file)
index 0000000..1726b45
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+export * from './db.datasource';
diff --git a/cds-ui/server/src/datasources/rest.config.json b/cds-ui/server/src/datasources/rest.config.json
new file mode 100644 (file)
index 0000000..86f33fb
--- /dev/null
@@ -0,0 +1,39 @@
+{
+   "name": "restConfig",
+   "connector": "rest",
+   "options": {
+      "headers": {
+          "accept": "application/json",
+          "content-type": "application/json"
+      }
+   },
+   "operations": [
+       {
+      "template": {
+         "method": "GET",
+         "url": ""
+      },
+      "functions": {
+         "getEnricheddata": [""]
+      }
+   },
+   {
+      "template": {
+         "method": "POST",
+         "url": ""
+      },
+      "functions": {
+         "saveBlueprint": [""]
+      }
+   },
+   {
+      "template": {
+         "method": "POST",
+         "url": ""
+      },
+      "functions": {
+         "test": [""]
+      }
+   }
+]
+}
\ No newline at end of file
diff --git a/cds-ui/server/src/datasources/rest.datasource.ts b/cds-ui/server/src/datasources/rest.datasource.ts
new file mode 100644 (file)
index 0000000..42cdb80
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+import { juggler } from '@loopback/service-proxy';
+import * as config from './rest.config.json';
+
+
+export class RestDataSource extends juggler.DataSource {
+   static dataSourceName = 'rest';
+   constructor(dsConfig: object = config) {
+      super(dsConfig);
+   }
+}
diff --git a/cds-ui/server/src/index.ts b/cds-ui/server/src/index.ts
new file mode 100644 (file)
index 0000000..0485249
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { CdsUiServerApplication } from './application';
+import { ApplicationConfig } from '@loopback/core';
+
+export { CdsUiServerApplication };
+
+export async function main(options: ApplicationConfig = {}) {
+  const app = new CdsUiServerApplication(options);
+  await app.boot();
+  await app.start();
+
+  const url = app.restServer.url;
+  console.log(`Server is running at ${url}`);
+  console.log(`Try ${url}/ping`);
+
+  return app;
+}
diff --git a/cds-ui/server/src/migrate.ts b/cds-ui/server/src/migrate.ts
new file mode 100644 (file)
index 0000000..0897b98
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { CdsUiServerApplication } from './application';
+
+export async function migrate(args: string[]) {
+  const existingSchema = args.includes('--rebuild') ? 'drop' : 'alter';
+  console.log('Migrating schemas (%s existing schema)', existingSchema);
+
+  const app = new CdsUiServerApplication();
+  await app.boot();
+  await app.migrateSchema({ existingSchema });
+
+  // Connectors usually keep a pool of opened connections,
+  // this keeps the process running even after all work is done.
+  // We need to exit explicitly.
+  process.exit(0);
+}
+
+migrate(process.argv).catch(err => {
+  console.error('Cannot migrate database schema', err);
+  process.exit(1);
+});
diff --git a/cds-ui/server/src/models/README.md b/cds-ui/server/src/models/README.md
new file mode 100644 (file)
index 0000000..b4bbe4a
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+# Models
+
+This directory contains code for models provided by this app.
diff --git a/cds-ui/server/src/models/blueprint.model.ts b/cds-ui/server/src/models/blueprint.model.ts
new file mode 100644 (file)
index 0000000..d9fe1a8
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+import {Entity, model, property} from '@loopback/repository';
+
+@model()
+export class Blueprint extends Entity {
+  @property({
+    type: 'number',
+    id: true,
+  })
+  id?: number;
+
+  @property({
+    type: 'object',
+  })
+  metadata?: object;
+
+  @property({
+    type: 'array',
+    itemType: 'object',
+  })
+  fileImports?: object[];
+
+  @property({
+    type: 'object',
+  })
+  topologyTemplates?: object;
+
+  constructor(data?: Partial<Blueprint>) {
+    super(data);
+  }
+}
diff --git a/cds-ui/server/src/models/index.ts b/cds-ui/server/src/models/index.ts
new file mode 100644 (file)
index 0000000..b4de6a5
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+export * from './blueprint.model';
diff --git a/cds-ui/server/src/repositories/README.md b/cds-ui/server/src/repositories/README.md
new file mode 100644 (file)
index 0000000..dc7af90
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+# Repositories
+
+This directory contains code for repositories provided by this app.
diff --git a/cds-ui/server/src/repositories/blueprint.repository.ts b/cds-ui/server/src/repositories/blueprint.repository.ts
new file mode 100644 (file)
index 0000000..3af5c11
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+import {DefaultCrudRepository, juggler} from '@loopback/repository';
+import {Blueprint} from '../models';
+import {DbDataSource} from '../datasources';
+import {inject} from '@loopback/core';
+
+export class BlueprintRepository extends DefaultCrudRepository<
+  Blueprint,
+  typeof Blueprint.prototype.id
+> {
+  constructor(
+    @inject('datasources.db') dataSource: DbDataSource,
+  ) {
+    super(Blueprint, dataSource);
+  }
+}
diff --git a/cds-ui/server/src/repositories/index.ts b/cds-ui/server/src/repositories/index.ts
new file mode 100644 (file)
index 0000000..ac56b3c
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+
+export * from './blueprint.repository';
diff --git a/cds-ui/server/src/sequence.ts b/cds-ui/server/src/sequence.ts
new file mode 100644 (file)
index 0000000..b270931
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import { inject } from '@loopback/context';
+import {
+  FindRoute,
+  InvokeMethod,
+  ParseParams,
+  Reject,
+  RequestContext,
+  RestBindings,
+  Send,
+  SequenceHandler,
+} from '@loopback/rest';
+
+const SequenceActions = RestBindings.SequenceActions;
+
+export class MySequence implements SequenceHandler {
+  constructor(
+    @inject(SequenceActions.FIND_ROUTE) protected findRoute: FindRoute,
+    @inject(SequenceActions.PARSE_PARAMS) protected parseParams: ParseParams,
+    @inject(SequenceActions.INVOKE_METHOD) protected invoke: InvokeMethod,
+    @inject(SequenceActions.SEND) public send: Send,
+    @inject(SequenceActions.REJECT) public reject: Reject,
+  ) { }
+
+  async handle(context: RequestContext) {
+    try {
+      const { request, response } = context;
+      const route = this.findRoute(request);
+      const args = await this.parseParams(request, route);
+      const result = await this.invoke(route, args);
+      this.send(response, result);
+    } catch (err) {
+      this.reject(context, err);
+    }
+  }
+}
diff --git a/cds-ui/server/src/services/rest.service.ts b/cds-ui/server/src/services/rest.service.ts
new file mode 100644 (file)
index 0000000..b94ea4d
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================
+*/
+
+import {getService, juggler} from '@loopback/service-proxy';
+import {inject, Provider} from '@loopback/core';
+import {RestDataSource} from '../datasources/rest.datasource';
+
+
+export interface RestResponseData {
+   userId: number;
+   id: number;
+   title: string;
+   completed: boolean;
+}
+
+export interface RestService {
+   getrestdata(id?: number): Promise<RestResponseData>;
+}
+export class RestProvider implements Provider<RestService> {
+   constructor(
+      @inject('datasources.rest')
+      protected dataSource: juggler.DataSource = new RestDataSource(),
+   ) {}
+   
+   value(): Promise<RestService> {
+      return getService(this.dataSource);
+   }
+}
\ No newline at end of file
diff --git a/cds-ui/server/tsconfig.json b/cds-ui/server/tsconfig.json
new file mode 100644 (file)
index 0000000..eb96bb5
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "$schema": "http://json.schemastore.org/tsconfig",
+  "extends": "@loopback/build/config/tsconfig.common.json",
+  "include": [
+    "src",
+    "test",
+    "index.ts"
+  ],
+  "exclude": [
+    "node_modules/**",
+    "packages/*/node_modules/**",
+    "**/*.d.ts"
+  ]
+}
diff --git a/cds-ui/server/tslint.build.json b/cds-ui/server/tslint.build.json
new file mode 100644 (file)
index 0000000..121b8ad
--- /dev/null
@@ -0,0 +1,4 @@
+{
+  "$schema": "http://json.schemastore.org/tslint",
+  "extends": ["@loopback/tslint-config/tslint.build.json"]
+}
diff --git a/cds-ui/server/tslint.json b/cds-ui/server/tslint.json
new file mode 100644 (file)
index 0000000..2bb931e
--- /dev/null
@@ -0,0 +1,4 @@
+{
+  "$schema": "http://json.schemastore.org/tslint",
+  "extends": ["@loopback/tslint-config/tslint.common.json"]
+}
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json b/components/model-catalog/blueprint-model/service-blueprint/vFW/Definitions/vFW_spinup.json
new file mode 100644 (file)
index 0000000..4484d55
--- /dev/null
@@ -0,0 +1,3613 @@
+{
+  "metadata": {
+    "template_author": "aa0419",
+    "template_name": "vFW_spinup",
+    "template_version": "1.0.0",
+    "service-type": "vFW",
+    "template_tags": "vFW, ONAP",
+    "release": "1810",
+    "vnf-type": "VFW"
+  },
+  "topology_template": {
+    "inputs": {
+      "request-id": {
+        "required": true,
+        "type": "string"
+      },
+      "service-instance-id": {
+        "required": true,
+        "type": "string"
+      },
+      "scope-type": {
+        "required": true,
+        "type": "string"
+      },
+      "action-name": {
+        "required": true,
+        "type": "string"
+      },
+      "hostname": {
+        "required": true,
+        "type": "string"
+      },
+      "resource-assignment-request": {
+        "description": "This is Dynamic Data type for the receipe resource-assignment-action.",
+        "required": false,
+        "type": "dt-resource-assignment-request"
+      }
+    },
+    "node_templates": {
+      "resource-assignment-ra-component": {
+        "type": "component-resource-assignment",
+        "interfaces": {
+          "ResourceAssignmentComponent": {
+            "operations": {
+              "process": {
+                "inputs": {
+                  "action-name": "{ \"get_input\" : \"action-name\" }",
+                  "service-template-name": "{ \"get_attribute\" : \"service-template-name\" }",
+                  "template-names": [
+                    "vFW_vNF_Artifact",
+                    "base_template",
+                    "vfw",
+                    "vsn",
+                    "vpg"
+                  ],
+                  "service-template-version": "{ \"get_attribute\" : \"service-template-version\" }",
+                  "resource-type": "vnf-type",
+                  "request-id": "{ \"get_input\" : \"request-id\" }",
+                  "resource-id": "{ \"get_input\" : \"hostname\" }"
+                },
+                "outputs": {
+                  "resource-assignment-params": "Success",
+                  "status": "status"
+                }
+              }
+            }
+          }
+        },
+        "capabilities": {
+          "component-node": {
+            
+          }
+        }
+      },
+      "resource-assignment-action": {
+        "type": "dg-resource-assignment",
+        "properties": {
+          "mode": "sync",
+          "version": "LATEST",
+          "is-start-flow": false
+        },
+        "interfaces": {
+          "CONFIG": {
+            "operations": {
+              "ResourceAssignment": {
+                "inputs": {
+                  "params": [
+                    
+                  ]
+                }
+              }
+            }
+          }
+        },
+        "capabilities": {
+          "dg-node": {
+            
+          },
+          "content": {
+            "properties": {
+              "type": "json"
+            }
+          }
+        },
+        "requirements": {
+          "component-dependency": {
+            "capability": "component-node",
+            "node": "resource-assignment-ra-component",
+            "relationship": "tosca.relationships.DependsOn"
+          }
+        }
+      },
+      "vFW_vNF_Artifact": {
+        "type": "artifact-config-template",
+        "properties": {
+          "action-names": [
+            "resource-assignment-action"
+          ]
+        },
+        "capabilities": {
+          "content": {
+            "properties": {
+              "content": "vFW_vNF_Artifact"
+            }
+          },
+          "mapping": {
+            "properties": {
+              "mapping": [
+                {
+                  "name": "service-instance-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "service-instance-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-model-customization-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-model-customization-uuid",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "aic-cloud-region",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "aic-cloud-region",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_net_id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_net_id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_subnet_id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_subnet_id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "key_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "key_name",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "image_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "Ubuntu 14.04 LTS Generic"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "image_name",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "pub_key",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "pub_key",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf_name",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-naming-policy",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "SDNC_Policy.Config_MS_ONAP_VFW_NAMING_TIMESTAMP"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-naming-policy",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nf-role",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nf-role",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vnf-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vfw_private_ip_1",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vfw_private_ip_1",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vfw_private_ip_0",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vfw_private_ip_0",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vpg_private_ip_0",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vpg_private_ip_0",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vsn_private_ip_0",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vsn_private_ip_0",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "protected-prefix-id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "integer",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "protected-prefix-id",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "unprotected-prefix-id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "integer",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "unprotected-prefix-id",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-nf-code",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-nf-code",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vnf-model-customization-uuid"
+                  ],
+                  "version": 0
+                }
+              ]
+            }
+          }
+        }
+      },
+      "vfw": {
+        "type": "artifact-config-template",
+        "capabilities": {
+          "content": {
+            "properties": {
+              "content": "vfw"
+            }
+          },
+          "mapping": {
+            "properties": {
+              "mapping": [
+                {
+                  "name": "service-instance-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "service-instance-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-name",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-name",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-model-customization-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-model-customization-uuid",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-type",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-type",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vf-module-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-model-customization-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-model-customization-uuid",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vfccustomizationuuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vfccustomizationuuid",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vf-module-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "aic-cloud-region",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "aic-cloud-region",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vm-type",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vm-type",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnfc-model-invariant-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnfc-model-invariant-uuid",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vfccustomizationuuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnfc-model-version",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnfc-model-version",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vfccustomizationuuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nf-role",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "vFW"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nf-role",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    "vnf-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nfc-naming-code",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nfc-naming-code",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vfccustomizationuuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "public_net_id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "public_net_id"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "public_net_id",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "image_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "image_name",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "key_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "key_name",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "pub_key",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "pub_key",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_net_id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_net_id",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_subnet_id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_subnet_id",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "unprotected_private_net_cidr",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "unprotected_private_net_cidr",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "protected_private_net_cidr",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "protected_private_net_cidr",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nexus_artifact_repo",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "nexus_artifact_repo"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nexus_artifact_repo",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "sec_group",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "onap_sg_PUhf"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "sec_group",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_net_cidr",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_net_cidr",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vfw_name_0",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vfw_name_0",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-naming-policy",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "SDNC_Policy.Config_MS_ONAP_VFW_NAMING_TIMESTAMP"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-naming-policy",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf_module_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf_module_name",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-label",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-label",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vf-module-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "private-prefix-id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "integer",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "private-prefix-id",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vfw_private_ip_2",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vfw_private_ip_2",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf_name",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                }
+              ]
+            }
+          }
+        }
+      },
+      "vpg": {
+        "type": "artifact-config-template",
+        "capabilities": {
+          "content": {
+            "properties": {
+              "content": "vpg"
+            }
+          },
+          "mapping": {
+            "properties": {
+              "mapping": [
+                {
+                  "name": "service-instance-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "service-instance-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-name",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-name",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-model-customization-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-model-customization-uuid",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-type",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-type",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vf-module-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-model-customization-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-model-customization-uuid",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vfccustomizationuuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vfccustomizationuuid",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vf-module-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "aic-cloud-region",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "aic-cloud-region",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vm-type",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vm-type",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnfc-model-invariant-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnfc-model-invariant-uuid",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vfccustomizationuuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnfc-model-version",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnfc-model-version",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vfccustomizationuuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nf-role",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "vPG"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nf-role",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    "vnf-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nfc-naming-code",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nfc-naming-code",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vfccustomizationuuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "public_net_id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "public_net_id"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "public_net_id",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "image_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "image_name",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "key_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "key_name",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "pub_key",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "pub_key",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_net_id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_net_id",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_subnet_id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_subnet_id",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "unprotected_private_net_cidr",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "unprotected_private_net_cidr",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_net_cidr",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_net_cidr",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vfw_private_ip_0",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vfw_private_ip_0",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vsn_private_ip_0",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vsn_private_ip_0",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nexus_artifact_repo",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "nexus_artifact_repo"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nexus_artifact_repo",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "sec_group",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "onap_sg_PUhf"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "sec_group",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vpg_private_ip_0",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vpg_private_ip_0",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vpg_name_0",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vpg_name_0",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-naming-policy",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "SDNC_Policy.Config_MS_ONAP_VPG_NAMING_TIMESTAMP"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-naming-policy",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf_module_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf_module_name",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-label",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-label",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vf-module-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "private-prefix-id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "integer",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "private-prefix-id",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vpg_private_ip_1",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vpg_private_ip_1",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                }
+              ]
+            }
+          }
+        }
+      },
+      "vsn": {
+        "type": "artifact-config-template",
+        "capabilities": {
+          "content": {
+            "properties": {
+              "content": "vsn"
+            }
+          },
+          "mapping": {
+            "properties": {
+              "mapping": [
+                {
+                  "name": "service-instance-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "service-instance-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-name",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-name",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-model-customization-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-model-customization-uuid",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-type",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-type",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vf-module-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-model-customization-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-model-customization-uuid",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vfccustomizationuuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vfccustomizationuuid",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vf-module-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "aic-cloud-region",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "aic-cloud-region",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vm-type",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vm-type",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnfc-model-invariant-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnfc-model-invariant-uuid",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vfccustomizationuuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnfc-model-version",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnfc-model-version",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vfccustomizationuuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nf-role",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "vSN"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nf-role",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    "vnf-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nfc-naming-code",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nfc-naming-code",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vfccustomizationuuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "image_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "image_name",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "public_net_id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "value": "public_net_id",
+                    "default": "public_net_id"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "public_net_id",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "key_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "key_name",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "pub_key",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "pub_key",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_net_id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_net_id",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_subnet_id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_subnet_id",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "unprotected_private_net_cidr",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "unprotected_private_net_cidr",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "protected_private_net_cidr",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "protected_private_net_cidr",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "onap_private_net_cidr",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "onap_private_net_cidr",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nexus_artifact_repo",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "value": "nexus_artifact_repo",
+                    "default": "nexus_artifact_repo"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nexus_artifact_repo",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "sec_group",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "onap_sg_PUhf"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "sec_group",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vfw_private_ip_1",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vfw_private_ip_1",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vsn_name_0",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vsn_name_0",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-naming-policy",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    },
+                    "default": "SDNC_Policy.Config_MS_ONAP_VSN_NAMING_TIMESTAMP"
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-naming-policy",
+                  "dictionary-source": "default",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf_module_name",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf_module_name",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-label",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-label",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vf-module-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "private-prefix-id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "integer",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "private-prefix-id",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vsn_private_ip_1",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vsn_private_ip_1",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "protected-prefix-id",
+                  "property": {
+                    "description": "",
+                    "required": false,
+                    "type": "integer",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "protected-prefix-id",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                }
+              ]
+            }
+          }
+        }
+      },
+      "base_template": {
+        "type": "artifact-config-template",
+        "capabilities": {
+          "content": {
+            "properties": {
+              "content": "base_template"
+            }
+          },
+          "mapping": {
+            "properties": {
+              "mapping": [
+                {
+                  "name": "service-instance-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "service-instance-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-type",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-type",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vf-module-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-model-customization-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-model-customization-uuid",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vf-module-id",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vf-module-id",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-model-customization-uuid",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-model-customization-uuid",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "aic-cloud-region",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "aic-cloud-region",
+                  "dictionary-source": "input",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "nf-role",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "nf-role",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    "vnf-model-customization-uuid"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "vnf-name",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "vnf-name",
+                  "dictionary-source": "primary-config-data",
+                  "dependencies": [
+                    "service-instance-id",
+                    "vnf-id"
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "unprotected_private_net_cidr",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "unprotected_private_net_cidr",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                },
+                {
+                  "name": "protected_private_net_cidr",
+                  "property": {
+                    "description": "",
+                    "required": true,
+                    "type": "string",
+                    "status": "",
+                    "constraints": [
+                      {
+                        
+                      }
+                    ],
+                    "entry_schema": {
+                      "type": ""
+                    }
+                  },
+                  "input-param": false,
+                  "dictionary-name": "protected_private_net_cidr",
+                  "dictionary-source": "primary-db",
+                  "dependencies": [
+                    
+                  ],
+                  "version": 0
+                }
+              ]
+            }
+          }
+        }
+      }
+    }
+  },
+  "node_types": {
+    "tosca.nodes.Component": {
+      "description": "This is default Component Node",
+      "version": "1.0.0",
+      "derived_from": "tosca.nodes.Root"
+    },
+    "tosca.nodes.DG": {
+      "description": "This is Directed Graph Node Type",
+      "version": "1.0.0",
+      "derived_from": "tosca.nodes.Root"
+    },
+    "tosca.nodes.Artifact": {
+      "description": "This is Deprecated Artifact Node Type.",
+      "version": "1.0.0",
+      "derived_from": "tosca.nodes.Root"
+    },
+    "component-resource-assignment": {
+      "description": "This is Resource Assignment Component API",
+      "version": "1.0.0",
+      "capabilities": {
+        "component-node": {
+          "type": "tosca.capabilities.Node"
+        }
+      },
+      "interfaces": {
+        "ResourceAssignmentComponent": {
+          "operations": {
+            "process": {
+              "inputs": {
+                "action-name": {
+                  "description": "Action Name of the process",
+                  "required": true,
+                  "type": "string"
+                },
+                "service-template-name": {
+                  "description": "Service Template Name.",
+                  "required": true,
+                  "type": "string"
+                },
+                "service-template-version": {
+                  "description": "Service Template Version.",
+                  "required": true,
+                  "type": "string"
+                },
+                "resource-type": {
+                  "description": "Request type.",
+                  "required": true,
+                  "type": "string"
+                },
+                "template-names": {
+                  "description": "Name of the artifact Node Templates, to get the template Content.",
+                  "required": true,
+                  "type": "list",
+                  "entry_schema": {
+                    "type": "string"
+                  }
+                },
+                "request-id": {
+                  "description": "Request Id, Unique Id for the request.",
+                  "required": true,
+                  "type": "string"
+                },
+                "resource-id": {
+                  "description": "Resource Id.",
+                  "required": true,
+                  "type": "string"
+                }
+              },
+              "outputs": {
+                "resource-assignment-params": {
+                  "required": true,
+                  "type": "string"
+                },
+                "status": {
+                  "required": true,
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.Component"
+    },
+    "dg-resource-assignment": {
+      "description": "This is Resource Assignment Directed Graph",
+      "version": "1.0.0",
+      "properties": {
+        "mode": {
+          "required": false,
+          "type": "string",
+          "default": "sync"
+        },
+        "version": {
+          "required": false,
+          "type": "string",
+          "default": "LATEST"
+        },
+        "is-start-flow": {
+          "required": false,
+          "type": "boolean",
+          "default": "false"
+        }
+      },
+      "capabilities": {
+        "dg-node": {
+          "type": "tosca.capabilities.Node"
+        },
+        "content": {
+          "type": "tosca.capabilities.Content",
+          "properties": {
+            "type": {
+              "required": false,
+              "type": "string",
+              "default": "json"
+            },
+            "content": {
+              "required": false,
+              "type": "string"
+            }
+          }
+        }
+      },
+      "requirements": {
+        "component-dependency": {
+          "capability": "component-node",
+          "node": "component-resource-assignment",
+          "relationship": "tosca.relationships.DependsOn"
+        }
+      },
+      "interfaces": {
+        "CONFIG": {
+          "operations": {
+            "ResourceAssignment": {
+              "inputs": {
+                "params": {
+                  "required": false,
+                  "type": "list",
+                  "entry_schema": {
+                    "type": "datatype-property"
+                  }
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.DG"
+    },
+    "artifact-config-template": {
+      "description": "This is Configuration Velocity Template",
+      "version": "1.0.0",
+      "properties": {
+        "action-names": {
+          "required": true,
+          "type": "list",
+          "entry_schema": {
+            "type": "string"
+          }
+        }
+      },
+      "capabilities": {
+        "content": {
+          "type": "tosca.capabilities.Content",
+          "properties": {
+            "content": {
+              "required": true,
+              "type": "string"
+            }
+          }
+        },
+        "mapping": {
+          "type": "tosca.capabilities.Mapping",
+          "properties": {
+            "mapping": {
+              "required": false,
+              "type": "list",
+              "entry_schema": {
+                "type": "datatype-resource-assignment"
+              }
+            }
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.Artifact"
+    }
+  },
+  "data_types": {
+    "datatype-property": {
+      "version": "1.0.0",
+      "description": "This is Entry point Input Data Type, which is dynamic datatype, The parameter names will be populated during the Design time for each inputs",
+      "properties": {
+        "type": {
+          "required": true,
+          "type": "string"
+        },
+        "description": {
+          "required": false,
+          "type": "string"
+        },
+        "required": {
+          "required": false,
+          "type": "boolean"
+        },
+        "default": {
+          "required": false,
+          "type": "string"
+        },
+        "entry_schema": {
+          "required": false,
+          "type": "string"
+        }
+      },
+      "derived_from": "tosca.datatypes.Root"
+    },
+    "datatype-resource-assignment": {
+      "version": "1.0.0",
+      "description": "This is Resource Assignment Data Type",
+      "properties": {
+        "property": {
+          "required": true,
+          "type": "datatype-property"
+        },
+        "input-param": {
+          "required": true,
+          "type": "boolean"
+        },
+        "dictionary-name": {
+          "required": false,
+          "type": "string"
+        },
+        "dictionary-source": {
+          "required": false,
+          "type": "string"
+        },
+        "dependencies": {
+          "required": true,
+          "type": "list",
+          "entry_schema": {
+            "type": "string"
+          }
+        },
+        "status": {
+          "required": false,
+          "type": "string"
+        },
+        "message": {
+          "required": false,
+          "type": "string"
+        },
+        "updated-date": {
+          "required": false,
+          "type": "string"
+        },
+        "updated-by": {
+          "required": false,
+          "type": "string"
+        }
+      },
+      "derived_from": "tosca.datatypes.Root"
+    },
+    "dt-resource-assignment-request": {
+      "version": "1.0.0",
+      "description": "This is Dynamic Data type definition generated from resource mapping for the config template name activate-template.",
+      "properties": {
+        "password-user-ftap-nsm": {
+          "required": true,
+          "type": "string",
+          "default": "password-user-ftap"
+        },
+        "reservation-id": {
+          "required": true,
+          "type": "string",
+          "value": "123"
+        },
+        "security-manager-resource-key": {
+          "required": true,
+          "type": "string",
+          "value": "sdnc"
+        },
+        "password-user-ftap": {
+          "description": "",
+          "required": true,
+          "type": "string",
+          "status": "",
+          "constraints": [
+            {
+              
+            }
+          ],
+          "entry_schema": {
+            "type": ""
+          }
+        }
+      },
+      "derived_from": "tosca.datatypes.Dynamic"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/service-blueprint/vFW/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..7918c11
--- /dev/null
@@ -0,0 +1,6 @@
+TOSCA-Meta-File-Version: 1.0.0
+CSAR-Version: 1.0
+Created-By: ONAP
+Entry-Definitions: Definitions/vFW_spinup.json
+Template-Tags: ONAP, vFW
+Content-Type: application/vnd.oasis.bpmn
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base_template.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/base_template.vtl
new file mode 100644 (file)
index 0000000..271c507
--- /dev/null
@@ -0,0 +1,77 @@
+{
+  "resource-accumulator-resolved-data": [
+    {
+      "param-name": "service-instance-id",
+      "param-value": "${service-instance-id}"
+    },
+    {
+      "param-name": "vnf_id",
+      "param-value": "${vnf-id}"
+    },
+    {
+      "param-name": "vnf_name",
+      "param-value": "${vnf-name}"
+    },
+    {
+      "param-name": "vnf_model_customization_uuid",
+      "param-value": "${vnf-model-customization-uuid}"
+    },
+    {
+      "param-name": "vf_module_id",
+      "param-value": "${vf-module-id}"
+    },
+    {
+      "param-name": "vf_module_type",
+      "param-value": "${vf-module-type}"
+    },
+    {
+      "param-name": "unprotected_private_net_id",
+      "param-value": "${vnf-name}_unprotected"
+    },
+    {
+      "param-name": "unprotected_private_subnet_id",
+      "param-value": "${vnf-name}_unprotected_sub"
+    },
+    {
+      "param-name": "unprotected_private_net_cidr",
+      "param-value": "${unprotected_private_net_cidr}"
+    },
+    {
+      "param-name": "protected_private_net_id",
+      "param-value": "${vnf-name}_protected"
+    },
+    {
+      "param-name": "protected_private_subnet_id",
+      "param-value": "${vnf-name}_protected_sub"
+    },
+    {
+      "param-name": "protected_private_net_cidr",
+      "param-value": "${protected_private_net_cidr}"
+    },
+    {
+      "param-name": "vf_module_name",
+      "param-value": "${vnf-name}_base"
+    }
+  ],
+  "capability-data": [
+    {
+      "capability-name": "aai-vf-module-put",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "vf-module",
+              "param-value": "vf-module"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "aai-vf-module-put",
+              "resource-value": "${status}"
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vFW_vNF_Artifact.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vFW_vNF_Artifact.vtl
new file mode 100644 (file)
index 0000000..f7947ef
--- /dev/null
@@ -0,0 +1,222 @@
+{
+  "resource-accumulator-resolved-data": [
+    {
+      "param-name": "service-instance-id",
+      "param-value": "${service-instance-id}"
+    },
+    {
+      "param-name": "vnf_id",
+      "param-value": "${vnf-id}"
+    },
+    {
+      "param-name": "vnf-model-customization-uuid",
+      "param-value": "${vnf-model-customization-uuid}"
+    },
+    {
+      "param-name": "aic-cloud-region",
+      "param-value": "${aic-cloud-region}"
+    },
+    {
+      "param-name": "onap_private_net_id",
+      "param-value": "${onap_private_net_id}"
+    },
+    {
+      "param-name": "pub_key",
+      "param-value": "${pub_key}"
+    },
+    {
+      "param-name": "image_name",
+      "param-value": "${image_name}"
+    },
+    {
+      "param-name": "onap_private_subnet_id",
+      "param-value": "${onap_private_subnet_id}"
+    }
+  ],
+  "capability-data": [
+    {
+      "capability-name": "generate-name",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "resource-name",
+              "param-value": "vnf_name"
+            },
+            {
+              "param-name": "resource-value",
+              "param-value": "${vnf_name}"
+            },
+            {
+              "param-name": "external-key",
+              "param-value": "${vnf-id}_vnf_name"
+            },
+            {
+              "param-name": "policy-instance-name",
+              "param-value": "${vf-naming-policy}"
+            },
+            {
+              "param-name": "nf-role",
+              "param-value": "${nf-role}"
+            },
+            {
+              "param-name": "naming-type",
+              "param-value": "VNF"
+            },
+            {
+              "param-name": "AIC_CLOUD_REGION",
+              "param-value": "${aic-cloud-region}"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vnf_name",
+              "resource-value": "${vnf_name}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "netbox-ip-assign",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "service-instance-id",
+              "param-value": "${service-instance-id}"
+            },
+            {
+              "param-name": "prefix-id",
+              "param-value": "${protected-prefix-id}"
+            },
+            {
+              "param-name": "vnf-id",
+              "param-value": "${vnf-id}"
+            },
+            {
+              "param-name": "external_key",
+              "param-value": "${vnf-id}-vfw_private_ip_1"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vfw_private_ip_1",
+              "resource-value": "${vfw_private_ip_1}"
+            }
+          ]
+        },
+        {
+          "payload": [
+            {
+              "param-name": "service-instance-id",
+              "param-value": "${service-instance-id}"
+            },
+            {
+              "param-name": "prefix-id",
+              "param-value": "${unprotected-prefix-id}"
+            },
+            {
+              "param-name": "vnf-id",
+              "param-value": "${vnf-id}"
+            },
+            {
+              "param-name": "external_key",
+              "param-value": "${vnf-id}-vfw_private_ip_0"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vfw_private_ip_0",
+              "resource-value": "${vfw_private_ip_0}"
+            }
+          ]
+        },
+        {
+          "payload": [
+            {
+              "param-name": "service-instance-id",
+              "param-value": "${service-instance-id}"
+            },
+            {
+              "param-name": "prefix-id",
+              "param-value": "${unprotected-prefix-id}"
+            },
+            {
+              "param-name": "vnf-id",
+              "param-value": "${vnf-id}"
+            },
+            {
+              "param-name": "external_key",
+              "param-value": "${vnf-id}-vpg_private_ip_0"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vpg_private_ip_0",
+              "resource-value": "${vpg_private_ip_0}"
+            }
+          ]
+        },
+        {
+          "payload": [
+            {
+              "param-name": "service-instance-id",
+              "param-value": "${service-instance-id}"
+            },
+            {
+              "param-name": "prefix-id",
+              "param-value": "${protected-prefix-id}"
+            },
+            {
+              "param-name": "vnf-id",
+              "param-value": "${vnf-id}"
+            },
+            {
+              "param-name": "external_key",
+              "param-value": "${vnf-id}-vsn_private_ip_0"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vsn_private_ip_0",
+              "resource-value": "${vsn_private_ip_0}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "unresolved-composite-data",
+      "key-mapping": [
+        {
+          "output-key-mapping": [
+            {
+              "resource-name": "key_name",
+              "resource-value": "${vnf_name}_key"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "aai-vnf-put",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "generic-vnf",
+              "param-value": "generic-vnf"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "aai-vnf-put",
+              "resource-value": "${status}"
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vfw.vtl
new file mode 100644 (file)
index 0000000..6864a36
--- /dev/null
@@ -0,0 +1,338 @@
+{
+  "resource-accumulator-resolved-data": [
+    {
+      "param-name": "service-instance-id",
+      "param-value": "${service-instance-id}"
+    },
+    {
+      "param-name": "vnf_id",
+      "param-value": "${vnf-id}"
+    },
+    {
+      "param-name": "vnf_name",
+      "param-value": "${vnf-name}"
+    },
+    {
+      "param-name": "vnf_model_customization_uuid",
+      "param-value": "${vnf-model-customization-uuid}"
+    },
+    {
+      "param-name": "vf_module_id",
+      "param-value": "${vf-module-id}"
+    },
+    {
+      "param-name": "vf_module_type",
+      "param-value": "${vf-module-type}"
+    },
+    {
+      "param-name": "vf_module_customization_uuid",
+      "param-value": "${vf-module-model-customization-uuid}"
+    },
+    {
+      "param-name": "vfc_customization_uuid",
+      "param-value": "${vfccustomizationuuid}"
+    },
+    {
+      "param-name": "aic-cloud-region",
+      "param-value": "${aic-cloud-region}"
+    },
+    {
+      "param-name": "vm-type",
+      "param-value": "${vm-type}"
+    },
+    {
+      "param-name": "vnfc-model-customization-uuid",
+      "param-value": "${vfccustomizationuuid}"
+    },
+    {
+      "param-name": "vnfc-model-invariant-uuid",
+      "param-value": "${vnfc-model-invariant-uuid}"
+    },
+    {
+      "param-name": "vnfc-model-version",
+      "param-value": "${vnfc-model-version}"
+    },
+    {
+      "param-name": "nfc-function",
+      "param-value": "${nf-role}"
+    },
+    {
+      "param-name": "nfc-naming-code",
+      "param-value": "${nfc-naming-code}"
+    },
+    {
+      "param-name": "cloud_env",
+      "param-value": "openstack"
+    },
+    {
+      "param-name": "repo_url_artifacts",
+      "param-value": "https://nexus.onap.org/content/groups/staging"
+    },
+    {
+      "param-name": "repo_url_blob",
+      "param-value": "https://nexus.onap.org/content/repositories/raw"
+    },
+    {
+      "param-name": "dcae_collector_port",
+      "param-value": "8080"
+    },
+    {
+      "param-name": "image_name",
+      "param-value": "${image_name}"
+    },
+    {
+      "param-name": "flavor_name",
+      "param-value": "m1.medium"
+    },
+    {
+      "param-name": "install_script_version",
+      "param-value": "1.2.1-SNAPSHOT"
+    },
+    {
+      "param-name": "demo_artifacts_version",
+      "param-value": "1.2.1-SNAPSHOT"
+    },
+    {
+      "param-name": "dcae_collector_ip",
+      "param-value": "10.0.4.1"
+    },
+    {
+      "param-name": "key_name",
+      "param-value": "${key_name}"
+    },
+    {
+      "param-name": "pub_key",
+      "param-value": "${pub_key}"
+    },
+    {
+      "param-name": "public_net_id",
+      "param-value": "${public_net_id}"
+    },
+    {
+      "param-name": "unprotected_private_net_id",
+      "param-value": "${vnf-name}_unprotected"
+    },
+    {
+      "param-name": "protected_private_net_id",
+      "param-value": "${vnf-name}_protected"
+    },
+    {
+      "param-name": "onap_private_net_id",
+      "param-value": "${onap_private_net_id}"
+    },
+    {
+      "param-name": "onap_private_subnet_id",
+      "param-value": "${onap_private_subnet_id}"
+    },
+    {
+      "param-name": "unprotected_private_net_cidr",
+      "param-value": "${unprotected_private_net_cidr}"
+    },
+    {
+      "param-name": "protected_private_net_cidr",
+      "param-value": "${protected_private_net_cidr}"
+    },
+    {
+      "param-name": "unprotected_private_subnet_id",
+      "param-value": "${vnf-name}_unprotected_sub"
+    },
+    {
+      "param-name": "unprotected_private_net_cidr",
+      "param-value": "${unprotected_private_net_cidr}"
+    },
+    {
+      "param-name": "protected_private_subnet_id",
+      "param-value": "${vnf-name}_protected_sub"
+    },
+    {
+      "param-name": "nexus_artifact_repo",
+      "param-value": "${nexus_artifact_repo}"
+    },
+    {
+      "param-name": "sec_group",
+      "param-value": "${sec_group}"
+    },
+    {
+      "param-name": "onap_private_net_cidr",
+      "param-value": "${onap_private_net_cidr}"
+    }
+  ],
+  "capability-data": [
+    {
+      "capability-name": "generate-name",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "resource-name",
+              "param-value": "vfw_name_0"
+            },
+            {
+              "param-name": "resource-value",
+              "param-value": "${vfw_name_0}"
+            },
+            {
+              "param-name": "external-key",
+              "param-value": "${vf-module-id}_vfw_name_0"
+            },
+            {
+              "param-name": "policy-instance-name",
+              "param-value": "${vf-naming-policy}"
+            },
+            {
+              "param-name": "nf-role",
+              "param-value": "${nf-role}"
+            },
+            {
+              "param-name": "naming-type",
+              "param-value": "VNFC"
+            },
+            {
+              "param-name": "VNF_NAME",
+              "param-value": "${vnf-name}"
+            },
+            {
+              "param-name": "NFC_NAMING_CODE",
+              "param-value": "${nfc-naming-code}"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vfw_name_0",
+              "resource-value": "${vfw_name_0}"
+            }
+          ]
+        },
+        {
+          "payload": [
+            {
+              "param-name": "resource-name",
+              "param-value": "vf_module_name"
+            },
+            {
+              "param-name": "resource-value",
+              "param-value": "${vf_module_name}"
+            },
+            {
+              "param-name": "external-key",
+              "param-value": "${vf-module-id}_vf_module_name"
+            },
+            {
+              "param-name": "policy-instance-name",
+              "param-value": "${vf-naming-policy}"
+            },
+            {
+              "param-name": "nf-role",
+              "param-value": "${nf-role}"
+            },
+            {
+              "param-name": "naming-type",
+              "param-value": "VF-MODULE"
+            },
+            {
+              "param-name": "VNF_NAME",
+              "param-value": "${vnf-name}"
+            },
+            {
+              "param-name": "VF_MODULE_LABEL",
+              "param-value": "${vf-module-label}"
+            },
+            {
+              "param-name": "VF_MODULE_TYPE",
+              "param-value": "${vf-module-type}"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vf_module_name",
+              "resource-value": "${vf_module_name}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "netbox-ip-assign",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "service-instance-id",
+              "param-value": "${service-instance-id}"
+            },
+            {
+              "param-name": "prefix-id",
+              "param-value": "${private-prefix-id}"
+            },
+            {
+              "param-name": "vf-module-id",
+              "param-value": "${vf-module-id}"
+            },
+            {
+              "param-name": "external_key",
+              "param-value": "${vf-module-id}-vfw_private_ip_2"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vfw_private_ip_2",
+              "resource-value": "${vfw_private_ip_2}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "aai-vf-module-put",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "vf-module",
+              "param-value": "vf-module"
+            },
+            {
+              "param-name": "vnfc",
+              "param-value": "vnfc"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "aai-vf-module-put",
+              "resource-value": "${status}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "unresolved-composite-data",
+      "key-mapping": [
+        {
+          "output-key-mapping": [
+            {
+              "resource-name": "KEY",
+              "resource-value": "${vnf_name}"
+            },
+            {
+              "resource-name": "vf-module-name",
+              "resource-value": "${vf_module_name}"
+            },
+            {
+              "resource-name": "vnfc-name",
+              "resource-value": "${vfw_name_0}"
+            },
+            {
+              "resource-name": "ipv4-oam-address",
+              "resource-value": "${vfw_private_ip_2}"
+            },
+            {
+              "resource-name": "ipv4-oam-address-prefix",
+              "resource-value": "${onap_private_net_cidr}"
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vpg.vtl
new file mode 100644 (file)
index 0000000..2ff6596
--- /dev/null
@@ -0,0 +1,338 @@
+{
+  "resource-accumulator-resolved-data": [
+    {
+      "param-name": "service-instance-id",
+      "param-value": "${service-instance-id}"
+    },
+    {
+      "param-name": "vnf_id",
+      "param-value": "${vnf-id}"
+    },
+    {
+      "param-name": "vnf_name",
+      "param-value": "${vnf-name}"
+    },
+    {
+      "param-name": "vnf_model_customization_uuid",
+      "param-value": "${vnf-model-customization-uuid}"
+    },
+    {
+      "param-name": "vf_module_id",
+      "param-value": "${vf-module-id}"
+    },
+    {
+      "param-name": "vf_module_type",
+      "param-value": "${vf-module-type}"
+    },
+    {
+      "param-name": "vf_module_customization_uuid",
+      "param-value": "${vf-module-model-customization-uuid}"
+    },
+    {
+      "param-name": "vfc_customization_uuid",
+      "param-value": "${vfccustomizationuuid}"
+    },
+    {
+      "param-name": "aic-cloud-region",
+      "param-value": "${aic-cloud-region}"
+    },
+    {
+      "param-name": "vm-type",
+      "param-value": "${vm-type}"
+    },
+    {
+      "param-name": "vnfc-model-customization-uuid",
+      "param-value": "${vfccustomizationuuid}"
+    },
+    {
+      "param-name": "vnfc-model-invariant-uuid",
+      "param-value": "${vnfc-model-invariant-uuid}"
+    },
+    {
+      "param-name": "vnfc-model-version",
+      "param-value": "${vnfc-model-version}"
+    },
+    {
+      "param-name": "nfc-function",
+      "param-value": "${nf-role}"
+    },
+    {
+      "param-name": "nfc-naming-code",
+      "param-value": "${nfc-naming-code}"
+    },
+    {
+      "param-name": "cloud_env",
+      "param-value": "openstack"
+    },
+    {
+      "param-name": "repo_url_artifacts",
+      "param-value": "https://nexus.onap.org/content/groups/staging"
+    },
+    {
+      "param-name": "repo_url_blob",
+      "param-value": "https://nexus.onap.org/content/repositories/raw"
+    },
+    {
+      "param-name": "dcae_collector_port",
+      "param-value": "8080"
+    },
+    {
+      "param-name": "image_name",
+      "param-value": "${image_name}"
+    },
+    {
+      "param-name": "flavor_name",
+      "param-value": "m1.medium"
+    },
+    {
+      "param-name": "key_name",
+      "param-value": "${key_name}"
+    },
+    {
+      "param-name": "pub_key",
+      "param-value": "${pub_key}"
+    },
+    {
+      "param-name": "install_script_version",
+      "param-value": "1.2.1-SNAPSHOT"
+    },
+    {
+      "param-name": "demo_artifacts_version",
+      "param-value": "1.2.1-SNAPSHOT"
+    },
+    {
+      "param-name": "dcae_collector_ip",
+      "param-value": "10.0.4.1"
+    },
+    {
+      "param-name": "public_net_id",
+      "param-value": "${public_net_id}"
+    },
+    {
+      "param-name": "protected_private_net_id",
+      "param-value": "zdfw1fwl01_protected"
+    },
+    {
+      "param-name": "onap_private_net_id",
+      "param-value": "${onap_private_net_id}"
+    },
+    {
+      "param-name": "onap_private_subnet_id",
+      "param-value": "${onap_private_subnet_id}"
+    },
+    {
+      "param-name": "unprotected_private_net_id",
+      "param-value": "${vnf-name}_unprotected"
+    },
+    {
+      "param-name": "unprotected_private_subnet_id",
+      "param-value": "${vnf-name}_unprotected_sub"
+    },
+    {
+      "param-name": "unprotected_private_net_cidr",
+      "param-value": "${unprotected_private_net_cidr}"
+    },
+    {
+      "param-name": "protected_private_subnet_id",
+      "param-value": "${vnf-name}_protected_sub"
+    },
+    {
+      "param-name": "protected_private_net_id",
+      "param-value": "${vnf-name}_protected"
+    },
+    {
+      "param-name": "onap_private_net_cidr",
+      "param-value": "${onap_private_net_cidr}"
+    },
+    {
+      "param-name": "vfw_private_ip_0",
+      "param-value": "${vfw_private_ip_0}"
+    },
+    {
+      "param-name": "vsn_private_ip_0",
+      "param-value": "${vsn_private_ip_0}"
+    },
+    {
+      "param-name": "nexus_artifact_repo",
+      "param-value": "${nexus_artifact_repo}"
+    },
+    {
+      "param-name": "sec_group",
+      "param-value": "${sec_group}"
+    },
+    {
+      "param-name": "vpg_private_ip_0",
+      "param-value": "${vpg_private_ip_0}"
+    }
+  ],
+  "capability-data": [
+    {
+      "capability-name": "generate-name",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "resource-name",
+              "param-value": "vpg_name_0"
+            },
+            {
+              "param-name": "resource-value",
+              "param-value": "${vpg_name_0}"
+            },
+            {
+              "param-name": "external-key",
+              "param-value": "${vf-module-id}_vpg_name_0"
+            },
+            {
+              "param-name": "policy-instance-name",
+              "param-value": "${vf-naming-policy}"
+            },
+            {
+              "param-name": "nf-role",
+              "param-value": "${nf-role}"
+            },
+            {
+              "param-name": "naming-type",
+              "param-value": "VNFC"
+            },
+            {
+              "param-name": "VNF_NAME",
+              "param-value": "${vnf-name}"
+            },
+            {
+              "param-name": "NFC_NAMING_CODE",
+              "param-value": "${nfc-naming-code}"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vpg_name_0",
+              "resource-value": "${vpg_name_0}"
+            }
+          ]
+        },
+        {
+          "payload": [
+            {
+              "param-name": "resource-name",
+              "param-value": "vf_module_name"
+            },
+            {
+              "param-name": "resource-value",
+              "param-value": "${vf_module_name}"
+            },
+            {
+              "param-name": "external-key",
+              "param-value": "${vf-module-id}_vf_module_name"
+            },
+            {
+              "param-name": "policy-instance-name",
+              "param-value": "${vf-naming-policy}"
+            },
+            {
+              "param-name": "nf-role",
+              "param-value": "${nf-role}"
+            },
+            {
+              "param-name": "naming-type",
+              "param-value": "VF-MODULE"
+            },
+            {
+              "param-name": "VNF_NAME",
+              "param-value": "${vnf-name}"
+            },
+            {
+              "param-name": "VF_MODULE_LABEL",
+              "param-value": "${vf-module-label}"
+            },
+            {
+              "param-name": "VF_MODULE_TYPE",
+              "param-value": "${vf-module-type}"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vf_module_name",
+              "resource-value": "${vf_module_name}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "netbox-ip-assign",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "service-instance-id",
+              "param-value": "${service-instance-id}"
+            },
+            {
+              "param-name": "prefix-id",
+              "param-value": "${private-prefix-id}"
+            },
+            {
+              "param-name": "vf-module-id",
+              "param-value": "${vf-module-id}"
+            },
+            {
+              "param-name": "external_key",
+              "param-value": "${vf-module-id}-vpg_private_ip_1"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vpg_private_ip_1",
+              "resource-value": "${vpg_private_ip_1}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "aai-vf-module-put",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "vf-module",
+              "param-value": "vf-module"
+            },
+            {
+              "param-name": "vnfc",
+              "param-value": "vnfc"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "aai-vf-module-put",
+              "resource-value": "${status}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "unresolved-composite-data",
+      "key-mapping": [
+        {
+          "output-key-mapping": [
+            {
+              "resource-name": "vf-module-name",
+              "resource-value": "${vf_module_name}"
+            },
+            {
+              "resource-name": "vnfc-name",
+              "resource-value": "${vpg_name_0}"
+            },
+            {
+              "resource-name": "ipv4-oam-address-prefix",
+              "resource-value": "${onap_private_net_cidr}"
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn.vtl b/components/model-catalog/blueprint-model/service-blueprint/vFW/Templates/vsn.vtl
new file mode 100644 (file)
index 0000000..11fcea9
--- /dev/null
@@ -0,0 +1,334 @@
+{
+  "resource-accumulator-resolved-data": [
+    {
+      "param-name": "service-instance-id",
+      "param-value": "${service-instance-id}"
+    },
+    {
+      "param-name": "vnf_id",
+      "param-value": "${vnf-id}"
+    },
+    {
+      "param-name": "vnf_name",
+      "param-value": "${vnf-name}"
+    },
+    {
+      "param-name": "vnf_model_customization_uuid",
+      "param-value": "${vnf-model-customization-uuid}"
+    },
+    {
+      "param-name": "vf_module_id",
+      "param-value": "${vf-module-id}"
+    },
+    {
+      "param-name": "vf_module_type",
+      "param-value": "${vf-module-type}"
+    },
+    {
+      "param-name": "vf_module_customization_uuid",
+      "param-value": "${vf-module-model-customization-uuid}"
+    },
+    {
+      "param-name": "vfc_customization_uuid",
+      "param-value": "${vfccustomizationuuid}"
+    },
+    {
+      "param-name": "aic-cloud-region",
+      "param-value": "${aic-cloud-region}"
+    },
+    {
+      "param-name": "vm-type",
+      "param-value": "${vm-type}"
+    },
+    {
+      "param-name": "vnfc-model-customization-uuid",
+      "param-value": "${vfccustomizationuuid}"
+    },
+    {
+      "param-name": "vnfc-model-invariant-uuid",
+      "param-value": "${vnfc-model-invariant-uuid}"
+    },
+    {
+      "param-name": "vnfc-model-version",
+      "param-value": "${vnfc-model-version}"
+    },
+    {
+      "param-name": "nfc-function",
+      "param-value": "${nf-role}"
+    },
+    {
+      "param-name": "nfc-naming-code",
+      "param-value": "${nfc-naming-code}"
+    },
+    {
+      "param-name": "cloud_env",
+      "param-value": "openstack"
+    },
+    {
+      "param-name": "repo_url_artifacts",
+      "param-value": "https://nexus.onap.org/content/groups/staging"
+    },
+    {
+      "param-name": "repo_url_blob",
+      "param-value": "https://nexus.onap.org/content/repositories/raw"
+    },
+    {
+      "param-name": "dcae_collector_port",
+      "param-value": "8080"
+    },
+    {
+      "param-name": "image_name",
+      "param-value": "${image_name}"
+    },
+    {
+      "param-name": "flavor_name",
+      "param-value": "m1.medium"
+    },
+    {
+      "param-name": "install_script_version",
+      "param-value": "1.2.1-SNAPSHOT"
+    },
+    {
+      "param-name": "key_name",
+      "param-value": "${key_name}"
+    },
+    {
+      "param-name": "pub_key",
+      "param-value": "${pub_key}"
+    },
+    {
+      "param-name": "demo_artifacts_version",
+      "param-value": "1.2.1-SNAPSHOT"
+    },
+    {
+      "param-name": "dcae_collector_ip",
+      "param-value": "10.0.4.1"
+    },
+    {
+      "param-name": "public_net_id",
+      "param-value": "${public_net_id}"
+    },
+    {
+      "param-name": "unprotected_private_net_id",
+      "param-value": "${vnf-name}_unprotected"
+    },
+    {
+      "param-name": "protected_private_subnet_id",
+      "param-value": "${vnf-name}_protected_sub"
+    },
+    {
+      "param-name": "protected_private_net_id",
+      "param-value": "${vnf-name}_protected"
+    },
+    {
+      "param-name": "onap_private_net_id",
+      "param-value": "${onap_private_net_id}"
+    },
+    {
+      "param-name": "onap_private_subnet_id",
+      "param-value": "${onap_private_subnet_id}"
+    },
+    {
+      "param-name": "unprotected_private_net_cidr",
+      "param-value": "${unprotected_private_net_cidr}"
+    },
+    {
+      "param-name": "protected_private_net_cidr",
+      "param-value": "${protected_private_net_cidr}"
+    },
+    {
+      "param-name": "onap_private_net_cidr",
+      "param-value": "${onap_private_net_cidr}"
+    },
+    {
+      "param-name": "nexus_artifact_repo",
+      "param-value": "${nexus_artifact_repo}"
+    },
+    {
+      "param-name": "sec_group",
+      "param-value": "${sec_group}"
+    },
+    {
+      "param-name": "vfw_private_ip_1",
+      "param-value": "${vfw_private_ip_1}"
+    }
+  ],
+  "capability-data": [
+    {
+      "capability-name": "generate-name",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "resource-name",
+              "param-value": "vsn_name_0"
+            },
+            {
+              "param-name": "resource-value",
+              "param-value": "${vsn_name_0}"
+            },
+            {
+              "param-name": "external-key",
+              "param-value": "${vf-module-id}_vsn_name_0"
+            },
+            {
+              "param-name": "policy-instance-name",
+              "param-value": "${vf-naming-policy}"
+            },
+            {
+              "param-name": "nf-role",
+              "param-value": "${nf-role}"
+            },
+            {
+              "param-name": "naming-type",
+              "param-value": "VNFC"
+            },
+            {
+              "param-name": "VNF_NAME",
+              "param-value": "${vnf-name}"
+            },
+            {
+              "param-name": "NFC_NAMING_CODE",
+              "param-value": "${nfc-naming-code}"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vsn_name_0",
+              "resource-value": "${vsn_name_0}"
+            }
+          ]
+        },
+        {
+          "payload": [
+            {
+              "param-name": "resource-name",
+              "param-value": "vf_module_name"
+            },
+            {
+              "param-name": "resource-value",
+              "param-value": "${vf_module_name}"
+            },
+            {
+              "param-name": "external-key",
+              "param-value": "${vf-module-id}_vf_module_name"
+            },
+            {
+              "param-name": "policy-instance-name",
+              "param-value": "${vf-naming-policy}"
+            },
+            {
+              "param-name": "nf-role",
+              "param-value": "${nf-role}"
+            },
+            {
+              "param-name": "naming-type",
+              "param-value": "VF-MODULE"
+            },
+            {
+              "param-name": "VNF_NAME",
+              "param-value": "${vnf-name}"
+            },
+            {
+              "param-name": "VF_MODULE_LABEL",
+              "param-value": "${vf-module-label}"
+            },
+            {
+              "param-name": "VF_MODULE_TYPE",
+              "param-value": "${vf-module-type}"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vf_module_name",
+              "resource-value": "${vf_module_name}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "netbox-ip-assign",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "service-instance-id",
+              "param-value": "${service-instance-id}"
+            },
+            {
+              "param-name": "prefix-id",
+              "param-value": "${private-prefix-id}"
+            },
+            {
+              "param-name": "vf-module-id",
+              "param-value": "${vf-module-id}"
+            },
+            {
+              "param-name": "external_key",
+              "param-value": "${vf-module-id}-vsn_private_ip_1"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "vsn_private_ip_1",
+              "resource-value": "${vsn_private_ip_1}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "aai-vf-module-put",
+      "key-mapping": [
+        {
+          "payload": [
+            {
+              "param-name": "vf-module",
+              "param-value": "vf-module"
+            },
+            {
+              "param-name": "vnfc",
+              "param-value": "vnfc"
+            }
+          ],
+          "output-key-mapping": [
+            {
+              "resource-name": "aai-vf-module-put",
+              "resource-value": "${status}"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "capability-name": "unresolved-composite-data",
+      "key-mapping": [
+        {
+          "output-key-mapping": [
+            {
+              "resource-name": "volume-group-name",
+              "resource-value": "${volume_group_name}"
+            },
+            {
+              "resource-name": "vf-module-name",
+              "resource-value": "${vf_module_name}"
+            },
+            {
+              "resource-name": "vnfc-name",
+              "resource-value": "${vsn_name_0}"
+            },
+            {
+              "resource-name": "ipv4-oam-address",
+              "resource-value": "${vsn_private_ip_1}"
+            },
+            {
+              "resource-name": "ipv4-oam-address-prefix",
+              "resource-value": "${onap_private_net_cidr}"
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/activation-blueprint.json
new file mode 100644 (file)
index 0000000..a8329b8
--- /dev/null
@@ -0,0 +1,390 @@
+{
+  "metadata": {
+    "template_author": "Brinda Santh Muthuramalingam",
+    "author-email": "brindasanth@in.ibm.com",
+    "user-groups": "ADMIN, OPERATION",
+    "template_name": "baseconfiguration",
+    "template_version": "1.0.0",
+    "template_tags": "brinda, 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": {
+    "dynamic-netconf-properties": {
+      "device-name": "netconf device",
+      "host-name": "sample-host"
+    },
+    "dynamic-rest-source": {
+      "type": "basic-type",
+      "url": "http://localhost:8080",
+      "userId": {
+        "get_input": "rest-user-name"
+      }
+    },
+    "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": {
+        "required": true,
+        "type": "string"
+      },
+      "action-name": {
+        "required": true,
+        "type": "string"
+      },
+      "scope-type": {
+        "required": true,
+        "type": "string"
+      },
+      "hostname": {
+        "required": true,
+        "type": "string"
+      }
+    },
+    "node_templates": {
+      "resource-assignment-process": {
+        "type": "dg-generic",
+        "properties": {
+          "content": {
+            "get_artifact": [
+              "SELF",
+              "dg-resource-assignment-process"
+            ]
+          },
+          "dependency-node-templates": [
+            "resource-assignment"
+          ]
+        },
+        "artifacts": {
+          "dg-resource-assignment-process": {
+            "type": "artifact-directed-graph",
+            "file": "Plans/CONFIG_ResourceAssignment_1.0.0.xml"
+          }
+        }
+      },
+      "activate-process": {
+        "type": "dg-generic",
+        "properties": {
+          "content": {
+            "get_artifact": [
+              "SELF",
+              "dg-activate-process"
+            ]
+          },
+          "dependency-node-templates": [
+            "activate-jython"
+          ]
+        },
+        "artifacts": {
+          "dg-activate-process": {
+            "type": "artifact-directed-graph",
+            "file": "Plans/CONFIG_ActivateNetconf_1.0.0.xml"
+          }
+        }
+      },
+      "assign-activate-process": {
+        "type": "dg-generic",
+        "properties": {
+          "content": {
+            "get_artifact": [
+              "SELF",
+              "dg-assign-activate-process"
+            ]
+          },
+          "dependency-node-templates": [
+            "resource-assignment",
+            "activate-jython"
+          ]
+        },
+        "artifacts": {
+          "dg-assign-activate-process": {
+            "type": "artifact-directed-graph",
+            "file": "Plans/CONFIG_AssignActivateNetconf_1.0.0.xml"
+          }
+        }
+      },
+      "resource-assignment": {
+        "type": "component-resource-resolution",
+        "interfaces": {
+          "ResourceResolutionComponent": {
+            "operations": {
+              "process": {
+                "inputs": {
+                  "action-name": {
+                    "get_input": "action-name"
+                  },
+                  "resource-type": "vnf-type",
+                  "request-id": {
+                    "get_input": "request-id"
+                  },
+                  "resource-id": {
+                    "get_input": "hostname"
+                  },
+                  "artifact-prefix-names": [
+                    "baseconfig"
+                  ]
+                },
+                "outputs": {
+                  "resource-assignment-params": {
+                    "get_attribute": [
+                      "SELF",
+                      "assignment-params"
+                    ]
+                  },
+                  "status": "success"
+                }
+              }
+            }
+          }
+        },
+        "artifacts": {
+          "baseconfig-template": {
+            "type": "artifact-template-velocity",
+            "file": "Templates/baseconfig-template.vtl"
+          },
+          "baseconfig-mapping": {
+            "type": "artifact-mapping-resource",
+            "file": "Definitions/baseconfig-mapping.json"
+          }
+        }
+      },
+      "resource-assignment-py": {
+        "type": "component-resource-resolution",
+        "interfaces": {
+          "ResourceResolutionComponent": {
+            "operations": {
+              "process": {
+                "implementation": {
+                  "primary": "component-script"
+                },
+                "inputs": {
+                  "action-name": {
+                    "get_input": "action-name"
+                  }
+                },
+                "outputs": {
+                  "resource-assignment-params": "",
+                  "status": ""
+                }
+              }
+            }
+          }
+        },
+        "artifacts": {
+          "component-script": {
+            "type": "artifact-script-jython",
+            "file": "Scripts/python/SamplePythonComponentNode.py"
+          }
+        }
+      },
+      "activate-jython": {
+        "type": "component-jython-executor",
+        "interfaces": {
+          "ComponentJythonExecutor": {
+            "operations": {
+              "process": {
+                "implementation": {
+                  "primary": "component-script"
+                },
+                "inputs": {
+                  "instance-dependencies": [
+                    "json-parser-service"
+                  ]
+                },
+                "outputs": {
+                  "response-data": "",
+                  "status": ""
+                }
+              }
+            }
+          }
+        },
+        "artifacts": {
+          "component-script": {
+            "type": "artifact-script-jython",
+            "file": "Scripts/python/SamplePythonComponentNode.py"
+          }
+        }
+      },
+      "activate-netconf": {
+        "type": "component-netconf-executor",
+        "interfaces": {
+          "ComponentNetconfExecutor": {
+            "operations": {
+              "process": {
+                "implementation": {
+                  "primary": "component-script"
+                },
+                "inputs": {
+                  "script-type": "jython",
+                  "script-class-reference": "Scripts/python/NetconfRpcExample.py",
+                  "instance-dependencies": [
+                  ],
+                  "dynamic-properties": "*dynamic-netconf-properties"
+                },
+                "outputs": {
+                  "response-data": "",
+                  "status": ""
+                }
+              }
+            }
+          }
+        },
+        "requirements": {
+          "netconf-connection": {
+            "capability": "netconf",
+            "node": "sample-netconf-device",
+            "relationship": "tosca.relationships.ConnectsTo"
+          }
+        },
+        "artifacts": {
+          "hostname-template": {
+            "type": "artifact-template-velocity",
+            "file": "Templates/hostname-template.vtl"
+          },
+          "hostname-mapping": {
+            "type": "artifact-mapping-resource",
+            "file": "Definitions/hostname-mapping.json"
+          },
+          "component-script": {
+            "type": "artifact-script-jython",
+            "file": "Scripts/python/NetconfRpcExample.py"
+          }
+        }
+      },
+      "sample-netconf-device": {
+        "type": "vnf-netconf-device",
+        "capabilities": {
+          "netconf": {
+            "properties": {
+              "login-key": "sample-key",
+              "login-account": "sample-account",
+              "target-ip-address": {
+                "get_attribute": [
+                  "resource-assignment",
+                  "",
+                  "assignment-params",
+                  "$.ipAddress"
+                ]
+              },
+              "port-number": 830,
+              "connection-time-out": 30
+            }
+          }
+        }
+      }
+    },
+    "workflows": {
+      "resource-assignment": {
+        "inputs": {
+          "resource-assignment-properties": {
+            "required": true,
+            "type": "dt-resource-assignment-properties"
+          }
+        },
+        "steps": {
+          "call-resource-assignment": {
+            "description": "Resource Assignment Workflow",
+            "target": "resource-assignment-process",
+            "activities": [
+              {
+                "call_operation": "CONFIG.ResourceAssignment"
+              }
+            ]
+          }
+        },
+        "outputs": {
+          "response-property": {
+            "type": "string",
+            "value": "executed"
+          },
+          "template-properties": {
+            "type": "json",
+            "value": {
+              "get_attribute": [
+                "resource-assignment",
+                "assignment-params"
+              ]
+            }
+          }
+        }
+      },
+      "activate": {
+        "inputs": {
+          "request-id": {
+            "required": true,
+            "type": "string"
+          },
+          "action-name": {
+            "required": true,
+            "type": "string"
+          },
+          "scope-type": {
+            "required": true,
+            "type": "string"
+          },
+          "hostname": {
+            "required": true,
+            "type": "string"
+          }
+        },
+        "steps": {
+          "activate-process": {
+            "description": "Netconf Activation Workflow",
+            "target": "activate-process",
+            "activities": [
+              {
+                "call_operation": "CONFIG.ActivateProcess"
+              }
+            ]
+          }
+        }
+      },
+      "assign-activate": {
+        "inputs": {
+          "assign-activate-properties": {
+            "required": true,
+            "type": "dt-assign-activate-properties"
+          }
+        },
+        "steps": {
+          "activate-process": {
+            "description": "Resource Assign and Netconf Activation Workflow",
+            "target": "assign-activate-process",
+            "activities": [
+              {
+                "call_operation": "CONFIG.AssignActivateProcess"
+              }
+            ]
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/artifact_types.json
new file mode 100644 (file)
index 0000000..d741d15
--- /dev/null
@@ -0,0 +1,45 @@
+{
+  "artifact_types": {
+    "artifact-template-velocity": {
+      "description": "Velocity Template used for Configuration",
+      "version": "1.0.0",
+      "file_ext": [
+        "vtl"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    },
+    "artifact-mapping-resource": {
+      "description": "Velocity Template Resource Mapping File used along with Configuration template",
+      "version": "1.0.0",
+      "file_ext": [
+        "json"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    },
+    "artifact-script-jython": {
+      "description": "Jython Script File",
+      "version": "1.0.0",
+      "file_ext": [
+        "py"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    },
+    "artifact-directed-graph": {
+      "description": "Directed Graph File",
+      "version": "1.0.0",
+      "file_ext": [
+        "json",
+        "xml"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    },
+    "artifact-component-jar": {
+      "description": "Component Jar",
+      "version": "1.0.0",
+      "file_ext": [
+        "jar"
+      ],
+      "derived_from": "tosca.artifacts.Implementation"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/baseconfig-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/baseconfig-mapping.json
new file mode 100644 (file)
index 0000000..67d2a91
--- /dev/null
@@ -0,0 +1,36 @@
+[
+  {
+    "name": "service-instance-id",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "service-instance-id",
+    "dictionary-source": "input",
+    "dependencies": [
+    ]
+  },
+  {
+    "name": "vnf-id",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "vnf-id",
+    "dictionary-source": "input",
+    "dependencies": []
+  },
+  {
+    "name": "vnf_name",
+    "input-param": false,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "vnf_name",
+    "dictionary-source": "primary-config-data",
+    "dependencies": [
+      "service-instance-id",
+      "vnf-id"
+    ]
+  }
+]
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/data_types.json
new file mode 100644 (file)
index 0000000..6d771cd
--- /dev/null
@@ -0,0 +1,82 @@
+{
+  "data_types": {
+    "sample-property": {
+      "description": "This is sample data type",
+      "version": "1.0.0",
+      "properties": {
+        "content": {
+          "required": false,
+          "type": "string"
+        },
+        "process-name": {
+          "required": false,
+          "type": "string"
+        },
+        "version": {
+          "required": false,
+          "type": "string",
+          "default": "LATEST"
+        }
+      },
+      "derived_from": "tosca.datatypes.Root"
+    },
+    "dt-resource-assignment-properties": {
+      "description": "This is Dynamically generated data type for workflow activate",
+      "version": "1.0.0",
+      "properties": {
+        "request-id": {
+          "required": true,
+          "type": "string"
+        },
+        "service-instance-id": {
+          "required": true,
+          "type": "string"
+        },
+        "vnf-id": {
+          "required": true,
+          "type": "string"
+        },
+        "action-name": {
+          "required": true,
+          "type": "string"
+        },
+        "scope-type": {
+          "required": true,
+          "type": "string"
+        },
+        "hostname": {
+          "required": true,
+          "type": "string"
+        },
+        "vnf_name": {
+          "required": true,
+          "type": "string"
+        }
+      },
+      "derived_from": "tosca.datatypes.Dynamic"
+    },
+    "dt-assign-activate-properties": {
+      "description": "This is Dynamically generated data type for workflow assign-activate",
+      "version": "1.0.0",
+      "properties": {
+        "request-id": {
+          "required": true,
+          "type": "string"
+        },
+        "action-name": {
+          "required": true,
+          "type": "string"
+        },
+        "scope-type": {
+          "required": true,
+          "type": "string"
+        },
+        "hostname": {
+          "required": true,
+          "type": "string"
+        }
+      },
+      "derived_from": "tosca.datatypes.Dynamic"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/hostname-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/hostname-mapping.json
new file mode 100644 (file)
index 0000000..1e02d69
--- /dev/null
@@ -0,0 +1,13 @@
+[
+  {
+    "name": "hostname",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "hostname",
+    "dictionary-source": "input",
+    "dependencies": [
+    ]
+  }
+]
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json
new file mode 100644 (file)
index 0000000..68a8ae6
--- /dev/null
@@ -0,0 +1,406 @@
+{
+  "node_types": {
+    "component-jython-executor": {
+      "description": "This is Jython Execution Component.",
+      "version": "1.0.0",
+      "capabilities": {
+        "component-node": {
+          "type": "tosca.capabilities.Node"
+        }
+      },
+      "interfaces": {
+        "ComponentJythonExecutor": {
+          "operations": {
+            "process": {
+              "inputs": {
+                "instance-dependencies": {
+                  "description": "Instance Names to Inject to Jython Script.",
+                  "required": true,
+                  "type": "list",
+                  "entry_schema": {
+                    "type": "string"
+                  }
+                },
+                "dynamic-properties": {
+                  "description": "Dynamic Json Content or DSL Json reference.",
+                  "required": false,
+                  "type": "json"
+                }
+              },
+              "outputs": {
+                "response-data": {
+                  "description": "Execution Response Data in JSON format.",
+                  "required": false,
+                  "type": "string"
+                },
+                "status": {
+                  "description": "Status of the Component Execution ( success or failure )",
+                  "required": true,
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.component.Jython"
+    },
+    "component-netconf-executor": {
+      "description": "This is Netconf Transaction Configuration Component API",
+      "version": "1.0.0",
+      "capabilities": {
+        "component-node": {
+          "type": "tosca.capabilities.Node"
+        }
+      },
+      "requirements": {
+        "netconf-connection": {
+          "capability": "netconf",
+          "node": "vnf-netconf-device",
+          "relationship": "tosca.relationships.ConnectsTo"
+        }
+      },
+      "interfaces": {
+        "ComponentNetconfExecutor": {
+          "operations": {
+            "process": {
+              "inputs": {
+                "script-type": {
+                  "description": "Script type, kotlin type is supported",
+                  "required": true,
+                  "type": "string",
+                  "constraints": [
+                    {
+                      "valid_values": [
+                        "kotlin",
+                        "jython",
+                        "internal"
+                      ]
+                    }
+                  ],
+                  "default": "internal"
+                },
+                "script-class-reference": {
+                  "description": "Kotlin Script class name or jython script name.",
+                  "required": true,
+                  "type": "string"
+                },
+                "instance-dependencies": {
+                  "description": "Instance names to inject to Jython or Kotlin Script.",
+                  "required": true,
+                  "type": "list",
+                  "entry_schema": {
+                    "type": "string"
+                  }
+                },
+                "dynamic-properties": {
+                  "description": "Dynamic Json Content or DSL Json reference.",
+                  "required": false,
+                  "type": "json"
+                }
+              },
+              "outputs": {
+                "response-data": {
+                  "description": "Execution Response Data in JSON format.",
+                  "required": false,
+                  "type": "string"
+                },
+                "status": {
+                  "description": "Status of the Component Execution ( success or failure )",
+                  "required": true,
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.Component"
+    },
+    "component-resource-resolution": {
+      "description": "This is Resource Assignment Component API",
+      "version": "1.0.0",
+      "attributes": {
+        "assignment-params": {
+          "required": true,
+          "type": "string"
+        }
+      },
+      "capabilities": {
+        "component-node": {
+          "type": "tosca.capabilities.Node"
+        }
+      },
+      "interfaces": {
+        "ResourceResolutionComponent": {
+          "operations": {
+            "process": {
+              "inputs": {
+                "resource-type": {
+                  "description": "Request type.",
+                  "required": false,
+                  "type": "string"
+                },
+                "artifact-prefix-names": {
+                  "description": "Template , Resource Assignment Artifact Prefix names",
+                  "required": true,
+                  "type": "list",
+                  "entry_schema": {
+                    "type": "string"
+                  }
+                },
+                "request-id": {
+                  "description": "Request Id, Unique Id for the request.",
+                  "required": true,
+                  "type": "string"
+                },
+                "resource-id": {
+                  "description": "Resource Id.",
+                  "required": false,
+                  "type": "string"
+                },
+                "action-name": {
+                  "description": "Action Name of the process",
+                  "required": false,
+                  "type": "string"
+                },
+                "dynamic-properties": {
+                  "description": "Dynamic Json Content or DSL Json reference.",
+                  "required": false,
+                  "type": "json"
+                }
+              },
+              "outputs": {
+                "resource-assignment-params": {
+                  "required": true,
+                  "type": "string"
+                },
+                "status": {
+                  "required": true,
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.Component"
+    },
+    "dg-generic": {
+      "description": "This is Generic Directed Graph Type",
+      "version": "1.0.0",
+      "properties": {
+        "content": {
+          "required": true,
+          "type": "string"
+        },
+        "dependency-node-templates": {
+          "description": "Dependent Step Components NodeTemplate name.",
+          "required": true,
+          "type": "list",
+          "entry_schema": {
+            "type": "string"
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.DG"
+    },
+    "source-input": {
+      "description": "This is Input Resource Source Node Type",
+      "version": "1.0.0",
+      "properties": {
+        "key": {
+          "required": false,
+          "type": "string"
+        },
+        "key-dependencies": {
+          "required": true,
+          "type": "list",
+          "entry_schema": {
+            "type": "string"
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.ResourceSource"
+    },
+    "source-processor-db": {
+      "description": "This is Database Resource Source Node Type",
+      "version": "1.0.0",
+      "properties": {
+        "type": {
+          "required": true,
+          "type": "string",
+          "constraints": [
+            {
+              "valid_values": [
+                "SQL",
+                "PLSQL"
+              ]
+            }
+          ]
+        },
+        "endpoint-selector": {
+          "required": false,
+          "type": "string"
+        },
+        "query": {
+          "required": true,
+          "type": "string"
+        },
+        "input-key-mapping": {
+          "required": false,
+          "type": "map",
+          "entry_schema": {
+            "type": "string"
+          }
+        },
+        "output-key-mapping": {
+          "required": false,
+          "type": "map",
+          "entry_schema": {
+            "type": "string"
+          }
+        },
+        "key-dependencies": {
+          "required": true,
+          "type": "list",
+          "entry_schema": {
+            "type": "string"
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.ResourceSource"
+    },
+    "source-rest": {
+      "description": "This is Rest Resource Source Node Type",
+      "version": "1.0.0",
+      "properties": {
+        "type": {
+          "required": false,
+          "type": "string",
+          "constraints": [
+            {
+              "valid_values": [
+                "JSON"
+              ]
+            }
+          ],
+          "default": "JSON"
+        },
+        "endpoint-selector": {
+          "required": false,
+          "type": "string"
+        },
+        "url-path": {
+          "required": true,
+          "type": "string"
+        },
+        "path": {
+          "required": true,
+          "type": "string"
+        },
+        "expression-type": {
+          "required": false,
+          "type": "string",
+          "constraints": [
+            {
+              "valid_values": [
+                "JSON_PATH",
+                "JSON_POINTER"
+              ]
+            }
+          ],
+          "default": "JSON_PATH"
+        },
+        "input-key-mapping": {
+          "required": false,
+          "type": "map",
+          "entry_schema": {
+            "type": "string"
+          }
+        },
+        "output-key-mapping": {
+          "required": false,
+          "type": "map",
+          "entry_schema": {
+            "type": "string"
+          }
+        },
+        "key-dependencies": {
+          "required": true,
+          "type": "list",
+          "entry_schema": {
+            "type": "string"
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.ResourceSource"
+    },
+    "tosca.nodes.Component": {
+      "description": "This is default Component Node",
+      "version": "1.0.0",
+      "derived_from": "tosca.nodes.Root"
+    },
+    "tosca.nodes.DG": {
+      "description": "This is Directed Graph Node Type",
+      "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.Vnf": {
+      "description": "This is VNF Node Type",
+      "version": "1.0.0",
+      "derived_from": "tosca.nodes.Root"
+    },
+    "tosca.nodes.component.Jython": {
+      "description": "This is Jython Component",
+      "version": "1.0.0",
+      "derived_from": "tosca.nodes.Root"
+    },
+    "vnf-netconf-device": {
+      "description": "This is VNF Device with Netconf  Capability",
+      "version": "1.0.0",
+      "capabilities": {
+        "netconf": {
+          "type": "tosca.capabilities.Netconf",
+          "properties": {
+            "login-key": {
+              "required": true,
+              "type": "string",
+              "default": "sdnc"
+            },
+            "login-account": {
+              "required": true,
+              "type": "string",
+              "default": "sdnc-tacacs"
+            },
+            "source": {
+              "required": false,
+              "type": "string",
+              "default": "npm"
+            },
+            "target-ip-address": {
+              "required": true,
+              "type": "string"
+            },
+            "port-number": {
+              "required": true,
+              "type": "integer",
+              "default": 830
+            },
+            "connection-time-out": {
+              "required": false,
+              "type": "integer",
+              "default": 30
+            }
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.Vnf"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/policy_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/policy_types.json
new file mode 100644 (file)
index 0000000..0c9b992
--- /dev/null
@@ -0,0 +1,4 @@
+{
+  "policy_types": {
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/relationship_types.json
new file mode 100644 (file)
index 0000000..87d2dc5
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "relationship_types": {
+    "tosca.relationships.ConnectsTo": {
+      "description": "Relationship tosca.relationships.ConnectsTo",
+      "version": "1.0.0",
+      "derived_from": "tosca.relationships.Root"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json
new file mode 100644 (file)
index 0000000..6e3d5e9
--- /dev/null
@@ -0,0 +1,89 @@
+{
+  "hostname": {
+    "tags": "hostname",
+    "name": "hostname",
+    "property": {
+      "description": "hostname",
+      "type": "string"
+    },
+    "updated-by": "Singal, Kapil <ks220y@att.com>",
+    "sources": {
+      "input": {
+        "type": "source-input"
+      }
+    }
+  },
+  "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": {}
+      },
+      "processor-db": {
+        "type": "source-processor-db",
+        "properties": {
+          "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" : []
+        }
+      }
+    }
+  },
+  "vnf-id": {
+    "tags": "vnf-id",
+    "name": "vnf-id",
+    "property": {
+      "description": "vnf-id",
+      "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": "Singal, Kapil <ks220y@att.com>",
+    "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",
+          "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"
+          ]
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-db.properties b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-db.properties
new file mode 100644 (file)
index 0000000..49a7eb4
--- /dev/null
@@ -0,0 +1 @@
+dynamic-db-source.password=sdnctl
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-rest.properties b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Environments/source-rest.properties
new file mode 100644 (file)
index 0000000..37bad8d
--- /dev/null
@@ -0,0 +1,9 @@
+blueprintsprocessor.restclient.primary-config-data.type=basic-auth
+blueprintsprocessor.restclient.primary-config-data.url=http://127.0.0.1:9111
+blueprintsprocessor.restclient.primary-config-data.userId=sampleuser
+blueprintsprocessor.restclient.primary-config-data.token=sampletoken
+
+blueprintsprocessor.restclient.primary-config-data1.type=basic-auth
+blueprintsprocessor.restclient.primary-config-data1.url=http://127.0.0.1:9111
+blueprintsprocessor.restclient.primary-config-data1.userId=sampleuser
+blueprintsprocessor.restclient.primary-config-data1.token=sampletoken
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Plans/CONFIG_ActivateNetconf_1.0.0.xml b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Plans/CONFIG_ActivateNetconf_1.0.0.xml
new file mode 100644 (file)
index 0000000..2f6d2ed
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+  ~ 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.
+  -->
+
+<service-logic
+        xmlns='http://www.onap.org/sdnc/svclogic'
+        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='CONFIG' version='1.0.0'>
+    <method rpc='ActivateNetconf' mode='sync'>
+        <block atomic="true">
+            <execute plugin="activate-jython" method="process">
+                <outcome value='failure'>
+                    <return status="failure">
+                    </return>
+                </outcome>
+                <outcome value='success'>
+                    <return status='success'>
+                    </return>
+                </outcome>
+            </execute>
+        </block>
+    </method>
+</service-logic>
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Plans/CONFIG_AssignActivateNetconf_1.0.0.xml b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Plans/CONFIG_AssignActivateNetconf_1.0.0.xml
new file mode 100644 (file)
index 0000000..eb41b7d
--- /dev/null
@@ -0,0 +1,42 @@
+<!--
+  ~ 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.
+  -->
+
+<service-logic
+        xmlns='http://www.onap.org/sdnc/svclogic'
+        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='CONFIG' version='1.0.0'>
+    <method rpc='ResourceAssignAndActivate' mode='sync'>
+        <block atomic="true">
+            <execute plugin="resource-assignment" method="process">
+                <outcome value='failure'>
+                    <return status="failure">
+                    </return>
+                </outcome>
+                <outcome value='success'>
+                    <execute plugin="activate-jython" method="process">
+                        <outcome value='failure'>
+                            <return status="failure">
+                            </return>
+                        </outcome>
+                        <outcome value='success'>
+                            <return status='success'>
+                            </return>
+                        </outcome>
+                    </execute>
+                </outcome>
+            </execute>
+        </block>
+    </method>
+</service-logic>
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Plans/CONFIG_ResourceAssignment_1.0.0.xml b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Plans/CONFIG_ResourceAssignment_1.0.0.xml
new file mode 100644 (file)
index 0000000..a197877
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+  ~ 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.
+  -->
+
+<service-logic
+        xmlns='http://www.onap.org/sdnc/svclogic'
+        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='CONFIG' version='1.0.0'>
+    <method rpc='ResourceAssignment' mode='sync'>
+        <block atomic="true">
+            <execute plugin="resource-assignment" method="process">
+                 <outcome value='failure'>
+                    <return status="failure">
+                    </return>
+                </outcome>
+                <outcome value='success'>
+                    <return status='success'>
+                    </return>
+                </outcome>
+            </execute>
+        </block>
+    </method>
+</service-logic>
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/kotlin/ResourceAssignmentProcessor.cba.kts b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/kotlin/ResourceAssignmentProcessor.cba.kts
new file mode 100644 (file)
index 0000000..f1da614
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor.*
+import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.CapabilityResourceSource
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintScriptsService
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
+
+open class ScriptResourceAssignmentProcessor : ResourceAssignmentProcessor() {
+
+    lateinit var resourceAssignment: ResourceAssignment
+
+    override fun getName(): String {
+        return "resource-assignment-processor-custom-capability"
+    }
+
+    override fun process(resourceAssignment: ResourceAssignment) {
+        this.resourceAssignment = resourceAssignment
+    }
+
+    override fun prepareResponse(): ResourceAssignment {
+        return resourceAssignment
+    }
+
+    override fun recover(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
+        TODO("To Implement")
+    }
+
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/kotlin/ScriptComponent.cba.kts b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/kotlin/ScriptComponent.cba.kts
new file mode 100644 (file)
index 0000000..184c493
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
+
+open class SampleKotlinComponent : BlueprintFunctionNode<String, String> {
+
+    override fun getName(): String {
+        return "my Name"
+    }
+
+    override fun prepareRequest(executionRequest: String): String {
+        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+    }
+
+    override fun process(executionRequest: String) {
+        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+    }
+
+    override fun recover(runtimeException: RuntimeException, executionRequest: String) {
+        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+    }
+
+    override fun prepareResponse(): String {
+        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+    }
+
+    override fun apply(t: String): String {
+        return "Successfully Executed Scripts"
+    }
+}
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/NetconfRpcExample.py b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/NetconfRpcExample.py
new file mode 100644 (file)
index 0000000..94cd72a
--- /dev/null
@@ -0,0 +1,54 @@
+#  Copyright (c) 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.
+
+import netconf_constant
+from common import ResolutionHelper
+from java.lang import Exception as JavaException
+from netconfclient import NetconfClient
+from org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor import \
+  NetconfComponentFunction
+
+
+class NetconfRpcExample(NetconfComponentFunction):
+
+  def process(self, execution_request):
+    try:
+      log = globals()[netconf_constant.SERVICE_LOG]
+      print(globals())
+      nc = NetconfClient(log, self, "netconf-connection")
+      rr = ResolutionHelper(self)
+
+      payload = rr.resolve_and_generate_message_from_template_prefix("hostname")
+
+      nc.connect()
+      response = nc.lock()
+      if not response.isSuccess():
+        log.error(response.errorMessage)
+
+      nc.edit_config(message_content=payload, edit_default_peration="none")
+      nc.validate()
+      nc.discard_change()
+      nc.validate()
+      nc.commit()
+      nc.unlock()
+      nc.disconnect()
+
+    except JavaException, err:
+      log.error("Java Exception in the script {}", err)
+    except Exception, err:
+      log.error("Python Exception in the script {}", err)
+
+  def recover(self, runtime_exception, execution_request):
+    print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+    return None
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SamplePythonComponentNode.py b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SamplePythonComponentNode.py
new file mode 100644 (file)
index 0000000..8904812
--- /dev/null
@@ -0,0 +1,18 @@
+from abstract_blueprint_function import AbstractPythonComponentFunction
+from blueprint_constants import *
+
+
+class SamplePythonComponentNode(AbstractPythonComponentFunction):
+
+    def __init__(self):
+        AbstractPythonComponentFunction.__init__(self)
+
+    def process(self, execution_request):
+        AbstractPythonComponentFunction.process(self, execution_request)
+        print "Processing calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+        return None
+
+    def recover(self, runtime_exception, execution_request):
+        AbstractPythonComponentFunction.recover(self, runtime_exception, execution_request)
+        print "Recovering calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+        return None
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SampleRAProcessor.py b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/SampleRAProcessor.py
new file mode 100644 (file)
index 0000000..30b9ff9
--- /dev/null
@@ -0,0 +1,29 @@
+from abstract_ra_processor import AbstractRAProcessor
+from blueprint_constants import *
+
+
+class SampleRAProcessor(AbstractRAProcessor):
+
+    def __init__(self):
+        AbstractRAProcessor.__init__(self)
+
+    def process(self, execution_request):
+
+        AbstractRAProcessor.process(self, execution_request)
+        print "Processing calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+        if self.ra_valid is True:
+            value = self.resolve_values_script(execution_request, self.value_to_resolve)
+            self.set_resource_data_value(execution_request, value)
+        else:
+            raise BluePrintProcessorException("Error on resource assignment. Message = " + self.error_message)
+        return None
+
+    def recover(self, runtime_exception, execution_request):
+        AbstractRAProcessor.recover(self, runtime_exception, execution_request)
+        print "Recovering calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+        return None
+
+    def resolve_values_script(self, execution_request, value_to_resolve):
+        # TODO : DO business logic here
+        print "Resolve value for " + value_to_resolve + " here..."
+        return "test_python"
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/__init__.py b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..8f1df9f
--- /dev/null
@@ -0,0 +1,6 @@
+TOSCA-Meta-File-Version: 1.0.0
+CSAR-Version: 1.0
+Created-By: Brinda Santh <brindasanth@in.ibm.com>
+Entry-Definitions: Definitions/activation-blueprint.json
+Template-Tags: Brinda Santh, activation-blueprint
+
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Templates/baseconfig-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Templates/baseconfig-template.vtl
new file mode 100644 (file)
index 0000000..026c591
--- /dev/null
@@ -0,0 +1 @@
+This is Sample Velocity Template
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Templates/hostname-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Templates/hostname-template.vtl
new file mode 100644 (file)
index 0000000..1e80b6d
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns:junos="http://xml.juniper.net/junos/17.4R1/junos">
+   <system xmlns="http://yang.juniper.net/junos-qfx/conf/system">
+      <host-name operation="delete" />
+      <host-name operation="create">$hostname</host-name>
+   </system>
+</configuration>
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
new file mode 100755 (executable)
index 0000000..b02397e
--- /dev/null
@@ -0,0 +1,128 @@
+{
+  "tosca_definitions_version" : "controller_blueprint_1_0_0",
+  "metadata" : {
+    "template_author" : "Alexis de Talhouët",
+    "author-email" : "adetalhouet89@gmail.com",
+    "user-groups" : "ADMIN, OPERATION",
+    "template_name" : "capability_python",
+    "template_version" : "1.0.0",
+    "template_tags" : "test"
+  },
+  "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"
+  } ],
+  "topology_template" : {
+    "inputs" : {
+      "request-id" : {
+        "required" : true,
+        "type" : "string"
+      },
+      "action-name" : {
+        "required" : true,
+        "type" : "string"
+      }
+    },
+    "workflows" : {
+      "assign-activate" : {
+        "steps" : {
+          "activate-process" : {
+            "description" : "Resource Assign and Netconf Activation Workflow",
+            "target" : "assign-activate-process",
+            "activities" : [ {
+              "call_operation" : ""
+            } ]
+          }
+        },
+        "inputs" : {
+          "assign-activate-properties" : {
+            "description" : "Dynamic PropertyDefinition for workflow(assign-activate).",
+            "required" : true,
+            "type" : "dt-assign-activate-properties"
+          }
+        }
+      }
+    },
+    "node_templates" : {
+      "assign-activate-process" : {
+        "type" : "dg-generic",
+        "properties" : {
+          "content" : {
+            "get_artifact" : [ "SELF", "dg-assign-activate-process" ]
+          },
+          "dependency-node-templates" : [ "resource-assignment", "activate-jython" ]
+        },
+        "artifacts" : {
+          "dg-assign-activate-process" : {
+            "type" : "artifact-directed-graph",
+            "file" : "Plans/CONFIG_AssignActivateNetconf_1.0.0.xml"
+          }
+        }
+      },
+      "resource-assignment" : {
+        "type" : "component-resource-resolution",
+        "interfaces" : {
+          "ResourceResolutionComponent" : {
+            "operations" : {
+              "process" : {
+                "inputs" : {
+                  "artifact-prefix-names" : [ "baseconfig" ]
+                },
+                "outputs" : {
+                  "resource-assignment-params" : {
+                    "get_attribute" : [ "SELF", "assignment-params" ]
+                  },
+                  "status" : "success"
+                }
+              }
+            }
+          }
+        },
+        "artifacts" : {
+          "baseconfig-template" : {
+            "type" : "artifact-template-velocity",
+            "file" : "Templates/baseconfig-template.vtl"
+          },
+          "baseconfig-mapping" : {
+            "type" : "artifact-mapping-resource",
+            "file" : "Definitions/baseconfig-mapping.json"
+          }
+        }
+      },
+      "activate-jython" : {
+        "type" : "component-jython-executor",
+        "interfaces" : {
+          "ComponentJythonExecutor" : {
+            "operations" : {
+              "process" : {
+                "implementation" : {
+                  "primary" : "component-script"
+                },
+                "inputs" : {
+                  "instance-dependencies" : [ ]
+                },
+                "outputs" : {
+                  "response-data" : "",
+                  "status" : ""
+                }
+              }
+            }
+          }
+        },
+        "artifacts" : {
+          "component-script" : {
+            "type" : "artifact-script-jython",
+            "file" : "Scripts/python/SamplePythonComponentNode.py"
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/artifact_types.json
new file mode 100755 (executable)
index 0000000..aa5295e
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "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-jython" : {
+      "description" : "Jython 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/capability_python/Definitions/baseconfig-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/baseconfig-mapping.json
new file mode 100755 (executable)
index 0000000..de6c241
--- /dev/null
@@ -0,0 +1,23 @@
+[
+  {
+    "name": "service-instance-id",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "service-instance-id",
+    "dictionary-source": "capability",
+    "dependencies": [
+    ]
+  },
+  {
+    "name": "vnf-id",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "vnf-id",
+    "dictionary-source": "input",
+    "dependencies": []
+  }
+]
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/data_types.json
new file mode 100755 (executable)
index 0000000..98a8e4b
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "data_types" : {
+    "dt-assign-activate-properties" : {
+      "description" : "Dynamic DataType definition for workflow(assign-activate).",
+      "version" : "1.0.0",
+      "properties" : {
+        "vnf-id" : {
+          "type" : "string"
+        },
+        "service-instance-id" : {
+          "type" : "string"
+        }
+      },
+      "derived_from" : "tosca.datatypes.Dynamic"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/node_types.json
new file mode 100755 (executable)
index 0000000..b40c8cb
--- /dev/null
@@ -0,0 +1,183 @@
+{
+  "node_types" : {
+    "component-jython-executor" : {
+      "description" : "This is Jython Execution Component.",
+      "version" : "1.0.0",
+      "capabilities" : {
+        "component-node" : {
+          "type" : "tosca.capabilities.Node"
+        }
+      },
+      "interfaces" : {
+        "ComponentJythonExecutor" : {
+          "operations" : {
+            "process" : {
+              "inputs" : {
+                "instance-dependencies" : {
+                  "description" : "Instance Names to Inject to Jython Script.",
+                  "required" : true,
+                  "type" : "list",
+                  "entry_schema" : {
+                    "type" : "string"
+                  }
+                }
+              },
+              "outputs" : {
+                "response-data" : {
+                  "description" : "Execution Response Data in JSON format.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "status" : {
+                  "description" : "Status of the Component Execution ( success or failure )",
+                  "required" : true,
+                  "type" : "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.component.Jython"
+    },
+    "component-resource-resolution" : {
+      "description" : "This is Resource Assignment Component API",
+      "version" : "1.0.0",
+      "attributes" : {
+        "assignment-params" : {
+          "required" : true,
+          "type" : "string"
+        }
+      },
+      "capabilities" : {
+        "component-node" : {
+          "type" : "tosca.capabilities.Node"
+        }
+      },
+      "interfaces" : {
+        "ResourceResolutionComponent" : {
+          "operations" : {
+            "process" : {
+              "inputs" : {
+                "template-name" : {
+                  "description" : "Service Template Name.",
+                  "required" : true,
+                  "type" : "string"
+                },
+                "template-version" : {
+                  "description" : "Service Template Version.",
+                  "required" : true,
+                  "type" : "string"
+                },
+                "resource-type" : {
+                  "description" : "Request type.",
+                  "required" : true,
+                  "type" : "string"
+                },
+                "template-names" : {
+                  "description" : "Name of the artifact Node Templates, to get the template Content.",
+                  "required" : true,
+                  "type" : "list",
+                  "entry_schema" : {
+                    "type" : "string"
+                  }
+                },
+                "artifact-prefix-names" : {
+                  "description" : "Template , Resource Assignment Artifact Prefix names",
+                  "required" : false,
+                  "type" : "list",
+                  "entry_schema" : {
+                    "type" : "string"
+                  }
+                },
+                "request-id" : {
+                  "description" : "Request Id, Unique Id for the request.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "resource-id" : {
+                  "description" : "Resource Id.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "action-name" : {
+                  "description" : "Action Name of the process",
+                  "required" : false,
+                  "type" : "string"
+                }
+              },
+              "outputs" : {
+                "resource-assignment-params" : {
+                  "required" : true,
+                  "type" : "string"
+                },
+                "status" : {
+                  "required" : true,
+                  "type" : "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.Component"
+    },
+    "dg-generic" : {
+      "description" : "This is Generic Directed Graph Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "content" : {
+          "required" : true,
+          "type" : "string"
+        },
+        "dependency-node-templates" : {
+          "description" : "Dependent Step Components NodeTemplate name.",
+          "required" : true,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.DG"
+    },
+    "source-input" : {
+      "description" : "This is Input Resource Source Node Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "key" : {
+          "required" : false,
+          "type" : "string"
+        },
+        "key-dependencies" : {
+          "required" : true,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.ResourceSource"
+    },
+    "tosca.nodes.Component" : {
+      "description" : "This is default Component Node",
+      "version" : "1.0.0",
+      "derived_from" : "tosca.nodes.Root"
+    },
+    "tosca.nodes.DG" : {
+      "description" : "This is Directed Graph Node Type",
+      "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.component.Jython" : {
+      "description" : "This is Jython Component",
+      "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/capability_python/Definitions/policy_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/policy_types.json
new file mode 100755 (executable)
index 0000000..1e44cc7
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "policy_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/relationship_types.json
new file mode 100755 (executable)
index 0000000..4ddd7a5
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "relationship_types" : { }
+}
\ No newline at end of file
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
new file mode 100755 (executable)
index 0000000..d2c470f
--- /dev/null
@@ -0,0 +1,51 @@
+{
+  "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" : { }
+      },
+      "primary-db": {
+        "type": "source-primary-db",
+        "properties": {
+          "query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
+          "input-key-mapping": {
+          },
+          "output-key-mapping": {
+            "service-instance-id": "artifact_name"
+          }
+        }
+      },
+      "capability": {
+        "type": "source-capability",
+        "properties": {
+          "type": "JYTHON-COMPONENT",
+          "instance-name": "SampleRAProcessor",
+          "instance-dependencies": []
+        }
+      }
+    }
+  },
+  "vnf-id" : {
+    "tags" : "vnf-id",
+    "name" : "vnf-id",
+    "property" : {
+      "description" : "vnf-id",
+      "type" : "string"
+    },
+    "updated-by" : "Singal, Kapil <ks220y@att.com>",
+    "sources" : {
+      "input" : {
+        "type" : "source-input",
+        "properties" : { }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Plans/CONFIG_AssignActivateNetconf_1.0.0.xml b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Plans/CONFIG_AssignActivateNetconf_1.0.0.xml
new file mode 100755 (executable)
index 0000000..eb41b7d
--- /dev/null
@@ -0,0 +1,42 @@
+<!--
+  ~ 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.
+  -->
+
+<service-logic
+        xmlns='http://www.onap.org/sdnc/svclogic'
+        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='CONFIG' version='1.0.0'>
+    <method rpc='ResourceAssignAndActivate' mode='sync'>
+        <block atomic="true">
+            <execute plugin="resource-assignment" method="process">
+                <outcome value='failure'>
+                    <return status="failure">
+                    </return>
+                </outcome>
+                <outcome value='success'>
+                    <execute plugin="activate-jython" method="process">
+                        <outcome value='failure'>
+                            <return status="failure">
+                            </return>
+                        </outcome>
+                        <outcome value='success'>
+                            <return status='success'>
+                            </return>
+                        </outcome>
+                    </execute>
+                </outcome>
+            </execute>
+        </block>
+    </method>
+</service-logic>
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/kotlin/ResourceAssignmentProcessor.cba.kts b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/kotlin/ResourceAssignmentProcessor.cba.kts
new file mode 100755 (executable)
index 0000000..f1da614
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor.*
+import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.CapabilityResourceSource
+import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintScriptsService
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
+import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
+
+open class ScriptResourceAssignmentProcessor : ResourceAssignmentProcessor() {
+
+    lateinit var resourceAssignment: ResourceAssignment
+
+    override fun getName(): String {
+        return "resource-assignment-processor-custom-capability"
+    }
+
+    override fun process(resourceAssignment: ResourceAssignment) {
+        this.resourceAssignment = resourceAssignment
+    }
+
+    override fun prepareResponse(): ResourceAssignment {
+        return resourceAssignment
+    }
+
+    override fun recover(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
+        TODO("To Implement")
+    }
+
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/kotlin/ScriptComponent.cba.kts b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/kotlin/ScriptComponent.cba.kts
new file mode 100755 (executable)
index 0000000..184c493
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+import org.onap.ccsdk.apps.controllerblueprints.core.asJsonPrimitive
+import org.onap.ccsdk.apps.controllerblueprints.core.data.ServiceTemplate
+import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
+
+open class SampleKotlinComponent : BlueprintFunctionNode<String, String> {
+
+    override fun getName(): String {
+        return "my Name"
+    }
+
+    override fun prepareRequest(executionRequest: String): String {
+        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+    }
+
+    override fun process(executionRequest: String) {
+        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+    }
+
+    override fun recover(runtimeException: RuntimeException, executionRequest: String) {
+        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+    }
+
+    override fun prepareResponse(): String {
+        TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+    }
+
+    override fun apply(t: String): String {
+        return "Successfully Executed Scripts"
+    }
+}
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/DefaultGetNetConfig.py b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/DefaultGetNetConfig.py
new file mode 100755 (executable)
index 0000000..e2f5655
--- /dev/null
@@ -0,0 +1,48 @@
+import  netconf_constant
+from netconfclient import NetconfClient
+from java.lang import Exception
+from abstract_blueprint_function import AbstractPythonComponentFunction
+from org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor import NetconfRpcService
+
+
+
+class DefaultGetNetConfig(AbstractPythonComponentFunction):
+    def process(self, execution_request):
+        try:
+            log = globals()[netconf_constant.SERVICE_LOG]
+            print(globals())
+            #requestId = globals()[netconf_constant.PARAM_REQUEST_ID]
+            requestId = '1234'
+
+            bluePrintRuntimeService = globals()['bluePrintRuntimeService']
+
+            capabilityProperty = bluePrintRuntimeService.resolveNodeTemplateCapabilityProperties("sample-netconf-device","netconf")
+
+            log.info("capabilityProperty {}",capabilityProperty)
+            netconfService = NetconfRpcService()
+            nc = NetconfClient(log, netconfService)
+
+            nc.connect(netconfService.getNetconfDeviceInfo(capabilityProperty))
+            runningConfigTemplate = "runningconfig-template"
+
+            runningConfigMessageId = "get-config-" + requestId
+
+            deviceResponse = nc.getConfig(messageId=runningConfigMessageId,
+                                          filter=runningConfigTemplate)
+
+            log.info("Get Running Config Response {} ", deviceResponse.responseMessage)
+            if(deviceResponse !='null') :
+                status = deviceResponse.status
+                responseData = "{}"
+                if (deviceResponse.status != netconf_constant.STATUS_SUCCESS and deviceResponse.errorMessage != 'null'):
+                    errorMessage = "Get Running Config Failure ::"+ deviceResponse.errorMessage
+
+        except Exception, err:
+            log.info("Exception in the script {}",err.getMessage())
+            status = netconf_constant.STATUS_FAILURE
+            errorMessage = "Get Running Config Failure ::"+err.getMessage()
+
+    def  recover(self, runtime_exception, execution_request):
+        print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+        return None
+
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SamplePythonComponentNode.py
new file mode 100755 (executable)
index 0000000..8904812
--- /dev/null
@@ -0,0 +1,18 @@
+from abstract_blueprint_function import AbstractPythonComponentFunction
+from blueprint_constants import *
+
+
+class SamplePythonComponentNode(AbstractPythonComponentFunction):
+
+    def __init__(self):
+        AbstractPythonComponentFunction.__init__(self)
+
+    def process(self, execution_request):
+        AbstractPythonComponentFunction.process(self, execution_request)
+        print "Processing calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+        return None
+
+    def recover(self, runtime_exception, execution_request):
+        AbstractPythonComponentFunction.recover(self, runtime_exception, execution_request)
+        print "Recovering calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+        return None
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SampleRAProcessor.py b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Scripts/python/SampleRAProcessor.py
new file mode 100755 (executable)
index 0000000..acf12b3
--- /dev/null
@@ -0,0 +1,17 @@
+from abstract_ra_processor import AbstractRAProcessor
+from blueprint_constants import *
+
+
+class SampleRAProcessor(AbstractRAProcessor):
+
+    def __init__(self):
+        AbstractRAProcessor.__init__(self)
+
+    def process(self, resource_assignment):
+        print "Processing calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+        self.set_resource_data_value(resource_assignment, "")
+        return None
+
+    def recover(self, runtime_exception, resource_assignment):
+        print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+        return None
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/capability_python/TOSCA-Metadata/TOSCA.meta
new file mode 100755 (executable)
index 0000000..9066e48
--- /dev/null
@@ -0,0 +1,8 @@
+TOSCA-Meta-File-Version: 1.0.0
+CSAR-Version: 1.0
+Created-By: Brinda Santh M
+Entry-Definitions: Definitions/activation-blueprint.json
+Template-Tags: Brinda Santh, activation-blueprint
+
+Name: Plans/ActivateProcess.bpmn
+Content-Type: application/vnd.oasis.bpmn
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Templates/baseconfig-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Templates/baseconfig-template.vtl
new file mode 100755 (executable)
index 0000000..9cbaec1
--- /dev/null
@@ -0,0 +1,4 @@
+{
+  "service-instance-id": "$service-instance-id",
+  "vnf-id": "$vnf-id"
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/activation-blueprint.json
new file mode 100644 (file)
index 0000000..628a7d0
--- /dev/null
@@ -0,0 +1,198 @@
+{
+  "tosca_definitions_version" : "controller_blueprint_1_0_0",
+  "metadata" : {
+    "template_author" : "Rodrigo Ottero",
+    "author-email" : "rodrigo.ottero@est.tech",
+    "user-groups" : "ADMIN, OPERATION",
+    "template_name" : "configuration_over_restconf",
+    "template_version" : "1.0.0",
+    "template_tags" : "pnf, restconf, config, configuration"
+  },
+  "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" : {
+    "config-assign-properties" : {
+      "resolution-key" : {
+        "get_input" : "resolution-key"
+      }
+    },
+    "config-deploy-properties" : {
+      "resolution-key" : {
+        "get_input" : "resolution-key"
+      }
+    }
+
+  },
+  "topology_template" : {
+    "workflows" : {
+      "config-assign" : {
+        "steps" : {
+          "activate-process" : {
+            "description" : "Create a configlet",
+            "target" : "config-assign-process",
+            "activities" : [ {
+              "call_operation" : ""
+            } ]
+          }
+        },
+        "inputs" : {
+          "resolution-key" : {
+            "required" : true,
+            "type" : "string"
+          },
+          "artifact-name" : {
+            "required" : true,
+            "type" : "list",
+            "entry_schema" : {
+              "type" : "string"
+            }
+          },
+          "store-result" : {
+            "required" : true,
+            "type" : "boolean"
+          },
+          "config-assign-properties" : {
+            "description" : "Dynamic PropertyDefinition for workflow(config-assign).",
+            "required" : true,
+            "type" : "dt-config-assign-properties"
+          }
+        }
+      },
+      "config-deploy" : {
+        "steps" : {
+          "activate-process" : {
+            "description" : "Send a configlet to the pnf",
+            "target" : "config-deploy-process",
+            "activities" : [ {
+              "call_operation" : ""
+            } ]
+          }
+        },
+        "inputs" : {
+          "resolution-key" : {
+            "required" : true,
+            "type" : "string"
+          },
+          "config-deploy-properties" : {
+            "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
+            "required" : true,
+            "type" : "dt-config-deploy-properties"
+          }
+        }
+      }
+    },
+    "node_templates" : {
+      "config-assign-process" : {
+        "type" : "dg-generic",
+        "properties" : {
+          "content" : {
+            "get_artifact" : [ "SELF", "dg-config-assign-process" ]
+          },
+          "dependency-node-templates" : [ "config-assign" ]
+        },
+        "artifacts" : {
+          "dg-config-assign-process" : {
+            "type" : "artifact-directed-graph",
+            "file" : "Plans/CONFIG_configAssign.xml"
+          }
+        }
+      },
+      "config-assign" : {
+        "type" : "component-resource-resolution",
+        "interfaces" : {
+          "ResourceResolutionComponent" : {
+            "operations" : {
+              "process" : {
+                "inputs" : {
+                  "resolution-key" : {
+                    "get_input" : "resolution-key"
+                  },
+                  "store-result" : true,
+                  "artifact-prefix-names" : ["config-assign"]
+                },
+                "outputs" : {
+                  "resource-assignment-params" : {
+                    "get_attribute" : [ "SELF", "assignment-params" ]
+                  },
+                  "status" : "success"
+                }
+              }
+            }
+          }
+        },
+        "artifacts" : {
+          "config-assign-template" : {
+            "type" : "artifact-template-velocity",
+            "file" : "Templates/config-assign-restconf-configlet-template.vtl"
+          },
+          "config-assign-mapping" : {
+            "type" : "artifact-mapping-resource",
+            "file" : "Definitions/config-assign-pnf-mapping.json"
+          }
+        }
+      },
+      "config-deploy-process" : {
+        "type" : "dg-generic",
+        "properties" : {
+          "content" : {
+            "get_artifact" : [ "SELF", "dg-config-deploy-process" ]
+          },
+          "dependency-node-templates" : [ "config-deploy" ]
+        },
+        "artifacts" : {
+          "dg-config-assign-process" : {
+            "type" : "artifact-directed-graph",
+            "file" : "Plans/CONFIG_configDeploy.xml"
+          }
+        }
+      },
+      "config-deploy" : {
+        "type" : "component-restconf-executor",
+        "interfaces" : {
+          "ComponentRestconfExecutor" : {
+            "operations" : {
+              "process" : {
+                "implementation" : {
+                  "primary" : "component-script"
+                },
+                "inputs" : {
+                  "script-type" : "jython",
+                  "script-class-reference" : "Scripts/python/RestconfConfigDeploy.py",
+                  "instance-dependencies" : [ ],
+                  "dynamic-properties" : "*config-deploy-properties"
+                },
+                "outputs" : {
+                  "response-data" : "",
+                  "status" : "success"
+                }
+              }
+            }
+          }
+        },
+        "artifacts" : {
+          "config-deploy-template" : {
+            "type" : "artifact-template-velocity",
+            "file" : "Templates/config-deploy-restconf-mount-template.vtl"
+          },
+          "config-deploy-mapping" : {
+            "type" : "artifact-mapping-resource",
+            "file" : "Definitions/config-deploy-pnf-mapping.json"
+          },
+          "component-script" : {
+            "type" : "artifact-script-jython",
+            "file" : "Scripts/python/RestconfConfigDeploy.py"
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/artifact_types.json
new file mode 100644 (file)
index 0000000..aa5295e
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "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-jython" : {
+      "description" : "Jython 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/capability_restconf/Definitions/config-assign-pnf-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-assign-pnf-mapping.json
new file mode 100644 (file)
index 0000000..fc8e1bf
--- /dev/null
@@ -0,0 +1,13 @@
+[
+  {
+    "name": "entity",
+    "input-param": true,
+    "property": {
+      "type": "json"
+    },
+    "dictionary-name": "entity",
+    "dictionary-source": "input",
+    "dependencies": [
+    ]
+  }
+]
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/config-deploy-pnf-mapping.json
new file mode 100644 (file)
index 0000000..fc8e1bf
--- /dev/null
@@ -0,0 +1,13 @@
+[
+  {
+    "name": "entity",
+    "input-param": true,
+    "property": {
+      "type": "json"
+    },
+    "dictionary-name": "entity",
+    "dictionary-source": "input",
+    "dependencies": [
+    ]
+  }
+]
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/data_types.json
new file mode 100644 (file)
index 0000000..e5aa763
--- /dev/null
@@ -0,0 +1,24 @@
+{
+  "data_types" : {
+    "dt-config-assign-properties" : {
+      "description" : "Dynamic DataType definition for workflow(config-assign).",
+      "version" : "1.0.0",
+      "properties" : {
+        "entity" : {
+          "type" : "json"
+        }
+      },
+      "derived_from" : "tosca.datatypes.Dynamic"
+    },
+    "dt-config-deploy-properties" : {
+      "description" : "Dynamic DataType definition for workflow(config-deploy).",
+      "version" : "1.0.0",
+      "properties" : {
+        "entity" : {
+          "type" : "json"
+        }
+      },
+      "derived_from" : "tosca.datatypes.Dynamic"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/node_types.json
new file mode 100644 (file)
index 0000000..ed7c580
--- /dev/null
@@ -0,0 +1,194 @@
+{
+  "node_types" : {
+    "component-resource-resolution" : {
+      "description" : "This is Resource Assignment Component API",
+      "version" : "1.0.0",
+      "attributes" : {
+        "assignment-params" : {
+          "required" : true,
+          "type" : "string"
+        }
+      },
+      "capabilities" : {
+        "component-node" : {
+          "type" : "tosca.capabilities.Node"
+        }
+      },
+      "interfaces" : {
+        "ResourceResolutionComponent" : {
+          "operations" : {
+            "process" : {
+              "inputs" : {
+                "resolution-key" : {
+                  "description" : "Key for service instance related correlation.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "store-result" : {
+                  "description" : "Whether or not to store the output.",
+                  "required" : false,
+                  "type" : "boolean"
+                },
+                "resource-type" : {
+                  "description" : "Request type.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "artifact-prefix-names" : {
+                  "description" : "Template , Resource Assignment Artifact Prefix names",
+                  "required" : true,
+                  "type" : "list",
+                  "entry_schema" : {
+                    "type" : "string"
+                  }
+                },
+                "request-id" : {
+                  "description" : "Request Id, Unique Id for the request.",
+                  "required" : true,
+                  "type" : "string"
+                },
+                "resource-id" : {
+                  "description" : "Resource Id.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "action-name" : {
+                  "description" : "Action Name of the process",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "dynamic-properties" : {
+                  "description" : "Dynamic Json Content or DSL Json reference.",
+                  "required" : false,
+                  "type" : "json"
+                }
+              },
+              "outputs" : {
+                "resource-assignment-params" : {
+                  "required" : true,
+                  "type" : "string"
+                },
+                "status" : {
+                  "required" : true,
+                  "type" : "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.Component"
+    },
+    "component-restconf-executor" : {
+      "description" : "This is Restconf Transaction Configuration Component API",
+      "version" : "1.0.0",
+      "capabilities" : {
+        "component-node" : {
+          "type" : "tosca.capabilities.Node"
+        }
+      },
+      "interfaces" : {
+        "ComponentRestconfExecutor" : {
+          "operations" : {
+            "process" : {
+              "inputs" : {
+                "script-type" : {
+                  "description" : "Script type, kotlin type is supported",
+                  "required" : true,
+                  "type" : "string",
+                  "constraints" : [ {
+                    "valid_values" : [ "kotlin", "jython", "internal" ]
+                  } ],
+                  "default" : "internal"
+                },
+                "script-class-reference" : {
+                  "description" : "Kotlin Script class name or jython script name.",
+                  "required" : true,
+                  "type" : "string"
+                },
+                "instance-dependencies" : {
+                  "description" : "Instance names to inject to Jython or Kotlin Script.",
+                  "required" : true,
+                  "type" : "list",
+                  "entry_schema" : {
+                    "type" : "string"
+                  }
+                },
+                "dynamic-properties" : {
+                  "description" : "Dynamic Json Content or DSL Json reference.",
+                  "required" : false,
+                  "type" : "json"
+                }
+              },
+              "outputs" : {
+                "response-data" : {
+                  "description" : "Execution Response Data in JSON format.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "status" : {
+                  "description" : "Status of the Component Execution ( success or failure )",
+                  "required" : true,
+                  "type" : "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.Component"
+    },
+    "dg-generic" : {
+      "description" : "This is Generic Directed Graph Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "content" : {
+          "required" : true,
+          "type" : "string"
+        },
+        "dependency-node-templates" : {
+          "description" : "Dependent Step Components NodeTemplate name.",
+          "required" : true,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.DG"
+    },
+    "source-input" : {
+      "description" : "This is Input Resource Source Node Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "key" : {
+          "required" : false,
+          "type" : "string"
+        },
+        "key-dependencies" : {
+          "required" : true,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.ResourceSource"
+    },
+    "tosca.nodes.Component" : {
+      "description" : "This is default Component Node",
+      "version" : "1.0.0",
+      "derived_from" : "tosca.nodes.Root"
+    },
+    "tosca.nodes.DG" : {
+      "description" : "This is Directed Graph Node Type",
+      "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"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/policy_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/policy_types.json
new file mode 100644 (file)
index 0000000..1e44cc7
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "policy_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/relationship_types.json
new file mode 100644 (file)
index 0000000..4ddd7a5
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "relationship_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Definitions/resources_definition_types.json
new file mode 100644 (file)
index 0000000..98a73b1
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "entity" : {
+    "tags" : "entity",
+    "name" : "entity",
+    "property" : {
+      "description" : "entity",
+      "type" : "json"
+    },
+    "updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
+    "sources" : {
+      "input" : {
+        "type" : "source-input",
+        "properties" : { }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configAssign.xml b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configAssign.xml
new file mode 100644 (file)
index 0000000..220cba9
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="CONFIG" version="1.0.0">
+   <method rpc="ResourceAssignAndActivate" mode="sync">
+      <block atomic="true">
+         <execute plugin="config-assign" method="process">
+            <outcome value="failure">
+               <return status="failure" />
+            </outcome>
+            <outcome value="success">
+               <return status="success" />
+            </outcome>
+         </execute>
+      </block>
+   </method>
+</service-logic>
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configDeploy.xml b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Plans/CONFIG_configDeploy.xml
new file mode 100644 (file)
index 0000000..fbed3d5
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="CONFIG" version="1.0.0">
+   <method rpc="ResourceAssignAndActivate" mode="sync">
+      <block atomic="true">
+         <execute plugin="config-deploy" method="process">
+            <outcome value="failure">
+               <return status="failure" />
+            </outcome>
+            <outcome value="success">
+               <return status="success" />
+            </outcome>
+         </execute>
+      </block>
+   </method>
+</service-logic>
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Scripts/python/RestconfConfigDeploy.py
new file mode 100644 (file)
index 0000000..33f9400
--- /dev/null
@@ -0,0 +1,112 @@
+# ============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=========================================================
+from time import sleep
+
+from org.onap.ccsdk.apps.blueprintsprocessor.functions.restconf.executor import \
+    RestconfComponentFunction
+from java.lang import Exception as JavaException
+
+
+class RestconfConfigDeploy(RestconfComponentFunction):
+
+    log = globals()["log"]
+    seconds_to_sleep = 5
+    base_mount_url = "restconf/config/network-topology:network-topology/topology/topology-netconf/node/"
+    server_identifier = "sdncodl"
+    configlet_template_name = "config-assign"
+
+    def process(self, execution_request):
+
+        self.log.info("Started execution of process method")
+        try:
+            self.log.info("getting resolution-key")
+            resolution_key = self.getDynamicProperties("resolution-key").asText()
+            self.log.info("resolution_key: {}", resolution_key)
+
+            self.log.info("getting pnf-id")
+            pnf_id = execution_request.payload.get("config-deploy-request").get("config-deploy-properties").get("entity").get("pnf-id")
+            pnf_id = str(pnf_id).strip('\"')
+            self.log.info("pnf-id: {}", pnf_id)
+
+            self.log.info("mounting device {}", pnf_id)
+            self.mount(pnf_id)
+
+            self.log.info("sleeping for {} seconds", self.seconds_to_sleep)
+            sleep(self.seconds_to_sleep)
+
+            try:
+                self.log.info("configuring device {}", pnf_id)
+                self.apply_configuration(pnf_id, resolution_key, self.configlet_template_name)
+            except Exception, err:
+                self.log.error("an error occurred while configuring device {}", err)
+                raise err
+            finally:
+                self.log.info("unmounting device {}", pnf_id)
+                self.unmount(pnf_id)
+
+            self.log.info("Ended execution of process method")
+
+        except JavaException, err:
+            self.log.error("Java Exception in the script", err)
+            raise err
+        except Exception, err:
+            self.log.error("Python Exception in the script", err)
+            raise err
+
+    def mount(self, pnf_id):
+        self.log.info("meshing mount payload")
+        mount_payload = self.resolveAndGenerateMessage("config-deploy-mapping", "config-deploy-template")
+        self.log.info("mount payload: \n {}", mount_payload)
+
+        # defining custom header
+        headers = {
+            "Content-Type": "application/xml"
+        }
+
+        url = self.base_mount_url + str(pnf_id)
+        self.log.info("sending mount request, url: {}", url)
+        web_client_service = self.restClientService(self.server_identifier)
+        web_client_service.exchangeResource("PUT", url, mount_payload, headers)
+
+    def unmount(self, pnf_id):
+        url = self.base_mount_url + str(pnf_id)
+        self.log.info("sending unmount request, url: {}", url)
+        web_client_service = self.restClientService(self.server_identifier)
+        web_client_service.exchangeResource("DELETE", url, "")
+
+    def apply_configuration(self, pnf_id, resolution_key, template_name):
+        self.log.info("Retrieving configlet from database (resolution-key: {}, template_name: {}",
+                      resolution_key, template_name)
+        configlet = self.resolveFromDatabase(resolution_key, template_name)
+        self.log.info("Configlet: {}", configlet)
+
+        # defining custom header
+        headers = {
+            "Content-Type": "application/yang.patch+json"
+        }
+
+        url = "restconf/config/network-topology:network-topology/topology/topology-netconf/node/" + pnf_id \
+              + "/yang-ext:mount/mynetconf:netconflist"
+        self.log.info("sending patch request,  url: {}", url)
+        web_client_service = self.restClientService(self.server_identifier)
+        result = web_client_service.exchangeResource("PATCH", url, configlet, headers)
+        self.log.info("Configuration application result: {}", result)
+
+    def recover(self, runtime_exception, execution_request):
+        self.log.info("Recover method, no code to execute")
+        return None
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..6ac9caf
--- /dev/null
@@ -0,0 +1,5 @@
+TOSCA-Meta-File-Version: 1.0.0
+CSAR-Version: 1.0
+Created-By: Rodrigo Ottero
+Entry-Definitions: Definitions/activation-blueprint.json
+Template-Tags: activation-blueprint
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-restconf-configlet-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-assign-restconf-configlet-template.vtl
new file mode 100644 (file)
index 0000000..3812380
--- /dev/null
@@ -0,0 +1,37 @@
+{
+   "ietf-restconf:yang-patch":{
+      "patch-id":"patch-1",
+      "edit":[
+         {
+            "edit-id":"edit1",
+            "operation":"merge",
+            "target":"/",
+            "value":{
+               "netconflist":{
+                  "netconf":[
+                     {
+                        "netconf-id":"40",
+                        "netconf-param":"4040"
+                     }
+                  ]
+               }
+            }
+         },
+         {
+            "edit-id":"edit2",
+            "operation":"merge",
+            "target":"/",
+            "value":{
+               "netconflist":{
+                  "netconf":[
+                     {
+                        "netconf-id":"50",
+                        "netconf-param":"98765"
+                     }
+                  ]
+               }
+            }
+         }
+      ]
+   }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/capability_restconf/Templates/config-deploy-restconf-mount-template.vtl
new file mode 100644 (file)
index 0000000..9351776
--- /dev/null
@@ -0,0 +1,14 @@
+<node xmlns="urn:TBD:params:xml:ns:yang:network-topology">
+    <node-id>$entity.pnf-id</node-id>
+    <key-based xmlns="urn:opendaylight:netconf-node-topology">
+        <key-id xmlns="urn:opendaylight:netconf-node-topology">ODL-private-key</key-id>
+        <username xmlns="urn:opendaylight:netconf-node-topology">netconf</username>
+     </key-based>
+    <host xmlns="urn:opendaylight:netconf-node-topology">$entity.pnf-name</host>
+    <port xmlns="urn:opendaylight:netconf-node-topology">6513</port>
+    <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only>
+       <protocol xmlns="urn:opendaylight:netconf-node-topology">
+        <name xmlns="urn:opendaylight:netconf-node-topology">TLS</name>
+    </protocol>
+    <max-connection-attempts xmlns="urn:opendaylight:netconf-node-topology">5</max-connection-attempts>
+</node>
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/artifact_types.json
new file mode 100644 (file)
index 0000000..eadc848
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "artifact_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/component_invoke.json
new file mode 100644 (file)
index 0000000..9e040b8
--- /dev/null
@@ -0,0 +1,100 @@
+{
+  "tosca_definitions_version": "controller_blueprint_1_0_0",
+  "metadata": {
+    "template_author": "Brinda Santh <brindasanth@in.ibm.com>",
+    "template_name": "component_invoke",
+    "template_version": "1.0.0",
+    "template_tags": "brinda, component_invoke"
+  },
+  "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"
+    }
+  ],
+  "topology_template": {
+    "workflows": {
+      "component-invoke": {
+        "steps": {
+          "activate-process": {
+            "description": "Sample Component Invocation flow",
+            "target": "sample-component",
+            "activities": [
+              {
+                "call_operation": "sample-component"
+              }
+            ]
+          }
+        },
+        "inputs": {
+          "request-id": {
+            "required": true,
+            "type": "string"
+          },
+          "action-name": {
+            "required": true,
+            "type": "string"
+          },
+          "scope-type": {
+            "required": true,
+            "type": "string"
+          },
+          "hostname": {
+            "required": true,
+            "type": "string"
+          }
+        },
+        "outputs": {
+          "response-property1": {
+            "type": "string",
+            "value": "executed"
+          },
+          "response-property2": {
+            "type": "string",
+            "value": {
+              "get_input": "action-name"
+            }
+          }
+        }
+      }
+    },
+    "node_templates": {
+      "sample-component": {
+        "type": "component-sample-executor",
+        "interfaces": {
+          "ComponentSampleExecutor": {
+            "operations": {
+              "process": {
+                "inputs": {
+                  "sample-property": "sample-value",
+                  "sample-list-property": [
+                    "json-parser-service"
+                  ],
+                  "dynamic-properties": {
+                    "prop1": "prop1-value",
+                    "prop2": "prop2-value"
+                  }
+                },
+                "outputs": {
+                  "response-data": "",
+                  "status": ""
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/data_types.json
new file mode 100644 (file)
index 0000000..8c304c4
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "data_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/node_types.json
new file mode 100644 (file)
index 0000000..1e02cef
--- /dev/null
@@ -0,0 +1,54 @@
+{
+  "node_types": {
+    "component-sample-executor": {
+      "description": "This is Sample Component API",
+      "version": "1.0.0",
+      "interfaces": {
+        "ComponentSampleExecutor": {
+          "operations": {
+            "process": {
+              "inputs": {
+                "sample-property": {
+                  "description": "Sample Property.",
+                  "required": true,
+                  "type": "string"
+                },
+                "sample-list-property": {
+                  "description": "Dependent Step Components NodeTemplate name.",
+                  "required": true,
+                  "type": "list",
+                  "entry_schema": {
+                    "type": "string"
+                  }
+                },
+                "dynamic-properties": {
+                  "description": "Dynamic Json Content or DSL Json reference.",
+                  "required": false,
+                  "type": "json"
+                }
+              },
+              "outputs": {
+                "response-data": {
+                  "description": "Execution Response Data in JSON format.",
+                  "required": false,
+                  "type": "string"
+                },
+                "status": {
+                  "description": "Status of the Component Execution ( success or failure )",
+                  "required": true,
+                  "type": "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from": "tosca.nodes.Component"
+    },
+    "tosca.nodes.Component": {
+      "description": "This is default Component Node",
+      "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/component_invoke/Definitions/policy_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/policy_types.json
new file mode 100644 (file)
index 0000000..1e44cc7
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "policy_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/relationship_types.json
new file mode 100644 (file)
index 0000000..4ddd7a5
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "relationship_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/Definitions/resources_definition_types.json
new file mode 100644 (file)
index 0000000..6f31cf5
--- /dev/null
@@ -0,0 +1 @@
+{ }
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/component_invoke/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..a7c130a
--- /dev/null
@@ -0,0 +1,5 @@
+TOSCA-Meta-File-Version: 1.0.0
+CSAR-Version: 1.0
+Created-By: Brinda Santh <brindasanth@in.ibm.com>
+Entry-Definitions: Definitions/component_invoke.json
+Template-Tags: Brinda Santh, component_invoke
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/activation-blueprint.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/activation-blueprint.json
new file mode 100644 (file)
index 0000000..b6464f3
--- /dev/null
@@ -0,0 +1,333 @@
+{
+  "tosca_definitions_version" : "controller_blueprint_1_0_0",
+  "metadata" : {
+    "template_author" : "Alexis de Talhouët",
+    "author-email" : "adetalhouet89@gmail.com",
+    "user-groups" : "ADMIN, OPERATION",
+    "template_name" : "test",
+    "template_version" : "1.0.0",
+    "template_tags" : "test"
+  },
+  "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" : {
+    "ipam-1" : {
+      "type" : "token-auth",
+      "url" : "http://localhost:32778",
+      "token" : "Token 0123456789abcdef0123456789abcdef01234567"
+    },
+    "config-deploy-properties" : {
+      "resolution-key" : {
+        "get_input" : "resolution-key"
+      }
+    }
+  },
+  "topology_template" : {
+    "workflows" : {
+      "resource-assignment" : {
+        "steps" : {
+          "resource-assignment-process" : {
+            "description" : "Resource Assign Workflow",
+            "target" : "resource-assignment-process",
+            "activities" : [ {
+              "call_operation" : ""
+            } ]
+          }
+        },
+        "inputs" : {
+          "artifact-name" : {
+            "required" : true,
+            "type" : "list",
+            "entry_schema" : {
+              "type" : "string"
+            }
+          },
+          "store-result" : {
+            "required" : true,
+            "type" : "boolean"
+          },
+          "resolution-key" : {
+            "required" : true,
+            "type" : "string"
+          },
+          "resource-assignment-properties" : {
+            "description" : "Dynamic PropertyDefinition for workflow(resource-assignment).",
+            "required" : true,
+            "type" : "dt-resource-assignment-properties"
+          }
+        }
+      },
+      "config-deploy" : {
+        "steps" : {
+          "config-deploy" : {
+            "description" : "Resource Assign and Python Netconf Activation Workflow",
+            "target" : "config-deploy-process",
+            "activities" : [ {
+              "call_operation" : ""
+            } ]
+          }
+        },
+        "inputs" : {
+          "resolution-key" : {
+            "required" : false,
+            "type" : "string"
+          },
+          "password" : {
+            "required" : true,
+            "type" : "string"
+          },
+          "username" : {
+            "required" : true,
+            "type" : "string"
+          },
+          "ip" : {
+            "required" : true,
+            "type" : "string"
+          },
+          "config-deploy-properties" : {
+            "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
+            "required" : true,
+            "type" : "dt-config-deploy-properties"
+          }
+        }
+      },
+      "rollback" : {
+        "steps" : {
+          "rollback" : {
+            "description" : "Roolback Workflow",
+            "target" : "rollback-process",
+            "activities" : [ {
+              "call_operation" : ""
+            } ]
+          }
+        },
+        "inputs" : {
+          "resolution-key" : {
+            "required" : false,
+            "type" : "string"
+          },
+          "password" : {
+            "required" : true,
+            "type" : "string"
+          },
+          "username" : {
+            "required" : true,
+            "type" : "string"
+          },
+          "ip" : {
+            "required" : true,
+            "type" : "string"
+          },
+          "config-deploy-properties" : {
+            "description" : "Dynamic PropertyDefinition for workflow(config-deploy).",
+            "required" : true,
+            "type" : "dt-config-deploy-properties"
+          },
+          "rollback-properties" : {
+            "description" : "Dynamic PropertyDefinition for workflow(rollback).",
+            "required" : true,
+            "type" : "dt-rollback-properties"
+          }
+        }
+      }
+    },
+    "node_templates" : {
+      "resource-assignment-process" : {
+        "type" : "dg-generic",
+        "properties" : {
+          "content" : {
+            "get_artifact" : [ "SELF", "dg-resource-assignment-process" ]
+          },
+          "dependency-node-templates" : [ "resource-assignment" ]
+        },
+        "artifacts" : {
+          "dg-resource-assignment-process" : {
+            "type" : "artifact-directed-graph",
+            "file" : "Plans/ResourceAssignment.xml"
+          }
+        }
+      },
+      "resource-assignment" : {
+        "type" : "component-resource-resolution",
+        "interfaces" : {
+          "ResourceResolutionComponent" : {
+            "operations" : {
+              "process" : {
+                "inputs" : {
+                  "resolution-key" : {
+                    "get_input" : "resolution-key"
+                  },
+                  "store-result" : {
+                    "get_input" : "store-result"
+                  },
+                  "artifact-prefix-names" : {
+                    "get_input" : "artifact-name"
+                  }
+                },
+                "outputs" : {
+                  "resource-assignment-params" : {
+                    "get_attribute" : [ "SELF", "assignment-params" ]
+                  },
+                  "status" : "success"
+                }
+              }
+            }
+          }
+        },
+        "artifacts" : {
+          "hostname-template" : {
+            "type" : "artifact-template-velocity",
+            "file" : "Templates/hostname-template.vtl"
+          },
+          "hostname-mapping" : {
+            "type" : "artifact-mapping-resource",
+            "file" : "Templates/hostname-mapping.json"
+          },
+          "vf-module-1-template" : {
+            "type" : "artifact-template-velocity",
+            "file" : "Templates/vf-module-1-template.vtl"
+          },
+          "vf-module-1-mapping" : {
+            "type" : "artifact-mapping-resource",
+            "file" : "Templates/vf-module-1-mapping.json"
+          }
+        }
+      },
+      "config-deploy-process" : {
+        "type" : "dg-generic",
+        "properties" : {
+          "content" : {
+            "get_artifact" : [ "SELF", "dg-config-deploy-process" ]
+          },
+          "dependency-node-templates" : [ "config-deploy" ]
+        },
+        "artifacts" : {
+          "dg-config-deploy-process" : {
+            "type" : "artifact-directed-graph",
+            "file" : "Plans/ConfigDeploy.xml"
+          }
+        }
+      },
+      "config-deploy" : {
+        "type" : "component-netconf-executor",
+        "requirements" : {
+          "netconf-connection" : {
+            "capability" : "netconf",
+            "node" : "netconf-device",
+            "relationship" : "tosca.relationships.ConnectsTo"
+          }
+        },
+        "interfaces" : {
+          "ComponentNetconfExecutor" : {
+            "operations" : {
+              "process" : {
+                "inputs" : {
+                  "script-type" : "jython",
+                  "script-class-reference" : "Scripts/python/NetconfRpcExample.py",
+                  "instance-dependencies" : [ ],
+                  "dynamic-properties" : "*config-deploy-properties"
+                },
+                "outputs" : {
+                  "response-data" : "",
+                  "status" : "SUCCESS"
+                }
+              }
+            }
+          }
+        },
+        "artifacts" : {
+          "vfw-interface-template" : {
+            "type" : "artifact-template-velocity",
+            "file" : "Templates/vfw-interface-template.vtl"
+          },
+          "vfw-interface-mapping" : {
+            "type" : "artifact-mapping-resource",
+            "file" : "Templates/vfw-interface-mapping.json"
+          }
+        }
+      },
+      "rollback-process" : {
+        "type" : "dg-generic",
+        "properties" : {
+          "content" : {
+            "get_artifact" : [ "SELF", "dg-rollback-process" ]
+          },
+          "dependency-node-templates" : [ "config-deploy" ]
+        },
+        "artifacts" : {
+          "dg-rollback-process" : {
+            "type" : "artifact-directed-graph",
+            "file" : "Plans/Rollback.xml"
+          }
+        }
+      },
+      "rollback" : {
+        "type" : "component-netconf-executor",
+        "requirements" : {
+          "netconf-connection" : {
+            "capability" : "netconf",
+            "node" : "netconf-device",
+            "relationship" : "tosca.relationships.ConnectsTo"
+          }
+        },
+        "interfaces" : {
+          "ComponentNetconfExecutor" : {
+            "operations" : {
+              "process" : {
+                "inputs" : {
+                  "script-type" : "jython",
+                  "script-class-reference" : "Scripts/python/Rollback.py",
+                  "instance-dependencies" : [ ],
+                  "dynamic-properties" : "*config-deploy-properties"
+                },
+                "outputs" : {
+                  "response-data" : "",
+                  "status" : "SUCCESS"
+                }
+              }
+            }
+          }
+        },
+        "artifacts" : {
+          "junos-rollback-RPC-template" : {
+            "type" : "artifact-template-velocity",
+            "file" : "Templates/junos-rollback-RPC-template.vtl"
+          },
+          "junos-rollback-RPC-mapping" : {
+            "type" : "artifact-mapping-resource",
+            "file" : "Templates/junos-rollback-RPC-mapping.json"
+          }
+        }
+      },
+      "netconf-device" : {
+        "type" : "vnf-netconf-device",
+        "capabilities" : {
+          "netconf" : {
+            "properties" : {
+              "login-key" : {
+                "get_input" : "password"
+              },
+              "login-account" : {
+                "get_input" : "username"
+              },
+              "target-ip-address" : {
+                "get_input" : "ip"
+              },
+              "port-number" : 830,
+              "connection-time-out" : 5
+            }
+          }
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/artifact_types.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/artifact_types.json
new file mode 100644 (file)
index 0000000..6ec3b41
--- /dev/null
@@ -0,0 +1,22 @@
+{
+  "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-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/golden/Definitions/data_types.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/data_types.json
new file mode 100644 (file)
index 0000000..d60e6f0
--- /dev/null
@@ -0,0 +1,106 @@
+{
+  "data_types" : {
+    "dt-config-deploy-properties" : {
+      "description" : "Dynamic DataType definition for workflow(config-deploy).",
+      "version" : "1.0.0",
+      "properties" : {
+        "vfw_interface_ip" : {
+          "type" : "dt-netbox-ip"
+        },
+        "interface-name" : {
+          "type" : "string"
+        },
+        "interface-description" : {
+          "type" : "string"
+        },
+        "unit-number" : {
+          "type" : "string"
+        },
+        "prefix-id" : {
+          "type" : "string",
+          "default" : "11"
+        },
+        "vf-module-type" : {
+          "type" : "string"
+        },
+        "vf-module-number" : {
+          "type" : "string",
+          "default" : "3"
+        }
+      },
+      "derived_from" : "tosca.datatypes.Dynamic"
+    },
+    "dt-netbox-ip" : {
+      "description" : "This is Netbox IP Data Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "address" : {
+          "required" : true,
+          "type" : "string"
+        },
+        "id" : {
+          "required" : true,
+          "type" : "integer"
+        }
+      },
+      "derived_from" : "tosca.datatypes.Root"
+    },
+    "dt-resource-assignment-properties" : {
+      "description" : "Dynamic DataType definition for workflow(resource-assignment).",
+      "version" : "1.0.0",
+      "properties" : {
+        "hostname" : {
+          "type" : "string"
+        },
+        "vfw_interface_ip" : {
+          "type" : "dt-netbox-ip"
+        },
+        "interface-description" : {
+          "type" : "string"
+        },
+        "vf-module-type" : {
+          "type" : "string"
+        },
+        "vf-module-number" : {
+          "type" : "string",
+          "default" : "3"
+        },
+        "prefix-id" : {
+          "type" : "integer",
+          "default" : 11
+        }
+      },
+      "derived_from" : "tosca.datatypes.Dynamic"
+    },
+    "dt-rollback-properties" : {
+      "description" : "Dynamic DataType definition for workflow(rollback).",
+      "version" : "1.0.0",
+      "properties" : {
+        "vfw_interface_ip" : {
+          "type" : "dt-netbox-ip"
+        },
+        "interface-name" : {
+          "type" : "string"
+        },
+        "interface-description" : {
+          "type" : "string"
+        },
+        "unit-number" : {
+          "type" : "string"
+        },
+        "prefix-id" : {
+          "type" : "string",
+          "default" : "11"
+        },
+        "vf-module-type" : {
+          "type" : "string"
+        },
+        "vf-module-number" : {
+          "type" : "string",
+          "default" : "3"
+        }
+      },
+      "derived_from" : "tosca.datatypes.Dynamic"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/node_types.json
new file mode 100644 (file)
index 0000000..f143e56
--- /dev/null
@@ -0,0 +1,413 @@
+{
+  "node_types" : {
+    "component-netconf-executor" : {
+      "description" : "This is Netconf Transaction Configuration Component API",
+      "version" : "1.0.0",
+      "capabilities" : {
+        "component-node" : {
+          "type" : "tosca.capabilities.Node"
+        }
+      },
+      "requirements" : {
+        "netconf-connection" : {
+          "capability" : "netconf",
+          "node" : "vnf-netconf-device",
+          "relationship" : "tosca.relationships.ConnectsTo"
+        }
+      },
+      "interfaces" : {
+        "ComponentNetconfExecutor" : {
+          "operations" : {
+            "process" : {
+              "inputs" : {
+                "script-type" : {
+                  "description" : "Script type, kotlin type is supported",
+                  "required" : true,
+                  "type" : "string",
+                  "constraints" : [ {
+                    "valid_values" : [ "kotlin", "jython", "internal" ]
+                  } ],
+                  "default" : "internal"
+                },
+                "dynamic-properties" : {
+                  "description" : "Dynamic Json Content or DSL Json reference.",
+                  "required" : false,
+                  "type" : "json"
+                },
+                "script-class-reference" : {
+                  "description" : "Kotlin Script class name or jython script name.",
+                  "required" : true,
+                  "type" : "string"
+                },
+                "instance-dependencies" : {
+                  "description" : "Instance names to inject to Jython or Kotlin Script.",
+                  "required" : true,
+                  "type" : "list",
+                  "entry_schema" : {
+                    "type" : "string"
+                  }
+                }
+              },
+              "outputs" : {
+                "response-data" : {
+                  "description" : "Execution Response Data in JSON format.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "status" : {
+                  "description" : "Status of the Component Execution ( success or failure )",
+                  "required" : true,
+                  "type" : "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.Component"
+    },
+    "component-resource-resolution" : {
+      "description" : "This is Resource Assignment Component API",
+      "version" : "1.0.0",
+      "attributes" : {
+        "assignment-params" : {
+          "required" : true,
+          "type" : "string"
+        }
+      },
+      "capabilities" : {
+        "component-node" : {
+          "type" : "tosca.capabilities.Node"
+        }
+      },
+      "interfaces" : {
+        "ResourceResolutionComponent" : {
+          "operations" : {
+            "process" : {
+              "inputs" : {
+                "resolution-key" : {
+                  "description" : "Key for service instance related correlation.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "store-result" : {
+                  "description" : "Whether or not to store the output.",
+                  "required" : false,
+                  "type" : "boolean"
+                },
+                "resource-type" : {
+                  "description" : "Request type.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "artifact-prefix-names" : {
+                  "description" : "Template , Resource Assignment Artifact Prefix names",
+                  "required" : true,
+                  "type" : "list",
+                  "entry_schema" : {
+                    "type" : "string"
+                  }
+                },
+                "request-id" : {
+                  "description" : "Request Id, Unique Id for the request.",
+                  "required" : true,
+                  "type" : "string"
+                },
+                "resource-id" : {
+                  "description" : "Resource Id.",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "action-name" : {
+                  "description" : "Action Name of the process",
+                  "required" : false,
+                  "type" : "string"
+                },
+                "dynamic-properties" : {
+                  "description" : "Dynamic Json Content or DSL Json reference.",
+                  "required" : false,
+                  "type" : "json"
+                }
+              },
+              "outputs" : {
+                "resource-assignment-params" : {
+                  "required" : true,
+                  "type" : "string"
+                },
+                "status" : {
+                  "required" : true,
+                  "type" : "string"
+                }
+              }
+            }
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.Component"
+    },
+    "dg-generic" : {
+      "description" : "This is Generic Directed Graph Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "content" : {
+          "required" : true,
+          "type" : "string"
+        },
+        "dependency-node-templates" : {
+          "description" : "Dependent Step Components NodeTemplate name.",
+          "required" : true,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.DG"
+    },
+    "source-capability" : {
+      "description" : "This is Component Resource Source Node Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "script-type" : {
+          "required" : true,
+          "type" : "string",
+          "constraints" : [ {
+            "valid_values" : [ "kotlin", "internal", "jython" ]
+          } ],
+          "default" : "kotlin"
+        },
+        "script-class-reference" : {
+          "description" : "Capability reference name for internal and kotlin, for jython script file path",
+          "required" : true,
+          "type" : "string"
+        },
+        "instance-dependencies" : {
+          "description" : "Instance dependency Names to Inject to Kotlin / Jython Script.",
+          "required" : false,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        },
+        "key-dependencies" : {
+          "description" : "Resource Resolution dependency dictionary names.",
+          "required" : true,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.ResourceSource"
+    },
+    "source-default" : {
+      "description" : "This is Default Resource Source Node Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "key" : {
+          "required" : false,
+          "type" : "string"
+        },
+        "key-dependencies" : {
+          "required" : true,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.ResourceSource"
+    },
+    "source-input" : {
+      "description" : "This is Input Resource Source Node Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "key" : {
+          "required" : false,
+          "type" : "string"
+        },
+        "key-dependencies" : {
+          "required" : true,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.ResourceSource"
+    },
+    "source-processor-db" : {
+      "description" : "This is Database Resource Source Node Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "type" : {
+          "required" : true,
+          "type" : "string",
+          "constraints" : [ {
+            "valid_values" : [ "SQL", "PLSQL" ]
+          } ]
+        },
+        "endpoint-selector" : {
+          "required" : false,
+          "type" : "string"
+        },
+        "query" : {
+          "required" : true,
+          "type" : "string"
+        },
+        "input-key-mapping" : {
+          "required" : false,
+          "type" : "map",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        },
+        "output-key-mapping" : {
+          "required" : false,
+          "type" : "map",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        },
+        "key-dependencies" : {
+          "required" : true,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.ResourceSource"
+    },
+    "source-rest" : {
+      "description" : "This is Rest Resource Source Node Type",
+      "version" : "1.0.0",
+      "properties" : {
+        "type" : {
+          "required" : false,
+          "type" : "string",
+          "constraints" : [ {
+            "valid_values" : [ "JSON" ]
+          } ],
+          "default" : "JSON"
+        },
+        "verb" : {
+          "required" : false,
+          "type" : "string",
+          "constraints" : [ {
+            "valid_values" : [ "GET", "POST", "DELETE", "PUT" ]
+          } ],
+          "default" : "GET"
+        },
+        "payload" : {
+          "required" : false,
+          "type" : "string",
+          "default" : ""
+        },
+        "endpoint-selector" : {
+          "required" : false,
+          "type" : "string"
+        },
+        "url-path" : {
+          "required" : true,
+          "type" : "string"
+        },
+        "path" : {
+          "required" : true,
+          "type" : "string"
+        },
+        "expression-type" : {
+          "required" : false,
+          "type" : "string",
+          "constraints" : [ {
+            "valid_values" : [ "JSON_PATH", "JSON_POINTER" ]
+          } ],
+          "default" : "JSON_PATH"
+        },
+        "input-key-mapping" : {
+          "required" : false,
+          "type" : "map",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        },
+        "output-key-mapping" : {
+          "required" : false,
+          "type" : "map",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        },
+        "key-dependencies" : {
+          "required" : true,
+          "type" : "list",
+          "entry_schema" : {
+            "type" : "string"
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.ResourceSource"
+    },
+    "tosca.nodes.Component" : {
+      "description" : "This is default Component Node",
+      "version" : "1.0.0",
+      "derived_from" : "tosca.nodes.Root"
+    },
+    "tosca.nodes.DG" : {
+      "description" : "This is Directed Graph Node Type",
+      "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.Vnf" : {
+      "description" : "This is VNF Node Type",
+      "version" : "1.0.0",
+      "derived_from" : "tosca.nodes.Root"
+    },
+    "vnf-netconf-device" : {
+      "description" : "This is VNF Device with Netconf  Capability",
+      "version" : "1.0.0",
+      "capabilities" : {
+        "netconf" : {
+          "type" : "tosca.capabilities.Netconf",
+          "properties" : {
+            "login-key" : {
+              "required" : true,
+              "type" : "string",
+              "default" : "sdnc"
+            },
+            "login-account" : {
+              "required" : true,
+              "type" : "string",
+              "default" : "sdnc-tacacs"
+            },
+            "source" : {
+              "required" : false,
+              "type" : "string",
+              "default" : "npm"
+            },
+            "target-ip-address" : {
+              "required" : true,
+              "type" : "string"
+            },
+            "port-number" : {
+              "required" : true,
+              "type" : "integer",
+              "default" : 830
+            },
+            "connection-time-out" : {
+              "required" : false,
+              "type" : "integer",
+              "default" : 30
+            }
+          }
+        }
+      },
+      "derived_from" : "tosca.nodes.Vnf"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/policy_types.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/policy_types.json
new file mode 100644 (file)
index 0000000..1e44cc7
--- /dev/null
@@ -0,0 +1,3 @@
+{
+  "policy_types" : { }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/relationship_types.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/relationship_types.json
new file mode 100644 (file)
index 0000000..027bfc0
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "relationship_types" : {
+    "tosca.relationships.ConnectsTo" : {
+      "description" : "Relationship tosca.relationships.ConnectsTo",
+      "version" : "1.0.0",
+      "derived_from" : "tosca.relationships.Root"
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/resources_definition_types.json
new file mode 100644 (file)
index 0000000..15f02a1
--- /dev/null
@@ -0,0 +1,148 @@
+{
+  "create_netbox_ip" : {
+    "tags" : "oam-local-ipv4-address",
+    "name" : "create_netbox_ip",
+    "property" : {
+      "description" : "netbox ip",
+      "type" : "dt-netbox-ip"
+    },
+    "updated-by" : "adetalhouet",
+    "sources" : {
+      "primary-config-data" : {
+        "type" : "source-rest",
+        "properties" : {
+          "type" : "JSON",
+          "verb" : "POST",
+          "endpoint-selector" : "ipam-1",
+          "url-path" : "/api/ipam/prefixes/$prefix-id/available-ips/",
+          "path" : "",
+          "input-key-mapping" : {
+            "prefix-id" : "prefix-id"
+          },
+          "output-key-mapping" : {
+            "address" : "address",
+            "id" : "id"
+          },
+          "key-dependencies" : [ "prefix-id" ]
+        }
+      }
+    }
+  },
+  "hostname" : {
+    "tags" : "hostname",
+    "name" : "hostname",
+    "property" : {
+      "description" : "hostname",
+      "type" : "string"
+    },
+    "updated-by" : "adetalhouet",
+    "sources" : {
+      "input" : {
+        "type" : "source-input"
+      }
+    }
+  },
+  "interface-description" : {
+    "tags" : "interface-description",
+    "name" : "interface-description",
+    "property" : {
+      "description" : "interface-description",
+      "type" : "string"
+    },
+    "updated-by" : "adetalhouet",
+    "sources" : {
+      "capability" : {
+        "type" : "source-capability",
+        "properties" : {
+          "script-type" : "jython",
+          "script-class-reference" : "DescriptionExample",
+          "instance-dependencies" : [ ]
+        }
+      }
+    }
+  },
+  "interface-name" : {
+    "tags" : "interface-name",
+    "name" : "interface-name",
+    "property" : {
+      "description" : "interface-name",
+      "type" : "string"
+    },
+    "updated-by" : "adetalhouet",
+    "sources" : {
+      "input" : {
+        "type" : "source-input",
+        "properties" : { }
+      }
+    }
+  },
+  "prefix-id" : {
+    "tags" : "prefix-id",
+    "name" : "prefix-id",
+    "property" : {
+      "description" : "prefix-id",
+      "type" : "integer"
+    },
+    "updated-by" : "adetalhouet",
+    "sources" : {
+      "default" : {
+        "type" : "source-default",
+        "properties" : { }
+      }
+    }
+  },
+  "unit-number" : {
+    "tags" : "unit-number",
+    "name" : "unit-number",
+    "property" : {
+      "description" : "unit-number",
+      "type" : "string"
+    },
+    "updated-by" : "adetalhouet",
+    "sources" : {
+      "input" : {
+        "type" : "source-input"
+      }
+    }
+  },
+  "vf-module-number" : {
+    "tags" : "vf-module-number",
+    "name" : "vf-module-number",
+    "property" : {
+      "description" : "vf-module-number",
+      "type" : "string"
+    },
+    "updated-by" : "adetalhouet",
+    "sources" : {
+      "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-processor-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" ]
+        }
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Plans/ConfigDeploy.xml b/components/model-catalog/blueprint-model/test-blueprint/golden/Plans/ConfigDeploy.xml
new file mode 100644 (file)
index 0000000..ec154a1
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="CONFIG" version="1.0.0">
+   <method rpc="ConfigDeploy" mode="sync">
+      <block atomic="true">
+         <execute plugin="config-deploy" method="process">
+            <outcome value="failure">
+               <return status="failure" />
+            </outcome>
+            <outcome value="success">
+               <return status="success" />
+            </outcome>
+         </execute>
+      </block>
+   </method>
+</service-logic>
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Plans/ResourceAssignment.xml b/components/model-catalog/blueprint-model/test-blueprint/golden/Plans/ResourceAssignment.xml
new file mode 100644 (file)
index 0000000..15872e5
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service-logic
+        xmlns='http://www.onap.org/sdnc/svclogic'
+        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
+        xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' 
+        module='CONFIG' 
+        version='1.0.0'>
+    <method rpc='ResourceAssignment' mode='sync'>
+        <block atomic="true">
+            <execute plugin="resource-assignment" method="process">
+                <outcome value='failure'>
+                    <return status="failure">
+                    </return>
+                </outcome>
+                <outcome value='success'>
+                    <return status="success">
+                    </return>
+                </outcome>
+            </execute>
+        </block>
+    </method>
+</service-logic>
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Plans/Rollback.xml b/components/model-catalog/blueprint-model/test-blueprint/golden/Plans/Rollback.xml
new file mode 100644 (file)
index 0000000..c1231d7
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd" module="CONFIG" version="1.0.0">
+   <method rpc="Rollback" mode="sync">
+      <block atomic="true">
+         <execute plugin="rollback" method="process">
+            <outcome value="failure">
+               <return status="failure" />
+            </outcome>
+            <outcome value="success">
+               <return status="success" />
+            </outcome>
+         </execute>
+      </block>
+   </method>
+</service-logic>
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/README b/components/model-catalog/blueprint-model/test-blueprint/golden/README
new file mode 100644 (file)
index 0000000..06f9112
--- /dev/null
@@ -0,0 +1,134 @@
+
+Example
+
+    Pre-requisite
+
+        Netbox running: https://github.com/netbox-community/netbox-docker
+        NETCONF capable device (JUNOS use in this example, but templates could be changed for another OS)
+        Blueprint processor
+
+    resources
+
+         Bellow a table of the resource used within this example, and how this resource
+         are resolved.
+         The resources are used in the context of device configuration. These shouldn't be
+         confused with SDC model resources.
+
+              name               |   resolve through
+          ------------------------------------------------------
+          prefix-id              |   default
+          vfw_interface_ip       |   rest (through Netbox)
+          hostname               |   input
+          vf-module-number       |   default
+          vf-module-type         |   database
+          unit-number            |   input
+          interface-name         |   input
+          interface-description  |   capability (python script)
+
+    3 workflow
+
+        resource-assignment (dry-run)
+
+            Ability to resolve multiple templates and mappings at the same time,
+            based on the request 'artifact-name', and provide the result as output.
+            Example provide two templates: hostname and vf-module-1
+
+            In order to perform dry-run, we need to store the template and have
+            the ability to retrieve the stored result later point in time. For this
+            we have to specify that we want to store the result, and we need to provide
+            a resolution-key.
+
+            Here is the request payload:
+
+                artifact name:    template(s) to resolve
+                store-result:     whether to save the generated configlet in DB
+                resolution-key:   To identify the configlet saved in the DB
+                hostname:         Value defined to be result trough input in the hostname mapping file
+
+                {
+                  "resource-assignment-request": {
+                    "artifact-name": [ "hostname", "vf-module-1" ],
+                    "resolution-key": "hostname-demo-123",
+                    "store-result": true,
+                    "resource-assignment-properties": {
+                      "hostname": "demo123"
+                    }
+                  }
+                }
+
+            Output:
+
+                {
+                  "resource-assignment-params": {
+                      "hostname": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration xmlns:junos=\"http://xml.juniper.net/junos/17.4R1/junos\">\n   <system xmlns=\"http://yang.juniper.net/junos-qfx/conf/system\">\n      <host-name operation=\"delete\" />\n      <host-name operation=\"create\">demo123</host-name>\n   </system>\n</configuration>\n",
+                      "vf-module-1": "<interface>\n    <description>This is the Virtual Firewall entity</description>\n    <vfw>10.10.10.39/24</vfw>\n</interface>"
+                  },
+                  "status": "success"
+                }
+
+        config-deploy
+
+            This action will run a python script that will retrieved the resolved template
+            from previous step using the resolution-key and the artifact-name.
+            The script will also resolve another template during its execution: the Interface Template.
+            Finally, this action will push these resolved templates into a device (JUNOS) using NETCONF.
+            The python script will make use of utilities classes provided by the platform:
+            resolution helper and netconf client.
+
+            Information about the device is modelled as a requirement of this action, specifying that
+            username, password and ip of the device should be provided as input. Note: you could resolve
+            those information using the resource resolution framework, if need be.
+
+            Here is the request payload:
+
+                resolution-key:   To identify the configlet saved in the DB in previous step
+                username:         NETCONF device user
+                password:         NETCONF device password
+                ip:               NETCONF device ip
+                interface-name:   Name of the interface to configure
+                unit-number:      Unit to configure for the interface
+
+                {
+                  "resolution-key": "hostname-demo-123",
+                  "username": "user",
+                  "password": "pass",
+                  "ip": "10.198.1.35",
+                  "config-deploy-properties": {
+                    "interface-name": "ge-0/0/7",
+                    unit-number": "0"
+                  }
+                }
+
+            Output:
+
+                No specific output beside success or failure.
+
+        rollback
+
+            This action will rollback the last committed config on the device, using NETCONF and device
+            specific RPC. To do so, a python script will be used, similar as in previous action, to dynamically
+            resolve the rollback template payload, and send the RPC to the device.
+
+            Information about the NETCONF device is provided in a similar fashion as previous step. Actually, the
+            same model is used.
+
+            Here is the request payload:
+
+                username:         NETCONF device user
+                password:         NETCONF device password
+                ip:               NETCONF device ip
+
+                 {
+                    "username": "pass",
+                    "password": "user",
+                    "ip": "10.10.10.10"
+                 }
+
+            Output:
+
+                No specific output beside success or failure.
+
+
+Postman collection used for this example. 4 requests are provided one per workflow to execute, and 1 to load the CBA in the runtime environment.
+
+    https://www.getpostman.com/collections/4d199ff02a735bd3e680
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py b/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/DescriptionExample.py
new file mode 100644 (file)
index 0000000..4cf635a
--- /dev/null
@@ -0,0 +1,46 @@
+#  Copyright (c) 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.
+
+from abstract_ra_processor import AbstractRAProcessor
+from blueprint_constants import *
+from java.lang import Exception as JavaException
+
+class DescriptionExample(AbstractRAProcessor):
+
+    def process(self, resource_assignment):
+        try:
+            # get dependencies result
+            value = self.raRuntimeService.getStringFromResolutionStore("vf-module-type")
+            
+            # logic based on dependency outcome
+            result = ""
+            if value == "vfw":
+                result = "This is the Virtual Firewall entity"
+            elif value == "vsn":
+                result = "This is the Virtual Sink entity"
+            elif value == "vpg":
+                result = "This is the Virtual Packet Generator"
+
+            # set value for resource getting currently resolved
+            self.set_resource_data_value(resource_assignment, result)
+
+        except JavaException, err:
+          log.error("Java Exception in the script {}", err)
+        except Exception, err:
+          log.error("Python Exception in the script {}", err)
+        return None
+
+    def recover(self, runtime_exception, resource_assignment):
+        print self.addError(runtime_exception.getMessage())
+        return None
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/NetconfRpcExample.py b/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/NetconfRpcExample.py
new file mode 100644 (file)
index 0000000..2d22f8b
--- /dev/null
@@ -0,0 +1,61 @@
+#  Copyright (c) 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.
+
+import netconf_constant
+from common import ResolutionHelper
+from java.lang import Exception as JavaException
+from netconfclient import NetconfClient
+from org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor import \
+  NetconfComponentFunction
+
+
+class NetconfRpcExample(NetconfComponentFunction):
+
+  def process(self, execution_request):
+    try:
+      log = globals()[netconf_constant.SERVICE_LOG]
+      print(globals())
+
+      nc = NetconfClient(log, self, "netconf-connection")
+      rr = ResolutionHelper(self)
+
+      # Get meshed template from DB
+      resolution_key = self.getDynamicProperties("resolution-key").asText()
+      artifact_name = "hostname"
+      payloadHostname = rr.retrieve_resolved_template_from_database(resolution_key, artifact_name)
+
+      # resolve param and mesh template
+      payloadInterface = rr.resolve_and_generate_message_from_template_prefix("vfw-interface")
+
+      nc.connect()
+      nc.lock()
+      #if not response.isSuccess():
+      #  og.error(response.errorMessage)
+      nc.discard_change()
+      nc.edit_config(message_content=payloadInterface, edit_default_peration="none")
+      nc.edit_config(message_content=payloadHostname, edit_default_peration="none")
+      nc.validate()
+      nc.commit()
+      #nc.commit(confirmed = True, confirm_timeout=15)
+      nc.unlock()
+      nc.disconnect()
+
+    except JavaException, err:
+      log.error("Java Exception in the script {}", err)
+    except Exception, err:
+      log.error("Python Exception in the script {}", err)
+
+  def recover(self, runtime_exception, execution_request):
+    print self.addError(runtime_exception.getMessage())
+    return None
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/Rollback.py b/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/Rollback.py
new file mode 100644 (file)
index 0000000..deec470
--- /dev/null
@@ -0,0 +1,47 @@
+#  Copyright (c) 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.
+
+import netconf_constant
+from common import ResolutionHelper
+from java.lang import Exception as JavaException
+from netconfclient import NetconfClient
+from org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor import \
+  NetconfComponentFunction
+
+
+class Rollback(NetconfComponentFunction):
+
+  def process(self, execution_request):
+    try:
+      log = globals()[netconf_constant.SERVICE_LOG]
+      print(globals())
+
+      nc = NetconfClient(log, self, "netconf-connection")
+      rr = ResolutionHelper(self)
+
+      # rollback config on device
+      nc.connect()
+      payloadHostnameRollback = rr.resolve_and_generate_message_from_template_prefix("junos-rollback-RPC")
+      nc.invoke_rpc(payloadHostnameRollback)
+      nc.commit()
+      nc.disconnect()
+
+    except JavaException, err:
+      log.error("Java Exception in the script {}", err)
+    except Exception, err:
+      log.error("Python Exception in the script {}", err)
+
+  def recover(self, runtime_exception, execution_request):
+    print self.addError(runtime_exception.getMessage())
+    return None
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/__init__.py b/components/model-catalog/blueprint-model/test-blueprint/golden/Scripts/python/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/TOSCA-Metadata/TOSCA.meta b/components/model-catalog/blueprint-model/test-blueprint/golden/TOSCA-Metadata/TOSCA.meta
new file mode 100644 (file)
index 0000000..065eda1
--- /dev/null
@@ -0,0 +1,6 @@
+TOSCA-Meta-File-Version: 1.0.0
+CSAR-Version: 1.0
+Created-By: Alexis de Talhouët
+Entry-Definitions: Definitions/activation-blueprint.json
+Template-Tags: test
+Content-Type: application/vnd.oasis.bpmn
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/hostname-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/hostname-mapping.json
new file mode 100644 (file)
index 0000000..1e02d69
--- /dev/null
@@ -0,0 +1,13 @@
+[
+  {
+    "name": "hostname",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "hostname",
+    "dictionary-source": "input",
+    "dependencies": [
+    ]
+  }
+]
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/hostname-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/hostname-template.vtl
new file mode 100644 (file)
index 0000000..1e80b6d
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns:junos="http://xml.juniper.net/junos/17.4R1/junos">
+   <system xmlns="http://yang.juniper.net/junos-qfx/conf/system">
+      <host-name operation="delete" />
+      <host-name operation="create">$hostname</host-name>
+   </system>
+</configuration>
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/junos-rollback-RPC-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/junos-rollback-RPC-mapping.json
new file mode 100644 (file)
index 0000000..0637a08
--- /dev/null
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/junos-rollback-RPC-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/junos-rollback-RPC-template.vtl
new file mode 100644 (file)
index 0000000..655a2b1
--- /dev/null
@@ -0,0 +1,3 @@
+<rpc>
+    <load-configuration rollback="1"/>
+</rpc>
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vf-module-1-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vf-module-1-mapping.json
new file mode 100644 (file)
index 0000000..b7335b5
--- /dev/null
@@ -0,0 +1,64 @@
+[
+  {
+    "name": "interface-description",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "interface-description",
+    "dictionary-source": "capability",
+    "dependencies": [
+      "vf-module-type"
+    ]
+  },
+  {
+    "name": "vf-module-type",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "vf-module-type",
+    "dictionary-source": "processor-db",
+    "dependencies": [
+      "vf-module-number"
+    ]
+  },
+  {
+    "name": "vf-module-number",
+    "input-param": true,
+    "property": {
+      "type": "string",
+      "default": "3"
+    },
+    "dictionary-name": "vf-module-number",
+    "dictionary-source": "default",
+    "dependencies": [
+      
+    ]
+  },
+  {
+    "name": "prefix-id",
+    "input-param": true,
+    "property": {
+      "type": "integer",
+      "default": 11
+    },
+    "dictionary-name": "prefix-id",
+    "dictionary-source": "default",
+    "dependencies": [
+      
+    ]
+  },
+  {
+    "name": "vfw_interface_ip",
+    "input-param": true,
+    "property": {
+        "type": "dt-netbox-ip"
+    },
+    "dictionary-name": "create_netbox_ip",
+    "dictionary-source": "primary-config-data",
+    "dependencies": [
+      "prefix-id"
+    ]
+  }
+]
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vf-module-1-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vf-module-1-template.vtl
new file mode 100644 (file)
index 0000000..9ba34a0
--- /dev/null
@@ -0,0 +1,4 @@
+<interface>
+    <description>$interface-description</description>
+    <vfw>$vfw_interface_ip.address</vfw>
+</interface>
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vfw-interface-mapping.json b/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vfw-interface-mapping.json
new file mode 100644 (file)
index 0000000..c1ebe56
--- /dev/null
@@ -0,0 +1,88 @@
+[
+  {
+    "name": "interface-description",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "interface-description",
+    "dictionary-source": "capability",
+    "dependencies": [
+      "vf-module-type"
+    ]
+  },
+  {
+    "name": "interface-name",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "interface-name",
+    "dictionary-source": "input",
+    "dependencies": [
+      
+    ]
+  },
+  {
+    "name": "unit-number",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "unit-number",
+    "dictionary-source": "input",
+    "dependencies": [
+      
+    ]
+  },
+  {
+    "name": "prefix-id",
+    "input-param": true,
+    "property": {
+      "type": "string",
+      "default": "11"
+    },
+    "dictionary-name": "prefix-id",
+    "dictionary-source": "default",
+    "dependencies": [
+      
+    ]
+  },
+  {
+    "name": "vf-module-type",
+    "input-param": true,
+    "property": {
+      "type": "string"
+    },
+    "dictionary-name": "vf-module-type",
+    "dictionary-source": "processor-db",
+    "dependencies": [
+      "vf-module-number"
+    ]
+  },
+  {
+    "name": "vf-module-number",
+    "input-param": true,
+    "property": {
+      "type": "string",
+      "default": "3"
+    },
+    "dictionary-name": "vf-module-number",
+    "dictionary-source": "default",
+    "dependencies": [
+      
+    ]
+  },
+  {
+    "name": "vfw_interface_ip",
+    "input-param": true,
+    "property": {
+        "type": "dt-netbox-ip"
+    },
+    "dictionary-name": "create_netbox_ip",
+    "dictionary-source": "primary-config-data",
+    "dependencies": [
+      "prefix-id"
+    ]
+  }
+]
\ No newline at end of file
diff --git a/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vfw-interface-template.vtl b/components/model-catalog/blueprint-model/test-blueprint/golden/Templates/vfw-interface-template.vtl
new file mode 100644 (file)
index 0000000..3223535
--- /dev/null
@@ -0,0 +1,18 @@
+<configuration>
+        <interfaces>
+            <interface>
+                <name>$interface-name</name>
+                <unit operation="create">
+                    <name>$unit-number</name>
+                    <description>$interface-description</description>
+                    <family>
+                        <inet>
+                            <address>
+                                <name>$vfw_interface_ip.address</name>
+                            </address>
+                        </inet>
+                    </family>
+                </unit>
+            </interface>
+        </interfaces>
+</configuration>
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/artifact_type/artifact-bpmn-camunda.json b/components/model-catalog/definition-type/starter-type/artifact_type/artifact-bpmn-camunda.json
new file mode 100644 (file)
index 0000000..ac76b4f
--- /dev/null
@@ -0,0 +1,8 @@
+{\r
+  "description": " Camunda BPM File",\r
+  "version": "1.0.0",\r
+  "file_ext": [\r
+    "bpmn"\r
+  ],\r
+  "derived_from": "tosca.artifacts.Implementation"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/artifact_type/artifact-dictionary-resource.json b/components/model-catalog/definition-type/starter-type/artifact_type/artifact-dictionary-resource.json
new file mode 100644 (file)
index 0000000..ccc1598
--- /dev/null
@@ -0,0 +1,8 @@
+{\r
+  "description": "Resource Dictionary File used along with Configuration template",\r
+  "version": "1.0.0",\r
+  "file_ext": [\r
+    "json"\r
+  ],\r
+  "derived_from": "tosca.artifacts.Implementation"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/artifact_type/artifact-directed-graph.json b/components/model-catalog/definition-type/starter-type/artifact_type/artifact-directed-graph.json
new file mode 100644 (file)
index 0000000..7ab3a54
--- /dev/null
@@ -0,0 +1,9 @@
+{\r
+  "description": "Directed Graph File",\r
+  "version": "1.0.0",\r
+  "file_ext": [\r
+    "json",\r
+    "xml"\r
+  ],\r
+  "derived_from": "tosca.artifacts.Implementation"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/artifact_type/artifact-mapping-resource.json b/components/model-catalog/definition-type/starter-type/artifact_type/artifact-mapping-resource.json
new file mode 100644 (file)
index 0000000..ea3aa23
--- /dev/null
@@ -0,0 +1,8 @@
+{\r
+  "description": "Resource Mapping File used along with Configuration template",\r
+  "version": "1.0.0",\r
+  "file_ext": [\r
+    "json"\r
+  ],\r
+  "derived_from": "tosca.artifacts.Implementation"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/artifact_type/artifact-script-jython.json b/components/model-catalog/definition-type/starter-type/artifact_type/artifact-script-jython.json
new file mode 100644 (file)
index 0000000..969662a
--- /dev/null
@@ -0,0 +1,8 @@
+{\r
+  "description": "Jython Script File",\r
+  "version": "1.0.0",\r
+  "file_ext": [\r
+    "py"\r
+  ],\r
+  "derived_from": "tosca.artifacts.Implementation"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/artifact_type/artifact-script-kotlin.json b/components/model-catalog/definition-type/starter-type/artifact_type/artifact-script-kotlin.json
new file mode 100644 (file)
index 0000000..cf19ac6
--- /dev/null
@@ -0,0 +1,8 @@
+{
+  "description": "Kotlin Script file",
+  "version": "1.0.0",
+  "file_ext": [
+    "kts"
+  ],
+  "derived_from": "tosca.artifacts.Implementation"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/artifact_type/artifact-script-python.json b/components/model-catalog/definition-type/starter-type/artifact_type/artifact-script-python.json
new file mode 100644 (file)
index 0000000..b42f715
--- /dev/null
@@ -0,0 +1,8 @@
+{\r
+  "description": "Python Script file",\r
+  "version": "1.0.0",\r
+  "file_ext": [\r
+    "py"\r
+  ],\r
+  "derived_from": "tosca.artifacts.Implementation"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/artifact_type/artifact-template-velocity.json b/components/model-catalog/definition-type/starter-type/artifact_type/artifact-template-velocity.json
new file mode 100644 (file)
index 0000000..9395d39
--- /dev/null
@@ -0,0 +1,8 @@
+{\r
+  "description": " Velocity Template used for Configuration",\r
+  "version": "1.0.0",\r
+  "file_ext": [\r
+    "vtl"\r
+  ],\r
+  "derived_from": "tosca.artifacts.Implementation"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/artifact_type/tosca.artifacts.Implementation.json b/components/model-catalog/definition-type/starter-type/artifact_type/tosca.artifacts.Implementation.json
new file mode 100644 (file)
index 0000000..5a7c956
--- /dev/null
@@ -0,0 +1,5 @@
+{\r
+  "description": "TOSCA base type for implementation artifacts",\r
+  "version": "1.0.0",\r
+  "derived_from": "tosca.artifacts.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/data_type/datatype-property.json b/components/model-catalog/definition-type/starter-type/data_type/datatype-property.json
new file mode 100644 (file)
index 0000000..5584b10
--- /dev/null
@@ -0,0 +1,27 @@
+{\r
+       "version": "1.0.0",\r
+       "description": "This is Entry point Input Data Type, which is dynamic datatype, The parameter names will be populated during the Design time for each inputs",\r
+       "properties": {\r
+               "type": {\r
+                       "required": true,\r
+                       "type": "string"\r
+               },\r
+               "description": {\r
+                       "required": false,\r
+                       "type": "string"\r
+               },\r
+               "required": {\r
+                       "required": false,\r
+                       "type": "boolean"\r
+               },\r
+               "default": {\r
+                       "required": false,\r
+                       "type": "string"\r
+               },\r
+               "entry_schema": {\r
+                       "required": false,\r
+                       "type": "string"\r
+               }\r
+       },\r
+       "derived_from": "tosca.datatypes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/data_type/datatype-resource-assignment.json b/components/model-catalog/definition-type/starter-type/data_type/datatype-resource-assignment.json
new file mode 100644 (file)
index 0000000..cc9816e
--- /dev/null
@@ -0,0 +1,46 @@
+{\r
+       "version": "1.0.0",\r
+       "description": "This is Resource Assignment Data Type",\r
+       "properties": {\r
+               "property": {\r
+                       "required": true,\r
+                       "type": "datatype-property"\r
+               },\r
+               "input-param": {\r
+                       "required": true,\r
+                       "type": "boolean"\r
+               },\r
+               "dictionary-name": {\r
+                       "required": false,\r
+                       "type": "string"\r
+               },\r
+               "dictionary-source": {\r
+                       "required": false,\r
+                       "type": "string"\r
+               },\r
+               "dependencies": {\r
+                       "required": true,\r
+                       "type": "list",\r
+                       "entry_schema": {\r
+                               "type": "string"\r
+                       }\r
+               },\r
+               "status": {\r
+                       "required": false,\r
+                       "type": "string"\r
+               },\r
+               "message": {\r
+                       "required": false,\r
+                       "type": "string"\r
+               },\r
+               "updated-date": {\r
+                       "required": false,\r
+                       "type": "string"\r
+               },\r
+               "updated-by": {\r
+                       "required": false,\r
+                       "type": "string"\r
+               }\r
+       },\r
+       "derived_from": "tosca.datatypes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/data_type/dt-license-key.json b/components/model-catalog/definition-type/starter-type/data_type/dt-license-key.json
new file mode 100644 (file)
index 0000000..e9c312b
--- /dev/null
@@ -0,0 +1,11 @@
+{\r
+       "version": "1.0.0",\r
+       "description": "This is dt-plicense-key Data Type",\r
+       "properties": {\r
+               "license-key": {\r
+                       "required": true,\r
+                       "type": "string"\r
+               }\r
+       },\r
+       "derived_from": "tosca.datatypes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/data_type/dt-netbox-ip.json b/components/model-catalog/definition-type/starter-type/data_type/dt-netbox-ip.json
new file mode 100644 (file)
index 0000000..81c908d
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "version": "1.0.0",
+  "description": "This is Netbox IP Data Type",
+  "properties": {
+    "address": {
+      "required": true,
+      "type": "string"
+    },
+    "id": {
+      "required": true,
+      "type": "integer"
+    }
+  },
+  "derived_from": "tosca.datatypes.Root"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/data_type/dt-v4-aggregate.json b/components/model-catalog/definition-type/starter-type/data_type/dt-v4-aggregate.json
new file mode 100644 (file)
index 0000000..842a7f8
--- /dev/null
@@ -0,0 +1,15 @@
+{\r
+       "version": "1.0.0",\r
+       "description": "This is dt-v4-aggregate Data Type",\r
+       "properties": {\r
+               "ipv4-address": {\r
+                       "required": true,\r
+                       "type": "string"\r
+               },\r
+               "ipv4-plen": {\r
+                       "required": false,\r
+                       "type": "integer"\r
+               }\r
+       },\r
+       "derived_from": "tosca.datatypes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/data_type/tosca.datatypes.Credential.json b/components/model-catalog/definition-type/starter-type/data_type/tosca.datatypes.Credential.json
new file mode 100644 (file)
index 0000000..820a551
--- /dev/null
@@ -0,0 +1,31 @@
+{\r
+  "version": "1.0.0",\r
+  "description": "Credential",\r
+  "properties": {\r
+    "protocol": {\r
+      "required": false,\r
+      "type": "string"\r
+    },\r
+    "token_type": {\r
+      "required": true,\r
+      "type": "string",\r
+      "default" : "password"\r
+    },\r
+    "token": {\r
+      "required": false,\r
+      "type": "string"\r
+    },\r
+    "keys": {\r
+      "required": false,\r
+      "type": "list",\r
+      "entry_schema": {\r
+        "type": "string"\r
+      }\r
+    },\r
+    "user": {\r
+      "required": false,\r
+      "type": "string"\r
+    }\r
+  },\r
+  "derived_from": "tosca.datatypes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/artifact-config-template.json b/components/model-catalog/definition-type/starter-type/node_type/artifact-config-template.json
new file mode 100644 (file)
index 0000000..af99d75
--- /dev/null
@@ -0,0 +1,37 @@
+{\r
+       "description": "This is Configuration Velocity Template",\r
+       "version": "1.0.0",\r
+       "properties": {\r
+               "action-names": {\r
+                       "required": true,\r
+                       "type": "list",\r
+                       "entry_schema": {\r
+                               "type": "string"\r
+                       }\r
+               }\r
+       },\r
+       "capabilities": {\r
+               "content": {\r
+                       "type": "tosca.capabilities.Content",\r
+                       "properties": {\r
+                               "content": {\r
+                                       "required": true,\r
+                                       "type": "string"\r
+                               }\r
+                       }\r
+               },\r
+               "mapping": {\r
+                       "type": "tosca.capabilities.Mapping",\r
+                       "properties": {\r
+                               "mapping": {\r
+                                       "required": false,\r
+                                       "type": "list",\r
+                                       "entry_schema": {\r
+                                               "type": "datatype-resource-assignment"\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       },\r
+       "derived_from": "tosca.nodes.Artifact"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-config-generator.json b/components/model-catalog/definition-type/starter-type/node_type/component-config-generator.json
new file mode 100644 (file)
index 0000000..ba14260
--- /dev/null
@@ -0,0 +1,72 @@
+{\r
+       "description": "This is Generate Configuration Component API",\r
+       "version": "1.0.0",\r
+       "capabilities": {\r
+               "component-node": {\r
+                       "type": "tosca.capabilities.Node"\r
+               }\r
+       },\r
+       "interfaces": {\r
+               "ConfigGeneratorComponent": {\r
+                       "operations": {\r
+                               "process": {\r
+                                       "inputs": {\r
+                                               "template-data": {\r
+                                                       "description": "Conditional : JSON string which is used to mash with template. Either template-data or ( resource-id and resource-type ) should be present",\r
+                                                       "required": false,\r
+                                                       "type": "string"\r
+                                               },\r
+                                               "template-content": {\r
+                                                       "description": "Conditional : Dynamic Template used to generate Configuration.",\r
+                                                       "required": false,\r
+                                                       "type": "string"\r
+                                               },\r
+                                               "resource-type": {\r
+                                                       "description": "Conditional : resource-type used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",\r
+                                                       "required": false,\r
+                                                       "type": "string"\r
+                                               },\r
+                                               "request-id": {\r
+                                                       "description": "Request Id used to store the generated configuration, in the database along with the template-name",\r
+                                                       "required": true,\r
+                                                       "type": "string"\r
+                                               },\r
+                                               "resource-id": {\r
+                                                       "description": "Conditional : Id used to pull the data content from the data base. Either template-data or ( resource-id and resource-type ) should be present",\r
+                                                       "required": false,\r
+                                                       "type": "string"\r
+                                               },\r
+                                               "action-name": {\r
+                                                       "description": "Conditional : Action Name to get from Database, Either (message & mask-info ) or ( resource-id & resource-type & action-name & template-name ) should be present. Message will be given higest priority",\r
+                                                       "required": false,\r
+                                                       "type": "string"\r
+                                               },\r
+                                               "template-name": {\r
+                                                       "description": "Conditional : Name of the Artifact Node Template, to get the template Content. If template-content is present, then content wont be reterived from the Artifact Node Template.",\r
+                                                       "required": true,\r
+                                                       "type": "string"\r
+                                               }\r
+                                       },\r
+                                       "outputs": {\r
+                                               "generated-config": {\r
+                                                       "description": "Generated Configuration for the Template adn Resource Data",\r
+                                                       "required": true,\r
+                                                       "type": "string"\r
+                                               },\r
+                                               "mask-info": {\r
+                                                       "description": "If template contains mask encription keys, then this mask-info field will be generated, This JSON Content alligns to the bean org.onap.ccsdk.apps.controllerblueprints.core.data.custom.MaskInfo ",\r
+                                                       "required": false,\r
+                                                       "type": "string"\r
+                                               },\r
+                                               "status": {\r
+                                                       "description": "Status of the Component Execution ( success or failure )",\r
+                                                       "required": true,\r
+                                                       "type": "string"\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       },\r
+       "derived_from": "tosca.nodes.Component"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-jython-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-jython-executor.json
new file mode 100644 (file)
index 0000000..5a024a7
--- /dev/null
@@ -0,0 +1,45 @@
+{
+  "description": "This is Jython Execution Component.",
+  "version": "1.0.0",
+  "capabilities": {
+    "component-node": {
+      "type": "tosca.capabilities.Node"
+    }
+  },
+  "interfaces": {
+    "ComponentJythonExecutor": {
+      "operations": {
+        "process": {
+          "inputs": {
+            "instance-dependencies": {
+              "required": true,
+              "description": "Instance Names to Inject to Jython Script.",
+              "type": "list",
+              "entry_schema": {
+                "type": "string"
+              }
+            },
+            "dynamic-properties": {
+              "description": "Dynamic Json Content or DSL Json reference.",
+              "required": false,
+              "type": "json"
+            }
+          },
+          "outputs": {
+            "response-data": {
+              "description": "Execution Response Data in JSON format.",
+              "required": false,
+              "type": "string"
+            },
+            "status": {
+              "description": "Status of the Component Execution ( success or failure )",
+              "required": true,
+              "type": "string"
+            }
+          }
+        }
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.component.Jython"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-netconf-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-netconf-executor.json
new file mode 100644 (file)
index 0000000..3233d21
--- /dev/null
@@ -0,0 +1,72 @@
+{\r
+  "description": "This is Netconf Transaction Configuration Component API",\r
+  "version": "1.0.0",\r
+  "capabilities": {\r
+    "component-node": {\r
+      "type": "tosca.capabilities.Node"\r
+    }\r
+  },\r
+  "requirements": {\r
+    "netconf-connection": {\r
+      "capability": "netconf",\r
+      "node": "vnf-netconf-device",\r
+      "relationship": "tosca.relationships.ConnectsTo"\r
+    }\r
+  },\r
+  "interfaces": {\r
+    "ComponentNetconfExecutor": {\r
+      "operations": {\r
+        "process": {\r
+          "inputs": {\r
+            "script-type": {\r
+              "description": "Script type, kotlin type is supported",\r
+              "required": true,\r
+              "type": "string",\r
+              "default": "internal",\r
+              "constraints": [\r
+                {\r
+                  "valid_values": [\r
+                    "kotlin",\r
+                    "jython",\r
+                    "internal"\r
+                  ]\r
+                }\r
+              ]\r
+            },\r
+            "script-class-reference": {\r
+              "description": "Kotlin Script class name or jython script name.",\r
+              "required": true,\r
+              "type": "string"\r
+            },\r
+            "instance-dependencies": {\r
+              "required": true,\r
+              "description": "Instance names to inject to Jython or Kotlin Script.",\r
+              "type": "list",\r
+              "entry_schema": {\r
+                "type": "string"\r
+              }\r
+            },\r
+            "dynamic-properties": {\r
+              "description": "Dynamic Json Content or DSL Json reference.",\r
+              "required": false,\r
+              "type": "json"\r
+            }\r
+          },\r
+          "outputs": {\r
+            "response-data": {\r
+              "description": "Execution Response Data in JSON format.",\r
+              "required": false,\r
+              "type": "string"\r
+            },\r
+            "status": {\r
+              "description": "Status of the Component Execution ( success or failure )",\r
+              "required": true,\r
+              "type": "string"\r
+            }\r
+          }\r
+        }\r
+      }\r
+    }\r
+  },\r
+  "derived_from": "tosca.nodes.Component"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-resource-resolution.json b/components/model-catalog/definition-type/starter-type/node_type/component-resource-resolution.json
new file mode 100644 (file)
index 0000000..f437a79
--- /dev/null
@@ -0,0 +1,79 @@
+{
+  "description": "This is Resource Assignment Component API",
+  "version": "1.0.0",
+  "attributes": {
+    "assignment-params": {
+      "required": true,
+      "type": "string"
+    }
+  },
+  "capabilities": {
+    "component-node": {
+      "type": "tosca.capabilities.Node"
+    }
+  },
+  "interfaces": {
+    "ResourceResolutionComponent": {
+      "operations": {
+        "process": {
+          "inputs": {
+            "resolution-key": {
+              "description": "Key for service instance related correlation.",
+              "required": false,
+              "type": "string"
+            },
+            "store-result": {
+              "description": "Whether or not to store the output.",
+              "required": false,
+              "type": "boolean"
+            },
+            "resource-type": {
+              "description": "Request type.",
+              "required": false,
+              "type": "string"
+            },
+            "artifact-prefix-names": {
+              "required": true,
+              "description": "Template , Resource Assignment Artifact Prefix names",
+              "type": "list",
+              "entry_schema": {
+                "type": "string"
+              }
+            },
+            "request-id": {
+              "description": "Request Id, Unique Id for the request.",
+              "required": true,
+              "type": "string"
+            },
+            "resource-id": {
+              "description": "Resource Id.",
+              "required": false,
+              "type": "string"
+            },
+            "action-name": {
+              "description": "Action Name of the process",
+              "required": false,
+              "type": "string"
+            },
+            "dynamic-properties": {
+              "description": "Dynamic Json Content or DSL Json reference.",
+              "required": false,
+              "type": "json"
+            }
+          },
+          "outputs": {
+            "resource-assignment-params": {
+              "required": true,
+              "type": "string"
+            },
+            "status": {
+              "required": true,
+              "type": "string"
+            }
+          }
+        }
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.Component"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-restconf-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-restconf-executor.json
new file mode 100644 (file)
index 0000000..cb28a4a
--- /dev/null
@@ -0,0 +1,65 @@
+{
+  "description": "This is Restconf Transaction Configuration Component API",
+  "version": "1.0.0",
+  "capabilities": {
+    "component-node": {
+      "type": "tosca.capabilities.Node"
+    }
+  },
+  "interfaces": {
+    "ComponentRestconfExecutor": {
+      "operations": {
+        "process": {
+          "inputs": {
+            "script-type": {
+              "description": "Script type, kotlin type is supported",
+              "required": true,
+              "type": "string",
+              "default": "internal",
+              "constraints": [
+                {
+                  "valid_values": [
+                    "kotlin",
+                    "jython",
+                    "internal"
+                  ]
+                }
+              ]
+            },
+            "script-class-reference": {
+              "description": "Kotlin Script class name or jython script name.",
+              "required": true,
+              "type": "string"
+            },
+            "instance-dependencies": {
+              "required": true,
+              "description": "Instance names to inject to Jython or Kotlin Script.",
+              "type": "list",
+              "entry_schema": {
+                "type": "string"
+              }
+            },
+            "dynamic-properties": {
+              "description": "Dynamic Json Content or DSL Json reference.",
+              "required": false,
+              "type": "json"
+            }
+          },
+          "outputs": {
+            "response-data": {
+              "description": "Execution Response Data in JSON format.",
+              "required": false,
+              "type": "string"
+            },
+            "status": {
+              "description": "Status of the Component Execution ( success or failure )",
+              "required": true,
+              "type": "string"
+            }
+          }
+        }
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.Component"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json b/components/model-catalog/definition-type/starter-type/node_type/component-sample-executor.json
new file mode 100644 (file)
index 0000000..68b3ebd
--- /dev/null
@@ -0,0 +1,45 @@
+{
+  "description": "This is Sample Component API",
+  "version": "1.0.0",
+  "interfaces": {
+    "ComponentSampleExecutor": {
+      "operations": {
+        "process": {
+          "inputs": {
+            "sample-property": {
+              "description": "Sample Property.",
+              "required": true,
+              "type": "string"
+            },
+            "sample-list-property": {
+              "required": true,
+              "description": "Dependent Step Components NodeTemplate name.",
+              "type": "list",
+              "entry_schema": {
+                "type": "string"
+              }
+            },
+            "dynamic-properties": {
+              "description": "Dynamic Json Content or DSL Json reference.",
+              "required": false,
+              "type": "json"
+            }
+          },
+          "outputs": {
+            "response-data": {
+              "description": "Execution Response Data in JSON format.",
+              "required": false,
+              "type": "string"
+            },
+            "status": {
+              "description": "Status of the Component Execution ( success or failure )",
+              "required": true,
+              "type": "string"
+            }
+          }
+        }
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.Component"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/dg-generic.json b/components/model-catalog/definition-type/starter-type/node_type/dg-generic.json
new file mode 100644 (file)
index 0000000..ec9904b
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "description": "This is Generic Directed Graph Type",
+  "version": "1.0.0",
+  "properties": {
+    "content": {
+      "required": true,
+      "type": "string"
+    },
+    "dependency-node-templates": {
+      "required": true,
+      "description": "Dependent Step Components NodeTemplate name.",
+      "type": "list",
+      "entry_schema": {
+        "type": "string"
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.DG"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-capability.json b/components/model-catalog/definition-type/starter-type/node_type/source-capability.json
new file mode 100644 (file)
index 0000000..e0c4406
--- /dev/null
@@ -0,0 +1,42 @@
+{
+  "description": "This is Component Resource Source Node Type",
+  "version": "1.0.0",
+  "properties": {
+    "script-type": {
+      "required": true,
+      "type": "string",
+      "default": "kotlin",
+      "constraints": [
+        {
+          "valid_values": [
+            "kotlin",
+            "internal",
+            "jython"
+          ]
+        }
+      ]
+    },
+    "script-class-reference": {
+      "description": "Capability reference name for internal and kotlin, for jython script file path",
+      "required": true,
+      "type": "string"
+    },
+    "instance-dependencies": {
+      "required": false,
+      "description": "Instance dependency Names to Inject to Kotlin / Jython Script.",
+      "type": "list",
+      "entry_schema": {
+        "type": "string"
+      }
+    },
+    "key-dependencies": {
+      "description": "Resource Resolution dependency dictionary names.",
+      "required": true,
+      "type": "list",
+      "entry_schema": {
+        "type": "string"
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.ResourceSource"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-default.json b/components/model-catalog/definition-type/starter-type/node_type/source-default.json
new file mode 100644 (file)
index 0000000..13e234e
--- /dev/null
@@ -0,0 +1,18 @@
+{
+  "description": "This is Default Resource Source Node Type",
+  "version": "1.0.0",
+  "properties": {
+    "key": {
+      "required": false,
+      "type": "string"
+    },
+    "key-dependencies": {
+      "required": true,
+      "type": "list",
+      "entry_schema": {
+        "type": "string"
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.ResourceSource"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-input.json b/components/model-catalog/definition-type/starter-type/node_type/source-input.json
new file mode 100644 (file)
index 0000000..126ea30
--- /dev/null
@@ -0,0 +1,18 @@
+{
+  "description": "This is Input Resource Source Node Type",
+  "version": "1.0.0",
+  "properties": {
+    "key": {
+      "required": false,
+      "type": "string"
+    },
+    "key-dependencies": {
+      "required": true,
+      "type": "list",
+      "entry_schema": {
+        "type": "string"
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.ResourceSource"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json b/components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json
new file mode 100644 (file)
index 0000000..702748f
--- /dev/null
@@ -0,0 +1,48 @@
+{
+  "description": "This is Database Resource Source Node Type",
+  "version": "1.0.0",
+  "properties": {
+    "type": {
+      "required": true,
+      "type": "string",
+      "constraints": [
+        {
+          "valid_values": [
+            "SQL",
+            "PLSQL"
+          ]
+        }
+      ]
+    },
+    "endpoint-selector": {
+      "required": false,
+      "type": "string"
+    },
+    "query": {
+      "required": true,
+      "type": "string"
+    },
+    "input-key-mapping": {
+      "required": false,
+      "type": "map",
+      "entry_schema": {
+        "type": "string"
+      }
+    },
+    "output-key-mapping": {
+      "required": false,
+      "type": "map",
+      "entry_schema": {
+        "type": "string"
+      }
+    },
+    "key-dependencies": {
+      "required": true,
+      "type": "list",
+      "entry_schema": {
+        "type": "string"
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.ResourceSource"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json b/components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json
new file mode 100644 (file)
index 0000000..702748f
--- /dev/null
@@ -0,0 +1,48 @@
+{
+  "description": "This is Database Resource Source Node Type",
+  "version": "1.0.0",
+  "properties": {
+    "type": {
+      "required": true,
+      "type": "string",
+      "constraints": [
+        {
+          "valid_values": [
+            "SQL",
+            "PLSQL"
+          ]
+        }
+      ]
+    },
+    "endpoint-selector": {
+      "required": false,
+      "type": "string"
+    },
+    "query": {
+      "required": true,
+      "type": "string"
+    },
+    "input-key-mapping": {
+      "required": false,
+      "type": "map",
+      "entry_schema": {
+        "type": "string"
+      }
+    },
+    "output-key-mapping": {
+      "required": false,
+      "type": "map",
+      "entry_schema": {
+        "type": "string"
+      }
+    },
+    "key-dependencies": {
+      "required": true,
+      "type": "list",
+      "entry_schema": {
+        "type": "string"
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.ResourceSource"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-rest.json b/components/model-catalog/definition-type/starter-type/node_type/source-rest.json
new file mode 100644 (file)
index 0000000..b28e934
--- /dev/null
@@ -0,0 +1,82 @@
+{
+  "description": "This is Rest Resource Source Node Type",
+  "version": "1.0.0",
+  "properties": {
+    "type": {
+      "required": false,
+      "type": "string",
+      "default": "JSON",
+      "constraints": [
+        {
+          "valid_values": [
+            "JSON"
+          ]
+        }
+      ]
+    },
+    "verb": {
+      "required": false,
+      "type": "string",
+      "default": "GET",
+      "constraints": [
+        {
+          "valid_values": [
+            "GET", "POST", "DELETE", "PUT"
+          ]
+        }
+      ]
+    },
+    "payload": {
+      "required": false,
+      "type": "string",
+      "default": ""
+    },
+    "endpoint-selector": {
+      "required": false,
+      "type": "string"
+    },
+    "url-path": {
+      "required": true,
+      "type": "string"
+    },
+    "path": {
+      "required": true,
+      "type": "string"
+    },
+    "expression-type": {
+      "required": false,
+      "type": "string",
+      "default": "JSON_PATH",
+      "constraints": [
+        {
+          "valid_values": [
+            "JSON_PATH",
+            "JSON_POINTER"
+          ]
+        }
+      ]
+    },
+    "input-key-mapping": {
+      "required": false,
+      "type": "map",
+      "entry_schema": {
+        "type": "string"
+      }
+    },
+    "output-key-mapping": {
+      "required": false,
+      "type": "map",
+      "entry_schema": {
+        "type": "string"
+      }
+    },
+    "key-dependencies": {
+      "required": true,
+      "type": "list",
+      "entry_schema": {
+        "type": "string"
+      }
+    }
+  },
+  "derived_from": "tosca.nodes.ResourceSource"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Artifact.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Artifact.json
new file mode 100644 (file)
index 0000000..8141052
--- /dev/null
@@ -0,0 +1,5 @@
+{\r
+  "description": "This is Deprecated Artifact Node Type.",\r
+  "version": "1.0.0",\r
+  "derived_from": "tosca.nodes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Component.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Component.json
new file mode 100644 (file)
index 0000000..bc4827b
--- /dev/null
@@ -0,0 +1,5 @@
+{\r
+  "description": "This is default Component Node",\r
+  "version": "1.0.0",\r
+  "derived_from": "tosca.nodes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.DG.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.DG.json
new file mode 100644 (file)
index 0000000..86728cf
--- /dev/null
@@ -0,0 +1,5 @@
+{\r
+  "description": "This is Directed Graph Node Type",\r
+  "version": "1.0.0",\r
+  "derived_from": "tosca.nodes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.ResourceSource.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.ResourceSource.json
new file mode 100644 (file)
index 0000000..2ef553e
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "description": "TOSCA base type for Resource Sources",
+  "version": "1.0.0",
+  "derived_from": "tosca.nodes.Root"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Vnf.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.Vnf.json
new file mode 100644 (file)
index 0000000..acb1f2f
--- /dev/null
@@ -0,0 +1,5 @@
+{\r
+  "description": "This is VNF Node Type",\r
+  "version": "1.0.0",\r
+  "derived_from": "tosca.nodes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Jython.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Jython.json
new file mode 100644 (file)
index 0000000..8e194f6
--- /dev/null
@@ -0,0 +1,5 @@
+{\r
+  "description": "This is Jython Component",\r
+  "version": "1.0.0",\r
+  "derived_from": "tosca.nodes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Kotlin.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Kotlin.json
new file mode 100644 (file)
index 0000000..381ed59
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "description": "This is Kotlin Component",
+  "version": "1.0.0",
+  "derived_from": "tosca.nodes.Root"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Python.json b/components/model-catalog/definition-type/starter-type/node_type/tosca.nodes.component.Python.json
new file mode 100644 (file)
index 0000000..7b67c8c
--- /dev/null
@@ -0,0 +1,5 @@
+{\r
+  "description": "This is Python Component",\r
+  "version": "1.0.0",\r
+  "derived_from": "tosca.nodes.Root"\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/node_type/vnf-netconf-device.json b/components/model-catalog/definition-type/starter-type/node_type/vnf-netconf-device.json
new file mode 100644 (file)
index 0000000..dcc47b3
--- /dev/null
@@ -0,0 +1,41 @@
+{\r
+       "description": "This is VNF Device with Netconf  Capability",\r
+       "version": "1.0.0",\r
+       "capabilities": {\r
+               "netconf": {\r
+                       "type": "tosca.capabilities.Netconf",\r
+                       "properties": {\r
+                               "login-key": {\r
+                                       "required": true,\r
+                                       "type": "string",\r
+                                       "default": "sdnc"\r
+                               },\r
+                               "login-account": {\r
+                                       "required": true,\r
+                                       "type": "string",\r
+                                       "default": "sdnc-tacacs"\r
+                               },\r
+                               "source": {\r
+                                       "required": false,\r
+                                       "type": "string",\r
+                                       "default": "npm"\r
+                               },\r
+                               "target-ip-address": {\r
+                                       "required": true,\r
+                                       "type": "string"\r
+                               },\r
+                               "port-number": {\r
+                                       "required": true,\r
+                                       "type": "integer",\r
+                                       "default": 830\r
+                               },\r
+                               "connection-time-out": {\r
+                                       "required": false,\r
+                                       "type": "integer",\r
+                                       "default": 30\r
+                               }\r
+                       }\r
+               }\r
+       },\r
+       "derived_from": "tosca.nodes.Vnf"\r
+}\r
diff --git a/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.AttachesTo.json b/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.AttachesTo.json
new file mode 100644 (file)
index 0000000..bcfb65e
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "description": "Relationship tosca.relationships.AttachesTo",
+  "version": "1.0.0",
+  "derived_from": "tosca.relationships.Root"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.ConnectsTo.json b/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.ConnectsTo.json
new file mode 100644 (file)
index 0000000..4abb948
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "description": "Relationship tosca.relationships.ConnectsTo",
+  "version": "1.0.0",
+  "derived_from": "tosca.relationships.Root"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.DependsOn.json b/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.DependsOn.json
new file mode 100644 (file)
index 0000000..89987ff
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "description": "Relationship tosca.relationships.DependsOn",
+  "version": "1.0.0",
+  "derived_from": "tosca.relationships.Root"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.HostedOn.json b/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.HostedOn.json
new file mode 100644 (file)
index 0000000..a8337cd
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "description": "Relationship tosca.relationships.HostedOn",
+  "version": "1.0.0",
+  "derived_from": "tosca.relationships.Root"
+}
\ No newline at end of file
diff --git a/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.RoutesTo.json b/components/model-catalog/definition-type/starter-type/relationship_type/tosca.relationships.RoutesTo.json
new file mode 100644 (file)
index 0000000..1da73cd
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "description": "Relationship tosca.relationships.RoutesTo",
+  "version": "1.0.0",
+  "derived_from": "tosca.relationships.Root"
+}
\ No newline at end of file
diff --git a/components/model-catalog/proto-definition/pom.xml b/components/model-catalog/proto-definition/pom.xml
new file mode 100644 (file)
index 0000000..d124708
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (C) 2019 Bell Canada
+ * Modifications 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.
+ -->
+<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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.ccsdk.apps</groupId>
+        <artifactId>ccsdk-apps</artifactId>
+        <version>0.4.2-SNAPSHOT</version>
+        <relativePath>../../../</relativePath>
+    </parent>
+
+    <groupId>org.onap.ccsdk.apps.components</groupId>
+    <artifactId>proto-definition</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Controller Blueprints Proto Definition</name>
+    <description>Controller Blueprints Proto Definition</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-protobuf</artifactId>
+            <version>1.17.1</version>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-stub</artifactId>
+            <version>1.17.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java-util</artifactId>
+            <version>3.6.1</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <extensions>
+            <extension>
+                <groupId>kr.motd.maven</groupId>
+                <artifactId>os-maven-plugin</artifactId>
+                <version>1.6.1</version>
+            </extension>
+        </extensions>
+        <plugins>
+            <plugin>
+                <groupId>org.xolstice.maven.plugins</groupId>
+                <artifactId>protobuf-maven-plugin</artifactId>
+                <version>0.6.1</version>
+                <configuration>
+                    <protocArtifact>
+                        com.google.protobuf:protoc:3.6.1:exe:${os.detected.classifier}
+                    </protocArtifact>
+                    <pluginId>grpc-java</pluginId>
+                    <pluginArtifact>
+                        io.grpc:protoc-gen-grpc-java:1.18.0:exe:${os.detected.classifier}
+                    </pluginArtifact>
+                    <protoSourceRoot>proto</protoSourceRoot>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>compile</goal>
+                            <goal>compile-custom</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/components/model-catalog/proto-definition/proto/BluePrintCommon.proto b/components/model-catalog/proto-definition/proto/BluePrintCommon.proto
new file mode 100644 (file)
index 0000000..de92bdc
--- /dev/null
@@ -0,0 +1,38 @@
+syntax = "proto3";
+option java_multiple_files = true;
+package org.onap.ccsdk.apps.controllerblueprints.common.api;
+
+message CommonHeader {
+  string timestamp = 1;
+  string originatorId = 23;
+  string requestId = 3;
+  string subRequestId = 4;
+  Flag flag = 5;
+}
+
+message Flag {
+  bool isForce = 1;
+  int32 ttl = 2;
+}
+
+message ActionIdentifiers {
+  string blueprintName = 1;
+  string blueprintVersion = 2;
+  string actionName = 3;
+  string mode = 4;
+}
+
+message Status {
+  int32 code = 1;
+  string errorMessage = 2;
+  string message = 3;
+  EventType eventType = 4;
+  string timestamp = 5;
+}
+
+enum EventType {
+  EVENT_COMPONENT_FAILURE = 0;
+  EVENT_COMPONENT_PROCESSING = 1;
+  EVENT_COMPONENT_NOTIFICATION = 2;
+  EVENT_COMPONENT_EXECUTED = 3;
+}
\ No newline at end of file
diff --git a/components/model-catalog/proto-definition/proto/BluePrintManagement.proto b/components/model-catalog/proto-definition/proto/BluePrintManagement.proto
new file mode 100644 (file)
index 0000000..658cbbb
--- /dev/null
@@ -0,0 +1,25 @@
+syntax = "proto3";
+import "BluePrintCommon.proto";
+option java_multiple_files = true;
+package org.onap.ccsdk.apps.controllerblueprints.management.api;
+
+message BluePrintManagementInput {
+  org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader commonHeader = 1;
+  string blueprintName = 2;
+  string blueprintVersion = 3;
+  FileChunk fileChunk = 4;
+}
+
+message BluePrintManagementOutput {
+  org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader commonHeader = 1;
+  org.onap.ccsdk.apps.controllerblueprints.common.api.Status status = 3;
+}
+
+message FileChunk {
+  bytes chunk = 1;
+}
+
+service BluePrintManagementService {
+  rpc uploadBlueprint (BluePrintManagementInput) returns (BluePrintManagementOutput);
+  rpc removeBlueprint (BluePrintManagementInput) returns (BluePrintManagementOutput);
+}
diff --git a/components/model-catalog/proto-definition/proto/BluePrintProcessing.proto b/components/model-catalog/proto-definition/proto/BluePrintProcessing.proto
new file mode 100644 (file)
index 0000000..5b91f46
--- /dev/null
@@ -0,0 +1,24 @@
+syntax = "proto3";
+import "google/protobuf/struct.proto";
+import "BluePrintCommon.proto";
+option java_multiple_files = true;
+package org.onap.ccsdk.apps.controllerblueprints.processing.api;
+
+
+message ExecutionServiceInput {
+  org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader commonHeader = 1;
+  org.onap.ccsdk.apps.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 2;
+  google.protobuf.Struct payload = 3;
+}
+
+message ExecutionServiceOutput {
+  org.onap.ccsdk.apps.controllerblueprints.common.api.CommonHeader commonHeader = 1;
+  org.onap.ccsdk.apps.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 2;
+  org.onap.ccsdk.apps.controllerblueprints.common.api.Status status = 3;
+  google.protobuf.Struct payload = 4;
+}
+
+
+service BluePrintProcessingService {
+  rpc process (stream ExecutionServiceInput) returns (stream ExecutionServiceOutput);
+}
diff --git a/components/model-catalog/proto-definition/src/main/README.md b/components/model-catalog/proto-definition/src/main/README.md
new file mode 100644 (file)
index 0000000..f63edde
--- /dev/null
@@ -0,0 +1 @@
+Standard maven directory for source
diff --git a/components/model-catalog/proto-definition/src/test/README.md b/components/model-catalog/proto-definition/src/test/README.md
new file mode 100644 (file)
index 0000000..4701e06
--- /dev/null
@@ -0,0 +1 @@
+Standard maven directory for unit test cases
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/address.json b/components/model-catalog/resource-dictionary/starter-dictionary/address.json
new file mode 100755 (executable)
index 0000000..11f92d7
--- /dev/null
@@ -0,0 +1,14 @@
+{
+               "name": "address",
+               "tags": "address",
+               "updated-by" : "Singal, Kapil <ks220y@att.com>",
+               "property": {
+                       "description" : "address",
+                       "type": "string"
+               },
+               "sources": {
+                       "input": {
+                               "type": "source-input"
+                       }
+               }
+}
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/aic-cloud-region.json b/components/model-catalog/resource-dictionary/starter-dictionary/aic-cloud-region.json
new file mode 100755 (executable)
index 0000000..1501a9a
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "aic-cloud-region",
+  "tags" : "aic-cloud-region",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "aic-cloud-region",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/aic_clli.json b/components/model-catalog/resource-dictionary/starter-dictionary/aic_clli.json
new file mode 100755 (executable)
index 0000000..ccbbe9d
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "aic_clli",
+  "tags" : "aic_clli",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "aic_clli",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/availability_zone_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/availability_zone_0.json
new file mode 100755 (executable)
index 0000000..b9e07a9
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "availability_zone_0",
+  "tags" : "availability_zone_0",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "availability_zone_0",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/default-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/default-source.json
new file mode 100755 (executable)
index 0000000..42059ad
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "tags": "v4-ip-type, tosca.datatypes.Root, data_type, brindasanth@onap.com",
+  "name": "default-source",
+  "property" :{
+    "description": "name of the ",
+    "type": "string"
+  },
+  "updated-by": "brindasanth@onap.com",
+  "sources": {
+    "default": {
+      "type": "source-default",
+      "properties": {
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/entity.json b/components/model-catalog/resource-dictionary/starter-dictionary/entity.json
new file mode 100755 (executable)
index 0000000..83a32a9
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "entity",
+  "tags" : "entity",
+  "updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
+  "property" : {
+    "description" : "entity",
+    "type" : "json"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/hostname.json b/components/model-catalog/resource-dictionary/starter-dictionary/hostname.json
new file mode 100755 (executable)
index 0000000..f60751e
--- /dev/null
@@ -0,0 +1,14 @@
+{
+               "name": "hostname",
+               "tags": "hostname",
+               "updated-by" : "Singal, Kapil <ks220y@att.com>",
+               "property": {
+                       "description" : "hostname",
+                       "type": "string"
+               },
+               "sources": {
+                       "input": {
+                               "type": "source-input"
+                       }
+               }
+}
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/image_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/image_name.json
new file mode 100755 (executable)
index 0000000..57a0ef3
--- /dev/null
@@ -0,0 +1,33 @@
+{
+  "name": "image_name",
+  "tags": "image_name",
+  "updated-by": "Singal, Kapil <ks220y@att.com>",
+  "property": {
+    "type": "string",
+    "description": "image_name"
+  },
+  "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/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"
+        ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/input-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/input-source.json
new file mode 100755 (executable)
index 0000000..6c69384
--- /dev/null
@@ -0,0 +1,16 @@
+{
+       "name": "input-source",
+       "property" :{
+               "description": "name of the ",
+               "type": "string"
+       },
+       "updated-by": "brindasanth@onap.com",
+       "tags": "input-source",
+       "sources": {
+               "input": {
+                       "type": "source-input",
+                       "properties": {
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/key_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/key_name.json
new file mode 100755 (executable)
index 0000000..6eb8d92
--- /dev/null
@@ -0,0 +1,33 @@
+{
+  "name": "key_name",
+  "tags": "key_name",
+  "updated-by": "Singal, Kapil <ks220y@att.com>",
+  "property": {
+    "type": "string",
+    "description": "key_name"
+  },
+  "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/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"
+        ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/mdsal-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/mdsal-source.json
new file mode 100755 (executable)
index 0000000..ee67b92
--- /dev/null
@@ -0,0 +1,35 @@
+{
+  "tags": "oam-local-ipv4-address",
+  "name": "mdsal-source",
+  "property" :{
+    "description": "based on service-instance-id,network-role,v4-ip-type and vm-type get the ipv4-gateway-prefix from the SDN-GC mdsal",
+    "type": "string"
+  },
+  "updated-by": "brindasanth@onap.com",
+  "sources": {
+    "primary-config-data": {
+      "type": "source-rest",
+      "properties": {
+        "type": "JSON",
+        "endpoint-selector" : "",
+        "url-path": "config/L3VNF-API:services/service-list/$service-instance-id/service-data/vnf-topology-information/vnf-assignments/vnf-vms/$vm-type/vm-networks/$network-role/v4-assigned-ip-list/$v4-ip-type",
+        "path": "/v4-assigned-ip-list/0/v4-ip-prefix",
+        "input-key-mapping": {
+          "service-instance-id": "service-instance-id",
+          "network-role": "network-role",
+          "v4-ip-type": "v4-ip-type",
+          "vm-type": "vm-type"
+        },
+        "output-key-mapping": {
+          "oam-local-ipv4-address": "v4-ip-prefix"
+        },
+        "key-dependencies": [
+          "service-instance-id",
+          "network-role",
+          "v4-ip-type",
+          "vm-type"
+        ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/name_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/name_0.json
new file mode 100755 (executable)
index 0000000..433a3b7
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "name_0",
+  "tags" : "name_0",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "name_0",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..6b0a79e
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "name" : "nexus_artifact_repo",
+  "tags" : "nexus_artifact_repo",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "nexus_artifact_repo",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : {
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/nf-role.json b/components/model-catalog/resource-dictionary/starter-dictionary/nf-role.json
new file mode 100755 (executable)
index 0000000..6da5ea2
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "name" : "nf-role",
+  "tags" : "nf-role",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vnf/nf-role",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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" ]
+      }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..4e1ba2b
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "name" : "nfc-naming-code",
+  "tags" : "nfc-naming-code",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "nfc-naming-code",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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" ]
+      }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..42765ee
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "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" : {
+    "primary-db" : {
+      "type" : "source-primary-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"
+        }      
+         }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..3dd74f7
--- /dev/null
@@ -0,0 +1,33 @@
+{
+  "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
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
new file mode 100755 (executable)
index 0000000..6cb22c3
--- /dev/null
@@ -0,0 +1,33 @@
+{
+  "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"
+        ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/pnf-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/pnf-id.json
new file mode 100755 (executable)
index 0000000..3246853
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "pnf-id",
+  "tags" : "pnf-id",
+  "updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
+  "property" : {
+    "description" : "pnf-id",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/pnf-name.json b/components/model-catalog/resource-dictionary/starter-dictionary/pnf-name.json
new file mode 100755 (executable)
index 0000000..edcc3e9
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "pnf-name",
+  "tags" : "pnf-name",
+  "updated-by" : "Rodrigo Ottero <rodrigo.ottero@est.tech>",
+  "property" : {
+    "description" : "pnf-name",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/primary-db-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/primary-db-source.json
new file mode 100644 (file)
index 0000000..26e62e8
--- /dev/null
@@ -0,0 +1,24 @@
+{
+  "name": "primary-db-source",
+  "property" :{
+    "description": "name of the ",
+    "type": "string"
+  },
+  "updated-by": "brindasanth@onap.com",
+  "tags": "bundle-id, brindasanth@onap.com",
+  "sources": {
+    "primary-db": {
+      "type": "source-primary-db",
+      "properties": {
+        "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name",
+        "input-key-mapping": {
+          "profile_name": "profile_name"
+        },
+        "output-key-mapping": {
+          "db-country": "country",
+          "db-state": "state"
+        }
+      }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..0685401
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "name" : "private-prefix-id",
+  "tags" : "private-prefix-id",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "private-prefix-id",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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"
+        }      
+         }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/protected-prefix-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/protected-prefix-id.json
new file mode 100755 (executable)
index 0000000..f6120f3
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "name" : "protected-prefix-id",
+  "tags" : "protected-prefix-id",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "protected-prefix-id",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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"
+        }      
+         }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/protected_private_net_cidr.json b/components/model-catalog/resource-dictionary/starter-dictionary/protected_private_net_cidr.json
new file mode 100755 (executable)
index 0000000..bb477dc
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "name" : "protected_private_net_cidr",
+  "tags" : "protected_private_net_cidr",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "protected_private_net_cidr",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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"
+        }      
+         }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/protected_private_subnet_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/protected_private_subnet_id.json
new file mode 100755 (executable)
index 0000000..b3daadc
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "name" : "protected_private_subnet_id",
+  "tags" : "protected_private_subnet_id",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "protected_private_subnet_id",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : {
+      }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..fe172ca
--- /dev/null
@@ -0,0 +1,34 @@
+{
+  "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"
+        ]
+      }
+    }
+  }
+}
+
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
new file mode 100755 (executable)
index 0000000..6cc9c2e
--- /dev/null
@@ -0,0 +1,14 @@
+{
+               "name": "public_net_id",
+               "tags": "public_net_id",
+               "updated-by" : "Singal, Kapil <ks220y@att.com>",
+               "property": {
+                       "type": "string",
+                       "description" : "public_net_id"
+               },
+               "sources": {
+                       "input": {
+                               "type": "source-input"
+                       }
+               }
+}
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sample-default-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/sample-default-source.json
new file mode 100644 (file)
index 0000000..395b0dd
--- /dev/null
@@ -0,0 +1,16 @@
+{\r
+  "tags": "sample-default-source",\r
+  "name": "sample-default-source",\r
+  "property" :{\r
+    "description": "name of the ",\r
+    "type": "string"\r
+  },\r
+  "updated-by": "brindasanth@onap.com",\r
+  "sources": {\r
+    "default": {\r
+      "type": "source-default",\r
+      "properties": {\r
+      }\r
+    }\r
+  }\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sample-input-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/sample-input-source.json
new file mode 100644 (file)
index 0000000..73c0d40
--- /dev/null
@@ -0,0 +1,17 @@
+{\r
+       "name": "sample-input-source",\r
+       "property" :{\r
+               "description": "name of the ",\r
+               "type": "string"\r
+       },\r
+       "updated-by": "brindasanth@onap.com",\r
+       "tags": "sample-input-source",\r
+       "sources": {\r
+               "input": {\r
+                       "type": "source-input",\r
+                       "properties": {\r
+                               "key": "input-source"\r
+                       }\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sample-licenses.json b/components/model-catalog/resource-dictionary/starter-dictionary/sample-licenses.json
new file mode 100644 (file)
index 0000000..c0f78ac
--- /dev/null
@@ -0,0 +1,29 @@
+{\r
+  "tags": "sample-licenses",\r
+  "name": "sample-licenses",\r
+  "property": {\r
+    "description" : " Sample Data for licences",\r
+    "required": true,\r
+    "type": "list",\r
+    "entry_schema": {\r
+      "type": "dt-license-key"\r
+    }\r
+  },\r
+  "updated-by": "brindasanth@onap.com",\r
+  "sources": {\r
+    "primary-config-data": {\r
+      "type": "source-rest",\r
+      "properties": {\r
+        "type": "JSON",\r
+        "url-path": "config/L3VNF-API:services/service-list/",\r
+        "path": "/licenses",\r
+        "input-key-mapping": {\r
+        },\r
+        "output-key-mapping": {\r
+          "licenses": "licenses"\r
+        },\r
+        "key-dependencies": []\r
+      }\r
+    }\r
+  }\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sample-mdsal-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/sample-mdsal-source.json
new file mode 100644 (file)
index 0000000..75d7ca0
--- /dev/null
@@ -0,0 +1,25 @@
+{\r
+  "tags": "sample-mdsal-source",\r
+  "name": "sample-mdsal-source",\r
+  "property": {\r
+    "description": "Sample sample-mdsal-source",\r
+    "type": "string"\r
+  },\r
+  "updated-by": "brindasanth@onap.com",\r
+  "sources": {\r
+    "primary-config-data": {\r
+      "type": "source-rest",\r
+      "properties": {\r
+        "type": "JSON",\r
+        "url-path": "config/L3VNF-API:services/service-list/$service-instance-id/service-data/vnf-topology-information/vnf-assignments/vnf-vms/$vm-type/vm-networks/$network-role/v4-assigned-ip-list/$v4-ip-type",\r
+        "path": "/v4-assigned-ip-list/0/v4-ip-prefix",\r
+        "input-key-mapping": {\r
+        },\r
+        "output-key-mapping": {\r
+          "mdsal-source": "v4-ip-prefix"\r
+        },\r
+        "key-dependencies": []\r
+      }\r
+    }\r
+  }\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sample-primary-db-source.json b/components/model-catalog/resource-dictionary/starter-dictionary/sample-primary-db-source.json
new file mode 100644 (file)
index 0000000..656841f
--- /dev/null
@@ -0,0 +1,24 @@
+{\r
+  "name": "sample-db-source",\r
+  "property" :{\r
+    "description": "name of the ",\r
+    "type": "string"\r
+  },\r
+  "updated-by": "brindasanth@onap.com",\r
+  "tags": "primary-db-source, brindasanth@onap.com",\r
+  "sources": {\r
+    "primary-db": {\r
+      "type": "source-primary-db",\r
+      "properties": {\r
+        "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name",\r
+        "input-key-mapping": {\r
+          "profile_name": "profile_name"\r
+        },\r
+        "output-key-mapping": {\r
+          "db-country": "country",\r
+          "db-state": "state"\r
+        }\r
+      }\r
+    }\r
+  }\r
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/sample-v4-ip-type.json b/components/model-catalog/resource-dictionary/starter-dictionary/sample-v4-ip-type.json
new file mode 100644 (file)
index 0000000..055279c
--- /dev/null
@@ -0,0 +1,17 @@
+{\r
+  "name": "sample-v4-ip-type",\r
+  "property": {\r
+    "description": "sample-v4-ip-type",\r
+    "type": "string"\r
+  },\r
+  "updated-by": "brindasanth@onap.com",\r
+  "tags": "sample-v4-ip-type",\r
+  "sources": {\r
+    "input": {\r
+      "type": "source-input",\r
+      "properties": {\r
+        "key": "sample-v4-ip-type"\r
+      }\r
+    }\r
+  }\r
+}
\ 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
new file mode 100755 (executable)
index 0000000..017ba98
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "name" : "sec_group",
+  "tags" : "sec_group",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "sec_group",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : {
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/service-instance-id.json
new file mode 100755 (executable)
index 0000000..737c757
--- /dev/null
@@ -0,0 +1,45 @@
+{
+  "name" : "service-instance-id",
+  "tags" : "service-instance-id, tosca.datatypes.Root, data_type",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "To be provided",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    },
+    "any-db": {
+      "type": "source-primary-db",
+      "properties": {
+        "query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"",
+        "input-key-mapping": {
+        },
+        "output-key-mapping": {
+          "service-instance-id": "artifact_name"
+        }
+      }
+    },
+    "primary-db": {
+      "type": "source-primary-db",
+      "properties": {
+        "query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME 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": []
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/status.json b/components/model-catalog/resource-dictionary/starter-dictionary/status.json
new file mode 100755 (executable)
index 0000000..47a19d0
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "name" : "status",
+  "tags" : "status",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "status",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : {
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/unprotected-prefix-id.json b/components/model-catalog/resource-dictionary/starter-dictionary/unprotected-prefix-id.json
new file mode 100755 (executable)
index 0000000..c1fc541
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "name" : "unprotected-prefix-id",
+  "tags" : "unprotected-prefix-id",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "unprotected-prefix-id",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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"
+        }      
+         }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_net_cidr.json b/components/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_net_cidr.json
new file mode 100755 (executable)
index 0000000..6048755
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "name" : "unprotected_private_net_cidr",
+  "tags" : "unprotected_private_net_cidr",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "unprotected_private_net_cidr",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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"
+        }      
+         }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_subnet_id.json b/components/model-catalog/resource-dictionary/starter-dictionary/unprotected_private_subnet_id.json
new file mode 100755 (executable)
index 0000000..760d611
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "name" : "unprotected_private_subnet_id",
+  "tags" : "unprotected_private_subnet_id",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "unprotected_private_subnet_id",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : {
+      }
+    }
+  }
+}
\ 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 100755 (executable)
index 0000000..74f9310
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "vf-module-id",
+  "tags" : "vf-module-id",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vf-module-id",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..faa7ea4
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "name" : "vf-module-label",
+  "tags" : "vf-module-label",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vf-module-label",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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" ]
+      }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..6736e4f
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "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" : { }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..dbd51bb
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "name" : "vf-module-type",
+  "tags" : "vf-module-type",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vf-module-type",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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" ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf-naming-policy.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf-naming-policy.json
new file mode 100755 (executable)
index 0000000..70792f8
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "name" : "vf-naming-policy",
+  "tags" : "vf-naming-policy",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vf-naming-policy",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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" ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf-nf-code.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf-nf-code.json
new file mode 100755 (executable)
index 0000000..a21982c
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "name" : "vf-nf-code",
+  "tags" : "vf-nf-code",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vf-nf-code",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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" ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vf_module_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/vf_module_name.json
new file mode 100755 (executable)
index 0000000..20ce458
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "vf_module_name",
+  "tags" : "vf_module_name",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vf_module_name",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "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
new file mode 100755 (executable)
index 0000000..9f3e7cf
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "name" : "vfccustomizationuuid",
+  "tags" : "vfccustomizationuuid, tosca.datatypes.Root, data_type",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vfccustomizationuuid",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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" ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vfw_name_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vfw_name_0.json
new file mode 100755 (executable)
index 0000000..96a9758
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "vfw_name_0",
+  "tags" : "vfw_name_0",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vfw_name_0",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_0.json
new file mode 100755 (executable)
index 0000000..4c227f9
--- /dev/null
@@ -0,0 +1,33 @@
+{
+  "name" : "vfw_private_ip_0",
+  "tags" : "vfw_private_ip_0",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vfw_private_ip_0",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "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/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" ]
+      }
+    }
+  }
+}
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_1.json b/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_1.json
new file mode 100755 (executable)
index 0000000..0df08c0
--- /dev/null
@@ -0,0 +1,33 @@
+{
+  "name" : "vfw_private_ip_1",
+  "tags" : "vfw_private_ip_1",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vfw_private_ip_1",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "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/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" ]
+      }
+    }
+  }
+}
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_2.json b/components/model-catalog/resource-dictionary/starter-dictionary/vfw_private_ip_2.json
new file mode 100755 (executable)
index 0000000..f8adf74
--- /dev/null
@@ -0,0 +1,14 @@
+{
+               "name": "vfw_private_ip_2",
+               "tags": "vfw_private_ip_2",
+               "updated-by" : "Singal, Kapil <ks220y@att.com>",
+               "property": {
+                       "type": "string",
+                       "description" : "vfw_private_ip_2"
+               },
+               "sources": {
+                       "input": {
+                               "type": "source-input"
+                       }
+               }
+}
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json b/components/model-catalog/resource-dictionary/starter-dictionary/vm-type.json
new file mode 100755 (executable)
index 0000000..9744316
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "name" : "vm-type",
+  "tags" : "vm-type",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vm-type",
+    "type" : "string"
+  },
+  "sources" : {
+    "primary-db" : {
+      "type" : "source-primary-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" ]
+      }
+    }
+  }
+}
\ 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 100755 (executable)
index 0000000..7f3a18f
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "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
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vnf-model-customization-uuid.json b/components/model-catalog/resource-dictionary/starter-dictionary/vnf-model-customization-uuid.json
new file mode 100755 (executable)
index 0000000..2aa08c4
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "vnf-model-customization-uuid",
+  "tags" : "vnf-model-customization-uuid",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vnf-model-customization-uuid",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..4c0320a
--- /dev/null
@@ -0,0 +1,28 @@
+{
+  "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" ]
+      }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..e9d8a3b
--- /dev/null
@@ -0,0 +1,27 @@
+{
+  "name" : "vnf_name",
+  "tags" : "vnf_name",
+  "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",
+        "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" ]
+      }
+    }
+  }
+}
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
new file mode 100755 (executable)
index 0000000..3d89d9d
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "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" : {
+    "primary-db" : {
+      "type" : "source-primary-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" ]
+      }
+    }
+  }
+}
\ 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
new file mode 100755 (executable)
index 0000000..d7fb501
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "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" : {
+    "primary-db" : {
+      "type" : "source-primary-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" ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/volume-name.json b/components/model-catalog/resource-dictionary/starter-dictionary/volume-name.json
new file mode 100755 (executable)
index 0000000..3fe5ab3
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "volume-name",
+  "tags" : "volume-name",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "volume-name",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/volume_group_name.json b/components/model-catalog/resource-dictionary/starter-dictionary/volume_group_name.json
new file mode 100755 (executable)
index 0000000..90b3609
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "name" : "volume_group_name",
+  "tags" : "volume_group_name",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "volume_group_name",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : {
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vpg_name_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_name_0.json
new file mode 100755 (executable)
index 0000000..f158d53
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "vpg_name_0",
+  "tags" : "vpg_name_0",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vpg_name_0",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_0.json
new file mode 100755 (executable)
index 0000000..586aa0c
--- /dev/null
@@ -0,0 +1,33 @@
+{
+  "name" : "vpg_private_ip_0",
+  "tags" : "vpg_private_ip_0",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vpg_private_ip_0",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "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_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" ]
+      }
+    }
+  }
+}
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_1.json b/components/model-catalog/resource-dictionary/starter-dictionary/vpg_private_ip_1.json
new file mode 100755 (executable)
index 0000000..ff58f8a
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "name" : "vpg_private_ip_1",
+  "tags" : "vpg_private_ip_1",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vpg_private_ip_1",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : {
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vsn_name_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vsn_name_0.json
new file mode 100755 (executable)
index 0000000..7b7ba45
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "vsn_name_0",
+  "tags" : "vsn_name_0",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vsn_name_0",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_0.json b/components/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_0.json
new file mode 100755 (executable)
index 0000000..1fe4797
--- /dev/null
@@ -0,0 +1,33 @@
+{
+  "name" : "vsn_private_ip_0",
+  "tags" : "vsn_private_ip_0",
+  "updated-by" : "Singal, Kapil <ks220y@att.com>",
+  "property" : {
+    "description" : "vsn_private_ip_0",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "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/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" ]
+      }
+    }
+  }
+}
diff --git a/components/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_1.json b/components/model-catalog/resource-dictionary/starter-dictionary/vsn_private_ip_1.json
new file mode 100755 (executable)
index 0000000..52de69c
--- /dev/null
@@ -0,0 +1,14 @@
+{
+               "name": "vsn_private_ip_1",
+               "tags": "vsn_private_ip_1",
+               "updated-by" : "Singal, Kapil <ks220y@att.com>",
+               "property": {
+                       "type": "string",
+                       "description" : "vsn_private_ip_1"
+               },
+               "sources": {
+                       "input": {
+                               "type": "source-input"
+                       }
+               }
+}
diff --git a/components/model-catalog/resource-dictionary/test-dictionary/create_netbox_ip.json b/components/model-catalog/resource-dictionary/test-dictionary/create_netbox_ip.json
new file mode 100644 (file)
index 0000000..297a8ef
--- /dev/null
@@ -0,0 +1,29 @@
+{
+    "tags" : "oam-local-ipv4-address",
+    "name" : "create_netbox_ip",
+    "property" : {
+      "description" : "netbox ip",
+      "type" : "dt-netbox-ip"
+    },
+    "updated-by" : "adetalhouet",
+    "sources" : {
+      "primary-config-data" : {
+        "type" : "source-rest",
+        "properties" : {
+          "type" : "JSON",
+          "verb" : "POST",
+          "endpoint-selector" : "ipam-1",
+          "url-path" : "/api/ipam/prefixes/$prefix-id/available-ips/",
+          "path" : "",
+          "input-key-mapping" : {
+            "prefix-id" : "prefix-id"
+          },
+          "output-key-mapping" : {
+            "address" : "address",
+            "id" : "id"
+          },
+          "key-dependencies" : [ "prefix-id" ]
+        }
+      }
+    }
+  }
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/test-dictionary/delete_netbox_ip.json b/components/model-catalog/resource-dictionary/test-dictionary/delete_netbox_ip.json
new file mode 100644 (file)
index 0000000..35a8a35
--- /dev/null
@@ -0,0 +1,30 @@
+{
+  "tags": "oam-local-ipv4-address",
+  "name": "delete_netbox_ip",
+  "property": {
+    "description": "delete netbox ip",
+    "type": "string"
+  },
+  "updated-by": "adetalhouet",
+  "sources": {
+    "primary-config-data": {
+      "type": "source-rest",
+      "properties": {
+        "type": "JSON",
+        "verb": "DELETE",
+        "endpoint-selector": "ipam-1",
+        "url-path": "/api/ipam/ip-addresses/$ip-address-id",
+        "path": "/address",
+        "input-key-mapping": {
+          "ip-address-id": "ip-address-id"
+        },
+        "output-key-mapping": {
+
+        },
+        "key-dependencies": [
+          "ip-address-id"
+        ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/test-dictionary/hostname.json b/components/model-catalog/resource-dictionary/test-dictionary/hostname.json
new file mode 100644 (file)
index 0000000..025cce3
--- /dev/null
@@ -0,0 +1,14 @@
+{
+    "tags": "hostname",
+    "name": "hostname",
+    "property": {
+      "description": "hostname",
+      "type": "string"
+    },
+    "updated-by": "adetalhouet",
+    "sources": {
+      "input": {
+        "type": "source-input"
+      }
+    }
+  }
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/test-dictionary/interface-description.json b/components/model-catalog/resource-dictionary/test-dictionary/interface-description.json
new file mode 100644 (file)
index 0000000..d13bfc4
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "tags": "interface-description",
+  "name": "interface-description",
+  "property": {
+    "description": "interface-description",
+    "type": "string"
+  },
+  "updated-by": "adetalhouet",
+  "sources": {
+    "capability": {
+      "type": "source-capability",
+      "properties": {
+        "script-type": "jython",
+        "script-class-reference": "DescriptionExample",
+        "instance-dependencies": [
+
+        ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/test-dictionary/interface-name.json b/components/model-catalog/resource-dictionary/test-dictionary/interface-name.json
new file mode 100644 (file)
index 0000000..53a11ed
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "name" : "interface-name",
+  "tags" : "interface-name",
+  "updated-by" : "adetalhouet",
+  "property" : {
+    "description" : "interface-name",
+    "type" : "string"
+  },
+  "sources" : {
+    "input" : {
+      "type" : "source-input",
+      "properties" : { }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/test-dictionary/prefix-id.json b/components/model-catalog/resource-dictionary/test-dictionary/prefix-id.json
new file mode 100644 (file)
index 0000000..e515eca
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "tags": "prefix-id",
+  "name": "prefix-id",
+  "property" :{
+    "description": "prefix-id",
+    "type": "integer"
+  },
+  "updated-by": "adetalhouet",
+  "sources": {
+    "default": {
+      "type": "source-default",
+      "properties": {
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/test-dictionary/unit-number.json b/components/model-catalog/resource-dictionary/test-dictionary/unit-number.json
new file mode 100644 (file)
index 0000000..333fd78
--- /dev/null
@@ -0,0 +1,14 @@
+{
+    "tags": "unit-number",
+    "name": "unit-number",
+    "property": {
+      "description": "unit-number",
+      "type": "string"
+    },
+    "updated-by": "adetalhouet",
+    "sources": {
+      "input": {
+        "type": "source-input"
+      }
+    }
+  }
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/test-dictionary/vf-module-number.json b/components/model-catalog/resource-dictionary/test-dictionary/vf-module-number.json
new file mode 100644 (file)
index 0000000..cdd40f6
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "tags": "vf-module-number",
+  "name": "vf-module-number",
+  "property" :{
+    "description": "vf-module-number",
+    "type": "string"
+  },
+  "updated-by": "adetalhouet",
+  "sources": {
+    "default": {
+      "type": "source-default",
+      "properties": {
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/model-catalog/resource-dictionary/test-dictionary/vf-module-type.json b/components/model-catalog/resource-dictionary/test-dictionary/vf-module-type.json
new file mode 100644 (file)
index 0000000..9e8c409
--- /dev/null
@@ -0,0 +1,27 @@
+{
+  "name": "vf-module-type",
+  "tags": "vf-module-type",
+  "property": {
+    "description": "vf-module-type",
+    "type": "string"
+  },
+  "updated-by": "adetalhouet",
+  "sources": {
+    "processor-db": {
+      "type": "source-processor-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"
+        ]
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/parent/pom.xml b/components/parent/pom.xml
new file mode 100644 (file)
index 0000000..0d5d964
--- /dev/null
@@ -0,0 +1,402 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright Â© 2017-2018 AT&T Intellectual Property.
+  ~
+  ~ Modifications Copyright Â© 2018 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.
+  -->
+<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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.ccsdk.apps</groupId>
+        <artifactId>components</artifactId>
+        <version>0.4.2-SNAPSHOT</version>
+    </parent>
+    <groupId>org.onap.ccsdk.apps.components</groupId>
+    <artifactId>parent</artifactId>
+    <name>Components Parent</name>
+    <packaging>pom</packaging>
+    <properties>
+        <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
+        <spring.boot.version>2.1.3.RELEASE</spring.boot.version>
+        <spring.version>5.1.5.RELEASE</spring.version>
+        <kotlin.version>1.3.21</kotlin.version>
+        <kotlin.maven.version>1.3.21</kotlin.maven.version>
+        <kotlin.couroutines.version>1.1.1</kotlin.couroutines.version>
+        <grpc.version>1.18.0</grpc.version>
+        <protobuff.java.utils.version>3.6.1</protobuff.java.utils.version>
+        <eelf.version>1.0.0</eelf.version>
+        <guava.version>27.0.1-jre</guava.version>
+        <springfox.swagger2.version>2.9.2</springfox.swagger2.version>
+        <h2database.version>1.4.197</h2database.version>
+        <onap.logger.slf4j>1.2.2</onap.logger.slf4j>
+        <mockk.version>1.9</mockk.version>
+    </properties>
+    <dependencyManagement>
+        <dependencies>
+            <!-- Spring boot -->
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>${spring.boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>com.att.eelf</groupId>
+                <artifactId>eelf-core</artifactId>
+                <version>${eelf.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.logging-analytics</groupId>
+                <artifactId>logging-slf4j</artifactId>
+                <version>${onap.logger.slf4j}</version>
+            </dependency>
+
+            <!--Swagger Dependencies -->
+            <dependency>
+                <groupId>io.springfox</groupId>
+                <artifactId>springfox-swagger2</artifactId>
+                <version>${springfox.swagger2.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.springfox</groupId>
+                <artifactId>springfox-swagger-ui</artifactId>
+                <version>${springfox.swagger2.version}</version>
+            </dependency>
+
+            <!-- Common Utils Dependencies -->
+            <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-lang3</artifactId>
+                <version>3.2.1</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-collections</groupId>
+                <artifactId>commons-collections</artifactId>
+                <version>3.2.2</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>2.6</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-compress</artifactId>
+                <version>1.15</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.velocity</groupId>
+                <artifactId>velocity</artifactId>
+                <version>1.7</version>
+            </dependency>
+            <dependency>
+                <groupId>com.google.guava</groupId>
+                <artifactId>guava</artifactId>
+                <version>${guava.version}</version>
+            </dependency>
+
+            <!-- Kotlin Dependencies -->
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-stdlib</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-stdlib-common</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-scripting-jvm-host</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-compiler-embeddable</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-script-util</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-script-runtime</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlinx</groupId>
+                <artifactId>kotlinx-coroutines-core</artifactId>
+                <version>${kotlin.couroutines.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlinx</groupId>
+                <artifactId>kotlinx-coroutines-reactor</artifactId>
+                <version>${kotlin.couroutines.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-reflect</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-stdlib-jdk8</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-stdlib-jdk7</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+
+            <!-- GRPC Dependencies -->
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-core</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-netty</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-protobuf</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-stub</artifactId>
+                <version>${grpc.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.google.protobuf</groupId>
+                <artifactId>protobuf-java-util</artifactId>
+                <version>${protobuff.java.utils.version}</version>
+            </dependency>
+
+
+            <!-- Database -->
+            <dependency>
+                <groupId>com.h2database</groupId>
+                <artifactId>h2</artifactId>
+                <version>${h2database.version}</version>
+            </dependency>
+
+
+            <!-- Testing Dependencies -->
+            <dependency>
+                <groupId>io.mockk</groupId>
+                <artifactId>mockk</artifactId>
+                <version>${mockk.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-test-junit</artifactId>
+                <version>${kotlin.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlinx</groupId>
+                <artifactId>kotlinx-coroutines-test</artifactId>
+                <version>${kotlin.couroutines.version}</version>
+                <scope>test</scope>
+            </dependency>
+            <dependency>
+                <groupId>io.grpc</groupId>
+                <artifactId>grpc-testing</artifactId>
+                <version>${grpc.version}</version>
+                <scope>test</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.att.eelf</groupId>
+            <artifactId>eelf-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.logging-analytics</groupId>
+            <artifactId>logging-slf4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-compress</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.jayway.jsonpath</groupId>
+            <artifactId>json-path</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-stdlib</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-script-util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-stdlib-jdk8</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlinx</groupId>
+            <artifactId>kotlinx-coroutines-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlinx</groupId>
+            <artifactId>kotlinx-coroutines-reactor</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.module</groupId>
+            <artifactId>jackson-module-kotlin</artifactId>
+        </dependency>
+        <!-- GRPC Dependencies -->
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-protobuf</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-stub</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.protobuf</groupId>
+            <artifactId>protobuf-java-util</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>3.0.1</version>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <artifactId>kotlin-maven-plugin</artifactId>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <version>${kotlin.maven.version}</version>
+                <executions>
+                    <execution>
+                        <id>compile</id>
+                        <goals>
+                            <goal>compile</goal>
+                        </goals>
+                        <configuration>
+                            <sourceDirs>
+                                <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
+                                <sourceDir>${project.basedir}/src/main/java</sourceDir>
+                            </sourceDirs>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>test-compile</id>
+                        <goals>
+                            <goal>test-compile</goal>
+                        </goals>
+                        <configuration>
+                            <sourceDirs>
+                                <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
+                                <sourceDir>${project.basedir}/src/test/java</sourceDir>
+                            </sourceDirs>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.5.1</version>
+                <configuration>
+                    <source>${maven.compiler.source}</source>
+                    <target>${maven.compiler.target}</target>
+                </configuration>
+                <executions>
+                    <!-- Replacing default-compile as it is treated specially by maven -->
+                    <execution>
+                        <id>default-compile</id>
+                        <phase>none</phase>
+                    </execution>
+                    <!-- Replacing default-testCompile as it is treated specially by maven -->
+                    <execution>
+                        <id>default-testCompile</id>
+                        <phase>none</phase>
+                    </execution>
+                    <execution>
+                        <id>java-compile</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>compile</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>java-test-compile</id>
+                        <phase>test-compile</phase>
+                        <goals>
+                            <goal>testCompile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/components/pom.xml b/components/pom.xml
new file mode 100644 (file)
index 0000000..115b3a9
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright Â© 2017-2018 AT&T Intellectual Property.
+  ~ Modifications Copyright Â© 2018 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.
+  -->
+<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/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.onap.ccsdk.apps</groupId>
+        <artifactId>ccsdk-apps</artifactId>
+        <version>0.4.2-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>components</artifactId>
+    <name>Components Root</name>
+    <packaging>pom</packaging>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+        <build.number>${maven.build.timestamp}</build.number>
+        <java.version>1.8</java.version>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.compiler.source>1.8</maven.compiler.source>
+    </properties>
+    <modules>
+        <module>parent</module>
+        <module>model-catalog/proto-definition</module>
+    </modules>
+</project>
diff --git a/components/scripts/python/ccsdk_blueprints/__init__.py b/components/scripts/python/ccsdk_blueprints/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py b/components/scripts/python/ccsdk_blueprints/abstract_blueprint_function.py
new file mode 100644 (file)
index 0000000..1ffa75d
--- /dev/null
@@ -0,0 +1,15 @@
+from org.onap.ccsdk.apps.blueprintsprocessor.services.execution import AbstractComponentFunction
+
+
+class AbstractPythonComponentFunction(AbstractComponentFunction):
+
+    def __init__(self):
+        AbstractComponentFunction.__init__(self)
+
+    def process(self, execution_request):
+        print "Processing calling from parent..."
+        return None
+
+    def recover(self, runtime_exception, execution_request):
+        print "Recovering calling from parent..."
+        return None
diff --git a/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py b/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py
new file mode 100644 (file)
index 0000000..6489b1e
--- /dev/null
@@ -0,0 +1,29 @@
+from org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.processor import \
+    ResourceAssignmentProcessor
+from org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.utils import \
+    ResourceAssignmentUtils
+from org.onap.ccsdk.apps.controllerblueprints.core import \
+    BluePrintProcessorException
+
+
+class AbstractRAProcessor(ResourceAssignmentProcessor):
+
+    def process(self, resource_assignment):
+        print "Processing.."
+        return None
+
+    def recover(self, runtime_exception, resource_assignment):
+        print "Recovering.."
+        return None
+
+    def set_resource_data_value(self, resource_assignment, value):
+        try:
+            if value is not None:
+                ResourceAssignmentUtils.Companion.setResourceDataValue(
+                    resource_assignment, self.raRuntimeService, value)
+            else:
+                ResourceAssignmentUtils.Companion.setFailedResourceDataValue(
+                    resource_assignment, "Fail to resolve value")
+        except BluePrintProcessorException, err:
+            raise BluePrintProcessorException(
+                "Error on resource assignment. Message = " + err.message)
diff --git a/components/scripts/python/ccsdk_blueprints/blueprint_constants.py b/components/scripts/python/ccsdk_blueprints/blueprint_constants.py
new file mode 100644 (file)
index 0000000..5024677
--- /dev/null
@@ -0,0 +1,26 @@
+
+PROPERTY_BLUEPRINT_PROCESS_ID= "blueprint-process-id"
+PROPERTY_BLUEPRINT_BASE_PATH= "blueprint-basePath"
+PROPERTY_BLUEPRINT_RUNTIME= "blueprint-runtime"
+PROPERTY_BLUEPRINT_INPUTS_DATA= "blueprint-inputs-data"
+PROPERTY_BLUEPRINT_CONTEXT= "blueprint-context"
+PROPERTY_BLUEPRINT_NAME= "template_name"
+PROPERTY_BLUEPRINT_VERSION= "template_version"
+PROPERTY_BLUEPRINT_USER_SYSTEM= "System"
+PROPERTY_BLUEPRINT_STATUS_SUCCESS= "success"
+PROPERTY_BLUEPRINT_STATUS_FAILURE= "failure"
+
+METADATA_USER_GROUPS = "user-groups"
+METADATA_TEMPLATE_NAME = "template_name"
+METADATA_TEMPLATE_VERSION = "template_version"
+METADATA_TEMPLATE_AUTHOR = "template_author"
+METADATA_TEMPLATE_TAGS = "template_tags"
+METADATA_WORKFLOW_NAME = "workflow_name"
+
+PAYLOAD_DATA = "payload-data"
+PROPERTY_CURRENT_STEP = "current-step"
+PROPERTY_CURRENT_NODE_TEMPLATE = "current-node-template"
+PROPERTY_CURRENT_INTERFACE = "current-interface"
+PROPERTY_CURRENT_OPERATION = "current-operation"
+PROPERTY_CURRENT_IMPLEMENTATION = "current-implementation"
+PROPERTY_EXECUTION_REQUEST = "execution-request"
diff --git a/components/scripts/python/ccsdk_blueprints/blueprint_runtime_service.py b/components/scripts/python/ccsdk_blueprints/blueprint_runtime_service.py
new file mode 100644 (file)
index 0000000..7c7beff
--- /dev/null
@@ -0,0 +1,21 @@
+class BluePrintRuntimeService:
+
+    def __init__(self, bps):
+        self.bps = bps
+
+    def resolveNodeTemplateArtifact(self, node_template_name, artifact_name):
+        return self.bps.resolveNodeTemplateArtifact(node_template_name, artifact_name)
+
+    def setNodeTemplateAttributeValue(self, nodeTemplateName, attributeName, value):
+        return self.bps.setNodeTemplateAttributeValue(nodeTemplateName, attributeName, value)
+
+    def setNodeTemplatePropertyValue(self, nodeTemplateName, propertyName, value):
+        return self.bps.setNodeTemplatePropertyValue(nodeTemplateName, propertyName, value)
+
+    def put_resolution_store(self, ra_name, value):
+        self.bps.putResolutionStore(ra_name, value)
+        return None
+
+    def put_dictionary_store(self, ra_dictionary_name, value):
+        self.bps.putResolutionStore(ra_dictionary_name, value)
+        return None
diff --git a/components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py b/components/scripts/python/ccsdk_blueprints/sample_blueprint_component.py
new file mode 100644 (file)
index 0000000..a1e6c5d
--- /dev/null
@@ -0,0 +1,18 @@
+from abstract_blueprint_function import AbstractPythonComponentFunction
+from blueprint_constants import *
+
+
+class SampleBlueprintComponent(AbstractPythonComponentFunction):
+
+    def __init__(self):
+        AbstractPythonComponentFunction.__init__(self)
+
+    def process(self, execution_request):
+        super(SamplePythonComponentNode, self).process(execution_request)
+        print "Processing calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+        return None
+
+    def recover(self, runtime_exception, execution_request):
+        super(SamplePythonComponentNode, self).recover(runtime_exception, execution_request)
+        print "Recovering calling..." + PROPERTY_BLUEPRINT_BASE_PATH
+        return None
diff --git a/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py b/components/scripts/python/ccsdk_blueprints/sample_ra_processor_function.py
new file mode 100644 (file)
index 0000000..fa82108
--- /dev/null
@@ -0,0 +1,14 @@
+from abstract_ra_processor import AbstractRAProcessor
+from blueprint_constants import *
+
+
+class SampleRAProcessorFunction(AbstractRAProcessor):
+
+    def process(self, resource_assignment):
+        print "Processing calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+        self.set_resource_data_value(resource_assignment, "")
+        return None
+
+    def recover(self, runtime_exception, resource_assignment):
+        print "Recovering calling.." + PROPERTY_BLUEPRINT_BASE_PATH
+        return None
diff --git a/components/scripts/python/ccsdk_netconf/__init__.py b/components/scripts/python/ccsdk_netconf/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/components/scripts/python/ccsdk_netconf/common.py b/components/scripts/python/ccsdk_netconf/common.py
new file mode 100644 (file)
index 0000000..f161e29
--- /dev/null
@@ -0,0 +1,28 @@
+#  Copyright (c) 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.
+
+class ResolutionHelper:
+
+  def __init__(self, component_function):
+    self.component_function = component_function
+
+  def resolve_and_generate_message_from_template_prefix(self, artifact_prefix):
+    return self.component_function.resolveAndGenerateMessage(artifact_prefix)
+
+  def resolve_and_generate_message(self, artifact_mapping, artifact_template):
+    return self.component_function.resolveAndGenerateMessage(artifact_mapping,
+                                                             artifact_template)
+
+  def retrieve_resolved_template_from_database(self, key, artifact_template):
+    return self.component_function.resolveFromDatabase(key, artifact_template)
diff --git a/components/scripts/python/ccsdk_netconf/netconf_constant.py b/components/scripts/python/ccsdk_netconf/netconf_constant.py
new file mode 100644 (file)
index 0000000..534ca9e
--- /dev/null
@@ -0,0 +1,15 @@
+SERVICE_LOG = "log"
+SERVICE_NETCONF = "netconfService"
+SERVICE_MESSAGE = "messageService"
+
+PARAM_REQUEST_ID = "requestId"
+PARAM_ACTION = "action"
+
+STATUS_SUCCESS = "success"
+STATUS_FAILURE = "failure"
+
+CONFIG_TARGET_RUNNING = "running"
+CONFIG_TARGET_CANDIDATE = "candidate"
+CONFIG_DEFAULT_OPERATION_MERGE = "merge"
+CONFIG_DEFAULT_OPERATION_REPLACE = "replace"
+CONFIG_DEFAULT_OPERATION_NONE = "none"
diff --git a/components/scripts/python/ccsdk_netconf/netconfclient.py b/components/scripts/python/ccsdk_netconf/netconfclient.py
new file mode 100644 (file)
index 0000000..e263ba8
--- /dev/null
@@ -0,0 +1,62 @@
+from netconf_constant import CONFIG_TARGET_RUNNING, CONFIG_TARGET_CANDIDATE, \
+  CONFIG_DEFAULT_OPERATION_REPLACE
+
+
+class NetconfClient:
+
+  def __init__(self, log, component_function, requirement_name):
+    self.log = log
+    self.component_function = component_function
+    netconf_device = self.component_function.initializeNetconfConnection(
+        requirement_name)
+    self.netconf_rpc_client = netconf_device.netconfRpcService
+    self.netconf_session = netconf_device.netconfSession
+
+  def disconnect(self):
+    self.netconf_session.disconnect()
+    return
+
+  def connect(self):
+    self.netconf_session.connect()
+    return
+
+  def lock(self, config_target=CONFIG_TARGET_CANDIDATE):
+    device_response = self.netconf_rpc_client.lock(config_target)
+    return device_response
+
+  def get_config(self, filter="", config_target=CONFIG_TARGET_RUNNING):
+    device_response = self.netconf_rpc_client.getConfig(filter, config_target)
+    return device_response
+
+  def edit_config(self, message_content, config_target=CONFIG_TARGET_CANDIDATE,
+      edit_default_peration=CONFIG_DEFAULT_OPERATION_REPLACE):
+    device_response = self.netconf_rpc_client.editConfig(message_content,
+                                                         config_target,
+                                                         edit_default_peration)
+    return device_response
+
+  def commit(self, confirmed=False, confirm_timeout=60, persist="",
+      persist_id=""):
+    device_response = self.netconf_rpc_client.commit(confirmed, confirm_timeout,
+                                                     persist, persist_id)
+    return device_response
+
+  def invoke_rpc(self, rpc):
+    device_response = self.netconf_rpc_client.invokeRpc(rpc)
+    return device_response
+
+  def cancel_commit(self, persist_id=""):
+    device_response = self.netconf_rpc_client.cancelCommit(persist_id)
+    return device_response
+
+  def unlock(self, config_target=CONFIG_TARGET_CANDIDATE):
+    device_response = self.netconf_rpc_client.unLock(config_target)
+    return device_response
+
+  def validate(self, config_target=CONFIG_TARGET_CANDIDATE):
+    device_response = self.netconf_rpc_client.validate(config_target)
+    return device_response
+
+  def discard_change(self):
+    device_response = self.netconf_rpc_client.discardConfig()
+    return device_response
diff --git a/docs/CBA/CDS_Architecture_Design.pptx b/docs/CBA/CDS_Architecture_Design.pptx
new file mode 100644 (file)
index 0000000..a6c158d
Binary files /dev/null and b/docs/CBA/CDS_Architecture_Design.pptx differ
diff --git a/docs/CBA/index.rst b/docs/CBA/index.rst
new file mode 100644 (file)
index 0000000..3bc6aca
--- /dev/null
@@ -0,0 +1,113 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2019 IBM.
+
+Controller Blueprint Archived Tool(CBA)
+----------------------------------------
+.. toctree::
+   :maxdepth: 1
+   
+Introduction:
+=============
+The Controller Blueprint Archived is the overall service design, fully model-driven, package needed to automate the resolution of resources for instantiation and any config provisioning operation, such as day0, day1 or day2 configuration.
+
+The CBA is .zip file, comprised of the following folder structure, the files may vary:
+
+|image0|
+
+.. |image0| image:: media/image0.jpg
+   :width: 7.88889in 
+   :height: 4.43750in
+
+Architecture:
+=============
+
+|image3|
+
+.. |image3| image:: media/CDS_architecture.jpg
+   :height: 4.43750in
+   :width: 7.88889in
+   
+Installation:
+=============
+
+Building client html and js files
+=================================
+
+       * FROM alpine:3.8 as builder
+
+       * RUN apk add --no-cache npm
+
+       * WORKDIR /opt/cds-ui/client/
+
+       * COPY client/package.json /opt/cds-ui/client/
+
+       * RUN npm install
+
+       * COPY client /opt/cds-ui/client/
+
+       * RUN npm run build
+
+
+Building and creating server
+============================
+
+       * FROM alpine:3.8
+
+       * WORKDIR /opt/cds-ui/
+
+       * RUN apk add --no-cache npm
+
+       * COPY server/package.json /opt/cds-ui/
+
+       * RUN npm install
+
+       * COPY server /opt/cds-ui/
+       
+       * COPY --from=builder /opt/cds-ui/server/public /opt/cds-ui/public
+
+       * RUN npm run build
+
+       * EXPOSE 3000
+
+       * CMD [ "npm", "start" ]
+   
+Development:
+=============
+
+Pre-requiste:
+=============
+       Visual Studio code editor
+       Git bash
+
+Steps
+=====
+   To compile CDS code:
+
+   1. Make sure your local Maven settings file ($HOME/.m2/settings.xml) contains
+    references to the ONAP repositories and OpenDaylight repositories.
+   2. git clone https://(LFID)@gerrit.onap.org/r/a/ccsdk/cds
+   3. cd cds ; mvn clean install ; cd ..
+   4. Open the cds-ui/client code for development
+   
+Data Flow:
+==========
+|image1|
+
+.. |image1| image:: media/image1.jpg
+   :width: 7.88889in 
+   :height: 4.43750in
+   
+Functional Decomposition:
+=========================
+|image2|
+
+.. |image2| image:: media/image2.jpg
+   :width: 7.88889in 
+   :height: 4.43750in
+   
+Controller design Studio Presentation:
+======================================
+
+Details about CDS Architecture and Design detail, Please click the link.
+:download:`CDS_Architecture_Design.pptx`
\ No newline at end of file
diff --git a/docs/CBA/media/CDS_architecture.jpg b/docs/CBA/media/CDS_architecture.jpg
new file mode 100644 (file)
index 0000000..6401e6b
Binary files /dev/null and b/docs/CBA/media/CDS_architecture.jpg differ
diff --git a/docs/CBA/media/image0.PNG b/docs/CBA/media/image0.PNG
new file mode 100644 (file)
index 0000000..1c5d8c5
Binary files /dev/null and b/docs/CBA/media/image0.PNG differ
diff --git a/docs/CBA/media/image0.jpg b/docs/CBA/media/image0.jpg
new file mode 100644 (file)
index 0000000..8e53a2d
Binary files /dev/null and b/docs/CBA/media/image0.jpg differ
diff --git a/docs/CBA/media/image1.PNG b/docs/CBA/media/image1.PNG
new file mode 100644 (file)
index 0000000..7a4b96d
Binary files /dev/null and b/docs/CBA/media/image1.PNG differ
diff --git a/docs/CBA/media/image1.jpg b/docs/CBA/media/image1.jpg
new file mode 100644 (file)
index 0000000..9a5cd63
Binary files /dev/null and b/docs/CBA/media/image1.jpg differ
diff --git a/docs/CBA/media/image2.PNG b/docs/CBA/media/image2.PNG
new file mode 100644 (file)
index 0000000..e6a0cf8
Binary files /dev/null and b/docs/CBA/media/image2.PNG differ
diff --git a/docs/CBA/media/image2.jpg b/docs/CBA/media/image2.jpg
new file mode 100644 (file)
index 0000000..20fc262
Binary files /dev/null and b/docs/CBA/media/image2.jpg differ
diff --git a/docs/CBA/resourceassignment.rst b/docs/CBA/resourceassignment.rst
new file mode 100644 (file)
index 0000000..be8b08e
--- /dev/null
@@ -0,0 +1,73 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2019 IBM.
+
+Resource Assignment 
+===================
+.. toctree::
+   :maxdepth: 1
+   
+   
+Component executor:
+===================
+Workflow:
+=========
+
+A workflow defines an overall action to be taken for the service; it can be composed of a set of sub-actions to execute. Currently, workflows are backed by Directed Graph engine.
+
+A CBA can have as many workflow as needed.
+
+Template:
+=========
+
+A template is an artifact.
+
+A template is parameterized and each parameter must be defined in a corresponding mapping file.
+
+In order to know which mapping correlate to which template, the file name must start with an artifact-prefix, serving as identifier to the overall template + mapping.
+
+The requirement is as follow:
+
+${artifact-prefix}-template
+${artifact-prefix}-mapping
+
+A template can represent anything, such as device config, payload to interact with 3rd party systems, resource-accumulator template, etc...
+
+Mapping:
+========
+Defines the contract of each resource to be resolved. Each placeholder in the template must have a corresponding mapping definition.
+
+A mapping is comprised of:
+
+- name
+- required / optional
+- type (support complex type)
+- dictionary-name
+- dictionary-source
+
+Dependencies:
+=============
+
+This allows to make sure given resources get resolved prior the resolution of the resources defining the dependency.
+The dictionary fields reference to a specific data dictionary.
+
+Resource accumulator:
+=====================
+
+In order to resolve HEAT environment variables, resource accumulator templates are being in used for Dublin.
+
+These templates are specific to the pre-instantiation scenario, and relies on GR-API within SDNC.
+
+It is composed of the following sections:
+
+resource-accumulator-resolved-data: defines all the resources that can be resolved directly from the context. It expresses a direct mapping between the name of the resource and its value.
+
+capability-data: defines what capability to use to create a specific resource, along with the ingredients required to invoke the capability and the output mapping.
+
+- Scripts
+- Library
+- NetconfClient
+
+In order to facilitate NETCONF interaction within scripts, a python NetconfClient binded to our Kotlin implementation is made available. This NetconfClient can be used when using the netconf-component-executor.
+
+The client can be find here: https://github.com/onap/ccsdk-apps/blob/master/components/scripts/python/ccsdk_netconf/netconfclient.py
\ No newline at end of file
diff --git a/docs/datadictionary/index.rst b/docs/datadictionary/index.rst
new file mode 100644 (file)
index 0000000..83c6e47
--- /dev/null
@@ -0,0 +1,45 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2019 IBM.
+
+Resource Definition 
+-------------------
+.. toctree::
+   :maxdepth: 1
+
+Introduction:
+=============
+A Resource Definition defines a specifc resource that can be resolved using the bellow supported sources.
+
+A Resource Definition can support multiple sources.
+
+The main goal of Resource Definition is to define generic entity that could be shared accross services.
+
+
+Resolution sources:
+===================
+
+   * Input
+   * Default
+   * DB
+   * REST
+   * Capability
+
+Artifacts:
+==========
+
+   * artifact-mapping-resource
+   * artifact-template-velocity
+   * artifact-directed-graph
+
+Node type:
+==========
+       
+   * component-resource-resolution
+   * component-jython-executor
+   * component-netconf-executor
+   * component-restconf-executor
+
+Data type:
+==========
+   * vnf-netconf-device
\ No newline at end of file
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644 (file)
index 0000000..f46653a
--- /dev/null
@@ -0,0 +1,45 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2019 IBM.
+
+CONTROLLER DESIGN STUDIO (CDS) 
+------------------------------
+.. toctree::
+   :maxdepth: 1
+   
+Introduction:
+=============
+The system is designed to be self service, which means that users, not just programmers, can reconfigure the software system as needed to meet customer requirements. To accomplish this goal, the system is built around models that provide for real-time changes in how the system operates.  Users merely need to change a model to change how a service operates.
+Self service is a completely new way of delivering services.  It removes the dependence on code releases and the delays they cause and puts the control of services into the hands of the service providers.  They can change a model and its parameters and create a new service without writing a single line of code.  
+This makes SERVICE PROVIDER(S) more responsive to its customers and able to deliver products that more closely match the needs of its customers.
+
+Design tools:
+=============
+.. toctree::
+   :maxdepth: 1
+   :glob:
+
+   CBA/index
+   datadictionary/index
+
+
+Architecture:
+=============
+The Controller Design Studio is composed of two major components: 
+       * The GUI (or frontend)
+       * The Run Time (or backend)  
+The GUI handles direct user input and allows for displaying both design time and run time activities.  For design time, it allows for the creation of controller blueprint, from selecting the DGs to be included, to incorporating the artifact templates, to adding necessary components.  For run time, it allows the user to direct the system to resolve the unresolved elements of the controller blueprint and download the resulting configuration into a VNF.  At a more basic level, it allows for creation of data dictionaries, capabilities catalogs, and controller blueprint, the basic elements that are used to generate a configuration. The essential function of the Controller Design Studio is to create and populate a controller blueprint, create a configuration file from this Controller blueprint, and download this configuration file (configlet) to a VNF/PNF.
+
+Resource assignment:
+=====================
+.. toctree::
+   :maxdepth: 1
+   :glob:
+   
+   resourceassignment
+
+ResolutionHelper:
+=================
+When executing a component executor script, designer might want to perform resource resolution along with template meshing directly from the script itself.
+
+The helper can be find here: https://github.com/onap/ccsdk-apps/blob/master/components/scripts/python/ccsdk_netconf/common.py
\ No newline at end of file
diff --git a/docs/logging.rst b/docs/logging.rst
new file mode 100644 (file)
index 0000000..c6cfad9
--- /dev/null
@@ -0,0 +1,16 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2019 IBM.
+
+Logging
+-------
+.. toctree::
+   :maxdepth: 1
+
+CCSDK uses slf4j to log messages to the standard OpenDaylight karaf.log
+log file.
+
+Where to Access Information
+---------------------------
+Logs are found within the SDNC docker container, in the directory
+/opt/opendaylight/current/data/logs.
\ No newline at end of file
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
new file mode 100644 (file)
index 0000000..a53419f
--- /dev/null
@@ -0,0 +1,8 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2019 IBM.
+
+Release-Notes
+-------------
+.. toctree::
+   :maxdepth: 1
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644 (file)
index 0000000..1d69d2f
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,136 @@
+<!--
+============LICENSE_START==========================================
+===================================================================
+Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the License);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+============LICENSE_END============================================ -->
+
+<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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+               <groupId>org.onap.ccsdk.parent</groupId>
+               <artifactId>spring-boot-starter-parent</artifactId>
+               <version>1.2.1-SNAPSHOT</version>
+               <relativePath/>
+       </parent>
+
+    <groupId>org.onap.ccsdk.cds</groupId>
+    <artifactId>controller-design-studio</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+
+    <name>controller-design-studio</name>
+    <description>Creates Controller Design Studio UI Docker container</description>
+
+    <properties>
+        <image.name>onap/ccsdk-cds-ui</image.name>
+        <ccsdk.project.version>${project.version}</ccsdk.project.version>
+             <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version>
+        <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+       <docker.verbose>true</docker.verbose>
+    </properties>
+
+<!--
+       <modules>
+               <module>cds-ui/client</module>
+               <module>cds-ui/server</module>
+       </modules>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <npm.executable>npm</npm.executable>
+        <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+    </properties>
+-->
+
+<build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.groovy.maven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <source>${basedir}/TagVersion.groovy</source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.28.0</version>
+                        <inherited>false</inherited>
+                        <configuration>
+                            <images>
+                                <image>
+                                    <name>${image.name}</name>
+                                    <build>
+                                        <cleanup>try</cleanup>
+                                        <dockerFileDir>${basedir}/cds-ui</dockerFileDir>
+                                        <tags>
+                                            <tag>${project.docker.latestminortag.version}</tag>
+                                            <tag>${project.docker.latestfulltag.version}</tag>
+                                            <tag>${project.docker.latesttagtimestamp.version}</tag>
+                                        </tags>
+                                    </build>
+                                </image>
+                            </images>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>generate-images</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+
+                            <execution>
+                                <id>push-images</id>
+                                <phase>deploy</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                    <goal>push</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+    <organization>
+        <name>ONAP</name>
+    </organization>
+
+</project>
diff --git a/version.properties b/version.properties
new file mode 100644 (file)
index 0000000..1da7b9a
--- /dev/null
@@ -0,0 +1,15 @@
+###########################################################
+# Versioning variables
+# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... )
+# because they are used in Jenkins, whose plug-in doesn't support
+
+
+release_name=1
+sprint_number=0
+feature_revision=0
+
+base_version=${release_name}.${sprint_number}.${feature_revision}
+
+release_version=${base_version}
+snapshot_version=${base_version}-SNAPSHOT
+