Revert "Renaming Files having BluePrint to have Blueprint"
The renaming in CCSDK-3098 caused breaking changes to the grpc api and
compile issues for kotlin scripts.
Issue-ID: CCSDK-3385
Change-Id: I0d745cb858371678eabcb2284671c1fd76a1ab6d
Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
index bc523c3..ed01e63 100644
--- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
+++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/search-template/search-template.component.ts
@@ -39,7 +39,7 @@
})
export class SearchTemplateComponent implements OnInit {
file: File;
- localBlueprintData: IBlueprint;
+ localBluePrintData: IBlueprint;
fileText: object[];
blueprintState: IBlueprintState;
bpState: Observable<IBlueprintState>;
@@ -99,7 +99,7 @@
entryDefinition: this.entryDefinition
}
this.store.dispatch(new SetBlueprintState(blueprintState))
-
+
}
async buildFileViewData(zip) {
diff --git a/cds-ui/designer-client/src/app/common/constants/app-constants.ts b/cds-ui/designer-client/src/app/common/constants/app-constants.ts
index 83b56a6..6f64ee1 100644
--- a/cds-ui/designer-client/src/app/common/constants/app-constants.ts
+++ b/cds-ui/designer-client/src/app/common/constants/app-constants.ts
@@ -98,7 +98,7 @@
download: '/controllerblueprint/download-blueprint/',
deploy: '/controllerblueprint/deploy-blueprint',
getMetaDate: '/controllerblueprint/meta-data/',
- countOfAllBlueprints: '/controllerblueprint/list/count',
+ countOfAllBluePrints: '/controllerblueprint/list/count',
getMetaDatePageable: '/controllerblueprint/metadata/paged',
getBlueprintByName: '/controllerblueprint/by-name/'
};
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/blueprint.page.mock.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/blueprint.page.mock.ts
index 1cd054d..d69f2fa 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/blueprint.page.mock.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/blueprint.page.mock.ts
@@ -1,7 +1,7 @@
-import {BlueprintPage} from './model/Blueprint.model';
+import {BluePrintPage} from './model/BluePrint.model';
import {PackagesDashboardState} from './model/packages-dashboard.state';
-export function getBlueprintPageMock(): BlueprintPage {
+export function getBluePrintPageMock(): BluePrintPage {
return {
content: [
{
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html
index 1239620..e3c584a 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.html
@@ -84,7 +84,7 @@
<ngx-ui-loader></ngx-ui-loader>
<div class="container">
<div class="creat-action-container">
- <button class="action-button save" (click)="editBlueprint()" [disabled]="!isSaveEnabled">
+ <button class="action-button save" (click)="editBluePrint()" [disabled]="!isSaveEnabled">
<i class="icon-save-sm" aria-hidden="true"></i>
<span>Save</span>
</button>
@@ -726,7 +726,7 @@
</div>
</div>
</div>
- <button type="button" class="btn btn-sm mb-2 btn-enrich" (click)="enrichBlueprint()">
+ <button type="button" class="btn btn-sm mb-2 btn-enrich" (click)="enrichBluePrint()">
<!-- data-toggle="modal" data-target="#enrichModal"-->
<i class="icon-enrich" aria-hidden="true"></i> Enrich
@@ -832,7 +832,7 @@
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button type="button" data-dismiss="modal" class="btn btn-primary btn-enrich"
- (click)="enrichBlueprint()">Enrich
+ (click)="enrichBluePrint()">Enrich
</button>
</div>
</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
index 0625394..0d92aad 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.component.ts
@@ -1,6 +1,6 @@
import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
-import { BlueprintDetailModel } from '../model/Blueprint.detail.model';
+import { BluePrintDetailModel } from '../model/BluePrint.detail.model';
import { PackageCreationStore } from '../package-creation/package-creation.store';
import { FilesContent, FolderNodeElement } from '../package-creation/mapping-models/metadata/MetaDataTab.model';
import { MetadataTabComponent } from '../package-creation/metadata-tab/metadata-tab.component';
@@ -28,7 +28,7 @@
styleUrls: ['./configuration-dashboard.component.css'],
})
export class ConfigurationDashboardComponent extends ComponentCanDeactivate implements OnInit, OnDestroy {
- viewedPackage: BlueprintDetailModel = new BlueprintDetailModel();
+ viewedPackage: BluePrintDetailModel = new BluePrintDetailModel();
@ViewChild(MetadataTabComponent, { static: false })
metadataTabComponent: MetadataTabComponent;
public customActionName = '';
@@ -129,7 +129,7 @@
});
}
- private downloadCBAPackage(bluePrintDetailModels: BlueprintDetailModel) {
+ private downloadCBAPackage(bluePrintDetailModels: BluePrintDetailModel) {
this.configurationDashboardService.downloadResource(
this.viewedPackage.artifactName + '/' + this.viewedPackage.artifactVersion).subscribe(response => {
const blob = new Blob([response], { type: 'application/octet-stream' });
@@ -144,11 +144,11 @@
});
}
- editBlueprint() {
+ editBluePrint() {
this.ngxService.start();
this.configurationDashboardService.deletePackage(this.packageId).subscribe(res => {
this.formTreeData();
- this.saveBlueprintToDataBase();
+ this.saveBluePrintToDataBase();
});
}
@@ -167,7 +167,7 @@
this.metadataTabComponent.saveMetaDataToStore();
}
- saveBlueprintToDataBase() {
+ saveBluePrintToDataBase() {
this.create();
this.zipFile.generateAsync({ type: 'blob' })
.then(blob => {
@@ -253,7 +253,7 @@
this.cbaPackage.templateTopology.content = this.vlbDefinition.topology_template.content;
}
- enrichBlueprint() {
+ enrichBluePrint() {
this.ngxService.start();
this.packageCreationStore.addTopologyTemplate(this.cbaPackage.templateTopology);
this.formTreeData();
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.service.ts
index a8dfeaf..c7f5571 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.service.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/configuration-dashboard/configuration-dashboard.service.ts
@@ -2,23 +2,23 @@
import { ApiService } from '../../../../common/core/services/api.typed.service';
import { BlueprintURLs } from '../../../../common/constants/app-constants';
import { Observable } from 'rxjs';
-import { BlueprintDetailModel } from '../model/Blueprint.detail.model';
+import { BluePrintDetailModel } from '../model/BluePrint.detail.model';
@Injectable({
providedIn: 'root'
})
export class ConfigurationDashboardService {
- constructor(private api: ApiService<BlueprintDetailModel>) {
+ constructor(private api: ApiService<BluePrintDetailModel>) {
}
- private getBlueprintModel(id: string): Observable<BlueprintDetailModel> {
+ private getBluePrintModel(id: string): Observable<BluePrintDetailModel> {
return this.api.getOne(BlueprintURLs.getOneBlueprint + '/' + id);
}
getPagedPackages(id: string) {
- return this.getBlueprintModel(id);
+ return this.getBluePrintModel(id);
}
public downloadResource(path: string) {
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html
index 0c542e0..d1b5eca 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.html
@@ -90,13 +90,13 @@
<div class="dropdown-text">Save</div>
<ul class="dropdown-content save-blueprint">
<li>
- <a (click)="saveBlueprint()"><i class="icon-save-sm" aria-hidden="true"></i> Save</a>
+ <a (click)="saveBluePrint()"><i class="icon-save-sm" aria-hidden="true"></i> Save</a>
</li>
<!-- <li>
- <a (click)="enrichBlueprint()"><i class="icon-enrich" aria-hidden="true"></i> Enrich</a>
+ <a (click)="enrichBluePrint()"><i class="icon-enrich" aria-hidden="true"></i> Enrich</a>
</li> -->
<li>
- <a (click)="enrichBlueprint()"><i class="fa fa-play-circle" aria-hidden="true"></i> Enrich & Deploy</a>
+ <a (click)="enrichBluePrint()"><i class="fa fa-play-circle" aria-hidden="true"></i> Enrich & Deploy</a>
</li>
</ul>
</div>
@@ -340,7 +340,7 @@
</div>
</div>
</div>
- <app-functions-attribute (saveEvent)="saveBlueprint()"></app-functions-attribute>
+ <app-functions-attribute (saveEvent)="saveBluePrint()"></app-functions-attribute>
</div>
</div>
</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
index adcc08c..652d235 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.component.ts
@@ -37,7 +37,7 @@
import { FunctionsStore } from './functions.store';
import { Subject } from 'rxjs';
import { distinctUntilChanged, takeUntil } from 'rxjs/operators';
-import { BlueprintDetailModel } from '../model/Blueprint.detail.model';
+import { BluePrintDetailModel } from '../model/BluePrint.detail.model';
import { ActivatedRoute, Router } from '@angular/router';
import { DesignerService } from './designer.service';
import { FilesContent, FolderNodeElement } from '../package-creation/mapping-models/metadata/MetaDataTab.model';
@@ -66,7 +66,7 @@
controllerSideBar: boolean;
actionAttributesSideBar: boolean;
functionAttributeSidebar: boolean;
- viewedPackage: BlueprintDetailModel = new BlueprintDetailModel();
+ viewedPackage: BluePrintDetailModel = new BluePrintDetailModel();
customActionName: string;
showAction: boolean;
cl = 'editBar';
@@ -125,7 +125,7 @@
this.actionAttributesSideBar = !this.actionAttributesSideBar;
}
- publishBlueprint() {
+ publishBluePrint() {
this.create();
this.zipFile.generateAsync({ type: 'blob' })
.then(blob => {
@@ -138,7 +138,7 @@
this.toastService.error(error.message, 'Package error');
console.log(error);
}, () => {
- // this.deployBlueprint = false;
+ // this.deployBluePrint = false;
});
});
}
@@ -456,7 +456,7 @@
this.ngUnsubscribe.complete();
}
- saveBlueprint() {
+ saveBluePrint() {
this.ngxService.start();
FilesContent.clear();
let packageCreationModes: PackageCreationModes;
@@ -468,11 +468,11 @@
});
packageCreationModes.execute(this.cbaPackage, this.packageCreationUtils);
this.filesData.push(this.folder.TREE_DATA);
- this.saveBlueprintToDataBase();
+ this.saveBluePrintToDataBase();
}
- enrichBlueprint() {
+ enrichBluePrint() {
this.ngxService.start();
console.log('start enrich ------------');
this.packageCreationStore.addTopologyTemplate(this.cbaPackage.templateTopology);
@@ -529,7 +529,7 @@
}
- saveBlueprintToDataBase() {
+ saveBluePrintToDataBase() {
this.create();
this.zipFile.generateAsync({ type: 'blob' })
.then(blob => {
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.service.ts
index 28ef7ee..c0d79ca 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.service.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/designer.service.ts
@@ -26,7 +26,7 @@
import { ApiService } from '../../../../common/core/services/api.typed.service';
import { ResourceDictionaryURLs, BlueprintURLs } from '../../../../common/constants/app-constants';
import { ModelType } from './model/ModelType.model';
-import { BlueprintDetailModel } from '../model/Blueprint.detail.model';
+import { BluePrintDetailModel } from '../model/BluePrint.detail.model';
@Injectable({
@@ -36,7 +36,7 @@
constructor(
private api: ApiService<ModelType>,
- private api2: ApiService<BlueprintDetailModel>
+ private api2: ApiService<BluePrintDetailModel>
) {
}
@@ -44,12 +44,12 @@
return this.api.get(ResourceDictionaryURLs.getResourceDictionary + '/' + modelDefinitionType);
}
- private getBlueprintModel(id: string): Observable<BlueprintDetailModel> {
+ private getBluePrintModel(id: string): Observable<BluePrintDetailModel> {
return this.api2.getOne(BlueprintURLs.getOneBlueprint + '/' + id);
}
getPagedPackages(id: string) {
- return this.getBlueprintModel(id);
+ return this.getBluePrintModel(id);
}
publishBlueprint(body: any | null, options?: any): Observable<any> {
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.ts
index c48136e..ae4d09d 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.component.ts
@@ -3,7 +3,7 @@
import { PackageCreationUtils } from '../../package-creation/package-creation.utils';
import { RouterLink, Router, ActivatedRoute } from '@angular/router';
import { Subject } from 'rxjs';
-import { BlueprintDetailModel } from '../../model/Blueprint.detail.model';
+import { BluePrintDetailModel } from '../../model/BluePrint.detail.model';
import { viewClassName } from '@angular/compiler';
import { SourceViewService } from './source-view.service';
@@ -19,7 +19,7 @@
lang = 'json';
controllerSideBar: boolean;
ngUnsubscribe = new Subject();
- viewedPackage: BlueprintDetailModel = new BlueprintDetailModel();
+ viewedPackage: BluePrintDetailModel = new BluePrintDetailModel();
public customActionName = '';
cl = 'editBar';
packageId: string;
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.service.ts
index 4ffd8a1..7589522 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.service.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/source-view/source-view.service.ts
@@ -1,7 +1,7 @@
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs';
import { ApiService } from 'src/app/common/core/services/api.typed.service';
-import { BlueprintDetailModel } from '../../model/Blueprint.detail.model';
+import { BluePrintDetailModel } from '../../model/BluePrint.detail.model';
import { ModelType } from '../model/ModelType.model';
import { ResourceDictionaryURLs, BlueprintURLs } from 'src/app/common/constants/app-constants';
@@ -12,15 +12,15 @@
})
export class SourceViewService {
- constructor(private api1: ApiService<BlueprintDetailModel>) {
+ constructor(private api1: ApiService<BluePrintDetailModel>) {
}
- private getBlueprintModel(id: string): Observable<BlueprintDetailModel> {
+ private getBluePrintModel(id: string): Observable<BluePrintDetailModel> {
return this.api1.getOne(BlueprintURLs.getOneBlueprint + '/' + id);
}
getPagedPackages(id: string) {
- return this.getBlueprintModel(id);
+ return this.getBluePrintModel(id);
}
}
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.detail.model.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.detail.model.ts
similarity index 84%
rename from cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.detail.model.ts
rename to cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.detail.model.ts
index 160285b..ff01695 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.detail.model.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.detail.model.ts
@@ -20,9 +20,9 @@
*/
import {Page} from 'src/app/common/model/page';
-import {BlueprintModel} from './Blueprint.model';
+import {BlueprintModel} from './BluePrint.model';
-export class BlueprintDetailModel extends BlueprintModel {
+export class BluePrintDetailModel extends BlueprintModel {
blueprintModelContent: BlueprintModelContent;
}
@@ -36,7 +36,7 @@
}
/*
-export class BlueprintDetailModelContent {
- bluePrintDetailsModels: BlueprintDetailModel[];
+export class BluePrintDetailModelContent {
+ bluePrintDetailsModels: BluePrintDetailModel[];
}*/
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.model.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.model.ts
similarity index 95%
rename from cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.model.ts
rename to cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.model.ts
index ecc0062..712b53b 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/Blueprint.model.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/BluePrint.model.ts
@@ -37,5 +37,5 @@
tags: string;
}
-export class BlueprintPage extends Page<BlueprintModel> {
+export class BluePrintPage extends Page<BlueprintModel> {
}
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/package-dashboard.state.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/package-dashboard.state.ts
index b6cf7fb..b010f7a 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/package-dashboard.state.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/package-dashboard.state.ts
@@ -20,11 +20,11 @@
*/
-import { BlueprintDetailModel } from './Blueprint.detail.model';
+import { BluePrintDetailModel } from './BluePrint.detail.model';
import { Mapping, Scripts, Template } from '../package-creation/mapping-models/CBAPacakge.model';
export class PackageDashboardState {
- configuration: BlueprintDetailModel;
+ configuration: BluePrintDetailModel;
public scripts: Scripts;
public templates: Template;
public mapping: Mapping;
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/packages-dashboard.state.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/packages-dashboard.state.ts
index f7c5bb7..f4f56c5 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/packages-dashboard.state.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/model/packages-dashboard.state.ts
@@ -19,12 +19,12 @@
============LICENSE_END============================================
*/
-import {BlueprintPage} from './Blueprint.model';
+import {BluePrintPage} from './BluePrint.model';
export class PackagesDashboardState {
- page: BlueprintPage;
- filteredPackages: BlueprintPage;
+ page: BluePrintPage;
+ filteredPackages: BluePrintPage;
command: string;
currentPage = 0;
totalPackages: number;
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts
index 0c1d0cf..d5a2f11 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts
@@ -111,7 +111,7 @@
console.log('in validate');
console.log('in this.metaDataTab.name' + this.metaDataTab.name);
if (this.metaDataTab.name && this.metaDataTab.version) {
- this.packageCreationService.checkBlueprintNameAndVersion(this.metaDataTab.name, this.metaDataTab.version).then(element => {
+ this.packageCreationService.checkBluePrintNameAndVersion(this.metaDataTab.name, this.metaDataTab.version).then(element => {
if (element) {
this.errorMessage = 'Package name already exists with this version. Use different name or different version number.';
} else if (!this.metaDataTab.version.match(this.versionPattern)) {
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts
index 389e957..585c169 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation-extraction.service.ts
@@ -7,7 +7,7 @@
import {PackageCreationUtils} from './package-creation.utils';
import {MetadataTabComponent} from './metadata-tab/metadata-tab.component';
import {DesignerStore} from '../designer/designer.store';
-import {BlueprintDetailModel} from '../model/Blueprint.detail.model';
+import {BluePrintDetailModel} from '../model/BluePrint.detail.model';
@Injectable({
providedIn: 'root'
@@ -140,7 +140,7 @@
this.packageCreationStore.changeMetaData(metaDataObject);
}
- public setMetaDataWithObject(metaDataObject: MetaDataTabModel, bluePrintDetailModel: BlueprintDetailModel) {
+ public setMetaDataWithObject(metaDataObject: MetaDataTabModel, bluePrintDetailModel: BluePrintDetailModel) {
metaDataObject.description = bluePrintDetailModel.artifactDescription;
this.packageCreationStore.changeMetaData(metaDataObject);
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html
index 9398bb9..d188dbf 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.html
@@ -78,13 +78,13 @@
</header>
<div class="container-fluid body-container">
- <ngx-ui-loader></ngx-ui-loader>
+ <ngx-ui-loader></ngx-ui-loader>
<div class="container">
<div class="creat-action-container">
- <!-- <a class="action-button save" [hidden]="!isSaveEnabled" (click)="saveBlueprint()">
+ <!-- <a class="action-button save" [hidden]="!isSaveEnabled" (click)="saveBluePrint()">
<i class="icon-save-sm" aria-hidden="true"></i>
<span>Save</span>-->
- <button tourAnchor="packageSave" (click)="saveBlueprint()" [disabled]="!isSaveEnabled"
+ <button tourAnchor="packageSave" (click)="saveBluePrint()" [disabled]="!isSaveEnabled"
class="action-button save" aria-hidden="true"><i class="icon-save-sm" aria-hidden="true"></i>
<span>Save</span></button>
</div>
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts
index dc2b4dc..1d23405 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.component.ts
@@ -109,7 +109,7 @@
// this.tourService.goto(step);
}
- saveBlueprint() {
+ saveBluePrint() {
this.ngxService.start();
console.log(this.cbaPackage);
FilesContent.clear();
@@ -121,13 +121,13 @@
// this.cbaPackage.templateTopology.content = this.designerStore.state.sourceContent;
packageCreationModes.execute(this.cbaPackage, this.packageCreationUtils);
this.filesData.push(this.folder.TREE_DATA);
- this.saveBlueprintToDataBase();
+ this.saveBluePrintToDataBase();
}
- saveBlueprintToDataBase() {
+ saveBluePrintToDataBase() {
this.create();
this.zipFile.generateAsync({ type: 'blob' })
.then(blob => {
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts
index ee8644e..1e0e36a 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.service.ts
@@ -67,12 +67,12 @@
return this.api.post(BlueprintURLs.enrichandpublish, body, {responseType: 'text'});
}
- private deployBlueprint(body: any | null, options?: any): Observable<any> {
+ private deployBluePrint(body: any | null, options?: any): Observable<any> {
return this.api.post(BlueprintURLs.deploy, body, {responseType: 'text'});
}
- async checkBlueprintNameAndVersion(name: string, version: string): Promise<boolean> {
- return await this.packagesListService.checkBlueprintIfItExists(name, version)
+ async checkBluePrintNameAndVersion(name: string, version: string): Promise<boolean> {
+ return await this.packagesListService.checkBluePrintIfItExists(name, version)
.then(bluePrintModelsResult => bluePrintModelsResult != null && bluePrintModelsResult.length > 0);
}
@@ -97,7 +97,7 @@
deploy(blob) {
const formData = this.getFormData(blob);
- return this.deployBlueprint(formData);
+ return this.deployBluePrint(formData);
}
private getFormData(blob) {
@@ -114,7 +114,7 @@
return this.api.getCustomized(BlueprintURLs.download + id, {responseType: 'blob'});
}
- public saveBlueprintToDataBase(): Observable<string> {
+ public saveBluePrintToDataBase(): Observable<string> {
this.formTreeData();
this.create();
const subject = new Subject<any>();
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts
index 1fab559..8275f8c 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-api.service.ts
@@ -23,7 +23,7 @@
import {Observable} from 'rxjs';
import {ApiService} from '../../../common/core/services/api.typed.service';
import {BlueprintURLs} from '../../../common/constants/app-constants';
-import {BlueprintModel, BlueprintPage} from './model/Blueprint.model';
+import {BlueprintModel, BluePrintPage} from './model/BluePrint.model';
@Injectable({
@@ -33,10 +33,10 @@
packages: BlueprintModel[] = [];
private numberOfPackages: number;
- constructor(private api: ApiService<BlueprintPage>) {
+ constructor(private api: ApiService<BluePrintPage>) {
}
- getPagedPackages(pageNumber: number, pageSize: number, sortBy: string): Observable<BlueprintPage[]> {
+ getPagedPackages(pageNumber: number, pageSize: number, sortBy: string): Observable<BluePrintPage[]> {
const sortType = sortBy.includes('DATE') ? 'DESC' : 'ASC';
return this.api.get(BlueprintURLs.getPagedBlueprints, {
offset: pageNumber,
@@ -46,7 +46,7 @@
});
}
- async checkBlueprintIfItExists(name: string, version: string): Promise<BlueprintPage[]> {
+ async checkBluePrintIfItExists(name: string, version: string): Promise<BluePrintPage[]> {
return await this.api.get(BlueprintURLs.getBlueprintByName + '/' + name + '/version/' + version).toPromise();
}
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/filter-by-tags/filter-by-tags.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/filter-by-tags/filter-by-tags.component.ts
index b32b2b1..6f02bba 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/filter-by-tags/filter-by-tags.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/filter-by-tags/filter-by-tags.component.ts
@@ -21,7 +21,7 @@
import {Component, ElementRef, OnInit, QueryList, ViewChildren} from '@angular/core';
import {PackagesStore} from '../../packages.store';
-import {BlueprintModel, BlueprintPage} from '../../model/Blueprint.model';
+import {BlueprintModel, BluePrintPage} from '../../model/BluePrint.model';
@Component({
selector: 'app-filter-by-tags',
@@ -31,7 +31,7 @@
export class TagsFilteringComponent implements OnInit {
- page: BlueprintPage;
+ page: BluePrintPage;
tags: string[] = [];
viewedTags: string[] = [];
searchTag = '';
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.spec.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.spec.ts
index 6068697..000f9ed 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.spec.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.spec.ts
@@ -2,7 +2,7 @@
import { PackageListComponent } from './package-list.component';
import { PackagesStore } from '../../packages.store';
-import { getBlueprintPageMock } from '../../blueprint.page.mock';
+import { getBluePrintPageMock } from '../../blueprint.page.mock';
import { of } from 'rxjs';
import {PackagesDashboardState} from '../../model/packages-dashboard.state';
@@ -14,7 +14,7 @@
beforeEach(async(() => {
const dashBoard = new PackagesDashboardState();
- dashBoard.page = getBlueprintPageMock();
+ dashBoard.page = getBluePrintPageMock();
store = { state$: of(dashBoard) };
TestBed.configureTestingModule({
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts
index c2b597c..2f151d1 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/package-list/package-list.component.ts
@@ -1,5 +1,5 @@
import {Component, OnInit} from '@angular/core';
-import {BlueprintModel} from '../../model/Blueprint.model';
+import {BlueprintModel} from '../../model/BluePrint.model';
import {PackagesStore} from '../../packages.store';
import {Router} from '@angular/router';
import {ConfigurationDashboardService} from '../../configuration-dashboard/configuration-dashboard.service';
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-header/packages-header.component.spec.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-header/packages-header.component.spec.ts
index 4b572e0..39228af 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-header/packages-header.component.spec.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages-dashboard/packages-header/packages-header.component.spec.ts
@@ -4,7 +4,7 @@
import {PackagesStore} from '../../packages.store';
import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
import {PackagesDashboardState} from '../../model/packages-dashboard.state';
-import {getBlueprintPageMock} from '../../blueprint.page.mock';
+import {getBluePrintPageMock} from '../../blueprint.page.mock';
import {of} from 'rxjs';
import {By} from '@angular/platform-browser';
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.spec.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.spec.ts
index e65f059..379aadd 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.spec.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.spec.ts
@@ -3,14 +3,14 @@
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { PackagesApiService } from './packages-api.service';
import { of } from 'rxjs';
-import { BlueprintPage } from './model/Blueprint.model';
-import { getBlueprintPageMock } from './blueprint.page.mock';
+import { BluePrintPage } from './model/BluePrint.model';
+import { getBluePrintPageMock } from './blueprint.page.mock';
import { PackagesDashboardState } from './model/packages-dashboard.state';
describe('PackagesStore', () => {
// store: PackagesStore;
- const MOCK_BLUEPRINTS_PAGE: BlueprintPage = getBlueprintPageMock();
+ const MOCK_BLUEPRINTS_PAGE: BluePrintPage = getBluePrintPageMock();
let httpMock: HttpTestingController;
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts
index 02682aa..1e52e31 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/packages.store.ts
@@ -20,7 +20,7 @@
*/
import {Injectable} from '@angular/core';
-import {BlueprintPage} from './model/Blueprint.model';
+import {BluePrintPage} from './model/BluePrint.model';
import {Store} from '../../../common/core/stores/Store';
import {PackagesApiService} from './packages-api.service';
import {PackagesDashboardState} from './model/packages-dashboard.state';
@@ -33,7 +33,7 @@
export class PackagesStore extends Store<PackagesDashboardState> {
// TDOD fixed for now as there is no requirement to change it from UI
public pageSize = 15;
- private bluePrintContent: BlueprintPage = new BlueprintPage();
+ private bluePrintContent: BluePrintPage = new BluePrintPage();
constructor(
private packagesServiceList: PackagesApiService,
@@ -83,7 +83,7 @@
protected getPagedPackages(pageNumber: number, pageSize: number, sortBy: string = this.state.sortBy) {
this.packagesServiceList.getPagedPackages(pageNumber, pageSize, sortBy)
- .subscribe((pages: BlueprintPage[]) => {
+ .subscribe((pages: BluePrintPage[]) => {
this.setState({
...this.state,
page: pages[0],
@@ -105,7 +105,7 @@
private searchPagedPackages(keyWord: string, pageNumber: number, pageSize: number, sortBy: string = this.state.sortBy) {
this.packagesServiceList.getPagedPackagesByKeyWord(keyWord, pageNumber, pageSize, sortBy)
- .subscribe((pages: BlueprintPage[]) => {
+ .subscribe((pages: BluePrintPage[]) => {
this.setState({
...this.state,
page: pages[0],
@@ -129,7 +129,7 @@
private getPagedPackagesByTags(keyWord: string, currentPage1: number, pageSize: number, sortBy1: string, tagsSearchable: string[]) {
this.getPagedPackagesByKeyWordFilteredByTags(tagsSearchable)
- .subscribe((pages: BlueprintPage) => {
+ .subscribe((pages: BluePrintPage) => {
this.setState({
...this.state,
page: this.state.page,
diff --git a/cds-ui/server/src/clients/blueprint-management-service-grpc-client.ts b/cds-ui/server/src/clients/blueprint-management-service-grpc-client.ts
index b54a1d1..8975f45 100644
--- a/cds-ui/server/src/clients/blueprint-management-service-grpc-client.ts
+++ b/cds-ui/server/src/clients/blueprint-management-service-grpc-client.ts
@@ -35,14 +35,14 @@
const protoDescriptor = grpc.loadPackageDefinition(packageDefinition);
// The protoDescriptor object has the full package hierarchy
-const stub = new protoDescriptor.org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService(
+const stub = new protoDescriptor.org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService(
"" + processorApiConfig.grpc.host + ":" + processorApiConfig.grpc.port + "",
grpc.credentials.createInsecure());
const metadata = new grpc.Metadata();
metadata.add('Authorization', processorApiConfig.grpc.authToken);
-class BlueprintManagementServiceGrpcClient {
+class BluePrintManagementServiceGrpcClient {
async uploadBlueprint(filePath: string, actionName: string): Promise<any> {
@@ -115,5 +115,5 @@
}
}
-export const bluePrintManagementServiceGrpcClient = new BlueprintManagementServiceGrpcClient();
+export const bluePrintManagementServiceGrpcClient = new BluePrintManagementServiceGrpcClient();
diff --git a/cds-ui/server/src/config/app-config.ts b/cds-ui/server/src/config/app-config.ts
index 68bb74c..5b4a6ec 100644
--- a/cds-ui/server/src/config/app-config.ts
+++ b/cds-ui/server/src/config/app-config.ts
@@ -39,7 +39,7 @@
authToken: process.env.API_BLUEPRINT_PROCESSOR_GRPC_AUTH_TOKEN || "Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==",
bluePrintManagement: Object.freeze({
//this path is relative to 'dist' folder
- protoPath: __dirname + '../../../proto/BlueprintManagement.proto'
+ protoPath: __dirname + '../../../proto/BluePrintManagement.proto'
})
})
});
diff --git a/cds-ui/server/src/controllers/blueprint-rest.controller.ts b/cds-ui/server/src/controllers/blueprint-rest.controller.ts
index 3bbb7f6..a8b989f 100644
--- a/cds-ui/server/src/controllers/blueprint-rest.controller.ts
+++ b/cds-ui/server/src/controllers/blueprint-rest.controller.ts
@@ -58,8 +58,8 @@
},
},
})
- async getOneBlueprint(@param.path.string('id') id: string) {
- return await this.bpservice.getOneBlueprint(id);
+ async getOneBluePrint(@param.path.string('id') id: string) {
+ return await this.bpservice.getOneBluePrint(id);
}
@del('/controllerblueprint/{id}', {
@@ -70,8 +70,8 @@
},
},
})
- async deleteBlueprint(@param.path.string('id') id: string) {
- return await this.bpservice.deleteBlueprint(id);
+ async deleteBluePrint(@param.path.string('id') id: string) {
+ return await this.bpservice.deleteBluePrint(id);
}
diff --git a/cds-ui/server/src/datasources/blueprint.datasource-template.ts b/cds-ui/server/src/datasources/blueprint.datasource-template.ts
index e2bf582..dc1cd37 100644
--- a/cds-ui/server/src/datasources/blueprint.datasource-template.ts
+++ b/cds-ui/server/src/datasources/blueprint.datasource-template.ts
@@ -33,7 +33,7 @@
"responsePath": "$.*"
},
"functions": {
- "getOneBlueprint": ["id"]
+ "getOneBluePrint": ["id"]
}
},
@@ -49,7 +49,7 @@
"responsePath": "$.*"
},
"functions": {
- "deleteBlueprint": ["id"]
+ "deleteBluePrint": ["id"]
}
},
diff --git a/cds-ui/server/src/services/blueprint.service.ts b/cds-ui/server/src/services/blueprint.service.ts
index 4333011..a017e6e 100644
--- a/cds-ui/server/src/services/blueprint.service.ts
+++ b/cds-ui/server/src/services/blueprint.service.ts
@@ -3,8 +3,8 @@
import { BlueprintDataSource } from '../datasources';
export interface BlueprintService {
- getOneBlueprint(id: string): any;
- deleteBlueprint(id: string): any;
+ getOneBluePrint(id: string): any;
+ deleteBluePrint(id: string): any;
getAllblueprints(): Promise<any>;
getBlueprintsByKeyword(keyword: string): Promise<any>;
getByTags(tags: string): Promise<JSON>;
diff --git a/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinDayOneConfig.kt b/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinDayOneConfig.kt
index 1080418..9e2b463 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinDayOneConfig.kt
+++ b/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinDayOneConfig.kt
@@ -38,9 +38,9 @@
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.RestLoggerService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ArchiveType
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.storedContentFromResolvedArtifactNB
import org.slf4j.LoggerFactory
@@ -158,13 +158,13 @@
// Check if definition exists
if (!api.hasDefinition()) {
- throw BlueprintProcessorException("K8s Config Template ($vfModuleInvariantID/$vfModuleUUID) - $k8sConfigTemplateName not found ")
+ throw BluePrintProcessorException("K8s Config Template ($vfModuleInvariantID/$vfModuleUUID) - $k8sConfigTemplateName not found ")
}
log.info("Config Template name: $k8sConfigTemplateName")
if (k8sRbProfileName.equals("")) {
- throw BlueprintProcessorException("K8s rb profile name is empty! Either define profile name to use or choose default")
+ throw BluePrintProcessorException("K8s rb profile name is empty! Either define profile name to use or choose default")
}
var configTemplate = K8sConfigTemplate()
@@ -192,7 +192,7 @@
}
catch (e: Exception) {
log.info("Caught exception trying to get the vnf Details!!")
- // throw BlueprintProcessorException("${e.message}")
+ // throw BluePrintProcessorException("${e.message}")
}
}
@@ -206,7 +206,7 @@
val profileFile = profileFilePath.toFile()
if (!profileFile.exists())
- throw BlueprintProcessorException("K8s Profile template file $profileFilePath does not exists")
+ throw BluePrintProcessorException("K8s Profile template file $profileFilePath does not exists")
return profileFilePath
}
@@ -239,11 +239,11 @@
val templateFile = templateFilePath.toFile()
if (!templateFile.exists())
- throw BlueprintProcessorException("K8s Profile template file ${templateFilePath} does not exists")
+ throw BluePrintProcessorException("K8s Profile template file ${templateFilePath} does not exists")
log.info("Decompressing config template to ${destPath}")
- val decompressedProfile: File = BlueprintArchiveUtils.deCompress(templateFilePath.toFile(),
+ val decompressedProfile: File = BluePrintArchiveUtils.deCompress(templateFilePath.toFile(),
"${destPath}", ArchiveType.TarGz)
log.info("${templateFilePath.toString()} decompression completed")
@@ -280,13 +280,13 @@
log.info("Reading config template file: ${templateFilePath}")
if (!templateFile.exists())
- throw BlueprintProcessorException("config template file ${templateFilePath} does not exists")
+ throw BluePrintProcessorException("config template file ${templateFilePath} does not exists")
val tempMainPath: File = createTempDir("config-template-", "")
val tempConfigTemplatePath: File = createTempDir("conftemplate-", "", tempMainPath)
log.info("Decompressing profile to ${tempConfigTemplatePath.toString()}")
- val decompressedProfile2: File = BlueprintArchiveUtils.deCompress(templateFilePath.toFile(),
+ val decompressedProfile2: File = BluePrintArchiveUtils.deCompress(templateFilePath.toFile(),
"${tempConfigTemplatePath.toString()}", ArchiveType.TarGz)
log.info("${templateFilePath.toString()} decompression completed")
@@ -300,9 +300,9 @@
File(manifestFileName2).copyTo(File(destOverrideFile), true)
- if (!BlueprintArchiveUtils.compress(decompressedProfile2, templateFilePath.toFile(),
+ if (!BluePrintArchiveUtils.compress(decompressedProfile2, templateFilePath.toFile(),
ArchiveType.TarGz)) {
- throw BlueprintProcessorException("Profile compression has failed")
+ throw BluePrintProcessorException("Profile compression has failed")
}
log.info("${templateFilePath.toString()} compression completed")
@@ -348,7 +348,7 @@
return ""
} catch (e: Exception) {
log.info("Caught exception trying to get k8s instance details")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -417,7 +417,7 @@
return false
} catch (e: Exception) {
log.info("Caught exception trying to get k8s config trmplate definition")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -432,7 +432,7 @@
return false
} catch (e: Exception) {
log.info("Caught exception trying to get k8s config trmplate definition")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -453,7 +453,7 @@
}
} catch (e: Exception) {
log.info("Caught exception trying to create k8s config template ${profile.templateName} - updated")
- // throw BlueprintProcessorException("${e.message}")
+ // throw BluePrintProcessorException("${e.message}")
}
}
@@ -468,7 +468,7 @@
}
} catch (e: Exception) {
log.info("Caught exception trying to upload k8s config template ${profile.templateName}")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
}
diff --git a/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinK8sProfileUpload.kt b/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinK8sProfileUpload.kt
index e69bdbe..672c710 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinK8sProfileUpload.kt
+++ b/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinK8sProfileUpload.kt
@@ -38,9 +38,9 @@
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.RestLoggerService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ArchiveType
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.http.HttpHeaders
@@ -88,12 +88,12 @@
val api = K8sApi(k8sApiUsername, k8sApiPassword, baseK8sApiUrl, vfModuleModelInvariantUuid, vfModuleModelUuid)
if (!api.hasDefinition()) {
- throw BlueprintProcessorException("K8s RB Definition ($vfModuleModelInvariantUuid/$vfModuleModelUuid) not found ")
+ throw BluePrintProcessorException("K8s RB Definition ($vfModuleModelInvariantUuid/$vfModuleModelUuid) not found ")
}
log.info("k8s-rb-profile-name: $k8sRbProfileName")
if (k8sRbProfileName.equals("")) {
- throw BlueprintProcessorException("K8s rb profile name is empty! Either define profile name to use or choose default")
+ throw BluePrintProcessorException("K8s rb profile name is empty! Either define profile name to use or choose default")
}
if (k8sRbProfileName.equals("default") and api.hasProfile(k8sRbProfileName)) {
log.info("Using default profile - skipping upload")
@@ -126,13 +126,13 @@
val profileFile = profileFilePath.toFile()
if (!profileFile.exists())
- throw BlueprintProcessorException("K8s Profile template file $profileFilePath does not exists")
+ throw BluePrintProcessorException("K8s Profile template file $profileFilePath does not exists")
val tempMainPath: File = createTempDir("k8s-profile-", "")
val tempProfilePath: File = createTempDir("$k8sRbProfileName-", "", tempMainPath)
log.info("Decompressing profile to $tempProfilePath")
- val decompressedProfile: File = BlueprintArchiveUtils.deCompress(
+ val decompressedProfile: File = BluePrintArchiveUtils.deCompress(
profileFilePath.toFile(),
"$tempProfilePath",
ArchiveType.TarGz
@@ -150,8 +150,8 @@
File(tmpOverrideFile).copyTo(File(destOverrideFile), true)
profileFilePath = Paths.get(tempMainPath.toString().plus(File.separator).plus("template-profile.tar.gz"))
- if (!BlueprintArchiveUtils.compress(decompressedProfile, profileFilePath.toFile(), ArchiveType.TarGz)) {
- throw BlueprintProcessorException("Profile compression has failed")
+ if (!BluePrintArchiveUtils.compress(decompressedProfile, profileFilePath.toFile(), ArchiveType.TarGz)) {
+ throw BluePrintProcessorException("Profile compression has failed")
}
log.info("$profileFilePath compression completed")
return profileFilePath
@@ -182,12 +182,12 @@
val profileFile = profileFilePath.toFile()
if (!profileFile.exists())
- throw BlueprintProcessorException("K8s Profile template file $profileFilePath does not exists")
+ throw BluePrintProcessorException("K8s Profile template file $profileFilePath does not exists")
val success = File(destPath).mkdirs()
log.info("Decompressing profile to $destPath")
- val decompressedProfile: File = BlueprintArchiveUtils.deCompress(
+ val decompressedProfile: File = BluePrintArchiveUtils.deCompress(
profileFilePath.toFile(),
"$destPath",
ArchiveType.TarGz
@@ -312,7 +312,7 @@
return false
} catch (e: Exception) {
log.info("Caught exception trying to get k8s rb definition")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -331,7 +331,7 @@
}
} catch (e: Exception) {
log.info("Caught exception trying to get k8s rb profile")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -349,7 +349,7 @@
}
} catch (e: Exception) {
log.info("Caught exception trying to create k8s rb profile ${profile.profileName}")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -364,7 +364,7 @@
}
} catch (e: Exception) {
log.info("Caught exception trying to upload k8s rb profile ${profile.profileName}")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
}
diff --git a/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinK8sUpdateConfig.kt b/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinK8sUpdateConfig.kt
index db5ab31..cd555b4 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinK8sUpdateConfig.kt
+++ b/components/model-catalog/blueprint-model/service-blueprint/5GC_Simulator_CNF_CDS/Scripts/kotlin/KotlinK8sUpdateConfig.kt
@@ -22,7 +22,7 @@
import com.fasterxml.jackson.databind.node.ObjectNode
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import java.nio.file.Path
import org.springframework.http.HttpMethod
import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
@@ -150,7 +150,7 @@
}
catch (e: Exception) {
log.info("Caught exception trying to get the vnf Details!!")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -289,7 +289,7 @@
}
} catch (e: Exception) {
log.info("Caught exception trying to create or update configuration ")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/kotlin/ConfigDeploy.kt b/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/kotlin/ConfigDeploy.kt
index bcbb471..2a3f165 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/kotlin/ConfigDeploy.kt
+++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/kotlin/ConfigDeploy.kt
@@ -29,7 +29,7 @@
import org.springframework.web.client.RestTemplate
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonProperty
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
open class ConfigDeploy : AbstractScriptComponentFunction() {
@@ -81,7 +81,7 @@
print(resultOfGet)
} catch (e: Exception) {
log.info("Caught exception trying to connect to vLB!!")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/kotlin/HealthCheck.kt b/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/kotlin/HealthCheck.kt
index c34decc..7cfebbf 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/kotlin/HealthCheck.kt
+++ b/components/model-catalog/blueprint-model/service-blueprint/vLB/Scripts/kotlin/HealthCheck.kt
@@ -28,7 +28,7 @@
import org.springframework.web.client.RestTemplate
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonProperty
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
open class HealthCheck : AbstractScriptComponentFunction() {
@@ -83,7 +83,7 @@
// print(resultOfGet)
} catch (e: Exception) {
log.info("Caught exception trying to connect to vLB!!")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
diff --git a/components/model-catalog/blueprint-model/service-blueprint/vLB_CDS_RESTCONF/Scripts/kotlin/KotlinRestCall.kt b/components/model-catalog/blueprint-model/service-blueprint/vLB_CDS_RESTCONF/Scripts/kotlin/KotlinRestCall.kt
index c7f4c93..f84cdd4 100644
--- a/components/model-catalog/blueprint-model/service-blueprint/vLB_CDS_RESTCONF/Scripts/kotlin/KotlinRestCall.kt
+++ b/components/model-catalog/blueprint-model/service-blueprint/vLB_CDS_RESTCONF/Scripts/kotlin/KotlinRestCall.kt
@@ -29,7 +29,7 @@
import org.springframework.web.client.RestTemplate
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonProperty
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
open class ConfigDeploy : AbstractScriptComponentFunction() {
@@ -81,7 +81,7 @@
print(resultOfGet)
} catch (e: Exception) {
log.info("Caught exception trying to connect to vLB!!")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
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
index d3d97f1..30b9ff9 100644
--- 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
@@ -15,7 +15,7 @@
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)
+ raise BluePrintProcessorException("Error on resource assignment. Message = " + self.error_message)
return None
def recover(self, runtime_exception, execution_request):
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt
index ca30687..d092448 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/CapabilityCliDefinitions.kt
@@ -20,7 +20,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.nodeTypeComponentScriptExecutor
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.relationshipTemplateSshClient
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.relationshipTypeConnectsToSshClient
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.artifactTypeTemplateVelocity
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.getAttribute
@@ -28,9 +28,9 @@
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.nodeTypeComponent
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.AbstractBlueprintDefinitions
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.AbstractBluePrintDefinitions
-class CapabilityCliDefinitions : AbstractBlueprintDefinitions() {
+class CapabilityCliDefinitions : AbstractBluePrintDefinitions() {
override fun serviceTemplate(): ServiceTemplate {
return defaultServiceTemplate()
@@ -64,7 +64,7 @@
nodeTemplateComponentScriptExecutor(id = "check", description = "") {
definedOperation(description = "") {
inputs {
- type(BlueprintConstants.SCRIPT_KOTLIN)
+ type(BluePrintConstants.SCRIPT_KOTLIN)
scriptClassReference(Check::class)
}
outputs {
diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/Check.kt b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/Check.kt
index c3cd53f..e290556 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/Check.kt
+++ b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/Scripts/kotlin/cba/capability/cli/Check.kt
@@ -19,10 +19,10 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.sshClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
open class Check : AbstractScriptComponentFunction() {
@@ -36,7 +36,7 @@
log.info("Executing process : ${executionRequest.payload}")
val data = requestPayloadActionProperty("data")?.first()
- ?: throw BlueprintProcessorException("Failed to load payload data properties.")
+ ?: throw BluePrintProcessorException("Failed to load payload data properties.")
log.info("Data : ${data.asJsonString()}")
@@ -50,7 +50,7 @@
log.info("Device Info :$deviceInformation")
// Get the Client Service
- val sshClientService = BlueprintDependencyService.sshClientService(deviceInformation)
+ val sshClientService = BluePrintDependencyService.sshClientService(deviceInformation)
log.info("Client service is ready")
}
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
index 5434710..a471349 100755
--- 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
@@ -16,8 +16,8 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.*
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.CapabilityResourceSource
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintScriptsService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintScriptsService
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
diff --git a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/DeviceResourceDefinitions.kt b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/DeviceResourceDefinitions.kt
index c0306e4..ee99b04 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/DeviceResourceDefinitions.kt
+++ b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/DeviceResourceDefinitions.kt
@@ -17,21 +17,21 @@
package cba.resource.audit
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceDefinitions
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
const val SOURCE_SDNO = "SDN-O"
const val SOURCE_SDNC = "SDNC"
const val SOURCE_AAI = "AAI"
-val deviceResourceDefinitions = BlueprintTypes.resourceDefinitions {
+val deviceResourceDefinitions = BluePrintTypes.resourceDefinitions {
// Port Speed Definitions
resourceDefinition(name = "port-speed", description = "Port Speed") {
property(type = "string", required = true)
sources {
sourceCapability(id = SOURCE_SDNO, description = "SDN-O Source") {
definedProperties {
- type(BlueprintConstants.SCRIPT_KOTLIN)
+ type(BluePrintConstants.SCRIPT_KOTLIN)
scriptClassReference("cba.resource.audit.processor.PortSpeedRAProcessor")
keyDependencies(arrayListOf("device-id"))
}
diff --git a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/ResourceAuditDefinitions.kt b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/ResourceAuditDefinitions.kt
index cb617b9..4e66a05 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/ResourceAuditDefinitions.kt
+++ b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/ResourceAuditDefinitions.kt
@@ -19,16 +19,16 @@
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.nodeTemplateComponentScriptExecutor
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.nodeTypeComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.getAttribute
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.getNodeTemplateAttribute
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.nodeTypeComponent
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.AbstractBlueprintDefinitions
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.AbstractBluePrintDefinitions
-class ResourceAuditDefinitions : AbstractBlueprintDefinitions() {
+class ResourceAuditDefinitions : AbstractBluePrintDefinitions() {
override fun serviceTemplate(): ServiceTemplate {
return defaultServiceTemplate()
@@ -47,13 +47,13 @@
workflow(id = "config-collect", description = "Collect the configuration for Device") {
inputs {
- property(id = "device-id", type = BlueprintConstants.DATA_TYPE_STRING, required = true, description = "")
- property(id = "sources", type = BlueprintConstants.DATA_TYPE_LIST, required = true, description = "") {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ property(id = "device-id", type = BluePrintConstants.DATA_TYPE_STRING, required = true, description = "")
+ property(id = "sources", type = BluePrintConstants.DATA_TYPE_LIST, required = true, description = "") {
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
}
outputs {
- property(id = "response-data", required = true, type = BlueprintConstants.DATA_TYPE_STRING, description = "") {
+ property(id = "response-data", required = true, type = BluePrintConstants.DATA_TYPE_STRING, description = "") {
value(
getNodeTemplateAttribute(
nodeTemplateId = "config-collector",
@@ -61,21 +61,21 @@
)
)
}
- property(id = "status", required = true, type = BlueprintConstants.DATA_TYPE_STRING, description = "") {
- value(BlueprintConstants.STATUS_SUCCESS)
+ property(id = "status", required = true, type = BluePrintConstants.DATA_TYPE_STRING, description = "") {
+ value(BluePrintConstants.STATUS_SUCCESS)
}
}
step(id = "config-collector", target = "config-collector", description = "Collect the Configuration")
}
- val configCollectorComponent = BlueprintTypes.nodeTemplateComponentScriptExecutor(
+ val configCollectorComponent = BluePrintTypes.nodeTemplateComponentScriptExecutor(
id = "config-collector",
description = "Config collector component"
) {
definedOperation(description = "Config Collector Operation") {
inputs {
- type(BlueprintConstants.SCRIPT_KOTLIN)
+ type(BluePrintConstants.SCRIPT_KOTLIN)
scriptClassReference("cba.resource.audit.functions.ConfigCollector")
}
outputs {
@@ -87,6 +87,6 @@
nodeTemplate(configCollectorComponent)
}
- nodeType(BlueprintTypes.nodeTypeComponent())
- nodeType(BlueprintTypes.nodeTypeComponentScriptExecutor())
+ nodeType(BluePrintTypes.nodeTypeComponent())
+ nodeType(BluePrintTypes.nodeTypeComponentScriptExecutor())
}
diff --git a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/functions/ConfigCollector.kt b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/functions/ConfigCollector.kt
index a6dbef6..7ae27da 100644
--- a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/functions/ConfigCollector.kt
+++ b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/Scripts/kotlin/cba/resource/audit/functions/ConfigCollector.kt
@@ -20,7 +20,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -43,7 +43,7 @@
}
// Set the Attributes
- setAttribute(ComponentScriptExecutor.ATTRIBUTE_STATUS, BlueprintConstants.STATUS_SUCCESS.asJsonPrimitive())
+ setAttribute(ComponentScriptExecutor.ATTRIBUTE_STATUS, BluePrintConstants.STATUS_SUCCESS.asJsonPrimitive())
setAttribute(
ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA,
"""{
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfConfigDeploy.kt b/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfConfigDeploy.kt
index 78ab34e..1547928 100644
--- a/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfConfigDeploy.kt
+++ b/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfConfigDeploy.kt
@@ -27,7 +27,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor.restconfDeviceConfig
import org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor.restconfClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import com.fasterxml.jackson.databind.ObjectMapper
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService.WebClientResponse
@@ -79,7 +79,7 @@
// Un mount device
restconfUnMountDevice(webclientService, deviceID, "")
}
- } catch (bpe: BlueprintProcessorException) {
+ } catch (bpe: BluePrintProcessorException) {
log.error("Error looking up server identifier ", bpe)
}
}
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfSoftwareUpgrade.kt b/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfSoftwareUpgrade.kt
index 96345f0..e238c3e 100644
--- a/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfSoftwareUpgrade.kt
+++ b/components/model-catalog/blueprint-model/uat-blueprints/PNF_CDS_RESTCONF/Scripts/kotlin/RestconfSoftwareUpgrade.kt
@@ -28,10 +28,10 @@
import org.onap.ccsdk.cds.blueprintsprocessor.rest.restClientService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintRetryException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintRetryException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
class RestconfSoftwareUpgrade : AbstractScriptComponentFunction() {
@@ -77,12 +77,12 @@
) {
return SoftwareUpgradeModel(
getDynamicProperties("resolution-key").asText(),
- BlueprintDependencyService.restClientService(RESTCONF_SERVER_IDENTIFIER),
+ BluePrintDependencyService.restClientService(RESTCONF_SERVER_IDENTIFIER),
properties.get("pnf-id").textValue(), properties.get("target-software-version").textValue(),
Action.getEnumFromActionName(executionRequest.actionIdentifiers.actionName)
)
} else {
- throw BlueprintException("Invalid parameters sent to CDS. Request parameters pnf-id or target-software-version missing")
+ throw BluePrintException("Invalid parameters sent to CDS. Request parameters pnf-id or target-software-version missing")
}
}
@@ -140,7 +140,7 @@
// Poll PNF for Activate action's progress
checkExecution(model)
} else {
- throw BlueprintRetryException("Software Download not completed for device(${model.deviceId}) to activate sw version: ${model.targetSwVersion}")
+ throw BluePrintRetryException("Software Download not completed for device(${model.deviceId}) to activate sw version: ${model.targetSwVersion}")
}
}
@@ -170,7 +170,7 @@
log.info("${model.action.name} is complete")
result.body
} else {
- throw BlueprintRetryException("Waiting for device(${model.deviceId}) to activate sw version ${model.targetSwVersion}")
+ throw BluePrintRetryException("Waiting for device(${model.deviceId}) to activate sw version ${model.targetSwVersion}")
}
}
model.client.retry<String>(10, 0, 1000, checkExecutionBlock)
@@ -210,7 +210,7 @@
for (value in values()) {
if (value.actionName == name) return value
}
- throw BlueprintException("Invalid Action sent to CDS")
+ throw BluePrintException("Invalid Action sent to CDS")
}
}
}
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Scripts/kotlin/CollectorScript.kt b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Scripts/kotlin/CollectorScript.kt
index 28ce149..904237b 100644
--- a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Scripts/kotlin/CollectorScript.kt
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Scripts/kotlin/CollectorScript.kt
@@ -20,7 +20,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -42,7 +42,7 @@
return try {
bluePrintRuntimeService.getNodeTemplateAttributeValue(nodeTemplateName,
ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA)
- } catch (exception: BlueprintProcessorException) { null }
+ } catch (exception: BluePrintProcessorException) { null }
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Scripts/kotlin/TestScript.kt b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Scripts/kotlin/TestScript.kt
index af3ebff..e554675 100644
--- a/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Scripts/kotlin/TestScript.kt
+++ b/components/model-catalog/blueprint-model/uat-blueprints/imperative_workflow/Scripts/kotlin/TestScript.kt
@@ -19,8 +19,8 @@
import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -41,14 +41,14 @@
setAttribute("response-data", if (shouldFail) FAILED else SUCCEEDED)
if (shouldFail) {
- throw BlueprintException("Step failed: ${this.stepName}")
+ throw BluePrintException("Step failed: ${this.stepName}")
}
}
fun inputValue(name: String): JsonNode? {
return try {
return bluePrintRuntimeService.getInputValue(name)
- } catch (e: BlueprintProcessorException) { null }
+ } catch (e: BluePrintProcessorException) { null }
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
diff --git a/components/model-catalog/blueprint-model/uat-blueprints/pnf_config/Scripts/kotlin/RestconfConfigDeploy.kt b/components/model-catalog/blueprint-model/uat-blueprints/pnf_config/Scripts/kotlin/RestconfConfigDeploy.kt
index 2ba527a..264f4f7 100644
--- a/components/model-catalog/blueprint-model/uat-blueprints/pnf_config/Scripts/kotlin/RestconfConfigDeploy.kt
+++ b/components/model-catalog/blueprint-model/uat-blueprints/pnf_config/Scripts/kotlin/RestconfConfigDeploy.kt
@@ -27,7 +27,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor.restconfDeviceConfig
import org.onap.ccsdk.cds.blueprintsprocessor.functions.restconf.executor.restconfClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
class RestconfConfigDeploy : AbstractScriptComponentFunction() {
@@ -68,7 +68,7 @@
// Un mount device
restconfUnMountDevice(webclientService, deviceID, "")
}
- } catch (bpe: BlueprintProcessorException) {
+ } catch (bpe: BluePrintProcessorException) {
log.error("Error looking up server identifier ", bpe)
}
}
diff --git a/components/model-catalog/proto-definition/proto/BlueprintCommon.proto b/components/model-catalog/proto-definition/proto/BluePrintCommon.proto
similarity index 100%
rename from components/model-catalog/proto-definition/proto/BlueprintCommon.proto
rename to components/model-catalog/proto-definition/proto/BluePrintCommon.proto
diff --git a/components/model-catalog/proto-definition/proto/BlueprintManagement.proto b/components/model-catalog/proto-definition/proto/BluePrintManagement.proto
similarity index 78%
rename from components/model-catalog/proto-definition/proto/BlueprintManagement.proto
rename to components/model-catalog/proto-definition/proto/BluePrintManagement.proto
index 3b6d43f..a363e8a 100644
--- a/components/model-catalog/proto-definition/proto/BlueprintManagement.proto
+++ b/components/model-catalog/proto-definition/proto/BluePrintManagement.proto
@@ -1,10 +1,10 @@
syntax = "proto3";
import "google/protobuf/struct.proto";
-import "BlueprintCommon.proto";
+import "BluePrintCommon.proto";
option java_multiple_files = true;
package org.onap.ccsdk.cds.controllerblueprints.management.api;
-message BlueprintUploadInput {
+message BluePrintUploadInput {
org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
FileChunk fileChunk = 2;
org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 3;
@@ -12,28 +12,28 @@
google.protobuf.Struct properties = 4;
}
-message BlueprintDownloadInput {
+message BluePrintDownloadInput {
org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 2;
// Extra optional dynamic properties used to download.
google.protobuf.Struct properties = 3;
}
-message BlueprintRemoveInput {
+message BluePrintRemoveInput {
org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers actionIdentifiers = 2;
// Extra optional dynamic properties used to remove.
google.protobuf.Struct properties = 3;
}
-message BlueprintBootstrapInput {
+message BluePrintBootstrapInput {
org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
bool loadCBA = 2;
bool loadModelType = 3;
bool loadResourceDictionary = 4;
}
-message BlueprintManagementOutput {
+message BluePrintManagementOutput {
org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader commonHeader = 1;
// Optional file chunk sent back to the client for Enrich and Download this is mandatory.
FileChunk fileChunk = 2;
@@ -45,7 +45,7 @@
message FileChunk {
bytes chunk = 1;
}
-// Values used in BlueprintDownloadInput/actionIdentifiers/action
+// Values used in BluePrintDownloadInput/actionIdentifiers/action
enum DownloadAction {
// Default is SEARCH the cba and download the cba
SEARCH = 0;
@@ -68,9 +68,9 @@
DEFAULT = 0;
}
-service BlueprintManagementService {
- rpc downloadBlueprint (BlueprintDownloadInput) returns (BlueprintManagementOutput);
- rpc uploadBlueprint (BlueprintUploadInput) returns (BlueprintManagementOutput);
- rpc removeBlueprint (BlueprintRemoveInput) returns (BlueprintManagementOutput);
- rpc bootstrapBlueprint (BlueprintBootstrapInput) returns (BlueprintManagementOutput);
+service BluePrintManagementService {
+ rpc downloadBlueprint (BluePrintDownloadInput) returns (BluePrintManagementOutput);
+ rpc uploadBlueprint (BluePrintUploadInput) returns (BluePrintManagementOutput);
+ rpc removeBlueprint (BluePrintRemoveInput) returns (BluePrintManagementOutput);
+ rpc bootstrapBlueprint (BluePrintBootstrapInput) returns (BluePrintManagementOutput);
}
diff --git a/components/model-catalog/proto-definition/proto/BlueprintProcessing.proto b/components/model-catalog/proto-definition/proto/BluePrintProcessing.proto
similarity index 92%
rename from components/model-catalog/proto-definition/proto/BlueprintProcessing.proto
rename to components/model-catalog/proto-definition/proto/BluePrintProcessing.proto
index 3e8bfd8..9622287 100644
--- a/components/model-catalog/proto-definition/proto/BlueprintProcessing.proto
+++ b/components/model-catalog/proto-definition/proto/BluePrintProcessing.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
import "google/protobuf/struct.proto";
-import "BlueprintCommon.proto";
+import "BluePrintCommon.proto";
option java_multiple_files = true;
package org.onap.ccsdk.cds.controllerblueprints.processing.api;
@@ -19,6 +19,6 @@
}
-service BlueprintProcessingService {
+service BluePrintProcessingService {
rpc process (stream ExecutionServiceInput) returns (stream ExecutionServiceOutput);
}
diff --git a/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py b/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py
index b5d48bd..05fe2e0 100644
--- a/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py
+++ b/components/scripts/python/ccsdk_blueprints/abstract_ra_processor.py
@@ -3,7 +3,7 @@
from org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils import \
ResourceAssignmentUtils
from org.onap.ccsdk.cds.controllerblueprints.core import \
- BlueprintProcessorException
+ BluePrintProcessorException
class AbstractRAProcessor(ResourceAssignmentProcessor):
@@ -24,6 +24,6 @@
else:
ResourceAssignmentUtils.Companion.setFailedResourceDataValue(
resource_assignment, "Fail to resolve value")
- except BlueprintProcessorException, err:
- raise BlueprintProcessorException(
+ except BluePrintProcessorException, err:
+ raise BluePrintProcessorException(
"Error on resource assignment. Message = " + err.message)
diff --git a/components/scripts/python/ccsdk_blueprints/blueprint_runtime_service.py b/components/scripts/python/ccsdk_blueprints/blueprint_runtime_service.py
index 60781cb..7c7beff 100644
--- a/components/scripts/python/ccsdk_blueprints/blueprint_runtime_service.py
+++ b/components/scripts/python/ccsdk_blueprints/blueprint_runtime_service.py
@@ -1,4 +1,4 @@
-class BlueprintRuntimeService:
+class BluePrintRuntimeService:
def __init__(self, bps):
self.bps = bps
diff --git a/docs/api-reference/media/cds-bp-processor-api-swagger.json b/docs/api-reference/media/cds-bp-processor-api-swagger.json
index b7ba2ea..319808d 100644
--- a/docs/api-reference/media/cds-bp-processor-api-swagger.json
+++ b/docs/api-reference/media/cds-bp-processor-api-swagger.json
@@ -1,2264 +1,2264 @@
-{
- "swagger" : "2.0",
- "info" : {
- "description" : "Shows all resources and endpoints which CDS BP processor currently provides with sample requests/responses, parameter description and other information.",
- "version" : "v1",
- "title" : "CDS Blueprint Processor API Reference",
- "termsOfService" : "https://www.onap.org/",
- "contact" : {
- "name" : "ONAP Community",
- "url" : "https://www.onap.org/",
- "email" : "onap-discuss@lists.onap.org"
- },
- "license" : {
- "name" : "Apache 2.0",
- "url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
- }
- },
- "host" : "localhost:8080",
- "tags" : [ {
- "name" : "Blueprint Model Catalog",
- "description" : "Manages all blueprint models which are available in CDS"
- }, {
- "name" : "Model Type Catalog",
- "description" : "Manages data types in CDS"
- }, {
- "name" : "Resource configuration",
- "description" : "Interaction with stored configurations"
- }, {
- "name" : "Resource dictionary",
- "description" : "Interaction with stored dictionaries"
- }, {
- "name" : "Resource template",
- "description" : "Interaction with resolved templates"
- }, {
- "name" : "Resources",
- "description" : "Interaction with resolved resources"
- } ],
- "schemes" : [ "http" ],
- "paths" : {
- "/api/v1/blueprint-model" : {
- "get" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "List all Blueprint Models",
- "description" : "Lists all meta-data of blueprint models which are saved in CDS.",
- "operationId" : "BlueprintModelController_allBlueprintModel_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "responses" : {
- "200" : {
- "description" : "OK",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/BlueprintModelSearch"
- }
- }
- },
- "500" : {
- "description" : "Internal Server Error"
- }
- }
- },
- "post" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Save a Blueprint Model",
- "description" : "Saves a blueprint model by the given CBA zip file input. There is no validation of the attached CBA happening when this API is called.",
- "operationId" : "BlueprintModelController_saveBlueprint_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "multipart/form-data" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "file",
- "description" : "CBA file to be uploaded (example: cba.zip)",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/FilePart"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "OK",
- "schema" : {
- "$ref" : "#/definitions/BlueprintModelSearch"
- }
- },
- "500" : {
- "description" : "Internal Server Error"
- }
- }
- }
- },
- "/api/v1/blueprint-model/bootstrap" : {
- "post" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Bootstrap CDS",
- "description" : "Loads all Model Types, Resource Dictionaries and Blueprint Models which are included in CDS by default. Before starting to work with CDS, bootstrap should be called to load all the basic models that each orginization might support. Parameter values can be set as `false` to skip loading e.g. the Resource Dictionaries but this is not recommended.",
- "operationId" : "BlueprintModelController_bootstrap_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
- "description" : "Specifies which elements to load",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/BootstrapRequest"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "OK",
- "schema" : {
- "type" : "object"
- }
- },
- "500" : {
- "description" : "Internal Server Error"
- }
- }
- }
- },
- "/api/v1/blueprint-model/by-name/{name}/version/{version}" : {
- "get" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Get a Blueprint Model by Name and Version",
- "description" : "Get Meta-Data of a Blueprint Model by its name and version.",
- "operationId" : "BlueprintModelController_getBlueprintByNameAndVersion_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "name",
- "in" : "path",
- "description" : "Name of the blueprint model",
- "required" : true,
- "type" : "string",
- "x-example" : "pnf_netconf"
- }, {
- "name" : "version",
- "in" : "path",
- "description" : "Version of the blueprint model",
- "required" : true,
- "type" : "string",
- "x-example" : "1.0.0"
- } ],
- "responses" : {
- "200" : {
- "description" : "OK",
- "schema" : {
- "$ref" : "#/definitions/BlueprintModelSearch"
- }
- },
- "404" : {
- "description" : "Not Found"
- }
- }
- }
- },
- "/api/v1/blueprint-model/download/by-name/{name}/version/{version}" : {
- "get" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Download a Blueprint Model",
- "description" : "Gets the CBA of a blueprint model by its name and version. Response can be saved to a file to download the CBA.",
- "operationId" : "BlueprintModelController_downloadBlueprintByNameAndVersion_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "name",
- "in" : "path",
- "description" : "Name of the blueprint model",
- "required" : true,
- "type" : "string",
- "x-example" : "pnf_netconf"
- }, {
- "name" : "version",
- "in" : "path",
- "description" : "Version of the blueprint model",
- "required" : true,
- "type" : "string",
- "x-example" : "1.0.0"
- } ],
- "responses" : {
- "200" : {
- "description" : "OK",
- "schema" : {
- "type" : "object"
- }
- },
- "404" : {
- "description" : "Not Found"
- }
- }
- }
- },
- "/api/v1/blueprint-model/download/{id}" : {
- "get" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Download a Blueprint Model by ID",
- "description" : "Gets the CBA of a blueprint model by its ID. Response can be saved to a file to download the CBA.",
- "operationId" : "BlueprintModelController_downloadBlueprint_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "id",
- "in" : "path",
- "description" : "ID of the blueprint model to download",
- "required" : true,
- "type" : "string",
- "x-example" : "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4"
- } ],
- "responses" : {
- "200" : {
- "description" : "OK",
- "schema" : {
- "type" : "object"
- }
- },
- "404" : {
- "description" : "Not Found"
- }
- }
- }
- },
- "/api/v1/blueprint-model/enrich" : {
- "post" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Enrich a Blueprint Model",
- "description" : "Enriches the attached CBA and returns the enriched CBA zip file in the response. The enrichment process will complete the package by providing all the definition of types used.",
- "operationId" : "BlueprintModelController_enrichBlueprint_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "multipart/form-data" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "file",
- "description" : "CBA zip file to be uploaded (example: cba_unenriched.zip)",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/FilePart"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "object"
- }
- }
- }
- }
- },
- "/api/v1/blueprint-model/enrichandpublish" : {
- "post" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Enrich and publish a Blueprint Model",
- "description" : "Enriches the attached CBA, validates it and saves it in CDS if validation was successful.",
- "operationId" : "BlueprintModelController_enrichAndPubishlueprint_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "multipart/form-data" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "file",
- "description" : "Unenriched CBA zip file to be uploaded (example: cba_unenriched.zip)",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/FilePart"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "OK",
- "schema" : {
- "$ref" : "#/definitions/BlueprintModelSearch"
- }
- },
- "503" : {
- "description" : "Service Unavailable"
- }
- }
- }
- },
- "/api/v1/blueprint-model/meta-data/{keyword}" : {
- "get" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Search for Blueprints by a Keyword",
- "description" : "Lists all blueprint models by a matching keyword in any of the meta-data of the blueprint models. Blueprint models are just returned if a whole keyword is matching, not just parts of it. Not case-sensitive. Used by CDS UI.",
- "operationId" : "BlueprintModelController_allBlueprintModelMetaData_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "keyword",
- "in" : "path",
- "description" : "Keyword to search for in blueprint model meta-data",
- "required" : true,
- "type" : "string",
- "x-example" : "pnf_netconf"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/BlueprintModelSearch"
- }
- }
- }
- }
- }
- },
- "/api/v1/blueprint-model/name/{name}/version/{version}" : {
- "delete" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Delete a Blueprint Model by Name",
- "description" : "Deletes a blueprint model identified by its name and version from CDS.",
- "operationId" : "BlueprintModelController_deleteBlueprintByName_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "parameters" : [ {
- "name" : "name",
- "in" : "path",
- "description" : "Name of the blueprint model",
- "required" : true,
- "type" : "string",
- "x-example" : "pnf_netconf"
- }, {
- "name" : "version",
- "in" : "path",
- "description" : "Version of the blueprint model",
- "required" : true,
- "type" : "string",
- "x-example" : "1.0.0"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "object"
- }
- }
- }
- }
- },
- "/api/v1/blueprint-model/paged" : {
- "get" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Get Blueprints ordered",
- "description" : "Lists all blueprint models which are saved in CDS in an ordered mode.",
- "operationId" : "BlueprintModelController_allBlueprintModelPaged_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "limit",
- "in" : "query",
- "description" : "Maximum number of returned blueprint models",
- "required" : false,
- "type" : "integer",
- "default" : 20,
- "format" : "int32"
- }, {
- "name" : "offset",
- "in" : "query",
- "description" : "Offset",
- "required" : false,
- "type" : "integer",
- "default" : 0,
- "format" : "int32"
- }, {
- "name" : "sort",
- "in" : "query",
- "description" : "Order of returned blueprint models",
- "required" : false,
- "type" : "string",
- "default" : "DATE",
- "enum" : [ "DATE", "NAME", "VERSION" ]
- }, {
- "name" : "sortType",
- "in" : "query",
- "description" : "Ascend or descend ordering",
- "required" : false,
- "type" : "string",
- "default" : "ASC"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/PageBlueprintModelSearch"
- }
- }
- }
- }
- },
- "/api/v1/blueprint-model/paged/meta-data/{keyword}" : {
- "get" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Search for Blueprints by a Keyword in an ordered mode",
- "description" : "Lists all blueprint models by a matching keyword in any of the meta-data of the blueprint models in an ordered mode. Blueprint models are just returned if a whole keyword is matching, not just parts of it. Not case-sensitive. Used by CDS UI.",
- "operationId" : "BlueprintModelController_allBlueprintModelMetaDataPaged_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "keyword",
- "in" : "path",
- "description" : "Keyword to search for in blueprint model meta-data",
- "required" : true,
- "type" : "string",
- "x-example" : "pnf_netconf"
- }, {
- "name" : "limit",
- "in" : "query",
- "description" : "Maximum number of returned blueprint models",
- "required" : false,
- "type" : "integer",
- "default" : 20,
- "format" : "int32"
- }, {
- "name" : "offset",
- "in" : "query",
- "description" : "Offset",
- "required" : false,
- "type" : "integer",
- "default" : 0,
- "format" : "int32"
- }, {
- "name" : "sort",
- "in" : "query",
- "description" : "Order of returned blueprint models",
- "required" : false,
- "type" : "string",
- "default" : "DATE",
- "enum" : [ "DATE", "NAME", "VERSION" ]
- }, {
- "name" : "sortType",
- "in" : "query",
- "description" : "Ascend or descend ordering",
- "required" : false,
- "type" : "string",
- "default" : "ASC"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/PageBlueprintModelSearch"
- }
- }
- }
- }
- },
- "/api/v1/blueprint-model/publish" : {
- "post" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Publish a Blueprint Model",
- "description" : "Validates the attached CBA file and saves it in CDS if validation was successful. CBA needs to be already enriched.",
- "operationId" : "BlueprintModelController_publishBlueprint_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "multipart/form-data" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "file",
- "description" : "Enriched CBA zip file to be uploaded (example: cba_enriched.zip)",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/FilePart"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/BlueprintModelSearch"
- }
- }
- }
- }
- },
- "/api/v1/blueprint-model/search/{tags}" : {
- "get" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Search for a Blueprint by Tag",
- "description" : "Searches for all blueprint models which contain the specified input parameter in their tags. Blueprint models which contain just parts of the searched word in their tags are also returned.",
- "operationId" : "BlueprintModelController_searchBlueprintModels_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "tags",
- "in" : "path",
- "description" : "Tag to search for",
- "required" : true,
- "type" : "string",
- "x-example" : "test"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/BlueprintModelSearch"
- }
- }
- }
- }
- }
- },
- "/api/v1/blueprint-model/workflow-spec" : {
- "post" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Get Workflow Specification",
- "description" : "Get the workflow of a blueprint identified by Blueprint and workflow name. Inputs, outputs and data types of workflow is returned.",
- "operationId" : "BlueprintModelController_workflowSpec_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
- "description" : "Blueprint and workflow identification",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/WorkFlowSpecRequest"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "object"
- }
- }
- }
- }
- },
- "/api/v1/blueprint-model/workflows/blueprint-name/{name}/version/{version}" : {
- "get" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Get Workflows of a Blueprint",
- "description" : "Get all available workflows of a Blueprint identified by its name and version.",
- "operationId" : "BlueprintModelController_getWorkflowList_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "name",
- "in" : "path",
- "description" : "Name of the blueprint model",
- "required" : true,
- "type" : "string",
- "x-example" : "pnf_netconf"
- }, {
- "name" : "version",
- "in" : "path",
- "description" : "Version of the blueprint model",
- "required" : true,
- "type" : "string",
- "x-example" : "1.0.0"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "object"
- }
- }
- }
- }
- },
- "/api/v1/blueprint-model/{id}" : {
- "get" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Get a Blueprint Model by ID",
- "description" : "Get meta-data of a blueprint model by its internally created ID.",
- "operationId" : "BlueprintModelController_getBlueprintModel_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "id",
- "in" : "path",
- "description" : "ID of the blueprint model to search for",
- "required" : true,
- "type" : "string",
- "x-example" : "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4"
- } ],
- "responses" : {
- "200" : {
- "description" : "OK",
- "schema" : {
- "$ref" : "#/definitions/BlueprintModelSearch"
- }
- },
- "404" : {
- "description" : "Not Found"
- }
- }
- },
- "delete" : {
- "tags" : [ "Blueprint Model Catalog" ],
- "summary" : "Delete a Blueprint Model by ID",
- "description" : "Delete a blueprint model by its ID. ID is the internally created ID of blueprint, not the name of blueprint.",
- "operationId" : "BlueprintModelController_deleteBlueprint_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "parameters" : [ {
- "name" : "id",
- "in" : "path",
- "description" : "ID of the blueprint model to delete",
- "required" : true,
- "type" : "string",
- "x-example" : "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4"
- } ],
- "responses" : {
- "200" : {
- "description" : "OK",
- "schema" : {
- "type" : "object"
- }
- },
- "404" : {
- "description" : "RESOURCE_NOT_FOUND"
- }
- }
- }
- },
- "/api/v1/configs" : {
- "get" : {
- "tags" : [ "Resource configuration" ],
- "summary" : "Retrieve a resource configuration snapshot",
- "description" : "Retrieve a config snapshot, identified by its Resource Id and Type. An extra 'format' parameter can be passed to tell what content-type is expected.",
- "operationId" : "ResourceConfigSnapshotController_get_GET.org.onap.ccsdk.cds.blueprintsprocessor.configs.api",
- "produces" : [ "text/plain", "application/json", "application/xml" ],
- "parameters" : [ {
- "name" : "resourceType",
- "in" : "query",
- "description" : "Resource Type associated of the resource configuration snapshot",
- "required" : true,
- "type" : "string",
- "x-example" : "\"PNF\""
- }, {
- "name" : "resourceId",
- "in" : "query",
- "description" : "Resource Id associated of the resource configuration snapshot",
- "required" : true,
- "type" : "string",
- "x-example" : "\"1\""
- }, {
- "name" : "status",
- "in" : "query",
- "description" : "Status of the snapshot being retrieved",
- "required" : false,
- "type" : "string",
- "default" : "RUNNING"
- }, {
- "name" : "format",
- "in" : "query",
- "description" : "Expected format of the snapshot being retrieved",
- "required" : false,
- "type" : "string",
- "default" : "text/plain"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "string"
- }
- }
- }
- }
- },
- "/api/v1/configs/allByID" : {
- "get" : {
- "tags" : [ "Resource configuration" ],
- "summary" : "Retrieve all resource configuration snapshots identified by a given resource_id",
- "description" : "Retrieve all config snapshots, identified by its Resource Id, ordered by most recently created/modified date. ",
- "operationId" : "ResourceConfigSnapshotController_getAllByID_GET.org.onap.ccsdk.cds.blueprintsprocessor.configs.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "resourceId",
- "in" : "query",
- "description" : "Resource Id associated of the resource configuration snapshots",
- "required" : true,
- "type" : "string",
- "x-example" : "\"1\""
- }, {
- "name" : "status",
- "in" : "query",
- "description" : "Status of the snapshot being retrieved",
- "required" : false,
- "type" : "string",
- "default" : "ANY"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/ResourceConfigSnapshot"
- }
- }
- }
- }
- }
- },
- "/api/v1/configs/allByType" : {
- "get" : {
- "tags" : [ "Resource configuration" ],
- "summary" : "Retrieve all resource configuration snapshots for a given resource type",
- "description" : "Retrieve all config snapshots matching a specified Resource Type, ordered by most recently created/modified date. ",
- "operationId" : "ResourceConfigSnapshotController_getAllByType_GET.org.onap.ccsdk.cds.blueprintsprocessor.configs.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "resourceType",
- "in" : "query",
- "description" : "Resource Type associated of the resource configuration snapshot",
- "required" : true,
- "type" : "string",
- "x-example" : "\"PNF\""
- }, {
- "name" : "status",
- "in" : "query",
- "description" : "Status of the snapshot being retrieved",
- "required" : false,
- "type" : "string",
- "default" : "ANY"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/ResourceConfigSnapshot"
- }
- }
- }
- }
- }
- },
- "/api/v1/configs/{resourceType}/{resourceId}/{status}" : {
- "post" : {
- "tags" : [ "Resource configuration" ],
- "summary" : "Store a resource configuration snapshot identified by resourceId, resourceType, status",
- "description" : "Store a resource configuration snapshot, identified by its resourceId and resourceType, and optionally its status, either RUNNING or CANDIDATE.",
- "operationId" : "ResourceConfigSnapshotController_postWithResourceIdAndResourceType_POST.org.onap.ccsdk.cds.blueprintsprocessor.configs.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "resourceType",
- "in" : "path",
- "description" : "Resource Type associated with the resolution",
- "required" : true,
- "type" : "string",
- "x-example" : "\"PNF\""
- }, {
- "name" : "resourceId",
- "in" : "path",
- "description" : "Resource Id associated with the resolution",
- "required" : true,
- "type" : "string",
- "x-example" : "\"1\""
- }, {
- "name" : "status",
- "in" : "path",
- "description" : "Status of the snapshot being retrieved",
- "required" : true,
- "type" : "string",
- "default" : "RUNNING"
- }, {
- "in" : "body",
- "name" : "body",
- "description" : "Config snapshot to store",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ResourceConfigSnapshot"
- }
- }
- }
- }
- },
- "/api/v1/dictionary" : {
- "post" : {
- "tags" : [ "Resource dictionary" ],
- "summary" : "Save a resource dictionary",
- "description" : "Save a resource dictionary by dictionary provided.",
- "operationId" : "ResourceDictionaryController_saveResourceDictionary_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
- "description" : "Resource dictionary to store",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/ResourceDictionary"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ResourceDictionary"
- }
- }
- }
- }
- },
- "/api/v1/dictionary/by-names" : {
- "post" : {
- "tags" : [ "Resource dictionary" ],
- "summary" : "Search for a resource dictionary",
- "description" : "Search for a resource dictionary by names provided.",
- "operationId" : "ResourceDictionaryController_searchResourceDictionaryByNames_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
- "description" : "List of names",
- "required" : true,
- "schema" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/ResourceDictionary"
- }
- }
- }
- }
- }
- },
- "/api/v1/dictionary/definition" : {
- "post" : {
- "tags" : [ "Resource dictionary" ],
- "summary" : "Save a resource dictionary",
- "description" : "Save a resource dictionary by resource definition provided.",
- "operationId" : "ResourceDictionaryController_saveResourceDictionary_1_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
- "description" : "Resource definition to generate",
- "required" : true,
- "schema" : {
- "$ref" : "#/definitions/ResourceDefinition"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ResourceDefinition"
- }
- }
- }
- }
- },
- "/api/v1/dictionary/resource_dictionary_group" : {
- "get" : {
- "tags" : [ "Resource dictionary" ],
- "summary" : "Retrieve all resource dictionary groups",
- "description" : "Retrieve all resource dictionary groups.",
- "operationId" : "ResourceDictionaryController_getResourceDictionaryDistinct_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }
- }
- }
- }
- },
- "/api/v1/dictionary/search/{tags}" : {
- "get" : {
- "tags" : [ "Resource dictionary" ],
- "summary" : "Search for a resource dictionary",
- "description" : "Search for a resource dictionary by tags provided.",
- "operationId" : "ResourceDictionaryController_searchResourceDictionaryByTags_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "tags",
- "in" : "path",
- "description" : "Tags list",
- "required" : true,
- "type" : "string",
- "x-example" : "\"status\""
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/ResourceDictionary"
- }
- }
- }
- }
- }
- },
- "/api/v1/dictionary/source-mapping" : {
- "get" : {
- "tags" : [ "Resource dictionary" ],
- "summary" : "Search for a source mapping",
- "description" : "Search for a source mapping.",
- "operationId" : "ResourceDictionaryController_getResourceSourceMapping_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ResourceSourceMapping"
- }
- }
- }
- }
- },
- "/api/v1/dictionary/{name}" : {
- "get" : {
- "tags" : [ "Resource dictionary" ],
- "summary" : "Retrieve a resource dictionary",
- "description" : "Retrieve a resource dictionary by name provided.",
- "operationId" : "ResourceDictionaryController_getResourceDictionaryByName_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "name",
- "in" : "path",
- "description" : "Name of the resource",
- "required" : true,
- "type" : "string",
- "x-example" : "\"hostname\""
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ResourceDictionary"
- }
- }
- }
- },
- "delete" : {
- "tags" : [ "Resource dictionary" ],
- "summary" : "Remove a resource dictionary",
- "description" : "Remove a resource dictionary by name provided.",
- "operationId" : "ResourceDictionaryController_deleteResourceDictionaryByName_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "parameters" : [ {
- "name" : "name",
- "in" : "path",
- "description" : "Name of the resource",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "object"
- }
- }
- }
- }
- },
- "/api/v1/model-type/" : {
- "post" : {
- "tags" : [ "Model Type Catalog" ],
- "summary" : "Save a model type",
- "description" : "Save a model type by model type definition provided.",
- "operationId" : "ModelTypeController_saveModelType_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "consumes" : [ "application/json" ],
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "in" : "body",
- "name" : "body",
- "required" : false,
- "schema" : {
- "$ref" : "#/definitions/ModelType"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ModelType"
- }
- }
- }
- }
- },
- "/api/v1/model-type/by-definition/{definitionType}" : {
- "get" : {
- "tags" : [ "Model Type Catalog" ],
- "summary" : "Retrieve a list of model types",
- "description" : "Retrieve a list of model types by definition type provided.",
- "operationId" : "ModelTypeController_getModelTypeByDefinitionType_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "definitionType",
- "in" : "path",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/ModelType"
- }
- }
- }
- }
- }
- },
- "/api/v1/model-type/search/{tags}" : {
- "get" : {
- "tags" : [ "Model Type Catalog" ],
- "summary" : "Retrieve a list of model types",
- "description" : "Retrieve a list of model types by tags provided.",
- "operationId" : "ModelTypeController_searchModelTypes_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "tags",
- "in" : "path",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/ModelType"
- }
- }
- }
- }
- }
- },
- "/api/v1/model-type/{name}" : {
- "get" : {
- "tags" : [ "Model Type Catalog" ],
- "summary" : "Retrieve a model type",
- "description" : "Retrieve a model type by name provided.",
- "operationId" : "ModelTypeController_getModelTypeByName_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "name",
- "in" : "path",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ModelType"
- }
- }
- }
- },
- "delete" : {
- "tags" : [ "Model Type Catalog" ],
- "summary" : "Remove a model type",
- "description" : "Remove a model type by name provided.",
- "operationId" : "ModelTypeController_deleteModelTypeByName_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
- "parameters" : [ {
- "name" : "name",
- "in" : "path",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ModelType"
- }
- }
- }
- }
- },
- "/api/v1/resources" : {
- "get" : {
- "tags" : [ "Resources" ],
- "summary" : "Get all resolved resources using the resolution key",
- "description" : "Retrieve all stored resolved resources using the blueprint name, blueprint version, artifact name and the resolution-key.",
- "operationId" : "ResourceController_getAllFromResolutionKeyOrFromResourceTypeAndId_GET.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "bpName",
- "in" : "query",
- "description" : "Name of the CBA",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "bpVersion",
- "in" : "query",
- "description" : "Version of the CBA",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "artifactName",
- "in" : "query",
- "description" : "Artifact name for which to retrieve a resolved resource",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "resolutionKey",
- "in" : "query",
- "description" : "Resolution Key associated with the resolution",
- "required" : false,
- "type" : "string"
- }, {
- "name" : "resourceType",
- "in" : "query",
- "description" : "Resource Type associated with the resolution",
- "required" : false,
- "type" : "string"
- }, {
- "name" : "resourceId",
- "in" : "query",
- "description" : "Resource Id associated with the resolution",
- "required" : false,
- "type" : "string"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/ResourceResolution"
- }
- }
- }
- }
- },
- "delete" : {
- "tags" : [ "Resources" ],
- "summary" : "Delete resources using resolution key",
- "description" : "Delete all the resources associated to a resolution-key using blueprint metadata, artifact name and the resolution-key.",
- "operationId" : "ResourceController_deleteByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKey_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "bpName",
- "in" : "query",
- "description" : "Name of the CBA",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "bpVersion",
- "in" : "query",
- "description" : "Version of the CBA",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "artifactName",
- "in" : "query",
- "description" : "Artifact name for which to retrieve a resolved resource",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "resolutionKey",
- "in" : "query",
- "description" : "Resolution Key associated with the resolution",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/Unit"
- }
- }
- }
- }
- },
- "/api/v1/resources/resource" : {
- "get" : {
- "tags" : [ "Resources" ],
- "summary" : "Fetch a resource value using resolution key",
- "description" : "Retrieve a stored resource value using the blueprint metadata, artifact name, resolution-key along with the name of the resource value to retrieve.",
- "operationId" : "ResourceController_getOneFromResolutionKey_GET.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "bpName",
- "in" : "query",
- "description" : "Name of the CBA",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "bpVersion",
- "in" : "query",
- "description" : "Version of the CBA",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "artifactName",
- "in" : "query",
- "description" : "Artifact name for which to retrieve a resolved resource",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "resolutionKey",
- "in" : "query",
- "description" : "Resolution Key associated with the resolution",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "name",
- "in" : "query",
- "description" : "Name of the resource to retrieve",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/ResourceResolution"
- }
- }
- }
- }
- },
- "/api/v1/template/{bpName}/{bpVersion}/{artifactName}/{resolutionKey}" : {
- "post" : {
- "tags" : [ "Resource template" ],
- "summary" : "Store a resolved template w/ resolution-key",
- "description" : "Store a template for a given CBA's action, identified by its blueprint name, blueprint version, artifact name and resolution key.",
- "operationId" : "TemplateController_postWithResolutionKey_POST.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "bpName",
- "in" : "path",
- "description" : "Name of the CBA",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "bpVersion",
- "in" : "path",
- "description" : "Version of the CBA",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "artifactName",
- "in" : "path",
- "description" : "Artifact name for which to retrieve a resolved resource",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "resolutionKey",
- "in" : "path",
- "description" : "Resolution Key associated with the resolution",
- "required" : true,
- "type" : "string"
- }, {
- "in" : "body",
- "name" : "body",
- "description" : "Template to store",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/TemplateResolution"
- }
- }
- }
- }
- },
- "/api/v1/template/{bpName}/{bpVersion}/{artifactName}/{resourceType}/{resourceId}" : {
- "post" : {
- "tags" : [ "Resource template" ],
- "summary" : "Store a resolved template w/ resourceId and resourceType",
- "description" : "Store a template for a given CBA's action, identified by its blueprint name, blueprint version, artifact name, resourceId and resourceType.",
- "operationId" : "TemplateController_postWithResourceIdAndResourceType_POST.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
- "produces" : [ "application/json" ],
- "parameters" : [ {
- "name" : "bpName",
- "in" : "path",
- "description" : "Name of the CBA",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "bpVersion",
- "in" : "path",
- "description" : "Version of the CBA",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "artifactName",
- "in" : "path",
- "description" : "Artifact name for which to retrieve a resolved resource",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "resourceType",
- "in" : "path",
- "description" : "Resource Type associated with the resolution",
- "required" : true,
- "type" : "string"
- }, {
- "name" : "resourceId",
- "in" : "path",
- "description" : "Resource Id associated with the resolution",
- "required" : true,
- "type" : "string"
- }, {
- "in" : "body",
- "name" : "body",
- "description" : "Template to store",
- "required" : true,
- "schema" : {
- "type" : "string"
- }
- } ],
- "responses" : {
- "200" : {
- "description" : "successful operation",
- "schema" : {
- "$ref" : "#/definitions/TemplateResolution"
- }
- }
- }
- }
- }
- },
- "securityDefinitions" : {
- "Basic Auth" : {
- "type" : "basic"
- }
- },
- "definitions" : {
- "ArtifactDefinition" : {
- "type" : "object",
- "properties" : {
- "type" : {
- "type" : "string"
- },
- "file" : {
- "type" : "string"
- },
- "repository" : {
- "type" : "string"
- },
- "description" : {
- "type" : "string"
- },
- "properties" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/JsonNode"
- }
- },
- "deploy_Path" : {
- "type" : "string"
- }
- }
- },
- "BlueprintModelSearch" : {
- "type" : "object",
- "required" : [ "artifactName", "artifactVersion", "createdDate", "id", "published", "tags", "updatedBy" ],
- "properties" : {
- "id" : {
- "type" : "string",
- "example" : "658f9a48-7f54-41ba-ae18-c69f26f3dc94",
- "description" : "ID of Blueprint model, is automatically created by CDS"
- },
- "artifactUUId" : {
- "type" : "string",
- "example" : null,
- "description" : "Artifact UUID, usually null"
- },
- "artifactType" : {
- "type" : "string",
- "example" : "SDNC_MODEL",
- "description" : "Artifact Type, usually null"
- },
- "artifactVersion" : {
- "type" : "string",
- "example" : "1.0.0",
- "description" : "Artifact Version, usually 1.0.0"
- },
- "artifactDescription" : {
- "type" : "string",
- "example" : "",
- "description" : "Artifact Description, usually empty"
- },
- "internalVersion" : {
- "type" : "integer",
- "format" : "int32",
- "example" : null,
- "description" : "Internal Version of CBA, usually null"
- },
- "createdDate" : {
- "type" : "string",
- "format" : "date-time",
- "example" : "2020-11-19T10:34:56.000Z",
- "description" : "Datetime of the creation of CBA in CDS"
- },
- "artifactName" : {
- "type" : "string",
- "example" : "pnf_netconf",
- "description" : "Artifact Name, defined in Metadata"
- },
- "published" : {
- "type" : "string",
- "example" : "pnf_netconf",
- "description" : "Artifact Name, defined in Metadata"
- },
- "updatedBy" : {
- "type" : "string",
- "example" : "Deutsche Telekom AG",
- "description" : "Name of publisher, defined in Metadata"
- },
- "tags" : {
- "type" : "string",
- "example" : "test",
- "description" : "Tags to identify the CBA, defined in Metadata"
- }
- }
- },
- "BootstrapRequest" : {
- "type" : "object",
- "required" : [ "loadCBA", "loadModelType", "loadResourceDictionary" ],
- "properties" : {
- "loadModelType" : {
- "type" : "boolean",
- "example" : true,
- "description" : "Specifies if default model types should be loaded"
- },
- "loadResourceDictionary" : {
- "type" : "boolean",
- "example" : true,
- "description" : "Specifies if default data dictionaries should be loaded"
- },
- "loadCBA" : {
- "type" : "boolean",
- "example" : true,
- "description" : "Specifies if default blueprint models should be loaded"
- }
- }
- },
- "CapabilityAssignment" : {
- "type" : "object",
- "properties" : {
- "attributes" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/JsonNode"
- }
- },
- "properties" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/JsonNode"
- }
- }
- }
- },
- "ConstraintClause" : {
- "type" : "object",
- "properties" : {
- "equal" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "length" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "pattern" : {
- "type" : "string"
- },
- "schema" : {
- "type" : "string"
- },
- "greater_than" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "greater_or_equal" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "less_than" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "less_or_equal" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "in_range" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/JsonNode"
- }
- },
- "valid_values" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/JsonNode"
- }
- },
- "min_length" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "max_length" : {
- "$ref" : "#/definitions/JsonNode"
- }
- }
- },
- "EntrySchema" : {
- "type" : "object",
- "properties" : {
- "type" : {
- "type" : "string"
- },
- "constraints" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/ConstraintClause"
- }
- }
- }
- },
- "FilePart" : {
- "type" : "object"
- },
- "Implementation" : {
- "type" : "object",
- "properties" : {
- "primary" : {
- "type" : "string"
- },
- "dependencies" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "timeout" : {
- "type" : "integer",
- "format" : "int32"
- },
- "lock" : {
- "$ref" : "#/definitions/LockAssignment"
- },
- "operation_host" : {
- "type" : "string"
- }
- }
- },
- "InterfaceAssignment" : {
- "type" : "object",
- "properties" : {
- "operations" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/OperationAssignment"
- }
- },
- "inputs" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/JsonNode"
- }
- }
- }
- },
- "JsonNode" : {
- "type" : "object",
- "properties" : {
- "valueNode" : {
- "type" : "boolean"
- },
- "containerNode" : {
- "type" : "boolean"
- },
- "missingNode" : {
- "type" : "boolean"
- },
- "array" : {
- "type" : "boolean"
- },
- "object" : {
- "type" : "boolean"
- },
- "nodeType" : {
- "type" : "string",
- "enum" : [ "ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING" ]
- },
- "pojo" : {
- "type" : "boolean"
- },
- "number" : {
- "type" : "boolean"
- },
- "integralNumber" : {
- "type" : "boolean"
- },
- "floatingPointNumber" : {
- "type" : "boolean"
- },
- "short" : {
- "type" : "boolean"
- },
- "int" : {
- "type" : "boolean"
- },
- "long" : {
- "type" : "boolean"
- },
- "float" : {
- "type" : "boolean"
- },
- "double" : {
- "type" : "boolean"
- },
- "bigDecimal" : {
- "type" : "boolean"
- },
- "bigInteger" : {
- "type" : "boolean"
- },
- "textual" : {
- "type" : "boolean"
- },
- "boolean" : {
- "type" : "boolean"
- },
- "null" : {
- "type" : "boolean"
- },
- "binary" : {
- "type" : "boolean"
- }
- }
- },
- "LockAssignment" : {
- "type" : "object",
- "properties" : {
- "key" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "acquireTimeout" : {
- "$ref" : "#/definitions/JsonNode"
- }
- }
- },
- "ModelType" : {
- "type" : "object",
- "required" : [ "definition", "definitionType", "derivedFrom", "description", "modelName", "tags", "updatedBy", "version" ],
- "properties" : {
- "modelName" : {
- "type" : "string"
- },
- "derivedFrom" : {
- "type" : "string"
- },
- "definitionType" : {
- "type" : "string"
- },
- "definition" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "description" : {
- "type" : "string"
- },
- "version" : {
- "type" : "string"
- },
- "tags" : {
- "type" : "string"
- },
- "creationDate" : {
- "type" : "string",
- "format" : "date-time"
- },
- "updatedBy" : {
- "type" : "string"
- }
- }
- },
- "NodeFilterDefinition" : {
- "type" : "object",
- "properties" : {
- "properties" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/PropertyDefinition"
- }
- },
- "capabilities" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- }
- }
- },
- "NodeTemplate" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "type" : "string"
- },
- "type" : {
- "type" : "string"
- },
- "metadata" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
- }
- },
- "directives" : {
- "type" : "array",
- "items" : {
- "type" : "string"
- }
- },
- "properties" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/JsonNode"
- }
- },
- "attributes" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/JsonNode"
- }
- },
- "capabilities" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/CapabilityAssignment"
- }
- },
- "requirements" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/RequirementAssignment"
- }
- },
- "interfaces" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/InterfaceAssignment"
- }
- },
- "artifacts" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/ArtifactDefinition"
- }
- },
- "copy" : {
- "type" : "string"
- },
- "node_filter" : {
- "$ref" : "#/definitions/NodeFilterDefinition"
- }
- }
- },
- "OperationAssignment" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "type" : "string"
- },
- "implementation" : {
- "$ref" : "#/definitions/Implementation"
- },
- "inputs" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/JsonNode"
- }
- },
- "outputs" : {
- "type" : "object",
- "additionalProperties" : {
- "$ref" : "#/definitions/JsonNode"
- }
- }
- }
- },
- "Page" : {
- "type" : "object",
- "properties" : {
- "totalPages" : {
- "type" : "integer",
- "format" : "int32"
- },
- "totalElements" : {
- "type" : "integer",
- "format" : "int64"
- },
- "number" : {
- "type" : "integer",
- "format" : "int32"
- },
- "size" : {
- "type" : "integer",
- "format" : "int32"
- },
- "numberOfElements" : {
- "type" : "integer",
- "format" : "int32"
- },
- "content" : {
- "type" : "array",
- "items" : {
- "type" : "object"
- }
- },
- "sort" : {
- "$ref" : "#/definitions/Sort"
- },
- "first" : {
- "type" : "boolean"
- },
- "last" : {
- "type" : "boolean"
- },
- "pageable" : {
- "$ref" : "#/definitions/Pageable"
- },
- "empty" : {
- "type" : "boolean"
- }
- }
- },
- "PageBlueprintModelSearch" : {
- "type" : "object",
- "properties" : {
- "totalPages" : {
- "type" : "integer",
- "format" : "int32"
- },
- "totalElements" : {
- "type" : "integer",
- "format" : "int64"
- },
- "number" : {
- "type" : "integer",
- "format" : "int32"
- },
- "size" : {
- "type" : "integer",
- "format" : "int32"
- },
- "numberOfElements" : {
- "type" : "integer",
- "format" : "int32"
- },
- "content" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/BlueprintModelSearch"
- }
- },
- "sort" : {
- "$ref" : "#/definitions/Sort"
- },
- "first" : {
- "type" : "boolean"
- },
- "last" : {
- "type" : "boolean"
- },
- "pageable" : {
- "$ref" : "#/definitions/Pageable"
- },
- "empty" : {
- "type" : "boolean"
- }
- }
- },
- "Pageable" : {
- "type" : "object",
- "properties" : {
- "paged" : {
- "type" : "boolean"
- },
- "unpaged" : {
- "type" : "boolean"
- },
- "pageNumber" : {
- "type" : "integer",
- "format" : "int32"
- },
- "pageSize" : {
- "type" : "integer",
- "format" : "int32"
- },
- "offset" : {
- "type" : "integer",
- "format" : "int64"
- },
- "sort" : {
- "$ref" : "#/definitions/Sort"
- }
- }
- },
- "PropertyDefinition" : {
- "type" : "object",
- "properties" : {
- "description" : {
- "type" : "string"
- },
- "required" : {
- "type" : "boolean"
- },
- "type" : {
- "type" : "string"
- },
- "status" : {
- "type" : "string"
- },
- "constraints" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/definitions/ConstraintClause"
- }
- },
- "metadata" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
- }
- },
- "value" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "input-param" : {
- "type" : "boolean"
- },
- "default" : {
- "$ref" : "#/definitions/JsonNode"
- },
- "entry_schema" : {
- "$ref" : "#/definitions/EntrySchema"
- },
- "external-schema" : {
- "type" : "string"
- }
- }
- },
- "RequirementAssignment" : {
- "type" : "object",
- "properties" : {
- "capability" : {
- "type" : "string"
- },
- "node" : {
- "type" : "string"
- },
- "relationship" : {
- "type" : "string"
- }
- }
- },
- "ResourceConfigSnapshot" : {
- "type" : "object",
- "required" : [ "config_snapshot", "createdDate", "resourceId", "resourceType", "status" ],
- "properties" : {
- "resourceType" : {
- "type" : "string",
- "example" : "ServiceInstance",
- "description" : "Resource type."
- },
- "resourceId" : {
- "type" : "string",
- "example" : "1",
- "description" : "ID associated with the resource type in the inventory system."
- },
- "status" : {
- "type" : "string",
- "description" : "Status of the snapshot, either running or candidate.",
- "enum" : [ "RUNNING", "CANDIDATE" ]
- },
- "config_snapshot" : {
- "type" : "string",
- "example" : "config_snapshot",
- "description" : "Snapshot of the resource as retrieved from resource."
- },
- "id" : {
- "type" : "string"
- },
- "createdDate" : {
- "type" : "string",
- "format" : "date-time",
- "description" : "Creation date of the snapshot."
- }
- }
- },
- "ResourceDefinition" : {
- "type" : "object",
- "required" : [ "group", "name", "property", "sources", "updated-by" ],
- "properties" : {
- "tags" : {
- "type" : "string"
- },
- "name" : {
- "type" : "string",
- "example" : "default-source",
- "description" : "Name"
- },
- "property" : {
- "description" : "Property",
- "$ref" : "#/definitions/PropertyDefinition"
- },
- "group" : {
- "type" : "string",
- "example" : "default",
- "description" : "Group"
- },
- "updated-by" : {
- "type" : "string",
- "example" : "example@onap.com",
- "description" : "Updated by"
- },
- "sources" : {
- "type" : "object",
- "example" : "sources",
- "description" : "Sources",
- "additionalProperties" : {
- "$ref" : "#/definitions/NodeTemplate"
- }
- }
- }
- },
- "ResourceDictionary" : {
- "type" : "object",
- "required" : [ "dataType", "definition", "description", "entrySchema", "name", "resourceDictionaryGroup", "tags", "updatedBy" ],
- "properties" : {
- "name" : {
- "type" : "string",
- "example" : "sample-db-source",
- "description" : "Name"
- },
- "dataType" : {
- "type" : "string",
- "example" : "string",
- "description" : "Data type"
- },
- "entrySchema" : {
- "type" : "string",
- "example" : "dt-license-key",
- "description" : "Entry schema"
- },
- "resourceDictionaryGroup" : {
- "type" : "string",
- "example" : "default",
- "description" : "Resource dictionary group"
- },
- "definition" : {
- "description" : "Definition",
- "$ref" : "#/definitions/ResourceDefinition"
- },
- "description" : {
- "type" : "string",
- "example" : "demo_artifacts_version",
- "description" : "Description"
- },
- "tags" : {
- "type" : "string",
- "example" : "hostname",
- "description" : "Tags"
- },
- "creationDate" : {
- "type" : "string",
- "format" : "date-time"
- },
- "updatedBy" : {
- "type" : "string",
- "example" : "username",
- "description" : "Updated by"
- }
- }
- },
- "ResourceResolution" : {
- "type" : "object",
- "required" : [ "artifactName", "blueprintName", "blueprintVersion", "createdDate", "dictionaryName", "dictionarySource", "dictionaryVersion", "name", "occurrence", "resolutionKey", "resourceId", "resourceType", "status", "value" ],
- "properties" : {
- "blueprintName" : {
- "type" : "string",
- "description" : "Name of the CBA."
- },
- "blueprintVersion" : {
- "type" : "string",
- "description" : "Version of the CBA."
- },
- "artifactName" : {
- "type" : "string",
- "description" : "Artifact name for which to retrieve a resolved resource."
- },
- "name" : {
- "type" : "string",
- "description" : "Name of the resource."
- },
- "value" : {
- "type" : "string",
- "description" : "Value of the resolution."
- },
- "status" : {
- "type" : "string",
- "description" : "Whether success of failure."
- },
- "resolutionKey" : {
- "type" : "string",
- "description" : "Resolution Key uniquely identifying the resolution of a given artifact within a CBA."
- },
- "resourceType" : {
- "type" : "string",
- "example" : "ServiceInstance",
- "description" : "Resolution type."
- },
- "resourceId" : {
- "type" : "string",
- "description" : "ID associated with the resolution type in the inventory system."
- },
- "occurrence" : {
- "type" : "integer",
- "format" : "int32",
- "description" : "If resolution occurred multiple time, this field provides the index."
- },
- "dictionaryName" : {
- "type" : "string",
- "description" : "Name of the data dictionary used for the resolution."
- },
- "dictionarySource" : {
- "type" : "string",
- "description" : "Source associated with the data dictionary used for the resolution."
- },
- "dictionaryVersion" : {
- "type" : "integer",
- "format" : "int32",
- "description" : "Version of the data dictionary used for the resolution."
- },
- "id" : {
- "type" : "string"
- },
- "createdDate" : {
- "type" : "string",
- "format" : "date-time",
- "description" : "Creation date of the resolution."
- }
- }
- },
- "ResourceSourceMapping" : {
- "type" : "object",
- "properties" : {
- "resourceSourceMappings" : {
- "type" : "object",
- "additionalProperties" : {
- "type" : "string"
- }
- }
- }
- },
- "Sort" : {
- "type" : "object",
- "properties" : {
- "sorted" : {
- "type" : "boolean"
- },
- "unsorted" : {
- "type" : "boolean"
- },
- "empty" : {
- "type" : "boolean"
- }
- }
- },
- "TemplateResolution" : {
- "type" : "object",
- "required" : [ "artifactName", "blueprintName", "blueprintVersion", "createdDate", "occurrence", "resolutionKey", "resourceId", "resourceType", "result" ],
- "properties" : {
- "blueprintName" : {
- "type" : "string",
- "description" : "Name of the CBA."
- },
- "blueprintVersion" : {
- "type" : "string",
- "description" : "Version of the CBA."
- },
- "artifactName" : {
- "type" : "string",
- "description" : "Artifact name for which to retrieve a resolved resource."
- },
- "result" : {
- "type" : "string",
- "description" : "Rendered template."
- },
- "resolutionKey" : {
- "type" : "string",
- "description" : "Resolution Key uniquely identifying the resolution of a given artifact within a CBA."
- },
- "resourceType" : {
- "type" : "string",
- "example" : "ServiceInstance",
- "description" : "Resolution type."
- },
- "resourceId" : {
- "type" : "string",
- "description" : "ID associated with the resolution type in the inventory system."
- },
- "occurrence" : {
- "type" : "integer",
- "format" : "int32",
- "description" : "If resolution occurred multiple time, this field provides the index."
- },
- "id" : {
- "type" : "string"
- },
- "createdDate" : {
- "type" : "string",
- "format" : "date-time",
- "description" : "Creation date of the resolution."
- }
- }
- },
- "Unit" : {
- "type" : "object"
- },
- "WorkFlowSpecRequest" : {
- "type" : "object",
- "required" : [ "blueprintName", "workflowName" ],
- "properties" : {
- "blueprintName" : {
- "type" : "string",
- "example" : "pnf_netconf",
- "description" : "Name of the BLueprint"
- },
- "version" : {
- "type" : "string"
- },
- "returnContent" : {
- "type" : "string"
- },
- "workflowName" : {
- "type" : "string",
- "example" : "config-assign",
- "description" : "Name of the Workflow"
- },
- "specType" : {
- "type" : "string"
- }
- }
- }
- }
+{
+ "swagger" : "2.0",
+ "info" : {
+ "description" : "Shows all resources and endpoints which CDS BP processor currently provides with sample requests/responses, parameter description and other information.",
+ "version" : "v1",
+ "title" : "CDS Blueprint Processor API Reference",
+ "termsOfService" : "https://www.onap.org/",
+ "contact" : {
+ "name" : "ONAP Community",
+ "url" : "https://www.onap.org/",
+ "email" : "onap-discuss@lists.onap.org"
+ },
+ "license" : {
+ "name" : "Apache 2.0",
+ "url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
+ }
+ },
+ "host" : "localhost:8080",
+ "tags" : [ {
+ "name" : "Blueprint Model Catalog",
+ "description" : "Manages all blueprint models which are available in CDS"
+ }, {
+ "name" : "Model Type Catalog",
+ "description" : "Manages data types in CDS"
+ }, {
+ "name" : "Resource configuration",
+ "description" : "Interaction with stored configurations"
+ }, {
+ "name" : "Resource dictionary",
+ "description" : "Interaction with stored dictionaries"
+ }, {
+ "name" : "Resource template",
+ "description" : "Interaction with resolved templates"
+ }, {
+ "name" : "Resources",
+ "description" : "Interaction with resolved resources"
+ } ],
+ "schemes" : [ "http" ],
+ "paths" : {
+ "/api/v1/blueprint-model" : {
+ "get" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "List all Blueprint Models",
+ "description" : "Lists all meta-data of blueprint models which are saved in CDS.",
+ "operationId" : "BlueprintModelController_allBlueprintModel_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "responses" : {
+ "200" : {
+ "description" : "OK",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/BlueprintModelSearch"
+ }
+ }
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ }
+ },
+ "post" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Save a Blueprint Model",
+ "description" : "Saves a blueprint model by the given CBA zip file input. There is no validation of the attached CBA happening when this API is called.",
+ "operationId" : "BlueprintModelController_saveBlueprint_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "consumes" : [ "multipart/form-data" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "file",
+ "description" : "CBA file to be uploaded (example: cba.zip)",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/FilePart"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "OK",
+ "schema" : {
+ "$ref" : "#/definitions/BlueprintModelSearch"
+ }
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/bootstrap" : {
+ "post" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Bootstrap CDS",
+ "description" : "Loads all Model Types, Resource Dictionaries and Blueprint Models which are included in CDS by default. Before starting to work with CDS, bootstrap should be called to load all the basic models that each orginization might support. Parameter values can be set as `false` to skip loading e.g. the Resource Dictionaries but this is not recommended.",
+ "operationId" : "BlueprintModelController_bootstrap_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "body",
+ "description" : "Specifies which elements to load",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/BootstrapRequest"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "OK",
+ "schema" : {
+ "type" : "object"
+ }
+ },
+ "500" : {
+ "description" : "Internal Server Error"
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/by-name/{name}/version/{version}" : {
+ "get" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Get a Blueprint Model by Name and Version",
+ "description" : "Get Meta-Data of a Blueprint Model by its name and version.",
+ "operationId" : "BlueprintModelController_getBlueprintByNameAndVersion_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "name",
+ "in" : "path",
+ "description" : "Name of the blueprint model",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "pnf_netconf"
+ }, {
+ "name" : "version",
+ "in" : "path",
+ "description" : "Version of the blueprint model",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "1.0.0"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "OK",
+ "schema" : {
+ "$ref" : "#/definitions/BlueprintModelSearch"
+ }
+ },
+ "404" : {
+ "description" : "Not Found"
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/download/by-name/{name}/version/{version}" : {
+ "get" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Download a Blueprint Model",
+ "description" : "Gets the CBA of a blueprint model by its name and version. Response can be saved to a file to download the CBA.",
+ "operationId" : "BlueprintModelController_downloadBlueprintByNameAndVersion_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "name",
+ "in" : "path",
+ "description" : "Name of the blueprint model",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "pnf_netconf"
+ }, {
+ "name" : "version",
+ "in" : "path",
+ "description" : "Version of the blueprint model",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "1.0.0"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "OK",
+ "schema" : {
+ "type" : "object"
+ }
+ },
+ "404" : {
+ "description" : "Not Found"
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/download/{id}" : {
+ "get" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Download a Blueprint Model by ID",
+ "description" : "Gets the CBA of a blueprint model by its ID. Response can be saved to a file to download the CBA.",
+ "operationId" : "BlueprintModelController_downloadBluePrint_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "id",
+ "in" : "path",
+ "description" : "ID of the blueprint model to download",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "OK",
+ "schema" : {
+ "type" : "object"
+ }
+ },
+ "404" : {
+ "description" : "Not Found"
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/enrich" : {
+ "post" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Enrich a Blueprint Model",
+ "description" : "Enriches the attached CBA and returns the enriched CBA zip file in the response. The enrichment process will complete the package by providing all the definition of types used.",
+ "operationId" : "BlueprintModelController_enrichBlueprint_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "consumes" : [ "multipart/form-data" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "file",
+ "description" : "CBA zip file to be uploaded (example: cba_unenriched.zip)",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/FilePart"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "object"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/enrichandpublish" : {
+ "post" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Enrich and publish a Blueprint Model",
+ "description" : "Enriches the attached CBA, validates it and saves it in CDS if validation was successful.",
+ "operationId" : "BlueprintModelController_enrichAndPubishlueprint_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "consumes" : [ "multipart/form-data" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "file",
+ "description" : "Unenriched CBA zip file to be uploaded (example: cba_unenriched.zip)",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/FilePart"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "OK",
+ "schema" : {
+ "$ref" : "#/definitions/BlueprintModelSearch"
+ }
+ },
+ "503" : {
+ "description" : "Service Unavailable"
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/meta-data/{keyword}" : {
+ "get" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Search for Blueprints by a Keyword",
+ "description" : "Lists all blueprint models by a matching keyword in any of the meta-data of the blueprint models. Blueprint models are just returned if a whole keyword is matching, not just parts of it. Not case-sensitive. Used by CDS UI.",
+ "operationId" : "BlueprintModelController_allBlueprintModelMetaData_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "keyword",
+ "in" : "path",
+ "description" : "Keyword to search for in blueprint model meta-data",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "pnf_netconf"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/BlueprintModelSearch"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/name/{name}/version/{version}" : {
+ "delete" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Delete a Blueprint Model by Name",
+ "description" : "Deletes a blueprint model identified by its name and version from CDS.",
+ "operationId" : "BlueprintModelController_deleteBlueprintByName_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "parameters" : [ {
+ "name" : "name",
+ "in" : "path",
+ "description" : "Name of the blueprint model",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "pnf_netconf"
+ }, {
+ "name" : "version",
+ "in" : "path",
+ "description" : "Version of the blueprint model",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "1.0.0"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "object"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/paged" : {
+ "get" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Get Blueprints ordered",
+ "description" : "Lists all blueprint models which are saved in CDS in an ordered mode.",
+ "operationId" : "BlueprintModelController_allBlueprintModelPaged_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "limit",
+ "in" : "query",
+ "description" : "Maximum number of returned blueprint models",
+ "required" : false,
+ "type" : "integer",
+ "default" : 20,
+ "format" : "int32"
+ }, {
+ "name" : "offset",
+ "in" : "query",
+ "description" : "Offset",
+ "required" : false,
+ "type" : "integer",
+ "default" : 0,
+ "format" : "int32"
+ }, {
+ "name" : "sort",
+ "in" : "query",
+ "description" : "Order of returned blueprint models",
+ "required" : false,
+ "type" : "string",
+ "default" : "DATE",
+ "enum" : [ "DATE", "NAME", "VERSION" ]
+ }, {
+ "name" : "sortType",
+ "in" : "query",
+ "description" : "Ascend or descend ordering",
+ "required" : false,
+ "type" : "string",
+ "default" : "ASC"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/PageBlueprintModelSearch"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/paged/meta-data/{keyword}" : {
+ "get" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Search for Blueprints by a Keyword in an ordered mode",
+ "description" : "Lists all blueprint models by a matching keyword in any of the meta-data of the blueprint models in an ordered mode. Blueprint models are just returned if a whole keyword is matching, not just parts of it. Not case-sensitive. Used by CDS UI.",
+ "operationId" : "BlueprintModelController_allBlueprintModelMetaDataPaged_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "keyword",
+ "in" : "path",
+ "description" : "Keyword to search for in blueprint model meta-data",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "pnf_netconf"
+ }, {
+ "name" : "limit",
+ "in" : "query",
+ "description" : "Maximum number of returned blueprint models",
+ "required" : false,
+ "type" : "integer",
+ "default" : 20,
+ "format" : "int32"
+ }, {
+ "name" : "offset",
+ "in" : "query",
+ "description" : "Offset",
+ "required" : false,
+ "type" : "integer",
+ "default" : 0,
+ "format" : "int32"
+ }, {
+ "name" : "sort",
+ "in" : "query",
+ "description" : "Order of returned blueprint models",
+ "required" : false,
+ "type" : "string",
+ "default" : "DATE",
+ "enum" : [ "DATE", "NAME", "VERSION" ]
+ }, {
+ "name" : "sortType",
+ "in" : "query",
+ "description" : "Ascend or descend ordering",
+ "required" : false,
+ "type" : "string",
+ "default" : "ASC"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/PageBlueprintModelSearch"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/publish" : {
+ "post" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Publish a Blueprint Model",
+ "description" : "Validates the attached CBA file and saves it in CDS if validation was successful. CBA needs to be already enriched.",
+ "operationId" : "BlueprintModelController_publishBlueprint_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "consumes" : [ "multipart/form-data" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "file",
+ "description" : "Enriched CBA zip file to be uploaded (example: cba_enriched.zip)",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/FilePart"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/BlueprintModelSearch"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/search/{tags}" : {
+ "get" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Search for a Blueprint by Tag",
+ "description" : "Searches for all blueprint models which contain the specified input parameter in their tags. Blueprint models which contain just parts of the searched word in their tags are also returned.",
+ "operationId" : "BlueprintModelController_searchBlueprintModels_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tags",
+ "in" : "path",
+ "description" : "Tag to search for",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "test"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/BlueprintModelSearch"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/workflow-spec" : {
+ "post" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Get Workflow Specification",
+ "description" : "Get the workflow of a blueprint identified by Blueprint and workflow name. Inputs, outputs and data types of workflow is returned.",
+ "operationId" : "BlueprintModelController_workflowSpec_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "body",
+ "description" : "Blueprint and workflow identification",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/WorkFlowSpecRequest"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "object"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/workflows/blueprint-name/{name}/version/{version}" : {
+ "get" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Get Workflows of a Blueprint",
+ "description" : "Get all available workflows of a Blueprint identified by its name and version.",
+ "operationId" : "BlueprintModelController_getWorkflowList_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "name",
+ "in" : "path",
+ "description" : "Name of the blueprint model",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "pnf_netconf"
+ }, {
+ "name" : "version",
+ "in" : "path",
+ "description" : "Version of the blueprint model",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "1.0.0"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "object"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/blueprint-model/{id}" : {
+ "get" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Get a Blueprint Model by ID",
+ "description" : "Get meta-data of a blueprint model by its internally created ID.",
+ "operationId" : "BlueprintModelController_getBlueprintModel_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "id",
+ "in" : "path",
+ "description" : "ID of the blueprint model to search for",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "OK",
+ "schema" : {
+ "$ref" : "#/definitions/BlueprintModelSearch"
+ }
+ },
+ "404" : {
+ "description" : "Not Found"
+ }
+ }
+ },
+ "delete" : {
+ "tags" : [ "Blueprint Model Catalog" ],
+ "summary" : "Delete a Blueprint Model by ID",
+ "description" : "Delete a blueprint model by its ID. ID is the internally created ID of blueprint, not the name of blueprint.",
+ "operationId" : "BlueprintModelController_deleteBlueprint_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "parameters" : [ {
+ "name" : "id",
+ "in" : "path",
+ "description" : "ID of the blueprint model to delete",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "OK",
+ "schema" : {
+ "type" : "object"
+ }
+ },
+ "404" : {
+ "description" : "RESOURCE_NOT_FOUND"
+ }
+ }
+ }
+ },
+ "/api/v1/configs" : {
+ "get" : {
+ "tags" : [ "Resource configuration" ],
+ "summary" : "Retrieve a resource configuration snapshot",
+ "description" : "Retrieve a config snapshot, identified by its Resource Id and Type. An extra 'format' parameter can be passed to tell what content-type is expected.",
+ "operationId" : "ResourceConfigSnapshotController_get_GET.org.onap.ccsdk.cds.blueprintsprocessor.configs.api",
+ "produces" : [ "text/plain", "application/json", "application/xml" ],
+ "parameters" : [ {
+ "name" : "resourceType",
+ "in" : "query",
+ "description" : "Resource Type associated of the resource configuration snapshot",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "\"PNF\""
+ }, {
+ "name" : "resourceId",
+ "in" : "query",
+ "description" : "Resource Id associated of the resource configuration snapshot",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "\"1\""
+ }, {
+ "name" : "status",
+ "in" : "query",
+ "description" : "Status of the snapshot being retrieved",
+ "required" : false,
+ "type" : "string",
+ "default" : "RUNNING"
+ }, {
+ "name" : "format",
+ "in" : "query",
+ "description" : "Expected format of the snapshot being retrieved",
+ "required" : false,
+ "type" : "string",
+ "default" : "text/plain"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/configs/allByID" : {
+ "get" : {
+ "tags" : [ "Resource configuration" ],
+ "summary" : "Retrieve all resource configuration snapshots identified by a given resource_id",
+ "description" : "Retrieve all config snapshots, identified by its Resource Id, ordered by most recently created/modified date. ",
+ "operationId" : "ResourceConfigSnapshotController_getAllByID_GET.org.onap.ccsdk.cds.blueprintsprocessor.configs.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "resourceId",
+ "in" : "query",
+ "description" : "Resource Id associated of the resource configuration snapshots",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "\"1\""
+ }, {
+ "name" : "status",
+ "in" : "query",
+ "description" : "Status of the snapshot being retrieved",
+ "required" : false,
+ "type" : "string",
+ "default" : "ANY"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ResourceConfigSnapshot"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/configs/allByType" : {
+ "get" : {
+ "tags" : [ "Resource configuration" ],
+ "summary" : "Retrieve all resource configuration snapshots for a given resource type",
+ "description" : "Retrieve all config snapshots matching a specified Resource Type, ordered by most recently created/modified date. ",
+ "operationId" : "ResourceConfigSnapshotController_getAllByType_GET.org.onap.ccsdk.cds.blueprintsprocessor.configs.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "resourceType",
+ "in" : "query",
+ "description" : "Resource Type associated of the resource configuration snapshot",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "\"PNF\""
+ }, {
+ "name" : "status",
+ "in" : "query",
+ "description" : "Status of the snapshot being retrieved",
+ "required" : false,
+ "type" : "string",
+ "default" : "ANY"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ResourceConfigSnapshot"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/configs/{resourceType}/{resourceId}/{status}" : {
+ "post" : {
+ "tags" : [ "Resource configuration" ],
+ "summary" : "Store a resource configuration snapshot identified by resourceId, resourceType, status",
+ "description" : "Store a resource configuration snapshot, identified by its resourceId and resourceType, and optionally its status, either RUNNING or CANDIDATE.",
+ "operationId" : "ResourceConfigSnapshotController_postWithResourceIdAndResourceType_POST.org.onap.ccsdk.cds.blueprintsprocessor.configs.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "resourceType",
+ "in" : "path",
+ "description" : "Resource Type associated with the resolution",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "\"PNF\""
+ }, {
+ "name" : "resourceId",
+ "in" : "path",
+ "description" : "Resource Id associated with the resolution",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "\"1\""
+ }, {
+ "name" : "status",
+ "in" : "path",
+ "description" : "Status of the snapshot being retrieved",
+ "required" : true,
+ "type" : "string",
+ "default" : "RUNNING"
+ }, {
+ "in" : "body",
+ "name" : "body",
+ "description" : "Config snapshot to store",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ResourceConfigSnapshot"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/dictionary" : {
+ "post" : {
+ "tags" : [ "Resource dictionary" ],
+ "summary" : "Save a resource dictionary",
+ "description" : "Save a resource dictionary by dictionary provided.",
+ "operationId" : "ResourceDictionaryController_saveResourceDictionary_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "body",
+ "description" : "Resource dictionary to store",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/ResourceDictionary"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ResourceDictionary"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/dictionary/by-names" : {
+ "post" : {
+ "tags" : [ "Resource dictionary" ],
+ "summary" : "Search for a resource dictionary",
+ "description" : "Search for a resource dictionary by names provided.",
+ "operationId" : "ResourceDictionaryController_searchResourceDictionaryByNames_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "body",
+ "description" : "List of names",
+ "required" : true,
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ResourceDictionary"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/dictionary/definition" : {
+ "post" : {
+ "tags" : [ "Resource dictionary" ],
+ "summary" : "Save a resource dictionary",
+ "description" : "Save a resource dictionary by resource definition provided.",
+ "operationId" : "ResourceDictionaryController_saveResourceDictionary_1_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "body",
+ "description" : "Resource definition to generate",
+ "required" : true,
+ "schema" : {
+ "$ref" : "#/definitions/ResourceDefinition"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ResourceDefinition"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/dictionary/resource_dictionary_group" : {
+ "get" : {
+ "tags" : [ "Resource dictionary" ],
+ "summary" : "Retrieve all resource dictionary groups",
+ "description" : "Retrieve all resource dictionary groups.",
+ "operationId" : "ResourceDictionaryController_getResourceDictionaryDistinct_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/dictionary/search/{tags}" : {
+ "get" : {
+ "tags" : [ "Resource dictionary" ],
+ "summary" : "Search for a resource dictionary",
+ "description" : "Search for a resource dictionary by tags provided.",
+ "operationId" : "ResourceDictionaryController_searchResourceDictionaryByTags_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tags",
+ "in" : "path",
+ "description" : "Tags list",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "\"status\""
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ResourceDictionary"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/dictionary/source-mapping" : {
+ "get" : {
+ "tags" : [ "Resource dictionary" ],
+ "summary" : "Search for a source mapping",
+ "description" : "Search for a source mapping.",
+ "operationId" : "ResourceDictionaryController_getResourceSourceMapping_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ResourceSourceMapping"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/dictionary/{name}" : {
+ "get" : {
+ "tags" : [ "Resource dictionary" ],
+ "summary" : "Retrieve a resource dictionary",
+ "description" : "Retrieve a resource dictionary by name provided.",
+ "operationId" : "ResourceDictionaryController_getResourceDictionaryByName_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "name",
+ "in" : "path",
+ "description" : "Name of the resource",
+ "required" : true,
+ "type" : "string",
+ "x-example" : "\"hostname\""
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ResourceDictionary"
+ }
+ }
+ }
+ },
+ "delete" : {
+ "tags" : [ "Resource dictionary" ],
+ "summary" : "Remove a resource dictionary",
+ "description" : "Remove a resource dictionary by name provided.",
+ "operationId" : "ResourceDictionaryController_deleteResourceDictionaryByName_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "parameters" : [ {
+ "name" : "name",
+ "in" : "path",
+ "description" : "Name of the resource",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "object"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/model-type/" : {
+ "post" : {
+ "tags" : [ "Model Type Catalog" ],
+ "summary" : "Save a model type",
+ "description" : "Save a model type by model type definition provided.",
+ "operationId" : "ModelTypeController_saveModelType_POST.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "consumes" : [ "application/json" ],
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "in" : "body",
+ "name" : "body",
+ "required" : false,
+ "schema" : {
+ "$ref" : "#/definitions/ModelType"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ModelType"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/model-type/by-definition/{definitionType}" : {
+ "get" : {
+ "tags" : [ "Model Type Catalog" ],
+ "summary" : "Retrieve a list of model types",
+ "description" : "Retrieve a list of model types by definition type provided.",
+ "operationId" : "ModelTypeController_getModelTypeByDefinitionType_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "definitionType",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ModelType"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/model-type/search/{tags}" : {
+ "get" : {
+ "tags" : [ "Model Type Catalog" ],
+ "summary" : "Retrieve a list of model types",
+ "description" : "Retrieve a list of model types by tags provided.",
+ "operationId" : "ModelTypeController_searchModelTypes_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "tags",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ModelType"
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/model-type/{name}" : {
+ "get" : {
+ "tags" : [ "Model Type Catalog" ],
+ "summary" : "Retrieve a model type",
+ "description" : "Retrieve a model type by name provided.",
+ "operationId" : "ModelTypeController_getModelTypeByName_GET.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "name",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ModelType"
+ }
+ }
+ }
+ },
+ "delete" : {
+ "tags" : [ "Model Type Catalog" ],
+ "summary" : "Remove a model type",
+ "description" : "Remove a model type by name provided.",
+ "operationId" : "ModelTypeController_deleteModelTypeByName_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.designer.api",
+ "parameters" : [ {
+ "name" : "name",
+ "in" : "path",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ModelType"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/resources" : {
+ "get" : {
+ "tags" : [ "Resources" ],
+ "summary" : "Get all resolved resources using the resolution key",
+ "description" : "Retrieve all stored resolved resources using the blueprint name, blueprint version, artifact name and the resolution-key.",
+ "operationId" : "ResourceController_getAllFromResolutionKeyOrFromResourceTypeAndId_GET.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "bpName",
+ "in" : "query",
+ "description" : "Name of the CBA",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "bpVersion",
+ "in" : "query",
+ "description" : "Version of the CBA",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "artifactName",
+ "in" : "query",
+ "description" : "Artifact name for which to retrieve a resolved resource",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "resolutionKey",
+ "in" : "query",
+ "description" : "Resolution Key associated with the resolution",
+ "required" : false,
+ "type" : "string"
+ }, {
+ "name" : "resourceType",
+ "in" : "query",
+ "description" : "Resource Type associated with the resolution",
+ "required" : false,
+ "type" : "string"
+ }, {
+ "name" : "resourceId",
+ "in" : "query",
+ "description" : "Resource Id associated with the resolution",
+ "required" : false,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ResourceResolution"
+ }
+ }
+ }
+ }
+ },
+ "delete" : {
+ "tags" : [ "Resources" ],
+ "summary" : "Delete resources using resolution key",
+ "description" : "Delete all the resources associated to a resolution-key using blueprint metadata, artifact name and the resolution-key.",
+ "operationId" : "ResourceController_deleteByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKey_DELETE.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "bpName",
+ "in" : "query",
+ "description" : "Name of the CBA",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "bpVersion",
+ "in" : "query",
+ "description" : "Version of the CBA",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "artifactName",
+ "in" : "query",
+ "description" : "Artifact name for which to retrieve a resolved resource",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "resolutionKey",
+ "in" : "query",
+ "description" : "Resolution Key associated with the resolution",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/Unit"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/resources/resource" : {
+ "get" : {
+ "tags" : [ "Resources" ],
+ "summary" : "Fetch a resource value using resolution key",
+ "description" : "Retrieve a stored resource value using the blueprint metadata, artifact name, resolution-key along with the name of the resource value to retrieve.",
+ "operationId" : "ResourceController_getOneFromResolutionKey_GET.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "bpName",
+ "in" : "query",
+ "description" : "Name of the CBA",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "bpVersion",
+ "in" : "query",
+ "description" : "Version of the CBA",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "artifactName",
+ "in" : "query",
+ "description" : "Artifact name for which to retrieve a resolved resource",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "resolutionKey",
+ "in" : "query",
+ "description" : "Resolution Key associated with the resolution",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "name",
+ "in" : "query",
+ "description" : "Name of the resource to retrieve",
+ "required" : true,
+ "type" : "string"
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/ResourceResolution"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/template/{bpName}/{bpVersion}/{artifactName}/{resolutionKey}" : {
+ "post" : {
+ "tags" : [ "Resource template" ],
+ "summary" : "Store a resolved template w/ resolution-key",
+ "description" : "Store a template for a given CBA's action, identified by its blueprint name, blueprint version, artifact name and resolution key.",
+ "operationId" : "TemplateController_postWithResolutionKey_POST.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "bpName",
+ "in" : "path",
+ "description" : "Name of the CBA",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "bpVersion",
+ "in" : "path",
+ "description" : "Version of the CBA",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "artifactName",
+ "in" : "path",
+ "description" : "Artifact name for which to retrieve a resolved resource",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "resolutionKey",
+ "in" : "path",
+ "description" : "Resolution Key associated with the resolution",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "in" : "body",
+ "name" : "body",
+ "description" : "Template to store",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/TemplateResolution"
+ }
+ }
+ }
+ }
+ },
+ "/api/v1/template/{bpName}/{bpVersion}/{artifactName}/{resourceType}/{resourceId}" : {
+ "post" : {
+ "tags" : [ "Resource template" ],
+ "summary" : "Store a resolved template w/ resourceId and resourceType",
+ "description" : "Store a template for a given CBA's action, identified by its blueprint name, blueprint version, artifact name, resourceId and resourceType.",
+ "operationId" : "TemplateController_postWithResourceIdAndResourceType_POST.org.onap.ccsdk.cds.blueprintsprocessor.resource.api",
+ "produces" : [ "application/json" ],
+ "parameters" : [ {
+ "name" : "bpName",
+ "in" : "path",
+ "description" : "Name of the CBA",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "bpVersion",
+ "in" : "path",
+ "description" : "Version of the CBA",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "artifactName",
+ "in" : "path",
+ "description" : "Artifact name for which to retrieve a resolved resource",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "resourceType",
+ "in" : "path",
+ "description" : "Resource Type associated with the resolution",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "name" : "resourceId",
+ "in" : "path",
+ "description" : "Resource Id associated with the resolution",
+ "required" : true,
+ "type" : "string"
+ }, {
+ "in" : "body",
+ "name" : "body",
+ "description" : "Template to store",
+ "required" : true,
+ "schema" : {
+ "type" : "string"
+ }
+ } ],
+ "responses" : {
+ "200" : {
+ "description" : "successful operation",
+ "schema" : {
+ "$ref" : "#/definitions/TemplateResolution"
+ }
+ }
+ }
+ }
+ }
+ },
+ "securityDefinitions" : {
+ "Basic Auth" : {
+ "type" : "basic"
+ }
+ },
+ "definitions" : {
+ "ArtifactDefinition" : {
+ "type" : "object",
+ "properties" : {
+ "type" : {
+ "type" : "string"
+ },
+ "file" : {
+ "type" : "string"
+ },
+ "repository" : {
+ "type" : "string"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ },
+ "deploy_Path" : {
+ "type" : "string"
+ }
+ }
+ },
+ "BlueprintModelSearch" : {
+ "type" : "object",
+ "required" : [ "artifactName", "artifactVersion", "createdDate", "id", "published", "tags", "updatedBy" ],
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "example" : "658f9a48-7f54-41ba-ae18-c69f26f3dc94",
+ "description" : "ID of Blueprint model, is automatically created by CDS"
+ },
+ "artifactUUId" : {
+ "type" : "string",
+ "example" : null,
+ "description" : "Artifact UUID, usually null"
+ },
+ "artifactType" : {
+ "type" : "string",
+ "example" : "SDNC_MODEL",
+ "description" : "Artifact Type, usually null"
+ },
+ "artifactVersion" : {
+ "type" : "string",
+ "example" : "1.0.0",
+ "description" : "Artifact Version, usually 1.0.0"
+ },
+ "artifactDescription" : {
+ "type" : "string",
+ "example" : "",
+ "description" : "Artifact Description, usually empty"
+ },
+ "internalVersion" : {
+ "type" : "integer",
+ "format" : "int32",
+ "example" : null,
+ "description" : "Internal Version of CBA, usually null"
+ },
+ "createdDate" : {
+ "type" : "string",
+ "format" : "date-time",
+ "example" : "2020-11-19T10:34:56.000Z",
+ "description" : "Datetime of the creation of CBA in CDS"
+ },
+ "artifactName" : {
+ "type" : "string",
+ "example" : "pnf_netconf",
+ "description" : "Artifact Name, defined in Metadata"
+ },
+ "published" : {
+ "type" : "string",
+ "example" : "pnf_netconf",
+ "description" : "Artifact Name, defined in Metadata"
+ },
+ "updatedBy" : {
+ "type" : "string",
+ "example" : "Deutsche Telekom AG",
+ "description" : "Name of publisher, defined in Metadata"
+ },
+ "tags" : {
+ "type" : "string",
+ "example" : "test",
+ "description" : "Tags to identify the CBA, defined in Metadata"
+ }
+ }
+ },
+ "BootstrapRequest" : {
+ "type" : "object",
+ "required" : [ "loadCBA", "loadModelType", "loadResourceDictionary" ],
+ "properties" : {
+ "loadModelType" : {
+ "type" : "boolean",
+ "example" : true,
+ "description" : "Specifies if default model types should be loaded"
+ },
+ "loadResourceDictionary" : {
+ "type" : "boolean",
+ "example" : true,
+ "description" : "Specifies if default data dictionaries should be loaded"
+ },
+ "loadCBA" : {
+ "type" : "boolean",
+ "example" : true,
+ "description" : "Specifies if default blueprint models should be loaded"
+ }
+ }
+ },
+ "CapabilityAssignment" : {
+ "type" : "object",
+ "properties" : {
+ "attributes" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ }
+ }
+ },
+ "ConstraintClause" : {
+ "type" : "object",
+ "properties" : {
+ "equal" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "length" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "pattern" : {
+ "type" : "string"
+ },
+ "schema" : {
+ "type" : "string"
+ },
+ "greater_than" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "greater_or_equal" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "less_than" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "less_or_equal" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "in_range" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ },
+ "valid_values" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ },
+ "min_length" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "max_length" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ }
+ },
+ "EntrySchema" : {
+ "type" : "object",
+ "properties" : {
+ "type" : {
+ "type" : "string"
+ },
+ "constraints" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ConstraintClause"
+ }
+ }
+ }
+ },
+ "FilePart" : {
+ "type" : "object"
+ },
+ "Implementation" : {
+ "type" : "object",
+ "properties" : {
+ "primary" : {
+ "type" : "string"
+ },
+ "dependencies" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "timeout" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "lock" : {
+ "$ref" : "#/definitions/LockAssignment"
+ },
+ "operation_host" : {
+ "type" : "string"
+ }
+ }
+ },
+ "InterfaceAssignment" : {
+ "type" : "object",
+ "properties" : {
+ "operations" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/OperationAssignment"
+ }
+ },
+ "inputs" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ }
+ }
+ },
+ "JsonNode" : {
+ "type" : "object",
+ "properties" : {
+ "nodeType" : {
+ "type" : "string",
+ "enum" : [ "ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING" ]
+ },
+ "float" : {
+ "type" : "boolean"
+ },
+ "array" : {
+ "type" : "boolean"
+ },
+ "null" : {
+ "type" : "boolean"
+ },
+ "short" : {
+ "type" : "boolean"
+ },
+ "number" : {
+ "type" : "boolean"
+ },
+ "boolean" : {
+ "type" : "boolean"
+ },
+ "double" : {
+ "type" : "boolean"
+ },
+ "int" : {
+ "type" : "boolean"
+ },
+ "long" : {
+ "type" : "boolean"
+ },
+ "object" : {
+ "type" : "boolean"
+ },
+ "binary" : {
+ "type" : "boolean"
+ },
+ "valueNode" : {
+ "type" : "boolean"
+ },
+ "containerNode" : {
+ "type" : "boolean"
+ },
+ "missingNode" : {
+ "type" : "boolean"
+ },
+ "pojo" : {
+ "type" : "boolean"
+ },
+ "integralNumber" : {
+ "type" : "boolean"
+ },
+ "floatingPointNumber" : {
+ "type" : "boolean"
+ },
+ "bigDecimal" : {
+ "type" : "boolean"
+ },
+ "bigInteger" : {
+ "type" : "boolean"
+ },
+ "textual" : {
+ "type" : "boolean"
+ }
+ }
+ },
+ "LockAssignment" : {
+ "type" : "object",
+ "properties" : {
+ "key" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "acquireTimeout" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ }
+ },
+ "ModelType" : {
+ "type" : "object",
+ "required" : [ "definition", "definitionType", "derivedFrom", "description", "modelName", "tags", "updatedBy", "version" ],
+ "properties" : {
+ "modelName" : {
+ "type" : "string"
+ },
+ "derivedFrom" : {
+ "type" : "string"
+ },
+ "definitionType" : {
+ "type" : "string"
+ },
+ "definition" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "description" : {
+ "type" : "string"
+ },
+ "version" : {
+ "type" : "string"
+ },
+ "tags" : {
+ "type" : "string"
+ },
+ "creationDate" : {
+ "type" : "string",
+ "format" : "date-time"
+ },
+ "updatedBy" : {
+ "type" : "string"
+ }
+ }
+ },
+ "NodeFilterDefinition" : {
+ "type" : "object",
+ "properties" : {
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/PropertyDefinition"
+ }
+ },
+ "capabilities" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ }
+ }
+ },
+ "NodeTemplate" : {
+ "type" : "object",
+ "properties" : {
+ "description" : {
+ "type" : "string"
+ },
+ "type" : {
+ "type" : "string"
+ },
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "directives" : {
+ "type" : "array",
+ "items" : {
+ "type" : "string"
+ }
+ },
+ "properties" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ },
+ "attributes" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ },
+ "capabilities" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/CapabilityAssignment"
+ }
+ },
+ "requirements" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/RequirementAssignment"
+ }
+ },
+ "interfaces" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/InterfaceAssignment"
+ }
+ },
+ "artifacts" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/ArtifactDefinition"
+ }
+ },
+ "copy" : {
+ "type" : "string"
+ },
+ "node_filter" : {
+ "$ref" : "#/definitions/NodeFilterDefinition"
+ }
+ }
+ },
+ "OperationAssignment" : {
+ "type" : "object",
+ "properties" : {
+ "description" : {
+ "type" : "string"
+ },
+ "implementation" : {
+ "$ref" : "#/definitions/Implementation"
+ },
+ "inputs" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ },
+ "outputs" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/JsonNode"
+ }
+ }
+ }
+ },
+ "Page" : {
+ "type" : "object",
+ "properties" : {
+ "totalElements" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "totalPages" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "number" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "sort" : {
+ "$ref" : "#/definitions/Sort"
+ },
+ "size" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "content" : {
+ "type" : "array",
+ "items" : {
+ "type" : "object"
+ }
+ },
+ "first" : {
+ "type" : "boolean"
+ },
+ "last" : {
+ "type" : "boolean"
+ },
+ "pageable" : {
+ "$ref" : "#/definitions/Pageable"
+ },
+ "numberOfElements" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "empty" : {
+ "type" : "boolean"
+ }
+ }
+ },
+ "PageBlueprintModelSearch" : {
+ "type" : "object",
+ "properties" : {
+ "totalElements" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "totalPages" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "number" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "sort" : {
+ "$ref" : "#/definitions/Sort"
+ },
+ "size" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "content" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/BlueprintModelSearch"
+ }
+ },
+ "first" : {
+ "type" : "boolean"
+ },
+ "last" : {
+ "type" : "boolean"
+ },
+ "pageable" : {
+ "$ref" : "#/definitions/Pageable"
+ },
+ "numberOfElements" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "empty" : {
+ "type" : "boolean"
+ }
+ }
+ },
+ "Pageable" : {
+ "type" : "object",
+ "properties" : {
+ "sort" : {
+ "$ref" : "#/definitions/Sort"
+ },
+ "offset" : {
+ "type" : "integer",
+ "format" : "int64"
+ },
+ "paged" : {
+ "type" : "boolean"
+ },
+ "unpaged" : {
+ "type" : "boolean"
+ },
+ "pageNumber" : {
+ "type" : "integer",
+ "format" : "int32"
+ },
+ "pageSize" : {
+ "type" : "integer",
+ "format" : "int32"
+ }
+ }
+ },
+ "PropertyDefinition" : {
+ "type" : "object",
+ "properties" : {
+ "description" : {
+ "type" : "string"
+ },
+ "required" : {
+ "type" : "boolean"
+ },
+ "type" : {
+ "type" : "string"
+ },
+ "status" : {
+ "type" : "string"
+ },
+ "constraints" : {
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/definitions/ConstraintClause"
+ }
+ },
+ "metadata" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ },
+ "value" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "input-param" : {
+ "type" : "boolean"
+ },
+ "default" : {
+ "$ref" : "#/definitions/JsonNode"
+ },
+ "entry_schema" : {
+ "$ref" : "#/definitions/EntrySchema"
+ },
+ "external-schema" : {
+ "type" : "string"
+ }
+ }
+ },
+ "RequirementAssignment" : {
+ "type" : "object",
+ "properties" : {
+ "capability" : {
+ "type" : "string"
+ },
+ "node" : {
+ "type" : "string"
+ },
+ "relationship" : {
+ "type" : "string"
+ }
+ }
+ },
+ "ResourceConfigSnapshot" : {
+ "type" : "object",
+ "required" : [ "config_snapshot", "createdDate", "resourceId", "resourceType", "status" ],
+ "properties" : {
+ "resourceType" : {
+ "type" : "string",
+ "example" : "ServiceInstance",
+ "description" : "Resource type."
+ },
+ "resourceId" : {
+ "type" : "string",
+ "example" : "1",
+ "description" : "ID associated with the resource type in the inventory system."
+ },
+ "status" : {
+ "type" : "string",
+ "description" : "Status of the snapshot, either running or candidate.",
+ "enum" : [ "RUNNING", "CANDIDATE" ]
+ },
+ "config_snapshot" : {
+ "type" : "string",
+ "example" : "config_snapshot",
+ "description" : "Snapshot of the resource as retrieved from resource."
+ },
+ "id" : {
+ "type" : "string"
+ },
+ "createdDate" : {
+ "type" : "string",
+ "format" : "date-time",
+ "description" : "Creation date of the snapshot."
+ }
+ }
+ },
+ "ResourceDefinition" : {
+ "type" : "object",
+ "required" : [ "group", "name", "property", "sources", "updated-by" ],
+ "properties" : {
+ "tags" : {
+ "type" : "string"
+ },
+ "name" : {
+ "type" : "string",
+ "example" : "default-source",
+ "description" : "Name"
+ },
+ "property" : {
+ "description" : "Property",
+ "$ref" : "#/definitions/PropertyDefinition"
+ },
+ "group" : {
+ "type" : "string",
+ "example" : "default",
+ "description" : "Group"
+ },
+ "updated-by" : {
+ "type" : "string",
+ "example" : "example@onap.com",
+ "description" : "Updated by"
+ },
+ "sources" : {
+ "type" : "object",
+ "example" : "sources",
+ "description" : "Sources",
+ "additionalProperties" : {
+ "$ref" : "#/definitions/NodeTemplate"
+ }
+ }
+ }
+ },
+ "ResourceDictionary" : {
+ "type" : "object",
+ "required" : [ "dataType", "definition", "description", "entrySchema", "name", "resourceDictionaryGroup", "tags", "updatedBy" ],
+ "properties" : {
+ "name" : {
+ "type" : "string",
+ "example" : "sample-db-source",
+ "description" : "Name"
+ },
+ "dataType" : {
+ "type" : "string",
+ "example" : "string",
+ "description" : "Data type"
+ },
+ "entrySchema" : {
+ "type" : "string",
+ "example" : "dt-license-key",
+ "description" : "Entry schema"
+ },
+ "resourceDictionaryGroup" : {
+ "type" : "string",
+ "example" : "default",
+ "description" : "Resource dictionary group"
+ },
+ "definition" : {
+ "description" : "Definition",
+ "$ref" : "#/definitions/ResourceDefinition"
+ },
+ "description" : {
+ "type" : "string",
+ "example" : "demo_artifacts_version",
+ "description" : "Description"
+ },
+ "tags" : {
+ "type" : "string",
+ "example" : "hostname",
+ "description" : "Tags"
+ },
+ "creationDate" : {
+ "type" : "string",
+ "format" : "date-time"
+ },
+ "updatedBy" : {
+ "type" : "string",
+ "example" : "username",
+ "description" : "Updated by"
+ }
+ }
+ },
+ "ResourceResolution" : {
+ "type" : "object",
+ "required" : [ "artifactName", "blueprintName", "blueprintVersion", "createdDate", "dictionaryName", "dictionarySource", "dictionaryVersion", "name", "occurrence", "resolutionKey", "resourceId", "resourceType", "status", "value" ],
+ "properties" : {
+ "blueprintName" : {
+ "type" : "string",
+ "description" : "Name of the CBA."
+ },
+ "blueprintVersion" : {
+ "type" : "string",
+ "description" : "Version of the CBA."
+ },
+ "artifactName" : {
+ "type" : "string",
+ "description" : "Artifact name for which to retrieve a resolved resource."
+ },
+ "name" : {
+ "type" : "string",
+ "description" : "Name of the resource."
+ },
+ "value" : {
+ "type" : "string",
+ "description" : "Value of the resolution."
+ },
+ "status" : {
+ "type" : "string",
+ "description" : "Whether success of failure."
+ },
+ "resolutionKey" : {
+ "type" : "string",
+ "description" : "Resolution Key uniquely identifying the resolution of a given artifact within a CBA."
+ },
+ "resourceType" : {
+ "type" : "string",
+ "example" : "ServiceInstance",
+ "description" : "Resolution type."
+ },
+ "resourceId" : {
+ "type" : "string",
+ "description" : "ID associated with the resolution type in the inventory system."
+ },
+ "occurrence" : {
+ "type" : "integer",
+ "format" : "int32",
+ "description" : "If resolution occurred multiple time, this field provides the index."
+ },
+ "dictionaryName" : {
+ "type" : "string",
+ "description" : "Name of the data dictionary used for the resolution."
+ },
+ "dictionarySource" : {
+ "type" : "string",
+ "description" : "Source associated with the data dictionary used for the resolution."
+ },
+ "dictionaryVersion" : {
+ "type" : "integer",
+ "format" : "int32",
+ "description" : "Version of the data dictionary used for the resolution."
+ },
+ "id" : {
+ "type" : "string"
+ },
+ "createdDate" : {
+ "type" : "string",
+ "format" : "date-time",
+ "description" : "Creation date of the resolution."
+ }
+ }
+ },
+ "ResourceSourceMapping" : {
+ "type" : "object",
+ "properties" : {
+ "resourceSourceMappings" : {
+ "type" : "object",
+ "additionalProperties" : {
+ "type" : "string"
+ }
+ }
+ }
+ },
+ "Sort" : {
+ "type" : "object",
+ "properties" : {
+ "unsorted" : {
+ "type" : "boolean"
+ },
+ "sorted" : {
+ "type" : "boolean"
+ },
+ "empty" : {
+ "type" : "boolean"
+ }
+ }
+ },
+ "TemplateResolution" : {
+ "type" : "object",
+ "required" : [ "artifactName", "blueprintName", "blueprintVersion", "createdDate", "occurrence", "resolutionKey", "resourceId", "resourceType", "result" ],
+ "properties" : {
+ "blueprintName" : {
+ "type" : "string",
+ "description" : "Name of the CBA."
+ },
+ "blueprintVersion" : {
+ "type" : "string",
+ "description" : "Version of the CBA."
+ },
+ "artifactName" : {
+ "type" : "string",
+ "description" : "Artifact name for which to retrieve a resolved resource."
+ },
+ "result" : {
+ "type" : "string",
+ "description" : "Rendered template."
+ },
+ "resolutionKey" : {
+ "type" : "string",
+ "description" : "Resolution Key uniquely identifying the resolution of a given artifact within a CBA."
+ },
+ "resourceType" : {
+ "type" : "string",
+ "example" : "ServiceInstance",
+ "description" : "Resolution type."
+ },
+ "resourceId" : {
+ "type" : "string",
+ "description" : "ID associated with the resolution type in the inventory system."
+ },
+ "occurrence" : {
+ "type" : "integer",
+ "format" : "int32",
+ "description" : "If resolution occurred multiple time, this field provides the index."
+ },
+ "id" : {
+ "type" : "string"
+ },
+ "createdDate" : {
+ "type" : "string",
+ "format" : "date-time",
+ "description" : "Creation date of the resolution."
+ }
+ }
+ },
+ "Unit" : {
+ "type" : "object"
+ },
+ "WorkFlowSpecRequest" : {
+ "type" : "object",
+ "required" : [ "blueprintName", "workflowName" ],
+ "properties" : {
+ "blueprintName" : {
+ "type" : "string",
+ "example" : "pnf_netconf",
+ "description" : "Name of the BLueprint"
+ },
+ "version" : {
+ "type" : "string"
+ },
+ "returnContent" : {
+ "type" : "string"
+ },
+ "workflowName" : {
+ "type" : "string",
+ "example" : "config-assign",
+ "description" : "Name of the Workflow"
+ },
+ "specType" : {
+ "type" : "string"
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt
index 8302a2d..0680dad 100644
--- a/docs/requirements-docs.txt
+++ b/docs/requirements-docs.txt
@@ -13,3 +13,4 @@
sphinxcontrib-plantuml
sphinx_bootstrap_theme
lfdocs-conf
+sphinx-tabs
\ No newline at end of file
diff --git a/docs/ui/hello-world-script-executor-cba.rst b/docs/ui/hello-world-script-executor-cba.rst
index 52337fc..d5a3c7b 100644
--- a/docs/ui/hello-world-script-executor-cba.rst
+++ b/docs/ui/hello-world-script-executor-cba.rst
@@ -110,7 +110,7 @@
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
log.info("Executing Recovery")
- bluePrintRuntimeService.getBlueprintError().addError("${runtimeException.message}")
+ bluePrintRuntimeService.getBluePrintError().addError("${runtimeException.message}")
}
}
diff --git a/docs/userguides/developer-guide/running-bp-processor-in-ide.rst b/docs/userguides/developer-guide/running-bp-processor-in-ide.rst
index 4a1037b..e31246b 100644
--- a/docs/userguides/developer-guide/running-bp-processor-in-ide.rst
+++ b/docs/userguides/developer-guide/running-bp-processor-in-ide.rst
@@ -207,7 +207,7 @@
.. code-block:: java
:caption: **Custom values for properties**
- -DappName=ControllerBlueprints
+ -DappName=ControllerBluePrints
-Dms_name=org.onap.ccsdk.apps.controllerblueprints
-DappVersion=1.0.0
-Dspring.config.location=opt/app/onap/config/
diff --git a/ms/artifact-manager/README b/ms/artifact-manager/README
index d777628..290dadf 100644
--- a/ms/artifact-manager/README
+++ b/ms/artifact-manager/README
@@ -38,9 +38,9 @@
#### Example
```
-stub: BlueprintManagementServiceStub = BlueprintManagementServiceStub(channel)
+stub: BluePrintManagementServiceStub = BluePrintManagementServiceStub(channel)
with open(file_path, "rb") as cba_file:
- msg: BlueprintUploadInput = BlueprintUploadInput()
+ msg: BluePrintUploadInput = BluePrintUploadInput()
msg.actionIdentifiers.blueprintName = "Test"
msg.actionIdentifiers.blueprintVersion = "0.0.1"
msg.fileChunk.chunk = cba_file.read()
@@ -54,8 +54,8 @@
#### Example
```
-stub: BlueprintManagementServiceStub = BlueprintManagementServiceStub(channel)
-msg: BlueprintDownloadInput = BlueprintDownloadInput()
+stub: BluePrintManagementServiceStub = BluePrintManagementServiceStub(channel)
+msg: BluePrintDownloadInput = BluePrintDownloadInput()
msg.actionIdentifiers.blueprintName = "Test"
msg.actionIdentifiers.blueprintVersion = "0.0.1"
return stub.downloadBlueprint(msg)
@@ -67,8 +67,8 @@
#### Example
```
-stub: BlueprintManagementServiceStub = BlueprintManagementServiceStub(channel)
-msg: BlueprintRemoveInput = BlueprintRemoveInput()
+stub: BluePrintManagementServiceStub = BluePrintManagementServiceStub(channel)
+msg: BluePrintRemoveInput = BluePrintRemoveInput()
msg.actionIdentifiers.blueprintName = "Test"
msg.actionIdentifiers.blueprintVersion = "0.0.1"
return stub.removeBlueprint(msg)
@@ -88,13 +88,13 @@
from grpc import Channel, ChannelCredentials, insecure_channel, secure_channel, ssl_channel_credentials
-from proto.BlueprintManagement_pb2 import (
- BlueprintDownloadInput,
- BlueprintRemoveInput,
- BlueprintUploadInput,
- BlueprintManagementOutput,
+from proto.BluePrintManagement_pb2 import (
+ BluePrintDownloadInput,
+ BluePrintRemoveInput,
+ BluePrintUploadInput,
+ BluePrintManagementOutput,
)
-from proto.BlueprintManagement_pb2_grpc import BlueprintManagementServiceStub
+from proto.BluePrintManagement_pb2_grpc import BluePrintManagementServiceStub
logging.basicConfig(level=logging.DEBUG)
@@ -139,31 +139,31 @@
:param config: ConfigParser object with "client" section
"""
self.channel: Channel = channel
- self.stub: BlueprintManagementServiceStub = BlueprintManagementServiceStub(self.channel)
+ self.stub: BluePrintManagementServiceStub = BluePrintManagementServiceStub(self.channel)
self.config = config
- def upload(self) -> BlueprintManagementOutput:
+ def upload(self) -> BluePrintManagementOutput:
"""Prepare upload message and send it to server."""
logging.info("Call upload client method")
with open(self.config.get("client", "cba_file"), "rb") as cba_file:
- msg: BlueprintUploadInput = BlueprintUploadInput()
+ msg: BluePrintUploadInput = BluePrintUploadInput()
msg.actionIdentifiers.blueprintName = "Test"
msg.actionIdentifiers.blueprintVersion = "0.0.1"
msg.fileChunk.chunk = cba_file.read()
return self.stub.uploadBlueprint(msg)
- def download(self) -> BlueprintManagementOutput:
+ def download(self) -> BluePrintManagementOutput:
"""Prepare download message and send it to server."""
logging.info("Call download client method")
- msg: BlueprintDownloadInput = BlueprintDownloadInput()
+ msg: BluePrintDownloadInput = BluePrintDownloadInput()
msg.actionIdentifiers.blueprintName = "Test"
msg.actionIdentifiers.blueprintVersion = "0.0.1"
return self.stub.downloadBlueprint(msg)
- def remove(self) -> BlueprintManagementOutput:
+ def remove(self) -> BluePrintManagementOutput:
"""Prepare remove message and send it to server."""
logging.info("Call remove client method")
- msg: BlueprintRemoveInput = BlueprintRemoveInput()
+ msg: BluePrintRemoveInput = BluePrintRemoveInput()
msg.actionIdentifiers.blueprintName = "Test"
msg.actionIdentifiers.blueprintVersion = "0.0.1"
return self.stub.removeBlueprint(msg)
diff --git a/ms/artifact-manager/manager/servicer.py b/ms/artifact-manager/manager/servicer.py
index fd05fe0..be740b0 100644
--- a/ms/artifact-manager/manager/servicer.py
+++ b/ms/artifact-manager/manager/servicer.py
@@ -23,13 +23,13 @@
from manager.errors import ArtifactManagerError, InvalidRequestError
from manager.utils import Repository, RepositoryStrategy
from onaplogging.mdcContext import MDC
-from proto.BlueprintManagement_pb2 import (
- BlueprintDownloadInput,
- BlueprintManagementOutput,
- BlueprintRemoveInput,
- BlueprintUploadInput,
+from proto.BluePrintManagement_pb2 import (
+ BluePrintDownloadInput,
+ BluePrintManagementOutput,
+ BluePrintRemoveInput,
+ BluePrintUploadInput,
)
-from proto.BlueprintManagement_pb2_grpc import BlueprintManagementServiceServicer
+from proto.BluePrintManagement_pb2_grpc import BluePrintManagementServiceServicer
MDC_DATETIME_FORMAT = r"%Y-%m-%dT%H:%M:%S.%f%z"
COMMON_HEADER_DATETIME_FORMAT = r"%Y-%m-%dT%H:%M:%S.%fZ"
@@ -47,13 +47,13 @@
@wraps(func)
def _decorator(
servicer: "ArtifactManagerServicer",
- request: Union[BlueprintDownloadInput, BlueprintRemoveInput, BlueprintUploadInput],
+ request: Union[BluePrintDownloadInput, BluePrintRemoveInput, BluePrintUploadInput],
context: ServicerContext,
- ) -> BlueprintManagementOutput:
+ ) -> BluePrintManagementOutput:
if not all([request.actionIdentifiers.blueprintName, request.actionIdentifiers.blueprintVersion]):
- raise InvalidRequestError("Request has to have set both Blueprint name and version")
- output: BlueprintManagementOutput = func(servicer, request, context)
+ raise InvalidRequestError("Request has to have set both BluePrint name and version")
+ output: BluePrintManagementOutput = func(servicer, request, context)
# Set same values for every handler
output.commonHeader.CopyFrom(request.commonHeader)
output.commonHeader.timestamp = datetime.utcnow().strftime(COMMON_HEADER_DATETIME_FORMAT)
@@ -72,11 +72,11 @@
@wraps(func)
def _handler(
servicer: "ArtifactManagerServicer",
- request: Union[BlueprintDownloadInput, BlueprintRemoveInput, BlueprintUploadInput],
+ request: Union[BluePrintDownloadInput, BluePrintRemoveInput, BluePrintUploadInput],
context: ServicerContext,
- ) -> BlueprintManagementOutput:
+ ) -> BluePrintManagementOutput:
try:
- output: BlueprintManagementOutput = func(servicer, request, context)
+ output: BluePrintManagementOutput = func(servicer, request, context)
output.status.code = 200
output.status.message = "success"
except ArtifactManagerError as error:
@@ -84,7 +84,7 @@
# Every ArtifactManagerError based exception has status_code paramenter
# which has to be set in output. Use also exception's message to
# set errorMessage of the output.
- output: BlueprintManagementOutput = BlueprintManagementOutput()
+ output: BluePrintManagementOutput = BluePrintManagementOutput()
output.status.code = error.status_code
output.status.message = "failure"
output.status.errorMessage = str(error.message)
@@ -112,9 +112,9 @@
@wraps(func)
def _decorator(
servicer: "ArtifactManagerServicer",
- request: Union[BlueprintDownloadInput, BlueprintRemoveInput, BlueprintUploadInput],
+ request: Union[BluePrintDownloadInput, BluePrintRemoveInput, BluePrintUploadInput],
context: ServicerContext,
- ) -> BlueprintManagementOutput:
+ ) -> BluePrintManagementOutput:
MDC.put("RequestID", request.commonHeader.requestId)
MDC.put("InvocationID", request.commonHeader.subRequestId)
MDC.put("ServiceName", servicer.__class__.__name__)
@@ -129,14 +129,14 @@
MDC.put("TargetServiceName", func.__name__)
MDC.put("Server", socket.getfqdn())
- output: BlueprintManagementOutput = func(servicer, request, context)
+ output: BluePrintManagementOutput = func(servicer, request, context)
MDC.clear()
return output
return _decorator
-class ArtifactManagerServicer(BlueprintManagementServiceServicer):
+class ArtifactManagerServicer(BluePrintManagementServiceServicer):
"""ArtifactManagerServer class.
Implements methods defined in proto files to manage artifacts repository.
@@ -169,15 +169,15 @@
@prepare_logging_context
@translate_exception_to_response
@fill_common_header
- def downloadBlueprint(self, request: BlueprintDownloadInput, context: ServicerContext) -> BlueprintManagementOutput:
+ def downloadBlueprint(self, request: BluePrintDownloadInput, context: ServicerContext) -> BluePrintManagementOutput:
"""Download blueprint file request method.
Currently it only logs when is called and all base class method.
- :param request: BlueprintDownloadInput
+ :param request: BluePrintDownloadInput
:param context: ServicerContext
- :return: BlueprintManagementOutput
+ :return: BluePrintManagementOutput
"""
- output: BlueprintManagementOutput = BlueprintManagementOutput()
+ output: BluePrintManagementOutput = BluePrintManagementOutput()
output.fileChunk.chunk = self.repository.download_blueprint(
request.actionIdentifiers.blueprintName, request.actionIdentifiers.blueprintVersion
)
@@ -193,13 +193,13 @@
@prepare_logging_context
@translate_exception_to_response
@fill_common_header
- def uploadBlueprint(self, request: BlueprintUploadInput, context: ServicerContext) -> BlueprintManagementOutput:
+ def uploadBlueprint(self, request: BluePrintUploadInput, context: ServicerContext) -> BluePrintManagementOutput:
"""Upload blueprint file request method.
Currently it only logs when is called and all base class method.
- :param request: BlueprintUploadInput
+ :param request: BluePrintUploadInput
:param context: ServicerContext
- :return: BlueprintManagementOutput
+ :return: BluePrintManagementOutput
"""
self.repository.upload_blueprint(
request.fileChunk.chunk, request.actionIdentifiers.blueprintName, request.actionIdentifiers.blueprintVersion
@@ -211,18 +211,18 @@
),
extra={"mdc": MDC.result()},
)
- return BlueprintManagementOutput()
+ return BluePrintManagementOutput()
@prepare_logging_context
@translate_exception_to_response
@fill_common_header
- def removeBlueprint(self, request: BlueprintRemoveInput, context: ServicerContext) -> BlueprintManagementOutput:
+ def removeBlueprint(self, request: BluePrintRemoveInput, context: ServicerContext) -> BluePrintManagementOutput:
"""Remove blueprint file request method.
Currently it only logs when is called and all base class method.
- :param request: BlueprintRemoveInput
+ :param request: BluePrintRemoveInput
:param context: ServicerContext
- :return: BlueprintManagementOutput
+ :return: BluePrintManagementOutput
"""
self.repository.remove_blueprint(
request.actionIdentifiers.blueprintName, request.actionIdentifiers.blueprintVersion
@@ -234,4 +234,4 @@
),
extra={"mdc": MDC.result()},
)
- return BlueprintManagementOutput()
+ return BluePrintManagementOutput()
diff --git a/ms/artifact-manager/server.py b/ms/artifact-manager/server.py
index 10034fe..fe70c88 100644
--- a/ms/artifact-manager/server.py
+++ b/ms/artifact-manager/server.py
@@ -19,7 +19,7 @@
from grpc import server as grpc_server
from manager.configuration import config
from manager.servicer import ArtifactManagerServicer
-from proto.BlueprintManagement_pb2_grpc import add_BlueprintManagementServiceServicer_to_server
+from proto.BluePrintManagement_pb2_grpc import add_BluePrintManagementServiceServicer_to_server
@click.command()
@@ -34,7 +34,7 @@
max_workers: int = int(config["artifactManagerServer"]["maxWorkers"])
server: grpc_server = grpc_server(ThreadPoolExecutor(max_workers=max_workers))
- add_BlueprintManagementServiceServicer_to_server(ArtifactManagerServicer(), server)
+ add_BluePrintManagementServiceServicer_to_server(ArtifactManagerServicer(), server)
port_number: int = int(config["artifactManagerServer"]["port"])
server.add_insecure_port(f"[::]:{port_number}")
diff --git a/ms/artifact-manager/tests/servicer_test.py b/ms/artifact-manager/tests/servicer_test.py
index 702e104..131e6fb 100644
--- a/ms/artifact-manager/tests/servicer_test.py
+++ b/ms/artifact-manager/tests/servicer_test.py
@@ -19,17 +19,17 @@
import manager.utils
from manager.servicer import ArtifactManagerServicer
-from proto.BlueprintCommon_pb2 import ActionIdentifiers, CommonHeader
-from proto.BlueprintManagement_pb2 import (
- BlueprintDownloadInput,
- BlueprintManagementOutput,
- BlueprintRemoveInput,
- BlueprintUploadInput,
+from proto.BluePrintCommon_pb2 import ActionIdentifiers, CommonHeader
+from proto.BluePrintManagement_pb2 import (
+ BluePrintDownloadInput,
+ BluePrintManagementOutput,
+ BluePrintRemoveInput,
+ BluePrintUploadInput,
FileChunk,
)
-from proto.BlueprintManagement_pb2_grpc import (
- BlueprintManagementServiceStub,
- add_BlueprintManagementServiceServicer_to_server,
+from proto.BluePrintManagement_pb2_grpc import (
+ BluePrintManagementServiceStub,
+ add_BluePrintManagementServiceServicer_to_server,
)
from pytest import fixture
@@ -50,7 +50,7 @@
@fixture(scope="module")
def grpc_add_to_server():
"""pytest-grpcio required function."""
- return add_BlueprintManagementServiceServicer_to_server
+ return add_BluePrintManagementServiceServicer_to_server
@fixture(scope="module")
@@ -62,34 +62,34 @@
@fixture(scope="module") # noqa
def grpc_stub_cls(grpc_channel):
"""pytest-grpcio required function."""
- return BlueprintManagementServiceStub
+ return BluePrintManagementServiceStub
def test_servicer_upload_handler_header_failure(grpc_stub):
"""Test servicer upload handler."""
- request: BlueprintUploadInput = BlueprintUploadInput()
- output: BlueprintManagementOutput = grpc_stub.uploadBlueprint(request)
+ request: BluePrintUploadInput = BluePrintUploadInput()
+ output: BluePrintManagementOutput = grpc_stub.uploadBlueprint(request)
assert output.status.code == 500
assert output.status.message == "failure"
- assert output.status.errorMessage == "Request has to have set both Blueprint name and version"
+ assert output.status.errorMessage == "Request has to have set both BluePrint name and version"
def test_servicer_download_handler_header_failure(grpc_stub):
"""Test servicer download handler."""
- request: BlueprintDownloadInput = BlueprintDownloadInput()
- output: BlueprintManagementOutput = grpc_stub.downloadBlueprint(request)
+ request: BluePrintDownloadInput = BluePrintDownloadInput()
+ output: BluePrintManagementOutput = grpc_stub.downloadBlueprint(request)
assert output.status.code == 500
assert output.status.message == "failure"
- assert output.status.errorMessage == "Request has to have set both Blueprint name and version"
+ assert output.status.errorMessage == "Request has to have set both BluePrint name and version"
def test_servicer_remove_handler_header_failure(grpc_stub):
"""Test servicer remove handler."""
- request: BlueprintRemoveInput = BlueprintRemoveInput()
- output: BlueprintManagementOutput = grpc_stub.removeBlueprint(request)
+ request: BluePrintRemoveInput = BluePrintRemoveInput()
+ output: BluePrintManagementOutput = grpc_stub.removeBlueprint(request)
assert output.status.code == 500
assert output.status.message == "failure"
- assert output.status.errorMessage == "Request has to have set both Blueprint name and version"
+ assert output.status.errorMessage == "Request has to have set both BluePrint name and version"
def test_servicer_upload_handler_failure(grpc_stub):
@@ -97,8 +97,8 @@
action_identifiers: ActionIdentifiers = ActionIdentifiers()
action_identifiers.blueprintName = "sample-cba"
action_identifiers.blueprintVersion = "1.0.0"
- request: BlueprintUploadInput = BlueprintUploadInput(actionIdentifiers=action_identifiers)
- output: BlueprintManagementOutput = grpc_stub.uploadBlueprint(request)
+ request: BluePrintUploadInput = BluePrintUploadInput(actionIdentifiers=action_identifiers)
+ output: BluePrintManagementOutput = grpc_stub.uploadBlueprint(request)
assert output.status.code == 500
assert output.status.message == "failure"
assert output.status.errorMessage == "Invalid request"
@@ -109,8 +109,8 @@
action_identifiers: ActionIdentifiers = ActionIdentifiers()
action_identifiers.blueprintName = "sample-cba"
action_identifiers.blueprintVersion = "2.0.0"
- request: BlueprintDownloadInput = BlueprintDownloadInput(actionIdentifiers=action_identifiers)
- output: BlueprintManagementOutput = grpc_stub.downloadBlueprint(request)
+ request: BluePrintDownloadInput = BluePrintDownloadInput(actionIdentifiers=action_identifiers)
+ output: BluePrintManagementOutput = grpc_stub.downloadBlueprint(request)
assert output.status.code == 500
assert output.status.message == "failure"
assert output.status.errorMessage == "Artifact not found"
@@ -121,8 +121,8 @@
action_identifiers: ActionIdentifiers = ActionIdentifiers()
action_identifiers.blueprintName = "sample-cba"
action_identifiers.blueprintVersion = "1.0.0"
- request: BlueprintRemoveInput = BlueprintRemoveInput(actionIdentifiers=action_identifiers)
- output: BlueprintManagementOutput = grpc_stub.removeBlueprint(request)
+ request: BluePrintRemoveInput = BluePrintRemoveInput(actionIdentifiers=action_identifiers)
+ output: BluePrintManagementOutput = grpc_stub.removeBlueprint(request)
assert output.status.code == 500
assert output.status.message == "failure"
assert output.status.errorMessage == "Artifact not found"
@@ -146,10 +146,10 @@
# fmt: off
with patch.object(os, "makedirs", return_value=None), \
patch.object(manager.utils, 'ZipFile', return_value=MockZipFile()):
- request: BlueprintUploadInput = BlueprintUploadInput(
+ request: BluePrintUploadInput = BluePrintUploadInput(
commonHeader=header, fileChunk=file_chunk, actionIdentifiers=action_identifiers
)
- output: BlueprintManagementOutput = grpc_stub.uploadBlueprint(request)
+ output: BluePrintManagementOutput = grpc_stub.uploadBlueprint(request)
# fmt: on
assert output.status.code == 200
assert output.status.message == "success"
@@ -168,10 +168,10 @@
action_identifiers.actionName = "SampleScript"
with patch.object(os.path, "exists", return_value=True):
- request: BlueprintDownloadInput = BlueprintDownloadInput(
+ request: BluePrintDownloadInput = BluePrintDownloadInput(
commonHeader=header, actionIdentifiers=action_identifiers
)
- output: BlueprintManagementOutput = grpc_stub.downloadBlueprint(request)
+ output: BluePrintManagementOutput = grpc_stub.downloadBlueprint(request)
assert output.status.code == 200
assert output.status.message == "success"
assert output.fileChunk.chunk == ZIP_FILE_BINARY
@@ -190,7 +190,7 @@
action_identifiers.actionName = "SampleScript"
with patch.object(shutil, "rmtree", return_value=None) as mock_rmtree:
- request: BlueprintRemoveInput = BlueprintRemoveInput(commonHeader=header, actionIdentifiers=action_identifiers)
- output: BlueprintManagementOutput = grpc_stub.removeBlueprint(request)
+ request: BluePrintRemoveInput = BluePrintRemoveInput(commonHeader=header, actionIdentifiers=action_identifiers)
+ output: BluePrintManagementOutput = grpc_stub.removeBlueprint(request)
assert output.status.code == 200
assert output.status.message == "success"
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorCluster.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BluePrintProcessorCluster.kt
similarity index 87%
rename from ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorCluster.kt
rename to ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BluePrintProcessorCluster.kt
index b7903a2..513bd51 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintProcessorCluster.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BluePrintProcessorCluster.kt
@@ -18,9 +18,9 @@
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterInfo
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ClusterUtils
import org.springframework.boot.context.event.ApplicationReadyEvent
@@ -53,22 +53,22 @@
* if CLUSTER_ENABLED is present, then it will try to create cluster.
*/
@Component
-open class BlueprintProcessorCluster(private val bluePrintClusterService: BlueprintClusterService) {
+open class BluePrintProcessorCluster(private val bluePrintClusterService: BluePrintClusterService) {
- private val log = logger(BlueprintProcessorCluster::class)
+ private val log = logger(BluePrintProcessorCluster::class)
@EventListener(ApplicationReadyEvent::class)
fun startAndJoinCluster() = GlobalScope.launch {
- if (BlueprintConstants.CLUSTER_ENABLED) {
+ if (BluePrintConstants.CLUSTER_ENABLED) {
val clusterId = ClusterUtils.clusterId()
val nodeId = ClusterUtils.clusterNodeId()
val joinAsClient =
- (System.getenv(BlueprintConstants.PROPERTY_CLUSTER_JOIN_AS_CLIENT) ?: "false").toBoolean()
+ (System.getenv(BluePrintConstants.PROPERTY_CLUSTER_JOIN_AS_CLIENT) ?: "false").toBoolean()
- val clusterConfigFile = System.getenv(BlueprintConstants.PROPERTY_CLUSTER_CONFIG_FILE)
+ val clusterConfigFile = System.getenv(BluePrintConstants.PROPERTY_CLUSTER_CONFIG_FILE)
val properties = Properties()
properties["hazelcast.logging.type"] = "slf4j"
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintDatabaseConfiguration.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintDatabaseConfiguration.kt
index ec84e2a..f5ccdee 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintDatabaseConfiguration.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDatabaseConfiguration
import org.springframework.context.annotation.Bean
@@ -29,7 +29,7 @@
import javax.sql.DataSource
@Configuration
-@Import(BlueprintDBLibConfiguration::class)
+@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = [
"org.onap.ccsdk.cds.controllerblueprints", "org.onap.ccsdk.cds.blueprintsprocessor",
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintGRPCServer.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintGRPCServer.kt
index bba9476..bfde39a 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintGRPCServer.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/BlueprintGRPCServer.kt
@@ -17,10 +17,10 @@
package org.onap.ccsdk.cds.blueprintsprocessor
import io.grpc.ServerBuilder
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.BlueprintManagementGRPCHandler
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.BluePrintManagementGRPCHandler
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.interceptor.GrpcServerLoggingInterceptor
import org.onap.ccsdk.cds.blueprintsprocessor.security.BasicAuthServerInterceptor
-import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.BlueprintProcessingGRPCHandler
+import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.BluePrintProcessingGRPCHandler
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
@@ -31,8 +31,8 @@
@ConditionalOnProperty(name = ["blueprintsprocessor.grpcEnable"], havingValue = "true")
@Component
open class BlueprintGRPCServer(
- private val bluePrintProcessingGRPCHandler: BlueprintProcessingGRPCHandler,
- private val bluePrintManagementGRPCHandler: BlueprintManagementGRPCHandler,
+ private val bluePrintProcessingGRPCHandler: BluePrintProcessingGRPCHandler,
+ private val bluePrintManagementGRPCHandler: BluePrintManagementGRPCHandler,
private val authInterceptor: BasicAuthServerInterceptor
) :
ApplicationListener<ContextRefreshedEvent> {
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BlueprintCustomIndicator.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BluePrintCustomIndicator.kt
similarity index 88%
rename from ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BlueprintCustomIndicator.kt
rename to ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BluePrintCustomIndicator.kt
index 5093519..c795ee5 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BlueprintCustomIndicator.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/actuator/indicator/BluePrintCustomIndicator.kt
@@ -19,22 +19,22 @@
import kotlinx.coroutines.runBlocking
import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.domain.HealthApiResponse
import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.domain.HealthCheckStatus
-import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.health.BlueprintProcessorHealthCheck
+import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.health.BluePrintProcessorHealthCheck
import org.slf4j.LoggerFactory
import org.springframework.boot.actuate.health.AbstractHealthIndicator
import org.springframework.boot.actuate.health.Health
import org.springframework.stereotype.Component
/**
- * Health Indicator for BlueprintProcessor.
+ * Health Indicator for BluePrintProcessor.
* @author Shaaban Ebrahim
* @version 1.0
*/
@Component
-open class BlueprintCustomIndicator(private val bluePrintProcessorHealthCheck: BlueprintProcessorHealthCheck) :
+open class BluePrintCustomIndicator(private val bluePrintProcessorHealthCheck: BluePrintProcessorHealthCheck) :
AbstractHealthIndicator() {
- private var logger = LoggerFactory.getLogger(BlueprintCustomIndicator::class.java)
+ private var logger = LoggerFactory.getLogger(BluePrintCustomIndicator::class.java)
@Throws(Exception::class)
override fun doHealthCheck(builder: Health.Builder) {
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt
index 44f2e7d..1e1d3ac 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatExecutor.kt
@@ -46,7 +46,7 @@
import org.hamcrest.MatcherAssert.assertThat
import org.mockito.Answers
import org.mockito.verification.VerificationMode
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService.WebClientResponse
import org.onap.ccsdk.cds.blueprintsprocessor.uat.logging.LogColor.COLOR_MOCKITO
@@ -73,7 +73,7 @@
@Component
class UatExecutor(
private val environment: ConfigurableEnvironment,
- private val restClientFactory: BlueprintRestLibPropertyService,
+ private val restClientFactory: BluePrintRestLibPropertyService,
private val mapper: ObjectMapper
) {
@@ -297,7 +297,7 @@
return "Basic " + Base64Utils.encodeToString("$username:$plainPassword".toByteArray())
}
- private class MockPreInterceptor : BlueprintRestLibPropertyService.PreInterceptor {
+ private class MockPreInterceptor : BluePrintRestLibPropertyService.PreInterceptor {
private val mocks = ConcurrentHashMap<String, BlueprintWebClientService>()
@@ -313,7 +313,7 @@
}
}
- private class SpyPostInterceptor(private val mapper: ObjectMapper) : BlueprintRestLibPropertyService.PostInterceptor {
+ private class SpyPostInterceptor(private val mapper: ObjectMapper) : BluePrintRestLibPropertyService.PostInterceptor {
private val spies = ConcurrentHashMap<String, SpyService>()
diff --git a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt
index 31c7ad4..f6dd88d 100644
--- a/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt
+++ b/ms/blueprintsprocessor/application/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/utils/UatServices.kt
@@ -24,7 +24,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.uat.logging.LogColor.COLOR_SERVICES
import org.onap.ccsdk.cds.blueprintsprocessor.uat.logging.LogColor.resetContextColor
import org.onap.ccsdk.cds.blueprintsprocessor.uat.logging.LogColor.setContextColor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.UAT_SPECIFICATION_FILE
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.UAT_SPECIFICATION_FILE
import org.springframework.context.annotation.Profile
import org.springframework.http.HttpStatus
import org.springframework.http.MediaType
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
index f5d1a06..e744343 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application-dev.properties
@@ -41,7 +41,7 @@
blueprintsprocessor.blueprintWorkingPath=blueprints/work
# Controller Blueprint Load Configurations
-blueprintsprocessor.loadBlueprintPaths=./../../../components/model-catalog/blueprint-model/service-blueprint
+blueprintsprocessor.loadBluePrintPaths=./../../../components/model-catalog/blueprint-model/service-blueprint
blueprintsprocessor.loadModeTypePaths=./../../../components/model-catalog/definition-type/starter-type
blueprintsprocessor.loadResourceDictionaryPaths=./../../../components/model-catalog/resource-dictionary/starter-dictionary
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application-local.yml b/ms/blueprintsprocessor/application/src/main/resources/application-local.yml
index 7dac8f8..f284332 100644
--- a/ms/blueprintsprocessor/application/src/main/resources/application-local.yml
+++ b/ms/blueprintsprocessor/application/src/main/resources/application-local.yml
@@ -1,4 +1,4 @@
-appName: ControllerBlueprints
+appName: ControllerBluePrints
appVersion: 1.0.0
blueprints:
processor:
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application.properties b/ms/blueprintsprocessor/application/src/main/resources/application.properties
index 3fdb8d8..9b48359 100755
--- a/ms/blueprintsprocessor/application/src/main/resources/application.properties
+++ b/ms/blueprintsprocessor/application/src/main/resources/application.properties
@@ -24,7 +24,7 @@
blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/working
# Controller Blueprint Load Configurations
-blueprintsprocessor.loadBlueprintPaths=/opt/app/onap/model-catalog/blueprint-model
+blueprintsprocessor.loadBluePrintPaths=/opt/app/onap/model-catalog/blueprint-model
blueprintsprocessor.loadModeTypePaths=/opt/app/onap/model-catalog/definition-type
blueprintsprocessor.loadResourceDictionaryPaths=/opt/app/onap/model-catalog/resource-dictionary
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BlueprintsAcceptanceTest.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BlueprintsAcceptanceTest.kt
index 0d9f3da..4a8da53 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BlueprintsAcceptanceTest.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/BlueprintsAcceptanceTest.kt
@@ -26,8 +26,8 @@
import org.junit.runners.Parameterized
import org.onap.ccsdk.cds.blueprintsprocessor.uat.utils.ExtendedTemporaryFolder
import org.onap.ccsdk.cds.blueprintsprocessor.uat.utils.UatExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.UAT_SPECIFICATION_FILE
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils.Companion.compressToBytes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.UAT_SPECIFICATION_FILE
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils.Companion.compressToBytes
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.junit4.rules.SpringClassRule
import org.springframework.test.context.junit4.rules.SpringMethodRule
diff --git a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/UatServicesTest.kt b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/UatServicesTest.kt
index ecdc564..fe2d539 100644
--- a/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/UatServicesTest.kt
+++ b/ms/blueprintsprocessor/application/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/uat/UatServicesTest.kt
@@ -49,8 +49,8 @@
import org.onap.ccsdk.cds.blueprintsprocessor.uat.utils.ServiceDefinition
import org.onap.ccsdk.cds.blueprintsprocessor.uat.utils.TestSecuritySettings
import org.onap.ccsdk.cds.blueprintsprocessor.uat.utils.UatDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.UAT_SPECIFICATION_FILE
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils.Companion.compressToBytes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.UAT_SPECIFICATION_FILE
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils.Companion.compressToBytes
import org.skyscreamer.jsonassert.JSONAssert
import org.skyscreamer.jsonassert.JSONCompareMode
import org.springframework.beans.factory.annotation.Autowired
diff --git a/ms/blueprintsprocessor/application/src/test/resources/application.properties b/ms/blueprintsprocessor/application/src/test/resources/application.properties
index 6db8a5f..c6e957b 100644
--- a/ms/blueprintsprocessor/application/src/test/resources/application.properties
+++ b/ms/blueprintsprocessor/application/src/test/resources/application.properties
@@ -29,8 +29,8 @@
# Controller Blueprint Load Configurations
# blueprints.load.initial-data may be overridden by ENV variables
blueprintsprocessor.loadInitialData=false
-blueprintsprocessor.loadBlueprint=false
-blueprintsprocessor.loadBlueprintPaths=/opt/app/onap/model-catalog/blueprint-model/service-blueprint
+blueprintsprocessor.loadBluePrint=false
+blueprintsprocessor.loadBluePrintPaths=/opt/app/onap/model-catalog/blueprint-model/service-blueprint
blueprintsprocessor.loadModelType=false
blueprintsprocessor.loadModeTypePaths=/opt/app/onap/model-catalog/definition-type/starter-type
blueprintsprocessor.loadResourceDictionary=false
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt
index 2eafcd4..133e4a5 100644
--- a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutor.kt
@@ -22,7 +22,7 @@
import com.fasterxml.jackson.databind.node.TextNode
import kotlinx.coroutines.delay
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
@@ -55,7 +55,7 @@
@Component("component-remote-ansible-executor")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class ComponentRemoteAnsibleExecutor(
- private val blueprintRestLibPropertyService: BlueprintRestLibPropertyService,
+ private val blueprintRestLibPropertyService: BluePrintRestLibPropertyService,
private val mapper: ObjectMapper
) :
AbstractComponentFunction() {
diff --git a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt
index 88cf099..7be0333 100644
--- a/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/ansible-awx-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/ansible/executor/ComponentRemoteAnsibleExecutorTest.kt
@@ -27,13 +27,13 @@
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService.WebClientResponse
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.test.context.TestPropertySource
import org.springframework.test.context.junit4.SpringRunner
@@ -94,7 +94,7 @@
)
} returns WebClientResponse(200, getReport())
val selector = mapper.readTree(endpointSelector)
- val bluePrintRestLibPropertyService = mockk<BlueprintRestLibPropertyService>()
+ val bluePrintRestLibPropertyService = mockk<BluePrintRestLibPropertyService>()
every { bluePrintRestLibPropertyService.blueprintWebClientService(selector) } returns webClientService
val awxRemoteExecutor = ComponentRemoteAnsibleExecutor(bluePrintRestLibPropertyService, mapper)
awxRemoteExecutor.checkDelay = 1
@@ -112,7 +112,7 @@
}
// then
- assertTrue(bluePrintRuntimeService.getBlueprintError().allErrors().isEmpty())
+ assertTrue(bluePrintRuntimeService.getBluePrintError().allErrors().isEmpty())
}
@Test
@@ -128,7 +128,7 @@
webClientService.exchangeResource("GET", "/api/v2/inventories/?name=Demo+Inventory", "")
} returns WebClientResponse(404, "")
val selector = mapper.readTree(endpointSelector)
- val bluePrintRestLibPropertyService = mockk<BlueprintRestLibPropertyService>()
+ val bluePrintRestLibPropertyService = mockk<BluePrintRestLibPropertyService>()
every { bluePrintRestLibPropertyService.blueprintWebClientService(selector) } returns webClientService
val awxRemoteExecutor = ComponentRemoteAnsibleExecutor(bluePrintRestLibPropertyService, mapper)
awxRemoteExecutor.checkDelay = 1
@@ -146,7 +146,7 @@
}
// then
- val errors = bluePrintRuntimeService.getBlueprintError().allErrors()
+ val errors = bluePrintRuntimeService.getBluePrintError().allErrors()
assertEquals(1, errors.size)
}
@@ -169,7 +169,7 @@
)
} returns WebClientResponse(500, "")
val selector = mapper.readTree(endpointSelector)
- val bluePrintRestLibPropertyService = mockk<BlueprintRestLibPropertyService>()
+ val bluePrintRestLibPropertyService = mockk<BluePrintRestLibPropertyService>()
every { bluePrintRestLibPropertyService.blueprintWebClientService(selector) } returns webClientService
val awxRemoteExecutor = ComponentRemoteAnsibleExecutor(bluePrintRestLibPropertyService, mapper)
awxRemoteExecutor.checkDelay = 1
@@ -187,15 +187,15 @@
}
// then
- val errors = bluePrintRuntimeService.getBlueprintError().allErrors()
+ val errors = bluePrintRuntimeService.getBluePrintError().allErrors()
assertEquals(1, errors.size)
}
private fun createBlueprintRuntimeService(
awxRemoteExecutor: ComponentRemoteAnsibleExecutor,
executionServiceInput: ExecutionServiceInput
- ): BlueprintRuntimeService<MutableMap<String, JsonNode>> {
- val bluePrintRuntimeService = BlueprintMetadataUtils.bluePrintRuntime(
+ ): BluePrintRuntimeService<MutableMap<String, JsonNode>> {
+ val bluePrintRuntimeService = BluePrintMetadataUtils.bluePrintRuntime(
"123456-1000",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/remote_ansible"
)
@@ -208,9 +208,9 @@
bluePrintRuntimeService.assignWorkflowInputs(workflowName, input)
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-ansible")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemoteAnsibleExecutor")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-ansible")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemoteAnsibleExecutor")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
val stepInputData = StepData().apply {
name = "execute-remote-ansible"
diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/CliExecutorExtensions.kt b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/CliExecutorExtensions.kt
index 3414553..b6f2dcb 100644
--- a/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/CliExecutorExtensions.kt
+++ b/ms/blueprintsprocessor/functions/cli-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/CliExecutorExtensions.kt
@@ -21,7 +21,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.BlueprintSshClientService
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.sshClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
/**
* Register the CLI module exposed dependency
@@ -31,5 +31,5 @@
}
fun AbstractComponentFunction.getSshClientService(cliDeviceInfo: JsonNode): BlueprintSshClientService {
- return BlueprintDependencyService.sshClientService(cliDeviceInfo)
+ return BluePrintDependencyService.sshClientService(cliDeviceInfo)
}
diff --git a/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/ComponentCliExecutorTest.kt b/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/ComponentCliExecutorTest.kt
index c9109a3..3cefa32 100644
--- a/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/ComponentCliExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/cli-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/cli/executor/ComponentCliExecutorTest.kt
@@ -23,22 +23,22 @@
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ActionIdentifiers
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BlueprintSshLibConfiguration
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BluePrintSshLibConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintScriptsServiceImpl
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintScriptsServiceImpl
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.annotation.DirtiesContext
@@ -52,8 +52,8 @@
classes = [
CliExecutorConfiguration::class,
ExecutionServiceConfiguration::class,
- BlueprintSshLibConfiguration::class, BlueprintScriptsServiceImpl::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class, BlueprintDependencyService::class
+ BluePrintSshLibConfiguration::class, BluePrintScriptsServiceImpl::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, BluePrintDependencyService::class
]
)
@DirtiesContext
@@ -76,15 +76,15 @@
}
payload = JacksonUtils.jsonNode("{}") as ObjectNode
}
- val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("1234")
+ val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("1234")
componentScriptExecutor.bluePrintRuntimeService = bluePrintRuntime
componentScriptExecutor.stepName = "sample-step"
val operationInputs = hashMapOf<String, JsonNode>()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "activate-cli".asJsonPrimitive()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
- operationInputs[ComponentScriptExecutor.INPUT_SCRIPT_TYPE] = BlueprintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "activate-cli".asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
+ operationInputs[ComponentScriptExecutor.INPUT_SCRIPT_TYPE] = BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
operationInputs[ComponentScriptExecutor.INPUT_SCRIPT_CLASS_REFERENCE] =
"internal.scripts.TestCliScriptFunction".asJsonPrimitive()
@@ -94,7 +94,7 @@
}
executionServiceInput.stepData = stepInputData
- val blueprintContext = mockk<BlueprintContext>()
+ val blueprintContext = mockk<BluePrintContext>()
every {
blueprintContext.nodeTemplateOperationImplementation(
any(), any(), any()
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
index 382a131..06146c2 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotService.kt
@@ -19,7 +19,7 @@
import kotlinx.coroutines.withContext
import org.apache.logging.log4j.util.Strings
import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshot.Status.RUNNING
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.slf4j.LoggerFactory
import org.springframework.dao.DataIntegrityViolationException
import org.springframework.stereotype.Service
@@ -111,7 +111,7 @@
"dated=(${storedSnapshot.createdDate})"
)
} catch (ex: DataIntegrityViolationException) {
- throw BlueprintException("Failed to store configuration snapshot entry.", ex)
+ throw BluePrintException("Failed to store configuration snapshot entry.", ex)
}
storedSnapshot
}
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt
index 99de664..3a3dd10 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/ComponentConfigSnapshotsExecutorTest.kt
@@ -31,9 +31,9 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.ComponentConfigSnapshotsExecutor.Companion.OPERATION_STORE
import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshot
import org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots.db.ResourceConfigSnapshotService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.ComponentScan
@@ -55,7 +55,7 @@
@Autowired
lateinit var cfgSnapshotService: ResourceConfigSnapshotService
lateinit var cfgSnapshotComponent: ComponentConfigSnapshotsExecutor
- private var bluePrintRuntimeService = BlueprintMetadataUtils.bluePrintRuntime(
+ private var bluePrintRuntimeService = BluePrintMetadataUtils.bluePrintRuntime(
"123456-1000",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/remote_scripts"
)
@@ -99,7 +99,7 @@
prepareRequestProperties(OPERATION_FETCH, resId, resType, ResourceConfigSnapshot.Status.RUNNING.name)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -138,7 +138,7 @@
prepareRequestProperties(OPERATION_FETCH, resId, resType, ResourceConfigSnapshot.Status.CANDIDATE.name)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -176,7 +176,7 @@
prepareRequestProperties(OPERATION_STORE, resId, resType, snapshotConfig)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -211,7 +211,7 @@
prepareRequestProperties(OPERATION_FETCH, "asdasd", "PNF", ResourceConfigSnapshot.Status.RUNNING.name)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -238,7 +238,7 @@
prepareRequestProperties("update", "asdasd", "PNF", ResourceConfigSnapshot.Status.RUNNING.name)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -247,7 +247,7 @@
}
// then; we should get error in our output properties
- assertTrue(bluePrintRuntimeService.getBlueprintError().allErrors().size == 1)
+ assertTrue(bluePrintRuntimeService.getBluePrintError().allErrors().size == 1)
assertEquals(
ComponentConfigSnapshotsExecutor.OUTPUT_STATUS_ERROR.asJsonPrimitive(),
bluePrintRuntimeService.getNodeTemplateAttributeValue(
@@ -278,7 +278,7 @@
prepareRequestProperties(OPERATION_DIFF, resId, resType, "YANG")
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot lookup: provide resource-id and resource-type.",
e.message
@@ -319,7 +319,7 @@
prepareRequestProperties(OPERATION_DIFF, resId, resType, DIFF_JSON)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot diff: provide resource-id and resource-type.",
e.message
@@ -328,7 +328,7 @@
}
// then; we should get success
- assertTrue(bluePrintRuntimeService.getBlueprintError().allErrors().size == 0)
+ assertTrue(bluePrintRuntimeService.getBluePrintError().allErrors().size == 0)
assertEquals(
ComponentConfigSnapshotsExecutor.OUTPUT_STATUS_SUCCESS.asJsonPrimitive(),
bluePrintRuntimeService.getNodeTemplateAttributeValue(
@@ -368,7 +368,7 @@
prepareRequestProperties(OPERATION_DIFF, resId, resType, DIFF_XML)
cfgSnapshotComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
kotlin.test.assertEquals(
"Can't proceed with the cfg snapshot diff: provide resource-id and resource-type.",
e.message
@@ -377,7 +377,7 @@
}
// then; we should get success
- assertTrue(bluePrintRuntimeService.getBlueprintError().allErrors().size == 0)
+ assertTrue(bluePrintRuntimeService.getBluePrintError().allErrors().size == 0)
assertEquals(
ComponentConfigSnapshotsExecutor.OUTPUT_STATUS_SUCCESS.asJsonPrimitive(),
bluePrintRuntimeService.getNodeTemplateAttributeValue(
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/TestDatabaseConfiguration.kt
index b651913..96045ee 100644
--- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/TestDatabaseConfiguration.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDatabaseConfiguration
import org.springframework.context.annotation.Bean
@@ -29,7 +29,7 @@
import javax.sql.DataSource
@Configuration
-@Import(BlueprintDBLibConfiguration::class)
+@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor.functions.config.snapshots"],
entityManagerFactoryRef = "primaryEntityManager",
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/K8sConnectionPluginConfiguration.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/K8sConnectionPluginConfiguration.kt
index 2419e5a..cc423a0 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/K8sConnectionPluginConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/K8sConnectionPluginConfiguration.kt
@@ -17,9 +17,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -27,12 +27,12 @@
@Configuration
@Import(
- BlueprintPropertyConfiguration::class,
- BlueprintPropertiesService::class,
- BlueprintCoreConfiguration::class
+ BluePrintPropertyConfiguration::class,
+ BluePrintPropertiesService::class,
+ BluePrintCoreConfiguration::class
)
@EnableConfigurationProperties
-open class K8sConnectionPluginConfiguration(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class K8sConnectionPluginConfiguration(private var bluePrintPropertiesService: BluePrintPropertiesService) {
@Bean("k8s-plugin-properties")
open fun getProperties(): K8sConnectionPluginProperties {
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/K8sPluginDefinitionApi.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/K8sPluginDefinitionApi.kt
index ae2d1f6..73c0e80 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/K8sPluginDefinitionApi.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/K8sPluginDefinitionApi.kt
@@ -25,7 +25,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.template.K8sTemplate
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.slf4j.LoggerFactory
import org.springframework.http.HttpMethod.DELETE
import org.springframework.http.HttpMethod.GET
@@ -54,7 +54,7 @@
return result.status in 200..299
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb definition")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -74,7 +74,7 @@
return result.status in 200..299
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb profile")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -96,7 +96,7 @@
}
} catch (e: Exception) {
log.error("Caught exception trying to create k8s rb profile ${profile.profileName}")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -118,7 +118,7 @@
log.debug("Profile uploaded properly")
} catch (e: Exception) {
log.error("Caught exception trying to upload k8s rb profile ${profile.profileName}")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -137,7 +137,7 @@
}
} catch (e: Exception) {
log.error("Caught exception during create template")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -154,7 +154,7 @@
}
} catch (e: Exception) {
log.error("Caught exception trying to upload k8s rb template ${template.templateName}")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -172,7 +172,7 @@
}
} catch (e: Exception) {
log.error("Caught exception during get template")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -184,7 +184,7 @@
return objectMapper.readValue(result.body)
} catch (e: Exception) {
log.error("Caught exception during get template")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -196,7 +196,7 @@
return result.status in 200..299
} catch (e: Exception) {
log.error("Caught exception during get template")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt
index 80531b1..067c75b 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/profile/K8sProfileUploadComponent.kt
@@ -23,7 +23,7 @@
import com.fasterxml.jackson.databind.node.ArrayNode
import com.fasterxml.jackson.databind.node.ObjectNode
import org.apache.commons.io.FileUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sPluginDefinitionApi
@@ -31,14 +31,14 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintVelocityTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintVelocityTemplateService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ArchiveType
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
@@ -53,7 +53,7 @@
@Component("component-k8s-profile-upload")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class K8sProfileUploadComponent(
- private var bluePrintPropertiesService: BlueprintPropertiesService,
+ private var bluePrintPropertiesService: BluePrintPropertiesService,
private val resourceResolutionService: ResourceResolutionService
) :
@@ -132,7 +132,7 @@
if ((profileName == null) || (definitionName == null) || (definitionVersion == null)) {
log.warn("Prefix $prefix does not have required data for us to continue.")
} else if (!api.hasDefinition(definitionName, definitionVersion)) {
- throw BlueprintProcessorException("K8s RB Definition ($definitionName/$definitionVersion) not found ")
+ throw BluePrintProcessorException("K8s RB Definition ($definitionName/$definitionVersion) not found ")
} else if (profileName == "") {
log.warn("K8s rb profile name is empty! Either define profile name to use or choose default")
} else if (api.hasProfile(definitionName, definitionVersion, profileName)) {
@@ -144,15 +144,15 @@
val profileK8sVersion: String? = prefixInputParamsMap[INPUT_K8S_PROFILE_K8S_VERSION]?.returnNullIfMissing()?.asText()
var profileSource: String? = prefixInputParamsMap[INPUT_K8S_PROFILE_SOURCE]?.returnNullIfMissing()?.asText()
if (profileNamespace == null)
- throw BlueprintProcessorException("Profile $profileName namespace is missing")
+ throw BluePrintProcessorException("Profile $profileName namespace is missing")
if (profileSource == null) {
profileSource = profileName
log.info("Profile name used instead of profile source")
}
val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val artifact: ArtifactDefinition = bluePrintContext.nodeTemplateArtifact(nodeTemplateName, profileSource)
- if (artifact.type != BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE)
- throw BlueprintProcessorException(
+ if (artifact.type != BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE)
+ throw BluePrintProcessorException(
"Unexpected profile artifact type for profile source " +
"$profileSource. Expecting: $artifact.type"
)
@@ -239,19 +239,19 @@
tempProfilePath, manifestFiles
)
} else
- throw BlueprintProcessorException("Manifest file is missing")
+ throw BluePrintProcessorException("Manifest file is missing")
// Preparation of the final profile content
val finalProfileFilePath = Paths.get(
tempMainPath.toString().plus(File.separator).plus(
"$k8sRbProfileName.tar.gz"
)
)
- if (!BlueprintArchiveUtils.compress(
+ if (!BluePrintArchiveUtils.compress(
tempProfilePath, finalProfileFilePath.toFile(),
ArchiveType.TarGz
)
) {
- throw BlueprintProcessorException("Profile compression has failed")
+ throw BluePrintProcessorException("Profile compression has failed")
}
FileUtils.deleteDirectory(tempProfilePath)
@@ -261,7 +261,7 @@
throw t
}
} else
- throw BlueprintProcessorException("Profile source $ks8ProfileLocation is missing in CBA folder")
+ throw BluePrintProcessorException("Profile source $ks8ProfileLocation is missing in CBA folder")
}
private fun readManifestFiles(profileSource: File, destinationFolder: File): ArrayList<File>? {
@@ -353,7 +353,7 @@
if (!isFileInTheManifestFiles(finalFile, manifestFiles))
return
val fileContent = templatedFile.bufferedReader().readText()
- val finalFileContent = BlueprintVelocityTemplateService.generateContent(
+ val finalFileContent = BluePrintVelocityTemplateService.generateContent(
fileContent,
params.toString(), true
)
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigTemplateComponent.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigTemplateComponent.kt
index ceb4e80..9692777 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigTemplateComponent.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigTemplateComponent.kt
@@ -23,21 +23,21 @@
import com.fasterxml.jackson.databind.node.ArrayNode
import com.fasterxml.jackson.databind.node.ObjectNode
import org.apache.commons.io.FileUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.definition.K8sPluginDefinitionApi
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintVelocityTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintVelocityTemplateService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ArchiveType
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
@@ -52,7 +52,7 @@
@Component("component-k8s-config-template")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class K8sConfigTemplateComponent(
- private var bluePrintPropertiesService: BlueprintPropertiesService,
+ private var bluePrintPropertiesService: BluePrintPropertiesService,
private val resourceResolutionService: ResourceResolutionService
) :
@@ -141,8 +141,8 @@
}
val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val artifact: ArtifactDefinition = bluePrintContext.nodeTemplateArtifact(nodeTemplateName, templateSource)
- if (artifact.type != BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG)
- throw BlueprintProcessorException(
+ if (artifact.type != BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG)
+ throw BluePrintProcessorException(
"Unexpected template artifact type for template source $templateSource. Expecting: $artifact.type"
)
val template = K8sTemplate()
@@ -222,8 +222,8 @@
"$k8sRbTemplateName.tar.gz"
)
)
- if (!BlueprintArchiveUtils.compress(tempPath, finalTemplateFilePath.toFile(), ArchiveType.TarGz)) {
- throw BlueprintProcessorException("Config template compression has failed")
+ if (!BluePrintArchiveUtils.compress(tempPath, finalTemplateFilePath.toFile(), ArchiveType.TarGz)) {
+ throw BluePrintProcessorException("Config template compression has failed")
}
FileUtils.deleteDirectory(tempPath)
@@ -233,7 +233,7 @@
throw t
}
} else
- throw BlueprintProcessorException("Config source $k8sConfigLocation is missing in CBA folder")
+ throw BluePrintProcessorException("Config source $k8sConfigLocation is missing in CBA folder")
}
private fun templateLocation(location: File, params: JsonNode, destinationFolder: File) {
@@ -256,7 +256,7 @@
private fun templateFile(templateFile: File, params: JsonNode, destinationFolder: File) {
val finalFile = File(destinationFolder.path.plus(File.separator).plus(templateFile.nameWithoutExtension))
val fileContent = templateFile.bufferedReader().readText()
- val finalFileContent = BlueprintVelocityTemplateService.generateContent(
+ val finalFileContent = BluePrintVelocityTemplateService.generateContent(
fileContent,
params.toString(), true
)
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigValueComponent.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigValueComponent.kt
index 7a487f2..f1affac 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigValueComponent.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/definition/template/K8sConfigValueComponent.kt
@@ -6,7 +6,7 @@
import com.fasterxml.jackson.databind.node.ObjectNode
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory
import com.fasterxml.jackson.module.kotlin.convertValue
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.K8sConnectionPluginConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sConfigValueRequest
@@ -14,12 +14,12 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintVelocityTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintVelocityTemplateService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
@@ -33,7 +33,7 @@
@Component("component-k8s-config-value")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class K8sConfigValueComponent(
- private var bluePrintPropertiesService: BlueprintPropertiesService,
+ private var bluePrintPropertiesService: BluePrintPropertiesService,
private val resourceResolutionService: ResourceResolutionService
) : AbstractComponentFunction() {
@@ -105,7 +105,7 @@
else if (operationType == OperationType.DELETE.toString())
deleteOperation(instanceId, configName)
else
- throw BlueprintProcessorException("Unknown operation type: $operationType")
+ throw BluePrintProcessorException("Unknown operation type: $operationType")
}
}
@@ -124,8 +124,8 @@
outputPrefixStatuses[prefix] = OUTPUT_ERROR
val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val artifact: ArtifactDefinition = bluePrintContext.nodeTemplateArtifact(nodeTemplateName, valueSource)
- if (artifact.type != BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG)
- throw BlueprintProcessorException(
+ if (artifact.type != BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG)
+ throw BluePrintProcessorException(
"Unexpected config artifact type for config value source $valueSource. Expecting: $artifact.type"
)
val configValueRequest = K8sConfigValueRequest()
@@ -153,8 +153,8 @@
outputPrefixStatuses[prefix] = OUTPUT_ERROR
val bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val artifact: ArtifactDefinition = bluePrintContext.nodeTemplateArtifact(nodeTemplateName, valueSource)
- if (artifact.type != BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG)
- throw BlueprintProcessorException(
+ if (artifact.type != BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG)
+ throw BluePrintProcessorException(
"Unexpected config artifact type for config value source $valueSource. Expecting: $artifact.type"
)
if (api.hasConfigurationValues(instanceId, configName)) {
@@ -165,7 +165,7 @@
configValueRequest.values = parseResult(valueSource, artifact.file)
api.editConfigurationValues(configValueRequest, instanceId, configName)
} else {
- throw BlueprintProcessorException("Error while getting configuration value")
+ throw BluePrintProcessorException("Error while getting configuration value")
}
}
}
@@ -189,7 +189,7 @@
)
if (!configeValueSourceFilePath.toFile().exists() || configeValueSourceFilePath.toFile().isDirectory)
- throw BlueprintProcessorException("Specified config value source $k8sConfigLocation is not a file")
+ throw BluePrintProcessorException("Specified config value source $k8sConfigLocation is not a file")
var obj: Any? = null
val yamlReader = ObjectMapper(YAMLFactory())
@@ -225,7 +225,7 @@
private fun templateValues(templateFile: File, params: JsonNode): String {
val fileContent = templateFile.bufferedReader().readText()
- return BlueprintVelocityTemplateService.generateContent(
+ return BluePrintVelocityTemplateService.generateContent(
fileContent,
params.toString(), true
)
@@ -238,7 +238,7 @@
if (profileSourceFileFolderPath.toFile().exists() && !profileSourceFileFolderPath.toFile().isDirectory)
return profileSourceFileFolderPath.toFile()
else
- throw BlueprintProcessorException("Template value $profileSourceFileFolderPath is missing in CBA folder")
+ throw BluePrintProcessorException("Template value $profileSourceFileFolderPath is missing in CBA folder")
}
private fun getTemplatePrefixList(node: JsonNode?): ArrayList<String> {
diff --git a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/instance/K8sPluginInstanceApi.kt b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/instance/K8sPluginInstanceApi.kt
index 3305481..dbcc133 100644
--- a/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/instance/K8sPluginInstanceApi.kt
+++ b/ms/blueprintsprocessor/functions/k8s-connection-plugin/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/k8s/instance/K8sPluginInstanceApi.kt
@@ -26,7 +26,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.healthcheck.K8sRbInstanceHealthCheckList
import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.healthcheck.K8sRbInstanceHealthCheckSimple
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.http.HttpMethod.DELETE
@@ -55,10 +55,10 @@
} else if (result.status == 500 && result.body.contains("Did not find any objects with tag"))
null
else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -77,10 +77,10 @@
} else if (result.status == 500 && result.body.contains("Error finding master table"))
null
else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -116,10 +116,10 @@
} else if (result.status == 500 && result.body.contains("Error finding master table"))
null
else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -155,10 +155,10 @@
} else if (result.status == 500 && result.body.contains("Error finding master table"))
null
else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -180,10 +180,10 @@
} else if (result.status == 500 && result.body.contains("Error finding master table"))
null
else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -205,10 +205,10 @@
} else if (result.status == 500 && result.body.contains("Error finding master table"))
null
else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -230,10 +230,10 @@
} else if (result.status == 500 && result.body.contains("Error finding master table"))
null
else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -252,10 +252,10 @@
)
parsedObject
} else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to create config instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -274,10 +274,10 @@
)
parsedObject
} else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to edit config instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -293,7 +293,7 @@
return result.status in 200..299
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -312,10 +312,10 @@
)
parsedObject
} else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get config instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -329,10 +329,10 @@
)
log.debug(result.toString())
if (result.status !in 200..299)
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to delete config instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -351,10 +351,10 @@
)
parsedObject
} else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -373,10 +373,10 @@
)
parsedObject
} else
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
@@ -390,10 +390,10 @@
)
log.debug(result.toString())
if (result.status !in 200..299)
- throw BlueprintProcessorException(result.body)
+ throw BluePrintProcessorException(result.body)
} catch (e: Exception) {
log.error("Caught exception trying to get k8s rb instance")
- throw BlueprintProcessorException("${e.message}")
+ throw BluePrintProcessorException("${e.message}")
}
}
}
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizeExtensions.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizeExtensions.kt
index 77adb0a..d8e71d4 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizeExtensions.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizeExtensions.kt
@@ -18,19 +18,19 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
/**
* Register the MessagePrioritizationStateService and exposed dependency
*/
-fun BlueprintDependencyService.messagePrioritizationStateService(): MessagePrioritizationStateService =
+fun BluePrintDependencyService.messagePrioritizationStateService(): MessagePrioritizationStateService =
instance(MessagePrioritizationStateService::class)
/**
* Expose messagePrioritizationStateService to AbstractComponentFunction
*/
fun AbstractComponentFunction.messagePrioritizationStateService() =
- BlueprintDependencyService.messagePrioritizationStateService()
+ BluePrintDependencyService.messagePrioritizationStateService()
/**
* MessagePrioritization correlation extensions
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/AbstractMessagePrioritizeProcessor.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/AbstractMessagePrioritizeProcessor.kt
index 341a2aa..d4f8470 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/AbstractMessagePrioritizeProcessor.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/AbstractMessagePrioritizeProcessor.kt
@@ -17,10 +17,10 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.kafka
import org.apache.kafka.streams.processor.ProcessorContext
-import org.onap.ccsdk.cds.blueprintsprocessor.message.kafka.AbstractBlueprintMessageProcessor
+import org.onap.ccsdk.cds.blueprintsprocessor.message.kafka.AbstractBluePrintMessageProcessor
/** CDS Message Prioritization Kafka Stream Processor abstract class to implement */
-abstract class AbstractMessagePrioritizeProcessor<K, V> : AbstractBlueprintMessageProcessor<K, V>() {
+abstract class AbstractMessagePrioritizeProcessor<K, V> : AbstractBluePrintMessageProcessor<K, V>() {
override fun init(processorContext: ProcessorContext) {
this.processorContext = processorContext
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/DefaultMessagePrioritizeProcessor.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/DefaultMessagePrioritizeProcessor.kt
index 6c1f747..1b06124 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/DefaultMessagePrioritizeProcessor.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/DefaultMessagePrioritizeProcessor.kt
@@ -23,7 +23,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.MessagePrioritizationStateService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.MessageState
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -37,7 +37,7 @@
override suspend fun processNB(key: ByteArray, value: ByteArray) {
val messagePrioritize = JacksonUtils.readValue(String(value), MessagePrioritization::class.java)
- ?: throw BlueprintProcessorException("failed to convert")
+ ?: throw BluePrintProcessorException("failed to convert")
try {
kafkaMessagePrioritizationService.prioritize(messagePrioritize)
} catch (e: Exception) {
@@ -62,7 +62,7 @@
if (kafkaMessagePrioritizationService is AbstractKafkaMessagePrioritizationService) {
kafkaMessagePrioritizationService.setKafkaProcessorContext(processorContext)
} else {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"messagePrioritizationService is not instance of " +
"AbstractKafkaMessagePrioritizationService, it is ${kafkaMessagePrioritizationService.javaClass}"
)
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/KafkaMessagePrioritizationConsumer.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/KafkaMessagePrioritizationConsumer.kt
index ecdcbff..4ab399f 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/KafkaMessagePrioritizationConsumer.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/KafkaMessagePrioritizationConsumer.kt
@@ -24,15 +24,15 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.utils.MessageProcessorUtils.bluePrintProcessorSupplier
import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaStreamsBasicAuthConsumerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BluePrintMessageLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageConsumerService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.KafkaStreamConsumerFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.splitCommaAsList
open class KafkaMessagePrioritizationConsumer(
- private val bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService,
+ private val bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService,
private val kafkaMessagePrioritizationService: MessagePrioritizationService
) {
@@ -50,7 +50,7 @@
return object : KafkaStreamConsumerFunction {
val kafkaConsumerConfiguration = prioritizationConfiguration.kafkaConfiguration
- ?: throw BlueprintProcessorException("failed to get kafka consumer configuration")
+ ?: throw BluePrintProcessorException("failed to get kafka consumer configuration")
override suspend fun createTopology(
messageConsumerProperties: MessageConsumerProperties,
@@ -91,7 +91,7 @@
suspend fun startConsuming(prioritizationConfiguration: PrioritizationConfiguration) {
val kafkaConsumerConfiguration = prioritizationConfiguration.kafkaConfiguration
- ?: throw BlueprintProcessorException("failed to get kafka consumer configuration")
+ ?: throw BluePrintProcessorException("failed to get kafka consumer configuration")
streamingConsumerService = consumerService(kafkaConsumerConfiguration.inputTopicSelector)
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/MessagePrioritizationSerde.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/MessagePrioritizationSerde.kt
index 4b1a3f3..5595863 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/MessagePrioritizationSerde.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/kafka/MessagePrioritizationSerde.kt
@@ -20,7 +20,7 @@
import org.apache.kafka.common.serialization.Serde
import org.apache.kafka.common.serialization.Serializer
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import java.nio.charset.Charset
@@ -37,7 +37,7 @@
return object : Deserializer<MessagePrioritization> {
override fun deserialize(topic: String, data: ByteArray): MessagePrioritization {
return JacksonUtils.readValue(String(data), MessagePrioritization::class.java)
- ?: throw BlueprintProcessorException("failed to convert")
+ ?: throw BluePrintProcessorException("failed to convert")
}
override fun configure(configs: MutableMap<String, *>?, isKey: Boolean) {
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/AbstractNatsMessagePrioritizationService.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/AbstractNatsMessagePrioritizationService.kt
index babddbd..502a782 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/AbstractNatsMessagePrioritizationService.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/AbstractNatsMessagePrioritizationService.kt
@@ -22,7 +22,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.ids
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.service.AbstractMessagePrioritizationService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.utils.MessageProcessorUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsService
import org.onap.ccsdk.cds.blueprintsprocessor.nats.utils.NatsClusterUtils
import org.onap.ccsdk.cds.controllerblueprints.core.asByteArray
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
@@ -34,7 +34,7 @@
private val log = logger(AbstractNatsMessagePrioritizationService::class)
- lateinit var bluePrintNatsService: BlueprintNatsService
+ lateinit var bluePrintNatsService: BluePrintNatsService
override suspend fun output(messages: List<MessagePrioritization>) {
log.info("$$$$$ received in output processor id(${messages.ids()})")
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/NatsMessagePrioritizationConsumer.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/NatsMessagePrioritizationConsumer.kt
index 0976127..a0b2cf4 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/NatsMessagePrioritizationConsumer.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/nats/NatsMessagePrioritizationConsumer.kt
@@ -22,29 +22,29 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.MessagePrioritizationService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
import org.onap.ccsdk.cds.blueprintsprocessor.nats.asJsonType
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsLibPropertyService
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsService
import org.onap.ccsdk.cds.blueprintsprocessor.nats.utils.NatsClusterUtils
import org.onap.ccsdk.cds.blueprintsprocessor.nats.utils.SubscriptionOptionsUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ClusterUtils
open class NatsMessagePrioritizationConsumer(
- private val bluePrintNatsLibPropertyService: BlueprintNatsLibPropertyService,
+ private val bluePrintNatsLibPropertyService: BluePrintNatsLibPropertyService,
private val natsMessagePrioritizationService: MessagePrioritizationService
) {
private val log = logger(NatsMessagePrioritizationConsumer::class)
- lateinit var bluePrintNatsService: BlueprintNatsService
+ lateinit var bluePrintNatsService: BluePrintNatsService
private lateinit var subscription: Subscription
suspend fun startConsuming() {
val prioritizationConfiguration = natsMessagePrioritizationService.getConfiguration()
val natsConfiguration = prioritizationConfiguration.natsConfiguration
- ?: throw BlueprintProcessorException("couldn't get NATS consumer configuration")
+ ?: throw BluePrintProcessorException("couldn't get NATS consumer configuration")
check((natsMessagePrioritizationService is AbstractNatsMessagePrioritizationService)) {
"messagePrioritizationService is not of type AbstractNatsMessagePrioritizationService."
@@ -73,7 +73,7 @@
log.info("Nats prioritization consumer listener shutdown complete")
}
- private fun consumerService(selector: String): BlueprintNatsService {
+ private fun consumerService(selector: String): BluePrintNatsService {
return bluePrintNatsLibPropertyService.bluePrintNatsService(selector)
}
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationStateServiceImpl.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationStateServiceImpl.kt
index b66a2bd..ed16fd4 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationStateServiceImpl.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/service/MessagePrioritizationStateServiceImpl.kt
@@ -21,7 +21,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.PrioritizationMessageRepository
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.toFormatedCorrelation
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.addDate
import org.onap.ccsdk.cds.controllerblueprints.core.utils.controllerDate
@@ -48,7 +48,7 @@
override suspend fun getMessage(id: String): MessagePrioritization {
return prioritizationMessageRepository.findById(id).orElseGet(null)
- ?: throw BlueprintProcessorException("couldn't find message for id($id)")
+ ?: throw BluePrintProcessorException("couldn't find message for id($id)")
}
override suspend fun getMessages(ids: List<String>): List<MessagePrioritization>? {
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageCorrelationUtils.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageCorrelationUtils.kt
index f42be52..7ab0be0 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageCorrelationUtils.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageCorrelationUtils.kt
@@ -20,7 +20,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.toFormatedCorrelation
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.toTypeNCorrelation
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
object MessageCorrelationUtils {
@@ -50,7 +50,7 @@
val unknownMessageTypes = collectedMessages.filter { !types.contains(it.type) }.map { it.id }
if (!unknownMessageTypes.isNullOrEmpty()) {
- throw BlueprintProcessorException("Messages($unknownMessageTypes) is not in type of($types)")
+ throw BluePrintProcessorException("Messages($unknownMessageTypes) is not in type of($types)")
}
val copyTypes = types.toTypedArray().copyOf().toMutableList()
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageProcessorUtils.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageProcessorUtils.kt
index 3eba4ed..86cec36 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageProcessorUtils.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/utils/MessageProcessorUtils.kt
@@ -22,14 +22,14 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.MessagePrioritization
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.kafka.AbstractMessagePrioritizeProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.toFormatedCorrelation
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
object MessageProcessorUtils {
/** Utility to create the cluster lock for message [messagePrioritization] prioritization procssing.*/
suspend fun prioritizationGrouplock(messagePrioritization: MessagePrioritization): ClusterLock? {
- val clusterService = BlueprintDependencyService.optionalClusterService()
+ val clusterService = BluePrintDependencyService.optionalClusterService()
return if (clusterService != null && clusterService.clusterJoined() &&
!messagePrioritization.correlationId.isNullOrBlank()
@@ -39,31 +39,31 @@
val lockName = "prioritize::${messagePrioritization.group}::$correlationId"
val clusterLock = clusterService.clusterLock(lockName)
clusterLock.lock()
- if (!clusterLock.isLocked()) throw BlueprintProcessorException("failed to lock($lockName)")
+ if (!clusterLock.isLocked()) throw BluePrintProcessorException("failed to lock($lockName)")
clusterLock
} else null
}
/** Utility to create the cluster lock for expiry scheduler*/
suspend fun prioritizationExpiryLock(): ClusterLock? {
- val clusterService = BlueprintDependencyService.optionalClusterService()
+ val clusterService = BluePrintDependencyService.optionalClusterService()
return if (clusterService != null && clusterService.clusterJoined()) {
val lockName = "prioritize-expiry"
val clusterLock = clusterService.clusterLock(lockName)
clusterLock.lock()
- if (!clusterLock.isLocked()) throw BlueprintProcessorException("failed to lock($lockName)")
+ if (!clusterLock.isLocked()) throw BluePrintProcessorException("failed to lock($lockName)")
clusterLock
} else null
}
/** Utility to create the cluster lock for expiry scheduler*/
suspend fun prioritizationCleanLock(): ClusterLock? {
- val clusterService = BlueprintDependencyService.optionalClusterService()
+ val clusterService = BluePrintDependencyService.optionalClusterService()
return if (clusterService != null && clusterService.clusterJoined()) {
val lockName = "prioritize-clean"
val clusterLock = clusterService.clusterLock(lockName)
clusterLock.lock()
- if (!clusterLock.isLocked()) throw BlueprintProcessorException("failed to lock($lockName)")
+ if (!clusterLock.isLocked()) throw BluePrintProcessorException("failed to lock($lockName)")
clusterLock
} else null
}
@@ -80,7 +80,7 @@
fun <K, V> bluePrintProcessorSupplier(name: String): ProcessorSupplier<K, V> {
return ProcessorSupplier<K, V> {
// Dynamically resolve the Prioritization Processor
- BlueprintDependencyService.instance<AbstractMessagePrioritizeProcessor<K, V>>(name)
+ BluePrintDependencyService.instance<AbstractMessagePrioritizeProcessor<K, V>>(name)
}
}
}
diff --git a/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt b/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
index 9f74daa..e5dbe6a 100644
--- a/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
+++ b/ms/blueprintsprocessor/functions/message-prioritization/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/message/prioritization/MessagePrioritizationConsumerTest.kt
@@ -27,8 +27,8 @@
import kotlinx.coroutines.runBlocking
import org.junit.Before
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.db.PrioritizationMessageRepository
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.kafka.DefaultMessagePrioritizeProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.kafka.KafkaMessagePrioritizationConsumer
@@ -38,17 +38,17 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.service.SampleMessagePrioritizationService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.service.SampleNatsMessagePrioritizationService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.message.prioritization.utils.MessagePrioritizationSample
-import org.onap.ccsdk.cds.blueprintsprocessor.message.BlueprintMessageLibConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BluePrintMessageLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.KafkaMessageProducerService
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.BlueprintNatsLibConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.BluePrintNatsLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.nats.utils.NatsClusterUtils
import org.onap.ccsdk.cds.controllerblueprints.core.asByteArray
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest
import org.springframework.boot.test.mock.mockito.MockBean
@@ -65,8 +65,8 @@
@DirtiesContext
@ContextConfiguration(
classes = [
- BlueprintMessageLibConfiguration::class, BlueprintNatsLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class,
+ BluePrintMessageLibConfiguration::class, BluePrintNatsLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class,
MessagePrioritizationConfiguration::class, TestDatabaseConfiguration::class
]
)
@@ -115,10 +115,10 @@
lateinit var prioritizationMessageRepository: PrioritizationMessageRepository
@Autowired
- lateinit var bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService
+ lateinit var bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService
@Autowired
- lateinit var bluePrintNatsLibPropertyService: BlueprintNatsLibPropertyService
+ lateinit var bluePrintNatsLibPropertyService: BluePrintNatsLibPropertyService
@Autowired
lateinit var messagePrioritizationStateService: MessagePrioritizationStateService
@@ -128,15 +128,15 @@
@Before
fun setup() {
- BlueprintDependencyService.inject(applicationContext)
+ BluePrintDependencyService.inject(applicationContext)
}
@Test
- fun testBlueprintKafkaJDBCKeyStore() {
+ fun testBluePrintKafkaJDBCKeyStore() {
runBlocking {
assertNotNull(prioritizationMessageRepository, "failed to get prioritizationMessageRepository")
- val messagePrioritizationService: MessagePrioritizationStateService = BlueprintDependencyService
+ val messagePrioritizationService: MessagePrioritizationStateService = BluePrintDependencyService
.instance(MessagePrioritizationStateService::class)
assertNotNull(messagePrioritizationService, "failed to get messagePrioritizationService")
@@ -248,7 +248,7 @@
)
// Register the processor
- BlueprintDependencyService.registerSingleton(
+ BluePrintDependencyService.registerSingleton(
MessagePrioritizationConstants.PROCESSOR_PRIORITIZE,
defaultMessagePrioritizeProcessor
)
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorExtensions.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorExtensions.kt
index 6e667c2..b964388 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorExtensions.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/NetconfExecutorExtensions.kt
@@ -22,13 +22,13 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
/**
* Register the Netconf module exposed dependency
*/
-fun BlueprintDependencyService.netconfClientService(): ResourceResolutionService =
+fun BluePrintDependencyService.netconfClientService(): ResourceResolutionService =
instance(ResourceResolutionConstants.SERVICE_RESOURCE_RESOLUTION)
fun AbstractComponentFunction.netconfDevice(requirementName: String): NetconfDevice {
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
index cdfd93c..f3df55b 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
@@ -31,10 +31,10 @@
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.context.ApplicationContext
@@ -66,7 +66,7 @@
ExecutionServiceInput::class.java
)!!
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -92,9 +92,9 @@
// TODO("Set Attribute properties")
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-netconf")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentNetconfExecutor")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-netconf")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentNetconfExecutor")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
// Set Step Inputs in Blueprint Runtime Service
componentNetconfExecutor.bluePrintRuntimeService = bluePrintRuntimeService
val stepInputData = StepData().apply {
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt
index b32ccea..e2b6f65 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutor.kt
@@ -24,8 +24,8 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts.BlueprintJythonServiceImpl
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts.PythonExecutorConstants
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.data.OperationAssignment
import org.slf4j.LoggerFactory
@@ -66,12 +66,12 @@
.nodeTemplateInterfaceOperation(nodeTemplateName, interfaceName, operationName)
val artifactName: String = operationAssignment.implementation?.primary
- ?: throw BlueprintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
+ ?: throw BluePrintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
val artifactDefinition = bluePrintRuntimeService.resolveNodeTemplateArtifactDefinition(nodeTemplateName, artifactName)
val pythonFileName = artifactDefinition.file
- ?: throw BlueprintProcessorException("missing file name for node template ($nodeTemplateName)'s artifactName($artifactName)")
+ ?: throw BluePrintProcessorException("missing file name for node template ($nodeTemplateName)'s artifactName($artifactName)")
val pythonClassName = FilenameUtils.getBaseName(pythonFileName)
@@ -80,7 +80,7 @@
checkNotEmpty(content) { "artifact ($artifactName) content is empty" }
val instanceDependenciesNode: ArrayNode = operationInputs[PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES] as? ArrayNode
- ?: throw BlueprintProcessorException("Failed to get property(${PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES})")
+ ?: throw BluePrintProcessorException("Failed to get property(${PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES})")
val jythonInstance: MutableMap<String, Any> = hashMapOf()
jythonInstance["log"] = LoggerFactory.getLogger(pythonClassName)
@@ -99,6 +99,6 @@
componentFunction.operationName = operationName
componentFunction.processId = processId
componentFunction.workflowName = workflowName
- componentFunction.scriptType = BlueprintConstants.SCRIPT_JYTHON
+ componentFunction.scriptType = BluePrintConstants.SCRIPT_JYTHON
}
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
index 539e03d..b8806b3 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutor.kt
@@ -23,7 +23,7 @@
import kotlinx.coroutines.TimeoutCancellationException
import kotlinx.coroutines.async
import kotlinx.coroutines.withTimeout
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.PrepareRemoteEnvInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteIdentifier
@@ -35,7 +35,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceConstant
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.RemoteScriptExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.checkFileExists
@@ -56,7 +56,7 @@
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class ComponentRemotePythonExecutor(
private val remoteScriptExecutionService: RemoteScriptExecutionService,
- private val bluePrintPropertiesService: BlueprintPropertiesService,
+ private val bluePrintPropertiesService: BluePrintPropertiesService,
private val blueprintModelRepository: BlueprintModelRepository
) : AbstractComponentFunction() {
@@ -111,7 +111,7 @@
.nodeTemplateInterfaceOperation(nodeTemplateName, interfaceName, operationName)
val artifactName: String = operationAssignment.implementation?.primary
- ?: throw BlueprintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
+ ?: throw BluePrintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
val artifactDefinition =
bluePrintRuntimeService.resolveNodeTemplateArtifactDefinition(nodeTemplateName, artifactName)
@@ -314,7 +314,7 @@
}
private fun noBlueprintErrors() =
- bluePrintRuntimeService.getBlueprintError().stepErrors(stepName).isNullOrEmpty()
+ bluePrintRuntimeService.getBluePrintError().stepErrors(stepName).isNullOrEmpty()
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
addError("Failed in ComponentRemotePythonExecutor : ${runtimeException.message}")
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSL.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSL.kt
index 6788310..3df25c4 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSL.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSL.kt
@@ -18,8 +18,8 @@
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ArrayNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
@@ -32,53 +32,53 @@
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
/** Component Extensions **/
-fun BlueprintTypes.nodeTypeComponentRemotePythonExecutor(): NodeType {
+fun BluePrintTypes.nodeTypeComponentRemotePythonExecutor(): NodeType {
return nodeType(
- id = "component-remote-python-executor", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
+ id = "component-remote-python-executor", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
description = "This is Remote Python Execution Component."
) {
attribute(
- ComponentRemotePythonExecutor.ATTRIBUTE_PREPARE_ENV_LOG, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentRemotePythonExecutor.ATTRIBUTE_PREPARE_ENV_LOG, BluePrintConstants.DATA_TYPE_STRING,
false
)
attribute(
- ComponentRemotePythonExecutor.ATTRIBUTE_EXEC_CMD_LOG, BlueprintConstants.DATA_TYPE_LIST,
+ ComponentRemotePythonExecutor.ATTRIBUTE_EXEC_CMD_LOG, BluePrintConstants.DATA_TYPE_LIST,
false
) {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
attribute(
- ComponentRemotePythonExecutor.ATTRIBUTE_RESPONSE_DATA, BlueprintConstants.DATA_TYPE_JSON,
+ ComponentRemotePythonExecutor.ATTRIBUTE_RESPONSE_DATA, BluePrintConstants.DATA_TYPE_JSON,
false
)
operation("ComponentRemotePythonExecutor", "ComponentRemotePythonExecutor Operation") {
inputs {
property(
- ComponentRemotePythonExecutor.INPUT_ENDPOINT_SELECTOR, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentRemotePythonExecutor.INPUT_ENDPOINT_SELECTOR, BluePrintConstants.DATA_TYPE_STRING,
false, "Remote Container or Server selector name."
) {
defaultValue(ComponentRemotePythonExecutor.DEFAULT_SELECTOR)
}
property(
- ComponentRemotePythonExecutor.INPUT_DYNAMIC_PROPERTIES, BlueprintConstants.DATA_TYPE_JSON,
+ ComponentRemotePythonExecutor.INPUT_DYNAMIC_PROPERTIES, BluePrintConstants.DATA_TYPE_JSON,
false, "Dynamic Json Content or DSL Json reference."
)
property(
- ComponentRemotePythonExecutor.INPUT_ARGUMENT_PROPERTIES, BlueprintConstants.DATA_TYPE_JSON,
+ ComponentRemotePythonExecutor.INPUT_ARGUMENT_PROPERTIES, BluePrintConstants.DATA_TYPE_JSON,
false, "Argument Json Content or DSL Json reference."
)
property(
- ComponentRemotePythonExecutor.INPUT_COMMAND, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentRemotePythonExecutor.INPUT_COMMAND, BluePrintConstants.DATA_TYPE_STRING,
true, "Command to execute."
)
property(
- ComponentRemotePythonExecutor.INPUT_PACKAGES, BlueprintConstants.DATA_TYPE_LIST,
+ ComponentRemotePythonExecutor.INPUT_PACKAGES, BluePrintConstants.DATA_TYPE_LIST,
false, "Packages to install based on type."
) {
entrySchema("dt-system-packages")
@@ -88,26 +88,26 @@
}
}
-fun BlueprintTypes.dataTypeDtSystemPackages(): DataType {
+fun BluePrintTypes.dataTypeDtSystemPackages(): DataType {
return dataType(
- id = "dt-system-packages", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT,
+ id = "dt-system-packages", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT,
description = "This represent System Package Data Type"
) {
- property("type", BlueprintConstants.DATA_TYPE_LIST, true, "") {
+ property("type", BluePrintConstants.DATA_TYPE_LIST, true, "") {
constrain {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
validValues(arrayListOf("ansible_galaxy".asJsonPrimitive(), "pip".asJsonPrimitive()))
}
}
- property("package", BlueprintConstants.DATA_TYPE_LIST, true, "") {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ property("package", BluePrintConstants.DATA_TYPE_LIST, true, "") {
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
}
}
/** Component Builder */
-fun BlueprintTypes.nodeTemplateComponentRemotePythonExecutor(
+fun BluePrintTypes.nodeTemplateComponentRemotePythonExecutor(
id: String,
description: String,
block: ComponentRemotePythonExecutorNodeTemplateBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/JythonComponentFunction.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/JythonComponentFunction.kt
index 0ac542b..891b09d 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/JythonComponentFunction.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/JythonComponentFunction.kt
@@ -18,15 +18,15 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
open class JythonComponentFunction : AbstractScriptComponentFunction() {
override suspend fun processNB(executionRequest: ExecutionServiceInput) {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt
index 9faacd9..b0ce735 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceImpl.kt
@@ -20,11 +20,11 @@
import org.apache.commons.io.FilenameUtils
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.data.OperationAssignment
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -42,7 +42,7 @@
val log: Logger = LoggerFactory.getLogger(BlueprintJythonService::class.java)
inline fun <reified T> jythonInstance(
- blueprintContext: BlueprintContext,
+ blueprintContext: BluePrintContext,
pythonClassName: String,
content: String,
dependencyInstanceNames: MutableMap<String, Any>?
@@ -54,7 +54,7 @@
pythonPath.addAll(pythonExecutorProperty.modulePaths)
val blueprintPythonConfigurations =
- BlueprintPython(pythonExecutorProperty.executionPath, pythonPath, arrayListOf())
+ BluePrintPython(pythonExecutorProperty.executionPath, pythonPath, arrayListOf())
val blueprintPythonHost = BlueprintPythonHost(blueprintPythonConfigurations)
val pyObject = blueprintPythonHost.getPythonComponent(content, pythonClassName, dependencyInstanceNames)
@@ -64,7 +64,7 @@
return pyObject.__tojava__(T::class.java) as T
}
- override fun jythonComponentInstance(bluePrintContext: BlueprintContext, scriptClassReference: String):
+ override fun jythonComponentInstance(bluePrintContext: BluePrintContext, scriptClassReference: String):
BlueprintFunctionNode<*, *> {
val pythonFileName = bluePrintContext.rootPath
@@ -101,13 +101,13 @@
val blueprintBasePath: String = bluePrintContext.rootPath
val artifactName: String = operationAssignment.implementation?.primary
- ?: throw BlueprintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
+ ?: throw BluePrintProcessorException("missing primary field to get artifact name for node template ($nodeTemplateName)")
val artifactDefinition =
bluePrintRuntimeService.resolveNodeTemplateArtifactDefinition(nodeTemplateName, artifactName)
val pythonFileName = artifactDefinition.file
- ?: throw BlueprintProcessorException("missing file name for node template ($nodeTemplateName)'s artifactName($artifactName)")
+ ?: throw BluePrintProcessorException("missing file name for node template ($nodeTemplateName)'s artifactName($artifactName)")
val pythonClassName = FilenameUtils.getBaseName(pythonFileName)
log.info("Getting Jython Script Class($pythonClassName)")
@@ -125,7 +125,7 @@
val instanceDependenciesNode: ArrayNode =
operationInputs[PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES] as? ArrayNode
- ?: throw BlueprintProcessorException("Failed to get property(${PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES})")
+ ?: throw BluePrintProcessorException("Failed to get property(${PythonExecutorConstants.INPUT_INSTANCE_DEPENDENCIES})")
instanceDependenciesNode.forEach { instanceName ->
jythonInstances[instanceName.textValue()] = applicationContext.getBean(instanceName.textValue())
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHost.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHost.kt
index 0fe68cf..f8f0e7e 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHost.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHost.kt
@@ -16,13 +16,13 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceDomains
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.updateErrorMessage
import org.python.core.PyObject
import org.python.util.PythonInterpreter
@Deprecated("CDS won't support JythonService")
-open class BlueprintPythonHost(private val bluePrintPython: BlueprintPython) {
+open class BlueprintPythonHost(private val bluePrintPython: BluePrintPython) {
private val blueprintPythonInterpreterProxy: BlueprintPythonInterpreterProxy
@@ -45,14 +45,14 @@
bluePrintPython.moduleName = "Blueprint Python Script [Class Name = $interfaceName]"
try {
return blueprintPythonInterpreterProxy.getPythonInstance(properties)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
val errorMsg = "Failed to get python instance."
throw e.updateErrorMessage(
ExecutionServiceDomains.PYTHON_EXECUTOR, errorMsg,
"Error in environment properties"
)
} catch (e: Exception) {
- throw BlueprintProcessorException("Failed to execute Jython component $e", e)
+ throw BluePrintProcessorException("Failed to execute Jython component $e", e)
}
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonInterpreterProxy.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonInterpreterProxy.kt
index 9d98d90..0fb33f9 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonInterpreterProxy.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonInterpreterProxy.kt
@@ -15,13 +15,13 @@
*/
package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.python.core.PyObject
import org.python.core.PySyntaxError
import org.python.util.PythonInterpreter
@Deprecated("CDS won't support JythonService")
-open class BlueprintPythonInterpreterProxy(private val bluePrintPython: BlueprintPython) : PythonInterpreter() {
+open class BlueprintPythonInterpreterProxy(private val bluePrintPython: BluePrintPython) : PythonInterpreter() {
fun getPythonInstance(properties: MutableMap<String, Any>?): PyObject {
properties?.forEach { (name, value) ->
@@ -34,7 +34,7 @@
try {
this.exec(bluePrintPython.content)
} catch (e: PySyntaxError) {
- throw BlueprintProcessorException("Error executing Jython code! Python error: '$e'", e)
+ throw BluePrintProcessorException("Error executing Jython code! Python error: '$e'", e)
}
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/PythonExecutorConfiguration.kt b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/PythonExecutorConfiguration.kt
index 3484fdb..593c055 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/PythonExecutorConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/PythonExecutorConfiguration.kt
@@ -52,7 +52,7 @@
}
@Deprecated("CDS won't support JythonService")
-open class BlueprintPython(
+open class BluePrintPython(
executablePath: String,
blueprintPythonPlatform: MutableList<String>,
val argv: MutableList<String>
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt
index 089a339..d5fa0b2 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt
@@ -26,9 +26,9 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.mock.MockInstanceConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts.PythonExecutorConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts.PythonExecutorProperty
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -63,15 +63,15 @@
ExecutionServiceInput::class.java
)!!
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-jython")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentJythonExecutor")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-jython")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentJythonExecutor")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
componentJythonExecutor.bluePrintRuntimeService = bluePrintRuntimeService
val stepInputData = StepData().apply {
name = "activate-jython"
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt
index 0318664..46a3120 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt
@@ -17,21 +17,21 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import kotlin.test.assertNotNull
class ComponentRemotePythonExecutorDSLTest {
@Test
fun testNodeTypeComponentRemotePythonExecutor() {
- val nodeType = BlueprintTypes.nodeTypeComponentRemotePythonExecutor()
+ val nodeType = BluePrintTypes.nodeTypeComponentRemotePythonExecutor()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeComponentRemotePythonExecutor")
}
@Test
fun testNodeTemplateComponentRemotePythonExecutor() {
- val nodeTemplate = BlueprintTypes.nodeTemplateComponentRemotePythonExecutor(
+ val nodeTemplate = BluePrintTypes.nodeTemplateComponentRemotePythonExecutor(
"test-nodetemplate",
"test nodetemplate"
) {
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
index 2fd33f2..b81f05c 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
@@ -22,7 +22,7 @@
import io.mockk.mockk
import kotlinx.coroutines.runBlocking
import org.junit.Test
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.PrepareRemoteEnvInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteScriptExecutionInput
@@ -33,13 +33,13 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository.BlueprintModelRepository
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.RemoteScriptExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
@@ -53,7 +53,7 @@
val componentRemotePythonExecutor = ComponentRemotePythonExecutor(
remoteScriptExecutionService,
- mockk<BlueprintPropertiesService>(),
+ mockk<BluePrintPropertiesService>(),
mockk<BlueprintModelRepository>()
)
@@ -63,7 +63,7 @@
ExecutionServiceInput::class.java
)!!
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"123456-1000",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/remote_scripts"
)
@@ -75,9 +75,9 @@
)
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-python")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemotePythonExecutor")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-python")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemotePythonExecutor")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
componentRemotePythonExecutor.bluePrintRuntimeService = bluePrintRuntimeService
val stepInputData = StepData().apply {
name = "execute-remote-python"
@@ -98,12 +98,12 @@
val remoteScriptExecutionService = MockRemoteScriptExecutionService()
val componentRemotePythonExecutor = ComponentRemotePythonExecutor(
remoteScriptExecutionService,
- mockk<BlueprintPropertiesService>(),
+ mockk<BluePrintPropertiesService>(),
mockk<BlueprintModelRepository>()
)
- val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("123456-1000")
+ val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("123456-1000")
- every { bluePrintRuntime.getBlueprintError() } answers { BlueprintError() } // successful case.
+ every { bluePrintRuntime.getBluePrintError() } answers { BluePrintError() } // successful case.
every { bluePrintRuntime.setNodeTemplateAttributeValue(any(), any(), any()) } answers {}
val input = getMockedOutput(bluePrintRuntime)
@@ -115,20 +115,20 @@
/**
* Mocked input information for remote python executor.
*/
- fun getMockedOutput(svc: DefaultBlueprintRuntimeService):
+ fun getMockedOutput(svc: DefaultBluePrintRuntimeService):
ExecutionServiceInput {
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
stepMetaData.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
+ BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
"execute-remote-python"
)
stepMetaData.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_INTERFACE,
+ BluePrintConstants.PROPERTY_CURRENT_INTERFACE,
"ComponentRemotePythonExecutor"
)
stepMetaData.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process"
+ BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process"
)
val mapper = ObjectMapper()
@@ -138,15 +138,15 @@
val operationalInputs: MutableMap<String, JsonNode> = hashMapOf()
operationalInputs.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
+ BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
"execute-remote-python"
)
operationalInputs.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_INTERFACE,
+ BluePrintConstants.PROPERTY_CURRENT_INTERFACE,
"ComponentRemotePythonExecutor"
)
operationalInputs.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process"
+ BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process"
)
operationalInputs.putJsonElement("endpoint-selector", "aai")
operationalInputs.putJsonElement("dynamic-properties", rootNode)
@@ -179,7 +179,7 @@
"ComponentRemotePythonExecutor", "process"
)
} returns operationOutputs
- val bluePrintRuntimeService = BlueprintMetadataUtils.bluePrintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.bluePrintRuntime(
"123456-1000",
"./../../../../components/model-" +
"catalog/blueprint-model/test-blueprint/" +
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt
index ad87f3c..94ec141 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt
@@ -23,7 +23,7 @@
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -39,13 +39,13 @@
"blueprints.processor.functions.python.executor.executionPath=./../../../../components/scripts/python/ccsdk_blueprints"])
class BlueprintJythonServiceTest {
- lateinit var blueprintContext: BlueprintContext
+ lateinit var blueprintContext: BluePrintContext
@Autowired
private lateinit var blueprintJythonService: BlueprintJythonServiceImpl
@BeforeTest
fun init() {
- blueprintContext = mockk<BlueprintContext>()
+ blueprintContext = mockk<BluePrintContext>()
every { blueprintContext.rootPath } returns normalizedPathName("target")
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt
index 2ebd10c..0efaaa1 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt
@@ -26,7 +26,7 @@
import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
-@ContextConfiguration(classes = [BlueprintPython::class, PythonExecutorProperty::class, String::class])
+@ContextConfiguration(classes = [BluePrintPython::class, PythonExecutorProperty::class, String::class])
@TestPropertySource(
properties =
[
@@ -48,7 +48,7 @@
pythonPath.add(blueprintBasePath)
pythonPath.addAll(pythonExecutorProperty.modulePaths)
- blueprintPythonHost = BlueprintPythonHost(BlueprintPython(pythonExecutorProperty.executionPath, pythonPath, arrayListOf()))
+ blueprintPythonHost = BlueprintPythonHost(BluePrintPython(pythonExecutorProperty.executionPath, pythonPath, arrayListOf()))
}
@Test
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt
index 69db6cf..8087f7e 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceAssignmentRuntimeService.kt
@@ -1,12 +1,12 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
-class ResourceAssignmentRuntimeService(private var id: String, private var bluePrintContext: BlueprintContext) :
- DefaultBlueprintRuntimeService(id, bluePrintContext) {
+class ResourceAssignmentRuntimeService(private var id: String, private var bluePrintContext: BluePrintContext) :
+ DefaultBluePrintRuntimeService(id, bluePrintContext) {
private lateinit var resolutionId: String
private var resourceStore: MutableMap<String, JsonNode> = hashMapOf()
@@ -29,7 +29,7 @@
fun getResolutionStore(key: String): JsonNode {
return resourceStore[key]
- ?: throw BlueprintProcessorException("failed to get execution property ($key)")
+ ?: throw BluePrintProcessorException("failed to get execution property ($key)")
}
fun checkResolutionStore(key: String): Boolean {
@@ -62,7 +62,7 @@
fun getDictionaryStore(key: String): JsonNode {
return resourceStore["dictionary-$key"]
- ?: throw BlueprintProcessorException("failed to get execution property (dictionary-$key)")
+ ?: throw BluePrintProcessorException("failed to get execution property (dictionary-$key)")
}
fun checkDictionaryStore(key: String): Boolean {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSL.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSL.kt
index 66077c4..c755e89 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSL.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSL.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.PropertyDefinitionBuilder
@@ -24,12 +24,12 @@
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
/** Resource Definition DSL **/
-fun BlueprintTypes.resourceDefinitions(block: ResourceDefinitionsBuilder.() -> Unit):
+fun BluePrintTypes.resourceDefinitions(block: ResourceDefinitionsBuilder.() -> Unit):
MutableMap<String, ResourceDefinition> {
return ResourceDefinitionsBuilder().apply(block).build()
}
-fun BlueprintTypes.resourceDefinition(
+fun BluePrintTypes.resourceDefinition(
name: String,
description: String,
block: ResourceDefinitionBuilder.() -> Unit
@@ -38,12 +38,12 @@
}
/** Resource Mapping DSL **/
-fun BlueprintTypes.resourceAssignments(block: ResourceAssignmentsBuilder.() -> Unit):
+fun BluePrintTypes.resourceAssignments(block: ResourceAssignmentsBuilder.() -> Unit):
MutableMap<String, ResourceAssignment> {
return ResourceAssignmentsBuilder().apply(block).build()
}
-fun BlueprintTypes.resourceAssignment(
+fun BluePrintTypes.resourceAssignment(
name: String,
dictionaryName: String,
dictionarySource: String,
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt
index ada1a72..0435d1d 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt
@@ -22,7 +22,7 @@
import com.fasterxml.jackson.databind.node.ObjectNode
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asObjectNode
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
@@ -94,11 +94,11 @@
// validate inputs if we need to store the resource and template resolution.
if (storeResult) {
if (resolutionKey.isNotEmpty() && (resourceId.isNotEmpty() || resourceType.isNotEmpty())) {
- throw BlueprintProcessorException("Can't proceed with the resolution: either provide resolution-key OR combination of resource-id and resource-type.")
+ throw BluePrintProcessorException("Can't proceed with the resolution: either provide resolution-key OR combination of resource-id and resource-type.")
} else if ((resourceType.isNotEmpty() && resourceId.isEmpty()) || (resourceType.isEmpty() && resourceId.isNotEmpty())) {
- throw BlueprintProcessorException("Can't proceed with the resolution: both resource-id and resource-type should be provided, one of them is missing.")
+ throw BluePrintProcessorException("Can't proceed with the resolution: both resource-id and resource-type should be provided, one of them is missing.")
} else if (resourceType.isEmpty() && resourceId.isEmpty() && resolutionKey.isEmpty()) {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Can't proceed with the resolution: can't persist resolution without a correlation key. " +
"Either provide a resolution-key OR combination of resource-id and resource-type OR set `storeResult` to false."
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSL.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSL.kt
index c8b9e2c..774873a 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSL.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
@@ -33,94 +33,94 @@
/** Component Extensions **/
fun ServiceTemplateBuilder.nodeTypeComponentResourceResolution() {
- val nodeType = BlueprintTypes.nodeTypeComponentResourceResolution()
+ val nodeType = BluePrintTypes.nodeTypeComponentResourceResolution()
if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
this.nodeTypes!![nodeType.id!!] = nodeType
}
-fun BlueprintTypes.nodeTypeComponentResourceResolution(): NodeType {
+fun BluePrintTypes.nodeTypeComponentResourceResolution(): NodeType {
return nodeType(
- id = "component-resource-resolution", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
+ id = "component-resource-resolution", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
description = "Resource Assignment Component"
) {
attribute(
- ResourceResolutionComponent.ATTRIBUTE_ASSIGNMENT_PARAM, BlueprintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.ATTRIBUTE_ASSIGNMENT_PARAM, BluePrintConstants.DATA_TYPE_STRING,
true
)
attribute(
- ResourceResolutionComponent.ATTRIBUTE_STATUS, BlueprintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.ATTRIBUTE_STATUS, BluePrintConstants.DATA_TYPE_STRING,
true
)
operation("ResourceResolutionComponent", "ResourceResolutionComponent Operation") {
inputs {
property(
- ResourceResolutionComponent.INPUT_REQUEST_ID, BlueprintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.INPUT_REQUEST_ID, BluePrintConstants.DATA_TYPE_STRING,
true, "Request Id, Unique Id for the request."
)
property(
- ResourceResolutionComponent.INPUT_RESOURCE_ID, BlueprintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.INPUT_RESOURCE_ID, BluePrintConstants.DATA_TYPE_STRING,
false, "Resource Id."
)
property(
- ResourceResolutionComponent.INPUT_ACTION_NAME, BlueprintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.INPUT_ACTION_NAME, BluePrintConstants.DATA_TYPE_STRING,
false, "Action Name of the process"
)
property(
- ResourceResolutionComponent.INPUT_DYNAMIC_PROPERTIES, BlueprintConstants.DATA_TYPE_JSON,
+ ResourceResolutionComponent.INPUT_DYNAMIC_PROPERTIES, BluePrintConstants.DATA_TYPE_JSON,
false, "Dynamic Json Content or DSL Json reference."
)
property(
- ResourceResolutionComponent.INPUT_RESOLUTION_KEY, BlueprintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.INPUT_RESOLUTION_KEY, BluePrintConstants.DATA_TYPE_STRING,
false, "Key for service instance related correlation."
)
property(
- ResourceResolutionComponent.INPUT_RESOLUTION_SUMMARY, BlueprintConstants.DATA_TYPE_BOOLEAN,
+ ResourceResolutionComponent.INPUT_RESOLUTION_SUMMARY, BluePrintConstants.DATA_TYPE_BOOLEAN,
false, "Enables ResolutionSummary output"
)
property(
- ResourceResolutionComponent.INPUT_OCCURRENCE, BlueprintConstants.DATA_TYPE_INTEGER,
+ ResourceResolutionComponent.INPUT_OCCURRENCE, BluePrintConstants.DATA_TYPE_INTEGER,
false, "Number of time to perform the resolution."
) {
defaultValue(1)
}
property(
- ResourceResolutionComponent.INPUT_STORE_RESULT, BlueprintConstants.DATA_TYPE_BOOLEAN,
+ ResourceResolutionComponent.INPUT_STORE_RESULT, BluePrintConstants.DATA_TYPE_BOOLEAN,
false, "Whether or not to store the output."
)
property(
- ResourceResolutionComponent.INPUT_RESOURCE_TYPE, BlueprintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.INPUT_RESOURCE_TYPE, BluePrintConstants.DATA_TYPE_STRING,
false, "Request type."
)
property(
- ResourceResolutionComponent.INPUT_ARTIFACT_PREFIX_NAMES, BlueprintConstants.DATA_TYPE_LIST,
+ ResourceResolutionComponent.INPUT_ARTIFACT_PREFIX_NAMES, BluePrintConstants.DATA_TYPE_LIST,
true, "Template , Resource Assignment Artifact Prefix names"
) {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
}
outputs {
property(
- ResourceResolutionComponent.OUTPUT_RESOURCE_ASSIGNMENT_PARAMS, BlueprintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.OUTPUT_RESOURCE_ASSIGNMENT_PARAMS, BluePrintConstants.DATA_TYPE_STRING,
true, "Output Response"
)
property(
- ResourceResolutionComponent.OUTPUT_RESOURCE_ASSIGNMENT_MAP, BlueprintConstants.DATA_TYPE_MAP,
+ ResourceResolutionComponent.OUTPUT_RESOURCE_ASSIGNMENT_MAP, BluePrintConstants.DATA_TYPE_MAP,
true, "Output Resolved Values"
)
property(
- ResourceResolutionComponent.OUTPUT_STATUS, BlueprintConstants.DATA_TYPE_STRING,
+ ResourceResolutionComponent.OUTPUT_STATUS, BluePrintConstants.DATA_TYPE_STRING,
true, "Status of the Component Execution ( success or failure )"
)
}
@@ -134,7 +134,7 @@
description: String,
block: ComponentResourceResolutionNodeTemplateBuilder.() -> Unit
) {
- val nodeTemplate = BlueprintTypes.nodeTemplateComponentResourceResolution(
+ val nodeTemplate = BluePrintTypes.nodeTemplateComponentResourceResolution(
id, description,
block
)
@@ -142,7 +142,7 @@
nodeTemplates!![nodeTemplate.id!!] = nodeTemplate
}
-fun BlueprintTypes.nodeTemplateComponentResourceResolution(
+fun BluePrintTypes.nodeTemplateComponentResourceResolution(
id: String,
description: String,
block: ComponentResourceResolutionNodeTemplateBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt
index a3cc1ef..4774ad5 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionExtensions.kt
@@ -20,22 +20,22 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.ResourceResolution
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.ResourceResolutionDBService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
/**
* Register the Resolution module exposed dependency
*/
-fun BlueprintDependencyService.resourceResolutionService(): ResourceResolutionService =
+fun BluePrintDependencyService.resourceResolutionService(): ResourceResolutionService =
instance(ResourceResolutionConstants.SERVICE_RESOURCE_RESOLUTION)
-fun BlueprintDependencyService.resourceResolutionDBService(): ResourceResolutionDBService =
+fun BluePrintDependencyService.resourceResolutionDBService(): ResourceResolutionDBService =
instance(ResourceResolutionDBService::class.java)
suspend fun AbstractComponentFunction.storedContentFromResolvedArtifactNB(
resolutionKey: String,
artifactName: String
): String {
- return BlueprintDependencyService.resourceResolutionService()
+ return BluePrintDependencyService.resourceResolutionService()
.resolveFromDatabase(bluePrintRuntimeService, artifactName, resolutionKey)
}
@@ -44,7 +44,7 @@
artifactName: String,
occurrence: Int = 1
): List<ResourceResolution> {
- return BlueprintDependencyService.resourceResolutionDBService()
+ return BluePrintDependencyService.resourceResolutionDBService()
.findByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKeyAndOccurrence(
bluePrintRuntimeService,
resolutionKey,
@@ -57,7 +57,7 @@
* Return resolved and mashed artifact content for artifact prefix [artifactPrefix]
*/
suspend fun AbstractComponentFunction.contentFromResolvedArtifactNB(artifactPrefix: String): String {
- return BlueprintDependencyService.resourceResolutionService()
+ return BluePrintDependencyService.resourceResolutionService()
.resolveResources(bluePrintRuntimeService, nodeTemplateName, artifactPrefix, mapOf())
.first
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
index ea420dc..6b4260a 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
@@ -27,15 +27,15 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceDefinitionUtils.createResourceAssignments
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.common.ApplicationConstants.LOG_REDACTED
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintTemplateService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.PropertyDefinitionUtils.Companion.hasLogProtect
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -56,13 +56,13 @@
fun registeredResourceSources(): List<String>
suspend fun resolveFromDatabase(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
artifactTemplate: String,
resolutionKey: String
): String
suspend fun resolveResources(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
nodeTemplateName: String,
artifactNames: List<String>,
properties: Map<String, Any>,
@@ -70,7 +70,7 @@
): ResourceResolutionResult
suspend fun resolveResources(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
nodeTemplateName: String,
artifactPrefix: String,
properties: Map<String, Any>
@@ -80,7 +80,7 @@
* with other [resourceDefinitions] dependencies for the sources [sources]
* Used to get the same resource values from multiple sources. **/
suspend fun resolveResourceDefinition(
- blueprintRuntimeService: BlueprintRuntimeService<*>,
+ blueprintRuntimeService: BluePrintRuntimeService<*>,
resourceDefinitions: MutableMap<String, ResourceDefinition>,
resolveDefinition: String,
sources: List<String>
@@ -88,7 +88,7 @@
MutableMap<String, JsonNode>
suspend fun resolveResourceAssignments(
- blueprintRuntimeService: BlueprintRuntimeService<*>,
+ blueprintRuntimeService: BluePrintRuntimeService<*>,
resourceDefinitions: MutableMap<String, ResourceDefinition>,
resourceAssignments: MutableList<ResourceAssignment>,
artifactPrefix: String,
@@ -100,7 +100,7 @@
open class ResourceResolutionServiceImpl(
private var applicationContext: ApplicationContext,
private var templateResolutionDBService: TemplateResolutionService,
- private var blueprintTemplateService: BlueprintTemplateService,
+ private var blueprintTemplateService: BluePrintTemplateService,
private var resourceResolutionDBService: ResourceResolutionDBService
) :
ResourceResolutionService {
@@ -114,7 +114,7 @@
}
override suspend fun resolveFromDatabase(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
artifactTemplate: String,
resolutionKey: String
): String {
@@ -126,7 +126,7 @@
}
override suspend fun resolveResources(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
nodeTemplateName: String,
artifactNames: List<String>,
properties: Map<String, Any>,
@@ -153,16 +153,16 @@
val failedResolution = resourceAssignmentList.filter { it.status != "success" && it.property?.required == true }.map { it.name }
if (failedResolution.isNotEmpty()) {
val errorMessages = mutableListOf("Failed to resolve required values: $failedResolution").apply {
- this.addAll(resourceAssignmentRuntimeService.getBlueprintError().allErrors())
+ this.addAll(resourceAssignmentRuntimeService.getBluePrintError().allErrors())
}
- bluePrintRuntimeService.getBlueprintError().addErrors(stepName, errorMessages)
+ bluePrintRuntimeService.getBluePrintError().addErrors(stepName, errorMessages)
}
}
return ResourceResolutionResult(templateMap, assignmentMap)
}
override suspend fun resolveResources(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
nodeTemplateName: String,
artifactPrefix: String,
properties: Map<String, Any>
@@ -181,7 +181,7 @@
val resourceAssignments: MutableList<ResourceAssignment> =
JacksonUtils.getListFromJson(resourceAssignmentContent, ResourceAssignment::class.java)
as? MutableList<ResourceAssignment>
- ?: throw BlueprintProcessorException("couldn't get Dictionary Definitions")
+ ?: throw BluePrintProcessorException("couldn't get Dictionary Definitions")
if (isToStore(properties)) {
val existingResourceResolution = isNewResolution(bluePrintRuntimeService, properties, artifactPrefix)
@@ -245,7 +245,7 @@
}
override suspend fun resolveResourceDefinition(
- blueprintRuntimeService: BlueprintRuntimeService<*>,
+ blueprintRuntimeService: BluePrintRuntimeService<*>,
resourceDefinitions: MutableMap<String, ResourceDefinition>,
resolveDefinition: String,
sources: List<String>
@@ -269,7 +269,7 @@
* request.
*/
override suspend fun resolveResourceAssignments(
- blueprintRuntimeService: BlueprintRuntimeService<*>,
+ blueprintRuntimeService: BluePrintRuntimeService<*>,
resourceDefinitions: MutableMap<String, ResourceDefinition>,
resourceAssignments: MutableList<ResourceAssignment>,
artifactPrefix: String,
@@ -292,7 +292,7 @@
// Execute Non Dependent Assignments in parallel ( ie asynchronously )
val deferred = batchResourceAssignments
.filter { it.name != "*" && it.name != "start" }
- .filter { it.status != BlueprintConstants.STATUS_SUCCESS }
+ .filter { it.status != BluePrintConstants.STATUS_SUCCESS }
.map { resourceAssignment ->
async {
val dictionaryName = resourceAssignment.dictionaryName
@@ -302,12 +302,12 @@
val resourceAssignmentProcessor =
applicationContext.getBean(processorName) as? ResourceAssignmentProcessor
- ?: throw BlueprintProcessorException(
+ ?: throw BluePrintProcessorException(
"failed to get resource processor ($processorName) " +
"for resource assignment(${resourceAssignment.name})"
)
try {
- // Set Blueprint Runtime Service
+ // Set BluePrint Runtime Service
resourceAssignmentProcessor.raRuntimeService = resourceAssignmentRuntimeService
// Set Resource Dictionaries
resourceAssignmentProcessor.resourceDictionaries = resourceDefinitions
@@ -328,10 +328,10 @@
}
// Set errors from RA
- blueprintRuntimeService.setBlueprintError(resourceAssignmentRuntimeService.getBlueprintError())
+ blueprintRuntimeService.setBluePrintError(resourceAssignmentRuntimeService.getBluePrintError())
} catch (e: RuntimeException) {
log.error("Fail in processing ${resourceAssignment.name}", e)
- throw BlueprintProcessorException(e)
+ throw BluePrintProcessorException(e)
}
}
}
@@ -359,10 +359,10 @@
}
else -> {
val resourceDefinition = resourceDefinitions[dictionaryName]
- ?: throw BlueprintProcessorException("couldn't get resource dictionary definition for $dictionaryName")
+ ?: throw BluePrintProcessorException("couldn't get resource dictionary definition for $dictionaryName")
val resourceSource = resourceDefinition.sources[dictionarySource]
- ?: throw BlueprintProcessorException("couldn't get resource definition $dictionaryName source($dictionarySource)")
+ ?: throw BluePrintProcessorException("couldn't get resource definition $dictionaryName source($dictionarySource)")
ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR.plus(resourceSource.type)
}
@@ -382,7 +382,7 @@
// Check whether resolution already exist in the database for the specified resolution-key or resourceId/resourceType
private suspend fun isNewResolution(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
properties: Map<String, Any>,
artifactPrefix: String
): List<ResourceResolution> {
@@ -434,7 +434,7 @@
resourceAssignmentList: MutableList<ResourceAssignment>
) {
resourceResolutionList.forEach { resourceResolution ->
- if (resourceResolution.status == BlueprintConstants.STATUS_SUCCESS) {
+ if (resourceResolution.status == BluePrintConstants.STATUS_SUCCESS) {
resourceAssignmentList.forEach {
if (compareOne(resourceResolution, it)) {
log.info(
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSL.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSL.kt
index a681b4f..62ec2bd 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSL.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSL.kt
@@ -18,8 +18,8 @@
import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
@@ -30,30 +30,30 @@
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.nodeType
import kotlin.reflect.KClass
-fun BlueprintTypes.nodeTypeSourceInput(): NodeType {
+fun BluePrintTypes.nodeTypeSourceInput(): NodeType {
return nodeType(
- id = "source-input", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ id = "source-input", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
description = "This is Input Resource Source Node Type"
) {}
}
-fun BlueprintTypes.nodeTypeSourceDefault(): NodeType {
+fun BluePrintTypes.nodeTypeSourceDefault(): NodeType {
return nodeType(
- id = "source-default", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ id = "source-default", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
description = "This is Default Resource Source Node Type"
) {}
}
-fun BlueprintTypes.nodeTypeSourceDb(): NodeType {
+fun BluePrintTypes.nodeTypeSourceDb(): NodeType {
return nodeType(
- id = "source-db", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ id = "source-db", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
description = "This is Database Resource Source Node Type"
) {
property(
- "type", BlueprintConstants.DATA_TYPE_STRING,
+ "type", BluePrintConstants.DATA_TYPE_STRING,
true, ""
) {
defaultValue("SQL".asJsonPrimitive())
@@ -62,42 +62,42 @@
}
}
property(
- "endpoint-selector", BlueprintConstants.DATA_TYPE_STRING,
+ "endpoint-selector", BluePrintConstants.DATA_TYPE_STRING,
false, ""
)
property(
- "query", BlueprintConstants.DATA_TYPE_STRING,
+ "query", BluePrintConstants.DATA_TYPE_STRING,
true, ""
)
property(
- "input-key-mapping", BlueprintConstants.DATA_TYPE_MAP,
+ "input-key-mapping", BluePrintConstants.DATA_TYPE_MAP,
true, ""
) {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
property(
- "output-key-mapping", BlueprintConstants.DATA_TYPE_MAP,
+ "output-key-mapping", BluePrintConstants.DATA_TYPE_MAP,
false, ""
) {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
property(
- "key-dependencies", BlueprintConstants.DATA_TYPE_LIST,
+ "key-dependencies", BluePrintConstants.DATA_TYPE_LIST,
true, "Resource Resolution dependency dictionary names."
) {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
}
}
-fun BlueprintTypes.nodeTypeSourceRest(): NodeType {
+fun BluePrintTypes.nodeTypeSourceRest(): NodeType {
return nodeType(
- id = "source-rest", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ id = "source-rest", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
description = "This is Rest Resource Source Node Type"
) {
property(
- "type", BlueprintConstants.DATA_TYPE_STRING,
+ "type", BluePrintConstants.DATA_TYPE_STRING,
true, ""
) {
defaultValue("JSON".asJsonPrimitive())
@@ -106,7 +106,7 @@
}
}
property(
- "verb", BlueprintConstants.DATA_TYPE_STRING,
+ "verb", BluePrintConstants.DATA_TYPE_STRING,
true, ""
) {
defaultValue("GET".asJsonPrimitive())
@@ -120,25 +120,25 @@
}
}
property(
- "payload", BlueprintConstants.DATA_TYPE_STRING,
+ "payload", BluePrintConstants.DATA_TYPE_STRING,
false, ""
) {
defaultValue("".asJsonPrimitive())
}
property(
- "endpoint-selector", BlueprintConstants.DATA_TYPE_STRING,
+ "endpoint-selector", BluePrintConstants.DATA_TYPE_STRING,
false, ""
)
property(
- "url-path", BlueprintConstants.DATA_TYPE_STRING,
+ "url-path", BluePrintConstants.DATA_TYPE_STRING,
true, ""
)
property(
- "path", BlueprintConstants.DATA_TYPE_STRING,
+ "path", BluePrintConstants.DATA_TYPE_STRING,
true, ""
)
property(
- "expression-type", BlueprintConstants.DATA_TYPE_STRING,
+ "expression-type", BluePrintConstants.DATA_TYPE_STRING,
false, ""
) {
defaultValue("JSON_PATH".asJsonPrimitive())
@@ -147,62 +147,62 @@
}
}
property(
- "input-key-mapping", BlueprintConstants.DATA_TYPE_MAP,
+ "input-key-mapping", BluePrintConstants.DATA_TYPE_MAP,
true, ""
) {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
property(
- "output-key-mapping", BlueprintConstants.DATA_TYPE_MAP,
+ "output-key-mapping", BluePrintConstants.DATA_TYPE_MAP,
false, ""
) {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
property(
- "key-dependencies", BlueprintConstants.DATA_TYPE_LIST,
+ "key-dependencies", BluePrintConstants.DATA_TYPE_LIST,
true, "Resource Resolution dependency dictionary names."
) {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
}
}
-fun BlueprintTypes.nodeTypeSourceCapability(): NodeType {
+fun BluePrintTypes.nodeTypeSourceCapability(): NodeType {
return nodeType(
- id = "source-capability", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ id = "source-capability", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
description = "This is Component Resource Source Node Type"
) {
property(
- ComponentScriptExecutor.INPUT_SCRIPT_TYPE, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentScriptExecutor.INPUT_SCRIPT_TYPE, BluePrintConstants.DATA_TYPE_STRING,
true, "Request Id, Unique Id for the request."
) {
- defaultValue(BlueprintConstants.SCRIPT_KOTLIN)
+ defaultValue(BluePrintConstants.SCRIPT_KOTLIN)
constrain {
validValues(
arrayListOf(
- BlueprintConstants.SCRIPT_KOTLIN.asJsonPrimitive(),
- BlueprintConstants.SCRIPT_INTERNAL.asJsonPrimitive(),
- BlueprintConstants.SCRIPT_JYTHON.asJsonPrimitive()
+ BluePrintConstants.SCRIPT_KOTLIN.asJsonPrimitive(),
+ BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive(),
+ BluePrintConstants.SCRIPT_JYTHON.asJsonPrimitive()
)
)
}
}
property(
- ComponentScriptExecutor.INPUT_SCRIPT_CLASS_REFERENCE, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentScriptExecutor.INPUT_SCRIPT_CLASS_REFERENCE, BluePrintConstants.DATA_TYPE_STRING,
true, "Kotlin Script class name or jython script name."
)
property(
- "key-dependencies", BlueprintConstants.DATA_TYPE_LIST,
+ "key-dependencies", BluePrintConstants.DATA_TYPE_LIST,
true, "Resource Resolution dependency dictionary names."
) {
- entrySchema(BlueprintConstants.DATA_TYPE_STRING)
+ entrySchema(BluePrintConstants.DATA_TYPE_STRING)
}
}
}
/** Node Template Source Input **/
-fun BlueprintTypes.nodeTemplateSourceInput(
+fun BluePrintTypes.nodeTemplateSourceInput(
id: String,
description: String,
block: SourceInputNodeTemplateBuilder.() -> Unit
@@ -217,7 +217,7 @@
)
/** Node Template Source Default **/
-fun BlueprintTypes.nodeTemplateSourceDefault(
+fun BluePrintTypes.nodeTemplateSourceDefault(
id: String,
description: String,
block: SourceDefaultNodeTemplateBuilder.() -> Unit
@@ -232,7 +232,7 @@
)
/** Node Template Source DB **/
-fun BlueprintTypes.nodeTemplateSourceDb(
+fun BluePrintTypes.nodeTemplateSourceDb(
id: String,
description: String,
block: SourceDbNodeTemplateBuilder.() -> Unit
@@ -299,7 +299,7 @@
}
/** Node Template Source Rest **/
-fun BlueprintTypes.nodeTemplateSourceRest(
+fun BluePrintTypes.nodeTemplateSourceRest(
id: String,
description: String,
block: SourceRestNodeTemplateBuilder.() -> Unit
@@ -378,7 +378,7 @@
}
/** Node Template Source Rest **/
-fun BlueprintTypes.nodeTemplateSourceCapability(
+fun BluePrintTypes.nodeTemplateSourceCapability(
id: String,
description: String,
block: SourceCapabilityNodeTemplateBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapability.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapability.kt
index a1f3249..71cf6ce 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapability.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapability.kt
@@ -20,10 +20,10 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.rest.restClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.KeyIdentifier
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -51,7 +51,7 @@
/** Check Resource Assignment has the source definitions, If not get from Resource Definitions **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
val resourceSourceProperties =
checkNotNull(resourceSource.properties) { "failed to get source properties for $dName " }
@@ -81,7 +81,7 @@
resourceSourceProperties["resolved-payload"] = JacksonUtils.jsonNode(generatedPayload)
// Get the Rest Client service, selector will be included in application.properties
- val restClientService = BlueprintDependencyService.restClientService(
+ val restClientService = BluePrintDependencyService.restClientService(
"ipassign-ms"
)
@@ -100,7 +100,7 @@
"Failed to dictionary name ($dName), dictionary source($($dName) " +
"response_code: ($responseStatusCode)"
log.warn(errMsg)
- throw BlueprintProcessorException(errMsg)
+ throw BluePrintProcessorException(errMsg)
}
// Parse the error Body and assign the property value
}
@@ -108,7 +108,7 @@
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Failed in template key ($resourceAssignment) assignments with: ${e.message}",
e
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapability.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapability.kt
index 4f656a8..139d823 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapability.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapability.kt
@@ -20,10 +20,10 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.rest.restClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.KeyIdentifier
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -51,7 +51,7 @@
/** Check Resource Assignment has the source definitions, If not get from Resource Definitions **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
val resourceSourceProperties =
checkNotNull(resourceSource.properties) { "failed to get source properties for $dName " }
@@ -82,7 +82,7 @@
resourceSourceProperties["resolved-payload"] = JacksonUtils.jsonNode(generatedPayload)
// Get the Rest Client service, selector will be included in application.properties
- val restClientService = BlueprintDependencyService.restClientService(
+ val restClientService = BluePrintDependencyService.restClientService(
"naming-ms"
)
@@ -102,7 +102,7 @@
"Failed to dictionary name ($dName), dictionary source($($dName) " +
"response_code: ($responseStatusCode)"
log.warn(errMsg)
- throw BlueprintProcessorException(errMsg)
+ throw BluePrintProcessorException(errMsg)
}
// Parse the error Body and assign the property value
}
@@ -110,7 +110,7 @@
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Failed in template key ($resourceAssignment) assignments with: ${e.message}",
e
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt
index 592408b..5958c78 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBService.kt
@@ -18,9 +18,9 @@
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
@@ -34,7 +34,7 @@
private val log = LoggerFactory.getLogger(ResourceResolutionDBService::class.toString())
suspend fun findByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKeyAndOccurrence(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
key: String,
occurrence: Int,
artifactPrefix: String
@@ -42,8 +42,8 @@
return try {
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- val blueprintVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]!!
- val blueprintName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]!!
+ val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]!!
+ val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]!!
resourceResolutionRepository.findByBlueprintNameAndBlueprintVersionAndArtifactNameAndResolutionKeyAndOccurrence(
blueprintName,
@@ -58,7 +58,7 @@
}
suspend fun findByBlueprintNameAndBlueprintVersionAndArtifactNameAndResourceIdAndResourceTypeAndOccurrence(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
resourceId: String,
resourceType: String,
occurrence: Int,
@@ -68,8 +68,8 @@
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- val blueprintVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]!!
- val blueprintName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]!!
+ val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]!!
+ val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]!!
resourceResolutionRepository.findByBlueprintNameAndBlueprintVersionAndArtifactNameAndResourceIdAndResourceTypeAndOccurrence(
blueprintName,
@@ -134,15 +134,15 @@
suspend fun write(
properties: Map<String, Any>,
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
artifactPrefix: String,
resourceAssignment: ResourceAssignment
): ResourceResolution = withContext(Dispatchers.IO) {
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- val blueprintVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]!!
- val blueprintName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]!!
+ val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]!!
+ val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]!!
val resolutionKey = properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOLUTION_KEY] as String
val resourceId = properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOURCE_ID] as String
@@ -182,7 +182,7 @@
resourceResolution.resourceType = resourceType
resourceResolution.resourceId = resourceId
resourceResolution.value = resourceAssignment.property?.value?.let {
- if (BlueprintConstants.STATUS_SUCCESS == resourceAssignment.status)
+ if (BluePrintConstants.STATUS_SUCCESS == resourceAssignment.status)
JacksonUtils.getValue(it).toString()
else ""
} ?: ""
@@ -190,12 +190,12 @@
resourceResolution.dictionaryName = resourceAssignment.dictionaryName
resourceResolution.dictionaryVersion = resourceAssignment.version
resourceResolution.dictionarySource = resourceAssignment.dictionarySource
- resourceResolution.status = resourceAssignment.status ?: BlueprintConstants.STATUS_FAILURE
+ resourceResolution.status = resourceAssignment.status ?: BluePrintConstants.STATUS_FAILURE
try {
resourceResolutionRepository.saveAndFlush(resourceResolution)
} catch (ex: Exception) {
- throw BlueprintException("Failed to store resource resolution result.", ex)
+ throw BluePrintException("Failed to store resource resolution result.", ex)
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt
index cbd8b83..4bdd5d9 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionService.kt
@@ -18,9 +18,9 @@
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.dao.DataIntegrityViolationException
import org.springframework.dao.EmptyResultDataAccessException
@@ -33,7 +33,7 @@
private val log = LoggerFactory.getLogger(TemplateResolutionService::class.toString())
suspend fun findByResolutionKeyAndBlueprintNameAndBlueprintVersionAndArtifactName(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
artifactPrefix: String,
resolutionKey: String
): String =
@@ -41,8 +41,8 @@
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- val blueprintVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]!!
- val blueprintName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]!!
+ val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]!!
+ val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]!!
findByResolutionKeyAndBlueprintNameAndBlueprintVersionAndArtifactName(
blueprintName,
@@ -93,14 +93,14 @@
suspend fun write(
properties: Map<String, Any>,
result: String,
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
artifactPrefix: String
): TemplateResolution = withContext(Dispatchers.IO) {
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- val blueprintVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]!!
- val blueprintName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]!!
+ val blueprintVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]!!
+ val blueprintName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]!!
val resolutionKey = properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOLUTION_KEY] as String
val resourceId = properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOURCE_ID] as String
val resourceType = properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOURCE_TYPE] as String
@@ -187,7 +187,7 @@
" (resourceId: $resourceId resourceType: $resourceType) occurrence:$occurrence error: {}",
ex.message
)
- throw BlueprintException("Failed to store resource api result.", ex)
+ throw BluePrintException("Failed to store resource api result.", ex)
}
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
index 5e834d7..9f318a3 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
@@ -22,7 +22,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
@@ -53,7 +53,7 @@
/** Check Resource Assignment has the source definitions, If not get from Resource Definition **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
val resourceSourceProps =
checkNotNull(resourceSource.properties) { "failed to get $resourceSource properties" }
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt
index db5307f..c8bef52 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceAssignmentProcessor.kt
@@ -17,14 +17,14 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDBLibGenericService
-import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BlueprintDBLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.DatabaseResourceSource
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceDomains
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.isNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.nullToEmpty
@@ -47,7 +47,7 @@
@Service("${PREFIX_RESOURCE_RESOLUTION_PROCESSOR}source-db")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
open class DatabaseResourceAssignmentProcessor(
- private val bluePrintDBLibPropertyService: BlueprintDBLibPropertyService,
+ private val bluePrintDBLibPropertyService: BluePrintDBLibPropertyService,
private val primaryDBLibGenericService: PrimaryDBLibGenericService
) : ResourceAssignmentProcessor() {
@@ -66,7 +66,7 @@
}
// Check the value has populated for mandatory case
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
val errorMsg = "Failed to process Database resource resolution in template key ($resourceAssignment) assignments."
throw e.updateErrorMessage(
ExecutionServiceDomains.RESOURCE_RESOLUTION, errorMsg,
@@ -74,7 +74,7 @@
)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BlueprintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
+ throw BluePrintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
}
}
@@ -86,7 +86,7 @@
/** Check Resource Assignment has the source definitions, If not get from Resource Definition **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
val resourceSourceProperties = checkNotNull(resourceSource.properties) {
"failed to get source properties for $dName "
}
@@ -119,7 +119,7 @@
}
}
- private fun blueprintDBLibService(sourceProperties: DatabaseResourceSource, selector: String): BlueprintDBLibGenericService {
+ private fun blueprintDBLibService(sourceProperties: DatabaseResourceSource, selector: String): BluePrintDBLibGenericService {
return if (isNotEmpty(sourceProperties.endpointSelector)) {
val dbPropertiesJson = raRuntimeService.resolveDSLExpression(sourceProperties.endpointSelector!!)
bluePrintDBLibPropertyService.JdbcTemplate(dbPropertiesJson)
@@ -128,7 +128,7 @@
}
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
private fun validate(resourceAssignment: ResourceAssignment) {
checkNotEmpty(resourceAssignment.name) { "resource assignment template key is not defined" }
checkNotEmpty(resourceAssignment.dictionaryName) {
@@ -156,7 +156,7 @@
return namedParameters
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
private fun populateResource(
resourceAssignment: ResourceAssignment,
sourceProperties: DatabaseResourceSource,
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessor.kt
index e904ebc..9e5bd08 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessor.kt
@@ -20,7 +20,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceDomains
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.updateErrorMessage
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
@@ -51,7 +51,7 @@
}
// Check the value has populated for mandatory case
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
val errorMsg = "Failed to process default resource resolution in template key ($resourceAssignment) assignments."
throw e.updateErrorMessage(
ExecutionServiceDomains.RESOURCE_RESOLUTION, errorMsg,
@@ -59,7 +59,7 @@
)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BlueprintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
+ throw BluePrintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessor.kt
index c3add86..caf6b6a 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessor.kt
@@ -20,7 +20,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.DatabaseResourceSource
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.isNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -52,13 +52,13 @@
}
// Check the value has populated for mandatory case
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
val errorMsg = "Failed to process input resource resolution in template key ($resourceAssignment) assignments."
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
logger.error(errorMsg)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BlueprintProcessorException("Failed in template key ($resourceAssignment) assignments with : (${e.message})", e)
+ throw BluePrintProcessorException("Failed in template key ($resourceAssignment) assignments with : (${e.message})", e)
}
}
@@ -71,7 +71,7 @@
/** Check Resource Assignment has the source definitions, If not get from Resource Definition **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
try {
val resourceSourceProperties = checkNotNull(resourceSource.properties) {
@@ -86,7 +86,7 @@
// keyDependency = service-instance.service-instance-id
setFromInputKeyDependencies(keyDependency, resourceAssignment); // New API which picks attribute from Input
} catch (e: IllegalStateException) {
- throw BlueprintProcessorException(e)
+ throw BluePrintProcessorException(e)
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
index ce00ac1..c075e1b 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
@@ -22,13 +22,13 @@
import org.apache.commons.collections.MapUtils
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
import org.onap.ccsdk.cds.controllerblueprints.core.isNullOrMissing
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintVelocityTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintVelocityTemplateService
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.slf4j.LoggerFactory
@@ -50,7 +50,7 @@
*/
open fun <T> scriptPropertyInstanceType(name: String): T {
return scriptPropertyInstances as? T
- ?: throw BlueprintProcessorException("couldn't get script property instance ($name)")
+ ?: throw BluePrintProcessorException("couldn't get script property instance ($name)")
}
open fun setFromInput(resourceAssignment: ResourceAssignment): Boolean {
@@ -64,7 +64,7 @@
ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, value)
return true
}
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
// NoOp - couldn't find value from input
}
return false
@@ -83,7 +83,7 @@
return true
}
}
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
// NoOp - couldn't find value from input
}
return false
@@ -110,7 +110,7 @@
return valueToResolve
}
// TODO("Optimize to JSON Node directly without velocity").asJsonNode().toString()
- return BlueprintVelocityTemplateService.generateContent(valueToResolve, keyMapping.asJsonNode().toString())
+ return BluePrintVelocityTemplateService.generateContent(valueToResolve, keyMapping.asJsonNode().toString())
}
final override suspend fun applyNB(resourceAssignment: ResourceAssignment): Boolean {
@@ -126,7 +126,7 @@
suspend fun executeScript(resourceAssignment: ResourceAssignment) {
return when (scriptType) {
- BlueprintConstants.SCRIPT_JYTHON -> {
+ BluePrintConstants.SCRIPT_JYTHON -> {
executeScriptBlocking(resourceAssignment)
}
else -> {
@@ -163,39 +163,39 @@
*/
final override fun apply(resourceAssignment: ResourceAssignment): Boolean {
- throw BlueprintException("Not Implemented, use applyNB method")
+ throw BluePrintException("Not Implemented, use applyNB method")
}
final override fun prepareRequest(resourceAssignment: ResourceAssignment): ResourceAssignment {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
final override fun prepareResponse(): Boolean {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
final override suspend fun prepareRequestNB(resourceAssignment: ResourceAssignment): ResourceAssignment {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
final override suspend fun prepareResponseNB(): Boolean {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
override fun process(resourceAssignment: ResourceAssignment) {
- throw BlueprintException("Not Implemented, child class will implement this")
+ throw BluePrintException("Not Implemented, child class will implement this")
}
override fun recover(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
- throw BlueprintException("Not Implemented, child class will implement this")
+ throw BluePrintException("Not Implemented, child class will implement this")
}
fun addError(type: String, name: String, error: String) {
- raRuntimeService.getBlueprintError().addError(type, name, error, getName())
+ raRuntimeService.getBluePrintError().addError(type, name, error, getName())
}
fun addError(error: String) {
- raRuntimeService.getBlueprintError().addError(error, getName())
+ raRuntimeService.getBluePrintError().addError(error, getName())
}
fun isTemplateKeyValueNull(resourceAssignment: ResourceAssignment): Boolean {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt
index c17e140..b81455c 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessor.kt
@@ -20,11 +20,11 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.RestResourceSource
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ExecutionServiceDomains
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.isNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.nullToEmpty
@@ -44,7 +44,7 @@
*/
@Service("${PREFIX_RESOURCE_RESOLUTION_PROCESSOR}source-rest")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyService: BlueprintRestLibPropertyService) :
+open class RestResourceResolutionProcessor(private val blueprintRestLibPropertyService: BluePrintRestLibPropertyService) :
ResourceAssignmentProcessor() {
private val logger = LoggerFactory.getLogger(RestResourceResolutionProcessor::class.java)
@@ -66,7 +66,7 @@
/** Check Resource Assignment has the source definitions, If not get from Resource Definitions **/
val resourceSource = resourceAssignment.dictionarySourceDefinition
?: resourceDefinition?.sources?.get(dSource)
- ?: throw BlueprintProcessorException("couldn't get resource definition $dName source($dSource)")
+ ?: throw BluePrintProcessorException("couldn't get resource definition $dName source($dSource)")
val resourceSourceProperties =
checkNotNull(resourceSource.properties) { "failed to get source properties for $dName " }
@@ -104,7 +104,7 @@
val responseBody = response.body
val outputKeyMapping = sourceProperties.outputKeyMapping
if (responseStatusCode in 200..299 && outputKeyMapping.isNullOrEmpty()) {
- resourceAssignment.status = BlueprintConstants.STATUS_SUCCESS
+ resourceAssignment.status = BluePrintConstants.STATUS_SUCCESS
logger.info("AS>> outputKeyMapping==null, will not populateResource")
} else if (responseStatusCode in 200..299 && !responseBody.isBlank()) {
populateResource(resourceAssignment, sourceProperties, responseBody, path)
@@ -112,12 +112,12 @@
val errMsg =
"Failed to get $dSource result for dictionary name ($dName) using urlPath ($urlPath) response_code: ($responseStatusCode)"
logger.warn(errMsg)
- throw BlueprintProcessorException(errMsg)
+ throw BluePrintProcessorException(errMsg)
}
}
// Check the value has populated for mandatory case
ResourceAssignmentUtils.assertTemplateKeyValueNotNull(resourceAssignment)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
val errorMsg = "Failed to process REST resource resolution in template key ($resourceAssignment) assignments."
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, errorMsg)
throw e.updateErrorMessage(
@@ -126,7 +126,7 @@
)
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(resourceAssignment, e.message)
- throw BlueprintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
+ throw BluePrintProcessorException("Failed in template key ($resourceAssignment) assignments with: ${e.message}", e)
}
}
@@ -142,7 +142,7 @@
}
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
private fun populateResource(
resourceAssignment: ResourceAssignment,
sourceProperties: RestResourceSource,
@@ -175,7 +175,7 @@
ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, parsedResponseNode)
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
private fun validate(resourceAssignment: ResourceAssignment) {
checkNotEmpty(resourceAssignment.name) { "resource assignment template key is not defined" }
checkNotEmpty(resourceAssignment.dictionaryName) {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt
index 5a03450..7ab3126 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtils.kt
@@ -26,9 +26,9 @@
import com.fasterxml.jackson.databind.node.TextNode
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.checkFileExists
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
@@ -39,8 +39,8 @@
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.nullToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.rootFieldsToMap
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintVelocityTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintVelocityTemplateService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonReactorUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.PropertyDefinitionUtils.Companion.hasLogProtect
@@ -59,14 +59,14 @@
suspend fun resourceDefinitions(blueprintBasePath: String): MutableMap<String, ResourceDefinition> {
val dictionaryFile = normalizedFile(
- blueprintBasePath, BlueprintConstants.TOSCA_DEFINITIONS_DIR,
+ blueprintBasePath, BluePrintConstants.TOSCA_DEFINITIONS_DIR,
ResourceResolutionConstants.FILE_NAME_RESOURCE_DEFINITION_TYPES
)
checkFileExists(dictionaryFile) { "resource definition file(${dictionaryFile.absolutePath}) is missing" }
return JacksonReactorUtils.getMapFromFile(dictionaryFile, ResourceDefinition::class.java)
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun setResourceDataValue(
resourceAssignment: ResourceAssignment,
raRuntimeService: ResourceAssignmentRuntimeService,
@@ -76,7 +76,7 @@
return setResourceDataValue(resourceAssignment, raRuntimeService, value.asJsonType())
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun setResourceDataValue(
resourceAssignment: ResourceAssignment,
raRuntimeService: ResourceAssignmentRuntimeService,
@@ -108,11 +108,11 @@
)
setResourceValue(resourceAssignment, raRuntimeService, value)
resourceAssignment.updatedDate = Date()
- resourceAssignment.updatedBy = BlueprintConstants.USER_SYSTEM
- resourceAssignment.status = BlueprintConstants.STATUS_SUCCESS
+ resourceAssignment.updatedBy = BluePrintConstants.USER_SYSTEM
+ resourceAssignment.status = BluePrintConstants.STATUS_SUCCESS
}
} catch (e: Exception) {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Failed in setting value for template key " +
"(${resourceAssignment.name}) and dictionary key (${resourceAssignment.dictionaryName}) of " +
"type (${resourceProp.type}) with error message (${e.message})",
@@ -139,7 +139,7 @@
.mapValues { e -> e.value.asText() } as MutableMap<String, Any>
val newValue: JsonNode
try {
- newValue = BlueprintVelocityTemplateService
+ newValue = BluePrintVelocityTemplateService
.generateContent(template, null, true, resolutionStore)
.also {
if (hasLogProtect(metadata))
@@ -149,7 +149,7 @@
}
.let { v -> v.asJsonType() }
} catch (e: Exception) {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"transform-template failed: $template", e
)
}
@@ -164,24 +164,24 @@
fun setFailedResourceDataValue(resourceAssignment: ResourceAssignment, message: String?) {
if (isNotEmpty(resourceAssignment.name)) {
resourceAssignment.updatedDate = Date()
- resourceAssignment.updatedBy = BlueprintConstants.USER_SYSTEM
- resourceAssignment.status = BlueprintConstants.STATUS_FAILURE
+ resourceAssignment.updatedBy = BluePrintConstants.USER_SYSTEM
+ resourceAssignment.status = BluePrintConstants.STATUS_FAILURE
resourceAssignment.message = message
}
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun assertTemplateKeyValueNotNull(resourceAssignment: ResourceAssignment) {
val resourceProp = checkNotNull(resourceAssignment.property) {
"Failed to populate mandatory resource resource mapping $resourceAssignment"
}
if (resourceProp.required != null && resourceProp.required!! && resourceProp.value.isNullOrMissing()) {
logger.error("failed to populate mandatory resource mapping ($resourceAssignment)")
- throw BlueprintProcessorException("failed to populate mandatory resource mapping ($resourceAssignment)")
+ throw BluePrintProcessorException("failed to populate mandatory resource mapping ($resourceAssignment)")
}
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun generateResourceDataForAssignments(assignments: List<ResourceAssignment>): String {
val result: String
try {
@@ -209,13 +209,13 @@
logger.info("Generated Resource Param Data ($result)")
}
} catch (e: Exception) {
- throw BlueprintProcessorException("Resource Assignment is failed with $e.message", e)
+ throw BluePrintProcessorException("Resource Assignment is failed with $e.message", e)
}
return result
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun generateResourceForAssignments(assignments: List<ResourceAssignment>): MutableMap<String, JsonNode> {
val data: MutableMap<String, JsonNode> = hashMapOf()
assignments.forEach {
@@ -291,7 +291,7 @@
}
fun transformToRARuntimeService(
- blueprintRuntimeService: BlueprintRuntimeService<*>,
+ blueprintRuntimeService: BluePrintRuntimeService<*>,
templateArtifactName: String
): ResourceAssignmentRuntimeService {
@@ -305,7 +305,7 @@
return resourceAssignmentRuntimeService
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun getPropertyType(
raRuntimeService: ResourceAssignmentRuntimeService,
dataTypeName: String,
@@ -321,12 +321,12 @@
logger.trace("Data type({})'s property ({}) is ({})", dataTypeName, propertyName, type)
} catch (e: Exception) {
logger.error("couldn't get data type($dataTypeName)'s property ($propertyName), error message $e")
- throw BlueprintProcessorException("${e.message}", e)
+ throw BluePrintProcessorException("${e.message}", e)
}
return type
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun parseResponseNode(
responseNode: JsonNode,
resourceAssignment: ResourceAssignment,
@@ -336,18 +336,18 @@
val metadata = resourceAssignment.property!!.metadata
try {
if ((resourceAssignment.property?.type).isNullOrEmpty()) {
- throw BlueprintProcessorException("Couldn't get data dictionary type for dictionary name (${resourceAssignment.name})")
+ throw BluePrintProcessorException("Couldn't get data dictionary type for dictionary name (${resourceAssignment.name})")
}
val type = resourceAssignment.property!!.type
val valueToPrint = getValueToLog(metadata, responseNode)
logger.info("For template key (${resourceAssignment.name}) trying to get value from responseNode ($valueToPrint)")
return when (type) {
- in BlueprintTypes.validPrimitiveTypes() -> {
+ in BluePrintTypes.validPrimitiveTypes() -> {
// Primitive Types
parseResponseNodeForPrimitiveTypes(responseNode, resourceAssignment, outputKeyMapping)
}
- in BlueprintTypes.validCollectionTypes() -> {
+ in BluePrintTypes.validCollectionTypes() -> {
// Array Types
parseResponseNodeForCollection(responseNode, resourceAssignment, raRuntimeService, outputKeyMapping)
}
@@ -358,7 +358,7 @@
}
} catch (e: Exception) {
logger.error("Fail to parse response data, error message $e")
- throw BlueprintProcessorException("${e.message}", e)
+ throw BluePrintProcessorException("${e.message}", e)
}
}
@@ -387,7 +387,7 @@
}
if (returnNode.isNullOrMissing() || returnNode!!.isComplexType() && !returnNode.has(outputKeyMapping[outputKey])) {
- throw BlueprintProcessorException("Fail to find output key mapping ($outputKey) in the responseNode.")
+ throw BluePrintProcessorException("Fail to find output key mapping ($outputKey) in the responseNode.")
}
val returnValue = if (returnNode.isComplexType()) {
@@ -411,7 +411,7 @@
val metadata = resourceAssignment.property!!.metadata
var resultNode: JsonNode
if ((resourceAssignment.property?.entrySchema?.type).isNullOrEmpty()) {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Couldn't get data type for dictionary type " +
"(${resourceAssignment.property!!.type}) and dictionary name ($dName)"
)
@@ -441,7 +441,7 @@
)
}
else -> {
- throw BlueprintProcessorException("Key-value response expected to match the responseNode.")
+ throw BluePrintProcessorException("Key-value response expected to match the responseNode.")
}
}
} else {
@@ -486,7 +486,7 @@
): ObjectNode {
val outputKeyMappingHasOnlyOneElement = checkIfOutputKeyMappingProvideOneElement(outputKeyMapping)
when (entrySchemaType) {
- in BlueprintTypes.validPrimitiveTypes() -> {
+ in BluePrintTypes.validPrimitiveTypes() -> {
if (outputKeyMappingHasOnlyOneElement) {
val outputKeyMap = outputKeyMapping.entries.first()
if (resourceAssignment.keyIdentifiers.none { it.name == outputKeyMap.key }) {
@@ -503,7 +503,7 @@
metadata
)
} else {
- throw BlueprintProcessorException("Expect one entry in output-key-mapping")
+ throw BluePrintProcessorException("Expect one entry in output-key-mapping")
}
}
else -> {
@@ -533,7 +533,7 @@
)
}
else -> {
- throw BlueprintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
+ throw BluePrintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
}
}
}
@@ -557,7 +557,7 @@
resourceAssignment.keyIdentifiers.add(KeyIdentifier(outputKeyMap.key, returnValue))
return returnValue
} else {
- throw BlueprintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
+ throw BluePrintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
}
}
@@ -669,7 +669,7 @@
)
}
else -> {
- throw BlueprintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
+ throw BluePrintProcessorException("Output-key-mapping do not map the Data Type $entrySchemaType")
}
}
} else {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceDefinitionUtils.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceDefinitionUtils.kt
index 4b4e04e..1bf854c 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceDefinitionUtils.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceDefinitionUtils.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.asListOfString
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
@@ -48,7 +48,7 @@
MutableList<ResourceAssignment> {
/** Check if resolve definition is defined in the resource definition Map */
val resourceDefinition = resourceDefinitions[resolveDefinition]
- ?: throw BlueprintProcessorException("failed to get resolve definition($resolveDefinition)")
+ ?: throw BluePrintProcessorException("failed to get resolve definition($resolveDefinition)")
val resourceAssignments: MutableList<ResourceAssignment> = arrayListOf()
@@ -56,7 +56,7 @@
val definitionDependencies = definitionDependencies(resourceDefinition, sources)
definitionDependencies.forEach { definitionDependencyName ->
val definitionDependency = resourceDefinitions[definitionDependencyName]
- ?: throw BlueprintProcessorException("failed to get dependency definition($definitionDependencyName)")
+ ?: throw BluePrintProcessorException("failed to get dependency definition($definitionDependencyName)")
val resourceAssignment = ResourceAssignment().apply {
name = definitionDependency.name
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSLTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSLTest.kt
index bdb47e7..7dcaab7 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSLTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceDefinitionDSLTest.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
@@ -25,7 +25,7 @@
@Test
fun testResourceDefinitionDSL() {
- val testResourceDefinition = BlueprintTypes.resourceDefinition(
+ val testResourceDefinition = BluePrintTypes.resourceDefinition(
"service-instance-id",
"VFW Service Instance Name"
) {
@@ -79,7 +79,7 @@
// println(resourceDefinition.asJsonString(true))
assertNotNull(testResourceDefinition, "failed to generate testResourceDefinition")
- val testResourceDefinitions = BlueprintTypes.resourceDefinitions {
+ val testResourceDefinitions = BluePrintTypes.resourceDefinitions {
resourceDefinition(testResourceDefinition)
}
assertNotNull(testResourceDefinitions, "failed to generate testResourceDefinitions")
@@ -88,7 +88,7 @@
@Test
fun testResourceAssignment() {
- val testResourceAssignment = BlueprintTypes.resourceAssignment(
+ val testResourceAssignment = BluePrintTypes.resourceAssignment(
"instance-name",
"service-instance-name", "odl-mdsal"
) {
@@ -99,7 +99,7 @@
// println(resourceAssignment.asJsonString(true))
assertNotNull(testResourceAssignment, "failed to generate resourceAssignment")
- val testResourceAssignments = BlueprintTypes.resourceAssignments {
+ val testResourceAssignments = BluePrintTypes.resourceAssignments {
resourceAssignment(testResourceAssignment)
resourceAssignment(
"instance-name1",
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSLTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSLTest.kt
index 09eef46..f7c41bd 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSLTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentDSLTest.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.getAttribute
import kotlin.test.Test
import kotlin.test.assertNotNull
@@ -25,14 +25,14 @@
@Test
fun testNodeTypeComponentResourceResolution() {
- val nodeType = BlueprintTypes.nodeTypeComponentResourceResolution()
+ val nodeType = BluePrintTypes.nodeTypeComponentResourceResolution()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeComponentResourceResolution")
}
@Test
fun testNodeTemplateComponentResourceResolution() {
- val nodeTemplate = BlueprintTypes.nodeTemplateComponentResourceResolution("resource-resolve", "") {
+ val nodeTemplate = BluePrintTypes.nodeTemplateComponentResourceResolution("resource-resolve", "") {
definedOperation("Resolve resources") {
inputs {
actionName("resolve")
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt
index 74a88b4..84d132a 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt
@@ -26,10 +26,10 @@
import org.junit.Before
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.assertEquals
import kotlin.test.fail
@@ -44,7 +44,7 @@
private val resourceType = "ServiceInstance"
private val occurrence = 1
private val props = mutableMapOf<String, JsonNode>()
- private val bluePrintRuntimeService = mockk<BlueprintRuntimeService<*>>()
+ private val bluePrintRuntimeService = mockk<BluePrintRuntimeService<*>>()
private val artifactNames = listOf("template")
private val nodeTemplateName = "nodeTemplateName"
@@ -79,7 +79,7 @@
runBlocking {
try {
resourceResolutionComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
assertEquals(
"Can't proceed with the resolution: either provide resolution-key OR combination of resource-id and resource-type.",
e.message
@@ -98,7 +98,7 @@
runBlocking {
try {
resourceResolutionComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
assertEquals(
"Can't proceed with the resolution: both resource-id and resource-type should be provided, one of them is missing.",
e.message
@@ -118,7 +118,7 @@
runBlocking {
try {
resourceResolutionComponent.processNB(executionRequest)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
assertEquals(
"Can't proceed with the resolution: can't persist resolution without a correlation key. " +
"Either provide a resolution-key OR combination of resource-id and resource-type OR set `storeResult` to false.",
@@ -164,9 +164,9 @@
@Test
fun testRecover() {
runBlocking {
- val blueprintError = BlueprintError()
+ val blueprintError = BluePrintError()
val exception = RuntimeException("message")
- every { bluePrintRuntimeService.getBlueprintError() } returns blueprintError
+ every { bluePrintRuntimeService.getBluePrintError() } returns blueprintError
resourceResolutionComponent.recoverNB(exception, executionRequest)
assertEquals(1, blueprintError.allErrors().size)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
index a1de557..3d2a975 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionServiceTest.kt
@@ -30,11 +30,11 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.MockCapabilityScriptRA
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResolutionSummary
import org.slf4j.LoggerFactory
@@ -106,7 +106,7 @@
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -160,7 +160,7 @@
runBlocking {
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -200,7 +200,7 @@
runBlocking {
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -245,7 +245,7 @@
props[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOLUTION_SUMMARY] = true
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -291,7 +291,7 @@
runBlocking {
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -344,7 +344,7 @@
runBlocking {
Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService)
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -384,13 +384,13 @@
@Test
fun testResourceResolutionForDefinition() {
- val resourceDefinitions = BlueprintTypes.resourceDefinitions {
+ val resourceDefinitions = BluePrintTypes.resourceDefinitions {
resourceDefinition(name = "port-speed", description = "Port Speed") {
property(type = "string", required = true)
sources {
sourceCapability(id = "sdno", description = "SDNO Source") {
definedProperties {
- type(BlueprintConstants.SCRIPT_KOTLIN)
+ type(BluePrintConstants.SCRIPT_KOTLIN)
scriptClassReference(MockCapabilityScriptRA::class.qualifiedName!!)
keyDependencies(arrayListOf("device-id"))
}
@@ -417,9 +417,9 @@
}
runBlocking {
val raRuntimeService = mockk<ResourceAssignmentRuntimeService>()
- every { raRuntimeService.bluePrintContext() } returns mockk<BlueprintContext>()
- every { raRuntimeService.getBlueprintError() } returns BlueprintError()
- every { raRuntimeService.setBlueprintError(any()) } returns Unit
+ every { raRuntimeService.bluePrintContext() } returns mockk<BluePrintContext>()
+ every { raRuntimeService.getBluePrintError() } returns BluePrintError()
+ every { raRuntimeService.setBluePrintError(any()) } returns Unit
every { raRuntimeService.getInputValue("device-id") } returns "123456".asJsonPrimitive()
every { raRuntimeService.putResolutionStore(any(), any()) } returns Unit
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSLTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSLTest.kt
index 1dff814..2e9dc9e 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSLTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceSourceDSLTest.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import kotlin.test.Test
import kotlin.test.assertNotNull
@@ -24,42 +24,42 @@
@Test
fun testNodeTypeSourceInput() {
- val nodeType = BlueprintTypes.nodeTypeSourceInput()
+ val nodeType = BluePrintTypes.nodeTypeSourceInput()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeSourceInput")
}
@Test
fun testNodeTypeSourceDefault() {
- val nodeType = BlueprintTypes.nodeTypeSourceDefault()
+ val nodeType = BluePrintTypes.nodeTypeSourceDefault()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeSourceDefault")
}
@Test
fun testNodeTypeSourceDb() {
- val nodeType = BlueprintTypes.nodeTypeSourceDb()
+ val nodeType = BluePrintTypes.nodeTypeSourceDb()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeSourceDb")
}
@Test
fun testNodeTypeSourceRest() {
- val nodeType = BlueprintTypes.nodeTypeSourceRest()
+ val nodeType = BluePrintTypes.nodeTypeSourceRest()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeSourceRest")
}
@Test
fun testNodeTypeSourceCapability() {
- val nodeType = BlueprintTypes.nodeTypeSourceCapability()
+ val nodeType = BluePrintTypes.nodeTypeSourceCapability()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeSourceCapability")
}
@Test
fun testNodeTemplateSourceInput() {
- val nodeTemplate = BlueprintTypes.nodeTemplateSourceInput("InputSystem", "") {
+ val nodeTemplate = BluePrintTypes.nodeTemplateSourceInput("InputSystem", "") {
}
// println(nodeTemplate.asJsonString(true))
assertNotNull(nodeTemplate, "failed to generate nodeTemplateSourceInput")
@@ -67,7 +67,7 @@
@Test
fun testNodeTemplateSourceDefault() {
- val nodeTemplate = BlueprintTypes.nodeTemplateSourceDefault("DefaultSystem", "") {
+ val nodeTemplate = BluePrintTypes.nodeTemplateSourceDefault("DefaultSystem", "") {
}
// println(nodeTemplate.asJsonString(true))
assertNotNull(nodeTemplate, "failed to generate nodeTemplateSourceDefault")
@@ -75,7 +75,7 @@
@Test
fun testNodeTemplateSourceDb() {
- val nodeTemplate = BlueprintTypes.nodeTemplateSourceDb("DbSystem", "") {
+ val nodeTemplate = BluePrintTypes.nodeTemplateSourceDb("DbSystem", "") {
definedProperties {
type("SQL")
query("SELECT * FROM DB WHERE name = \$name")
@@ -95,7 +95,7 @@
@Test
fun testNodeTemplateSourceRest() {
- val nodeTemplate = BlueprintTypes.nodeTemplateSourceRest("restSystem", "") {
+ val nodeTemplate = BluePrintTypes.nodeTemplateSourceRest("restSystem", "") {
definedProperties {
type("JSON")
endpointSelector("rest-source-endpoint")
@@ -119,7 +119,7 @@
@Test
fun testNodeTemplateSourceCapability() {
- val nodeTemplate = BlueprintTypes.nodeTemplateSourceCapability("capabiltySystem", "") {
+ val nodeTemplate = BluePrintTypes.nodeTemplateSourceCapability("capabiltySystem", "") {
definedProperties {
type("kotlin")
scriptClassReference("Scripts/Sample.kt")
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/TestDatabaseConfiguration.kt
index d720bd8..096d7ff 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/TestDatabaseConfiguration.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDatabaseConfiguration
import org.springframework.context.annotation.Bean
@@ -29,7 +29,7 @@
import javax.sql.DataSource
@Configuration
-@Import(BlueprintDBLibConfiguration::class)
+@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = [
"org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution",
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapabilityTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapabilityTest.kt
index e48ac38..4ce5df1 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapabilityTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/IpAssignResolutionCapabilityTest.kt
@@ -29,14 +29,14 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceAssignments
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceDefinitions
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResolutionSummary
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -57,7 +57,7 @@
@Before
fun setup() {
- mockkObject(BlueprintDependencyService)
+ mockkObject(BluePrintDependencyService)
val blueprintWebClientService = mockk<BlueprintWebClientService>()
// Create mock Response
@@ -72,9 +72,9 @@
)
every { blueprintWebClientService.exchangeResource(any(), any(), any()) } returns mockResponse
- val restLibPropertyService = mockk<BlueprintRestLibPropertyService>()
+ val restLibPropertyService = mockk<BluePrintRestLibPropertyService>()
every { restLibPropertyService.blueprintWebClientService("ipassign-ms") } returns blueprintWebClientService
- every { BlueprintDependencyService.applicationContext.getBean(any()) } returns restLibPropertyService
+ every { BluePrintDependencyService.applicationContext.getBean(any()) } returns restLibPropertyService
}
@Test
@@ -152,7 +152,7 @@
/** Test dictionaries */
private fun resourceDefinitions(): MutableMap<String, ResourceDefinition> {
- return BlueprintTypes.resourceDefinitions {
+ return BluePrintTypes.resourceDefinitions {
resourceDefinition("CloudRegionId", "Cloud Region Id Resource Definition") {
tags("CloudRegionId")
updatedBy("saurav.paira@att.com")
@@ -230,7 +230,7 @@
}
private fun resourceAssignments(): MutableMap<String, ResourceAssignment> {
- return BlueprintTypes.resourceAssignments {
+ return BluePrintTypes.resourceAssignments {
resourceAssignment(
name = "CloudRegionId", dictionaryName = "CloudRegionId",
dictionarySource = "input"
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapabilityTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapabilityTest.kt
index 66f302f..8c0aca4 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapabilityTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/capabilities/NamingResolutionCapabilityTest.kt
@@ -29,16 +29,16 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceAssignments
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceDefinitions
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResolutionSummary
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -60,7 +60,7 @@
@Before
fun setup() {
- mockkObject(BlueprintDependencyService)
+ mockkObject(BluePrintDependencyService)
val blueprintWebClientService = mockk<BlueprintWebClientService>()
// Create mock Response
@@ -74,9 +74,9 @@
)
every { blueprintWebClientService.exchangeResource(any(), any(), any()) } returns mockResponse
- val restLibPropertyService = mockk<BlueprintRestLibPropertyService>()
+ val restLibPropertyService = mockk<BluePrintRestLibPropertyService>()
every { restLibPropertyService.blueprintWebClientService("naming-ms") } returns blueprintWebClientService
- every { BlueprintDependencyService.applicationContext.getBean(any()) } returns restLibPropertyService
+ every { BluePrintDependencyService.applicationContext.getBean(any()) } returns restLibPropertyService
}
@Test
@@ -89,8 +89,8 @@
} returns NamingResolutionCapability()
val raRuntimeService = mockk<ResourceAssignmentRuntimeService>()
- every { raRuntimeService.getBlueprintError() } returns BlueprintError()
- every { raRuntimeService.bluePrintContext() } returns mockk<BlueprintContext>()
+ every { raRuntimeService.getBluePrintError() } returns BluePrintError()
+ every { raRuntimeService.bluePrintContext() } returns mockk<BluePrintContext>()
every { raRuntimeService.getInputValue("vf-module-name") } returns NullNode.getInstance()
every { raRuntimeService.getInputValue("vnfc-name") } returns NullNode.getInstance()
@@ -154,7 +154,7 @@
/** Test dictionaries */
private fun resourceDefinitions(): MutableMap<String, ResourceDefinition> {
- return BlueprintTypes.resourceDefinitions {
+ return BluePrintTypes.resourceDefinitions {
resourceDefinition("naming-code", "naming-code Resource Definition") {
tags("naming-code")
updatedBy("brindasanth@onap.com")
@@ -274,7 +274,7 @@
}
private fun resourceAssignments(): MutableMap<String, ResourceAssignment> {
- return BlueprintTypes.resourceAssignments {
+ return BluePrintTypes.resourceAssignments {
resourceAssignment(
name = "naming-code", dictionaryName = "naming-code",
dictionarySource = "input"
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBServiceTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBServiceTest.kt
index 51825a5..fa59876 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/ResourceResolutionDBServiceTest.kt
@@ -23,10 +23,10 @@
import org.junit.Before
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.dao.EmptyResultDataAccessException
import kotlin.test.assertEquals
@@ -46,13 +46,13 @@
private val blueprintVersion = "1.0.0"
private val metadata = hashMapOf<String, String>()
private val props = hashMapOf<String, Any>()
- private val bluePrintContext = mockk<BlueprintContext>()
- private val bluePrintRuntimeService = mockk<DefaultBlueprintRuntimeService>()
+ private val bluePrintContext = mockk<BluePrintContext>()
+ private val bluePrintRuntimeService = mockk<DefaultBluePrintRuntimeService>()
@Before
fun setup() {
- metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION] = blueprintVersion
- metadata[BlueprintConstants.METADATA_TEMPLATE_NAME] = blueprintName
+ metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION] = blueprintVersion
+ metadata[BluePrintConstants.METADATA_TEMPLATE_NAME] = blueprintName
props[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOLUTION_KEY] = resolutionKey
props[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOURCE_ID] = resourceId
@@ -206,7 +206,7 @@
fun writeTest() {
val resourceResolution = ResourceResolution()
val resourceAssignment = ResourceAssignment()
- resourceAssignment.property?.status = BlueprintConstants.STATUS_SUCCESS
+ resourceAssignment.property?.status = BluePrintConstants.STATUS_SUCCESS
resourceAssignment.property?.value = "result".asJsonPrimitive()
resourceAssignment.dictionarySource = "ddSource"
resourceAssignment.dictionaryName = "ddName"
@@ -229,7 +229,7 @@
fun writeWithNullValue() {
val slot = slot<ResourceResolution>()
val resourceAssignment = ResourceAssignment()
- resourceAssignment.status = BlueprintConstants.STATUS_SUCCESS
+ resourceAssignment.status = BluePrintConstants.STATUS_SUCCESS
resourceAssignment.dictionarySource = "ddSource"
resourceAssignment.dictionaryName = "ddName"
resourceAssignment.version = 1
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionServiceTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionServiceTest.kt
index 0a7722f..71d8955 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/db/TemplateResolutionServiceTest.kt
@@ -7,9 +7,9 @@
import org.junit.Before
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
import org.springframework.dao.EmptyResultDataAccessException
import kotlin.test.assertEquals
@@ -29,13 +29,13 @@
private val result = "result"
private val metadata = hashMapOf<String, String>()
private val props = hashMapOf<String, Any>()
- private val bluePrintContext = mockk<BlueprintContext>()
- private val bluePrintRuntimeService = mockk<DefaultBlueprintRuntimeService>()
+ private val bluePrintContext = mockk<BluePrintContext>()
+ private val bluePrintRuntimeService = mockk<DefaultBluePrintRuntimeService>()
@Before
fun setup() {
- metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION] = blueprintVersion
- metadata[BlueprintConstants.METADATA_TEMPLATE_NAME] = blueprintName
+ metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION] = blueprintVersion
+ metadata[BluePrintConstants.METADATA_TEMPLATE_NAME] = blueprintName
props[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOLUTION_KEY] = resolutionKey
props[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_RESOURCE_ID] = resourceId
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBlueprintRestLibPropertyService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBluePrintRestLibPropertyService.kt
similarity index 82%
rename from ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBlueprintRestLibPropertyService.kt
rename to ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBluePrintRestLibPropertyService.kt
index b6c20cd..a2ec75d 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBlueprintRestLibPropertyService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockBluePrintRestLibPropertyService.kt
@@ -15,12 +15,12 @@
*/
package org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
-class MockBlueprintRestLibPropertyService(bluePrintProperties: BlueprintPropertiesService) :
- BlueprintRestLibPropertyService(bluePrintProperties) {
+class MockBluePrintRestLibPropertyService(bluePrintProperties: BluePrintPropertiesService) :
+ BluePrintRestLibPropertyService(bluePrintProperties) {
fun mockBlueprintWebClientService(selector: String):
MockBlueprintWebClientService {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockDatabaseConfiguration.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockDatabaseConfiguration.kt
index 653a2c1..2219f23 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockDatabaseConfiguration.kt
@@ -17,9 +17,9 @@
import io.mockk.coEvery
import io.mockk.mockk
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -27,8 +27,8 @@
open class MockDBLibGenericService {
@Bean(name = ["MariaDatabaseConfiguration", "MySqlDatabaseConfiguration"])
- open fun createDatabaseConfiguration(): BlueprintDBLibGenericService {
- return mockk<BlueprintDBLibGenericService>()
+ open fun createDatabaseConfiguration(): BluePrintDBLibGenericService {
+ return mockk<BluePrintDBLibGenericService>()
}
}
@@ -36,10 +36,10 @@
open class MockBlueprintProcessorCatalogServiceImpl {
@Bean(name = ["bluePrintRuntimeValidatorService"])
- open fun bluePrintRuntimeValidatorService(): BlueprintValidatorService {
- val bluePrintValidatorService = mockk<BlueprintValidatorService>()
- coEvery { bluePrintValidatorService.validateBlueprints(any<String>()) } returns true
- coEvery { bluePrintValidatorService.validateBlueprints(any<BlueprintRuntimeService<*>>()) } returns true
+ open fun bluePrintRuntimeValidatorService(): BluePrintValidatorService {
+ val bluePrintValidatorService = mockk<BluePrintValidatorService>()
+ coEvery { bluePrintValidatorService.validateBluePrints(any<String>()) } returns true
+ coEvery { bluePrintValidatorService.validateBluePrints(any<BluePrintRuntimeService<*>>()) } returns true
return bluePrintValidatorService
}
}
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockRestResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockRestResourceResolutionProcessor.kt
index 77c90ba..6909915 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockRestResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/mock/MockRestResourceResolutionProcessor.kt
@@ -22,8 +22,8 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.RestResourceSource
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.processor.ResourceAssignmentProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.nullToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -33,7 +33,7 @@
class MockRestResourceResolutionProcessor(
private val blueprintRestLibPropertyService:
- MockBlueprintRestLibPropertyService
+ MockBluePrintRestLibPropertyService
) : ResourceAssignmentProcessor() {
private val logger = LoggerFactory.getLogger(MockRestResourceResolutionProcessor::class.java)
@@ -97,12 +97,12 @@
val errMsg =
"Failed to get $dSource result for dictionary name ($dName) using urlPath ($urlPath) response_code: ($responseStatusCode)"
logger.warn(errMsg)
- throw BlueprintProcessorException(errMsg)
+ throw BluePrintProcessorException(errMsg)
}
}
} catch (e: Exception) {
ResourceAssignmentUtils.setFailedResourceDataValue(executionRequest, e.message)
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Failed in template resolutionKey ($executionRequest) assignments with: ${e.message}",
e
)
@@ -117,7 +117,7 @@
return blueprintRestLibPropertyService.mockBlueprintWebClientService(resourceAssignment.dictionarySource!!)
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
private fun populateResource(
resourceAssignment: ResourceAssignment,
sourceProperties: RestResourceSource,
@@ -132,15 +132,15 @@
val responseNode = JacksonUtils.jsonNode(restResponse).at(path)
when (type) {
- in BlueprintTypes.validPrimitiveTypes() -> {
+ in BluePrintTypes.validPrimitiveTypes() -> {
ResourceAssignmentUtils.setResourceDataValue(resourceAssignment, raRuntimeService, responseNode)
}
- in BlueprintTypes.validCollectionTypes() -> {
+ in BluePrintTypes.validCollectionTypes() -> {
// Array Types
entrySchemaType = resourceAssignment.property!!.entrySchema!!.type
val arrayNode = responseNode as ArrayNode
- if (entrySchemaType !in BlueprintTypes.validPrimitiveTypes()) {
+ if (entrySchemaType !in BluePrintTypes.validPrimitiveTypes()) {
val responseArrayNode = responseNode.toList()
for (responseSingleJsonNode in responseArrayNode) {
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
index b289cfe..1b0058b 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
@@ -27,13 +27,13 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.resourceAssignment
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
@@ -53,14 +53,14 @@
} returns MockCapabilityScriptRA()
val raRuntimeService = mockk<ResourceAssignmentRuntimeService>()
- every { raRuntimeService.bluePrintContext() } returns mockk<BlueprintContext>()
+ every { raRuntimeService.bluePrintContext() } returns mockk<BluePrintContext>()
every { raRuntimeService.getInputValue("test-property") } returns NullNode.getInstance()
val capabilityResourceResolutionProcessor =
CapabilityResourceResolutionProcessor(componentFunctionScriptingService)
capabilityResourceResolutionProcessor.raRuntimeService = raRuntimeService
- val resourceAssignment = BlueprintTypes.resourceAssignment(
+ val resourceAssignment = BluePrintTypes.resourceAssignment(
name = "test-property", dictionaryName = "ra-dict-name",
dictionarySource = "capability"
) {
@@ -86,14 +86,14 @@
fun `test jython capability`() {
runBlocking {
- val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/capability_python"
)
val componentFunctionScriptingService = mockk<ComponentFunctionScriptingService>()
coEvery {
componentFunctionScriptingService
- .scriptInstance<ResourceAssignmentProcessor>(any(), BlueprintConstants.SCRIPT_JYTHON, any())
+ .scriptInstance<ResourceAssignmentProcessor>(any(), BluePrintConstants.SCRIPT_JYTHON, any())
} returns MockCapabilityScriptRA()
val resourceAssignmentRuntimeService = ResourceAssignmentRuntimeService("1234", bluePrintContext)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt
index 6689aff..0c8ec7d 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DatabaseResourceResolutionProcessorTest.kt
@@ -19,14 +19,14 @@
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDBLibGenericService
-import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BlueprintDBLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.TestDatabaseConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockBlueprintProcessorCatalogServiceImpl
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -38,7 +38,7 @@
@ContextConfiguration(
classes = [
TestDatabaseConfiguration::class,
- PrimaryDBLibGenericService::class, BlueprintDBLibPropertyService::class,
+ PrimaryDBLibGenericService::class, BluePrintDBLibPropertyService::class,
DatabaseResourceAssignmentProcessor::class, MockDBLibGenericService::class,
MockBlueprintProcessorCatalogServiceImpl::class
]
@@ -52,7 +52,7 @@
@Test
fun `test database resource resolution processor db`() {
runBlocking {
- val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessorTest.kt
index 7cec759..a109131 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/DefaultResourceResolutionProcessorTest.kt
@@ -20,7 +20,7 @@
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -39,7 +39,7 @@
@Test
fun `test default resource resolution`() {
runBlocking {
- val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessorTest.kt
index aae35f4..cf8dc0c 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/InputResourceResolutionProcessorTest.kt
@@ -25,7 +25,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -45,7 +45,7 @@
fun `InputResourceResolutionProcessor should be able to resolve a value for an input parameter`() {
runBlocking {
- val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt
index 9fabf5d..cb72141 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/processor/RestResourceResolutionProcessorTest.kt
@@ -18,15 +18,15 @@
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
-import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockBlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockBluePrintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.mock.MockRestResourceResolutionProcessor
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.utils.ResourceAssignmentUtils
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -38,15 +38,15 @@
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- MockRestResourceResolutionProcessor::class, MockBlueprintRestLibPropertyService::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class, RestClientProperties::class
+ MockRestResourceResolutionProcessor::class, MockBluePrintRestLibPropertyService::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, RestClientProperties::class
]
)
@TestPropertySource(locations = ["classpath:application-test.properties"])
class RestResourceResolutionProcessorTest {
@Autowired
- lateinit var bluePrintRestLibPropertyService: MockBlueprintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: MockBluePrintRestLibPropertyService
private lateinit var restResourceResolutionProcessor: MockRestResourceResolutionProcessor
@@ -58,7 +58,7 @@
@Test
fun `test rest resource resolution`() {
runBlocking {
- val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -92,7 +92,7 @@
@Test
fun `test rest aai get resource resolution`() {
runBlocking {
- val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -126,7 +126,7 @@
@Test
fun `test rest aai put resource resolution`() {
runBlocking {
- val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt
index d9e9315..2f07e3b 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/utils/ResourceAssignmentUtilsTest.kt
@@ -36,7 +36,7 @@
import org.onap.ccsdk.cds.controllerblueprints.core.data.EntrySchema
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
@@ -70,7 +70,7 @@
fun setup() {
val bluePrintContext = runBlocking {
- BlueprintMetadataUtils.getBlueprintContext(
+ BluePrintMetadataUtils.getBluePrintContext(
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
}
diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt
index 61ab4c1..2d3eb3b 100644
--- a/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt
+++ b/ms/blueprintsprocessor/functions/restconf-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/RestconfExecutorExtensions.kt
@@ -21,9 +21,9 @@
import org.onap.ccsdk.cds.blueprintsprocessor.rest.restClientService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintRetryException
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintRetryException
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
/**
* Register the Restconf module exposed dependency
@@ -32,7 +32,7 @@
val log = LoggerFactory.logger(AbstractScriptComponentFunction::class.java)!!
fun AbstractScriptComponentFunction.restconfClientService(selector: String): BlueprintWebClientService {
- return BlueprintDependencyService.restClientService(selector)
+ return BluePrintDependencyService.restClientService(selector)
}
/**
@@ -60,7 +60,7 @@
log.info("NF was mounted successfully on ODL")
result.body
} else {
- throw BlueprintRetryException("Wait for device($deviceId) to mount")
+ throw BluePrintRetryException("Wait for device($deviceId) to mount")
}
}
@@ -126,7 +126,7 @@
"PUT" -> log.info("sending PUT request, url: $requestUrl")
"PATCH" -> log.info("sending PATCH request, url: $requestUrl")
"POST" -> log.info("sending POST request, url: $requestUrl")
- else -> throw BlueprintProcessorException("Illegal request type, only POST, PUT or PATCH allowed.")
+ else -> throw BluePrintProcessorException("Illegal request type, only POST, PUT or PATCH allowed.")
}
return webClientService.exchangeResource(requestType, requestUrl, payload as String, headers)
}
@@ -143,7 +143,7 @@
when (requestType.toUpperCase()) {
"GET" -> log.info("sending GET request, url: $requestUrl")
"DELETE" -> log.info("sending DELETE request, url: $requestUrl")
- else -> throw BlueprintProcessorException("Illegal request type, only GET and DELETE allowed.")
+ else -> throw BluePrintProcessorException("Illegal request type, only GET and DELETE allowed.")
}
return webClientService.exchangeResource(requestType, requestUrl, "")
}
@@ -173,7 +173,7 @@
log.info("NF was mounted successfully on ODL")
result.body
} else {
- throw BlueprintRetryException("Wait for device with url($mountUrl) to mount")
+ throw BluePrintRetryException("Wait for device with url($mountUrl) to mount")
}
}
diff --git a/ms/blueprintsprocessor/functions/restconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/ComponentRestconfExecutorTest.kt b/ms/blueprintsprocessor/functions/restconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/ComponentRestconfExecutorTest.kt
index 653b4c5..47cf34f 100644
--- a/ms/blueprintsprocessor/functions/restconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/ComponentRestconfExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/restconf-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restconf/executor/ComponentRestconfExecutorTest.kt
@@ -28,11 +28,11 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.context.ApplicationContext
import kotlin.test.assertNotNull
@@ -59,25 +59,25 @@
payload = JacksonUtils.jsonNode("{}") as ObjectNode
}
- val blueprintContext = mockk<BlueprintContext>()
+ val blueprintContext = mockk<BluePrintContext>()
every {
blueprintContext.nodeTemplateOperationImplementation(
any(), any(), any()
)
} returns Implementation()
- val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("1234")
+ val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("1234")
every { bluePrintRuntime.bluePrintContext() } returns blueprintContext
componentScriptExecutor.bluePrintRuntimeService = bluePrintRuntime
componentScriptExecutor.stepName = "sample-step"
val operationInputs = hashMapOf<String, JsonNode>()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "activate-restconf".asJsonPrimitive()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "activate-restconf".asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
operationInputs[ComponentScriptExecutor.INPUT_SCRIPT_TYPE] =
- BlueprintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
+ BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
operationInputs[ComponentScriptExecutor.INPUT_SCRIPT_CLASS_REFERENCE] =
"internal.scripts.TestRestconfConfigure".asJsonPrimitive()
diff --git a/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt b/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt
index 122fe55..9cd6f57 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt
+++ b/ms/blueprintsprocessor/functions/restful-executor/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/restful/executor/RestfulCMComponentFunction.kt
@@ -22,10 +22,10 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.functions.restful.executor.nrmfunction.RestfulNRMServiceClient
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractScriptComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
@@ -33,14 +33,14 @@
private val log = LoggerFactory.getLogger(RestfulCMComponentFunction::class.java)
override suspend fun processNB(executionRequest: ExecutionServiceInput) {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
override suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
- open fun bluePrintRestLibPropertyService(): BlueprintRestLibPropertyService =
+ open fun bluePrintRestLibPropertyService(): BluePrintRestLibPropertyService =
functionDependencyInstanceAsType(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
fun restClientService(clientInfo: JsonNode): BlueprintWebClientService {
diff --git a/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/ComponentRestfulExecutorTest.kt b/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/ComponentRestfulExecutorTest.kt
index 9891702..ad70ac0 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/ComponentRestfulExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/ComponentRestfulExecutorTest.kt
@@ -27,11 +27,11 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.context.ApplicationContext
@@ -58,24 +58,24 @@
payload = JacksonUtils.jsonNode("{}") as ObjectNode
}
- val blueprintContext = mockk<BlueprintContext>()
+ val blueprintContext = mockk<BluePrintContext>()
every {
blueprintContext.nodeTemplateOperationImplementation(
any(), any(), any()
)
} returns Implementation()
- val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("1234")
+ val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("1234")
every { bluePrintRuntime.bluePrintContext() } returns blueprintContext
componentRestfulExecutor.bluePrintRuntimeService = bluePrintRuntime
componentRestfulExecutor.stepName = "sample-step"
val operationInputs = hashMapOf<String, JsonNode>()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "config-deploy-process".asJsonPrimitive()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
- operationInputs["script-type"] = BlueprintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "config-deploy-process".asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] = "interfaceName".asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] = "operationName".asJsonPrimitive()
+ operationInputs["script-type"] = BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive()
operationInputs["script-class-reference"] = "internal.scripts.TestRestfulConfigure".asJsonPrimitive()
val stepInputData = StepData().apply {
diff --git a/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt b/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt
index 6f57439..6f76c9b 100644
--- a/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt
+++ b/ms/blueprintsprocessor/functions/restful-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/restful/executor/nrmfunction/RestfulNRMServiceClientTest.kt
@@ -20,8 +20,8 @@
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BlueprintRestLibConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
@@ -44,7 +44,7 @@
@RunWith(SpringRunner::class)
@EnableAutoConfiguration(exclude = [DataSourceAutoConfiguration::class])
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
-@ContextConfiguration(classes = [BlueprintRestLibConfiguration::class, NrmTestController::class])
+@ContextConfiguration(classes = [BluePrintRestLibConfiguration::class, NrmTestController::class])
@TestPropertySource(
properties = [
"blueprintsprocessor.restclient.nrm.type=basic-auth",
@@ -59,7 +59,7 @@
@Autowired
lateinit var restfulNRMServiceClient: RestfulNRMServiceClient
- lateinit var bluePrintRestLibPropertyService: BlueprintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
@Test
fun testCreateMOI() {
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintConstants.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt
similarity index 99%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintConstants.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt
index 256339c..5c2ae7e 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintConstants.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintConstants.kt
@@ -18,11 +18,11 @@
package org.onap.ccsdk.cds.controllerblueprints.core
/**
- * BlueprintConstants
+ * BluePrintConstants
*
* @author Brinda Santh
*/
-object BlueprintConstants {
+object BluePrintConstants {
val APP_NAME = System.getenv("APP_NAME")
?: "cds-controller"
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintError.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintError.kt
similarity index 98%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintError.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintError.kt
index 2ecdce7..1ac49d6 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintError.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintError.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core
-class BlueprintError {
+class BluePrintError {
private val errors: MutableMap<String, MutableList<String>> = mutableMapOf()
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintException.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintException.kt
similarity index 95%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintException.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintException.kt
index 10e6f59..74e6bb6 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintException.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintException.kt
@@ -22,7 +22,7 @@
*
* @author Brinda Santh
*/
-class BlueprintException : BlueprintProcessorException {
+class BluePrintException : BluePrintProcessorException {
constructor(cause: Throwable) : super(cause)
constructor(message: String) : super(message)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintExtensionFunctions.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintExtensionFunctions.kt
similarity index 82%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintExtensionFunctions.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintExtensionFunctions.kt
index 0a1b095..daf8334 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintExtensionFunctions.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintExtensionFunctions.kt
@@ -18,9 +18,9 @@
import org.onap.ccsdk.cds.controllerblueprints.core.annotations.ArtifactExpression
import org.onap.ccsdk.cds.controllerblueprints.core.annotations.AttributeExpression
-import org.onap.ccsdk.cds.controllerblueprints.core.annotations.BlueprintsConstrain
-import org.onap.ccsdk.cds.controllerblueprints.core.annotations.BlueprintsDataType
-import org.onap.ccsdk.cds.controllerblueprints.core.annotations.BlueprintsProperty
+import org.onap.ccsdk.cds.controllerblueprints.core.annotations.BluePrintsConstrain
+import org.onap.ccsdk.cds.controllerblueprints.core.annotations.BluePrintsDataType
+import org.onap.ccsdk.cds.controllerblueprints.core.annotations.BluePrintsProperty
import org.onap.ccsdk.cds.controllerblueprints.core.annotations.DSLExpression
import org.onap.ccsdk.cds.controllerblueprints.core.annotations.InputExpression
import org.onap.ccsdk.cds.controllerblueprints.core.annotations.OperationOutputExpression
@@ -41,9 +41,9 @@
import kotlin.reflect.KType
import kotlin.reflect.full.declaredMemberProperties
-fun <T : KClass<*>> T.asBlueprintsDataTypes(): DataType {
- val annotation = this.annotations.filter { it is BlueprintsDataType }.single() as BlueprintsDataType
- checkNotNull(annotation) { "BlueprintsDataType annotation definition not found" }
+fun <T : KClass<*>> T.asBluePrintsDataTypes(): DataType {
+ val annotation = this.annotations.filter { it is BluePrintsDataType }.single() as BluePrintsDataType
+ checkNotNull(annotation) { "BluePrintsDataType annotation definition not found" }
val dataType = DataType().apply {
id = annotation.name
version = annotation.version
@@ -67,20 +67,20 @@
property.id = this.name
val getter = this.getter
property.required = !this.returnType.isMarkedNullable
- property.type = this.returnType.asBlueprintsDataType(this.name)
+ property.type = this.returnType.asBluePrintsDataType(this.name)
if (this.returnType.arguments.isNotEmpty()) {
property.entrySchema = this.returnType.entitySchema()
}
this.annotations.forEach { fieldAnnotation ->
// println("Field : ${this.name} : Annotation : $fieldAnnotation")
when (fieldAnnotation) {
- is BlueprintsProperty ->
+ is BluePrintsProperty ->
property.description = fieldAnnotation.description
is PropertyDefaultValue ->
property.value = fieldAnnotation.value.asJsonType(property.type)
- is BlueprintsConstrain -> {
+ is BluePrintsConstrain -> {
if (property.constraints == null) property.constraints = arrayListOf()
- property.constraints!!.add(fieldAnnotation.asBlueprintConstraintClause())
+ property.constraints!!.add(fieldAnnotation.asBluePrintConstraintClause())
}
is InputExpression -> {
property.value = getInput(fieldAnnotation.propertyName)
@@ -117,32 +117,32 @@
return property
}
-internal fun BlueprintsConstrain.asBlueprintConstraintClause(): ConstraintClause {
+internal fun BluePrintsConstrain.asBluePrintConstraintClause(): ConstraintClause {
TODO()
}
internal fun <T : KType> T.entitySchema(): EntrySchema {
val entrySchema = EntrySchema()
if (this.arguments.size == 1) {
- entrySchema.type = this.arguments[0].type!!.asBlueprintsDataType("")
+ entrySchema.type = this.arguments[0].type!!.asBluePrintsDataType("")
} else if (this.arguments.size == 2) {
- entrySchema.type = this.arguments[1].type!!.asBlueprintsDataType("")
+ entrySchema.type = this.arguments[1].type!!.asBluePrintsDataType("")
}
return entrySchema
}
-internal fun <T : KType> T.asBlueprintsDataType(propertyName: String): String {
+internal fun <T : KType> T.asBluePrintsDataType(propertyName: String): String {
val simpleName = (this.classifier as? KClass<*>)?.java?.simpleName
- ?: throw BlueprintException("filed to get simple name.")
+ ?: throw BluePrintException("filed to get simple name.")
return when (simpleName) {
- "String", "Date" -> BlueprintConstants.DATA_TYPE_STRING
- "int" -> BlueprintConstants.DATA_TYPE_INTEGER
- "Boolean" -> BlueprintConstants.DATA_TYPE_BOOLEAN
- "Float" -> BlueprintConstants.DATA_TYPE_FLOAT
- "Double" -> BlueprintConstants.DATA_TYPE_DOUBLE
- "List" -> BlueprintConstants.DATA_TYPE_LIST
- "Map" -> BlueprintConstants.DATA_TYPE_MAP
- "Object", "JsonNode", "ObjectNode", "ArrayNode" -> BlueprintConstants.DATA_TYPE_JSON
+ "String", "Date" -> BluePrintConstants.DATA_TYPE_STRING
+ "int" -> BluePrintConstants.DATA_TYPE_INTEGER
+ "Boolean" -> BluePrintConstants.DATA_TYPE_BOOLEAN
+ "Float" -> BluePrintConstants.DATA_TYPE_FLOAT
+ "Double" -> BluePrintConstants.DATA_TYPE_DOUBLE
+ "List" -> BluePrintConstants.DATA_TYPE_LIST
+ "Map" -> BluePrintConstants.DATA_TYPE_MAP
+ "Object", "JsonNode", "ObjectNode", "ArrayNode" -> BluePrintConstants.DATA_TYPE_JSON
else -> simpleName
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintProcessorException.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintProcessorException.kt
similarity index 73%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintProcessorException.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintProcessorException.kt
index 10a299b..c818b0a 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintProcessorException.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintProcessorException.kt
@@ -27,7 +27,7 @@
*
* @author Brinda Santh
*/
-open class BlueprintProcessorException : ErrorCatalogException, ErrorCatalogExceptionFluent<BlueprintProcessorException> {
+open class BluePrintProcessorException : ErrorCatalogException, ErrorCatalogExceptionFluent<BluePrintProcessorException> {
constructor(message: String, cause: Throwable) : super(message, cause)
constructor(message: String) : super(message)
@@ -37,48 +37,48 @@
constructor(code: Int, message: String) : super(code, message)
constructor(code: Int, message: String, cause: Throwable) : super(code, message, cause)
- override fun code(code: Int): BlueprintProcessorException {
+ override fun code(code: Int): BluePrintProcessorException {
return this.updateCode(code)
}
- override fun domain(domain: String): BlueprintProcessorException {
+ override fun domain(domain: String): BluePrintProcessorException {
return this.updateDomain(domain)
}
- override fun action(action: String): BlueprintProcessorException {
+ override fun action(action: String): BluePrintProcessorException {
return this.updateAction(action)
}
- override fun http(type: String): BlueprintProcessorException {
+ override fun http(type: String): BluePrintProcessorException {
return this.updateHttp(type)
}
- override fun grpc(type: String): BlueprintProcessorException {
+ override fun grpc(type: String): BluePrintProcessorException {
return this.updateGrpc(type)
}
- override fun convertToHttp(): BlueprintProcessorException {
+ override fun convertToHttp(): BluePrintProcessorException {
return this.inverseToHttp()
}
- override fun convertToGrpc(): BlueprintProcessorException {
+ override fun convertToGrpc(): BluePrintProcessorException {
return this.inverseToHttp()
}
- override fun payloadMessage(message: String): BlueprintProcessorException {
+ override fun payloadMessage(message: String): BluePrintProcessorException {
return this.updatePayloadMessage(message)
}
- override fun addErrorPayloadMessage(message: String): BlueprintProcessorException {
+ override fun addErrorPayloadMessage(message: String): BluePrintProcessorException {
return this.updateErrorPayloadMessage(message)
}
- override fun addSubError(errorMessage: ErrorMessage): BlueprintProcessorException {
+ override fun addSubError(errorMessage: ErrorMessage): BluePrintProcessorException {
return this.updateSubError(errorMessage)
}
}
-class BlueprintRetryException : RuntimeException {
+class BluePrintRetryException : RuntimeException {
constructor(message: String, cause: Throwable) : super(message, cause)
constructor(message: String) : super(message)
constructor(cause: Throwable) : super(cause)
@@ -87,89 +87,89 @@
/** Extension Functions */
-fun processorException(message: String): BlueprintProcessorException {
- return BlueprintProcessorException(message)
+fun processorException(message: String): BluePrintProcessorException {
+ return BluePrintProcessorException(message)
}
-fun processorException(message: String, cause: Throwable): BlueprintProcessorException {
- return BlueprintProcessorException(message, cause)
+fun processorException(message: String, cause: Throwable): BluePrintProcessorException {
+ return BluePrintProcessorException(message, cause)
}
-fun processorException(cause: Throwable, message: String, vararg args: Any?): BlueprintProcessorException {
- return BlueprintProcessorException(cause, message, args)
+fun processorException(cause: Throwable, message: String, vararg args: Any?): BluePrintProcessorException {
+ return BluePrintProcessorException(cause, message, args)
}
-fun processorException(code: Int, message: String): BlueprintProcessorException {
+fun processorException(code: Int, message: String): BluePrintProcessorException {
return processorException(message).code(code)
}
-fun processorException(code: Int, message: String, cause: Throwable): BlueprintProcessorException {
+fun processorException(code: Int, message: String, cause: Throwable): BluePrintProcessorException {
return processorException(message, cause).code(code)
}
-fun processorException(code: Int, cause: Throwable, message: String, vararg args: Any?): BlueprintProcessorException {
+fun processorException(code: Int, cause: Throwable, message: String, vararg args: Any?): BluePrintProcessorException {
return processorException(cause, message, args).code(code)
}
-fun httpProcessorException(type: String, message: String): BlueprintProcessorException {
+fun httpProcessorException(type: String, message: String): BluePrintProcessorException {
return processorException(message).http(type)
}
-fun grpcProcessorException(type: String, message: String): BlueprintProcessorException {
+fun grpcProcessorException(type: String, message: String): BluePrintProcessorException {
return processorException(message).grpc(type)
}
-fun httpProcessorException(type: String, domain: String, message: String): BlueprintProcessorException {
+fun httpProcessorException(type: String, domain: String, message: String): BluePrintProcessorException {
val bluePrintProcessorException = processorException(message).http(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message)
}
-fun grpcProcessorException(type: String, domain: String, message: String): BlueprintProcessorException {
+fun grpcProcessorException(type: String, domain: String, message: String): BluePrintProcessorException {
val bluePrintProcessorException = processorException(message).grpc(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message)
}
fun httpProcessorException(type: String, domain: String, message: String, cause: Throwable):
- BlueprintProcessorException {
+ BluePrintProcessorException {
val bluePrintProcessorException = processorException(message, cause).http(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message, ExceptionUtils.getRootCauseMessage(cause))
}
fun grpcProcessorException(type: String, domain: String, message: String, cause: Throwable):
- BlueprintProcessorException {
+ BluePrintProcessorException {
val bluePrintProcessorException = processorException(message, cause).grpc(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message, ExceptionUtils.getRootCauseMessage(cause))
}
fun httpProcessorException(type: String, domain: String, message: String, cause: Throwable, vararg args: Any?):
- BlueprintProcessorException {
+ BluePrintProcessorException {
val bluePrintProcessorException = processorException(cause, message, args).http(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message, ExceptionUtils.getRootCauseMessage(cause))
}
fun grpcProcessorException(type: String, domain: String, message: String, cause: Throwable, vararg args: Any?):
- BlueprintProcessorException {
+ BluePrintProcessorException {
val bluePrintProcessorException = processorException(cause, message, args).grpc(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message, ExceptionUtils.getRootCauseMessage(cause))
}
-fun BlueprintProcessorException.updateErrorMessage(domain: String, message: String, cause: String):
- BlueprintProcessorException {
+fun BluePrintProcessorException.updateErrorMessage(domain: String, message: String, cause: String):
+ BluePrintProcessorException {
return this.addDomainAndErrorMessage(domain, message, cause).domain(domain)
.addErrorPayloadMessage(message)
.payloadMessage(message)
}
-fun BlueprintProcessorException.updateErrorMessage(domain: String, message: String): BlueprintProcessorException {
+fun BluePrintProcessorException.updateErrorMessage(domain: String, message: String): BluePrintProcessorException {
return this.addDomainAndErrorMessage(domain, message).domain(domain)
.addErrorPayloadMessage(message)
.payloadMessage(message)
}
-private fun BlueprintProcessorException.addDomainAndErrorMessage(
+private fun BluePrintProcessorException.addDomainAndErrorMessage(
domain: String,
message: String,
cause: String = ""
-): BlueprintProcessorException {
+): BluePrintProcessorException {
return this.addSubError(ErrorMessage(domain, message, cause)).domain(domain)
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintTypes.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintTypes.kt
new file mode 100644
index 0000000..1c76993
--- /dev/null
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintTypes.kt
@@ -0,0 +1,170 @@
+/*
+ * 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.
+ */
+
+package org.onap.ccsdk.cds.controllerblueprints.core
+
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
+
+/**
+ *
+ *
+ * @author Brinda Santh
+ */
+object BluePrintTypes {
+
+ @JvmStatic
+ val validNodeTypeDerivedFroms: MutableList<String> = arrayListOf(
+ BluePrintConstants.MODEL_TYPE_NODES_ROOT,
+ BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW,
+ BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
+ BluePrintConstants.MODEL_TYPE_NODE_VNF,
+ BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_JAVA,
+ BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_BUNDLE,
+ BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_SCRIPT,
+ BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_PYTHON,
+ BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_JYTHON,
+ BluePrintConstants.MODEL_TYPE_NODES_COMPONENT_JAVA_SCRIPT
+ )
+
+ @JvmStatic
+ val validArtifactTypeDerivedFroms: MutableList<String> = arrayListOf(
+ BluePrintConstants.MODEL_TYPE_ARTIFACTS_ROOT,
+ BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION
+ )
+
+ @JvmStatic
+ val validDataTypeDerivedFroms: MutableList<String> = arrayListOf(
+ BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT,
+ BluePrintConstants.MODEL_TYPE_DATA_TYPE_DYNAMIC
+ )
+
+ @JvmStatic
+ val validRelationShipDerivedFroms: MutableList<String> = arrayListOf(
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_DEPENDS_ON,
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_HOSTED_ON,
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_ATTACH_TO,
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_ROUTES_TO
+ )
+
+ @JvmStatic
+ val validCapabilityTypes: MutableList<String> = arrayListOf(
+ BluePrintConstants.MODEL_TYPE_CAPABILITIES_ROOT,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_NODE,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_COMPUTE,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_NETWORK,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_STORAGE,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT_PUBLIC,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT_ADMIN,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT_DATABASE,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ATTACHMENT,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_OPERATION_SYSTEM,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_BINDABLE,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_CONTENT,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_MAPPING,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_NETCONF,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_RESTCONF,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_SSH,
+ BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_SFTP
+ )
+
+ @JvmStatic
+ fun validModelTypes(): List<String> {
+ val validTypes: MutableList<String> = arrayListOf()
+ validTypes.add(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
+ validTypes.add(BluePrintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE)
+ validTypes.add(BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE)
+ validTypes.add(BluePrintConstants.MODEL_DEFINITION_TYPE_CAPABILITY_TYPE)
+ validTypes.add(BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE)
+ return validTypes
+ }
+
+ @JvmStatic
+ fun validPropertyTypes(): List<String> {
+ val validTypes: MutableList<String> = arrayListOf()
+ validTypes.addAll(validPrimitiveTypes())
+ validTypes.addAll(validComplexTypes())
+ validTypes.addAll(validCollectionTypes())
+ return validTypes
+ }
+
+ @JvmStatic
+ fun validPrimitiveTypes(): List<String> {
+ val validTypes: MutableList<String> = arrayListOf()
+ validTypes.add(BluePrintConstants.DATA_TYPE_STRING)
+ validTypes.add(BluePrintConstants.DATA_TYPE_INTEGER)
+ validTypes.add(BluePrintConstants.DATA_TYPE_FLOAT)
+ validTypes.add(BluePrintConstants.DATA_TYPE_DOUBLE)
+ validTypes.add(BluePrintConstants.DATA_TYPE_BOOLEAN)
+ validTypes.add(BluePrintConstants.DATA_TYPE_TIMESTAMP)
+ validTypes.add(BluePrintConstants.DATA_TYPE_NULL)
+ return validTypes
+ }
+
+ @JvmStatic
+ fun validComplexTypes(): List<String> {
+ val validTypes: MutableList<String> = arrayListOf()
+ validTypes.add(BluePrintConstants.DATA_TYPE_JSON)
+ validTypes.add(BluePrintConstants.DATA_TYPE_MAP)
+ return validTypes
+ }
+
+ @JvmStatic
+ fun validCollectionTypes(): List<String> {
+ val validTypes: MutableList<String> = arrayListOf()
+ validTypes.add(BluePrintConstants.DATA_TYPE_LIST)
+ return validTypes
+ }
+
+ @JvmStatic
+ fun validPrimitiveOrCollectionPrimitive(propertyDefinition: PropertyDefinition): Boolean {
+ val entrySchema = propertyDefinition.entrySchema?.type ?: BluePrintConstants.DATA_TYPE_NULL
+ return BluePrintTypes.validPropertyTypes().contains(propertyDefinition.type) &&
+ BluePrintTypes.validPrimitiveTypes().contains(entrySchema)
+ }
+
+ @JvmStatic
+ fun validCommands(): List<String> {
+ return listOf(
+ BluePrintConstants.EXPRESSION_DSL_REFERENCE,
+ BluePrintConstants.EXPRESSION_GET_INPUT,
+ BluePrintConstants.EXPRESSION_GET_ATTRIBUTE,
+ BluePrintConstants.EXPRESSION_GET_PROPERTY,
+ BluePrintConstants.EXPRESSION_GET_ARTIFACT,
+ BluePrintConstants.EXPRESSION_GET_OPERATION_OUTPUT,
+ BluePrintConstants.EXPRESSION_GET_NODE_OF_TYPE
+ )
+ }
+
+ @JvmStatic
+ fun rootNodeTypes(): List<String> {
+ return listOf(BluePrintConstants.MODEL_TYPE_NODES_ROOT)
+ }
+
+ @JvmStatic
+ fun rootRelationshipTypes(): List<String> {
+ return listOf(BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT)
+ }
+
+ @JvmStatic
+ fun rootDataTypes(): List<String> {
+ return listOf(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT)
+ }
+}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintTypes.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintTypes.kt
deleted file mode 100644
index cb78ea1..0000000
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintTypes.kt
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * 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.
- */
-
-package org.onap.ccsdk.cds.controllerblueprints.core
-
-import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-
-/**
- *
- *
- * @author Brinda Santh
- */
-object BlueprintTypes {
-
- @JvmStatic
- val validNodeTypeDerivedFroms: MutableList<String> = arrayListOf(
- BlueprintConstants.MODEL_TYPE_NODES_ROOT,
- BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW,
- BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
- BlueprintConstants.MODEL_TYPE_NODE_VNF,
- BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
- BlueprintConstants.MODEL_TYPE_NODES_COMPONENT_JAVA,
- BlueprintConstants.MODEL_TYPE_NODES_COMPONENT_BUNDLE,
- BlueprintConstants.MODEL_TYPE_NODES_COMPONENT_SCRIPT,
- BlueprintConstants.MODEL_TYPE_NODES_COMPONENT_PYTHON,
- BlueprintConstants.MODEL_TYPE_NODES_COMPONENT_JYTHON,
- BlueprintConstants.MODEL_TYPE_NODES_COMPONENT_JAVA_SCRIPT
- )
-
- @JvmStatic
- val validArtifactTypeDerivedFroms: MutableList<String> = arrayListOf(
- BlueprintConstants.MODEL_TYPE_ARTIFACTS_ROOT,
- BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION
- )
-
- @JvmStatic
- val validDataTypeDerivedFroms: MutableList<String> = arrayListOf(
- BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT,
- BlueprintConstants.MODEL_TYPE_DATA_TYPE_DYNAMIC
- )
-
- @JvmStatic
- val validRelationShipDerivedFroms: MutableList<String> = arrayListOf(
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_DEPENDS_ON,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_HOSTED_ON,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_ATTACH_TO,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_ROUTES_TO
- )
-
- @JvmStatic
- val validCapabilityTypes: MutableList<String> = arrayListOf(
- BlueprintConstants.MODEL_TYPE_CAPABILITIES_ROOT,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_NODE,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_COMPUTE,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_NETWORK,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_STORAGE,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT_PUBLIC,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT_ADMIN,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT_DATABASE,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ATTACHMENT,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_OPERATION_SYSTEM,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_BINDABLE,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_CONTENT,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_MAPPING,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_NETCONF,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_RESTCONF,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_SSH,
- BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_SFTP
- )
-
- @JvmStatic
- fun validModelTypes(): List<String> {
- val validTypes: MutableList<String> = arrayListOf()
- validTypes.add(BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
- validTypes.add(BlueprintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE)
- validTypes.add(BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE)
- validTypes.add(BlueprintConstants.MODEL_DEFINITION_TYPE_CAPABILITY_TYPE)
- validTypes.add(BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE)
- return validTypes
- }
-
- @JvmStatic
- fun validPropertyTypes(): List<String> {
- val validTypes: MutableList<String> = arrayListOf()
- validTypes.addAll(validPrimitiveTypes())
- validTypes.addAll(validComplexTypes())
- validTypes.addAll(validCollectionTypes())
- return validTypes
- }
-
- @JvmStatic
- fun validPrimitiveTypes(): List<String> {
- val validTypes: MutableList<String> = arrayListOf()
- validTypes.add(BlueprintConstants.DATA_TYPE_STRING)
- validTypes.add(BlueprintConstants.DATA_TYPE_INTEGER)
- validTypes.add(BlueprintConstants.DATA_TYPE_FLOAT)
- validTypes.add(BlueprintConstants.DATA_TYPE_DOUBLE)
- validTypes.add(BlueprintConstants.DATA_TYPE_BOOLEAN)
- validTypes.add(BlueprintConstants.DATA_TYPE_TIMESTAMP)
- validTypes.add(BlueprintConstants.DATA_TYPE_NULL)
- return validTypes
- }
-
- @JvmStatic
- fun validComplexTypes(): List<String> {
- val validTypes: MutableList<String> = arrayListOf()
- validTypes.add(BlueprintConstants.DATA_TYPE_JSON)
- validTypes.add(BlueprintConstants.DATA_TYPE_MAP)
- return validTypes
- }
-
- @JvmStatic
- fun validCollectionTypes(): List<String> {
- val validTypes: MutableList<String> = arrayListOf()
- validTypes.add(BlueprintConstants.DATA_TYPE_LIST)
- return validTypes
- }
-
- @JvmStatic
- fun validPrimitiveOrCollectionPrimitive(propertyDefinition: PropertyDefinition): Boolean {
- val entrySchema = propertyDefinition.entrySchema?.type ?: BlueprintConstants.DATA_TYPE_NULL
- return BlueprintTypes.validPropertyTypes().contains(propertyDefinition.type) &&
- BlueprintTypes.validPrimitiveTypes().contains(entrySchema)
- }
-
- @JvmStatic
- fun validCommands(): List<String> {
- return listOf(
- BlueprintConstants.EXPRESSION_DSL_REFERENCE,
- BlueprintConstants.EXPRESSION_GET_INPUT,
- BlueprintConstants.EXPRESSION_GET_ATTRIBUTE,
- BlueprintConstants.EXPRESSION_GET_PROPERTY,
- BlueprintConstants.EXPRESSION_GET_ARTIFACT,
- BlueprintConstants.EXPRESSION_GET_OPERATION_OUTPUT,
- BlueprintConstants.EXPRESSION_GET_NODE_OF_TYPE
- )
- }
-
- @JvmStatic
- fun rootNodeTypes(): List<String> {
- return listOf(BlueprintConstants.MODEL_TYPE_NODES_ROOT)
- }
-
- @JvmStatic
- fun rootRelationshipTypes(): List<String> {
- return listOf(BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT)
- }
-
- @JvmStatic
- fun rootDataTypes(): List<String> {
- return listOf(BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT)
- }
-}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt
index 25abcd3..ebe6826 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctions.kt
@@ -113,7 +113,7 @@
is Double ->
this.asJsonPrimitive()
else ->
- throw BlueprintException("$this type is not supported")
+ throw BluePrintException("$this type is not supported")
}
}
}
@@ -121,11 +121,11 @@
/** Based on Blueprint DataType Convert string value to JsonNode Type **/
fun String.asJsonType(bpDataType: String): JsonNode {
return when (bpDataType.toLowerCase()) {
- BlueprintConstants.DATA_TYPE_STRING -> this.asJsonPrimitive()
- BlueprintConstants.DATA_TYPE_BOOLEAN -> this.toBoolean().asJsonPrimitive()
- BlueprintConstants.DATA_TYPE_INTEGER -> this.toInt().asJsonPrimitive()
- BlueprintConstants.DATA_TYPE_FLOAT -> this.toFloat().asJsonPrimitive()
- BlueprintConstants.DATA_TYPE_DOUBLE -> this.toDouble().asJsonPrimitive()
+ BluePrintConstants.DATA_TYPE_STRING -> this.asJsonPrimitive()
+ BluePrintConstants.DATA_TYPE_BOOLEAN -> this.toBoolean().asJsonPrimitive()
+ BluePrintConstants.DATA_TYPE_INTEGER -> this.toInt().asJsonPrimitive()
+ BluePrintConstants.DATA_TYPE_FLOAT -> this.toFloat().asJsonPrimitive()
+ BluePrintConstants.DATA_TYPE_DOUBLE -> this.toDouble().asJsonPrimitive()
// For List, Map and Complex Types.
else -> this.jsonAsJsonType()
}
@@ -182,7 +182,7 @@
if (containsKey(key)) {
return get(key) as T
} else {
- throw BlueprintException("couldn't find the key $key")
+ throw BluePrintException("couldn't find the key $key")
}
}
@@ -197,7 +197,7 @@
fun <T> JsonNode.asType(clazzType: Class<T>): T {
return JacksonUtils.readValue(this, clazzType)
- ?: throw BlueprintException("couldn't convert JsonNode of type $clazzType")
+ ?: throw BluePrintException("couldn't convert JsonNode of type $clazzType")
}
fun JsonNode.asListOfString(): List<String> {
@@ -226,7 +226,7 @@
}
return propertyMap
} else {
- throw BlueprintException("json node should be Object Node Type")
+ throw BluePrintException("json node should be Object Node Type")
}
}
@@ -248,19 +248,19 @@
}
fun Map<String, JsonNode>.getAsString(key: String): String {
- return this[key]?.asText() ?: throw BlueprintException("couldn't find value for key($key)")
+ return this[key]?.asText() ?: throw BluePrintException("couldn't find value for key($key)")
}
fun Map<String, JsonNode>.getAsBoolean(key: String): Boolean {
- return this[key]?.asBoolean() ?: throw BlueprintException("couldn't find value for key($key)")
+ return this[key]?.asBoolean() ?: throw BluePrintException("couldn't find value for key($key)")
}
fun Map<String, JsonNode>.getAsInt(key: String): Int {
- return this[key]?.asInt() ?: throw BlueprintException("couldn't find value for key($key)")
+ return this[key]?.asInt() ?: throw BluePrintException("couldn't find value for key($key)")
}
fun Map<String, JsonNode>.getAsDouble(key: String): Double {
- return this[key]?.asDouble() ?: throw BlueprintException("couldn't find value for key($key)")
+ return this[key]?.asDouble() ?: throw BluePrintException("couldn't find value for key($key)")
}
fun Map<String, JsonNode>.getOptionalAsString(key: String): String? {
@@ -285,7 +285,7 @@
if (value1.equals(value2, ignoreCase = true)) {
return true
} else {
- throw BlueprintException(lazyMessage().toString())
+ throw BluePrintException(lazyMessage().toString())
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/FileExtensionFunctions.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/FileExtensionFunctions.kt
index ca3d815..518e9b2 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/FileExtensionFunctions.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/FileExtensionFunctions.kt
@@ -19,7 +19,7 @@
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.apache.commons.io.FileUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
import java.io.File
import java.io.InputStream
import java.nio.charset.Charset
@@ -39,7 +39,7 @@
// this.mkdirs()
FileUtils.forceMkdir(this)
check(this.exists()) {
- throw BlueprintException("failed to re create dir(${this.absolutePath})")
+ throw BluePrintException("failed to re create dir(${this.absolutePath})")
}
return this
}
@@ -52,7 +52,7 @@
* Compress the current Dir to the target zip file and return the target zip file
*/
fun File.compress(targetZipFile: File): File {
- BlueprintArchiveUtils.compress(this, targetZipFile)
+ BluePrintArchiveUtils.compress(this, targetZipFile)
return targetZipFile
}
@@ -64,7 +64,7 @@
* De-Compress the current zip file to the target file and return the target file
*/
fun File.deCompress(targetFile: File): File {
- BlueprintArchiveUtils.deCompress(this, targetFile.path)
+ BluePrintArchiveUtils.deCompress(this, targetFile.path)
return targetFile
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BlueprintsAnnotations.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BluePrintsAnnotations.kt
similarity index 89%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BlueprintsAnnotations.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BluePrintsAnnotations.kt
index a72860a..c394429 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BlueprintsAnnotations.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BluePrintsAnnotations.kt
@@ -16,25 +16,25 @@
package org.onap.ccsdk.cds.controllerblueprints.core.annotations
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import kotlin.reflect.KClass
@Target(AnnotationTarget.CLASS)
-annotation class BlueprintsDataType(
+annotation class BluePrintsDataType(
val name: String,
- val version: String = BlueprintConstants.DEFAULT_VERSION_NUMBER,
+ val version: String = BluePrintConstants.DEFAULT_VERSION_NUMBER,
val description: String,
val derivedFrom: String = "tosca.datatypes.root"
)
@Target(AnnotationTarget.CLASS)
-annotation class BlueprintsWorkflowInput
+annotation class BluePrintsWorkflowInput
@Target(AnnotationTarget.CLASS)
-annotation class BlueprintsWorkflowOutput
+annotation class BluePrintsWorkflowOutput
@Target(AnnotationTarget.CLASS)
-annotation class BlueprintsNodeType(
+annotation class BluePrintsNodeType(
val propertiesType: KClass<*>,
val attributesType: KClass<*>,
val inputsType: KClass<*>,
@@ -42,14 +42,14 @@
)
@Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
-annotation class BlueprintsProperty(
+annotation class BluePrintsProperty(
val name: String = "",
val description: String = ""
)
@Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
@Repeatable
-annotation class BlueprintsConstrain()
+annotation class BluePrintsConstrain()
@Target(AnnotationTarget.FIELD, AnnotationTarget.TYPE_PARAMETER, AnnotationTarget.PROPERTY)
annotation class PropertyDefaultValue(val value: String)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BlueprintLoadConfiguration.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BluePrintLoadConfiguration.kt
similarity index 91%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BlueprintLoadConfiguration.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BluePrintLoadConfiguration.kt
index 5176ffe..adfbf29 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BlueprintLoadConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/config/BluePrintLoadConfiguration.kt
@@ -17,13 +17,13 @@
package org.onap.ccsdk.cds.controllerblueprints.core.config
-open class BlueprintLoadConfiguration {
+open class BluePrintLoadConfiguration {
lateinit var blueprintDeployPath: String
lateinit var blueprintArchivePath: String
lateinit var blueprintWorkingPath: String
- var loadBlueprintPaths: String? = null
+ var loadBluePrintPaths: String? = null
var loadModeTypePaths: String? = null
var loadResourceDictionaryPaths: String? = null
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BlueprintExpressionData.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BluePrintExpressionData.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BlueprintExpressionData.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BluePrintExpressionData.kt
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BlueprintGraph.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BluePrintGraph.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BlueprintGraph.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BluePrintGraph.kt
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BlueprintModel.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BluePrintModel.kt
similarity index 99%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BlueprintModel.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BluePrintModel.kt
index 49736c1..9f32d88 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BlueprintModel.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/data/BluePrintModel.kt
@@ -23,7 +23,7 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder
import com.fasterxml.jackson.databind.JsonNode
import io.swagger.annotations.ApiModelProperty
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
/**
@@ -248,7 +248,7 @@
var dependencies: MutableList<String>? = null
@get:JsonProperty("operation_host")
- var operationHost: String = BlueprintConstants.PROPERTY_SELF
+ var operationHost: String = BluePrintConstants.PROPERTY_SELF
// Timeout value in seconds
var timeout: Int = 180
@@ -732,5 +732,5 @@
lateinit var templateName: String
lateinit var templateVersion: String
lateinit var templateTags: String
- var templateType: String = BlueprintConstants.BLUEPRINT_TYPE_DEFAULT
+ var templateType: String = BluePrintConstants.BLUEPRINT_TYPE_DEFAULT
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSL.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSL.kt
similarity index 66%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSL.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSL.kt
index 81593c9..7f30004 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSL.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.controllerblueprints.core.dsl
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
@@ -35,9 +35,9 @@
version: String,
author: String,
tags: String,
- block: DSLBlueprintBuilder.() -> Unit
-): DSLBlueprint {
- return DSLBlueprintBuilder(name, version, author, tags).apply(block).build()
+ block: DSLBluePrintBuilder.() -> Unit
+): DSLBluePrint {
+ return DSLBluePrintBuilder(name, version, author, tags).apply(block).build()
}
// TOSCA DSLs
@@ -172,59 +172,59 @@
/** Blueprint Type Extensions */
fun ServiceTemplateBuilder.nodeTypeComponent() {
- val nodeType = BlueprintTypes.nodeTypeComponent()
+ val nodeType = BluePrintTypes.nodeTypeComponent()
if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
this.nodeTypes!![nodeType.id!!] = nodeType
}
-fun BlueprintTypes.nodeTypeComponent(): NodeType {
+fun BluePrintTypes.nodeTypeComponent(): NodeType {
return nodeType(
- id = BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODES_ROOT,
+ id = BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODES_ROOT,
description = "This is default Component Node"
) {
}
}
@Deprecated("CDS won't support, use implerative workflow definitions.")
-fun BlueprintTypes.nodeTypeWorkflow(): NodeType {
+fun BluePrintTypes.nodeTypeWorkflow(): NodeType {
return nodeType(
- id = BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODES_ROOT,
+ id = BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODES_ROOT,
description = "This is default Workflow Node"
) {
}
}
fun ServiceTemplateBuilder.nodeTypeVnf() {
- val nodeType = BlueprintTypes.nodeTypeVnf()
+ val nodeType = BluePrintTypes.nodeTypeVnf()
if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
this.nodeTypes!![nodeType.id!!] = nodeType
}
-fun BlueprintTypes.nodeTypeVnf(): NodeType {
+fun BluePrintTypes.nodeTypeVnf(): NodeType {
return nodeType(
- id = BlueprintConstants.MODEL_TYPE_NODE_VNF,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODES_ROOT,
+ id = BluePrintConstants.MODEL_TYPE_NODE_VNF,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODES_ROOT,
description = "This is default VNF Node"
) {
}
}
fun ServiceTemplateBuilder.nodeTypeResourceSource() {
- val nodeType = BlueprintTypes.nodeTypeResourceSource()
+ val nodeType = BluePrintTypes.nodeTypeResourceSource()
if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
this.nodeTypes!![nodeType.id!!] = nodeType
}
-fun BlueprintTypes.nodeTypeResourceSource(): NodeType {
+fun BluePrintTypes.nodeTypeResourceSource(): NodeType {
return nodeType(
- id = BlueprintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODES_ROOT,
+ id = BluePrintConstants.MODEL_TYPE_NODE_RESOURCE_SOURCE,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODES_ROOT,
description = "This is default Resource Source Node"
) {
}
@@ -232,16 +232,16 @@
/** Artifacts */
fun ServiceTemplateBuilder.artifactTypeTemplateVelocity() {
- val artifactType = BlueprintTypes.artifactTypeTemplateVelocity()
+ val artifactType = BluePrintTypes.artifactTypeTemplateVelocity()
if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
this.artifactTypes!![artifactType.id!!] = artifactType
}
-fun BlueprintTypes.artifactTypeTemplateVelocity(): ArtifactType {
+fun BluePrintTypes.artifactTypeTemplateVelocity(): ArtifactType {
return artifactType(
- id = BlueprintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_VELOCITY,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ id = BluePrintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_VELOCITY,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
description = "Velocity Artifact"
) {
fileExt("vtl")
@@ -249,16 +249,16 @@
}
fun ServiceTemplateBuilder.artifactTypeTempleJinja() {
- val artifactType = BlueprintTypes.artifactTypeTempleJinja()
+ val artifactType = BluePrintTypes.artifactTypeTempleJinja()
if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
this.artifactTypes!![artifactType.id!!] = artifactType
}
-fun BlueprintTypes.artifactTypeTempleJinja(): ArtifactType {
+fun BluePrintTypes.artifactTypeTempleJinja(): ArtifactType {
return artifactType(
- id = BlueprintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_JINJA,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ id = BluePrintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_JINJA,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
description = "Jinja Artifact"
) {
fileExt("jinja")
@@ -266,16 +266,16 @@
}
fun ServiceTemplateBuilder.artifactTypeMappingResource() {
- val artifactType = BlueprintTypes.artifactTypeMappingResource()
+ val artifactType = BluePrintTypes.artifactTypeMappingResource()
if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
this.artifactTypes!![artifactType.id!!] = artifactType
}
-fun BlueprintTypes.artifactTypeMappingResource(): ArtifactType {
+fun BluePrintTypes.artifactTypeMappingResource(): ArtifactType {
return artifactType(
- id = BlueprintConstants.MODEL_TYPE_ARTIFACT_MAPPING_RESOURCE,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ id = BluePrintConstants.MODEL_TYPE_ARTIFACT_MAPPING_RESOURCE,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
description = "Mapping Resource Artifact"
) {
fileExt("json")
@@ -283,11 +283,11 @@
}
@Deprecated("CDS won't support", replaceWith = ReplaceWith("artifactTypeScriptKotlin"))
-fun BlueprintTypes.artifactTypeScriptJython(): ArtifactType {
+fun BluePrintTypes.artifactTypeScriptJython(): ArtifactType {
return artifactType(
- id = BlueprintConstants.MODEL_TYPE_ARTIFACT_SCRIPT_JYTHON,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ id = BluePrintConstants.MODEL_TYPE_ARTIFACT_SCRIPT_JYTHON,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
description = "Jython Script Artifact"
) {
fileExt("py")
@@ -295,16 +295,16 @@
}
fun ServiceTemplateBuilder.artifactTypeScriptKotlin() {
- val artifactType = BlueprintTypes.artifactTypeScriptKotlin()
+ val artifactType = BluePrintTypes.artifactTypeScriptKotlin()
if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
this.artifactTypes!![artifactType.id!!] = artifactType
}
-fun BlueprintTypes.artifactTypeScriptKotlin(): ArtifactType {
+fun BluePrintTypes.artifactTypeScriptKotlin(): ArtifactType {
return artifactType(
- id = BlueprintConstants.MODEL_TYPE_ARTIFACT_SCRIPT_KOTLIN,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ id = BluePrintConstants.MODEL_TYPE_ARTIFACT_SCRIPT_KOTLIN,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
description = "Kotlin Script Artifact"
) {
fileExt("kts")
@@ -312,43 +312,43 @@
}
fun ServiceTemplateBuilder.artifactTypeK8sProfileFolder() {
- val artifactType = BlueprintTypes.artifactTypeK8sProfileFolder()
+ val artifactType = BluePrintTypes.artifactTypeK8sProfileFolder()
if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
this.artifactTypes!![artifactType.id!!] = artifactType
}
-fun BlueprintTypes.artifactTypeK8sProfileFolder(): ArtifactType {
+fun BluePrintTypes.artifactTypeK8sProfileFolder(): ArtifactType {
return artifactType(
- id = BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ id = BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_PROFILE,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
description = "K8s Profile Folder Artifact"
) {
}
}
fun ServiceTemplateBuilder.artifactTypeK8sConfigFolder() {
- val artifactType = BlueprintTypes.artifactTypeK8sConfigFolder()
+ val artifactType = BluePrintTypes.artifactTypeK8sConfigFolder()
if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
this.artifactTypes!![artifactType.id!!] = artifactType
}
-fun BlueprintTypes.artifactTypeK8sConfigFolder(): ArtifactType {
+fun BluePrintTypes.artifactTypeK8sConfigFolder(): ArtifactType {
return artifactType(
- id = BlueprintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ id = BluePrintConstants.MODEL_TYPE_ARTIFACT_K8S_CONFIG,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
description = "K8s Config Folder Artifact"
) {
}
}
@Deprecated("CDS won't support, use implerative workflow definitions.")
-fun BlueprintTypes.artifactTypeDirectedGraph(): ArtifactType {
+fun BluePrintTypes.artifactTypeDirectedGraph(): ArtifactType {
return artifactType(
- id = BlueprintConstants.MODEL_TYPE_ARTIFACT_DIRECTED_GRAPH,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ id = BluePrintConstants.MODEL_TYPE_ARTIFACT_DIRECTED_GRAPH,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
description = "Directed Graph Artifact"
) {
fileExt("xml", "json")
@@ -356,16 +356,16 @@
}
fun ServiceTemplateBuilder.artifactTypeComponentJar() {
- val artifactType = BlueprintTypes.artifactTypeComponentJar()
+ val artifactType = BluePrintTypes.artifactTypeComponentJar()
if (this.artifactTypes == null) this.artifactTypes = hashMapOf()
this.artifactTypes!![artifactType.id!!] = artifactType
}
-fun BlueprintTypes.artifactTypeComponentJar(): ArtifactType {
+fun BluePrintTypes.artifactTypeComponentJar(): ArtifactType {
return artifactType(
- id = BlueprintConstants.MODEL_TYPE_ARTIFACT_COMPONENT_JAR,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
+ id = BluePrintConstants.MODEL_TYPE_ARTIFACT_COMPONENT_JAR,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_ARTIFACT_TYPE_IMPLEMENTATION,
description = "Component Artifact"
) {
fileExt("jar")
@@ -375,49 +375,49 @@
/** Relationship Types */
fun ServiceTemplateBuilder.relationshipTypeConnectsTo() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsTo()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsTo()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsTo(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsTo(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
description = "Relationship connects to"
) {
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
fun ServiceTemplateBuilder.relationshipTypeDependsOn() {
- val relationshipType = BlueprintTypes.relationshipTypeDependsOn()
+ val relationshipType = BluePrintTypes.relationshipTypeDependsOn()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeDependsOn(): RelationshipType {
+fun BluePrintTypes.relationshipTypeDependsOn(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_DEPENDS_ON,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_DEPENDS_ON,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
description = "Relationship depends on"
) {
}
}
fun ServiceTemplateBuilder.relationshipTypeHostedOn() {
- val relationshipType = BlueprintTypes.relationshipTypeHostedOn()
+ val relationshipType = BluePrintTypes.relationshipTypeHostedOn()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeHostedOn(): RelationshipType {
+fun BluePrintTypes.relationshipTypeHostedOn(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_HOSTED_ON,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_HOSTED_ON,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_ROOT,
description = "Relationship hosted on"
) {
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSLBuilder.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLBuilder.kt
similarity index 94%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSLBuilder.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLBuilder.kt
index f92a955..b469ded 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSLBuilder.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLBuilder.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.dsl
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
@@ -30,14 +30,14 @@
/**
* @author Brinda Santh
*/
-class DSLBlueprintBuilder(
+class DSLBluePrintBuilder(
private val name: String,
private val version: String,
private val author: String,
private val tags: String
) {
- private var dslBlueprint = DSLBlueprint()
+ private var dslBluePrint = DSLBluePrint()
private var metadata: MutableMap<String, String> = hashMapOf()
var properties: MutableMap<String, JsonNode>? = null
var dataTypes: MutableMap<String, DataType> = hashMapOf()
@@ -47,10 +47,10 @@
var workflows: MutableMap<String, DSLWorkflow> = hashMapOf()
private fun initMetaData() {
- metadata[BlueprintConstants.METADATA_TEMPLATE_NAME] = name
- metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION] = version
- metadata[BlueprintConstants.METADATA_TEMPLATE_AUTHOR] = author
- metadata[BlueprintConstants.METADATA_TEMPLATE_TAGS] = tags
+ metadata[BluePrintConstants.METADATA_TEMPLATE_NAME] = name
+ metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION] = version
+ metadata[BluePrintConstants.METADATA_TEMPLATE_AUTHOR] = author
+ metadata[BluePrintConstants.METADATA_TEMPLATE_TAGS] = tags
}
fun metadata(id: String, value: String) {
@@ -117,16 +117,16 @@
workflows[id] = DSLWorkflowBuilder(id, description).apply(block).build()
}
- fun build(): DSLBlueprint {
+ fun build(): DSLBluePrint {
initMetaData()
- dslBlueprint.metadata = metadata
- dslBlueprint.properties = properties
- dslBlueprint.dataTypes = dataTypes
- dslBlueprint.artifactTypes = artifactTypes
- dslBlueprint.components = components
- dslBlueprint.registryComponents = registryComponents
- dslBlueprint.workflows = workflows
- return dslBlueprint
+ dslBluePrint.metadata = metadata
+ dslBluePrint.properties = properties
+ dslBluePrint.dataTypes = dataTypes
+ dslBluePrint.artifactTypes = artifactTypes
+ dslBluePrint.components = components
+ dslBluePrint.registryComponents = registryComponents
+ dslBluePrint.workflows = workflows
+ return dslBluePrint
}
}
@@ -190,7 +190,7 @@
properties!![id] = property
}
- fun implementation(timeout: Int, operationHost: String? = BlueprintConstants.PROPERTY_SELF) {
+ fun implementation(timeout: Int, operationHost: String? = BluePrintConstants.PROPERTY_SELF) {
implementation = Implementation().apply {
this.operationHost = operationHost!!
this.timeout = timeout
@@ -291,7 +291,7 @@
properties!![id] = expression.asJsonType()
}
- fun implementation(timeout: Int, operationHost: String? = BlueprintConstants.PROPERTY_SELF) {
+ fun implementation(timeout: Int, operationHost: String? = BluePrintConstants.PROPERTY_SELF) {
implementation = Implementation().apply {
this.operationHost = operationHost!!
this.timeout = timeout
@@ -413,7 +413,7 @@
class DSLAttributeDefinitionBuilder(
private val id: String,
- private val type: String? = BlueprintConstants.DATA_TYPE_STRING,
+ private val type: String? = BluePrintConstants.DATA_TYPE_STRING,
private val required: Boolean? = false,
private val expression: JsonNode,
private val description: String? = ""
@@ -446,7 +446,7 @@
class DSLPropertyDefinitionBuilder(
private val id: String,
- private val type: String? = BlueprintConstants.DATA_TYPE_STRING,
+ private val type: String? = BluePrintConstants.DATA_TYPE_STRING,
private val required: Boolean? = false,
private val expression: JsonNode,
private val description: String? = ""
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSLData.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLData.kt
similarity index 99%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSLData.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLData.kt
index 8f1a8d1..370531d 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSLData.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLData.kt
@@ -31,7 +31,7 @@
* @author Brinda Santh
*/
-class DSLBlueprint {
+class DSLBluePrint {
var metadata: MutableMap<String, String> = hashMapOf()
var properties: MutableMap<String, JsonNode>? = null
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintServiceTemplateGenerator.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintServiceTemplateGenerator.kt
similarity index 89%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintServiceTemplateGenerator.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintServiceTemplateGenerator.kt
index 21bc8c7..d07fc9c 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintServiceTemplateGenerator.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintServiceTemplateGenerator.kt
@@ -18,7 +18,7 @@
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.NullNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.bpClone
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeDefinition
@@ -38,7 +38,7 @@
* Generate Service Template for the simplified DSL.
* @author Brinda Santh
*/
-class BlueprintServiceTemplateGenerator(private val dslBlueprint: DSLBlueprint) {
+class BluePrintServiceTemplateGenerator(private val dslBluePrint: DSLBluePrint) {
private var serviceTemplate = ServiceTemplate()
@@ -47,11 +47,11 @@
private val dataTypes: MutableMap<String, DataType> = hashMapOf()
fun serviceTemplate(): ServiceTemplate {
- serviceTemplate.metadata = dslBlueprint.metadata
- serviceTemplate.dslDefinitions = dslBlueprint.properties
+ serviceTemplate.metadata = dslBluePrint.metadata
+ serviceTemplate.dslDefinitions = dslBluePrint.properties
- dataTypes.putAll(dslBlueprint.dataTypes)
- artifactTypes.putAll(dslBlueprint.artifactTypes)
+ dataTypes.putAll(dslBluePrint.dataTypes)
+ artifactTypes.putAll(dslBluePrint.artifactTypes)
serviceTemplate.dataTypes = dataTypes
serviceTemplate.artifactTypes = artifactTypes
@@ -74,7 +74,7 @@
val nodeTemplates: MutableMap<String, NodeTemplate> = hashMapOf()
// For New or Dynamic Components
- val components = dslBlueprint.components
+ val components = dslBluePrint.components
components.forEach { (dslCompName, dslComp) ->
val nodeTemplate = NodeTemplate()
nodeTemplate.type = dslComp.type
@@ -88,7 +88,7 @@
}
// For Registry Components
- val registryComponents = dslBlueprint.registryComponents
+ val registryComponents = dslBluePrint.registryComponents
registryComponents.forEach { (dslCompName, dslComp) ->
val nodeTemplate = NodeTemplate()
nodeTemplate.type = dslComp.type
@@ -102,10 +102,10 @@
private fun populateWorkflow(): MutableMap<String, Workflow>? {
var workflows: MutableMap<String, Workflow>? = null
- if (dslBlueprint.workflows.isNotEmpty()) {
+ if (dslBluePrint.workflows.isNotEmpty()) {
workflows = hashMapOf()
- dslBlueprint.workflows.forEach { (dslWorkflowName, dslWorkflow) ->
+ dslBluePrint.workflows.forEach { (dslWorkflowName, dslWorkflow) ->
val workflow = Workflow()
workflow.description = dslWorkflow.description
workflow.steps = dslWorkflow.steps
@@ -119,7 +119,7 @@
private fun populateNodeType(dslComponent: DSLComponent): NodeType {
val nodeType = NodeType()
- nodeType.derivedFrom = BlueprintConstants.MODEL_TYPE_NODES_ROOT
+ nodeType.derivedFrom = BluePrintConstants.MODEL_TYPE_NODES_ROOT
nodeType.version = dslComponent.version
nodeType.description = dslComponent.description
nodeType.interfaces = populateInterfaceDefinitions(dslComponent, nodeType)
@@ -136,13 +136,13 @@
operationDefinition.outputs = propertyDefinitions(dslComponent.outputs)
val operations: MutableMap<String, OperationDefinition> = hashMapOf()
- operations[BlueprintConstants.DEFAULT_STEP_OPERATION] = operationDefinition
+ operations[BluePrintConstants.DEFAULT_STEP_OPERATION] = operationDefinition
val interfaceDefinition = InterfaceDefinition()
interfaceDefinition.operations = operations
val interfaces: MutableMap<String, InterfaceDefinition> = hashMapOf()
- interfaces[BlueprintConstants.DEFAULT_STEP_INTERFACE] = interfaceDefinition
+ interfaces[BluePrintConstants.DEFAULT_STEP_INTERFACE] = interfaceDefinition
return interfaces
}
@@ -153,7 +153,7 @@
operationAssignment.outputs = dslComponent.outputs
val operations: MutableMap<String, OperationAssignment> = hashMapOf()
- operations[BlueprintConstants.DEFAULT_STEP_OPERATION] = operationAssignment
+ operations[BluePrintConstants.DEFAULT_STEP_OPERATION] = operationAssignment
val interfaceAssignment = InterfaceAssignment()
interfaceAssignment.operations = operations
@@ -170,13 +170,13 @@
operationAssignment.outputs = propertyAssignments(dslComponent.outputs)
val operations: MutableMap<String, OperationAssignment> = hashMapOf()
- operations[BlueprintConstants.DEFAULT_STEP_OPERATION] = operationAssignment
+ operations[BluePrintConstants.DEFAULT_STEP_OPERATION] = operationAssignment
val interfaceAssignment = InterfaceAssignment()
interfaceAssignment.operations = operations
val interfaces: MutableMap<String, InterfaceAssignment> = hashMapOf()
- interfaces[BlueprintConstants.DEFAULT_STEP_INTERFACE] = interfaceAssignment
+ interfaces[BluePrintConstants.DEFAULT_STEP_INTERFACE] = interfaceAssignment
return interfaces
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintTemplateDSLBuilder.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTemplateDSLBuilder.kt
similarity index 98%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintTemplateDSLBuilder.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTemplateDSLBuilder.kt
index f8f6080..3a35034 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintTemplateDSLBuilder.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTemplateDSLBuilder.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.dsl
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityAssignment
@@ -156,7 +156,7 @@
if (interfaces == null) interfaces = hashMapOf()
val interfaceAssignment = InterfaceAssignment()
- val defaultOperationName = BlueprintConstants.DEFAULT_STEP_OPERATION
+ val defaultOperationName = BluePrintConstants.DEFAULT_STEP_OPERATION
interfaceAssignment.operations = hashMapOf()
interfaceAssignment.operations!![defaultOperationName] =
OperationAssignmentBuilder<In, Out>(defaultOperationName, description).apply(block).build()
@@ -380,7 +380,7 @@
operationAssignment.implementation = implementation
}
- fun implementation(timeout: Int, operationHost: String? = BlueprintConstants.PROPERTY_SELF) {
+ fun implementation(timeout: Int, operationHost: String? = BluePrintConstants.PROPERTY_SELF) {
operationAssignment.implementation = Implementation().apply {
this.operationHost = operationHost!!
this.timeout = timeout
@@ -389,7 +389,7 @@
fun implementation(
timeout: Int,
- operationHost: String? = BlueprintConstants.PROPERTY_SELF,
+ operationHost: String? = BluePrintConstants.PROPERTY_SELF,
block: ImplementationBuilder.() -> Unit
) {
operationAssignment.implementation = ImplementationBuilder(timeout, operationHost!!).apply(block).build()
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintTypeDSLBuilder.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTypeDSLBuilder.kt
similarity index 98%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintTypeDSLBuilder.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTypeDSLBuilder.kt
index 3b3b4b4..3dfdbac 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintTypeDSLBuilder.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintTypeDSLBuilder.kt
@@ -18,7 +18,7 @@
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.ArrayNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.asListOfString
@@ -285,7 +285,7 @@
private var capabilityDefinition = CapabilityDefinition()
private val properties: MutableMap<String, PropertyDefinition> = hashMapOf()
- fun property(id: String, type: String? = BlueprintConstants.DATA_TYPE_STRING, required: Boolean? = false, description: String? = "") {
+ fun property(id: String, type: String? = BluePrintConstants.DATA_TYPE_STRING, required: Boolean? = false, description: String? = "") {
val property = PropertyDefinitionBuilder(id, type, required, description).build()
properties[id] = property
}
@@ -361,7 +361,7 @@
class AttributeDefinitionBuilder(
private val id: String,
- private val type: String? = BlueprintConstants.DATA_TYPE_STRING,
+ private val type: String? = BluePrintConstants.DATA_TYPE_STRING,
private val required: Boolean? = false,
private val description: String? = ""
) {
@@ -432,7 +432,7 @@
class PropertyDefinitionBuilder(
private val id: String,
- private val type: String? = BlueprintConstants.DATA_TYPE_STRING,
+ private val type: String? = BluePrintConstants.DATA_TYPE_STRING,
private val required: Boolean? = false,
private val description: String? = ""
) {
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintWorkflowDSLBuilder.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintWorkflowDSLBuilder.kt
similarity index 96%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintWorkflowDSLBuilder.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintWorkflowDSLBuilder.kt
index 0de1a51..8a1a9d6 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintWorkflowDSLBuilder.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintWorkflowDSLBuilder.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.dsl
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asPropertyDefinitionMap
import org.onap.ccsdk.cds.controllerblueprints.core.data.Activity
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
@@ -111,7 +111,7 @@
step.id = id
step.target = target
// Add Default Activity, Assumption is only one Operation
- activity(".${BlueprintConstants.DEFAULT_STEP_OPERATION}")
+ activity(".${BluePrintConstants.DEFAULT_STEP_OPERATION}")
step.description = description
step.activities = activities
step.onSuccess = onSuccess
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/ServiceTemplateBuilder.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/ServiceTemplateBuilder.kt
index 4391e89..254e644 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/ServiceTemplateBuilder.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/ServiceTemplateBuilder.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.controllerblueprints.core.dsl
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.asBlueprintsDataTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.asBluePrintsDataTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.asPropertyDefinitionMap
@@ -51,10 +51,10 @@
var policyTypes: MutableMap<String, PolicyType>? = null
private fun initMetaData() {
- metadata[BlueprintConstants.METADATA_TEMPLATE_NAME] = name
- metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION] = version
- metadata[BlueprintConstants.METADATA_TEMPLATE_AUTHOR] = author
- metadata[BlueprintConstants.METADATA_TEMPLATE_TAGS] = tags
+ metadata[BluePrintConstants.METADATA_TEMPLATE_NAME] = name
+ metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION] = version
+ metadata[BluePrintConstants.METADATA_TEMPLATE_AUTHOR] = author
+ metadata[BluePrintConstants.METADATA_TEMPLATE_TAGS] = tags
}
fun metadata(id: String, value: String) {
@@ -73,7 +73,7 @@
}
fun dataType(dataType: KClass<*>) {
- dataType(dataType.asBlueprintsDataTypes())
+ dataType(dataType.asBluePrintsDataTypes())
}
fun dsl(id: String, content: Any) {
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintCatalogService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintCatalogService.kt
old mode 100644
new mode 100755
similarity index 82%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintCatalogService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintCatalogService.kt
index 87ee0e4..bd45bed
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintCatalogService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintCatalogService.kt
@@ -16,11 +16,11 @@
package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import java.io.File
import java.nio.file.Path
-interface BlueprintCatalogService {
+interface BluePrintCatalogService {
/**
* Save the CBA to database.
@@ -28,9 +28,9 @@
* @param blueprintFile Either a directory, or an archive
* @param validate whether to validate blueprint content. Default true.
* @return The unique blueprint identifier
- * @throws BlueprintException if process failed
+ * @throws BluePrintException if process failed
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveToDatabase(processingId: String, blueprintFile: File, validate: Boolean = true): String
/**
@@ -39,19 +39,19 @@
* @param version Version of the blueprint
* @param extract true to extract the content, false for archived content. Default to true
* @return Path where CBA is located
- * @throws BlueprintException if process failed
+ * @throws BluePrintException if process failed
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun getFromDatabase(name: String, version: String, extract: Boolean = true): Path
/**
* Delete the CBA from database.
* @param name Name of the blueprint
* @param version Version of the blueprint
- * @throws BlueprintException if process failed
+ * @throws BluePrintException if process failed
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun deleteFromDatabase(name: String, version: String)
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintDefinitions.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintDefinitions.kt
similarity index 94%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintDefinitions.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintDefinitions.kt
index 109bc7b..fcc9bf2 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintDefinitions.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintDefinitions.kt
@@ -18,7 +18,7 @@
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
-interface BlueprintDefinitions {
+interface BluePrintDefinitions {
/** Define the service Template Model */
fun serviceTemplate(): ServiceTemplate
@@ -35,7 +35,7 @@
fun otherDefinitions(): MutableMap<String, Any>
}
-abstract class AbstractBlueprintDefinitions : BlueprintDefinitions {
+abstract class AbstractBluePrintDefinitions : BluePrintDefinitions {
private val otherDefinitionMap: MutableMap<String, Any> = hashMapOf()
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintEnhancer.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintEnhancer.kt
similarity index 66%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintEnhancer.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintEnhancer.kt
index 318fd2b..2080cd1 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintEnhancer.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintEnhancer.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
@@ -29,71 +29,71 @@
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-interface BlueprintEnhancer<T> {
+interface BluePrintEnhancer<T> {
- fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, type: T)
+ fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, type: T)
}
-interface BlueprintServiceTemplateEnhancer : BlueprintEnhancer<ServiceTemplate>
+interface BluePrintServiceTemplateEnhancer : BluePrintEnhancer<ServiceTemplate>
-interface BlueprintTopologyTemplateEnhancer : BlueprintEnhancer<TopologyTemplate>
+interface BluePrintTopologyTemplateEnhancer : BluePrintEnhancer<TopologyTemplate>
-interface BlueprintWorkflowEnhancer : BlueprintEnhancer<Workflow>
+interface BluePrintWorkflowEnhancer : BluePrintEnhancer<Workflow>
-interface BlueprintNodeTemplateEnhancer : BlueprintEnhancer<NodeTemplate>
+interface BluePrintNodeTemplateEnhancer : BluePrintEnhancer<NodeTemplate>
-interface BlueprintNodeTypeEnhancer : BlueprintEnhancer<NodeType>
+interface BluePrintNodeTypeEnhancer : BluePrintEnhancer<NodeType>
-interface BlueprintRelationshipTemplateEnhancer : BlueprintEnhancer<RelationshipTemplate>
+interface BluePrintRelationshipTemplateEnhancer : BluePrintEnhancer<RelationshipTemplate>
-interface BlueprintRelationshipTypeEnhancer : BlueprintEnhancer<RelationshipType>
+interface BluePrintRelationshipTypeEnhancer : BluePrintEnhancer<RelationshipType>
-interface BlueprintArtifactDefinitionEnhancer : BlueprintEnhancer<ArtifactDefinition>
+interface BluePrintArtifactDefinitionEnhancer : BluePrintEnhancer<ArtifactDefinition>
-interface BlueprintPolicyTypeEnhancer : BlueprintEnhancer<PolicyType>
+interface BluePrintPolicyTypeEnhancer : BluePrintEnhancer<PolicyType>
-interface BlueprintPropertyDefinitionEnhancer : BlueprintEnhancer<PropertyDefinition>
+interface BluePrintPropertyDefinitionEnhancer : BluePrintEnhancer<PropertyDefinition>
-interface BlueprintAttributeDefinitionEnhancer : BlueprintEnhancer<AttributeDefinition>
+interface BluePrintAttributeDefinitionEnhancer : BluePrintEnhancer<AttributeDefinition>
-interface BlueprintEnhancerService {
+interface BluePrintEnhancerService {
- @Throws(BlueprintException::class)
- suspend fun enhance(basePath: String, enrichedBasePath: String): BlueprintContext
+ @Throws(BluePrintException::class)
+ suspend fun enhance(basePath: String, enrichedBasePath: String): BluePrintContext
- @Throws(BlueprintException::class)
- suspend fun enhance(basePath: String): BlueprintContext
+ @Throws(BluePrintException::class)
+ suspend fun enhance(basePath: String): BluePrintContext
}
-interface BlueprintTypeEnhancerService {
+interface BluePrintTypeEnhancerService {
- fun getServiceTemplateEnhancers(): List<BlueprintServiceTemplateEnhancer>
+ fun getServiceTemplateEnhancers(): List<BluePrintServiceTemplateEnhancer>
- fun getTopologyTemplateEnhancers(): List<BlueprintTopologyTemplateEnhancer>
+ fun getTopologyTemplateEnhancers(): List<BluePrintTopologyTemplateEnhancer>
- fun getWorkflowEnhancers(): List<BlueprintWorkflowEnhancer>
+ fun getWorkflowEnhancers(): List<BluePrintWorkflowEnhancer>
- fun getNodeTemplateEnhancers(): List<BlueprintNodeTemplateEnhancer>
+ fun getNodeTemplateEnhancers(): List<BluePrintNodeTemplateEnhancer>
- fun getNodeTypeEnhancers(): List<BlueprintNodeTypeEnhancer>
+ fun getNodeTypeEnhancers(): List<BluePrintNodeTypeEnhancer>
- fun getRelationshipTemplateEnhancers(): List<BlueprintRelationshipTemplateEnhancer>
+ fun getRelationshipTemplateEnhancers(): List<BluePrintRelationshipTemplateEnhancer>
- fun getRelationshipTypeEnhancers(): List<BlueprintRelationshipTypeEnhancer>
+ fun getRelationshipTypeEnhancers(): List<BluePrintRelationshipTypeEnhancer>
- fun getArtifactDefinitionEnhancers(): List<BlueprintArtifactDefinitionEnhancer>
+ fun getArtifactDefinitionEnhancers(): List<BluePrintArtifactDefinitionEnhancer>
- fun getPolicyTypeEnhancers(): List<BlueprintPolicyTypeEnhancer>
+ fun getPolicyTypeEnhancers(): List<BluePrintPolicyTypeEnhancer>
- fun getPropertyDefinitionEnhancers(): List<BlueprintPropertyDefinitionEnhancer>
+ fun getPropertyDefinitionEnhancers(): List<BluePrintPropertyDefinitionEnhancer>
- fun getAttributeDefinitionEnhancers(): List<BlueprintAttributeDefinitionEnhancer>
+ fun getAttributeDefinitionEnhancers(): List<BluePrintAttributeDefinitionEnhancer>
fun enhanceServiceTemplate(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
serviceTemplate: ServiceTemplate
) {
@@ -102,7 +102,7 @@
}
fun enhanceTopologyTemplate(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
topologyTemplate: TopologyTemplate
) {
@@ -110,13 +110,13 @@
doEnhancement(bluePrintRuntimeService, name, topologyTemplate, enhancers)
}
- fun enhanceWorkflow(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, workflow: Workflow) {
+ fun enhanceWorkflow(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, workflow: Workflow) {
val enhancers = getWorkflowEnhancers()
doEnhancement(bluePrintRuntimeService, name, workflow, enhancers)
}
fun enhanceNodeTemplate(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
nodeTemplate: NodeTemplate
) {
@@ -124,13 +124,13 @@
doEnhancement(bluePrintRuntimeService, name, nodeTemplate, enhancers)
}
- fun enhanceNodeType(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, nodeType: NodeType) {
+ fun enhanceNodeType(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, nodeType: NodeType) {
val enhancers = getNodeTypeEnhancers()
doEnhancement(bluePrintRuntimeService, name, nodeType, enhancers)
}
fun enhanceRelationshipTemplate(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
relationshipTemplate: RelationshipTemplate
) {
@@ -139,7 +139,7 @@
}
fun enhanceRelationshipType(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
relationshipType: RelationshipType
) {
@@ -148,7 +148,7 @@
}
fun enhanceArtifactDefinition(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
artifactDefinition: ArtifactDefinition
) {
@@ -156,31 +156,31 @@
doEnhancement(bluePrintRuntimeService, name, artifactDefinition, enhancers)
}
- fun enhancePolicyType(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, policyType: PolicyType) {
+ fun enhancePolicyType(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, policyType: PolicyType) {
val enhancers = getPolicyTypeEnhancers()
doEnhancement(bluePrintRuntimeService, name, policyType, enhancers)
}
fun enhancePropertyDefinitions(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
properties: MutableMap<String, PropertyDefinition>
) {
- val errorMap = linkedMapOf<String, BlueprintException>()
+ val errorMap = linkedMapOf<String, BluePrintException>()
properties.forEach { propertyName, propertyDefinition ->
try {
enhancePropertyDefinition(bluePrintRuntimeService, propertyName, propertyDefinition)
- } catch (e: BlueprintException) {
+ } catch (e: BluePrintException) {
errorMap[propertyName] = e
}
}
if (errorMap.isNotEmpty()) {
val nestedErrors = errorMap.keys.map { "[ property: ${errorMap[it]?.message} ]" }.joinToString(";")
- throw BlueprintException("Failed to enhance properties $nestedErrors")
+ throw BluePrintException("Failed to enhance properties $nestedErrors")
}
}
fun enhancePropertyDefinition(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
propertyDefinition: PropertyDefinition
) {
@@ -189,25 +189,25 @@
}
fun enhanceAttributeDefinitions(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
attributes: MutableMap<String, AttributeDefinition>
) {
- val errorMap = linkedMapOf<String, BlueprintException>()
+ val errorMap = linkedMapOf<String, BluePrintException>()
attributes.forEach { attributeName, attributeDefinition ->
try {
enhanceAttributeDefinition(bluePrintRuntimeService, attributeName, attributeDefinition)
- } catch (e: BlueprintException) {
+ } catch (e: BluePrintException) {
errorMap[attributeName] = e
}
}
if (errorMap.isNotEmpty()) {
val nestedErrors = errorMap.keys.map { "[ attribute: ${errorMap[it]?.message} ]" }.joinToString(";")
- throw BlueprintException("Failed to enhance attributes $nestedErrors")
+ throw BluePrintException("Failed to enhance attributes $nestedErrors")
}
}
fun enhanceAttributeDefinition(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
attributeDefinition: AttributeDefinition
) {
@@ -217,17 +217,17 @@
@Suppress("UNCHECKED_CAST")
private fun <T> doEnhancement(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
definition: Any,
- enhancers: List<BlueprintEnhancer<T>>
+ enhancers: List<BluePrintEnhancer<T>>
) {
if (enhancers.isNotEmpty()) {
- val errorMap = linkedMapOf<String, BlueprintException>()
+ val errorMap = linkedMapOf<String, BluePrintException>()
enhancers.forEach {
try {
it.enhance(bluePrintRuntimeService, name, definition as T)
- } catch (e: BlueprintException) {
+ } catch (e: BluePrintException) {
errorMap[name] = e
}
}
@@ -235,7 +235,7 @@
val nestedErrors = errorMap.keys.map {
"${errorMap[it]?.message ?: errorMap[it].toString()}"
}.joinToString(";")
- throw BlueprintException("$name-->$nestedErrors")
+ throw BluePrintException("$name-->$nestedErrors")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintRepoService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintRepoService.kt
similarity index 81%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintRepoService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintRepoService.kt
index 631236a..8d04e54 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintRepoService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintRepoService.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
@@ -26,25 +26,25 @@
import java.io.Serializable
/**
- * BlueprintRepoFileService
+ * BluePrintRepoFileService
* @author Brinda Santh
*
*/
-interface BlueprintRepoService : Serializable {
+interface BluePrintRepoService : Serializable {
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun getNodeType(nodeTypeName: String): NodeType
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun getDataType(dataTypeName: String): DataType
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun getArtifactType(artifactTypeName: String): ArtifactType
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun getRelationshipType(relationshipTypeName: String): RelationshipType
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun getCapabilityDefinition(capabilityDefinitionName: String): CapabilityDefinition
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintScriptsService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintScriptsService.kt
similarity index 91%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintScriptsService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintScriptsService.kt
index b7a06e2..aa61b0c 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintScriptsService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintScriptsService.kt
@@ -17,11 +17,11 @@
package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintSourceCode
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintSourceCode
-interface BlueprintScriptsService {
+interface BluePrintScriptsService {
- suspend fun <T> scriptInstance(bluePrintSourceCode: BlueprintSourceCode, scriptClassName: String): T
+ suspend fun <T> scriptInstance(bluePrintSourceCode: BluePrintSourceCode, scriptClassName: String): T
suspend fun <T> scriptInstance(
blueprintBasePath: String,
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintWorkflowExecutionService.kt
similarity index 82%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintWorkflowExecutionService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintWorkflowExecutionService.kt
index 4f20a1a..70c7973 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintWorkflowExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BluePrintWorkflowExecutionService.kt
@@ -16,12 +16,12 @@
package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-interface BlueprintWorkflowExecutionService<Input, Output> {
+interface BluePrintWorkflowExecutionService<Input, Output> {
- suspend fun executeBlueprintWorkflow(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ suspend fun executeBluePrintWorkflow(
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
executionServiceInput: Input,
properties: MutableMap<String, Any> = hashMapOf()
): Output
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintFunctionNode.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintFunctionNode.kt
index 4f66890..b56fac5 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintFunctionNode.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintFunctionNode.kt
@@ -18,29 +18,29 @@
package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import java.util.function.Function
interface BlueprintFunctionNode<T, R> : Function<T, R> {
fun getName(): String
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun prepareRequest(executionRequest: T): T = runBlocking {
prepareRequestNB(executionRequest)
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun process(executionRequest: T) = runBlocking {
processNB(executionRequest)
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun recover(runtimeException: RuntimeException, executionRequest: T) = runBlocking {
recoverNB(runtimeException, executionRequest)
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun prepareResponse(): R = runBlocking {
prepareResponseNB()
}
@@ -55,18 +55,18 @@
return prepareResponse()
}
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
suspend fun prepareRequestNB(executionRequest: T): T
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
suspend fun processNB(executionRequest: T)
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
suspend fun recoverNB(runtimeException: RuntimeException, executionRequest: T)
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
suspend fun prepareResponseNB(): R
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
suspend fun applyNB(t: T): R
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintTemplateService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintTemplateService.kt
index 7990115..1958e23 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintTemplateService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintTemplateService.kt
@@ -18,7 +18,7 @@
import com.fasterxml.jackson.core.io.CharTypes
import com.fasterxml.jackson.databind.node.JsonNodeFactory
import com.fasterxml.jackson.databind.node.TextNode
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
interface BlueprintTemplateService {
@@ -35,7 +35,7 @@
*
**/
suspend fun generateContent(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
nodeTemplateName: String,
artifactName: String,
jsonData: String = "",
@@ -47,14 +47,14 @@
/**
* Customise JsonNodeFactory and TextNode, Since it introduces quotes for string data.
*/
-open class BlueprintJsonNodeFactory : JsonNodeFactory() {
+open class BluePrintJsonNodeFactory : JsonNodeFactory() {
override fun textNode(text: String): TextNode {
- return BlueprintTextNode(text)
+ return BluePrintTextNode(text)
}
}
-open class BlueprintTextNode(v: String) : TextNode(v) {
+open class BluePrintTextNode(v: String) : TextNode(v) {
override fun toString(): String {
var len = this._value.length
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintValidator.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintValidator.kt
index 5f36e8e..0d9876b 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintValidator.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/interfaces/BlueprintValidator.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.interfaces
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeDefinition
@@ -28,85 +28,85 @@
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-interface BlueprintValidator<T> {
+interface BluePrintValidator<T> {
- fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, type: T)
+ fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, type: T)
}
-interface BlueprintServiceTemplateValidator : BlueprintValidator<ServiceTemplate>
+interface BluePrintServiceTemplateValidator : BluePrintValidator<ServiceTemplate>
-interface BlueprintTopologyTemplateValidator : BlueprintValidator<TopologyTemplate>
+interface BluePrintTopologyTemplateValidator : BluePrintValidator<TopologyTemplate>
-interface BlueprintArtifactTypeValidator : BlueprintValidator<ArtifactType>
+interface BluePrintArtifactTypeValidator : BluePrintValidator<ArtifactType>
-interface BlueprintArtifactDefinitionValidator : BlueprintValidator<ArtifactDefinition>
+interface BluePrintArtifactDefinitionValidator : BluePrintValidator<ArtifactDefinition>
-interface BlueprintDataTypeValidator : BlueprintValidator<DataType>
+interface BluePrintDataTypeValidator : BluePrintValidator<DataType>
-interface BlueprintNodeTypeValidator : BlueprintValidator<NodeType>
+interface BluePrintNodeTypeValidator : BluePrintValidator<NodeType>
-interface BlueprintNodeTemplateValidator : BlueprintValidator<NodeTemplate>
+interface BluePrintNodeTemplateValidator : BluePrintValidator<NodeTemplate>
-interface BlueprintWorkflowValidator : BlueprintValidator<Workflow>
+interface BluePrintWorkflowValidator : BluePrintValidator<Workflow>
-interface BlueprintPropertyDefinitionValidator : BlueprintValidator<PropertyDefinition>
+interface BluePrintPropertyDefinitionValidator : BluePrintValidator<PropertyDefinition>
-interface BlueprintAttributeDefinitionValidator : BlueprintValidator<AttributeDefinition>
+interface BluePrintAttributeDefinitionValidator : BluePrintValidator<AttributeDefinition>
/**
* Blueprint Validation Interface.
*/
-interface BlueprintValidatorService {
+interface BluePrintValidatorService {
- @Throws(BlueprintException::class)
- suspend fun validateBlueprints(basePath: String): Boolean
+ @Throws(BluePrintException::class)
+ suspend fun validateBluePrints(basePath: String): Boolean
- @Throws(BlueprintException::class)
- suspend fun validateBlueprints(bluePrintRuntimeService: BlueprintRuntimeService<*>): Boolean
+ @Throws(BluePrintException::class)
+ suspend fun validateBluePrints(bluePrintRuntimeService: BluePrintRuntimeService<*>): Boolean
}
-interface BlueprintTypeValidatorService {
+interface BluePrintTypeValidatorService {
- fun <T : BlueprintValidator<*>> bluePrintValidator(referenceName: String, classType: Class<T>): T?
+ fun <T : BluePrintValidator<*>> bluePrintValidator(referenceName: String, classType: Class<T>): T?
- fun <T : BlueprintValidator<*>> bluePrintValidators(referenceNamePrefix: String, classType: Class<T>): List<T>?
+ fun <T : BluePrintValidator<*>> bluePrintValidators(referenceNamePrefix: String, classType: Class<T>): List<T>?
- fun <T : BlueprintValidator<*>> bluePrintValidators(classType: Class<T>): List<T>?
+ fun <T : BluePrintValidator<*>> bluePrintValidators(classType: Class<T>): List<T>?
- fun getServiceTemplateValidators(): List<BlueprintServiceTemplateValidator>
+ fun getServiceTemplateValidators(): List<BluePrintServiceTemplateValidator>
- fun getDataTypeValidators(): List<BlueprintDataTypeValidator>
+ fun getDataTypeValidators(): List<BluePrintDataTypeValidator>
- fun getArtifactTypeValidators(): List<BlueprintArtifactTypeValidator>
+ fun getArtifactTypeValidators(): List<BluePrintArtifactTypeValidator>
- fun getArtifactDefinitionsValidators(): List<BlueprintArtifactDefinitionValidator>
+ fun getArtifactDefinitionsValidators(): List<BluePrintArtifactDefinitionValidator>
- fun getNodeTypeValidators(): List<BlueprintNodeTypeValidator>
+ fun getNodeTypeValidators(): List<BluePrintNodeTypeValidator>
- fun getTopologyTemplateValidators(): List<BlueprintTopologyTemplateValidator>
+ fun getTopologyTemplateValidators(): List<BluePrintTopologyTemplateValidator>
- fun getNodeTemplateValidators(): List<BlueprintNodeTemplateValidator>
+ fun getNodeTemplateValidators(): List<BluePrintNodeTemplateValidator>
- fun getWorkflowValidators(): List<BlueprintWorkflowValidator>
+ fun getWorkflowValidators(): List<BluePrintWorkflowValidator>
- fun getPropertyDefinitionValidators(): List<BlueprintPropertyDefinitionValidator>
+ fun getPropertyDefinitionValidators(): List<BluePrintPropertyDefinitionValidator>
- fun getAttributeDefinitionValidators(): List<BlueprintAttributeDefinitionValidator>
+ fun getAttributeDefinitionValidators(): List<BluePrintAttributeDefinitionValidator>
- fun validateServiceTemplate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, serviceTemplate: ServiceTemplate) {
+ fun validateServiceTemplate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, serviceTemplate: ServiceTemplate) {
val validators = getServiceTemplateValidators()
doValidation(bluePrintRuntimeService, name, serviceTemplate, validators)
}
- fun validateArtifactType(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, artifactType: ArtifactType) {
+ fun validateArtifactType(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, artifactType: ArtifactType) {
val validators = getArtifactTypeValidators()
doValidation(bluePrintRuntimeService, name, artifactType, validators)
}
fun validateArtifactDefinition(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
artifactDefinition: ArtifactDefinition
) {
@@ -114,59 +114,59 @@
doValidation(bluePrintRuntimeService, name, artifactDefinition, validators)
}
- fun validateDataType(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, dataType: DataType) {
+ fun validateDataType(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, dataType: DataType) {
val validators = getDataTypeValidators()
doValidation(bluePrintRuntimeService, name, dataType, validators)
}
- fun validateNodeType(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, nodeType: NodeType) {
+ fun validateNodeType(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, nodeType: NodeType) {
val validators = getNodeTypeValidators()
doValidation(bluePrintRuntimeService, name, nodeType, validators)
}
- fun validateTopologyTemplate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, topologyTemplate: TopologyTemplate) {
+ fun validateTopologyTemplate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, topologyTemplate: TopologyTemplate) {
val validators = getTopologyTemplateValidators()
doValidation(bluePrintRuntimeService, name, topologyTemplate, validators)
}
- fun validateNodeTemplate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, nodeTemplate: NodeTemplate) {
+ fun validateNodeTemplate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, nodeTemplate: NodeTemplate) {
val validators = getNodeTemplateValidators()
doValidation(bluePrintRuntimeService, name, nodeTemplate, validators)
}
- fun validateWorkflow(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, workflow: Workflow) {
+ fun validateWorkflow(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, workflow: Workflow) {
val validators = getWorkflowValidators()
doValidation(bluePrintRuntimeService, name, workflow, validators)
}
- fun validatePropertyDefinitions(bluePrintRuntimeService: BlueprintRuntimeService<*>, properties: MutableMap<String, PropertyDefinition>) {
+ fun validatePropertyDefinitions(bluePrintRuntimeService: BluePrintRuntimeService<*>, properties: MutableMap<String, PropertyDefinition>) {
properties.forEach { propertyName, propertyDefinition ->
validatePropertyDefinition(bluePrintRuntimeService, propertyName, propertyDefinition)
}
}
- fun validatePropertyDefinition(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, propertyDefinition: PropertyDefinition) {
+ fun validatePropertyDefinition(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, propertyDefinition: PropertyDefinition) {
val validators = getPropertyDefinitionValidators()
doValidation(bluePrintRuntimeService, name, propertyDefinition, validators)
}
- fun validateAttributeDefinitions(bluePrintRuntimeService: BlueprintRuntimeService<*>, attributes: MutableMap<String, AttributeDefinition>) {
+ fun validateAttributeDefinitions(bluePrintRuntimeService: BluePrintRuntimeService<*>, attributes: MutableMap<String, AttributeDefinition>) {
attributes.forEach { attributeName, attributeDefinition ->
validateAttributeDefinition(bluePrintRuntimeService, attributeName, attributeDefinition)
}
}
- fun validateAttributeDefinition(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, attributeDefinition: AttributeDefinition) {
+ fun validateAttributeDefinition(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, attributeDefinition: AttributeDefinition) {
val validators = getAttributeDefinitionValidators()
doValidation(bluePrintRuntimeService, name, attributeDefinition, validators)
}
@Suppress("UNCHECKED_CAST")
private fun <T> doValidation(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
definition: Any,
- validators: List<BlueprintValidator<T>>
+ validators: List<BluePrintValidator<T>>
) {
validators.forEach {
it.validate(bluePrintRuntimeService, name, definition as T)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintCompileService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompileService.kt
similarity index 92%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintCompileService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompileService.kt
index 5cf0a93..230097f 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintCompileService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompileService.kt
@@ -30,7 +30,7 @@
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
import org.jetbrains.kotlin.config.Services
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.checkFileExists
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import java.io.File
@@ -40,9 +40,9 @@
import kotlin.script.experimental.jvm.util.classpathFromClasspathProperty
import kotlin.system.measureTimeMillis
-open class BlueprintCompileService {
+open class BluePrintCompileService {
- val log = logger(BlueprintCompileService::class)
+ val log = logger(BluePrintCompileService::class)
companion object {
@@ -55,7 +55,7 @@
/** Compile the [bluePrintSourceCode] and get the [kClassName] instance for the constructor [args] */
suspend fun <T> eval(
- bluePrintSourceCode: BlueprintSourceCode,
+ bluePrintSourceCode: BluePrintSourceCode,
kClassName: String,
args: ArrayList<Any?>?
): T {
@@ -68,14 +68,14 @@
}
}
- val classLoaderWithDependencies = BlueprintCompileCache.classLoader(bluePrintSourceCode.cacheKey)
+ val classLoaderWithDependencies = BluePrintCompileCache.classLoader(bluePrintSourceCode.cacheKey)
/** Create the instance from the class loader */
return instance(classLoaderWithDependencies, kClassName, args)
}
/** Compile [bluePrintSourceCode] and put into cache */
- suspend fun compile(bluePrintSourceCode: BlueprintSourceCode) {
+ suspend fun compile(bluePrintSourceCode: BluePrintSourceCode) {
// TODO("Include Multiple folders")
val sourcePath = bluePrintSourceCode.blueprintKotlinSources.first()
val compiledJarFile = bluePrintSourceCode.targetJarFile
@@ -110,7 +110,7 @@
checkFileExists(compiledJarFile) { "couldn't generate compiled jar(${compiledJarFile.absolutePath})" }
}
else -> {
- throw BlueprintException("$exitCode :${messageCollector.errors().joinToString("\n")}")
+ throw BluePrintException("$exitCode :${messageCollector.errors().joinToString("\n")}")
}
}
}
@@ -123,21 +123,21 @@
/** create class [kClassName] instance from [classLoader] */
fun <T> instance(classLoader: URLClassLoader, kClassName: String, args: ArrayList<Any?>? = arrayListOf()): T {
val kClazz = classLoader.loadClass(kClassName)
- ?: throw BlueprintException("failed to load class($kClassName) from current class loader.")
+ ?: throw BluePrintException("failed to load class($kClassName) from current class loader.")
val instance = if (args.isNullOrEmpty()) {
kClazz.newInstance()
} else {
kClazz.constructors
.single().newInstance(*args.toArray())
- } ?: throw BlueprintException("failed to create class($kClassName) instance for constructor argument($args).")
+ } ?: throw BluePrintException("failed to create class($kClassName) instance for constructor argument($args).")
return instance as T
}
}
/** Compile source code information */
-open class BlueprintSourceCode : SourceCode {
+open class BluePrintSourceCode : SourceCode {
lateinit var blueprintKotlinSources: MutableList<String>
lateinit var moduleName: String
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintCompilerCache.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompilerCache.kt
similarity index 80%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintCompilerCache.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompilerCache.kt
index a6d4571..a0efc61 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintCompilerCache.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintCompilerCache.kt
@@ -19,18 +19,18 @@
import com.google.common.cache.CacheBuilder
import com.google.common.cache.CacheLoader
import com.google.common.cache.LoadingCache
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
import java.net.URLClassLoader
-object BlueprintCompileCache {
+object BluePrintCompileCache {
- val log = logger(BlueprintCompileCache::class)
+ val log = logger(BluePrintCompileCache::class)
private val classLoaderCache: LoadingCache<String, URLClassLoader> = CacheBuilder.newBuilder()
.maximumSize(50)
- .build(BlueprintClassLoader)
+ .build(BluePrintClassLoader)
fun classLoader(key: String): URLClassLoader {
return classLoaderCache.get(key)
@@ -54,14 +54,14 @@
}
}
-object BlueprintClassLoader : CacheLoader<String, URLClassLoader>() {
+object BluePrintClassLoader : CacheLoader<String, URLClassLoader>() {
- val log = logger(BlueprintClassLoader::class)
+ val log = logger(BluePrintClassLoader::class)
override fun load(key: String) = try {
log.info("loading compiled cache($key)")
- BlueprintFileUtils.getURLClassLoaderFromDirectory(key)
+ BluePrintFileUtils.getURLClassLoaderFromDirectory(key)
} catch (e: Exception) {
- throw BlueprintException("failed to load cache($key) with Exception($e)")
+ throw BluePrintException("failed to load cache($key) with Exception($e)")
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintScriptsServiceImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImpl.kt
similarity index 77%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintScriptsServiceImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImpl.kt
index c89d74d..f3eb1a2 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintScriptsServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImpl.kt
@@ -17,20 +17,20 @@
package org.onap.ccsdk.cds.controllerblueprints.core.scripts
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintScriptsService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintScriptsService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintFileUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import java.util.ArrayList
-open class BlueprintScriptsServiceImpl : BlueprintScriptsService {
+open class BluePrintScriptsServiceImpl : BluePrintScriptsService {
- val log = logger(BlueprintScriptsServiceImpl::class)
+ val log = logger(BluePrintScriptsServiceImpl::class)
- override suspend fun <T> scriptInstance(bluePrintSourceCode: BlueprintSourceCode, scriptClassName: String): T {
- val bluePrintCompileService = BlueprintCompileService()
+ override suspend fun <T> scriptInstance(bluePrintSourceCode: BluePrintSourceCode, scriptClassName: String): T {
+ val bluePrintCompileService = BluePrintCompileService()
return bluePrintCompileService.eval(bluePrintSourceCode, scriptClassName, null)
}
@@ -43,13 +43,13 @@
): T {
val sources: MutableList<String> = arrayListOf()
- sources.add(normalizedPathName(blueprintBasePath, BlueprintConstants.TOSCA_SCRIPTS_KOTLIN_DIR))
+ sources.add(normalizedPathName(blueprintBasePath, BluePrintConstants.TOSCA_SCRIPTS_KOTLIN_DIR))
- val scriptSource = BlueprintSourceCode()
+ val scriptSource = BluePrintSourceCode()
scriptSource.blueprintKotlinSources = sources
scriptSource.moduleName = "$artifactName-$artifactVersion-cba-kts"
- scriptSource.cacheKey = BlueprintFileUtils.compileCacheKey(blueprintBasePath)
- scriptSource.targetJarFile = BlueprintFileUtils.compileJarFile(blueprintBasePath, artifactName, artifactVersion)
+ scriptSource.cacheKey = BluePrintFileUtils.compileCacheKey(blueprintBasePath)
+ scriptSource.targetJarFile = BluePrintFileUtils.compileJarFile(blueprintBasePath, artifactName, artifactVersion)
scriptSource.regenerate = reCompile
return scriptInstance(scriptSource, scriptClassName)
}
@@ -59,7 +59,7 @@
scriptClassName: String,
reCompile: Boolean
): T {
- val toscaMetaData = BlueprintMetadataUtils.toscaMetaData(blueprintBasePath)
+ val toscaMetaData = BluePrintMetadataUtils.toscaMetaData(blueprintBasePath)
checkNotNull(toscaMetaData.templateName) { "couldn't find 'Template-Name' key in TOSCA.meta" }
checkNotNull(toscaMetaData.templateVersion) { "couldn't find 'Template-Version' key in TOSCA.meta" }
return scriptInstance(
@@ -70,7 +70,7 @@
override suspend fun <T> scriptInstance(cacheKey: String, scriptClassName: String): T {
val args = ArrayList<Any?>()
- return BlueprintCompileCache.classLoader(cacheKey).loadClass(scriptClassName).constructors
+ return BluePrintCompileCache.classLoader(cacheKey).loadClass(scriptClassName).constructors
.single().newInstance(*args.toArray()) as T
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintChainedService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintChainedService.kt
similarity index 93%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintChainedService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintChainedService.kt
index e0a0f17..1a43c30 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintChainedService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintChainedService.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.service
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityDefinition
@@ -31,11 +31,11 @@
*
* @author Brinda Santh
*/
-internal class BlueprintChainedService {
+internal class BluePrintChainedService {
- var bpc: BlueprintContext
+ var bpc: BluePrintContext
- constructor(bpc: BlueprintContext) {
+ constructor(bpc: BluePrintContext) {
this.bpc = bpc
}
@@ -105,7 +105,7 @@
val nodeType: NodeType = bpc.nodeTypeByName(nodeTypeName)
nodeType.id = nodeTypeName
val derivedFrom: String = nodeType.derivedFrom
- if (!BlueprintTypes.rootNodeTypes().contains(derivedFrom)) {
+ if (!BluePrintTypes.rootNodeTypes().contains(derivedFrom)) {
recNodeTypesChained(derivedFrom, nodeTypes)
}
nodeTypes!!.add(nodeType)
@@ -116,7 +116,7 @@
val dataType: DataType = bpc.dataTypeByName(dataTypeName)!!
dataType.id = dataTypeName
val derivedFrom: String = dataType.derivedFrom
- if (!BlueprintTypes.rootDataTypes().contains(derivedFrom)) {
+ if (!BluePrintTypes.rootDataTypes().contains(derivedFrom)) {
recDataTypesChained(derivedFrom, dataTypes)
}
dataTypes!!.add(dataType)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintContext.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintContext.kt
similarity index 86%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintContext.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintContext.kt
index 62026be..76a6ff7 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintContext.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintContext.kt
@@ -19,8 +19,8 @@
package org.onap.ccsdk.cds.controllerblueprints.core.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityAssignment
@@ -49,7 +49,7 @@
*
* @author Brinda Santh
*/
-class BlueprintContext(val serviceTemplate: ServiceTemplate) {
+class BluePrintContext(val serviceTemplate: ServiceTemplate) {
private val log = LoggerFactory.getLogger(this::class.toString())
@@ -86,39 +86,39 @@
return JacksonUtils.getJson(serviceTemplate, pretty)
}
- fun name(): String = metadata?.get(BlueprintConstants.METADATA_TEMPLATE_NAME)
- ?: throw BlueprintException("could't get template name from meta data")
+ fun name(): String = metadata?.get(BluePrintConstants.METADATA_TEMPLATE_NAME)
+ ?: throw BluePrintException("could't get template name from meta data")
- fun version(): String = metadata?.get(BlueprintConstants.METADATA_TEMPLATE_VERSION)
- ?: throw BlueprintException("could't get template version from meta data")
+ fun version(): String = metadata?.get(BluePrintConstants.METADATA_TEMPLATE_VERSION)
+ ?: throw BluePrintException("could't get template version from meta data")
- fun author(): String = metadata?.get(BlueprintConstants.METADATA_TEMPLATE_AUTHOR)
- ?: throw BlueprintException("could't get template author from meta data")
+ fun author(): String = metadata?.get(BluePrintConstants.METADATA_TEMPLATE_AUTHOR)
+ ?: throw BluePrintException("could't get template author from meta data")
// Workflow
fun workflows(): MutableMap<String, Workflow>? = serviceTemplate.topologyTemplate?.workflows
fun workflowByName(workFlowName: String): Workflow = workflows()?.get(workFlowName)
- ?: throw BlueprintException("could't get workflow($workFlowName)")
+ ?: throw BluePrintException("could't get workflow($workFlowName)")
fun workflowInputs(workFlowName: String) = workflowByName(workFlowName).inputs
fun workflowSteps(workFlowName: String) =
- workflowByName(workFlowName).steps ?: throw BlueprintException("could't get steps for workflow($workFlowName)")
+ workflowByName(workFlowName).steps ?: throw BluePrintException("could't get steps for workflow($workFlowName)")
fun workflowStepByName(workFlowName: String, stepName: String): Step {
return workflowSteps(workFlowName)[stepName]
- ?: throw BlueprintException("could't get step($stepName) for workflow($workFlowName)")
+ ?: throw BluePrintException("could't get step($stepName) for workflow($workFlowName)")
}
fun workflowStepNodeTemplate(workFlowName: String, stepName: String): String {
return workflowStepByName(workFlowName, stepName).target
- ?: throw BlueprintException("could't get node template name for workflow($workFlowName)'s step($stepName)")
+ ?: throw BluePrintException("could't get node template name for workflow($workFlowName)'s step($stepName)")
}
fun workflowFirstStepNodeTemplate(workFlowName: String): String {
val firstStepName = workflowSteps(workFlowName).keys.ifEmpty {
- throw BlueprintException("could't get first step for workflow($workFlowName)")
+ throw BluePrintException("could't get first step for workflow($workFlowName)")
}.first()
return workflowStepNodeTemplate(workFlowName, firstStepName)
}
@@ -128,12 +128,12 @@
workFlowName,
stepName
).activities?.filter { it.callOperation != null }?.single()?.callOperation
- ?: throw BlueprintException("couldn't get first callOperation for WorkFlow($workFlowName) ")
+ ?: throw BluePrintException("couldn't get first callOperation for WorkFlow($workFlowName) ")
}
// DSL
fun dslPropertiesByName(name: String): JsonNode = dslDefinitions()?.get(name)
- ?: throw BlueprintException("couldn't get policy type for the dsl($name)")
+ ?: throw BluePrintException("couldn't get policy type for the dsl($name)")
// Data Type
fun dataTypeByName(name: String): DataType? = dataTypes()?.get(name)
@@ -145,7 +145,7 @@
fun policyTypes(): MutableMap<String, PolicyType>? = serviceTemplate.policyTypes
fun policyTypeByName(policyName: String) = policyTypes()?.get(policyName)
- ?: throw BlueprintException("could't get policy type for the name($policyName)")
+ ?: throw BluePrintException("could't get policy type for the name($policyName)")
fun policyTypesDerivedFrom(name: String): MutableMap<String, PolicyType>? {
return policyTypes()?.filterValues { policyType -> policyType.derivedFrom == name }?.toMutableMap()
@@ -166,7 +166,7 @@
fun nodeTypeByName(name: String): NodeType =
nodeTypes()?.get(name)
- ?: throw BlueprintException("could't get node type for the name($name)")
+ ?: throw BluePrintException("could't get node type for the name($name)")
fun nodeTypeDerivedFrom(name: String): MutableMap<String, NodeType>? {
return nodeTypes()?.filterValues { nodeType -> nodeType.derivedFrom == name }?.toMutableMap()
@@ -174,7 +174,7 @@
fun nodeTypeInterface(nodeTypeName: String, interfaceName: String): InterfaceDefinition {
return nodeTypeByName(nodeTypeName).interfaces?.get(interfaceName)
- ?: throw BlueprintException("could't get node type($nodeTypeName)'s interface definition($interfaceName)")
+ ?: throw BluePrintException("could't get node type($nodeTypeName)'s interface definition($interfaceName)")
}
fun nodeTypeInterfaceOperation(
@@ -183,12 +183,12 @@
operationName: String
): OperationDefinition {
return nodeTypeInterface(nodeTypeName, interfaceName).operations?.get(operationName)
- ?: throw BlueprintException("could't get node type($nodeTypeName)'s interface definition($interfaceName) operation definition($operationName)")
+ ?: throw BluePrintException("could't get node type($nodeTypeName)'s interface definition($interfaceName) operation definition($operationName)")
}
fun interfaceNameForNodeType(nodeTypeName: String): String {
return nodeTypeByName(nodeTypeName).interfaces?.keys?.first()
- ?: throw BlueprintException("could't get NodeType($nodeTypeName)'s first InterfaceDefinition name")
+ ?: throw BluePrintException("could't get NodeType($nodeTypeName)'s first InterfaceDefinition name")
}
fun nodeTypeInterfaceOperationInputs(
@@ -211,13 +211,13 @@
fun relationshipTypes(): MutableMap<String, RelationshipType>? = serviceTemplate.relationshipTypes
fun relationshipTypeByName(name: String): RelationshipType = relationshipTypes()?.get(name)
- ?: throw BlueprintException("could't get relationship type for the name($name)")
+ ?: throw BluePrintException("could't get relationship type for the name($name)")
// Node Template Methods
fun nodeTemplates(): MutableMap<String, NodeTemplate>? = serviceTemplate.topologyTemplate?.nodeTemplates
fun nodeTemplateByName(name: String): NodeTemplate =
- nodeTemplates()?.get(name) ?: throw BlueprintException("could't get node template for the name($name)")
+ nodeTemplates()?.get(name) ?: throw BluePrintException("could't get node template for the name($name)")
fun nodeTemplateForNodeType(name: String): MutableMap<String, NodeTemplate>? {
return nodeTemplates()?.filterValues { nodeTemplate -> nodeTemplate.type == name }?.toMutableMap()
@@ -242,27 +242,27 @@
fun nodeTemplateArtifact(nodeTemplateName: String, artifactName: String): ArtifactDefinition {
return checkNodeTemplateArtifact(nodeTemplateName, artifactName)
- ?: throw BlueprintException("could't get NodeTemplate($nodeTemplateName)'s ArtifactDefinition($artifactName)")
+ ?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s ArtifactDefinition($artifactName)")
}
fun nodeTemplateArtifactForArtifactType(nodeTemplateName: String, artifactType: String): ArtifactDefinition {
return nodeTemplateArtifacts(nodeTemplateName)?.filter { it.value.type == artifactType }?.map { it.value }?.get(0)
- ?: throw BlueprintException("could't get NodeTemplate($nodeTemplateName)'s Artifact Type($artifactType)")
+ ?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s Artifact Type($artifactType)")
}
fun nodeTemplateFirstInterface(nodeTemplateName: String): InterfaceAssignment {
return nodeTemplateByName(nodeTemplateName).interfaces?.values?.first()
- ?: throw BlueprintException("could't get NodeTemplate($nodeTemplateName)'s first InterfaceAssignment")
+ ?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s first InterfaceAssignment")
}
fun nodeTemplateFirstInterfaceName(nodeTemplateName: String): String {
return nodeTemplateByName(nodeTemplateName).interfaces?.keys?.first()
- ?: throw BlueprintException("could't get NodeTemplate($nodeTemplateName)'s first InterfaceAssignment name")
+ ?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s first InterfaceAssignment name")
}
fun nodeTemplateFirstInterfaceFirstOperationName(nodeTemplateName: String): String {
return nodeTemplateFirstInterface(nodeTemplateName).operations?.keys?.first()
- ?: throw BlueprintException("could't get NodeTemplate($nodeTemplateName)'s first InterfaceAssignment's first OperationAssignment name")
+ ?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s first InterfaceAssignment's first OperationAssignment name")
}
fun nodeTemplateOperationImplementation(nodeTemplateName: String, interfaceName: String, operationName: String):
@@ -288,7 +288,7 @@
fun nodeTemplateInterface(nodeTemplateName: String, interfaceName: String): InterfaceAssignment {
return nodeTemplateByName(nodeTemplateName).interfaces?.get(interfaceName)
- ?: throw BlueprintException("could't get NodeTemplate($nodeTemplateName)'s InterfaceAssignment($interfaceName)")
+ ?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s InterfaceAssignment($interfaceName)")
}
fun nodeTemplateInterfaceOperation(
@@ -297,23 +297,23 @@
operationName: String
): OperationAssignment {
return nodeTemplateInterface(nodeTemplateName, interfaceName).operations?.get(operationName)
- ?: throw BlueprintException("could't get NodeTemplate($nodeTemplateName)'s InterfaceAssignment($interfaceName) OperationAssignment($operationName)")
+ ?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s InterfaceAssignment($interfaceName) OperationAssignment($operationName)")
}
fun nodeTemplateCapability(nodeTemplateName: String, capabilityName: String): CapabilityAssignment {
return nodeTemplateByName(nodeTemplateName).capabilities?.get(capabilityName)
- ?: throw BlueprintException("could't get NodeTemplate($nodeTemplateName)'s CapabilityAssignment($capabilityName)")
+ ?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s CapabilityAssignment($capabilityName)")
}
fun nodeTemplateRequirement(nodeTemplateName: String, requirementName: String): RequirementAssignment {
return nodeTemplateByName(nodeTemplateName).requirements?.get(requirementName)
- ?: throw BlueprintException("could't get NodeTemplate($nodeTemplateName)'s first RequirementAssignment($requirementName)")
+ ?: throw BluePrintException("could't get NodeTemplate($nodeTemplateName)'s first RequirementAssignment($requirementName)")
}
fun nodeTemplateRequirementNode(nodeTemplateName: String, requirementName: String): NodeTemplate {
val filteredNodeTemplateName: String =
nodeTemplateByName(nodeTemplateName).requirements?.get(requirementName)?.node
- ?: throw BlueprintException("could't NodeTemplate for NodeTemplate's($nodeTemplateName) requirement's ($requirementName) ")
+ ?: throw BluePrintException("could't NodeTemplate for NodeTemplate's($nodeTemplateName) requirement's ($requirementName) ")
return nodeTemplateByName(filteredNodeTemplateName)
}
@@ -326,7 +326,7 @@
serviceTemplate.topologyTemplate?.relationshipTemplates
fun relationshipTemplateByName(name: String): RelationshipTemplate = relationshipTemplates()?.get(name)
- ?: throw BlueprintException("could't get relationship template for the name($name)")
+ ?: throw BluePrintException("could't get relationship template for the name($name)")
fun relationshipTemplateProperty(relationshipTemplateName: String, propertyName: String): Any? {
return nodeTemplateByName(relationshipTemplateName).properties?.get(propertyName)
@@ -345,10 +345,10 @@
// Chained Functions
fun nodeTypeChained(nodeTypeName: String): NodeType {
- return BlueprintChainedService(this).nodeTypeChained(nodeTypeName)
+ return BluePrintChainedService(this).nodeTypeChained(nodeTypeName)
}
fun nodeTypeChainedProperties(nodeTypeName: String): MutableMap<String, PropertyDefinition>? {
- return BlueprintChainedService(this).nodeTypeChainedProperties(nodeTypeName)
+ return BluePrintChainedService(this).nodeTypeChainedProperties(nodeTypeName)
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintDependencyService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintDependencyService.kt
similarity index 85%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintDependencyService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintDependencyService.kt
index 8f33085..e845728 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintDependencyService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintDependencyService.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.service
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.springframework.context.ApplicationContext
import org.springframework.context.ConfigurableApplicationContext
import kotlin.reflect.KClass
@@ -29,12 +29,12 @@
* @author Brinda Santh
*/
-object BlueprintDependencyService {
+object BluePrintDependencyService {
lateinit var applicationContext: ApplicationContext
fun inject(applicationContext: ApplicationContext) {
- BlueprintDependencyService.applicationContext = applicationContext
+ BluePrintDependencyService.applicationContext = applicationContext
}
/** Used to inject [instance] into spring application context for the [key],
@@ -47,16 +47,16 @@
inline fun <reified T> instance(name: String): T {
return applicationContext.getBean(name) as? T
- ?: throw BlueprintProcessorException("failed to get instance($name)")
+ ?: throw BluePrintProcessorException("failed to get instance($name)")
}
inline fun <reified T> instance(type: Class<T>): T {
return applicationContext.getBean(type)
- ?: throw BlueprintProcessorException("failed to get instance($type)")
+ ?: throw BluePrintProcessorException("failed to get instance($type)")
}
inline fun <reified T> instance(type: KClass<*>): T {
return applicationContext.getBean(type.java) as? T
- ?: throw BlueprintProcessorException("failed to get instance($type)")
+ ?: throw BluePrintProcessorException("failed to get instance($type)")
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintExpressionService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintExpressionService.kt
similarity index 88%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintExpressionService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintExpressionService.kt
index ac90705..193ff78 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintExpressionService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintExpressionService.kt
@@ -21,9 +21,9 @@
import com.fasterxml.jackson.databind.node.ArrayNode
import com.fasterxml.jackson.databind.node.ObjectNode
import com.fasterxml.jackson.databind.node.TextNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactExpression
import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeExpression
import org.onap.ccsdk.cds.controllerblueprints.core.data.DSLExpression
@@ -38,7 +38,7 @@
*
* @author Brinda Santh
*/
-object BlueprintExpressionService {
+object BluePrintExpressionService {
val log = LoggerFactory.getLogger(this::class.toString())
@@ -47,9 +47,9 @@
val json = propertyAssignmentNode.toString()
// FIXME("Check if any Optimisation needed")
return (
- json.contains(BlueprintConstants.EXPRESSION_GET_INPUT) ||
- json.contains(BlueprintConstants.EXPRESSION_GET_ATTRIBUTE) ||
- json.contains(BlueprintConstants.EXPRESSION_GET_PROPERTY)
+ json.contains(BluePrintConstants.EXPRESSION_GET_INPUT) ||
+ json.contains(BluePrintConstants.EXPRESSION_GET_ATTRIBUTE) ||
+ json.contains(BluePrintConstants.EXPRESSION_GET_PROPERTY)
)
}
@@ -58,35 +58,35 @@
log.trace("Assignment Data/Expression : {}", propertyAssignmentNode)
val expressionData = ExpressionData(valueNode = propertyAssignmentNode)
if (propertyAssignmentNode is ObjectNode) {
- val commands: Set<String> = propertyAssignmentNode.fieldNames().asSequence().toList().intersect(BlueprintTypes.validCommands())
+ val commands: Set<String> = propertyAssignmentNode.fieldNames().asSequence().toList().intersect(BluePrintTypes.validCommands())
if (commands.isNotEmpty()) {
expressionData.isExpression = true
expressionData.command = commands.first()
expressionData.expressionNode = propertyAssignmentNode
when (expressionData.command) {
- BlueprintConstants.EXPRESSION_GET_INPUT -> {
+ BluePrintConstants.EXPRESSION_GET_INPUT -> {
expressionData.inputExpression = populateInputExpression(propertyAssignmentNode)
}
- BlueprintConstants.EXPRESSION_GET_ATTRIBUTE -> {
+ BluePrintConstants.EXPRESSION_GET_ATTRIBUTE -> {
expressionData.attributeExpression = populateAttributeExpression(propertyAssignmentNode)
}
- BlueprintConstants.EXPRESSION_GET_PROPERTY -> {
+ BluePrintConstants.EXPRESSION_GET_PROPERTY -> {
expressionData.propertyExpression = populatePropertyExpression(propertyAssignmentNode)
}
- BlueprintConstants.EXPRESSION_GET_OPERATION_OUTPUT -> {
+ BluePrintConstants.EXPRESSION_GET_OPERATION_OUTPUT -> {
expressionData.operationOutputExpression = populateOperationOutputExpression(propertyAssignmentNode)
}
- BlueprintConstants.EXPRESSION_GET_ARTIFACT -> {
+ BluePrintConstants.EXPRESSION_GET_ARTIFACT -> {
expressionData.artifactExpression = populateArtifactExpression(propertyAssignmentNode)
}
}
}
} else if (propertyAssignmentNode is TextNode &&
- propertyAssignmentNode.textValue().startsWith(BlueprintConstants.EXPRESSION_DSL_REFERENCE)
+ propertyAssignmentNode.textValue().startsWith(BluePrintConstants.EXPRESSION_DSL_REFERENCE)
) {
expressionData.isExpression = true
- expressionData.command = BlueprintConstants.EXPRESSION_DSL_REFERENCE
+ expressionData.command = BluePrintConstants.EXPRESSION_DSL_REFERENCE
expressionData.dslExpression = populateDSLExpression(propertyAssignmentNode)
}
return expressionData
@@ -96,7 +96,7 @@
fun populateDSLExpression(jsonNode: TextNode): DSLExpression {
return DSLExpression(
propertyName = jsonNode.textValue()
- .removePrefix(BlueprintConstants.EXPRESSION_DSL_REFERENCE)
+ .removePrefix(BluePrintConstants.EXPRESSION_DSL_REFERENCE)
)
}
@@ -109,7 +109,7 @@
fun populatePropertyExpression(jsonNode: JsonNode): PropertyExpression {
val arrayNode: ArrayNode = jsonNode.first() as ArrayNode
check(arrayNode.size() >= 2) {
- throw BlueprintException(
+ throw BluePrintException(
String.format(
"missing property expression, " +
"it should be [ <modelable_entity_name>, <optional_req_or_cap_name>, <property_name>, " +
@@ -149,7 +149,7 @@
fun populateAttributeExpression(jsonNode: JsonNode): AttributeExpression {
val arrayNode: ArrayNode = jsonNode.first() as ArrayNode
check(arrayNode.size() >= 2) {
- throw BlueprintException(
+ throw BluePrintException(
String.format(
"missing attribute expression, " +
"it should be [ <modelable_entity_name>, <optional_req_or_cap_name>, <attribute_name>," +
@@ -190,7 +190,7 @@
val arrayNode: ArrayNode = jsonNode.first() as ArrayNode
check(arrayNode.size() >= 4) {
- throw BlueprintException(
+ throw BluePrintException(
String.format(
"missing operation output expression, " +
"it should be (<modelable_entity_name>, <interface_name>, <operation_name>, <output_variable_name>) , but present {}",
@@ -217,7 +217,7 @@
val arrayNode: ArrayNode = jsonNode.first() as ArrayNode
check(arrayNode.size() >= 2) {
- throw BlueprintException(
+ throw BluePrintException(
String.format(
"missing artifact expression, " +
"it should be [ <modelable_entity_name>, <artifact_name>, <location>, <remove> ] , but present {}",
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintImportService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintImportService.kt
similarity index 93%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintImportService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintImportService.kt
index 6dbacd1..80b7427 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintImportService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintImportService.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.service
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ImportDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ServiceTemplateUtils
@@ -28,7 +28,7 @@
import java.net.URLDecoder
import java.nio.charset.Charset
-class BlueprintImportService(private val parentServiceTemplate: ServiceTemplate, private val blueprintBasePath: String) {
+class BluePrintImportService(private val parentServiceTemplate: ServiceTemplate, private val blueprintBasePath: String) {
companion object {
private const val PARENT_SERVICE_TEMPLATE: String = "parent"
@@ -85,10 +85,10 @@
serviceTemplate = ServiceTemplateUtils.getServiceTemplate(importDefinition.file)
}
} catch (e: Exception) {
- throw BlueprintException("failed to populate service template for ${importDefinition.file} original error: ${e.message}", e)
+ throw BluePrintException("failed to populate service template for ${importDefinition.file} original error: ${e.message}", e)
}
if (serviceTemplate == null) {
- throw BlueprintException("failed to populate service template for : ${importDefinition.file}")
+ throw BluePrintException("failed to populate service template for : ${importDefinition.file}")
}
return serviceTemplate
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintJinjaTemplateService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintJinjaTemplateService.kt
similarity index 89%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintJinjaTemplateService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintJinjaTemplateService.kt
index ac85cb3..fdc348b 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintJinjaTemplateService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintJinjaTemplateService.kt
@@ -24,9 +24,9 @@
import com.hubspot.jinjava.interpret.JinjavaInterpreter
import com.hubspot.jinjava.loader.ResourceLocator
import com.hubspot.jinjava.loader.ResourceNotFoundException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintJsonNodeFactory
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintJsonNodeFactory
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
import org.onap.ccsdk.cds.controllerblueprints.core.removeNullNode
import java.io.IOException
@@ -34,13 +34,13 @@
import java.nio.file.Files.readAllBytes
import java.nio.file.Paths
-object BlueprintJinjaTemplateService {
+object BluePrintJinjaTemplateService {
/**
* To enable inheritance within CBA, we need Jinja runtime to know where to load the templates.
*/
class BlueprintRelatedTemplateLocator(
- private val bluePrintLoadConfiguration: BlueprintLoadConfiguration,
+ private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
private val artifactName: String,
private val artifactVersion: String
) : ResourceLocator {
@@ -68,7 +68,7 @@
json: String,
ignoreJsonNull: Boolean,
additionalContext: MutableMap<String, Any>,
- bluePrintLoadConfiguration: BlueprintLoadConfiguration,
+ bluePrintLoadConfiguration: BluePrintLoadConfiguration,
artifactName: String,
artifactVersion: String
): String {
@@ -95,13 +95,13 @@
}
val mapper = ObjectMapper()
- val nodeFactory = BlueprintJsonNodeFactory()
+ val nodeFactory = BluePrintJsonNodeFactory()
mapper.nodeFactory = nodeFactory
// Add the JSON Data to the context
if (json.isNotEmpty()) {
val jsonNode = mapper.readValue<JsonNode>(json, JsonNode::class.java)
- ?: throw BlueprintProcessorException("couldn't get json node from json")
+ ?: throw BluePrintProcessorException("couldn't get json node from json")
if (ignoreJsonNull) {
jsonNode.removeNullNode()
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRepoFileService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileService.kt
similarity index 67%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRepoFileService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileService.kt
index dd07bad..1f71495 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRepoFileService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileService.kt
@@ -16,61 +16,61 @@
package org.onap.ccsdk.cds.controllerblueprints.core.service
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
-open class BlueprintRepoFileService(modelTypePath: String) : BlueprintRepoService {
+open class BluePrintRepoFileService(modelTypePath: String) : BluePrintRepoService {
- private val log = LoggerFactory.getLogger(BlueprintRepoFileService::class.toString())
+ private val log = LoggerFactory.getLogger(BluePrintRepoFileService::class.toString())
- private val dataTypePath = modelTypePath.plus(BlueprintConstants.PATH_DIVIDER).plus(BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
- private val nodeTypePath = modelTypePath.plus(BlueprintConstants.PATH_DIVIDER).plus(BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE)
- private val artifactTypePath = modelTypePath.plus(BlueprintConstants.PATH_DIVIDER).plus(BlueprintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE)
+ private val dataTypePath = modelTypePath.plus(BluePrintConstants.PATH_DIVIDER).plus(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
+ private val nodeTypePath = modelTypePath.plus(BluePrintConstants.PATH_DIVIDER).plus(BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE)
+ private val artifactTypePath = modelTypePath.plus(BluePrintConstants.PATH_DIVIDER).plus(BluePrintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE)
private val capabilityTypePath =
- modelTypePath.plus(BlueprintConstants.PATH_DIVIDER).plus(BlueprintConstants.MODEL_DEFINITION_TYPE_CAPABILITY_TYPE)
+ modelTypePath.plus(BluePrintConstants.PATH_DIVIDER).plus(BluePrintConstants.MODEL_DEFINITION_TYPE_CAPABILITY_TYPE)
private val relationshipTypePath =
- modelTypePath.plus(BlueprintConstants.PATH_DIVIDER).plus(BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE)
+ modelTypePath.plus(BluePrintConstants.PATH_DIVIDER).plus(BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE)
private val extension = ".json"
override fun getDataType(dataTypeName: String): DataType {
- val fileName = dataTypePath.plus(BlueprintConstants.PATH_DIVIDER)
+ val fileName = dataTypePath.plus(BluePrintConstants.PATH_DIVIDER)
.plus(dataTypeName).plus(extension)
return getModelType(fileName, DataType::class.java)
}
override fun getNodeType(nodeTypeName: String): NodeType {
- val fileName = nodeTypePath.plus(BlueprintConstants.PATH_DIVIDER).plus(nodeTypeName).plus(extension)
+ val fileName = nodeTypePath.plus(BluePrintConstants.PATH_DIVIDER).plus(nodeTypeName).plus(extension)
return getModelType(fileName, NodeType::class.java)
}
override fun getArtifactType(artifactTypeName: String): ArtifactType {
- val fileName = artifactTypePath.plus(BlueprintConstants.PATH_DIVIDER)
+ val fileName = artifactTypePath.plus(BluePrintConstants.PATH_DIVIDER)
.plus(artifactTypeName).plus(extension)
return getModelType(fileName, ArtifactType::class.java)
}
override fun getRelationshipType(relationshipTypeName: String): RelationshipType {
- val fileName = relationshipTypePath.plus(BlueprintConstants.PATH_DIVIDER)
+ val fileName = relationshipTypePath.plus(BluePrintConstants.PATH_DIVIDER)
.plus(relationshipTypeName).plus(extension)
return getModelType(fileName, RelationshipType::class.java)
}
override fun getCapabilityDefinition(capabilityDefinitionName: String): CapabilityDefinition {
- val fileName = capabilityTypePath.plus(BlueprintConstants.PATH_DIVIDER)
+ val fileName = capabilityTypePath.plus(BluePrintConstants.PATH_DIVIDER)
.plus(capabilityDefinitionName).plus(extension)
return getModelType(fileName, CapabilityDefinition::class.java)
}
private fun <T> getModelType(fileName: String, valueType: Class<T>): T {
return JacksonUtils.readValueFromFile(fileName, valueType)
- ?: throw BlueprintException("couldn't get file($fileName) for type(${valueType.name}")
+ ?: throw BluePrintException("couldn't get file($fileName) for type(${valueType.name}")
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRuntimeService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
similarity index 79%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRuntimeService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
index c05b942..873e3a0 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRuntimeService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeService.kt
@@ -21,9 +21,9 @@
import com.fasterxml.jackson.databind.node.NullNode
import com.fasterxml.jackson.databind.node.ObjectNode
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.common.ApplicationConstants.LOG_REDACTED
@@ -32,16 +32,16 @@
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
import org.onap.ccsdk.cds.controllerblueprints.core.rootFieldsToMap
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.PropertyDefinitionUtils.Companion.hasLogProtect
import org.slf4j.LoggerFactory
import java.io.File
-interface BlueprintRuntimeService<T> {
+interface BluePrintRuntimeService<T> {
fun id(): String
- fun bluePrintContext(): BlueprintContext
+ fun bluePrintContext(): BluePrintContext
fun getExecutionContext(): T
@@ -63,9 +63,9 @@
fun getAsDouble(key: String): Double?
- fun getBlueprintError(): BlueprintError
+ fun getBluePrintError(): BluePrintError
- fun setBlueprintError(bluePrintError: BlueprintError)
+ fun setBluePrintError(bluePrintError: BluePrintError)
fun loadEnvironments(type: String, fileName: String)
@@ -211,30 +211,30 @@
*
* @author Brinda Santh
*/
-open class DefaultBlueprintRuntimeService(private var id: String, private var bluePrintContext: BlueprintContext) :
- BlueprintRuntimeService<MutableMap<String, JsonNode>> {
+open class DefaultBluePrintRuntimeService(private var id: String, private var bluePrintContext: BluePrintContext) :
+ BluePrintRuntimeService<MutableMap<String, JsonNode>> {
@Transient
- private val log = LoggerFactory.getLogger(BlueprintRuntimeService::class.toString())
+ private val log = LoggerFactory.getLogger(BluePrintRuntimeService::class.toString())
private var store: MutableMap<String, JsonNode> = hashMapOf()
- private var bluePrintError = BlueprintError()
+ private var bluePrintError = BluePrintError()
init {
/**
* Load Blueprint Environments Properties
*/
val absoluteEnvFilePath = bluePrintContext.rootPath.plus(File.separator)
- .plus(BlueprintConstants.TOSCA_ENVIRONMENTS_DIR)
- loadEnvironments(BlueprintConstants.PROPERTY_BPP, absoluteEnvFilePath)
+ .plus(BluePrintConstants.TOSCA_ENVIRONMENTS_DIR)
+ loadEnvironments(BluePrintConstants.PROPERTY_BPP, absoluteEnvFilePath)
}
override fun id(): String {
return id
}
- override fun bluePrintContext(): BlueprintContext {
+ override fun bluePrintContext(): BluePrintContext {
return bluePrintContext
}
@@ -252,7 +252,7 @@
}
override fun get(key: String): JsonNode {
- return store[key] ?: throw BlueprintProcessorException("failed to get execution property($key)")
+ return store[key] ?: throw BluePrintProcessorException("failed to get execution property($key)")
}
override fun check(key: String): Boolean {
@@ -283,16 +283,16 @@
return get(key).asDouble()
}
- override fun getBlueprintError(): BlueprintError {
+ override fun getBluePrintError(): BluePrintError {
return this.bluePrintError
}
- override fun setBlueprintError(bluePrintError: BlueprintError) {
+ override fun setBluePrintError(bluePrintError: BluePrintError) {
this.bluePrintError = bluePrintError
}
override fun loadEnvironments(type: String, fileName: String) {
- BlueprintMetadataUtils.environmentFileProperties(fileName).forEach { key, value ->
+ BluePrintMetadataUtils.environmentFileProperties(fileName).forEach { key, value ->
setNodeTemplateAttributeValue(type, key.toString(), value.asJsonType())
}
}
@@ -300,7 +300,7 @@
override fun resolveWorkflowOutputs(workflowName: String): MutableMap<String, JsonNode> {
log.info("resolveWorkflowOutputs for workflow($workflowName)")
val outputs = bluePrintContext.workflowByName(workflowName).outputs ?: mutableMapOf()
- return resolvePropertyDefinitions(BlueprintConstants.MODEL_DEFINITION_TYPE_WORKFLOW, "WORKFLOW", outputs)
+ return resolvePropertyDefinitions(BluePrintConstants.MODEL_DEFINITION_TYPE_WORKFLOW, "WORKFLOW", outputs)
}
/**
@@ -309,7 +309,7 @@
*/
override fun resolveDSLExpression(dslPropertyName: String): JsonNode {
val propertyAssignments = bluePrintContext.dslPropertiesByName(dslPropertyName)
- return if (BlueprintExpressionService.checkContainsExpression(propertyAssignments) &&
+ return if (BluePrintExpressionService.checkContainsExpression(propertyAssignments) &&
propertyAssignments is ObjectNode
) {
val rootKeyMap = propertyAssignments.rootFieldsToMap()
@@ -318,7 +318,7 @@
val propertyAssignmentExpression = PropertyAssignmentService(this)
propertyAssignmentValue[propertyName] = propertyAssignmentExpression
.resolveAssignmentExpression(
- BlueprintConstants.MODEL_DEFINITION_TYPE_DSL,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DSL,
"DSL",
propertyName,
propertyValue
@@ -381,7 +381,7 @@
}
/** If property is Map type, then resolve the property value, It may have expressions */
- if (nodeTypeProperty.type == BlueprintConstants.DATA_TYPE_MAP &&
+ if (nodeTypeProperty.type == BluePrintConstants.DATA_TYPE_MAP &&
resolvedValue.returnNullIfMissing() != null
) {
val mapResolvedValue = resolvePropertyAssignments(
@@ -443,7 +443,7 @@
propertyAssignments: MutableMap<String, JsonNode>
): MutableMap<String, JsonNode> {
return resolvePropertyAssignments(
- BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
nodeTemplateName, propertyDefinitions, propertyAssignments
)
}
@@ -547,7 +547,7 @@
val nodeTemplate = bluePrintContext.nodeTemplateByName(nodeTemplateName)
return nodeTemplate.artifacts?.get(artifactName)
- ?: throw BlueprintProcessorException(
+ ?: throw BluePrintProcessorException(
"failed to get artifact definition($artifactName) from the node template"
)
}
@@ -561,7 +561,7 @@
// Get the Relationship Type Definitions
val propertiesDefinitions = bluePrintContext.relationshipTypeByName(relationshipTemplate.type).properties
- ?: throw BlueprintProcessorException("failed to get ${relationshipTemplate.type} properties.")
+ ?: throw BluePrintProcessorException("failed to get ${relationshipTemplate.type} properties.")
/**
* Resolve the RelationshipTemplate Property Assignment Values.
@@ -579,13 +579,13 @@
propertyAssignments: MutableMap<String, JsonNode>
): MutableMap<String, JsonNode> {
return resolvePropertyAssignments(
- BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE,
relationshipTemplateName, propertyDefinitions, propertyAssignments
)
}
override fun setInputValue(propertyName: String, value: JsonNode) {
- val path = """${BlueprintConstants.PATH_INPUTS}${BlueprintConstants.PATH_DIVIDER}$propertyName"""
+ val path = """${BluePrintConstants.PATH_INPUTS}${BluePrintConstants.PATH_DIVIDER}$propertyName"""
put(path, value)
}
@@ -595,27 +595,27 @@
propertyDefinition: PropertyDefinition,
value: JsonNode
) {
- val path: String = StringBuilder(BlueprintConstants.PATH_NODE_WORKFLOWS)
- .append(BlueprintConstants.PATH_DIVIDER).append(workflowName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_INPUTS)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_PROPERTIES)
- .append(BlueprintConstants.PATH_DIVIDER).append(propertyName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_WORKFLOWS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(workflowName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INPUTS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
put(path, value)
}
override fun setNodeTemplatePropertyValue(nodeTemplateName: String, propertyName: String, value: JsonNode) {
- val path: String = StringBuilder(BlueprintConstants.PATH_NODE_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_PROPERTIES)
- .append(BlueprintConstants.PATH_DIVIDER).append(propertyName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
put(path, value)
}
override fun setNodeTemplateAttributeValue(nodeTemplateName: String, attributeName: String, value: JsonNode) {
- val path: String = StringBuilder(BlueprintConstants.PATH_NODE_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_ATTRIBUTES)
- .append(BlueprintConstants.PATH_DIVIDER).append(attributeName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_ATTRIBUTES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(attributeName).toString()
put(path, value)
}
@@ -626,14 +626,14 @@
propertyName: String,
value: JsonNode
) {
- val path: String = StringBuilder(BlueprintConstants.PATH_NODE_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_INTERFACES)
- .append(BlueprintConstants.PATH_DIVIDER).append(interfaceName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_OPERATIONS)
- .append(BlueprintConstants.PATH_DIVIDER).append(operationName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_PROPERTIES)
- .append(BlueprintConstants.PATH_DIVIDER).append(propertyName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(operationName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
log.trace("setting operation property path ({}), values ({})", path, value)
put(path, value)
}
@@ -645,15 +645,15 @@
propertyName: String,
value: JsonNode
) {
- val path: String = StringBuilder(BlueprintConstants.PATH_NODE_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_INTERFACES)
- .append(BlueprintConstants.PATH_DIVIDER).append(interfaceName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_OPERATIONS)
- .append(BlueprintConstants.PATH_DIVIDER).append(operationName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_INPUTS)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_PROPERTIES)
- .append(BlueprintConstants.PATH_DIVIDER).append(propertyName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(operationName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INPUTS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
put(path, value)
}
@@ -664,21 +664,21 @@
propertyName: String,
value: JsonNode
) {
- val path: String = StringBuilder(BlueprintConstants.PATH_NODE_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_INTERFACES)
- .append(BlueprintConstants.PATH_DIVIDER).append(interfaceName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_OPERATIONS)
- .append(BlueprintConstants.PATH_DIVIDER).append(operationName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_OUTPUTS)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_PROPERTIES)
- .append(BlueprintConstants.PATH_DIVIDER).append(propertyName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(operationName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OUTPUTS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
put(path, value)
}
override fun getInputValue(propertyName: String): JsonNode {
- val path = StringBuilder(BlueprintConstants.PATH_INPUTS)
- .append(BlueprintConstants.PATH_DIVIDER).append(propertyName).toString()
+ val path = StringBuilder(BluePrintConstants.PATH_INPUTS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
return getJsonNode(path)
}
@@ -688,31 +688,31 @@
operationName: String,
propertyName: String
): JsonNode {
- val path: String = StringBuilder(BlueprintConstants.PATH_NODE_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_INTERFACES)
- .append(BlueprintConstants.PATH_DIVIDER).append(interfaceName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_OPERATIONS)
- .append(BlueprintConstants.PATH_DIVIDER).append(operationName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_OUTPUTS)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_PROPERTIES)
- .append(BlueprintConstants.PATH_DIVIDER).append(propertyName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_INTERFACES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(interfaceName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OPERATIONS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(operationName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_OUTPUTS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
return getJsonNode(path)
}
override fun getNodeTemplatePropertyValue(nodeTemplateName: String, propertyName: String): JsonNode {
- val path: String = StringBuilder(BlueprintConstants.PATH_NODE_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_PROPERTIES)
- .append(BlueprintConstants.PATH_DIVIDER).append(propertyName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
return getJsonNode(path)
}
override fun getNodeTemplateAttributeValue(nodeTemplateName: String, attributeName: String): JsonNode {
- val path: String = StringBuilder(BlueprintConstants.PATH_NODE_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_ATTRIBUTES)
- .append(BlueprintConstants.PATH_DIVIDER).append(attributeName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_ATTRIBUTES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(attributeName).toString()
return getJsonNode(path)
}
@@ -720,10 +720,10 @@
relationshipTemplateName: String,
propertyName: String
): JsonNode? {
- val path: String = StringBuilder(BlueprintConstants.PATH_RELATIONSHIP_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(relationshipTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_PROPERTIES)
- .append(BlueprintConstants.PATH_DIVIDER).append(propertyName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_RELATIONSHIP_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(relationshipTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_PROPERTIES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(propertyName).toString()
return getJsonNode(path)
}
@@ -731,17 +731,17 @@
relationshipTemplateName: String,
attributeName: String
): JsonNode? {
- val path: String = StringBuilder(BlueprintConstants.PATH_RELATIONSHIP_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(relationshipTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_ATTRIBUTES)
- .append(BlueprintConstants.PATH_DIVIDER).append(attributeName).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_RELATIONSHIP_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(relationshipTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_ATTRIBUTES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(attributeName).toString()
return getJsonNode(path)
}
override fun assignInputs(jsonNode: JsonNode) {
log.info("assignInputs from input JSON ({})", jsonNode.toString())
bluePrintContext.inputs()?.forEach { propertyName, property ->
- val valueNode: JsonNode = jsonNode.at(BlueprintConstants.PATH_DIVIDER + propertyName)
+ val valueNode: JsonNode = jsonNode.at(BluePrintConstants.PATH_DIVIDER + propertyName)
?: property.defaultValue
?: NullNode.getInstance()
setInputValue(propertyName, valueNode)
@@ -765,7 +765,7 @@
}
private fun findAndSetInputValue(propertyName: String, property: PropertyDefinition, jsonNode: JsonNode) {
- val valueNode = jsonNode.at(BlueprintConstants.PATH_DIVIDER + propertyName)
+ val valueNode = jsonNode.at(BluePrintConstants.PATH_DIVIDER + propertyName)
.returnNullIfMissing()
?: property.defaultValue
?: NullNode.getInstance()
@@ -777,10 +777,10 @@
override fun getJsonForNodeTemplateAttributeProperties(nodeTemplateName: String, keys: List<String>): JsonNode {
val jsonNode: ObjectNode = jacksonObjectMapper().createObjectNode()
- val path: String = StringBuilder(BlueprintConstants.PATH_NODE_TEMPLATES)
- .append(BlueprintConstants.PATH_DIVIDER).append(nodeTemplateName)
- .append(BlueprintConstants.PATH_DIVIDER).append(BlueprintConstants.PATH_ATTRIBUTES)
- .append(BlueprintConstants.PATH_DIVIDER).toString()
+ val path: String = StringBuilder(BluePrintConstants.PATH_NODE_TEMPLATES)
+ .append(BluePrintConstants.PATH_DIVIDER).append(nodeTemplateName)
+ .append(BluePrintConstants.PATH_DIVIDER).append(BluePrintConstants.PATH_ATTRIBUTES)
+ .append(BluePrintConstants.PATH_DIVIDER).toString()
store.keys.filter {
it.startsWith(path)
}.map {
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateService.kt
similarity index 72%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateService.kt
index d953bd5..d7f7b9a 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateService.kt
@@ -15,18 +15,18 @@
*/
package org.onap.ccsdk.cds.controllerblueprints.core.service
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTemplateService
import org.springframework.stereotype.Service
@Service
-class BlueprintTemplateService(private val bluePrintLoadConfiguration: BlueprintLoadConfiguration) :
+class BluePrintTemplateService(private val bluePrintLoadConfiguration: BluePrintLoadConfiguration) :
BlueprintTemplateService {
override suspend fun generateContent(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
nodeTemplateName: String,
artifactName: String,
jsonData: String,
@@ -40,8 +40,8 @@
val template = bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactName)
return when (templateType) {
- BlueprintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_JINJA -> {
- BlueprintJinjaTemplateService.generateContent(
+ BluePrintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_JINJA -> {
+ BluePrintJinjaTemplateService.generateContent(
template,
jsonData,
ignoreJsonNull,
@@ -51,13 +51,13 @@
bluePrintRuntimeService.bluePrintContext().version()
)
}
- BlueprintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_VELOCITY -> {
- BlueprintVelocityTemplateService.generateContent(template, jsonData, ignoreJsonNull, additionalContext)
+ BluePrintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_VELOCITY -> {
+ BluePrintVelocityTemplateService.generateContent(template, jsonData, ignoreJsonNull, additionalContext)
}
else -> {
- throw BlueprintProcessorException(
- "Unknown Artifact type, expecting ${BlueprintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_JINJA}" +
- "or ${BlueprintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_VELOCITY}"
+ throw BluePrintProcessorException(
+ "Unknown Artifact type, expecting ${BluePrintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_JINJA}" +
+ "or ${BluePrintConstants.MODEL_TYPE_ARTIFACT_TEMPLATE_VELOCITY}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintValidatorService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintValidatorService.kt
similarity index 85%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintValidatorService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintValidatorService.kt
index 888c5c0..8a8ded7 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintValidatorService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintValidatorService.kt
@@ -20,9 +20,9 @@
import com.fasterxml.jackson.databind.JsonNode
import com.google.common.base.Preconditions
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
@@ -51,35 +51,35 @@
*
* @author Brinda Santh
*/
-interface BlueprintValidatorService : Serializable {
+interface BluePrintValidatorService : Serializable {
- @Throws(BlueprintException::class)
- fun validateBlueprint(bluePrintContext: BlueprintContext, properties: MutableMap<String, Any>)
+ @Throws(BluePrintException::class)
+ fun validateBlueprint(bluePrintContext: BluePrintContext, properties: MutableMap<String, Any>)
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun validateBlueprint(serviceTemplate: ServiceTemplate, properties: MutableMap<String, Any>)
}
@Deprecated("Decomposed implementation moved to blueprint-validation module")
-open class BlueprintValidatorDefaultService : BlueprintValidatorService {
+open class BluePrintValidatorDefaultService : BluePrintValidatorService {
- val log = LoggerFactory.getLogger(BlueprintValidatorDefaultService::class.toString())
+ val log = LoggerFactory.getLogger(BluePrintValidatorDefaultService::class.toString())
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintContext: BluePrintContext
lateinit var serviceTemplate: ServiceTemplate
lateinit var properties: MutableMap<String, Any>
var message: StringBuilder = StringBuilder()
- private val separator: String = BlueprintConstants.PATH_DIVIDER
+ private val separator: String = BluePrintConstants.PATH_DIVIDER
var paths: MutableList<String> = arrayListOf()
- @Throws(BlueprintException::class)
- override fun validateBlueprint(bluePrintContext: BlueprintContext, properties: MutableMap<String, Any>) {
+ @Throws(BluePrintException::class)
+ override fun validateBlueprint(bluePrintContext: BluePrintContext, properties: MutableMap<String, Any>) {
validateBlueprint(bluePrintContext.serviceTemplate, properties)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun validateBlueprint(serviceTemplate: ServiceTemplate, properties: MutableMap<String, Any>) {
- this.bluePrintContext = BlueprintContext(serviceTemplate)
+ this.bluePrintContext = BluePrintContext(serviceTemplate)
this.serviceTemplate = serviceTemplate
this.properties = properties
try {
@@ -92,21 +92,21 @@
} catch (e: Exception) {
log.error("validation failed in the path : {}", paths.joinToString(separator), e)
log.error("validation trace message :{} ", message)
- throw BlueprintException(
+ throw BluePrintException(
e,
format("failed to validate blueprint on path ({}) with message {}", paths.joinToString(separator), e.message)
)
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateMetadata(metaDataMap: MutableMap<String, String>) {
paths.add("metadata")
- val templateName = metaDataMap[BlueprintConstants.METADATA_TEMPLATE_NAME]
- val templateVersion = metaDataMap[BlueprintConstants.METADATA_TEMPLATE_VERSION]
- val templateTags = metaDataMap[BlueprintConstants.METADATA_TEMPLATE_TAGS]
- val templateAuthor = metaDataMap[BlueprintConstants.METADATA_TEMPLATE_AUTHOR]
+ val templateName = metaDataMap[BluePrintConstants.METADATA_TEMPLATE_NAME]
+ val templateVersion = metaDataMap[BluePrintConstants.METADATA_TEMPLATE_VERSION]
+ val templateTags = metaDataMap[BluePrintConstants.METADATA_TEMPLATE_TAGS]
+ val templateAuthor = metaDataMap[BluePrintConstants.METADATA_TEMPLATE_AUTHOR]
Preconditions.checkArgument(StringUtils.isNotBlank(templateName), "failed to get template name metadata")
Preconditions.checkArgument(StringUtils.isNotBlank(templateVersion), "failed to get template version metadata")
@@ -115,7 +115,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateArtifactTypes(artifactTypes: MutableMap<String, ArtifactType>) {
paths.add("artifact_types")
artifactTypes.forEach { artifactName, artifactType ->
@@ -127,7 +127,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateDataTypes(dataTypes: MutableMap<String, DataType>) {
paths.add("dataTypes")
dataTypes.forEach { dataTypeName, dataType ->
@@ -139,7 +139,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateNodeTypes(nodeTypes: MutableMap<String, NodeType>) {
paths.add("nodeTypes")
nodeTypes.forEach { nodeTypeName, nodeType ->
@@ -149,7 +149,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateNodeType(nodeTypeName: String, nodeType: NodeType) {
paths.add(nodeTypeName)
message.appendln("--> Node Type :" + paths.joinToString(separator))
@@ -157,9 +157,9 @@
// Check Derived From
checkValidNodeTypesDerivedFrom(nodeTypeName, derivedFrom)
- if (!BlueprintTypes.rootNodeTypes().contains(derivedFrom)) {
+ if (!BluePrintTypes.rootNodeTypes().contains(derivedFrom)) {
serviceTemplate.nodeTypes?.get(derivedFrom)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get derivedFrom NodeType({})'s for NodeType({}) ",
derivedFrom, nodeTypeName
@@ -174,14 +174,14 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun checkValidNodeTypesDerivedFrom(nodeTypeName: String, derivedFrom: String) {
- check(BlueprintTypes.validNodeTypeDerivedFroms.contains(derivedFrom)) {
- throw BlueprintException(format("Failed to get node type ({})'s derivedFrom({}) definition ", nodeTypeName, derivedFrom))
+ check(BluePrintTypes.validNodeTypeDerivedFroms.contains(derivedFrom)) {
+ throw BluePrintException(format("Failed to get node type ({})'s derivedFrom({}) definition ", nodeTypeName, derivedFrom))
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateTopologyTemplate(topologyTemplate: TopologyTemplate) {
paths.add("topology")
message.appendln("--> Topology Template")
@@ -191,7 +191,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateInputs(inputs: MutableMap<String, PropertyDefinition>) {
paths.add("inputs")
message.appendln("---> Input :" + paths.joinToString(separator))
@@ -199,7 +199,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateNodeTemplates(nodeTemplates: MutableMap<String, NodeTemplate>) {
paths.add("nodeTemplates")
nodeTemplates.forEach { nodeTemplateName, nodeTemplate ->
@@ -208,14 +208,14 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateNodeTemplate(nodeTemplateName: String, nodeTemplate: NodeTemplate) {
paths.add(nodeTemplateName)
message.appendln("---> NodeTemplate :" + paths.joinToString(separator))
val type: String = nodeTemplate.type
val nodeType: NodeType = serviceTemplate.nodeTypes?.get(type)
- ?: throw BlueprintException(format("Failed to get NodeType({}) definition for NodeTemplate({})", type, nodeTemplateName))
+ ?: throw BluePrintException(format("Failed to get NodeType({}) definition for NodeTemplate({})", type, nodeTemplateName))
nodeTemplate.artifacts?.let { validateArtifactDefinitions(nodeTemplate.artifacts!!) }
nodeTemplate.properties?.let { validatePropertyAssignments(nodeType.properties!!, nodeTemplate.properties!!) }
@@ -225,26 +225,26 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateArtifactDefinitions(artifacts: MutableMap<String, ArtifactDefinition>) {
paths.add("artifacts")
artifacts.forEach { artifactDefinitionName, artifactDefinition ->
paths.add(artifactDefinitionName)
message.appendln("Validating artifact " + paths.joinToString(separator))
val type: String = artifactDefinition.type
- ?: throw BlueprintException(format("type is missing for ArtifactDefinition({})", artifactDefinitionName))
+ ?: throw BluePrintException(format("type is missing for ArtifactDefinition({})", artifactDefinitionName))
// Check Artifact Type
checkValidArtifactType(artifactDefinitionName, type)
val file: String = artifactDefinition.file
- ?: throw BlueprintException(format("file is missing for ArtifactDefinition({})", artifactDefinitionName))
+ ?: throw BluePrintException(format("file is missing for ArtifactDefinition({})", artifactDefinitionName))
paths.removeAt(paths.lastIndex)
}
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateWorkFlows(workflows: MutableMap<String, Workflow>) {
paths.add("workflows")
workflows.forEach { workflowName, workflow ->
@@ -255,7 +255,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateWorkFlow(workflowName: String, workflow: Workflow) {
paths.add(workflowName)
message.appendln("---> Workflow :" + paths.joinToString(separator))
@@ -271,19 +271,19 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validatePropertyDefinitions(properties: MutableMap<String, PropertyDefinition>) {
paths.add("properties")
properties.forEach { propertyName, propertyDefinition ->
paths.add(propertyName)
val dataType: String = propertyDefinition.type
when {
- BlueprintTypes.validPrimitiveTypes().contains(dataType) -> {
+ BluePrintTypes.validPrimitiveTypes().contains(dataType) -> {
// Do Nothing
}
- BlueprintTypes.validCollectionTypes().contains(dataType) -> {
+ BluePrintTypes.validCollectionTypes().contains(dataType) -> {
val entrySchemaType: String = propertyDefinition.entrySchema?.type
- ?: throw BlueprintException(format("Entry schema for DataType ({}) for the property ({}) not found", dataType, propertyName))
+ ?: throw BluePrintException(format("Entry schema for DataType ({}) for the property ({}) not found", dataType, propertyName))
checkPrimitiveOrComplex(entrySchemaType, propertyName)
}
else -> checkPropertyDataType(dataType, propertyName)
@@ -294,33 +294,33 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validatePropertyAssignments(
nodeTypeProperties: MutableMap<String, PropertyDefinition>,
properties: MutableMap<String, JsonNode>
) {
properties.forEach { propertyName, propertyAssignment ->
val propertyDefinition: PropertyDefinition = nodeTypeProperties[propertyName]
- ?: throw BlueprintException(format("failed to get definition for the property ({})", propertyName))
+ ?: throw BluePrintException(format("failed to get definition for the property ({})", propertyName))
validatePropertyAssignment(propertyName, propertyDefinition, propertyAssignment)
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validatePropertyAssignment(
propertyName: String,
propertyDefinition: PropertyDefinition,
propertyAssignment: JsonNode
) {
// Check and Validate if Expression Node
- val expressionData = BlueprintExpressionService.getExpressionData(propertyAssignment)
+ val expressionData = BluePrintExpressionService.getExpressionData(propertyAssignment)
if (!expressionData.isExpression) {
checkPropertyValue(propertyName, propertyDefinition, propertyAssignment)
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateCapabilityAssignments(nodeType: NodeType, nodeTemplateName: String, nodeTemplate: NodeTemplate) {
val capabilities = nodeTemplate.capabilities
paths.add("capabilities")
@@ -328,7 +328,7 @@
paths.add(capabilityName)
val capabilityDefinition = nodeType.capabilities?.get(capabilityName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get NodeTemplate({}) capability definition ({}) " +
"from NodeType({}) ",
@@ -343,7 +343,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateCapabilityAssignment(
nodeTemplateName: String,
capabilityName: String,
@@ -354,14 +354,14 @@
capabilityAssignment.properties?.let { validatePropertyAssignments(capabilityDefinition.properties!!, capabilityAssignment.properties!!) }
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateRequirementAssignments(nodeType: NodeType, nodeTemplateName: String, nodeTemplate: NodeTemplate) {
val requirements = nodeTemplate.requirements
paths.add("requirements")
requirements?.forEach { requirementName, requirementAssignment ->
paths.add(requirementName)
val requirementDefinition = nodeType.requirements?.get(requirementName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get NodeTemplate({}) requirement definition ({}) from" +
" NodeType({}) ",
@@ -375,7 +375,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateRequirementAssignment(
nodeTemplateName: String,
requirementAssignmentName: String,
@@ -387,8 +387,8 @@
val capabilityName = requirementAssignment.capability
val relationship = requirementAssignment.relationship!!
- check(BlueprintTypes.validRelationShipDerivedFroms.contains(relationship)) {
- throw BlueprintException(
+ check(BluePrintTypes.validRelationShipDerivedFroms.contains(relationship)) {
+ throw BluePrintException(
format(
"Failed to get relationship type ({}) for NodeTemplate({})'s requirement({}) ",
relationship, nodeTemplateName, requirementAssignmentName
@@ -397,7 +397,7 @@
}
val relationShipNodeTemplate = serviceTemplate.topologyTemplate?.nodeTemplates?.get(requirementNodeTemplateName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get requirement NodeTemplate({})'s for NodeTemplate({}) requirement({}) ",
requirementNodeTemplateName, nodeTemplateName, requirementAssignmentName
@@ -405,7 +405,7 @@
)
relationShipNodeTemplate.capabilities?.get(capabilityName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get requirement NodeTemplate({})'s capability({}) for NodeTemplate ({})'s requirement({}) ",
requirementNodeTemplateName, capabilityName, nodeTemplateName, requirementAssignmentName
@@ -413,7 +413,7 @@
)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateInterfaceAssignments(nodeType: NodeType, nodeTemplateName: String, nodeTemplate: NodeTemplate) {
val interfaces = nodeTemplate.interfaces
@@ -421,7 +421,7 @@
interfaces?.forEach { interfaceAssignmentName, interfaceAssignment ->
paths.add(interfaceAssignmentName)
val interfaceDefinition = nodeType.interfaces?.get(interfaceAssignmentName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get NodeTemplate({}) interface definition ({}) from" +
" NodeType({}) ",
@@ -438,7 +438,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateInterfaceAssignment(
nodeTemplateName: String,
interfaceAssignmentName: String,
@@ -455,7 +455,7 @@
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateInterfaceOperationsAssignment(
nodeTemplateName: String,
interfaceAssignmentName: String,
@@ -468,7 +468,7 @@
it.forEach { operationAssignmentName, operationAssignments ->
val operationDefinition = interfaceDefinition.operations?.get(operationAssignmentName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get NodeTemplate({}) operation definition ({}) ",
nodeTemplateName, operationAssignmentName
@@ -485,7 +485,7 @@
inputs?.forEach { propertyName, propertyAssignment ->
val propertyDefinition = operationDefinition.inputs?.get(propertyName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get NodeTemplate({}) operation definition ({}) " +
"property definition({})",
@@ -498,7 +498,7 @@
outputs?.forEach { propertyName, propertyAssignment ->
val propertyDefinition = operationDefinition.outputs?.get(propertyName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get NodeTemplate({}) operation definition ({}) " +
"output property definition({})",
@@ -513,7 +513,7 @@
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateCapabilityDefinitions(nodeTypeName: String, nodeType: NodeType) {
val capabilities = nodeType.capabilities
paths.add("capabilities")
@@ -527,7 +527,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateCapabilityDefinition(
nodeTypeName: String,
nodeType: NodeType,
@@ -535,8 +535,8 @@
capabilityDefinition: CapabilityDefinition
) {
val capabilityType = capabilityDefinition.type
- check(BlueprintTypes.validCapabilityTypes.contains(capabilityType)) {
- throw BlueprintException(
+ check(BluePrintTypes.validCapabilityTypes.contains(capabilityType)) {
+ throw BluePrintException(
format(
"Failed to get CapabilityType({}) for NodeType({})",
capabilityType, nodeTypeName
@@ -545,7 +545,7 @@
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateRequirementDefinitions(nodeName: String, nodeType: NodeType) {
paths.add("requirements")
val requirements = nodeType.requirements
@@ -559,7 +559,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateRequirementDefinition(
nodeTypeName: String,
nodeType: NodeType,
@@ -572,8 +572,8 @@
val capabilityName = requirementDefinition.capability
val relationship = requirementDefinition.relationship!!
- check(BlueprintTypes.validRelationShipDerivedFroms.contains(relationship)) {
- throw BlueprintException(
+ check(BluePrintTypes.validRelationShipDerivedFroms.contains(relationship)) {
+ throw BluePrintException(
format(
"Failed to get relationship({}) for NodeType({})'s requirement({}) ",
relationship, nodeTypeName, requirementDefinitionName
@@ -582,7 +582,7 @@
}
val relationShipNodeType = serviceTemplate.nodeTypes?.get(requirementNodeTypeName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get requirement NodeType({})'s for requirement({}) ",
requirementNodeTypeName, requirementDefinitionName
@@ -590,7 +590,7 @@
)
relationShipNodeType.capabilities?.get(capabilityName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"Failed to get requirement NodeType({})'s capability({}) for NodeType ({})'s requirement({}) ",
requirementNodeTypeName, capabilityName, nodeTypeName, requirementDefinitionName
@@ -598,7 +598,7 @@
)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateInterfaceDefinitions(interfaces: MutableMap<String, InterfaceDefinition>) {
paths.add("interfaces")
interfaces.forEach { interfaceName, interfaceDefinition ->
@@ -610,7 +610,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateOperationDefinitions(operations: MutableMap<String, OperationDefinition>) {
paths.add("operations")
operations.forEach { opertaionName, operationDefinition ->
@@ -624,38 +624,38 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateImplementation(implementation: Implementation) {
checkNotEmpty(implementation.primary) { "couldn't get implementation" }
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun checkValidArtifactType(artifactDefinitionName: String, artifactTypeName: String) {
val artifactType = serviceTemplate.artifactTypes?.get(artifactTypeName)
- ?: throw BlueprintException("failed to artifactType($artifactTypeName) for ArtifactDefinition($artifactDefinitionName)")
+ ?: throw BluePrintException("failed to artifactType($artifactTypeName) for ArtifactDefinition($artifactDefinitionName)")
checkValidArtifactTypeDerivedFrom(artifactTypeName, artifactType.derivedFrom)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun checkValidArtifactTypeDerivedFrom(artifactTypeName: String, derivedFrom: String) {
- check(BlueprintTypes.validArtifactTypeDerivedFroms.contains(derivedFrom)) {
- throw BlueprintException("failed to get artifactType($artifactTypeName)'s derivedFrom($derivedFrom) definition")
+ check(BluePrintTypes.validArtifactTypeDerivedFroms.contains(derivedFrom)) {
+ throw BluePrintException("failed to get artifactType($artifactTypeName)'s derivedFrom($derivedFrom) definition")
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun checkValidDataTypeDerivedFrom(dataTypeName: String, derivedFrom: String) {
- check(BlueprintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {
- throw BlueprintException(format("Failed to get DataType({})'s derivedFrom({}) definition ", dataTypeName, derivedFrom))
+ check(BluePrintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {
+ throw BluePrintException(format("Failed to get DataType({})'s derivedFrom({}) definition ", dataTypeName, derivedFrom))
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun checkValidRelationshipTypeDerivedFrom(relationshipTypeName: String, derivedFrom: String) {
- check(BlueprintTypes.validRelationShipDerivedFroms.contains(derivedFrom)) {
- throw BlueprintException(format("Failed to get relationship type ({})'s derivedFrom({}) definition ", relationshipTypeName, derivedFrom))
+ check(BluePrintTypes.validRelationShipDerivedFroms.contains(derivedFrom)) {
+ throw BluePrintException(format("Failed to get relationship type ({})'s derivedFrom({}) definition ", relationshipTypeName, derivedFrom))
}
}
@@ -663,14 +663,14 @@
val propertyType = propertyDefinition.type
val isValid: Boolean
- if (BlueprintTypes.validPrimitiveTypes().contains(propertyType)) {
+ if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)) {
isValid = JacksonUtils.checkJsonNodeValueOfPrimitiveType(propertyType, propertyAssignment)
- } else if (BlueprintTypes.validCollectionTypes().contains(propertyType)) {
+ } else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
val entrySchemaType = propertyDefinition.entrySchema?.type
- ?: throw BlueprintException(format("Failed to get EntrySchema type for the collection property ({})", propertyName))
+ ?: throw BluePrintException(format("Failed to get EntrySchema type for the collection property ({})", propertyName))
- if (!BlueprintTypes.validPropertyTypes().contains(entrySchemaType)) {
+ if (!BluePrintTypes.validPropertyTypes().contains(entrySchemaType)) {
checkPropertyDataType(entrySchemaType, propertyName)
}
isValid = JacksonUtils.checkJsonNodeValueOfCollectionType(propertyType, propertyAssignment)
@@ -680,7 +680,7 @@
}
check(isValid) {
- throw BlueprintException(
+ throw BluePrintException(
format(
"property({}) defined of type({}) is not comptable with the value ({})",
propertyName, propertyType, propertyAssignment
@@ -692,16 +692,16 @@
private fun checkPropertyDataType(dataTypeName: String, propertyName: String) {
val dataType = serviceTemplate.dataTypes?.get(dataTypeName)
- ?: throw BlueprintException(format("DataType ({}) for the property ({}) not found", dataTypeName, propertyName))
+ ?: throw BluePrintException(format("DataType ({}) for the property ({}) not found", dataTypeName, propertyName))
checkValidDataTypeDerivedFrom(propertyName, dataType.derivedFrom)
}
private fun checkPrimitiveOrComplex(dataType: String, propertyName: String): Boolean {
- if (BlueprintTypes.validPrimitiveTypes().contains(dataType) || checkDataType(dataType)) {
+ if (BluePrintTypes.validPrimitiveTypes().contains(dataType) || checkDataType(dataType)) {
return true
} else {
- throw BlueprintException(format("DataType({}) for the property({}) is not valid", dataType, propertyName))
+ throw BluePrintException(format("DataType({}) for the property({}) is not valid", dataType, propertyName))
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintVelocityTemplateService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintVelocityTemplateService.kt
similarity index 92%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintVelocityTemplateService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintVelocityTemplateService.kt
index 1c48479..43e27d0 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintVelocityTemplateService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintVelocityTemplateService.kt
@@ -24,12 +24,12 @@
import org.apache.commons.lang3.StringUtils
import org.apache.velocity.VelocityContext
import org.apache.velocity.app.VelocityEngine
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintJsonNodeFactory
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintJsonNodeFactory
import org.onap.ccsdk.cds.controllerblueprints.core.removeNullNode
import java.io.StringWriter
-object BlueprintVelocityTemplateService {
+object BluePrintVelocityTemplateService {
/**
* Generate Content from Velocity Template and JSON Content with injected API
@@ -43,12 +43,12 @@
// Customized Object Mapper to remove String double quotes
val mapper = ObjectMapper()
- val nodeFactory = BlueprintJsonNodeFactory()
+ val nodeFactory = BluePrintJsonNodeFactory()
mapper.nodeFactory = nodeFactory
val jsonNode: JsonNode? = if (json.isNotEmpty()) {
mapper.readValue(json, JsonNode::class.java)
- ?: throw BlueprintProcessorException("couldn't get json node from json")
+ ?: throw BluePrintProcessorException("couldn't get json node from json")
} else {
null
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintWorkflowService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowService.kt
similarity index 95%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintWorkflowService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowService.kt
index b5121ca..f3e4e59 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintWorkflowService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowService.kt
@@ -25,8 +25,8 @@
import kotlinx.coroutines.channels.actor
import kotlinx.coroutines.channels.consumeEach
import kotlinx.coroutines.launch
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.data.EdgeLabel
import org.onap.ccsdk.cds.controllerblueprints.core.data.EdgeStatus
import org.onap.ccsdk.cds.controllerblueprints.core.data.Graph
@@ -39,11 +39,11 @@
import org.onap.ccsdk.cds.controllerblueprints.core.startNodes
import kotlin.coroutines.CoroutineContext
-interface BlueprintWorkFlowService<In, Out> {
+interface BluePrintWorkFlowService<In, Out> {
/** Executes imperative workflow graph [graph] for the bluePrintRuntimeService [bluePrintRuntimeService]
* and workflow input [input]*/
- suspend fun executeWorkflow(graph: Graph, bluePrintRuntimeService: BlueprintRuntimeService<*>, input: In): Out
+ suspend fun executeWorkflow(graph: Graph, bluePrintRuntimeService: BluePrintRuntimeService<*>, input: In): Out
suspend fun initializeWorkflow(input: In): EdgeLabel
@@ -91,11 +91,11 @@
}
/** Abstract workflow service implementation */
-abstract class AbstractBlueprintWorkFlowService<In, Out> : CoroutineScope, BlueprintWorkFlowService<In, Out> {
+abstract class AbstractBluePrintWorkFlowService<In, Out> : CoroutineScope, BluePrintWorkFlowService<In, Out> {
lateinit var graph: Graph
- private val log = logger(AbstractBlueprintWorkFlowService::class)
+ private val log = logger(AbstractBluePrintWorkFlowService::class)
private val job = Job()
@@ -131,7 +131,7 @@
// Wait for workflow completion or Error
nodeActor.invokeOnClose { exception ->
launch {
- if (exception != null) exceptions.add(BlueprintProcessorException(exception))
+ if (exception != null) exceptions.add(BluePrintProcessorException(exception))
log.info("workflow($workflowId) nodes completed with (${exceptions.size})exceptions")
val workflowOutput = prepareWorkflowOutput()
workflowExecuteMessage.output.complete(workflowOutput)
@@ -235,8 +235,8 @@
suspend fun executeNodeWorker(message: NodeExecuteMessage<In, Out>) {
val node = message.node
node.status = NodeStatus.EXECUTING
- val nodeState = if (node.id == BlueprintConstants.GRAPH_START_NODE_NAME ||
- node.id == BlueprintConstants.GRAPH_END_NODE_NAME
+ val nodeState = if (node.id == BluePrintConstants.GRAPH_START_NODE_NAME ||
+ node.id == BluePrintConstants.GRAPH_END_NODE_NAME
) {
EdgeLabel.SUCCESS
} else {
@@ -255,7 +255,7 @@
// Close the current channel
channel.close()
} else if (!edgePresent) {
- throw BlueprintProcessorException("node(${node.id}) outgoing edge($nodeState) is missing.")
+ throw BluePrintProcessorException("node(${node.id}) outgoing edge($nodeState) is missing.")
} else {
val skippingEdges = graph.outgoingEdgesNotInLabels(node.id, arrayListOf(nodeState))
log.debug("Skipping node($node)'s outgoing edges($skippingEdges)")
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/PropertyAssignmentService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/PropertyAssignmentService.kt
index 7a5a2d5..b246054 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/PropertyAssignmentService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/PropertyAssignmentService.kt
@@ -19,8 +19,8 @@
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.NullNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactExpression
@@ -40,11 +40,11 @@
*
* @author Brinda Santh
*/
-open class PropertyAssignmentService(var bluePrintRuntimeService: BlueprintRuntimeService<MutableMap<String, JsonNode>>) {
+open class PropertyAssignmentService(var bluePrintRuntimeService: BluePrintRuntimeService<MutableMap<String, JsonNode>>) {
private val log = LoggerFactory.getLogger(this::class.toString())
- private var bluePrintContext: BlueprintContext = bluePrintRuntimeService.bluePrintContext()
+ private var bluePrintContext: BluePrintContext = bluePrintRuntimeService.bluePrintContext()
/*
@@ -60,7 +60,7 @@
assignment: JsonNode
): JsonNode {
log.trace("Assignment ({})", assignment)
- val expressionData = BlueprintExpressionService.getExpressionData(assignment)
+ val expressionData = BluePrintExpressionService.getExpressionData(assignment)
return if (expressionData.isExpression) {
resolveExpression(definitionType, definitionName, assignmentName, expressionData)
@@ -82,32 +82,32 @@
val command = expressionData.command!!
when (command) {
- BlueprintConstants.EXPRESSION_GET_INPUT -> {
+ BluePrintConstants.EXPRESSION_GET_INPUT -> {
valueNode = bluePrintRuntimeService.getInputValue(expressionData.inputExpression?.propertyName!!)
}
- BlueprintConstants.EXPRESSION_GET_ATTRIBUTE -> {
+ BluePrintConstants.EXPRESSION_GET_ATTRIBUTE -> {
valueNode =
resolveAttributeExpression(definitionType, definitionName, expressionData.attributeExpression!!)
}
- BlueprintConstants.EXPRESSION_GET_PROPERTY -> {
+ BluePrintConstants.EXPRESSION_GET_PROPERTY -> {
valueNode =
resolvePropertyExpression(definitionType, definitionName, expressionData.propertyExpression!!)
}
- BlueprintConstants.EXPRESSION_GET_OPERATION_OUTPUT -> {
+ BluePrintConstants.EXPRESSION_GET_OPERATION_OUTPUT -> {
valueNode =
resolveOperationOutputExpression(definitionName, expressionData.operationOutputExpression!!)
}
- BlueprintConstants.EXPRESSION_GET_ARTIFACT -> {
+ BluePrintConstants.EXPRESSION_GET_ARTIFACT -> {
valueNode = resolveArtifactExpression(definitionName, expressionData.artifactExpression!!)
}
- BlueprintConstants.EXPRESSION_DSL_REFERENCE -> {
+ BluePrintConstants.EXPRESSION_DSL_REFERENCE -> {
valueNode =
bluePrintRuntimeService.resolveDSLExpression(expressionData.dslExpression!!.propertyName)
}
- BlueprintConstants.EXPRESSION_GET_NODE_OF_TYPE -> {
+ BluePrintConstants.EXPRESSION_GET_NODE_OF_TYPE -> {
}
else -> {
- throw BlueprintException(
+ throw BluePrintException(
"for $definitionType($definitionName) property ($propName), " +
"command ($command) is not supported "
)
@@ -140,53 +140,53 @@
* SELF : Current Node Template properties.
*/
when (attributeExpression.modelableEntityName) {
- BlueprintConstants.PROPERTY_ENV -> {
+ BluePrintConstants.PROPERTY_ENV -> {
val environmentValue = System.getenv(attributeName)
valueNode = environmentValue.asJsonPrimitive()
}
- BlueprintConstants.PROPERTY_APP -> {
+ BluePrintConstants.PROPERTY_APP -> {
val environmentValue = System.getProperty(attributeName)
valueNode = environmentValue.asJsonPrimitive()
}
- BlueprintConstants.PROPERTY_BPP -> {
+ BluePrintConstants.PROPERTY_BPP -> {
valueNode = bluePrintRuntimeService.getNodeTemplateAttributeValue(
- BlueprintConstants.PROPERTY_BPP,
+ BluePrintConstants.PROPERTY_BPP,
attributeName
- ) ?: throw BlueprintException("failed to get env attribute name ($attributeName) ")
+ ) ?: throw BluePrintException("failed to get env attribute name ($attributeName) ")
}
else -> {
- if (!attributeExpression.modelableEntityName.equals(BlueprintConstants.PROPERTY_SELF, true)) {
+ if (!attributeExpression.modelableEntityName.equals(BluePrintConstants.PROPERTY_SELF, true)) {
attributeDefinitionName = attributeExpression.modelableEntityName
}
/** This block is to Validate, if Attribute definition is present */
when (definitionType) {
- BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
- BlueprintConstants.MODEL_DEFINITION_TYPE_WORKFLOW,
- BlueprintConstants.MODEL_DEFINITION_TYPE_DSL ->
+ BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_WORKFLOW,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DSL ->
bluePrintContext.nodeTemplateNodeType(attributeDefinitionName).attributes
- BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TEMPLATE ->
+ BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TEMPLATE ->
bluePrintContext.relationshipTemplateRelationshipType(attributeDefinitionName).attributes
- else -> throw BlueprintException("failed to understand template type($definitionType), it is not supported")
+ else -> throw BluePrintException("failed to understand template type($definitionType), it is not supported")
}?.get(attributeName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"failed to get attribute definitions for " +
"$definitionType ($attributeDefinitionName)'s attribute name ($attributeName) "
)
valueNode = when (definitionType) {
- BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
- BlueprintConstants.MODEL_DEFINITION_TYPE_WORKFLOW,
- BlueprintConstants.MODEL_DEFINITION_TYPE_DSL ->
+ BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_WORKFLOW,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DSL ->
bluePrintRuntimeService.getNodeTemplateAttributeValue(attributeDefinitionName, attributeName)
- BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TEMPLATE ->
+ BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TEMPLATE ->
bluePrintRuntimeService.getRelationshipTemplateAttributeValue(
attributeDefinitionName,
attributeName
)
- else -> throw BlueprintException("failed to understand template type($definitionType), it is not supported")
+ else -> throw BluePrintException("failed to understand template type($definitionType), it is not supported")
}
- ?: throw BlueprintException("failed to get node template ($attributeDefinitionName)'s attribute name ($attributeName) ")
+ ?: throw BluePrintException("failed to get node template ($attributeDefinitionName)'s attribute name ($attributeName) ")
}
}
if (subAttributeName != null) {
@@ -212,32 +212,32 @@
var propertyDefinitionName = definitionName
- if (!propertyExpression.modelableEntityName.equals(BlueprintConstants.PROPERTY_SELF, true)) {
+ if (!propertyExpression.modelableEntityName.equals(BluePrintConstants.PROPERTY_SELF, true)) {
propertyDefinitionName = propertyExpression.modelableEntityName
}
val nodeTemplatePropertyExpression = when (definitionType) {
- BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
- BlueprintConstants.MODEL_DEFINITION_TYPE_WORKFLOW,
- BlueprintConstants.MODEL_DEFINITION_TYPE_DSL ->
+ BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_WORKFLOW,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DSL ->
bluePrintContext.nodeTemplateByName(propertyDefinitionName).properties
- BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TEMPLATE ->
+ BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TEMPLATE ->
bluePrintContext.relationshipTemplateByName(propertyDefinitionName).properties
- else -> throw BlueprintException("failed to understand template type($definitionType), it is not supported")
+ else -> throw BluePrintException("failed to understand template type($definitionType), it is not supported")
}?.get(propertyName)
- ?: throw BlueprintException("failed to get property assignment for node template ($definitionName)'s property name ($propertyName).")
+ ?: throw BluePrintException("failed to get property assignment for node template ($definitionName)'s property name ($propertyName).")
/** This block is to Validate, if Property definition is present */
when (definitionType) {
- BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
- BlueprintConstants.MODEL_DEFINITION_TYPE_WORKFLOW,
- BlueprintConstants.MODEL_DEFINITION_TYPE_DSL ->
+ BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_WORKFLOW,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DSL ->
bluePrintContext.nodeTemplateNodeType(propertyDefinitionName).properties
- BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TEMPLATE ->
+ BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TEMPLATE ->
bluePrintContext.relationshipTemplateRelationshipType(propertyDefinitionName).properties
- else -> throw BlueprintException("failed to understand template type($definitionType), it is not supported")
+ else -> throw BluePrintException("failed to understand template type($definitionType), it is not supported")
}?.get(propertyName)
- ?: throw BlueprintException("failed to get property definition for node template ($definitionName)'s property name ($propertyName).")
+ ?: throw BluePrintException("failed to get property definition for node template ($definitionName)'s property name ($propertyName).")
log.info(
"$definitionType($propertyDefinitionName), property($propertyName) resolved value ($nodeTemplatePropertyExpression)"
@@ -295,7 +295,7 @@
}
val artifactDefinition: ArtifactDefinition = bluePrintContext.nodeTemplateByName(artifactNodeTemplateName)
.artifacts?.get(artifactExpression.artifactName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
format(
"failed to get artifact definitions for node template ({})'s " +
"artifact name ({}) ",
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintArchiveUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
old mode 100644
new mode 100755
similarity index 97%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintArchiveUtils.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
index a16f580..1a7c23c
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintArchiveUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintArchiveUtils.kt
@@ -30,7 +30,7 @@
import org.apache.commons.compress.archivers.zip.ZipFile
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream
import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.slf4j.LoggerFactory
import java.io.BufferedInputStream
import java.io.ByteArrayInputStream
@@ -56,11 +56,11 @@
Zip
}
-class BlueprintArchiveUtils {
+class BluePrintArchiveUtils {
companion object {
- private val log = LoggerFactory.getLogger(BlueprintArchiveUtils::class.java)
+ private val log = LoggerFactory.getLogger(BluePrintArchiveUtils::class.java)
/**
* Create a new Zip from a root directory
@@ -208,7 +208,7 @@
val destinationDir = File(targetPath)
check(destinationDir.isDirectory && destinationDir.exists()) {
- throw BlueprintProcessorException("failed to decompress blueprint(${archiveFile.absolutePath}) to ($targetPath) ")
+ throw BluePrintProcessorException("failed to decompress blueprint(${archiveFile.absolutePath}) to ($targetPath) ")
}
return destinationDir
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintFileUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintFileUtils.kt
old mode 100644
new mode 100755
similarity index 84%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintFileUtils.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintFileUtils.kt
index 583709f..292eca9
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintFileUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintFileUtils.kt
@@ -21,14 +21,14 @@
import kotlinx.coroutines.runBlocking
import org.apache.commons.io.FileUtils
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode
import org.onap.ccsdk.cds.controllerblueprints.core.data.ImportDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.slf4j.LoggerFactory
import java.io.File
import java.io.FileFilter
@@ -41,52 +41,52 @@
import java.nio.file.Paths
import java.nio.file.StandardOpenOption
-class BlueprintFileUtils {
+class BluePrintFileUtils {
companion object {
const val COMPILED_JAR_SUFFIX = "cba-kts.jar"
private val log = LoggerFactory.getLogger(this::class.toString())
- fun createEmptyBlueprint(basePath: String) {
+ fun createEmptyBluePrint(basePath: String) {
val blueprintDir = File(basePath)
FileUtils.deleteDirectory(blueprintDir)
Files.createDirectories(blueprintDir.toPath())
- val metaDataDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BlueprintConstants.TOSCA_METADATA_DIR))
+ val metaDataDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BluePrintConstants.TOSCA_METADATA_DIR))
Files.createDirectories(metaDataDir.toPath())
val metaFile = File(
blueprintDir.absolutePath.plus(File.separator).plus(
- BlueprintConstants
+ BluePrintConstants
.TOSCA_METADATA_ENTRY_DEFINITION_FILE
)
)
Files.write(metaFile.toPath(), getMetaDataContent().toByteArray(), StandardOpenOption.CREATE_NEW)
- val definitionsDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BlueprintConstants.TOSCA_DEFINITIONS_DIR))
+ val definitionsDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR))
Files.createDirectories(definitionsDir.toPath())
- val scriptsDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BlueprintConstants.TOSCA_SCRIPTS_DIR))
+ val scriptsDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BluePrintConstants.TOSCA_SCRIPTS_DIR))
Files.createDirectories(scriptsDir.toPath())
- val plansDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BlueprintConstants.TOSCA_PLANS_DIR))
+ val plansDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BluePrintConstants.TOSCA_PLANS_DIR))
Files.createDirectories(plansDir.toPath())
- val templatesDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BlueprintConstants.TOSCA_TEMPLATES_DIR))
+ val templatesDir = File(blueprintDir.absolutePath.plus(File.separator).plus(BluePrintConstants.TOSCA_TEMPLATES_DIR))
Files.createDirectories(templatesDir.toPath())
}
- fun copyBlueprint(sourcePath: String, targetPath: String) {
+ fun copyBluePrint(sourcePath: String, targetPath: String) {
val sourceFile = File(sourcePath)
val targetFile = File(targetPath)
sourceFile.copyRecursively(targetFile, true)
}
- fun deleteBlueprintTypes(basePath: String) {
- val definitionPath = basePath.plus(File.separator).plus(BlueprintConstants.TOSCA_DEFINITIONS_DIR)
+ fun deleteBluePrintTypes(basePath: String) {
+ val definitionPath = basePath.plus(File.separator).plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR)
log.info("deleting definition types under : $definitionPath")
val definitionDir = File(definitionPath)
@@ -98,24 +98,24 @@
}
}
- fun writeEnhancedBlueprint(blueprintContext: BlueprintContext) {
+ fun writeEnhancedBluePrint(blueprintContext: BluePrintContext) {
// Write Blueprint Types
- writeBlueprintTypes(blueprintContext)
+ writeBluePrintTypes(blueprintContext)
// Re Populate the Imports
populateDefaultImports(blueprintContext)
// Rewrite the Entry Definition Files
writeEntryDefinitionFile(blueprintContext)
}
- fun writeBlueprintTypes(blueprintContext: BlueprintContext) {
+ fun writeBluePrintTypes(blueprintContext: BluePrintContext) {
val basePath = blueprintContext.rootPath
- val definitionPath = basePath.plus(File.separator).plus(BlueprintConstants.TOSCA_DEFINITIONS_DIR)
+ val definitionPath = basePath.plus(File.separator).plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR)
val definitionDir = File(definitionPath)
check(definitionDir.exists()) {
- throw BlueprintException(
+ throw BluePrintException(
ErrorCode.BLUEPRINT_PATH_MISSING.value,
"couldn't get definition file under " +
"path(${definitionDir.absolutePath})"
@@ -123,37 +123,37 @@
}
blueprintContext.serviceTemplate.dataTypes?.let {
- val dataTypesContent = JacksonUtils.getWrappedJson(BlueprintConstants.PATH_DATA_TYPES, it.toSortedMap(), true)
- writeTypeFile(definitionDir.absolutePath, BlueprintConstants.PATH_DATA_TYPES, dataTypesContent)
+ val dataTypesContent = JacksonUtils.getWrappedJson(BluePrintConstants.PATH_DATA_TYPES, it.toSortedMap(), true)
+ writeTypeFile(definitionDir.absolutePath, BluePrintConstants.PATH_DATA_TYPES, dataTypesContent)
}
blueprintContext.serviceTemplate.relationshipTypes?.let {
- val nodeTypesContent = JacksonUtils.getWrappedJson(BlueprintConstants.PATH_RELATIONSHIP_TYPES, it.toSortedMap(), true)
- writeTypeFile(definitionDir.absolutePath, BlueprintConstants.PATH_RELATIONSHIP_TYPES, nodeTypesContent)
+ val nodeTypesContent = JacksonUtils.getWrappedJson(BluePrintConstants.PATH_RELATIONSHIP_TYPES, it.toSortedMap(), true)
+ writeTypeFile(definitionDir.absolutePath, BluePrintConstants.PATH_RELATIONSHIP_TYPES, nodeTypesContent)
}
blueprintContext.serviceTemplate.artifactTypes?.let {
- val artifactTypesContent = JacksonUtils.getWrappedJson(BlueprintConstants.PATH_ARTIFACT_TYPES, it.toSortedMap(), true)
- writeTypeFile(definitionDir.absolutePath, BlueprintConstants.PATH_ARTIFACT_TYPES, artifactTypesContent)
+ val artifactTypesContent = JacksonUtils.getWrappedJson(BluePrintConstants.PATH_ARTIFACT_TYPES, it.toSortedMap(), true)
+ writeTypeFile(definitionDir.absolutePath, BluePrintConstants.PATH_ARTIFACT_TYPES, artifactTypesContent)
}
blueprintContext.serviceTemplate.nodeTypes?.let {
- val nodeTypesContent = JacksonUtils.getWrappedJson(BlueprintConstants.PATH_NODE_TYPES, it.toSortedMap(), true)
- writeTypeFile(definitionDir.absolutePath, BlueprintConstants.PATH_NODE_TYPES, nodeTypesContent)
+ val nodeTypesContent = JacksonUtils.getWrappedJson(BluePrintConstants.PATH_NODE_TYPES, it.toSortedMap(), true)
+ writeTypeFile(definitionDir.absolutePath, BluePrintConstants.PATH_NODE_TYPES, nodeTypesContent)
}
blueprintContext.serviceTemplate.policyTypes?.let {
- val nodeTypesContent = JacksonUtils.getWrappedJson(BlueprintConstants.PATH_POLICY_TYPES, it.toSortedMap(), true)
- writeTypeFile(definitionDir.absolutePath, BlueprintConstants.PATH_POLICY_TYPES, nodeTypesContent)
+ val nodeTypesContent = JacksonUtils.getWrappedJson(BluePrintConstants.PATH_POLICY_TYPES, it.toSortedMap(), true)
+ writeTypeFile(definitionDir.absolutePath, BluePrintConstants.PATH_POLICY_TYPES, nodeTypesContent)
}
}
- private fun populateDefaultImports(blueprintContext: BlueprintContext) {
+ private fun populateDefaultImports(blueprintContext: BluePrintContext) {
// Get the Default Types
val types = arrayListOf(
- BlueprintConstants.PATH_DATA_TYPES, BlueprintConstants.PATH_RELATIONSHIP_TYPES,
- BlueprintConstants.PATH_ARTIFACT_TYPES, BlueprintConstants.PATH_NODE_TYPES,
- BlueprintConstants.PATH_POLICY_TYPES
+ BluePrintConstants.PATH_DATA_TYPES, BluePrintConstants.PATH_RELATIONSHIP_TYPES,
+ BluePrintConstants.PATH_ARTIFACT_TYPES, BluePrintConstants.PATH_NODE_TYPES,
+ BluePrintConstants.PATH_POLICY_TYPES
)
// Clean Type Imports
@@ -162,7 +162,7 @@
val imports = mutableListOf<ImportDefinition>()
types.forEach { typeName ->
val import = ImportDefinition()
- import.file = BlueprintConstants.TOSCA_DEFINITIONS_DIR.plus("/$typeName.json")
+ import.file = BluePrintConstants.TOSCA_DEFINITIONS_DIR.plus("/$typeName.json")
imports.add(import)
}
@@ -181,9 +181,9 @@
}
/**
- * Re Generate the Blueprint Service Template Definition file based on Blueprint Context.
+ * Re Generate the Blueprint Service Template Definition file based on BluePrint Context.
*/
- private fun writeEntryDefinitionFile(blueprintContext: BlueprintContext) {
+ private fun writeEntryDefinitionFile(blueprintContext: BluePrintContext) {
val absoluteEntryDefinitionFile = blueprintContext.rootPath.plus(File.separator).plus(blueprintContext.entryDefinition)
@@ -208,7 +208,7 @@
Files.write(definitionFile.toPath(), content.toByteArray(), StandardOpenOption.CREATE_NEW)
check(definitionFile.exists()) {
- throw BlueprintException(
+ throw BluePrintException(
ErrorCode.BLUEPRINT_WRITING_FAIL.value,
"couldn't write definition file under " +
"path(${definitionFile.absolutePath})"
@@ -221,7 +221,7 @@
Files.write(typeFile.toPath(), content.toByteArray(), StandardOpenOption.CREATE_NEW)
check(typeFile.exists()) {
- throw BlueprintException(
+ throw BluePrintException(
ErrorCode.BLUEPRINT_WRITING_FAIL.value,
"couldn't write $type.json file under " +
"path(${typeFile.absolutePath})"
@@ -240,11 +240,11 @@
"\nTemplate-Tags: <TAGS>"
}
- fun getBlueprintFile(fileName: String, targetPath: Path): File {
+ fun getBluePrintFile(fileName: String, targetPath: Path): File {
val filePath = targetPath.resolve(fileName).toString()
val file = File(filePath)
check(file.exists()) {
- throw BlueprintException(
+ throw BluePrintException(
ErrorCode.BLUEPRINT_PATH_MISSING.value,
"couldn't get definition file under " +
"path(${file.absolutePath})"
@@ -255,7 +255,7 @@
fun getCbaStorageDirectory(path: String): Path {
check(StringUtils.isNotBlank(path)) {
- throw BlueprintException(
+ throw BluePrintException(
ErrorCode.BLUEPRINT_PATH_MISSING.value,
"couldn't get " +
"Blueprint folder under path($path)"
@@ -280,7 +280,7 @@
fun compileJarFilePathName(basePath: String, artifactName: String, artifactVersion: String): String {
return normalizedPathName(
- basePath, BlueprintConstants.TOSCA_SCRIPTS_KOTLIN_DIR,
+ basePath, BluePrintConstants.TOSCA_SCRIPTS_KOTLIN_DIR,
compileJarFileName(artifactName, artifactVersion)
)
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintIOUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintIOUtils.kt
similarity index 97%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintIOUtils.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintIOUtils.kt
index c2e0ec3..d29fed0 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintIOUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintIOUtils.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.utils
-object BlueprintIOUtils {
+object BluePrintIOUtils {
suspend fun <T> retry(
times: Int = 1,
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintMetadataUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
similarity index 73%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintMetadataUtils.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
index ffaa9e7..43f3a0b 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintMetadataUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtils.kt
@@ -19,45 +19,45 @@
import com.fasterxml.jackson.databind.JsonNode
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.ToscaMetaData
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintDefinitions
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintDefinitions
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
import org.onap.ccsdk.cds.controllerblueprints.core.readNBLines
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintScriptsServiceImpl
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintImportService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintScriptsServiceImpl
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintImportService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
import org.slf4j.LoggerFactory
import java.io.File
import java.util.Properties
-class BlueprintMetadataUtils {
+class BluePrintMetadataUtils {
companion object {
private val log = LoggerFactory.getLogger(this::class.toString())
suspend fun toscaMetaData(basePath: String): ToscaMetaData {
- val toscaMetaPath = basePath.plus(BlueprintConstants.PATH_DIVIDER)
- .plus(BlueprintConstants.TOSCA_METADATA_ENTRY_DEFINITION_FILE)
+ val toscaMetaPath = basePath.plus(BluePrintConstants.PATH_DIVIDER)
+ .plus(BluePrintConstants.TOSCA_METADATA_ENTRY_DEFINITION_FILE)
return toscaMetaDataFromMetaFile(toscaMetaPath)
}
suspend fun entryDefinitionFile(basePath: String): String {
- val toscaMetaPath = basePath.plus(BlueprintConstants.PATH_DIVIDER)
- .plus(BlueprintConstants.TOSCA_METADATA_ENTRY_DEFINITION_FILE)
+ val toscaMetaPath = basePath.plus(BluePrintConstants.PATH_DIVIDER)
+ .plus(BluePrintConstants.TOSCA_METADATA_ENTRY_DEFINITION_FILE)
return toscaMetaDataFromMetaFile(toscaMetaPath).entityDefinitions
}
fun bluePrintEnvProperties(basePath: String): Properties {
val blueprintsEnvFilePath = basePath.plus(File.separator)
- .plus(BlueprintConstants.TOSCA_ENVIRONMENTS_DIR)
+ .plus(BluePrintConstants.TOSCA_ENVIRONMENTS_DIR)
return environmentFileProperties(blueprintsEnvFilePath)
}
@@ -103,59 +103,59 @@
}
/** Get the default blueprint runtime for [id] and [blueprintBasePath] */
- suspend fun getBlueprintRuntime(id: String, blueprintBasePath: String):
- BlueprintRuntimeService<MutableMap<String, JsonNode>> {
- val bluePrintContext: BlueprintContext = getBlueprintContext(blueprintBasePath)
- return getBlueprintRuntime(id, bluePrintContext)
+ suspend fun getBluePrintRuntime(id: String, blueprintBasePath: String):
+ BluePrintRuntimeService<MutableMap<String, JsonNode>> {
+ val bluePrintContext: BluePrintContext = getBluePrintContext(blueprintBasePath)
+ return getBluePrintRuntime(id, bluePrintContext)
}
/** Get the default blocking blueprint runtime api for [id] and [blueprintBasePath] used in testing */
fun bluePrintRuntime(id: String, blueprintBasePath: String):
- BlueprintRuntimeService<MutableMap<String, JsonNode>> = runBlocking {
- val bluePrintContext: BlueprintContext = getBlueprintContext(blueprintBasePath)
- getBlueprintRuntime(id, bluePrintContext)
+ BluePrintRuntimeService<MutableMap<String, JsonNode>> = runBlocking {
+ val bluePrintContext: BluePrintContext = getBluePrintContext(blueprintBasePath)
+ getBluePrintRuntime(id, bluePrintContext)
}
/** Get the default blueprint runtime from [bluePrintContext] */
- fun getBlueprintRuntime(id: String, bluePrintContext: BlueprintContext):
- BlueprintRuntimeService<MutableMap<String, JsonNode>> {
+ fun getBluePrintRuntime(id: String, bluePrintContext: BluePrintContext):
+ BluePrintRuntimeService<MutableMap<String, JsonNode>> {
checkNotEmpty(bluePrintContext.rootPath) { "blueprint context root path is missing." }
checkNotEmpty(bluePrintContext.entryDefinition) { "blueprint context entry definition is missing." }
val blueprintBasePath = bluePrintContext.rootPath
- val bluePrintRuntimeService = DefaultBlueprintRuntimeService(id, bluePrintContext)
+ val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext)
bluePrintRuntimeService.put(
- BlueprintConstants.PROPERTY_BLUEPRINT_BASE_PATH,
+ BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH,
blueprintBasePath.asJsonPrimitive()
)
- bluePrintRuntimeService.put(BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID, id.asJsonPrimitive())
+ bluePrintRuntimeService.put(BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID, id.asJsonPrimitive())
return bluePrintRuntimeService
}
/** Get the blueprint runtime for enhancement start for [id] and [blueprintBasePath] */
- suspend fun getBaseEnhancementBlueprintRuntime(id: String, blueprintBasePath: String):
- BlueprintRuntimeService<MutableMap<String, JsonNode>> {
+ suspend fun getBaseEnhancementBluePrintRuntime(id: String, blueprintBasePath: String):
+ BluePrintRuntimeService<MutableMap<String, JsonNode>> {
- val bluePrintContext: BlueprintContext = getBaseEnhancementBlueprintContext(blueprintBasePath)
+ val bluePrintContext: BluePrintContext = getBaseEnhancementBluePrintContext(blueprintBasePath)
- val bluePrintRuntimeService = DefaultBlueprintRuntimeService(id, bluePrintContext)
+ val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext)
bluePrintRuntimeService.put(
- BlueprintConstants.PROPERTY_BLUEPRINT_BASE_PATH,
+ BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH,
blueprintBasePath.asJsonPrimitive()
)
- bluePrintRuntimeService.put(BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID, id.asJsonPrimitive())
+ bluePrintRuntimeService.put(BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID, id.asJsonPrimitive())
return bluePrintRuntimeService
}
/** Get the default blueprint runtime for enhancement start for [id], [blueprintBasePath] and [executionContext] */
- suspend fun getBlueprintRuntime(
+ suspend fun getBluePrintRuntime(
id: String,
blueprintBasePath: String,
executionContext: MutableMap<String, JsonNode>
):
- BlueprintRuntimeService<MutableMap<String, JsonNode>> {
- val bluePrintContext: BlueprintContext = getBlueprintContext(blueprintBasePath)
- val bluePrintRuntimeService = DefaultBlueprintRuntimeService(id, bluePrintContext)
+ BluePrintRuntimeService<MutableMap<String, JsonNode>> {
+ val bluePrintContext: BluePrintContext = getBluePrintContext(blueprintBasePath)
+ val bluePrintRuntimeService = DefaultBluePrintRuntimeService(id, bluePrintContext)
executionContext.forEach {
bluePrintRuntimeService.put(it.key, it.value)
}
@@ -165,7 +165,7 @@
}
/** Get the default blueprint context for [blueprintBasePath]*/
- suspend fun getBlueprintContext(blueprintBasePath: String): BlueprintContext {
+ suspend fun getBluePrintContext(blueprintBasePath: String): BluePrintContext {
val toscaMetaData: ToscaMetaData = toscaMetaData(blueprintBasePath)
@@ -176,24 +176,24 @@
// If the EntryDefinition is Kotlin file, compile and get Service Template
val bluePrintContext = when (toscaMetaData.templateType.toUpperCase()) {
- BlueprintConstants.BLUEPRINT_TYPE_KOTLIN_DSL -> readBlueprintKotlinFile(
+ BluePrintConstants.BLUEPRINT_TYPE_KOTLIN_DSL -> readBlueprintKotlinFile(
toscaMetaData,
blueprintBasePath
)
- BlueprintConstants.BLUEPRINT_TYPE_GENERIC_SCRIPT -> readBlueprintGenericScript(
+ BluePrintConstants.BLUEPRINT_TYPE_GENERIC_SCRIPT -> readBlueprintGenericScript(
toscaMetaData,
blueprintBasePath
)
- BlueprintConstants.BLUEPRINT_TYPE_DEFAULT -> readBlueprintFile(
+ BluePrintConstants.BLUEPRINT_TYPE_DEFAULT -> readBlueprintFile(
toscaMetaData.entityDefinitions,
blueprintBasePath
)
else ->
- throw BlueprintException(
+ throw BluePrintException(
"Unknown blueprint type(${toscaMetaData.templateType}), " +
- "It should be any one of these types[${BlueprintConstants.BLUEPRINT_TYPE_KOTLIN_DSL}," +
- "${BlueprintConstants.BLUEPRINT_TYPE_GENERIC_SCRIPT}, " +
- "${BlueprintConstants.BLUEPRINT_TYPE_DEFAULT}]"
+ "It should be any one of these types[${BluePrintConstants.BLUEPRINT_TYPE_KOTLIN_DSL}," +
+ "${BluePrintConstants.BLUEPRINT_TYPE_GENERIC_SCRIPT}, " +
+ "${BluePrintConstants.BLUEPRINT_TYPE_DEFAULT}]"
)
}
// Copy the metadata info
@@ -202,11 +202,11 @@
return bluePrintContext
}
- private suspend fun getBaseEnhancementBlueprintContext(blueprintBasePath: String): BlueprintContext {
+ private suspend fun getBaseEnhancementBluePrintContext(blueprintBasePath: String): BluePrintContext {
val toscaMetaData: ToscaMetaData = toscaMetaData(blueprintBasePath)
// Clean Type files
- BlueprintFileUtils.deleteBlueprintTypes(blueprintBasePath)
+ BluePrintFileUtils.deleteBluePrintTypes(blueprintBasePath)
val rootFilePath: String = blueprintBasePath.plus(File.separator).plus(toscaMetaData.entityDefinitions)
val rootServiceTemplate = ServiceTemplateUtils.getServiceTemplate(rootFilePath)
@@ -214,9 +214,9 @@
copyMetaInfoToServiceTemplate(toscaMetaData, rootServiceTemplate)
// Clean the Import Definitions
- BlueprintFileUtils.cleanImportTypes(rootServiceTemplate)
+ BluePrintFileUtils.cleanImportTypes(rootServiceTemplate)
- val blueprintContext = BlueprintContext(rootServiceTemplate)
+ val blueprintContext = BluePrintContext(rootServiceTemplate)
blueprintContext.rootPath = blueprintBasePath
blueprintContext.entryDefinition = toscaMetaData.entityDefinitions
return blueprintContext
@@ -226,36 +226,36 @@
private fun copyMetaInfoToServiceTemplate(toscaMetaData: ToscaMetaData, serviceTemplate: ServiceTemplate) {
if (serviceTemplate.metadata == null) serviceTemplate.metadata = mutableMapOf()
val metadata = serviceTemplate.metadata!!
- metadata[BlueprintConstants.METADATA_TEMPLATE_AUTHOR] = toscaMetaData.createdBy
- metadata[BlueprintConstants.METADATA_TEMPLATE_NAME] = toscaMetaData.templateName
- metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION] = toscaMetaData.templateVersion
- metadata[BlueprintConstants.METADATA_TEMPLATE_TAGS] = toscaMetaData.templateTags
- metadata[BlueprintConstants.METADATA_TEMPLATE_TYPE] = toscaMetaData.templateType
+ metadata[BluePrintConstants.METADATA_TEMPLATE_AUTHOR] = toscaMetaData.createdBy
+ metadata[BluePrintConstants.METADATA_TEMPLATE_NAME] = toscaMetaData.templateName
+ metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION] = toscaMetaData.templateVersion
+ metadata[BluePrintConstants.METADATA_TEMPLATE_TAGS] = toscaMetaData.templateTags
+ metadata[BluePrintConstants.METADATA_TEMPLATE_TYPE] = toscaMetaData.templateType
}
- private suspend fun readBlueprintFile(entityDefinitions: String, basePath: String): BlueprintContext {
+ private suspend fun readBlueprintFile(entityDefinitions: String, basePath: String): BluePrintContext {
val normalizedBasePath = normalizedPathName(basePath)
val rootFilePath = normalizedPathName(normalizedBasePath, entityDefinitions)
val rootServiceTemplate = ServiceTemplateUtils.getServiceTemplate(rootFilePath)
// Recursively Import Template files
- val schemaImportResolverUtils = BlueprintImportService(rootServiceTemplate, normalizedBasePath)
+ val schemaImportResolverUtils = BluePrintImportService(rootServiceTemplate, normalizedBasePath)
val completeServiceTemplate = schemaImportResolverUtils.getImportResolvedServiceTemplate()
- val blueprintContext = BlueprintContext(completeServiceTemplate)
+ val blueprintContext = BluePrintContext(completeServiceTemplate)
blueprintContext.rootPath = normalizedBasePath
blueprintContext.entryDefinition = entityDefinitions
return blueprintContext
}
/** Reade the Service Template Definitions from the Kotlin file */
- private suspend fun readBlueprintKotlinFile(toscaMetaData: ToscaMetaData, basePath: String): BlueprintContext {
+ private suspend fun readBlueprintKotlinFile(toscaMetaData: ToscaMetaData, basePath: String): BluePrintContext {
val definitionClassName = toscaMetaData.entityDefinitions.removeSuffix(".kt")
val normalizedBasePath = normalizedPathName(basePath)
- val bluePrintScriptsService = BlueprintScriptsServiceImpl()
+ val bluePrintScriptsService = BluePrintScriptsServiceImpl()
val bluePrintDefinitions = bluePrintScriptsService
- .scriptInstance<BlueprintDefinitions>(
+ .scriptInstance<BluePrintDefinitions>(
normalizedBasePath, toscaMetaData.templateName,
toscaMetaData.templateVersion, definitionClassName, false
)
@@ -263,9 +263,9 @@
val serviceTemplate = bluePrintDefinitions.serviceTemplate()
// Clean the Default type import Definitions
- BlueprintFileUtils.cleanImportTypes(serviceTemplate)
+ BluePrintFileUtils.cleanImportTypes(serviceTemplate)
- val blueprintContext = BlueprintContext(serviceTemplate)
+ val blueprintContext = BluePrintContext(serviceTemplate)
blueprintContext.rootPath = normalizedBasePath
blueprintContext.entryDefinition = toscaMetaData.entityDefinitions
blueprintContext.otherDefinitions = bluePrintDefinitions.otherDefinitions()
@@ -273,8 +273,8 @@
}
/** Reade the Service Template Definitions from the generic script types */
- private fun readBlueprintGenericScript(toscaMetaData: ToscaMetaData, basePath: String): BlueprintContext {
- return BlueprintContext(ServiceTemplate())
+ private fun readBlueprintGenericScript(toscaMetaData: ToscaMetaData, basePath: String): BluePrintContext {
+ return BluePrintContext(ServiceTemplate())
}
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintRuntimeUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt
similarity index 84%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintRuntimeUtils.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt
index 1df185c..f4c51d4 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintRuntimeUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintRuntimeUtils.kt
@@ -18,8 +18,8 @@
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.NullNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.slf4j.LoggerFactory
/**
@@ -27,17 +27,17 @@
*
* @author Brinda Santh
*/
-object BlueprintRuntimeUtils {
+object BluePrintRuntimeUtils {
private val log = LoggerFactory.getLogger(this::class.toString())
- fun assignInputsFromFile(bluePrintContext: BlueprintContext, fileName: String, context: MutableMap<String, JsonNode>) {
+ fun assignInputsFromFile(bluePrintContext: BluePrintContext, fileName: String, context: MutableMap<String, JsonNode>) {
val jsonNode: JsonNode = JacksonUtils.jsonNodeFromFile(fileName)
return assignInputs(bluePrintContext, jsonNode, context)
}
fun assignInputsFromClassPathFile(
- bluePrintContext: BlueprintContext,
+ bluePrintContext: BluePrintContext,
fileName: String,
context: MutableMap<String,
JsonNode>
@@ -46,17 +46,17 @@
return assignInputs(bluePrintContext, jsonNode, context)
}
- fun assignInputsFromContent(bluePrintContext: BlueprintContext, content: String, context: MutableMap<String, JsonNode>) {
+ fun assignInputsFromContent(bluePrintContext: BluePrintContext, content: String, context: MutableMap<String, JsonNode>) {
val jsonNode: JsonNode = JacksonUtils.jsonNode(content)
return assignInputs(bluePrintContext, jsonNode, context)
}
- fun assignInputs(bluePrintContext: BlueprintContext, jsonNode: JsonNode, context: MutableMap<String, JsonNode>) {
+ fun assignInputs(bluePrintContext: BluePrintContext, jsonNode: JsonNode, context: MutableMap<String, JsonNode>) {
log.info("assignInputs from input JSON ({})", jsonNode.toString())
bluePrintContext.inputs()?.forEach { propertyName, _ ->
val valueNode: JsonNode = jsonNode.at("/".plus(propertyName)) ?: NullNode.getInstance()
- val path = BlueprintConstants.PATH_INPUTS.plus(BlueprintConstants.PATH_DIVIDER).plus(propertyName)
+ val path = BluePrintConstants.PATH_INPUTS.plus(BluePrintConstants.PATH_DIVIDER).plus(propertyName)
log.trace("setting input path ({}), values ({})", path, valueNode)
context[path] = valueNode
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/ClusterUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/ClusterUtils.kt
index cacfc2c..7fe955b 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/ClusterUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/ClusterUtils.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.utils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import java.net.InetAddress
object ClusterUtils {
@@ -28,19 +28,19 @@
}
fun applicationName(): String {
- return BlueprintConstants.APP_NAME
+ return BluePrintConstants.APP_NAME
}
fun clusterId(): String {
- return System.getenv(BlueprintConstants.PROPERTY_CLUSTER_ID) ?: "cds-cluster"
+ return System.getenv(BluePrintConstants.PROPERTY_CLUSTER_ID) ?: "cds-cluster"
}
fun clusterNodeId(): String {
- return System.getenv(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID) ?: "cds-controller-0"
+ return System.getenv(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID) ?: "cds-controller-0"
}
fun clusterNodeAddress(): String {
- return System.getenv(BlueprintConstants.PROPERTY_CLUSTER_NODE_ADDRESS)
+ return System.getenv(BluePrintConstants.PROPERTY_CLUSTER_NODE_ADDRESS)
?: clusterNodeId()
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/DateUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/DateUtils.kt
index 14b308b..02dd202 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/DateUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/DateUtils.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.utils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import java.text.SimpleDateFormat
import java.time.LocalDateTime
import java.time.ZoneId
@@ -31,19 +31,19 @@
fun currentTimestamp(): String {
val localDateTime = LocalDateTime.now(ZoneId.systemDefault())
- val formatter = DateTimeFormatter.ofPattern(BlueprintConstants.DATE_TIME_PATTERN)
+ val formatter = DateTimeFormatter.ofPattern(BluePrintConstants.DATE_TIME_PATTERN)
return formatter.format(localDateTime)
}
/** Parse string date in CDS string format */
fun String.toControllerDate(): Date {
- val formatter = SimpleDateFormat(BlueprintConstants.DATE_TIME_PATTERN)
+ val formatter = SimpleDateFormat(BluePrintConstants.DATE_TIME_PATTERN)
return formatter.parse(this)
}
/** Return date to CDS string format */
fun Date.currentTimestamp(): String {
- val formatter = SimpleDateFormat(BlueprintConstants.DATE_TIME_PATTERN)
+ val formatter = SimpleDateFormat(BluePrintConstants.DATE_TIME_PATTERN)
return formatter.format(this)
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt
index 1110f6f..ace66cf 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtils.kt
@@ -33,10 +33,10 @@
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import org.apache.commons.io.IOUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.readNBText
import java.io.File
@@ -76,7 +76,7 @@
try {
normalizedFile(fileName).readNBText()
} catch (e: Exception) {
- throw BlueprintException("couldn't get file ($fileName) content : ${e.message}")
+ throw BluePrintException("couldn't get file ($fileName) content : ${e.message}")
}
}
@@ -191,13 +191,13 @@
fun <T> getInstanceFromMap(properties: MutableMap<String, JsonNode>, classType: Class<T>): T {
return readValue(getJson(properties), classType)
- ?: throw BlueprintProcessorException("failed to transform content ($properties) to type ($classType)")
+ ?: throw BluePrintProcessorException("failed to transform content ($properties) to type ($classType)")
}
fun checkJsonNodeValueOfType(type: String, jsonNode: JsonNode): Boolean {
- if (BlueprintTypes.validPrimitiveTypes().contains(type.toLowerCase())) {
+ if (BluePrintTypes.validPrimitiveTypes().contains(type.toLowerCase())) {
return checkJsonNodeValueOfPrimitiveType(type, jsonNode)
- } else if (BlueprintTypes.validCollectionTypes().contains(type)) {
+ } else if (BluePrintTypes.validCollectionTypes().contains(type)) {
return checkJsonNodeValueOfCollectionType(type, jsonNode)
}
return false
@@ -205,31 +205,31 @@
fun checkIfPrimitiveType(primitiveType: String): Boolean {
return when (primitiveType.toLowerCase()) {
- BlueprintConstants.DATA_TYPE_STRING -> true
- BlueprintConstants.DATA_TYPE_BOOLEAN -> true
- BlueprintConstants.DATA_TYPE_INTEGER -> true
- BlueprintConstants.DATA_TYPE_FLOAT -> true
- BlueprintConstants.DATA_TYPE_DOUBLE -> true
- BlueprintConstants.DATA_TYPE_TIMESTAMP -> true
+ BluePrintConstants.DATA_TYPE_STRING -> true
+ BluePrintConstants.DATA_TYPE_BOOLEAN -> true
+ BluePrintConstants.DATA_TYPE_INTEGER -> true
+ BluePrintConstants.DATA_TYPE_FLOAT -> true
+ BluePrintConstants.DATA_TYPE_DOUBLE -> true
+ BluePrintConstants.DATA_TYPE_TIMESTAMP -> true
else -> false
}
}
fun checkJsonNodeValueOfPrimitiveType(primitiveType: String, jsonNode: JsonNode): Boolean {
return when (primitiveType.toLowerCase()) {
- BlueprintConstants.DATA_TYPE_STRING -> jsonNode.isTextual
- BlueprintConstants.DATA_TYPE_BOOLEAN -> jsonNode.isBoolean
- BlueprintConstants.DATA_TYPE_INTEGER -> jsonNode.isInt
- BlueprintConstants.DATA_TYPE_FLOAT -> jsonNode.isDouble
- BlueprintConstants.DATA_TYPE_DOUBLE -> jsonNode.isDouble
- BlueprintConstants.DATA_TYPE_TIMESTAMP -> jsonNode.isTextual
+ BluePrintConstants.DATA_TYPE_STRING -> jsonNode.isTextual
+ BluePrintConstants.DATA_TYPE_BOOLEAN -> jsonNode.isBoolean
+ BluePrintConstants.DATA_TYPE_INTEGER -> jsonNode.isInt
+ BluePrintConstants.DATA_TYPE_FLOAT -> jsonNode.isDouble
+ BluePrintConstants.DATA_TYPE_DOUBLE -> jsonNode.isDouble
+ BluePrintConstants.DATA_TYPE_TIMESTAMP -> jsonNode.isTextual
else -> false
}
}
fun checkJsonNodeValueOfCollectionType(type: String, jsonNode: JsonNode): Boolean {
return when (type.toLowerCase()) {
- BlueprintConstants.DATA_TYPE_LIST -> jsonNode.isArray
+ BluePrintConstants.DATA_TYPE_LIST -> jsonNode.isArray
else -> false
}
}
@@ -247,62 +247,62 @@
fun getValue(value: Any, type: String): Any {
return when (type.toLowerCase()) {
- BlueprintConstants.DATA_TYPE_BOOLEAN -> (value as BooleanNode).booleanValue()
- BlueprintConstants.DATA_TYPE_INTEGER -> (value as IntNode).intValue()
- BlueprintConstants.DATA_TYPE_FLOAT -> (value as FloatNode).floatValue()
- BlueprintConstants.DATA_TYPE_DOUBLE -> (value as DoubleNode).doubleValue()
- BlueprintConstants.DATA_TYPE_STRING -> (value as TextNode).textValue()
+ BluePrintConstants.DATA_TYPE_BOOLEAN -> (value as BooleanNode).booleanValue()
+ BluePrintConstants.DATA_TYPE_INTEGER -> (value as IntNode).intValue()
+ BluePrintConstants.DATA_TYPE_FLOAT -> (value as FloatNode).floatValue()
+ BluePrintConstants.DATA_TYPE_DOUBLE -> (value as DoubleNode).doubleValue()
+ BluePrintConstants.DATA_TYPE_STRING -> (value as TextNode).textValue()
else -> (value as JsonNode)
}
}
fun populatePrimitiveValues(key: String, value: JsonNode, primitiveType: String, objectNode: ObjectNode) {
when (primitiveType.toLowerCase()) {
- BlueprintConstants.DATA_TYPE_BOOLEAN,
- BlueprintConstants.DATA_TYPE_INTEGER,
- BlueprintConstants.DATA_TYPE_FLOAT,
- BlueprintConstants.DATA_TYPE_DOUBLE,
- BlueprintConstants.DATA_TYPE_TIMESTAMP,
- BlueprintConstants.DATA_TYPE_STRING,
- BlueprintConstants.DATA_TYPE_NULL ->
+ BluePrintConstants.DATA_TYPE_BOOLEAN,
+ BluePrintConstants.DATA_TYPE_INTEGER,
+ BluePrintConstants.DATA_TYPE_FLOAT,
+ BluePrintConstants.DATA_TYPE_DOUBLE,
+ BluePrintConstants.DATA_TYPE_TIMESTAMP,
+ BluePrintConstants.DATA_TYPE_STRING,
+ BluePrintConstants.DATA_TYPE_NULL ->
objectNode.set(key, value)
- else -> throw BlueprintException("populatePrimitiveValues expected only primitive values! Received: ($value)")
+ else -> throw BluePrintException("populatePrimitiveValues expected only primitive values! Received: ($value)")
}
}
fun populatePrimitiveValues(value: JsonNode, primitiveType: String, arrayNode: ArrayNode) {
when (primitiveType.toLowerCase()) {
- BlueprintConstants.DATA_TYPE_BOOLEAN,
- BlueprintConstants.DATA_TYPE_INTEGER,
- BlueprintConstants.DATA_TYPE_FLOAT,
- BlueprintConstants.DATA_TYPE_DOUBLE,
- BlueprintConstants.DATA_TYPE_TIMESTAMP,
- BlueprintConstants.DATA_TYPE_STRING,
- BlueprintConstants.DATA_TYPE_NULL ->
+ BluePrintConstants.DATA_TYPE_BOOLEAN,
+ BluePrintConstants.DATA_TYPE_INTEGER,
+ BluePrintConstants.DATA_TYPE_FLOAT,
+ BluePrintConstants.DATA_TYPE_DOUBLE,
+ BluePrintConstants.DATA_TYPE_TIMESTAMP,
+ BluePrintConstants.DATA_TYPE_STRING,
+ BluePrintConstants.DATA_TYPE_NULL ->
arrayNode.add(value)
- else -> throw BlueprintException("populatePrimitiveValues expected only primitive values! Received: ($value)")
+ else -> throw BluePrintException("populatePrimitiveValues expected only primitive values! Received: ($value)")
}
}
fun populatePrimitiveDefaultValues(key: String, primitiveType: String, objectNode: ObjectNode) {
val defaultValue = getDefaultValueOfPrimitiveAsJsonNode(primitiveType)
- ?: throw BlueprintException("populatePrimitiveDefaultValues expected only primitive values! Received type ($primitiveType)")
+ ?: throw BluePrintException("populatePrimitiveDefaultValues expected only primitive values! Received type ($primitiveType)")
objectNode.set<JsonNode>(key, defaultValue)
}
fun populatePrimitiveDefaultValuesForArrayNode(primitiveType: String, arrayNode: ArrayNode) {
val defaultValue = getDefaultValueOfPrimitiveAsJsonNode(primitiveType)
- ?: throw BlueprintException("populatePrimitiveDefaultValuesForArrayNode expected only primitive values! Received type ($primitiveType)")
+ ?: throw BluePrintException("populatePrimitiveDefaultValuesForArrayNode expected only primitive values! Received type ($primitiveType)")
arrayNode.add(defaultValue)
}
private fun getDefaultValueOfPrimitiveAsJsonNode(primitiveType: String): JsonNode? {
return when (primitiveType.toLowerCase()) {
- BlueprintConstants.DATA_TYPE_BOOLEAN -> BooleanNode.valueOf(false)
- BlueprintConstants.DATA_TYPE_INTEGER -> IntNode.valueOf(0)
- BlueprintConstants.DATA_TYPE_FLOAT -> FloatNode.valueOf(0.0f)
- BlueprintConstants.DATA_TYPE_DOUBLE -> DoubleNode.valueOf(0.0)
- BlueprintConstants.DATA_TYPE_STRING -> MissingNode.getInstance()
+ BluePrintConstants.DATA_TYPE_BOOLEAN -> BooleanNode.valueOf(false)
+ BluePrintConstants.DATA_TYPE_INTEGER -> IntNode.valueOf(0)
+ BluePrintConstants.DATA_TYPE_FLOAT -> FloatNode.valueOf(0.0f)
+ BluePrintConstants.DATA_TYPE_DOUBLE -> DoubleNode.valueOf(0.0)
+ BluePrintConstants.DATA_TYPE_STRING -> MissingNode.getInstance()
else -> null
}
}
@@ -310,7 +310,7 @@
fun populateJsonNodeValues(key: String, nodeValue: JsonNode?, type: String, objectNode: ObjectNode) {
if (nodeValue == null || nodeValue is NullNode) {
objectNode.set<JsonNode>(key, nodeValue)
- } else if (BlueprintTypes.validPrimitiveTypes().contains(type)) {
+ } else if (BluePrintTypes.validPrimitiveTypes().contains(type)) {
populatePrimitiveValues(key, nodeValue, type, objectNode)
} else {
objectNode.set<JsonNode>(key, nodeValue)
@@ -319,11 +319,11 @@
fun convertPrimitiveResourceValue(type: String, value: String): JsonNode {
return when (type.toLowerCase()) {
- BlueprintConstants.DATA_TYPE_BOOLEAN -> jsonNodeFromObject(value.toBoolean())
- BlueprintConstants.DATA_TYPE_INTEGER -> jsonNodeFromObject(value.toInt())
- BlueprintConstants.DATA_TYPE_FLOAT -> jsonNodeFromObject(value.toFloat())
- BlueprintConstants.DATA_TYPE_DOUBLE -> jsonNodeFromObject(value.toDouble())
- BlueprintConstants.DATA_TYPE_STRING -> jsonNodeFromObject(value)
+ BluePrintConstants.DATA_TYPE_BOOLEAN -> jsonNodeFromObject(value.toBoolean())
+ BluePrintConstants.DATA_TYPE_INTEGER -> jsonNodeFromObject(value.toInt())
+ BluePrintConstants.DATA_TYPE_FLOAT -> jsonNodeFromObject(value.toFloat())
+ BluePrintConstants.DATA_TYPE_DOUBLE -> jsonNodeFromObject(value.toDouble())
+ BluePrintConstants.DATA_TYPE_STRING -> jsonNodeFromObject(value)
else -> getJsonNode(value)
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/PropertyDefinitionUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/PropertyDefinitionUtils.kt
index 1a082d3..4831932 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/PropertyDefinitionUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/PropertyDefinitionUtils.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.utils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.LOG_PROTECT
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.LOG_PROTECT
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
class PropertyDefinitionUtils {
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/ResourceResolverUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/ResourceResolverUtils.kt
index 1b8af58..c0204af 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/ResourceResolverUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/ResourceResolverUtils.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.utils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.isNotEmpty
import org.slf4j.LoggerFactory
import java.io.File
@@ -56,7 +56,7 @@
// FIXME("Convert into reactive")
return JacksonUtils.getContent(resolvedFileName)
} catch (e: Exception) {
- throw BlueprintException(e, "failed to file (%s), basePath (%s) ", filename, basePath)
+ throw BluePrintException(e, "failed to file (%s), basePath (%s) ", filename, basePath)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/WorkflowGraphUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/WorkflowGraphUtils.kt
index 6ebe7c1..fea637f 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/WorkflowGraphUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/WorkflowGraphUtils.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.utils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.data.EdgeLabel
import org.onap.ccsdk.cds.controllerblueprints.core.data.Graph
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
@@ -36,10 +36,10 @@
}
}
graph.startNodes().forEach { rootNode ->
- graph.addEdge(BlueprintConstants.GRAPH_START_NODE_NAME, rootNode.id, EdgeLabel.SUCCESS)
+ graph.addEdge(BluePrintConstants.GRAPH_START_NODE_NAME, rootNode.id, EdgeLabel.SUCCESS)
}
graph.endNodes().forEach { endNode ->
- graph.addEdge(endNode.id, BlueprintConstants.GRAPH_END_NODE_NAME, EdgeLabel.SUCCESS)
+ graph.addEdge(endNode.id, BluePrintConstants.GRAPH_END_NODE_NAME, EdgeLabel.SUCCESS)
}
return graph
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/resources/META-INF/kotlin/script/templates/org.onap.ccsdk.apps.controllerblueprints.scripts.BlueprintKotlinScript b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/resources/META-INF/kotlin/script/templates/org.onap.ccsdk.apps.controllerblueprints.scripts.BluePrintKotlinScript
similarity index 100%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/resources/META-INF/kotlin/script/templates/org.onap.ccsdk.apps.controllerblueprints.scripts.BlueprintKotlinScript
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/resources/META-INF/kotlin/script/templates/org.onap.ccsdk.apps.controllerblueprints.scripts.BluePrintKotlinScript
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintErrorTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintErrorTest.kt
similarity index 73%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintErrorTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintErrorTest.kt
index 94ba986..167c038 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintErrorTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintErrorTest.kt
@@ -4,18 +4,18 @@
import kotlin.test.assertEquals
import kotlin.test.assertTrue
-class BlueprintErrorTest {
+class BluePrintErrorTest {
@Test
- fun testBlueprintErrorIsCreatedWithemptyList() {
- val bluePrintError = BlueprintError()
+ fun testBluePrintErrorIsCreatedWithemptyList() {
+ val bluePrintError = BluePrintError()
assertTrue(bluePrintError.allErrors().isEmpty())
}
@Test
fun testAddErrorWith3Params() {
- val bluePrintError = BlueprintError()
+ val bluePrintError = BluePrintError()
bluePrintError.addError("type", "name", "error", "step")
@@ -24,7 +24,7 @@
@Test
fun testAddErrorWith2Params() {
- val bluePrintError = BlueprintError()
+ val bluePrintError = BluePrintError()
bluePrintError.addError("error", "step")
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctionsTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctionsTest.kt
index 8c1e9f6..7ac9b86 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctionsTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/CustomFunctionsTest.kt
@@ -95,13 +95,13 @@
val returnValueBool: JsonNode = false.asJsonType()
assertFalse(returnValueBool.asBoolean())
- val returnValue: JsonNode = BlueprintError().asJsonType()
+ val returnValue: JsonNode = BluePrintError().asJsonType()
assertEquals(JsonNodeType.OBJECT, returnValue.getNodeType())
}
@Test
fun testMapAsObjectNode() {
- val returnValue: ObjectNode = hashMapOf("test" to BlueprintError()).asObjectNode()
+ val returnValue: ObjectNode = hashMapOf("test" to BluePrintError()).asObjectNode()
assertNotNull(returnValue.get("test"))
}
@@ -121,7 +121,7 @@
assertNull(returnValueString)
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testCastValue() {
val initMap: Map<String, Double> = hashMapOf("test" to 1.1)
val returnValue = initMap.castValue("test", Number::class)
@@ -178,7 +178,7 @@
assertTrue("[{\"key\": \"value\"},{\"key\": \"value\"}]".asJsonType().isComplexType())
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testRootFieldsToMap() {
1.asJsonType().rootFieldsToMap()
}
@@ -192,7 +192,7 @@
assertEquals(3, mutMap["hello"]?.asInt())
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testMapGetAsString() {
val initMap = hashMapOf("test" to "hello".asJsonType())
@@ -201,7 +201,7 @@
initMap.getAsString("test2")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testMapGetAsBoolean() {
val initMap = hashMapOf("test" to true.asJsonType())
@@ -210,7 +210,7 @@
initMap.getAsBoolean("test2")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testMapGetAsInt() {
val initMap = hashMapOf("test" to 1.asJsonType())
@@ -219,7 +219,7 @@
initMap.getAsInt("test2")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testCheckEquals() {
assertTrue(checkEquals("hello", "hello", { -> "error" }))
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/MDCContextTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/MDCContextTest.kt
index 0fe2fbf..643549b 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/MDCContextTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/MDCContextTest.kt
@@ -41,14 +41,14 @@
@Test
fun testContextCanBePassedBetweenCoroutines() {
- MDC.put(BlueprintConstants.ONAP_REQUEST_ID, "12345")
+ MDC.put(BluePrintConstants.ONAP_REQUEST_ID, "12345")
runBlocking {
GlobalScope.launch {
- assertEquals(null, MDC.get(BlueprintConstants.ONAP_REQUEST_ID))
+ assertEquals(null, MDC.get(BluePrintConstants.ONAP_REQUEST_ID))
}
launch(MDCContext()) {
assertEquals(
- "12345", MDC.get(BlueprintConstants.ONAP_REQUEST_ID),
+ "12345", MDC.get(BluePrintConstants.ONAP_REQUEST_ID),
"couldn't get request id"
)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BlueprintsAnnotationsTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BluePrintsAnnotationsTest.kt
similarity index 61%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BlueprintsAnnotationsTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BluePrintsAnnotationsTest.kt
index b19c350..a75262f 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BlueprintsAnnotationsTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/annotations/BluePrintsAnnotationsTest.kt
@@ -17,103 +17,103 @@
package org.onap.ccsdk.cds.controllerblueprints.core.annotations
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.asBlueprintsDataTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.asBluePrintsDataTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asPropertyDefinitionMap
import kotlin.test.Test
import kotlin.test.assertNotNull
-class BlueprintsAnnotationsTest {
+class BluePrintsAnnotationsTest {
@Test
- fun testBlueprintWorkflowData() {
- val wfInput = TestBlueprintsWorkflowInput::class.asPropertyDefinitionMap()
+ fun testBluePrintWorkflowData() {
+ val wfInput = TestBluePrintsWorkflowInput::class.asPropertyDefinitionMap()
// println(wfInput.asJsonString(true))
assertNotNull(wfInput, "failed to generate wfInput property map")
- val wfOutput = TestBlueprintsWorkflowOutput::class.asPropertyDefinitionMap()
+ val wfOutput = TestBluePrintsWorkflowOutput::class.asPropertyDefinitionMap()
// println(wfOutput.asJsonString(true))
assertNotNull(wfInput, "failed to generate wfOutput property map")
}
@Test
- fun testBlueprintDataType() {
- val dataTypes = TestBlueprintsDataType::class.asBlueprintsDataTypes()
+ fun testBluePrintDataType() {
+ val dataTypes = TestBluePrintsDataType::class.asBluePrintsDataTypes()
// println(dataTypes.asJsonString(true))
assertNotNull(dataTypes, "failed to generate dataTypes definition")
}
}
-@BlueprintsDataType(
+@BluePrintsDataType(
name = "dt-test-datatype", description = "I am test",
version = "1.0.0", derivedFrom = "tosca.datatypes.root"
)
-data class TestBlueprintsDataType(
- @BlueprintsProperty(description = "this stringData")
+data class TestBluePrintsDataType(
+ @BluePrintsProperty(description = "this stringData")
var stringData: String,
- @BlueprintsProperty(description = "this stringDataWithValue")
+ @BluePrintsProperty(description = "this stringDataWithValue")
@PropertyDefaultValue(value = "USA")
val stringDataWithValue: String,
- @BlueprintsProperty(description = "this intDataWithValue")
+ @BluePrintsProperty(description = "this intDataWithValue")
@PropertyDefaultValue(value = "30")
val intDataWithValue: Int,
- @BlueprintsProperty(description = "this booleanDataWithValue")
+ @BluePrintsProperty(description = "this booleanDataWithValue")
@PropertyDefaultValue(value = "true")
val booleanDataWithValue: Boolean,
- @BlueprintsProperty(description = "this anyData")
+ @BluePrintsProperty(description = "this anyData")
val anyData: Any,
- @BlueprintsProperty(description = "this jsonDataWithValue")
+ @BluePrintsProperty(description = "this jsonDataWithValue")
@PropertyDefaultValue(value = """{"data" : "1234"}""")
val jsonDataWithValue: JsonNode?,
- @BlueprintsProperty(description = "listData")
+ @BluePrintsProperty(description = "listData")
val listData: MutableList<String>,
- @BlueprintsProperty(description = "this mapData")
+ @BluePrintsProperty(description = "this mapData")
val mapData: MutableMap<String, String> = hashMapOf(),
- @BlueprintsProperty(description = "this complexData")
- val complexData: TestBlueprintsChildDataType?,
- @BlueprintsProperty(description = "this complexDataList")
- val complexDataList: MutableList<TestBlueprintsChildDataType>
+ @BluePrintsProperty(description = "this complexData")
+ val complexData: TestBluePrintsChildDataType?,
+ @BluePrintsProperty(description = "this complexDataList")
+ val complexDataList: MutableList<TestBluePrintsChildDataType>
)
-data class TestBlueprintsChildDataType(val name: String)
+data class TestBluePrintsChildDataType(val name: String)
-@BlueprintsWorkflowInput
-data class TestBlueprintsWorkflowInput(
- @BlueprintsProperty(description = "this sample name")
+@BluePrintsWorkflowInput
+data class TestBluePrintsWorkflowInput(
+ @BluePrintsProperty(description = "this sample name")
@PropertyDefaultValue(value = "Brinda")
var name: String,
- @BlueprintsProperty(description = "this sample name")
+ @BluePrintsProperty(description = "this sample name")
val place: String
)
-@BlueprintsWorkflowOutput
-data class TestBlueprintsWorkflowOutput(
- @BlueprintsProperty(description = "this is dslExpression")
+@BluePrintsWorkflowOutput
+data class TestBluePrintsWorkflowOutput(
+ @BluePrintsProperty(description = "this is dslExpression")
@DSLExpression("field1")
var dslExpression: String,
- @BlueprintsProperty(description = "this is withNodeAttributeExpression")
+ @BluePrintsProperty(description = "this is withNodeAttributeExpression")
@AttributeExpression(modelableEntityName = "sample-node", attributeName = "response-data")
var withNodeAttributeExpression: String,
- @BlueprintsProperty(description = "this is withNodeAttributeExpressionSubAttribute")
+ @BluePrintsProperty(description = "this is withNodeAttributeExpressionSubAttribute")
@AttributeExpression(
modelableEntityName = "sample-node", attributeName = "response-data",
subAttributeName = ".\$field1"
)
var withNodeAttributeExpressionSubAttribute: String,
- @BlueprintsProperty(description = "this is withAttributeExpressionSubAttribute")
+ @BluePrintsProperty(description = "this is withAttributeExpressionSubAttribute")
@AttributeExpression(attributeName = "response-data", subAttributeName = ".\$field1")
var withAttributeExpressionSubAttribute: String,
- @BlueprintsProperty(description = "this is withAttributeExpression")
+ @BluePrintsProperty(description = "this is withAttributeExpression")
@AttributeExpression(attributeName = "response-data")
var withAttributeExpression: String,
- @BlueprintsProperty(description = "this is withAArtifactExpression")
+ @BluePrintsProperty(description = "this is withAArtifactExpression")
@ArtifactExpression(modelableEntityName = "test-node", artifactName = "content-template")
var withAArtifactExpression: String,
- @BlueprintsProperty(description = "this status")
+ @BluePrintsProperty(description = "this status")
val status: String = "success"
)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSLTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt
similarity index 97%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSLTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt
index 57f671d..f2d95cd 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BlueprintDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/dsl/BluePrintDSLTest.kt
@@ -18,13 +18,13 @@
import com.fasterxml.jackson.databind.JsonNode
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
import kotlin.test.assertNotNull
-class BlueprintDSLTest {
+class BluePrintDSLTest {
@Test
fun testOperationDSLWorkflow() {
@@ -34,7 +34,7 @@
"brindasanth@onap.com", "sample, blueprints"
) {
- artifactType(BlueprintTypes.artifactTypeTemplateVelocity())
+ artifactType(BluePrintTypes.artifactTypeTemplateVelocity())
// For New Component Definition
component(
@@ -84,7 +84,7 @@
assertNotNull(blueprint.workflows, "failed to get workflows")
// println(blueprint.asJsonString(true))
- val serviceTemplateGenerator = BlueprintServiceTemplateGenerator(blueprint)
+ val serviceTemplateGenerator = BluePrintServiceTemplateGenerator(blueprint)
val serviceTemplate = serviceTemplateGenerator.serviceTemplate()
assertNotNull(serviceTemplate.topologyTemplate, "failed to get service topology template")
// println(serviceTemplate.asJsonString(true))
@@ -249,7 +249,7 @@
@Test
fun testNodeTemplateOperationTypes() {
- val testNodeTemplateInstance = BlueprintTypes.nodeTemplateComponentTestExecutor(
+ val testNodeTemplateInstance = BluePrintTypes.nodeTemplateComponentTestExecutor(
id = "test-node-template",
description = ""
) {
@@ -272,7 +272,7 @@
}
}
-fun BlueprintTypes.nodeTemplateComponentTestExecutor(
+fun BluePrintTypes.nodeTemplateComponentTestExecutor(
id: String,
description: String,
block: TestNodeTemplateOperationImplBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintScriptsServiceImplTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImplTest.kt
similarity index 90%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintScriptsServiceImplTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImplTest.kt
index 7dd980d..0803d92 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BlueprintScriptsServiceImplTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/scripts/BluePrintScriptsServiceImplTest.kt
@@ -20,7 +20,7 @@
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintDefinitions
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintDefinitions
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
import kotlin.script.experimental.jvm.util.classpathFromClass
@@ -28,19 +28,19 @@
import kotlin.script.experimental.jvm.util.classpathFromClasspathProperty
import kotlin.test.assertNotNull
-class BlueprintScriptsServiceImplTest {
+class BluePrintScriptsServiceImplTest {
private fun viewClassPathInfo() {
println(" *********** classpathFromClass *********** ")
classpathFromClass(
- BlueprintScriptsServiceImplTest::class.java.classLoader,
- BlueprintScriptsServiceImplTest::class
+ BluePrintScriptsServiceImplTest::class.java.classLoader,
+ BluePrintScriptsServiceImplTest::class
)!!
.forEach(::println)
println(" *********** classpathFromClassloader *********** ")
- classpathFromClassloader(BlueprintScriptsServiceImplTest::class.java.classLoader)!!
+ classpathFromClassloader(BluePrintScriptsServiceImplTest::class.java.classLoader)!!
.forEach(::println)
println(" *********** classpathFromClasspathProperty *********** ")
@@ -52,13 +52,13 @@
fun testCachedService() {
runBlocking {
- val bluePrintScriptsService = BlueprintScriptsServiceImpl()
+ val bluePrintScriptsService = BluePrintScriptsServiceImpl()
val basePath = normalizedPathName("src/test/resources/compile")
/** Load the Definitions */
val bluePrintDefinitions = bluePrintScriptsService
- .scriptInstance<BlueprintDefinitions>(
+ .scriptInstance<BluePrintDefinitions>(
basePath,
"cba.scripts.ActivateBlueprintDefinitions", true
)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintContextTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintContextTest.kt
similarity index 83%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintContextTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintContextTest.kt
index 4ad4ab4..38f6ea2 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintContextTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintContextTest.kt
@@ -20,8 +20,8 @@
import com.fasterxml.jackson.databind.ObjectMapper
import kotlinx.coroutines.runBlocking
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.TestConstants
import org.onap.ccsdk.cds.controllerblueprints.core.data.Activity
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
@@ -38,7 +38,7 @@
import org.onap.ccsdk.cds.controllerblueprints.core.data.Step
import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import kotlin.test.assertEquals
@@ -51,16 +51,16 @@
*
* @author Brinda Santh
*/
-class BlueprintContextTest {
+class BluePrintContextTest {
private val log = LoggerFactory.getLogger(this::class.toString())
val blueprintBasePath = TestConstants.PATH_TEST_BLUEPRINTS_BASECONFIG
@Test
- fun testBlueprintContextCreation() {
+ fun testBluePrintContextCreation() {
runBlocking {
- val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(blueprintBasePath)
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(blueprintBasePath)
assertNotNull(bluePrintContext, "Failed to populate Blueprint context")
}
}
@@ -68,7 +68,7 @@
@Test
fun testChainedProperty() {
runBlocking {
- val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(blueprintBasePath)
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(blueprintBasePath)
val nodeType = bluePrintContext.nodeTypeChained("component-resource-resolution")
assertNotNull(nodeType, "Failed to get chained node type")
log.trace("Properties {}", JacksonUtils.getJson(nodeType, true))
@@ -79,7 +79,7 @@
fun testImports() {
val serviceTemplate = ServiceTemplate()
serviceTemplate.imports = mutableListOf()
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertTrue(bluePrintContext.imports()!!.isEmpty())
@@ -91,7 +91,7 @@
fun testDataTypes() {
val serviceTemplate = ServiceTemplate()
serviceTemplate.dataTypes = mutableMapOf()
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertTrue(bluePrintContext.dataTypes()!!.isEmpty())
@@ -105,7 +105,7 @@
topologyTemplate.inputs = mutableMapOf()
val serviceTemplate = ServiceTemplate()
serviceTemplate.topologyTemplate = topologyTemplate
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertTrue(bluePrintContext.inputs()!!.isEmpty())
@@ -115,49 +115,49 @@
}
@Test
- fun testBlueprintJson() {
+ fun testBluePrintJson() {
val serviceTemplate = ServiceTemplate()
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals("{\"tosca_definitions_version\":\"controller_blueprint_1_0_0\"}", bluePrintContext.blueprintJson())
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testName() {
val serviceTemplate = ServiceTemplate()
- serviceTemplate.metadata = mutableMapOf(BlueprintConstants.METADATA_TEMPLATE_NAME to "hello")
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ serviceTemplate.metadata = mutableMapOf(BluePrintConstants.METADATA_TEMPLATE_NAME to "hello")
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals("hello", bluePrintContext.name())
serviceTemplate.metadata = mutableMapOf()
- val bluePrintContext2 = BlueprintContext(serviceTemplate)
+ val bluePrintContext2 = BluePrintContext(serviceTemplate)
bluePrintContext2.name()
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testVersion() {
val serviceTemplate = ServiceTemplate()
- serviceTemplate.metadata = mutableMapOf(BlueprintConstants.METADATA_TEMPLATE_VERSION to "hello")
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ serviceTemplate.metadata = mutableMapOf(BluePrintConstants.METADATA_TEMPLATE_VERSION to "hello")
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals("hello", bluePrintContext.version())
serviceTemplate.metadata = mutableMapOf()
- val bluePrintContext2 = BlueprintContext(serviceTemplate)
+ val bluePrintContext2 = BluePrintContext(serviceTemplate)
bluePrintContext2.version()
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testAuthor() {
val serviceTemplate = ServiceTemplate()
- serviceTemplate.metadata = mutableMapOf(BlueprintConstants.METADATA_TEMPLATE_AUTHOR to "hello")
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ serviceTemplate.metadata = mutableMapOf(BluePrintConstants.METADATA_TEMPLATE_AUTHOR to "hello")
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals("hello", bluePrintContext.author())
serviceTemplate.metadata = mutableMapOf()
- val bluePrintContext2 = BlueprintContext(serviceTemplate)
+ val bluePrintContext2 = BluePrintContext(serviceTemplate)
bluePrintContext2.author()
}
@@ -167,7 +167,7 @@
topologyTemplate.workflows = mutableMapOf()
val serviceTemplate = ServiceTemplate()
serviceTemplate.topologyTemplate = topologyTemplate
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertTrue(bluePrintContext.workflows()!!.isEmpty())
@@ -175,13 +175,13 @@
assertNull(bluePrintContext.workflows())
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testWorkFlowsByName() {
val topologyTemplate = TopologyTemplate()
topologyTemplate.workflows = mutableMapOf("workflow" to Workflow())
val serviceTemplate = ServiceTemplate()
serviceTemplate.topologyTemplate = topologyTemplate
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.workflowByName("workflow"))
@@ -196,7 +196,7 @@
topologyTemplate.workflows = mutableMapOf("workflow" to workflow)
val serviceTemplate = ServiceTemplate()
serviceTemplate.topologyTemplate = topologyTemplate
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertTrue(bluePrintContext.workflowInputs("workflow")!!.isEmpty())
@@ -205,7 +205,7 @@
assertNull(bluePrintContext.workflowInputs("workflow"))
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testWorkflowStepByName() {
val topologyTemplate = TopologyTemplate()
val workflow = Workflow()
@@ -213,14 +213,14 @@
topologyTemplate.workflows = mutableMapOf("workflow" to workflow)
val serviceTemplate = ServiceTemplate()
serviceTemplate.topologyTemplate = topologyTemplate
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.workflowStepByName("workflow", "step"))
bluePrintContext.workflowStepByName("workflow", "")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testWorkflowStepNodeTemplate() {
val topologyTemplate = TopologyTemplate()
val workflow = Workflow()
@@ -230,14 +230,14 @@
topologyTemplate.workflows = mutableMapOf("workflow" to workflow)
val serviceTemplate = ServiceTemplate()
serviceTemplate.topologyTemplate = topologyTemplate
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals("hello", bluePrintContext.workflowStepNodeTemplate("workflow", "step"))
bluePrintContext.workflowStepNodeTemplate("workflow", "")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testWorkflowFirstStepNodeTemplate() {
val topologyTemplate = TopologyTemplate()
val workflow = Workflow()
@@ -247,7 +247,7 @@
topologyTemplate.workflows = mutableMapOf("workflow" to workflow)
val serviceTemplate = ServiceTemplate()
serviceTemplate.topologyTemplate = topologyTemplate
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals("hello", bluePrintContext.workflowFirstStepNodeTemplate("workflow"))
@@ -255,7 +255,7 @@
bluePrintContext.workflowFirstStepNodeTemplate("workflow")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testWorkflowStepFirstCallOperation() {
val topologyTemplate = TopologyTemplate()
val workflow = Workflow()
@@ -267,7 +267,7 @@
topologyTemplate.workflows = mutableMapOf("workflow" to workflow)
val serviceTemplate = ServiceTemplate()
serviceTemplate.topologyTemplate = topologyTemplate
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals("hello", bluePrintContext.workflowStepFirstCallOperation("workflow", "step"))
@@ -278,7 +278,7 @@
fun testDatatypeByName() {
val serviceTemplate = ServiceTemplate()
serviceTemplate.dataTypes = mutableMapOf("data" to DataType())
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.dataTypeByName("data"))
assertNull(bluePrintContext.dataTypeByName(""))
@@ -288,7 +288,7 @@
fun testArtifactTypes() {
val serviceTemplate = ServiceTemplate()
serviceTemplate.artifactTypes = mutableMapOf()
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertTrue(bluePrintContext.artifactTypes()!!.isEmpty())
@@ -300,7 +300,7 @@
fun testPolicyTypes() {
val serviceTemplate = ServiceTemplate()
serviceTemplate.policyTypes = mutableMapOf()
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertTrue(bluePrintContext.policyTypes()!!.isEmpty())
@@ -308,11 +308,11 @@
assertNull(bluePrintContext.policyTypes())
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testPolicyTypeByName() {
val serviceTemplate = ServiceTemplate()
serviceTemplate.policyTypes = mutableMapOf("policy" to PolicyType())
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.policyTypeByName("policy"))
@@ -327,7 +327,7 @@
val policyType2 = PolicyType()
policyType2.derivedFrom = "hello"
serviceTemplate.policyTypes = mutableMapOf("policy" to policyType, "policy2" to policyType2)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals(1, bluePrintContext.policyTypesDerivedFrom("hi")!!.size)
@@ -343,7 +343,7 @@
val policyType2 = PolicyType()
policyType2.targets = mutableListOf()
serviceTemplate.policyTypes = mutableMapOf("policy" to policyType, "policy2" to policyType2)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals(1, bluePrintContext.policyTypesTarget("hi")!!.size)
@@ -361,7 +361,7 @@
policyType2.targets = mutableListOf()
policyType2.derivedFrom = "hi"
serviceTemplate.policyTypes = mutableMapOf("policy" to policyType, "policy2" to policyType2)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals(1, bluePrintContext.policyTypesTargetNDerivedFrom("hi", "hi")!!.size)
@@ -377,7 +377,7 @@
val nodeType2 = NodeType()
nodeType2.derivedFrom = "hiii"
serviceTemplate.nodeTypes = mutableMapOf("node" to nodeType, "node2" to nodeType2)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals(1, bluePrintContext.nodeTypeDerivedFrom("hi")!!.size)
@@ -385,13 +385,13 @@
assertNull(bluePrintContext.nodeTypeDerivedFrom("hi"))
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testInterfaceNameForNodeType() {
val serviceTemplate = ServiceTemplate()
val nodeType = NodeType()
nodeType.interfaces = mutableMapOf("hello" to InterfaceDefinition(), "hi" to InterfaceDefinition())
serviceTemplate.nodeTypes = mutableMapOf("node" to nodeType)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals("hello", bluePrintContext.interfaceNameForNodeType("node"))
@@ -408,7 +408,7 @@
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates =
mutableMapOf("node" to nodeTemplate, "node2" to nodeTemplate2)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals(1, bluePrintContext.nodeTemplateForNodeType("hello")!!.size)
@@ -423,7 +423,7 @@
nodeTemplate.properties = mutableMapOf("prop" to ObjectMapper().createObjectNode())
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.nodeTemplateProperty("node", "prop"))
@@ -440,26 +440,26 @@
nodeTemplate.artifacts = mutableMapOf()
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertTrue(bluePrintContext.nodeTemplateArtifacts("node")!!.isEmpty())
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testNodeTemplateArtifact() {
val serviceTemplate = ServiceTemplate()
val nodeTemplate = NodeTemplate()
nodeTemplate.artifacts = mutableMapOf("art" to ArtifactDefinition())
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.nodeTemplateArtifact("node", "art"))
bluePrintContext.nodeTemplateArtifact("node", "")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testNodeTemplateArtifactForArtifactType() {
val serviceTemplate = ServiceTemplate()
val nodeTemplate = NodeTemplate()
@@ -470,21 +470,21 @@
nodeTemplate.artifacts = mutableMapOf("art" to artifactDefinition, "art2" to artifactDefinition2)
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.nodeTemplateArtifactForArtifactType("node", "type"))
bluePrintContext.nodeTemplateArtifactForArtifactType("", "")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testNodeTemplateFirstInterface() {
val serviceTemplate = ServiceTemplate()
val nodeTemplate = NodeTemplate()
nodeTemplate.interfaces = mutableMapOf("interface" to InterfaceAssignment(), "interf" to InterfaceAssignment())
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.nodeTemplateFirstInterface("node"))
@@ -492,14 +492,14 @@
bluePrintContext.nodeTemplateFirstInterface("node")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testNodeTemplateFirstInterfaceName() {
val serviceTemplate = ServiceTemplate()
val nodeTemplate = NodeTemplate()
nodeTemplate.interfaces = mutableMapOf("interface" to InterfaceAssignment(), "interf" to InterfaceAssignment())
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals("interface", bluePrintContext.nodeTemplateFirstInterfaceName("node"))
@@ -507,7 +507,7 @@
bluePrintContext.nodeTemplateFirstInterfaceName("node")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testNodeTemplateFirstInterfaceFirstOperationName() {
val serviceTemplate = ServiceTemplate()
val nodeTemplate = NodeTemplate()
@@ -516,7 +516,7 @@
nodeTemplate.interfaces = mutableMapOf("intf" to interfaceAssignment)
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertEquals("op", bluePrintContext.nodeTemplateFirstInterfaceFirstOperationName("node"))
@@ -524,35 +524,35 @@
bluePrintContext.nodeTemplateFirstInterfaceFirstOperationName("node")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testNodeTemplateCapability() {
val serviceTemplate = ServiceTemplate()
val nodeTemplate = NodeTemplate()
nodeTemplate.capabilities = mutableMapOf("cap" to CapabilityAssignment())
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.nodeTemplateCapability("node", "cap"))
bluePrintContext.nodeTemplateCapability("node", "")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testNodeTemplateRequirement() {
val serviceTemplate = ServiceTemplate()
val nodeTemplate = NodeTemplate()
nodeTemplate.requirements = mutableMapOf("req" to RequirementAssignment())
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.nodeTemplateRequirement("node", "req"))
bluePrintContext.nodeTemplateRequirement("node", "")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testNodeTemplateRequirementNode() {
val serviceTemplate = ServiceTemplate()
val nodeTemplate = NodeTemplate()
@@ -561,7 +561,7 @@
nodeTemplate.requirements = mutableMapOf("req" to requirementAssignment)
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.nodeTemplateRequirementNode("node", "req"))
@@ -577,7 +577,7 @@
nodeTemplate.capabilities = mutableMapOf("cap" to capabilityAssignment)
serviceTemplate.topologyTemplate = TopologyTemplate()
serviceTemplate.topologyTemplate!!.nodeTemplates = mutableMapOf("node" to nodeTemplate)
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
assertNotNull(bluePrintContext.nodeTemplateCapabilityProperty("node", "cap", "prop"))
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintExpressionServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintExpressionServiceTest.kt
similarity index 93%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintExpressionServiceTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintExpressionServiceTest.kt
index 552f7b6..4f64527 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintExpressionServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintExpressionServiceTest.kt
@@ -30,12 +30,12 @@
*
* @author Brinda Santh
*/
-class BlueprintExpressionServiceTest {
+class BluePrintExpressionServiceTest {
@Test
fun testInputExpression() {
val node: JsonNode = jacksonObjectMapper().readTree("{ \"get_input\" : \"input-name\" }")
- val expressionData: ExpressionData = BlueprintExpressionService.getExpressionData(node)
+ val expressionData: ExpressionData = BluePrintExpressionService.getExpressionData(node)
assertNotNull(expressionData, " Failed to populate expression data")
assertEquals(expressionData.isExpression, true, "Failed to identify as expression")
assertNotNull(expressionData.inputExpression, " Failed to populate input expression data")
@@ -45,7 +45,7 @@
@Test
fun testPropertyExpression() {
val node: JsonNode = jacksonObjectMapper().readTree("{ \"get_property\" : [\"SELF\", \"property-name\"] }")
- val expressionData: ExpressionData = BlueprintExpressionService.getExpressionData(node)
+ val expressionData: ExpressionData = BluePrintExpressionService.getExpressionData(node)
assertNotNull(expressionData, " Failed to populate expression data")
assertEquals(expressionData.isExpression, true, "Failed to identify as expression")
assertNotNull(expressionData.propertyExpression, " Failed to populate property expression data")
@@ -53,7 +53,7 @@
assertEquals("property-name", expressionData.propertyExpression?.propertyName, " Failed to get expected propertyName")
val node1: JsonNode = jacksonObjectMapper().readTree("{ \"get_property\" : [\"SELF\", \"\",\"property-name\", \"resource\", \"name\"] }")
- val expressionData1: ExpressionData = BlueprintExpressionService.getExpressionData(node1)
+ val expressionData1: ExpressionData = BluePrintExpressionService.getExpressionData(node1)
assertNotNull(expressionData1, " Failed to populate expression data")
assertEquals(expressionData1.isExpression, true, "Failed to identify as nested property expression")
assertNotNull(expressionData1.propertyExpression, " Failed to populate nested property expression data")
@@ -69,7 +69,7 @@
@Test
fun testAttributeExpression() {
val node: JsonNode = jacksonObjectMapper().readTree("{ \"get_attribute\" : [\"SELF\", \"resource\"] }")
- val expressionData: ExpressionData = BlueprintExpressionService.getExpressionData(node)
+ val expressionData: ExpressionData = BluePrintExpressionService.getExpressionData(node)
assertNotNull(expressionData, " Failed to populate expression data")
assertEquals(expressionData.isExpression, true, "Failed to identify as expression")
assertNotNull(expressionData.attributeExpression, " Failed to populate attribute expression data")
@@ -77,7 +77,7 @@
assertEquals("resource", expressionData.attributeExpression?.attributeName, " Failed to get expected attributeName")
val node1: JsonNode = jacksonObjectMapper().readTree("{ \"get_attribute\" : [\"SELF\", \"\",\"attribute-name\", \"resource\", \"name\"] }")
- val expressionData1: ExpressionData = BlueprintExpressionService.getExpressionData(node1)
+ val expressionData1: ExpressionData = BluePrintExpressionService.getExpressionData(node1)
assertNotNull(expressionData1, " Failed to populate expression data")
assertEquals(expressionData1.isExpression, true, "Failed to identify as expression")
assertNotNull(expressionData1.attributeExpression, " Failed to populate attribute expression data")
@@ -94,7 +94,7 @@
fun testOutputOperationExpression() {
val node: JsonNode =
jacksonObjectMapper().readTree("{ \"get_operation_output\": [\"SELF\", \"interface-name\", \"operation-name\", \"output-property-name\"] }")
- val expressionData: ExpressionData = BlueprintExpressionService.getExpressionData(node)
+ val expressionData: ExpressionData = BluePrintExpressionService.getExpressionData(node)
assertNotNull(expressionData, " Failed to populate expression data")
assertEquals(expressionData.isExpression, true, "Failed to identify as expression")
assertNotNull(expressionData.operationOutputExpression, " Failed to populate output expression data")
@@ -107,7 +107,7 @@
@Test
fun testArtifactExpression() {
val node: JsonNode = jacksonObjectMapper().readTree("{ \"get_artifact\" : [\"SELF\", \"artifact-template\"] }")
- val expressionData: ExpressionData = BlueprintExpressionService.getExpressionData(node)
+ val expressionData: ExpressionData = BluePrintExpressionService.getExpressionData(node)
assertNotNull(expressionData, " Failed to populate expression data")
assertEquals(expressionData.isExpression, true, "Failed to identify as expression")
assertNotNull(expressionData.artifactExpression, " Failed to populate Artifact expression data")
@@ -115,7 +115,7 @@
assertEquals("artifact-template", expressionData.artifactExpression?.artifactName, " Failed to get expected artifactName")
val node1: JsonNode = jacksonObjectMapper().readTree("{ \"get_artifact\" : [\"SELF\", \"artifact-template\", \"location\", true] }")
- val expressionData1: ExpressionData = BlueprintExpressionService.getExpressionData(node1)
+ val expressionData1: ExpressionData = BluePrintExpressionService.getExpressionData(node1)
assertNotNull(expressionData1, " Failed to populate expression data")
assertEquals(expressionData1.isExpression, true, "Failed to identify as expression")
assertNotNull(expressionData1.artifactExpression, " Failed to populate Artifact expression data")
@@ -128,7 +128,7 @@
@Test
fun testDSLExpression() {
val node: JsonNode = "*dynamic-rest-source".asJsonPrimitive()
- val expressionData: ExpressionData = BlueprintExpressionService.getExpressionData(node)
+ val expressionData: ExpressionData = BluePrintExpressionService.getExpressionData(node)
assertNotNull(expressionData, " Failed to populate expression data")
assertEquals(expressionData.isExpression, true, "Failed to identify as expression")
assertNotNull(expressionData.dslExpression, " Failed to populate dsl expression data")
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRepoFileServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt
similarity index 87%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRepoFileServiceTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt
index 5ef28cc..2651751 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRepoFileServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRepoFileServiceTest.kt
@@ -18,19 +18,19 @@
package org.onap.ccsdk.cds.controllerblueprints.core.service
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.TestConstants
import kotlin.test.assertNotNull
/**
- * BlueprintRepoFileServiceTest
+ * BluePrintRepoFileServiceTest
* @author Brinda Santh
*
*/
-class BlueprintRepoFileServiceTest {
+class BluePrintRepoFileServiceTest {
private val basePath = TestConstants.PATH_TEST_DEFINITION_TYPE_STARTER
- private val bluePrintRepoFileService = BlueprintRepoFileService(basePath)
+ private val bluePrintRepoFileService = BluePrintRepoFileService(basePath)
@Test
fun testGetDataType() {
@@ -50,7 +50,7 @@
assertNotNull(nodeType, "Failed to get ArtifactType from repo")
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testModelNotFound() {
val dataType = bluePrintRepoFileService.getDataType("dt-not-found")
assertNotNull(dataType, "Failed to get DataType from repo")
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRuntimeServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
similarity index 89%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRuntimeServiceTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
index 2688110..4fcbb2d 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintRuntimeServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintRuntimeServiceTest.kt
@@ -20,13 +20,13 @@
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.node.NullNode
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.TestConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintRuntimeUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintRuntimeUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import kotlin.test.assertEquals
@@ -37,7 +37,7 @@
*
* @author Brinda Santh
*/
-class BlueprintRuntimeServiceTest {
+class BluePrintRuntimeServiceTest {
private val log = LoggerFactory.getLogger(this::class.toString())
@@ -45,7 +45,7 @@
fun `test Resolve NodeTemplate Properties`() {
log.info("************************ testResolveNodeTemplateProperties **********************")
- val bluePrintRuntimeService = getBlueprintRuntimeService()
+ val bluePrintRuntimeService = getBluePrintRuntimeService()
val inputDataPath = "src/test/resources/data/default-context.json"
@@ -62,7 +62,7 @@
fun `test Resolve Relationship Properties`() {
log.info("************************ testResolveRelationshipTemplateProperties **********************")
- val bluePrintRuntimeService = getBlueprintRuntimeService()
+ val bluePrintRuntimeService = getBluePrintRuntimeService()
val inputDataPath = "src/test/resources/data/default-context.json"
@@ -83,11 +83,11 @@
@Test
fun `test resolve NodeTemplate Capability Properties`() {
log.info("************************ testResolveNodeTemplateRequirementProperties **********************")
- val bluePrintRuntimeService = getBlueprintRuntimeService()
+ val bluePrintRuntimeService = getBluePrintRuntimeService()
val executionContext = bluePrintRuntimeService.getExecutionContext()
- BlueprintRuntimeUtils.assignInputsFromClassPathFile(
+ BluePrintRuntimeUtils.assignInputsFromClassPathFile(
bluePrintRuntimeService.bluePrintContext(),
"data/default-context.json", executionContext
)
@@ -123,11 +123,11 @@
fun `test Resolve NodeTemplate Interface Operation Inputs`() {
log.info("************************ testResolveNodeTemplateInterfaceOperationInputs **********************")
- val bluePrintRuntimeService = getBlueprintRuntimeService()
+ val bluePrintRuntimeService = getBluePrintRuntimeService()
val executionContext = bluePrintRuntimeService.getExecutionContext()
- BlueprintRuntimeUtils.assignInputsFromClassPathFile(
+ BluePrintRuntimeUtils.assignInputsFromClassPathFile(
bluePrintRuntimeService.bluePrintContext(),
"data/default-context.json", executionContext
)
@@ -155,7 +155,7 @@
fun `test Resolve NodeTemplate Interface Operation Outputs`() {
log.info("************************ testResolveNodeTemplateInterfaceOperationOutputs **********************")
- val bluePrintRuntimeService = getBlueprintRuntimeService()
+ val bluePrintRuntimeService = getBluePrintRuntimeService()
bluePrintRuntimeService.setNodeTemplateAttributeValue(
"resource-assignment",
@@ -188,7 +188,7 @@
@Test
fun `test NodeTemplate Context Property`() {
log.info("************************ testNodeTemplateContextProperty **********************")
- val bluePrintRuntimeService = getBlueprintRuntimeService()
+ val bluePrintRuntimeService = getBluePrintRuntimeService()
bluePrintRuntimeService.setNodeTemplateAttributeValue(
"resource-assignment-ra-component", "context1",
@@ -211,7 +211,7 @@
fun `test Resolve DSL Properties`() {
log.info("************************ resolveDSLExpression **********************")
- val bluePrintRuntimeService = getBlueprintRuntimeService()
+ val bluePrintRuntimeService = getBluePrintRuntimeService()
bluePrintRuntimeService.setInputValue("rest-user-name", "sample-username".asJsonPrimitive())
@@ -222,7 +222,7 @@
@Test
fun `test Resolve Workflow Outputs`() {
log.info("************************ resolvePropertyAssignments **********************")
- val bluePrintRuntimeService = getBlueprintRuntimeService()
+ val bluePrintRuntimeService = getBluePrintRuntimeService()
val assignmentParams = "{\"ipAddress\": \"127.0.0.1\", \"hostName\": \"vnf-host\"}"
@@ -237,7 +237,7 @@
@Test
fun `test resolvePropertyDefinitions using sub attributes`() {
- val bluePrintRuntimeService = getBlueprintRuntimeService()
+ val bluePrintRuntimeService = getBluePrintRuntimeService()
bluePrintRuntimeService.setNodeTemplateAttributeValue(
"resource-assignment", "assignment-map",
@@ -279,11 +279,11 @@
assertEquals("123", result["resolution"]!!.asText())
}
- private fun getBlueprintRuntimeService(): BlueprintRuntimeService<MutableMap<String, JsonNode>> {
+ private fun getBluePrintRuntimeService(): BluePrintRuntimeService<MutableMap<String, JsonNode>> {
val blueprintBasePath = normalizedPathName(TestConstants.PATH_TEST_BLUEPRINTS_BASECONFIG)
- val blueprintRuntime = BlueprintMetadataUtils.bluePrintRuntime("1234", blueprintBasePath)
- val checkProcessId = blueprintRuntime.get(BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID)
- val checkBasePath = blueprintRuntime.get(BlueprintConstants.PROPERTY_BLUEPRINT_BASE_PATH)
+ val blueprintRuntime = BluePrintMetadataUtils.bluePrintRuntime("1234", blueprintBasePath)
+ val checkProcessId = blueprintRuntime.get(BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID)
+ val checkBasePath = blueprintRuntime.get(BluePrintConstants.PROPERTY_BLUEPRINT_BASE_PATH)
assertEquals(
"1234".asJsonPrimitive(),
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateServiceTest.kt
similarity index 88%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateServiceTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateServiceTest.kt
index 6ebb6b7..0e93ccf 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintTemplateServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintTemplateServiceTest.kt
@@ -21,20 +21,20 @@
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.onap.ccsdk.cds.controllerblueprints.core.TestConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.BeforeTest
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
-class BlueprintTemplateServiceTest {
+class BluePrintTemplateServiceTest {
- lateinit var blueprintRuntime: BlueprintRuntimeService<*>
+ lateinit var blueprintRuntime: BluePrintRuntimeService<*>
@BeforeTest
fun setup() {
val blueprintBasePath = TestConstants.PATH_TEST_BLUEPRINTS_BASECONFIG
- blueprintRuntime = BlueprintMetadataUtils.bluePrintRuntime("1234", blueprintBasePath)
+ blueprintRuntime = BluePrintMetadataUtils.bluePrintRuntime("1234", blueprintBasePath)
}
@Test
@@ -43,7 +43,7 @@
val template = JacksonUtils.getClassPathFileContent("templates/base-config-velocity-template.vtl")
val json = JacksonUtils.getClassPathFileContent("templates/base-config-data-velocity.json")
- val content = BlueprintVelocityTemplateService.generateContent(template, json)
+ val content = BluePrintVelocityTemplateService.generateContent(template, json)
assertNotNull(content, "failed to generate content for velocity template")
}
}
@@ -60,7 +60,7 @@
hashMapOf("name" to "Element2", "location" to "Region1")
)
- val content = BlueprintJinjaTemplateService.generateContent(template, json, false, element)
+ val content = BluePrintJinjaTemplateService.generateContent(template, json, false, element)
assertNotNull(content, "failed to generate content for velocity template")
}
}
@@ -72,7 +72,7 @@
JacksonUtils.getClassPathFileContent("templates/default-variable-value-velocity-template.vtl")
val json = JacksonUtils.getClassPathFileContent("templates/default-variable-value-data.json")
- val content = BlueprintVelocityTemplateService.generateContent(template, json)
+ val content = BluePrintVelocityTemplateService.generateContent(template, json)
// first line represents a variable whose value was successfully retrieved, second line contains a variable
// whose value could not be evaluated
val expected = "sample-hostname\n\${node0_backup_router_address}"
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintWorkflowServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowServiceTest.kt
similarity index 83%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintWorkflowServiceTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowServiceTest.kt
index 291a81f..eb62469 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BlueprintWorkflowServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/service/BluePrintWorkflowServiceTest.kt
@@ -25,25 +25,25 @@
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withTimeout
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.data.EdgeLabel
import org.onap.ccsdk.cds.controllerblueprints.core.data.Graph
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.toGraph
import kotlin.test.assertNotNull
-class BlueprintWorkflowServiceTest {
+class BluePrintWorkflowServiceTest {
@Test
fun testSimpleFlow() {
runBlocking {
val graph = "[START>A/SUCCESS, A>B/SUCCESS, B>C/SUCCESS, C>D/SUCCESS, D>E/SUCCESS, E>END/SUCCESS]"
.toGraph()
- val simpleWorkflow = TestBlueprintWorkFlowService()
+ val simpleWorkflow = TestBluePrintWorkFlowService()
simpleWorkflow.simulatedState = prepareSimulation(arrayListOf("A", "B", "C", "D", "E"), null)
val input = "123456"
- val response = simpleWorkflow.executeWorkflow(graph, mockBlueprintRuntimeService(), input)
+ val response = simpleWorkflow.executeWorkflow(graph, mockBluePrintRuntimeService(), input)
assertNotNull(response, "failed to get response")
}
}
@@ -56,9 +56,9 @@
async {
val graph = "[START>A/SUCCESS, A>B/SUCCESS, B>C/SUCCESS, C>D/SUCCESS, D>END/SUCCESS]"
.toGraph()
- val simpleWorkflow = TestBlueprintWorkFlowService()
+ val simpleWorkflow = TestBluePrintWorkFlowService()
simpleWorkflow.simulatedState = prepareSimulation(arrayListOf("A", "B", "C", "D"), null)
- val response = simpleWorkflow.executeWorkflow(graph, mockBlueprintRuntimeService(it), it)
+ val response = simpleWorkflow.executeWorkflow(graph, mockBluePrintRuntimeService(it), it)
assertNotNull(response, "failed to get response")
}
}
@@ -72,10 +72,10 @@
runBlocking {
val graph = "[START>A/SUCCESS, A>B/SUCCESS, B>C/SUCCESS, C>D/SUCCESS, D>END/SUCCESS]"
.toGraph()
- val simpleWorkflow = TestBlueprintWorkFlowService()
+ val simpleWorkflow = TestBluePrintWorkFlowService()
simpleWorkflow.simulatedState = prepareSimulation(arrayListOf("A", "C", "D", "E"), arrayListOf("B"))
val input = "123456"
- val response = simpleWorkflow.executeWorkflow(graph, mockBlueprintRuntimeService(), input)
+ val response = simpleWorkflow.executeWorkflow(graph, mockBluePrintRuntimeService(), input)
assertNotNull(response, "failed to get response")
}
}
@@ -85,10 +85,10 @@
runBlocking {
val graph = "[START>A/SUCCESS, A>B/SUCCESS, B>C/SUCCESS, C>D/SUCCESS, D>END/SUCCESS]"
.toGraph()
- val simpleWorkflow = TestBlueprintWorkFlowService()
+ val simpleWorkflow = TestBluePrintWorkFlowService()
simpleWorkflow.simulatedState = prepareSimulation(arrayListOf("A", "C", "D", "E"), null)
val input = "123456"
- val response = simpleWorkflow.executeWorkflow(graph, mockBlueprintRuntimeService(), input)
+ val response = simpleWorkflow.executeWorkflow(graph, mockBluePrintRuntimeService(), input)
assertNotNull(response, "failed to get response")
}
}
@@ -98,10 +98,10 @@
runBlocking {
val graph = "[START>A/SUCCESS, A>TO/SUCCESS, TO>C/SUCCESS, C>D/SUCCESS, D>END/SUCCESS]"
.toGraph()
- val simpleWorkflow = TestBlueprintWorkFlowService()
+ val simpleWorkflow = TestBluePrintWorkFlowService()
simpleWorkflow.simulatedState = prepareSimulation(arrayListOf("A", "TO", "C", "D", "E"), null)
val input = "123456"
- val response = simpleWorkflow.executeWorkflow(graph, mockBlueprintRuntimeService(), input)
+ val response = simpleWorkflow.executeWorkflow(graph, mockBluePrintRuntimeService(), input)
assertNotNull(response, "failed to get response")
}
}
@@ -111,10 +111,10 @@
runBlocking {
val graph = "[START>A/SUCCESS, A>B/SUCCESS, A>C/FAILURE, B>D/SUCCESS, C>D/SUCCESS, D>END/SUCCESS]"
.toGraph()
- val simpleWorkflow = TestBlueprintWorkFlowService()
+ val simpleWorkflow = TestBluePrintWorkFlowService()
simpleWorkflow.simulatedState = prepareSimulation(arrayListOf("A", "B", "C", "D", "E"), null)
val input = "123456"
- val response = simpleWorkflow.executeWorkflow(graph, mockBlueprintRuntimeService(), input)
+ val response = simpleWorkflow.executeWorkflow(graph, mockBluePrintRuntimeService(), input)
assertNotNull(response, "failed to get response")
}
}
@@ -125,13 +125,13 @@
// Failure Flow
val failurePatGraph = "[START>A/SUCCESS, A>B/SUCCESS, A>C/FAILURE, B>D/SUCCESS, C>D/SUCCESS, D>END/SUCCESS]"
.toGraph()
- val failurePathWorkflow = TestBlueprintWorkFlowService()
+ val failurePathWorkflow = TestBluePrintWorkFlowService()
failurePathWorkflow.simulatedState = prepareSimulation(
arrayListOf("B", "C", "D", "E"),
arrayListOf("A")
)
val failurePathWorkflowInput = "123456"
- val failurePathResponse = failurePathWorkflow.executeWorkflow(failurePatGraph, mockBlueprintRuntimeService(), failurePathWorkflowInput)
+ val failurePathResponse = failurePathWorkflow.executeWorkflow(failurePatGraph, mockBluePrintRuntimeService(), failurePathWorkflowInput)
assertNotNull(failurePathResponse, "failed to get response")
}
}
@@ -141,10 +141,10 @@
runBlocking {
val graph = "[START>A/SUCCESS, A>B/SUCCESS, A>C/FAILURE, C>D/SUCCESS, D>E/SUCCESS, B>E/SUCCESS, E>END/SUCCESS]"
.toGraph()
- val simpleWorkflow = TestBlueprintWorkFlowService()
+ val simpleWorkflow = TestBluePrintWorkFlowService()
simpleWorkflow.simulatedState = prepareSimulation(arrayListOf("A", "B", "C", "D", "E"), null)
val input = "123456"
- val response = simpleWorkflow.executeWorkflow(graph, mockBlueprintRuntimeService(), input)
+ val response = simpleWorkflow.executeWorkflow(graph, mockBluePrintRuntimeService(), input)
assertNotNull(response, "failed to get response")
}
}
@@ -154,20 +154,20 @@
runBlocking {
val graph = "[START>A/SUCCESS, A>B/SUCCESS, A>C/SUCCESS, B>D/SUCCESS, C>D/SUCCESS, D>END/SUCCESS]"
.toGraph()
- val simpleWorkflow = TestBlueprintWorkFlowService()
+ val simpleWorkflow = TestBluePrintWorkFlowService()
simpleWorkflow.simulatedState = prepareSimulation(arrayListOf("A", "B", "C", "D"), null)
val input = "123456"
- val response = simpleWorkflow.executeWorkflow(graph, mockBlueprintRuntimeService(), input)
+ val response = simpleWorkflow.executeWorkflow(graph, mockBluePrintRuntimeService(), input)
assertNotNull(response, "failed to get response")
}
}
- private fun mockBlueprintRuntimeService(): BlueprintRuntimeService<*> {
- return mockBlueprintRuntimeService("123456")
+ private fun mockBluePrintRuntimeService(): BluePrintRuntimeService<*> {
+ return mockBluePrintRuntimeService("123456")
}
- private fun mockBlueprintRuntimeService(id: String): BlueprintRuntimeService<*> {
- val bluePrintRuntimeService = mockk<BlueprintRuntimeService<*>>()
+ private fun mockBluePrintRuntimeService(id: String): BluePrintRuntimeService<*> {
+ val bluePrintRuntimeService = mockk<BluePrintRuntimeService<*>>()
every { bluePrintRuntimeService.id() } returns id
return bluePrintRuntimeService
}
@@ -184,10 +184,10 @@
}
}
-class TestBlueprintWorkFlowService :
- AbstractBlueprintWorkFlowService<String, String>() {
+class TestBluePrintWorkFlowService :
+ AbstractBluePrintWorkFlowService<String, String>() {
- val log = logger(TestBlueprintWorkFlowService::class)
+ val log = logger(TestBluePrintWorkFlowService::class)
lateinit var simulatedState: MutableMap<String, EdgeLabel>
@@ -195,7 +195,7 @@
return EdgeLabel.SUCCESS
}
- override suspend fun executeWorkflow(graph: Graph, bluePrintRuntimeService: BlueprintRuntimeService<*>, input: String): String {
+ override suspend fun executeWorkflow(graph: Graph, bluePrintRuntimeService: BluePrintRuntimeService<*>, input: String): String {
log.info("Executing Graph : $graph")
this.graph = graph
this.workflowId = bluePrintRuntimeService.id()
@@ -205,7 +205,7 @@
if (!workflowActor.isClosedForSend) {
workflowActor().send(startMessage)
} else {
- throw BlueprintProcessorException("workflow actor is closed for send $workflowActor")
+ throw BluePrintProcessorException("workflow actor is closed for send $workflowActor")
}
return startMessage.output.await()
}
@@ -229,7 +229,7 @@
kotlinx.coroutines.delay(2)
}
}
- return simulatedState[node.id] ?: throw BlueprintException("failed to get status for the node($node)")
+ return simulatedState[node.id] ?: throw BluePrintException("failed to get status for the node($node)")
}
override suspend fun prepareNodeSkipMessage(node: Graph.Node): NodeSkipMessage<String, String> {
@@ -242,7 +242,7 @@
nodeInput: String,
nodeOutput: String
): EdgeLabel {
- return simulatedState[node.id] ?: throw BlueprintException("failed to get status for the node($node)")
+ return simulatedState[node.id] ?: throw BluePrintException("failed to get status for the node($node)")
}
override suspend fun cancelNode(
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintFileUtilsTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintFileUtilsTest.kt
similarity index 82%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintFileUtilsTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintFileUtilsTest.kt
index ac74f7a..6e19656 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintFileUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintFileUtilsTest.kt
@@ -24,12 +24,12 @@
import java.nio.file.Paths
import kotlin.test.assertTrue
-class BlueprintFileUtilsTest {
+class BluePrintFileUtilsTest {
@Test
fun testNewBlueprint() = runBlocking {
val targetPath: String = Paths.get("target").toUri().toURL().path.plus("/bp-new-test")
- BlueprintFileUtils.createEmptyBlueprint(targetPath)
+ BluePrintFileUtils.createEmptyBluePrint(targetPath)
}
@Test
@@ -41,17 +41,17 @@
val targetDir = File(targetPath)
targetDir.deleteOnExit()
// Copy the BP file
- BlueprintFileUtils.copyBlueprint(sourcePath, targetDir.absolutePath)
+ BluePrintFileUtils.copyBluePrint(sourcePath, targetDir.absolutePath)
assertTrue(targetDir.exists(), "faield to copy blueprint to ${targetDir.absolutePath}")
// Delete Type Files
- BlueprintFileUtils.deleteBlueprintTypes(targetDir.absolutePath)
+ BluePrintFileUtils.deleteBluePrintTypes(targetDir.absolutePath)
// Generate the Type Files
- val bluePrintContext = BlueprintMetadataUtils.getBlueprintContext(sourcePath)
+ val bluePrintContext = BluePrintMetadataUtils.getBluePrintContext(sourcePath)
bluePrintContext.rootPath = targetDir.absolutePath
- BlueprintFileUtils.writeBlueprintTypes(bluePrintContext)
+ BluePrintFileUtils.writeBluePrintTypes(bluePrintContext)
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintIOUtilsTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintIOUtilsTest.kt
similarity index 84%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintIOUtilsTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintIOUtilsTest.kt
index d0c32cc..62bb0af 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintIOUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintIOUtilsTest.kt
@@ -18,9 +18,9 @@
import kotlinx.coroutines.runBlocking
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintRetryException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintRetryException
-class BlueprintIOUtilsTest {
+class BluePrintIOUtilsTest {
@Test
fun testRetry() {
@@ -29,13 +29,13 @@
"success"
}
val exceptionBlock = { e: Exception ->
- if (e is BlueprintRetryException) {
+ if (e is BluePrintRetryException) {
println("this is blueprint error")
} else {
throw e
}
}
- BlueprintIOUtils.retry<String>(4, 0, 500, executionBlock, exceptionBlock)
+ BluePrintIOUtils.retry<String>(4, 0, 500, executionBlock, exceptionBlock)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintMetadataUtilsTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtilsTest.kt
similarity index 87%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintMetadataUtilsTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtilsTest.kt
index b03fb9f..6ccfe1e 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BlueprintMetadataUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/BluePrintMetadataUtilsTest.kt
@@ -22,13 +22,13 @@
import org.onap.ccsdk.cds.controllerblueprints.core.TestConstants
import org.onap.ccsdk.cds.controllerblueprints.core.data.ToscaMetaData
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintCompileCache
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue
-class BlueprintMetadataUtilsTest {
+class BluePrintMetadataUtilsTest {
@Test
fun testToscaMetaData() {
@@ -36,7 +36,7 @@
runBlocking {
val basePath = TestConstants.PATH_TEST_BLUEPRINTS_BASECONFIG
- val toscaMetaData: ToscaMetaData = BlueprintMetadataUtils.toscaMetaData(basePath)
+ val toscaMetaData: ToscaMetaData = BluePrintMetadataUtils.toscaMetaData(basePath)
assertNotNull(toscaMetaData, "Missing Tosca Definition Object")
assertNotNull(toscaMetaData.toscaMetaFileVersion, "Missing Tosca Metadata Version")
assertNotNull(toscaMetaData.csarVersion, "Missing CSAR version")
@@ -47,21 +47,21 @@
}
@Test
- fun testKotlinBlueprintContext() {
+ fun testKotlinBluePrintContext() {
runBlocking {
val path = normalizedPathName("src/test/resources/compile")
- val blueprintContext = BlueprintMetadataUtils.getBlueprintContext(path)
+ val blueprintContext = BluePrintMetadataUtils.getBluePrintContext(path)
assertNotNull(blueprintContext, "failed to get blueprint context")
assertNotNull(blueprintContext.serviceTemplate, "failed to get blueprint context service template")
assertNotNull(blueprintContext.serviceTemplate, "failed to get blueprint context service template")
assertNotNull(blueprintContext.otherDefinitions, "failed to get blueprint contextother definitions")
- var cachePresent = BlueprintCompileCache.hasClassLoader(path)
+ var cachePresent = BluePrintCompileCache.hasClassLoader(path)
assertTrue(cachePresent, "failed to generate cache key ($path)")
/** Cleaning Cache */
- BlueprintCompileCache.cleanClassLoader(path)
- cachePresent = BlueprintCompileCache.hasClassLoader(path)
+ BluePrintCompileCache.cleanClassLoader(path)
+ cachePresent = BluePrintCompileCache.hasClassLoader(path)
assertTrue(!cachePresent, "failed to remove cache key ($path)")
}
}
@@ -70,7 +70,7 @@
fun environmentDataTest() {
val environmentPath = "./src/test/resources/environments"
- val properties = BlueprintMetadataUtils.bluePrintEnvProperties(environmentPath)
+ val properties = BluePrintMetadataUtils.bluePrintEnvProperties(environmentPath)
assertNotNull(properties, "Could not read the properties")
assertEquals(properties.getProperty("blueprintsprocessor.database.alt1.username"), "username1", "failed 1")
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtilsTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtilsTest.kt
index ec12639..d78e62f 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/JacksonUtilsTest.kt
@@ -18,7 +18,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.utils
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.slf4j.LoggerFactory
import kotlin.test.assertNotNull
import kotlin.test.assertTrue
@@ -57,19 +57,19 @@
val rootJson = JacksonUtils.jsonNodeFromClassPathFile(filePath)
assertNotNull(rootJson, "Failed to get all type data json node")
val intValue = rootJson.get("intValue")
- assertTrue(JacksonUtils.checkJsonNodeValueOfType(BlueprintConstants.DATA_TYPE_INTEGER, intValue), "Failed to get as int value")
+ assertTrue(JacksonUtils.checkJsonNodeValueOfType(BluePrintConstants.DATA_TYPE_INTEGER, intValue), "Failed to get as int value")
val floatValue = rootJson.get("floatValue")
- assertTrue(JacksonUtils.checkJsonNodeValueOfType(BlueprintConstants.DATA_TYPE_FLOAT, floatValue), "Failed to get as float value")
+ assertTrue(JacksonUtils.checkJsonNodeValueOfType(BluePrintConstants.DATA_TYPE_FLOAT, floatValue), "Failed to get as float value")
val stringValue = rootJson.get("stringValue")
- assertTrue(JacksonUtils.checkJsonNodeValueOfType(BlueprintConstants.DATA_TYPE_STRING, stringValue), "Failed to get as string value")
+ assertTrue(JacksonUtils.checkJsonNodeValueOfType(BluePrintConstants.DATA_TYPE_STRING, stringValue), "Failed to get as string value")
val booleanValue = rootJson.get("booleanValue")
- assertTrue(JacksonUtils.checkJsonNodeValueOfType(BlueprintConstants.DATA_TYPE_BOOLEAN, booleanValue), "Failed to get as boolean value")
+ assertTrue(JacksonUtils.checkJsonNodeValueOfType(BluePrintConstants.DATA_TYPE_BOOLEAN, booleanValue), "Failed to get as boolean value")
val arrayStringValue = rootJson.get("arrayStringValue")
- assertTrue(JacksonUtils.checkJsonNodeValueOfType(BlueprintConstants.DATA_TYPE_LIST, arrayStringValue), "Failed to get as List value")
+ assertTrue(JacksonUtils.checkJsonNodeValueOfType(BluePrintConstants.DATA_TYPE_LIST, arrayStringValue), "Failed to get as List value")
// FIX needed for ("complex type JSON & MAP")
// val mapValue = rootJson.get("mapValue")
- // assertTrue(JacksonUtils.checkJsonNodeValueOfType(BlueprintConstants.DATA_TYPE_MAP, mapValue), "Failed to get as Map value")
+ // assertTrue(JacksonUtils.checkJsonNodeValueOfType(BluePrintConstants.DATA_TYPE_MAP, mapValue), "Failed to get as Map value")
- assertTrue(!JacksonUtils.checkJsonNodeValueOfType(BlueprintConstants.DATA_TYPE_LIST, stringValue), "Negative type failed")
+ assertTrue(!JacksonUtils.checkJsonNodeValueOfType(BluePrintConstants.DATA_TYPE_LIST, stringValue), "Negative type failed")
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/PropertyDefinitionUtilsTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/PropertyDefinitionUtilsTest.kt
index f2d6353..83764c5 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/PropertyDefinitionUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/utils/PropertyDefinitionUtilsTest.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.controllerblueprints.core.utils
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.LOG_PROTECT
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.LOG_PROTECT
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.utils.PropertyDefinitionUtils.Companion.hasLogProtect
import kotlin.test.assertFalse
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/resources/compile/Scripts/kotlin/ActivateBlueprintDefinitions.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/resources/compile/Scripts/kotlin/ActivateBlueprintDefinitions.kt
index 4ba7694..5dd1937 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/resources/compile/Scripts/kotlin/ActivateBlueprintDefinitions.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/resources/compile/Scripts/kotlin/ActivateBlueprintDefinitions.kt
@@ -16,13 +16,13 @@
package cba.scripts
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.dataType
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.AbstractBlueprintDefinitions
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.AbstractBluePrintDefinitions
-class ActivateBlueprintDefinitions : AbstractBlueprintDefinitions() {
+class ActivateBlueprintDefinitions : AbstractBluePrintDefinitions() {
override fun serviceTemplate(): ServiceTemplate {
@@ -46,10 +46,10 @@
/** Sample Definitions */
val customDataType = dataType(
"custom-datatype", "1.0.0",
- BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT, ""
+ BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT, ""
) {
- property("name", BlueprintConstants.DATA_TYPE_STRING, true, "")
- property("value", BlueprintConstants.DATA_TYPE_STRING, true, "")
+ property("name", BluePrintConstants.DATA_TYPE_STRING, true, "")
+ property("value", BluePrintConstants.DATA_TYPE_STRING, true, "")
}
/** Loading to definitions */
addOtherDefinition("datatype-custom-datatype", customDataType)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintArtifactDefinitionValidatorImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt
similarity index 76%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintArtifactDefinitionValidatorImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt
index d9f4db7..7350431 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintArtifactDefinitionValidatorImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintArtifactDefinitionValidatorImpl.kt
@@ -16,13 +16,13 @@
package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactDefinitionValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
@@ -31,18 +31,18 @@
@Service("default-artifact-definition-validator")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintArtifactDefinitionValidatorImpl(
- private val bluePrintTypeValidatorService: BlueprintTypeValidatorService
-) : BlueprintArtifactDefinitionValidator {
+open class BluePrintArtifactDefinitionValidatorImpl(
+ private val bluePrintTypeValidatorService: BluePrintTypeValidatorService
+) : BluePrintArtifactDefinitionValidator {
- private val log = LoggerFactory.getLogger(BlueprintArtifactDefinitionValidatorImpl::class.toString())
+ private val log = LoggerFactory.getLogger(BluePrintArtifactDefinitionValidatorImpl::class.toString())
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
var paths: MutableList<String> = arrayListOf()
override fun validate(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
artifactDefinition: ArtifactDefinition
) {
@@ -61,7 +61,7 @@
val completePath = bluePrintContext.rootPath.plus(File.separator).plus(file)
check(File(completePath).exists()) {
- throw BlueprintException("couldn't find file ($completePath)")
+ throw BluePrintException("couldn't find file ($completePath)")
}
// Perform Extension Validation
@@ -73,22 +73,22 @@
open fun checkValidArtifactType(artifactDefinitionName: String, artifactTypeName: String) {
val artifactType = bluePrintContext.serviceTemplate.artifactTypes?.get(artifactTypeName)
- ?: throw BlueprintException("failed to get artifactType($artifactTypeName) for ArtifactDefinition($artifactDefinitionName)")
+ ?: throw BluePrintException("failed to get artifactType($artifactTypeName) for ArtifactDefinition($artifactDefinitionName)")
checkValidArtifactTypeDerivedFrom(artifactTypeName, artifactType.derivedFrom)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun checkValidArtifactTypeDerivedFrom(artifactTypeName: String, derivedFrom: String) {
- check(BlueprintTypes.validArtifactTypeDerivedFroms.contains(derivedFrom)) {
- throw BlueprintException("failed to get artifactType($artifactTypeName)'s derivedFrom($derivedFrom) definition")
+ check(BluePrintTypes.validArtifactTypeDerivedFroms.contains(derivedFrom)) {
+ throw BluePrintException("failed to get artifactType($artifactTypeName)'s derivedFrom($derivedFrom) definition")
}
}
private fun validateExtension(referencePrefix: String, name: String, artifactDefinition: ArtifactDefinition) {
val customValidators = bluePrintTypeValidatorService
- .bluePrintValidators(referencePrefix, BlueprintArtifactDefinitionValidator::class.java)
+ .bluePrintValidators(referencePrefix, BluePrintArtifactDefinitionValidator::class.java)
customValidators?.let {
it.forEach { validator ->
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintArtifactTypeValidatorImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintArtifactTypeValidatorImpl.kt
similarity index 81%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintArtifactTypeValidatorImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintArtifactTypeValidatorImpl.kt
index ebcdf9f..b31211e 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintArtifactTypeValidatorImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintArtifactTypeValidatorImpl.kt
@@ -18,16 +18,16 @@
package org.onap.ccsdk.cds.controllerblueprints.validation
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.stereotype.Service
@Service("default-artifact-type-validator")
-open class BlueprintArtifactTypeValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) :
- BlueprintArtifactTypeValidator {
+open class BluePrintArtifactTypeValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) :
+ BluePrintArtifactTypeValidator {
- override fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, artifactType: ArtifactType) {
+ override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, artifactType: ArtifactType) {
artifactType.properties?.let {
bluePrintTypeValidatorService.validatePropertyDefinitions(bluePrintRuntimeService, artifactType.properties!!)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintAttributeDefinitionValidatorImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintAttributeDefinitionValidatorImpl.kt
similarity index 72%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintAttributeDefinitionValidatorImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintAttributeDefinitionValidatorImpl.kt
index ef02e84..9a46501 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintAttributeDefinitionValidatorImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintAttributeDefinitionValidatorImpl.kt
@@ -17,13 +17,13 @@
package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.format
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintAttributeDefinitionValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
@@ -31,15 +31,15 @@
@Service("default-attribute-definition-validator")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintAttributeDefinitionValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) :
- BlueprintAttributeDefinitionValidator {
+open class BluePrintAttributeDefinitionValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) :
+ BluePrintAttributeDefinitionValidator {
- private val log = LoggerFactory.getLogger(BlueprintServiceTemplateValidatorImpl::class.toString())
+ private val log = LoggerFactory.getLogger(BluePrintServiceTemplateValidatorImpl::class.toString())
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
override fun validate(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
attributeDefinition: AttributeDefinition
) {
@@ -49,15 +49,15 @@
val dataType: String = attributeDefinition.type
when {
- BlueprintTypes.validPrimitiveTypes().contains(dataType) -> {
+ BluePrintTypes.validPrimitiveTypes().contains(dataType) -> {
// Do Nothing
}
- BlueprintTypes.validComplexTypes().contains(dataType) -> {
+ BluePrintTypes.validComplexTypes().contains(dataType) -> {
// Do Nothing
}
- BlueprintTypes.validCollectionTypes().contains(dataType) -> {
+ BluePrintTypes.validCollectionTypes().contains(dataType) -> {
val entrySchemaType: String = attributeDefinition.entrySchema?.type
- ?: throw BlueprintException("Entry schema for DataType ($dataType) for the property ($name) not found")
+ ?: throw BluePrintException("Entry schema for DataType ($dataType) for the property ($name) not found")
checkPrimitiveOrComplex(entrySchemaType, name)
}
else -> checkPropertyDataType(dataType, name)
@@ -65,17 +65,17 @@
}
private fun checkPrimitiveOrComplex(dataType: String, propertyName: String): Boolean {
- if (BlueprintTypes.validPrimitiveTypes().contains(dataType) || checkDataType(dataType)) {
+ if (BluePrintTypes.validPrimitiveTypes().contains(dataType) || checkDataType(dataType)) {
return true
} else {
- throw BlueprintException("DataType($dataType) for the attribute($propertyName) is not valid")
+ throw BluePrintException("DataType($dataType) for the attribute($propertyName) is not valid")
}
}
private fun checkPropertyDataType(dataTypeName: String, propertyName: String) {
val dataType = bluePrintRuntimeService.bluePrintContext().serviceTemplate.dataTypes?.get(dataTypeName)
- ?: throw BlueprintException(format("DataType ({}) for the property ({}) not found", dataTypeName, propertyName))
+ ?: throw BluePrintException(format("DataType ({}) for the property ({}) not found", dataTypeName, propertyName))
checkValidDataTypeDerivedFrom(propertyName, dataType.derivedFrom)
}
@@ -85,8 +85,8 @@
}
open fun checkValidDataTypeDerivedFrom(dataTypeName: String, derivedFrom: String) {
- check(BlueprintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {
- throw BlueprintException("Failed to get DataType($dataTypeName)'s derivedFrom($derivedFrom) definition ")
+ check(BluePrintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {
+ throw BluePrintException("Failed to get DataType($dataTypeName)'s derivedFrom($derivedFrom) definition ")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDataTypeValidatorImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDataTypeValidatorImpl.kt
similarity index 83%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDataTypeValidatorImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDataTypeValidatorImpl.kt
index 35680c2..dab6a78 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDataTypeValidatorImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDataTypeValidatorImpl.kt
@@ -18,15 +18,15 @@
package org.onap.ccsdk.cds.controllerblueprints.validation
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintDataTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintDataTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.stereotype.Service
@Service("default-data-type-validator")
-open class BlueprintDataTypeValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) : BlueprintDataTypeValidator {
+open class BluePrintDataTypeValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) : BluePrintDataTypeValidator {
- override fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, dataType: DataType) {
+ override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, dataType: DataType) {
dataType.properties?.let {
bluePrintTypeValidatorService.validatePropertyDefinitions(bluePrintRuntimeService, dataType.properties!!)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorService.kt
similarity index 73%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorService.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorService.kt
index aac1c2e..ac5773c 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorService.kt
@@ -18,12 +18,12 @@
package org.onap.ccsdk.cds.controllerblueprints.validation
import org.jetbrains.kotlin.utils.addToStdlib.ifNotEmpty
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants
@@ -34,21 +34,21 @@
import java.util.UUID
@Service("bluePrintDesignTimeValidatorService")
-open class BlueprintDesignTimeValidatorService(
- private val bluePrintTypeValidatorService: BlueprintTypeValidatorService,
+open class BluePrintDesignTimeValidatorService(
+ private val bluePrintTypeValidatorService: BluePrintTypeValidatorService,
private val resourceDefinitionValidator: ResourceDefinitionValidator
) :
- BlueprintValidatorService {
+ BluePrintValidatorService {
- private val log = LoggerFactory.getLogger(BlueprintDesignTimeValidatorService::class.toString())
+ private val log = LoggerFactory.getLogger(BluePrintDesignTimeValidatorService::class.toString())
- override suspend fun validateBlueprints(basePath: String): Boolean {
+ override suspend fun validateBluePrints(basePath: String): Boolean {
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(UUID.randomUUID().toString(), basePath)
- return validateBlueprints(bluePrintRuntimeService)
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(UUID.randomUUID().toString(), basePath)
+ return validateBluePrints(bluePrintRuntimeService)
}
- override suspend fun validateBlueprints(bluePrintRuntimeService: BlueprintRuntimeService<*>): Boolean {
+ override suspend fun validateBluePrints(bluePrintRuntimeService: BluePrintRuntimeService<*>): Boolean {
bluePrintTypeValidatorService.validateServiceTemplate(
bluePrintRuntimeService, "service_template",
@@ -58,19 +58,19 @@
// Validate Resource Definitions
validateResourceDefinitions(bluePrintRuntimeService)
- bluePrintRuntimeService.getBlueprintError().allErrors().ifNotEmpty {
- throw BlueprintException("failed in blueprint validation : ${this.joinToString("\n")}")
+ bluePrintRuntimeService.getBluePrintError().allErrors().ifNotEmpty {
+ throw BluePrintException("failed in blueprint validation : ${this.joinToString("\n")}")
}
return true
}
- private fun validateResourceDefinitions(bluePrintRuntimeService: BlueprintRuntimeService<*>) {
+ private fun validateResourceDefinitions(bluePrintRuntimeService: BluePrintRuntimeService<*>) {
// Validate Resource Dictionary
val blueprintBasePath = bluePrintRuntimeService.bluePrintContext().rootPath
val resourceDefinitionsPath = blueprintBasePath.plus(File.separator)
- .plus(BlueprintConstants.TOSCA_DEFINITIONS_DIR).plus(File.separator)
+ .plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR).plus(File.separator)
.plus("${ResourceDictionaryConstants.PATH_RESOURCE_DEFINITION_TYPE}.json")
val resourceDefinitionFile = File(resourceDefinitionsPath)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintNodeTemplateValidatorImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt
similarity index 87%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintNodeTemplateValidatorImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt
index 0374424..6fa8311 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintNodeTemplateValidatorImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityAssignment
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityDefinition
@@ -28,10 +28,10 @@
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RequirementAssignment
import org.onap.ccsdk.cds.controllerblueprints.core.data.RequirementDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTemplateValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.validation.utils.PropertyAssignmentValidationUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
@@ -40,17 +40,17 @@
@Service("default-node-template-validator")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintNodeTemplateValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) :
- BlueprintNodeTemplateValidator {
+open class BluePrintNodeTemplateValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) :
+ BluePrintNodeTemplateValidator {
- private val log = LoggerFactory.getLogger(BlueprintNodeTemplateValidatorImpl::class.toString())
+ private val log = LoggerFactory.getLogger(BluePrintNodeTemplateValidatorImpl::class.toString())
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
lateinit var propertyAssignmentValidationUtils: PropertyAssignmentValidationUtils
var paths: MutableList<String> = arrayListOf()
- override fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, nodeTemplate: NodeTemplate) {
+ override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, nodeTemplate: NodeTemplate) {
log.debug("Validating NodeTemplate($name)")
this.bluePrintRuntimeService = bluePrintRuntimeService
@@ -63,7 +63,7 @@
val type: String = nodeTemplate.type
val nodeType: NodeType = bluePrintContext.serviceTemplate.nodeTypes?.get(type)
- ?: throw BlueprintException("Failed to get NodeType($type) definition for NodeTemplate($name)")
+ ?: throw BluePrintException("Failed to get NodeType($type) definition for NodeTemplate($name)")
nodeTemplate.properties?.let {
propertyAssignmentValidationUtils
@@ -80,7 +80,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateArtifactDefinitions(artifacts: MutableMap<String, ArtifactDefinition>) {
paths.add("artifacts")
artifacts.forEach { artifactDefinitionName, artifactDefinition ->
@@ -92,7 +92,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateCapabilityAssignments(nodeType: NodeType, nodeTemplateName: String, nodeTemplate: NodeTemplate) {
val capabilities = nodeTemplate.capabilities
paths.add("capabilities")
@@ -100,7 +100,7 @@
paths.add(capabilityName)
val capabilityDefinition = nodeType.capabilities?.get(capabilityName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"Failed to get NodeTemplate($nodeTemplateName) capability definition ($capabilityName) " +
"from NodeType(${nodeTemplate.type})"
)
@@ -112,7 +112,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateCapabilityAssignment(
nodeTemplateName: String,
capabilityName: String,
@@ -126,14 +126,14 @@
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateRequirementAssignments(nodeType: NodeType, nodeTemplateName: String, nodeTemplate: NodeTemplate) {
val requirements = nodeTemplate.requirements
paths.add("requirements")
requirements?.forEach { requirementName, requirementAssignment ->
paths.add(requirementName)
val requirementDefinition = nodeType.requirements?.get(requirementName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"Failed to get NodeTemplate($nodeTemplateName) requirement definition ($requirementName) from" +
" NodeType(${nodeTemplate.type})"
)
@@ -144,7 +144,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateRequirementAssignment(
nodeTemplateName: String,
requirementAssignmentName: String,
@@ -159,24 +159,24 @@
val capabilityName = requirementAssignment.capability
val relationship = requirementAssignment.relationship!!
- check(BlueprintTypes.validRelationShipDerivedFroms.contains(relationship)) {
- throw BlueprintException("Failed to get relationship type ($relationship) for NodeTemplate($nodeTemplateName)'s requirement($requirementAssignmentName)")
+ check(BluePrintTypes.validRelationShipDerivedFroms.contains(relationship)) {
+ throw BluePrintException("Failed to get relationship type ($relationship) for NodeTemplate($nodeTemplateName)'s requirement($requirementAssignmentName)")
}
val relationShipNodeTemplate = bluePrintContext.serviceTemplate.topologyTemplate?.nodeTemplates?.get(requirementNodeTemplateName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"Failed to get requirement NodeTemplate($requirementNodeTemplateName)'s " +
"for NodeTemplate($nodeTemplateName) requirement($requirementAssignmentName)"
)
relationShipNodeTemplate.capabilities?.get(capabilityName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"Failed to get requirement NodeTemplate($requirementNodeTemplateName)'s " +
"capability($capabilityName) for NodeTemplate ($nodeTemplateName)'s requirement($requirementAssignmentName)"
)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateInterfaceAssignments(nodeType: NodeType, nodeTemplateName: String, nodeTemplate: NodeTemplate) {
val interfaces = nodeTemplate.interfaces
@@ -184,7 +184,7 @@
interfaces?.forEach { interfaceAssignmentName, interfaceAssignment ->
paths.add(interfaceAssignmentName)
val interfaceDefinition = nodeType.interfaces?.get(interfaceAssignmentName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"Failed to get NodeTemplate($nodeTemplateName) interface definition ($interfaceAssignmentName) from" +
" NodeType(${nodeTemplate.type})"
)
@@ -198,7 +198,7 @@
paths.removeAt(paths.lastIndex)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateInterfaceAssignment(
nodeTemplateName: String,
interfaceAssignmentName: String,
@@ -215,7 +215,7 @@
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateInterfaceOperationsAssignment(
nodeTemplateName: String,
interfaceAssignmentName: String,
@@ -228,7 +228,7 @@
it.forEach { operationAssignmentName, operationAssignments ->
val operationDefinition = interfaceDefinition.operations?.get(operationAssignmentName)
- ?: throw BlueprintException("Failed to get NodeTemplate($nodeTemplateName) operation definition ($operationAssignmentName)")
+ ?: throw BluePrintException("Failed to get NodeTemplate($nodeTemplateName) operation definition ($operationAssignmentName)")
log.debug(
"Validation NodeTemplate($nodeTemplateName) Interface($interfaceAssignmentName) Operation " +
@@ -240,7 +240,7 @@
inputs?.forEach { propertyName, propertyAssignment ->
val propertyDefinition = operationDefinition.inputs?.get(propertyName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"Failed to get NodeTemplate($nodeTemplateName) operation " +
"definition ($operationAssignmentName) property definition($propertyName)"
)
@@ -251,7 +251,7 @@
outputs?.forEach { propertyName, propertyAssignment ->
val propertyDefinition = operationDefinition.outputs?.get(propertyName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"Failed to get NodeTemplate($nodeTemplateName) operation definition ($operationAssignmentName) " +
"output property definition($propertyName)"
)
@@ -265,7 +265,7 @@
private fun validateExtension(referencePrefix: String, name: String, nodeTemplate: NodeTemplate) {
val customValidator = bluePrintTypeValidatorService
- .bluePrintValidator(referencePrefix, BlueprintNodeTemplateValidator::class.java)
+ .bluePrintValidator(referencePrefix, BluePrintNodeTemplateValidator::class.java)
customValidator?.let {
it.validate(bluePrintRuntimeService, name, nodeTemplate)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintNodeTypeValidatorImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintNodeTypeValidatorImpl.kt
similarity index 85%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintNodeTypeValidatorImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintNodeTypeValidatorImpl.kt
index b7ec2d1..04a3fd0 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintNodeTypeValidatorImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintNodeTypeValidatorImpl.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
@@ -26,10 +26,10 @@
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.OperationDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.RequirementDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
@@ -37,15 +37,15 @@
@Service("default-node-type-validator")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintNodeTypeValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) : BlueprintNodeTypeValidator {
+open class BluePrintNodeTypeValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) : BluePrintNodeTypeValidator {
- private val log = LoggerFactory.getLogger(BlueprintServiceTemplateValidatorImpl::class.toString())
+ private val log = LoggerFactory.getLogger(BluePrintServiceTemplateValidatorImpl::class.toString())
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
var paths: MutableList<String> = arrayListOf()
- override fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, nodeTypeName: String, nodeType: NodeType) {
+ override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTypeName: String, nodeType: NodeType) {
log.trace("Validating NodeType($nodeTypeName)")
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
@@ -56,9 +56,9 @@
// Check Derived From
checkValidNodeTypesDerivedFrom(nodeTypeName, derivedFrom)
- if (!BlueprintTypes.rootNodeTypes().contains(derivedFrom)) {
+ if (!BluePrintTypes.rootNodeTypes().contains(derivedFrom)) {
bluePrintContext.serviceTemplate.nodeTypes?.get(derivedFrom)
- ?: throw BlueprintException("Failed to get derivedFrom NodeType($derivedFrom)'s for NodeType($nodeTypeName)")
+ ?: throw BluePrintException("Failed to get derivedFrom NodeType($derivedFrom)'s for NodeType($nodeTypeName)")
}
nodeType.attributes?.let {
@@ -77,8 +77,8 @@
}
fun checkValidNodeTypesDerivedFrom(nodeTypeName: String, derivedFrom: String) {
- check(BlueprintTypes.validNodeTypeDerivedFroms.contains(derivedFrom)) {
- throw BlueprintException("Failed to get node type ($nodeTypeName)'s derivedFrom($derivedFrom) definition ")
+ check(BluePrintTypes.validNodeTypeDerivedFroms.contains(derivedFrom)) {
+ throw BluePrintException("Failed to get node type ($nodeTypeName)'s derivedFrom($derivedFrom) definition ")
}
}
@@ -102,8 +102,8 @@
capabilityDefinition: CapabilityDefinition
) {
val capabilityType = capabilityDefinition.type
- check(BlueprintTypes.validCapabilityTypes.contains(capabilityType)) {
- throw BlueprintException("failed to get CapabilityType($capabilityType) for NodeType($nodeTypeName)")
+ check(BluePrintTypes.validCapabilityTypes.contains(capabilityType)) {
+ throw BluePrintException("failed to get CapabilityType($capabilityType) for NodeType($nodeTypeName)")
}
}
@@ -131,15 +131,15 @@
val capabilityName = requirementDefinition.capability
val relationship = requirementDefinition.relationship!!
- check(BlueprintTypes.validRelationShipDerivedFroms.contains(relationship)) {
- throw BlueprintException("failed to get relationship($relationship) for NodeType($nodeTypeName)'s requirement($requirementDefinitionName)")
+ check(BluePrintTypes.validRelationShipDerivedFroms.contains(relationship)) {
+ throw BluePrintException("failed to get relationship($relationship) for NodeType($nodeTypeName)'s requirement($requirementDefinitionName)")
}
val relationShipNodeType = bluePrintContext.serviceTemplate.nodeTypes?.get(requirementNodeTypeName)
- ?: throw BlueprintException("failed to get requirement NodeType($requirementNodeTypeName)'s for requirement($requirementDefinitionName) ")
+ ?: throw BluePrintException("failed to get requirement NodeType($requirementNodeTypeName)'s for requirement($requirementDefinitionName) ")
relationShipNodeType.capabilities?.get(capabilityName)
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"failed to get requirement NodeType($requirementNodeTypeName)'s " +
"capability($nodeTypeName) for NodeType ($capabilityName)'s requirement($requirementDefinitionName) "
)
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintPropertyDefinitionValidatorImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintPropertyDefinitionValidatorImpl.kt
similarity index 72%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintPropertyDefinitionValidatorImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintPropertyDefinitionValidatorImpl.kt
index 4d69d3a..5683c01 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintPropertyDefinitionValidatorImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintPropertyDefinitionValidatorImpl.kt
@@ -17,13 +17,13 @@
package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.format
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPropertyDefinitionValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
@@ -31,14 +31,14 @@
@Service("default-property-definition-validator")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintPropertyDefinitionValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) :
- BlueprintPropertyDefinitionValidator {
+open class BluePrintPropertyDefinitionValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) :
+ BluePrintPropertyDefinitionValidator {
- private val log = LoggerFactory.getLogger(BlueprintServiceTemplateValidatorImpl::class.toString())
+ private val log = LoggerFactory.getLogger(BluePrintServiceTemplateValidatorImpl::class.toString())
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
- override fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, propertyDefinition: PropertyDefinition) {
+ override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, propertyDefinition: PropertyDefinition) {
this.bluePrintRuntimeService = bluePrintRuntimeService
log.trace("Validating PropertyDefinition($name)")
@@ -46,15 +46,15 @@
val dataType: String = propertyDefinition.type
when {
- BlueprintTypes.validPrimitiveTypes().contains(dataType) -> {
+ BluePrintTypes.validPrimitiveTypes().contains(dataType) -> {
// Do Nothing
}
- BlueprintTypes.validComplexTypes().contains(dataType) -> {
+ BluePrintTypes.validComplexTypes().contains(dataType) -> {
// Do Nothing
}
- BlueprintTypes.validCollectionTypes().contains(dataType) -> {
+ BluePrintTypes.validCollectionTypes().contains(dataType) -> {
val entrySchemaType: String = propertyDefinition.entrySchema?.type
- ?: throw BlueprintException(format("Entry schema for DataType ({}) for the property ({}) not found", dataType, name))
+ ?: throw BluePrintException(format("Entry schema for DataType ({}) for the property ({}) not found", dataType, name))
checkPrimitiveOrComplex(entrySchemaType, name)
}
else -> checkPropertyDataType(dataType, name)
@@ -62,17 +62,17 @@
}
private fun checkPrimitiveOrComplex(dataType: String, propertyName: String): Boolean {
- if (BlueprintTypes.validPrimitiveTypes().contains(dataType) || checkDataType(dataType)) {
+ if (BluePrintTypes.validPrimitiveTypes().contains(dataType) || checkDataType(dataType)) {
return true
} else {
- throw BlueprintException(format("DataType({}) for the property({}) is not valid", dataType, propertyName))
+ throw BluePrintException(format("DataType({}) for the property({}) is not valid", dataType, propertyName))
}
}
private fun checkPropertyDataType(dataTypeName: String, propertyName: String) {
val dataType = bluePrintRuntimeService.bluePrintContext().serviceTemplate.dataTypes?.get(dataTypeName)
- ?: throw BlueprintException(format("DataType ({}) for the property ({}) not found", dataTypeName, propertyName))
+ ?: throw BluePrintException(format("DataType ({}) for the property ({}) not found", dataTypeName, propertyName))
checkValidDataTypeDerivedFrom(propertyName, dataType.derivedFrom)
}
@@ -82,8 +82,8 @@
}
open fun checkValidDataTypeDerivedFrom(dataTypeName: String, derivedFrom: String) {
- check(BlueprintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {
- throw BlueprintException(format("Failed to get DataType({})'s derivedFrom({}) definition ", dataTypeName, derivedFrom))
+ check(BluePrintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {
+ throw BluePrintException(format("Failed to get DataType({})'s derivedFrom({}) definition ", dataTypeName, derivedFrom))
}
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintServiceTemplateValidatorImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintServiceTemplateValidatorImpl.kt
similarity index 77%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintServiceTemplateValidatorImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintServiceTemplateValidatorImpl.kt
index 137e6e6..b01116f 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintServiceTemplateValidatorImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintServiceTemplateValidatorImpl.kt
@@ -18,16 +18,16 @@
import com.google.common.base.Preconditions
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintServiceTemplateValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintServiceTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
@@ -35,21 +35,21 @@
@Service("default-service-template-validator")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintServiceTemplateValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) :
- BlueprintServiceTemplateValidator {
+open class BluePrintServiceTemplateValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) :
+ BluePrintServiceTemplateValidator {
- private val log = LoggerFactory.getLogger(BlueprintServiceTemplateValidatorImpl::class.toString())
+ private val log = LoggerFactory.getLogger(BluePrintServiceTemplateValidatorImpl::class.toString())
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var error: BlueprintError
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var error: BluePrintError
var paths: MutableList<String> = arrayListOf()
- override fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, serviceTemplate: ServiceTemplate) {
+ override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, serviceTemplate: ServiceTemplate) {
log.trace("Validating Service Template..")
try {
this.bluePrintRuntimeService = bluePrintRuntimeService
- this.error = bluePrintRuntimeService.getBlueprintError()
+ this.error = bluePrintRuntimeService.getBluePrintError()
serviceTemplate.metadata?.let { validateMetadata(serviceTemplate.metadata!!) }
serviceTemplate.dataTypes?.let { validateDataTypes(serviceTemplate.dataTypes!!) }
@@ -58,18 +58,18 @@
serviceTemplate.topologyTemplate?.let { validateTopologyTemplate(serviceTemplate.topologyTemplate!!) }
} catch (e: Exception) {
log.error("failed in blueprint service template validation", e)
- error.addError(BlueprintConstants.PATH_SERVICE_TEMPLATE, paths.joinToString(BlueprintConstants.PATH_DIVIDER), e.message!!, "BlueprintServiceTemplateValidator")
+ error.addError(BluePrintConstants.PATH_SERVICE_TEMPLATE, paths.joinToString(BluePrintConstants.PATH_DIVIDER), e.message!!, "BlueprintServiceTemplateValidator")
}
}
fun validateMetadata(metaDataMap: MutableMap<String, String>) {
- paths.add(BlueprintConstants.PATH_METADATA)
+ paths.add(BluePrintConstants.PATH_METADATA)
- val templateName = metaDataMap[BlueprintConstants.METADATA_TEMPLATE_NAME]
- val templateVersion = metaDataMap[BlueprintConstants.METADATA_TEMPLATE_VERSION]
- val templateTags = metaDataMap[BlueprintConstants.METADATA_TEMPLATE_TAGS]
- val templateAuthor = metaDataMap[BlueprintConstants.METADATA_TEMPLATE_AUTHOR]
+ val templateName = metaDataMap[BluePrintConstants.METADATA_TEMPLATE_NAME]
+ val templateVersion = metaDataMap[BluePrintConstants.METADATA_TEMPLATE_VERSION]
+ val templateTags = metaDataMap[BluePrintConstants.METADATA_TEMPLATE_TAGS]
+ val templateAuthor = metaDataMap[BluePrintConstants.METADATA_TEMPLATE_AUTHOR]
Preconditions.checkArgument(StringUtils.isNotBlank(templateName), "failed to get template name metadata")
Preconditions.checkArgument(StringUtils.isNotBlank(templateVersion), "failed to get template version metadata")
@@ -81,7 +81,7 @@
fun validateDataTypes(dataTypes: MutableMap<String, DataType>) {
- paths.add(BlueprintConstants.PATH_DATA_TYPES)
+ paths.add(BluePrintConstants.PATH_DATA_TYPES)
dataTypes.forEach { dataTypeName, dataType ->
// Validate Single Data Type
bluePrintTypeValidatorService.validateDataType(bluePrintRuntimeService, dataTypeName, dataType)
@@ -90,7 +90,7 @@
}
fun validateArtifactTypes(artifactTypes: MutableMap<String, ArtifactType>) {
- paths.add(BlueprintConstants.PATH_ARTIFACT_TYPES)
+ paths.add(BluePrintConstants.PATH_ARTIFACT_TYPES)
artifactTypes.forEach { artifactName, artifactType ->
// Validate Single Artifact Type
bluePrintTypeValidatorService.validateArtifactType(bluePrintRuntimeService, artifactName, artifactType)
@@ -99,7 +99,7 @@
}
fun validateNodeTypes(nodeTypes: MutableMap<String, NodeType>) {
- paths.add(BlueprintConstants.PATH_NODE_TYPES)
+ paths.add(BluePrintConstants.PATH_NODE_TYPES)
nodeTypes.forEach { nodeTypeName, nodeType ->
// Validate Single Node Type
bluePrintTypeValidatorService.validateNodeType(bluePrintRuntimeService, nodeTypeName, nodeType)
@@ -108,7 +108,7 @@
}
fun validateTopologyTemplate(topologyTemplate: TopologyTemplate) {
- paths.add(BlueprintConstants.PATH_TOPOLOGY_TEMPLATE)
+ paths.add(BluePrintConstants.PATH_TOPOLOGY_TEMPLATE)
bluePrintTypeValidatorService.validateTopologyTemplate(bluePrintRuntimeService, "topologyTemplate", topologyTemplate)
paths.removeAt(paths.lastIndex)
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintTopologyTemplateValidatorImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintTopologyTemplateValidatorImpl.kt
similarity index 82%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintTopologyTemplateValidatorImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintTopologyTemplateValidatorImpl.kt
index d9bd516..a7fb3d5 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintTopologyTemplateValidatorImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintTopologyTemplateValidatorImpl.kt
@@ -17,14 +17,14 @@
package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTopologyTemplateValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTopologyTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
@@ -32,14 +32,14 @@
@Service("default-topology-template-validator")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintTopologyTemplateValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) :
- BlueprintTopologyTemplateValidator {
+open class BluePrintTopologyTemplateValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) :
+ BluePrintTopologyTemplateValidator {
- private val log = LoggerFactory.getLogger(BlueprintServiceTemplateValidatorImpl::class.toString())
+ private val log = LoggerFactory.getLogger(BluePrintServiceTemplateValidatorImpl::class.toString())
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
- override fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, topologyTemplate: TopologyTemplate) {
+ override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, topologyTemplate: TopologyTemplate) {
log.trace("Validating Topology Template..")
this.bluePrintRuntimeService = bluePrintRuntimeService
@@ -51,12 +51,12 @@
topologyTemplate.workflows?.let { validateWorkflows(topologyTemplate.workflows!!) }
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun validateInputs(inputs: MutableMap<String, PropertyDefinition>) {
bluePrintTypeValidatorService.validatePropertyDefinitions(bluePrintRuntimeService, inputs)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun validateNodeTemplates(nodeTemplates: MutableMap<String, NodeTemplate>) {
nodeTemplates.forEach { nodeTemplateName, nodeTemplate ->
@@ -65,7 +65,7 @@
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun validateWorkflows(workflows: MutableMap<String, Workflow>) {
workflows.forEach { workflowName, workflow ->
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintTypeValidatorServiceImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintTypeValidatorServiceImpl.kt
new file mode 100644
index 0000000..db7d91a
--- /dev/null
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintTypeValidatorServiceImpl.kt
@@ -0,0 +1,115 @@
+/*
+ * 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.
+ */
+
+package org.onap.ccsdk.cds.controllerblueprints.validation
+
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintDataTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintServiceTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTopologyTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowValidator
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.context.ApplicationContext
+import org.springframework.stereotype.Service
+
+@Service
+class BluePrintTypeValidatorServiceImpl : BluePrintTypeValidatorService {
+
+ companion object {
+
+ const val PREFIX_DEFAULT = "default"
+ }
+
+ @Autowired
+ private lateinit var context: ApplicationContext
+
+ override fun <T : BluePrintValidator<*>> bluePrintValidator(referenceName: String, classType: Class<T>): T? {
+ return if (context.containsBean(referenceName)) {
+ context.getBean(referenceName, classType)
+ } else {
+ null
+ }
+ }
+
+ override fun <T : BluePrintValidator<*>> bluePrintValidators(referenceNamePrefix: String, classType: Class<T>): List<T>? {
+ return context.getBeansOfType(classType)
+ .filter { it.key.startsWith(referenceNamePrefix) }
+ .mapNotNull { it.value }
+ }
+
+ override fun <T : BluePrintValidator<*>> bluePrintValidators(classType: Class<T>): List<T>? {
+ return context.getBeansOfType(classType).mapNotNull { it.value }
+ }
+
+ override fun getServiceTemplateValidators(): List<BluePrintServiceTemplateValidator> {
+ return bluePrintValidators(PREFIX_DEFAULT, BluePrintServiceTemplateValidator::class.java)
+ ?: throw BluePrintProcessorException("failed to get default ServiceTemplate validators")
+ }
+
+ override fun getDataTypeValidators(): List<BluePrintDataTypeValidator> {
+ return bluePrintValidators(PREFIX_DEFAULT, BluePrintDataTypeValidator::class.java)
+ ?: throw BluePrintProcessorException("failed to get default DataType validators")
+ }
+
+ override fun getArtifactTypeValidators(): List<BluePrintArtifactTypeValidator> {
+ return bluePrintValidators(PREFIX_DEFAULT, BluePrintArtifactTypeValidator::class.java)
+ ?: throw BluePrintProcessorException("failed to get default ArtifactType validators")
+ }
+
+ override fun getArtifactDefinitionsValidators(): List<BluePrintArtifactDefinitionValidator> {
+ return bluePrintValidators(PREFIX_DEFAULT, BluePrintArtifactDefinitionValidator::class.java)
+ ?: throw BluePrintProcessorException("failed to get default ArtifactDefinition validators")
+ }
+
+ override fun getNodeTypeValidators(): List<BluePrintNodeTypeValidator> {
+ return bluePrintValidators(PREFIX_DEFAULT, BluePrintNodeTypeValidator::class.java)
+ ?: throw BluePrintProcessorException("failed to get default NodeType validators")
+ }
+
+ override fun getTopologyTemplateValidators(): List<BluePrintTopologyTemplateValidator> {
+ return bluePrintValidators(PREFIX_DEFAULT, BluePrintTopologyTemplateValidator::class.java)
+ ?: throw BluePrintProcessorException("failed to get default TopologyTemplate validators")
+ }
+
+ override fun getNodeTemplateValidators(): List<BluePrintNodeTemplateValidator> {
+ return bluePrintValidators(PREFIX_DEFAULT, BluePrintNodeTemplateValidator::class.java)
+ ?: throw BluePrintProcessorException("failed to get default NodeTemplate validators")
+ }
+
+ override fun getWorkflowValidators(): List<BluePrintWorkflowValidator> {
+ return bluePrintValidators(PREFIX_DEFAULT, BluePrintWorkflowValidator::class.java)
+ ?: throw BluePrintProcessorException("failed to get default Workflow validators")
+ }
+
+ override fun getPropertyDefinitionValidators(): List<BluePrintPropertyDefinitionValidator> {
+ return bluePrintValidators(PREFIX_DEFAULT, BluePrintPropertyDefinitionValidator::class.java)
+ ?: throw BluePrintProcessorException("failed to get default PropertyDefinition validators")
+ }
+
+ override fun getAttributeDefinitionValidators(): List<BluePrintAttributeDefinitionValidator> {
+ return bluePrintValidators(PREFIX_DEFAULT, BluePrintAttributeDefinitionValidator::class.java)
+ ?: throw BluePrintProcessorException("failed to get default AttributeDefinition validators")
+ }
+}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintValidationConfiguration.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintValidationConfiguration.kt
similarity index 94%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintValidationConfiguration.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintValidationConfiguration.kt
index b4d2372..a1a9eb9 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintValidationConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintValidationConfiguration.kt
@@ -21,4 +21,4 @@
@Configuration
@ComponentScan
-open class BlueprintValidationConfiguration
+open class BluePrintValidationConfiguration
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintWorkflowValidatorImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
similarity index 79%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintWorkflowValidatorImpl.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
index bff09fc..21923d1 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintWorkflowValidatorImpl.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
@@ -17,11 +17,11 @@
package org.onap.ccsdk.cds.controllerblueprints.validation
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.validation.utils.PropertyAssignmentValidationUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
@@ -30,20 +30,20 @@
@Service("default-workflow-validator")
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintWorkflowValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) : BlueprintWorkflowValidator {
+open class BluePrintWorkflowValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) : BluePrintWorkflowValidator {
- private val log = LoggerFactory.getLogger(BlueprintServiceTemplateValidatorImpl::class.toString())
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ private val log = LoggerFactory.getLogger(BluePrintServiceTemplateValidatorImpl::class.toString())
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
var paths: MutableList<String> = arrayListOf()
- override fun validate(bluePrintRuntimeService: BlueprintRuntimeService<*>, workflowName: String, workflow: Workflow) {
+ override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, workflowName: String, workflow: Workflow) {
log.info("Validating Workflow($workflowName)")
this.bluePrintRuntimeService = bluePrintRuntimeService
paths.add(workflowName)
- paths.joinToString(BlueprintConstants.PATH_DIVIDER)
+ paths.joinToString(BluePrintConstants.PATH_DIVIDER)
// Validate Workflow Inputs
validateInputs(workflow)
@@ -55,7 +55,7 @@
paths.add("steps")
workflow.steps?.forEach { stepName, step ->
paths.add(stepName)
- paths.joinToString(BlueprintConstants.PATH_DIVIDER)
+ paths.joinToString(BluePrintConstants.PATH_DIVIDER)
// Validate target
step.target?.let {
@@ -65,18 +65,18 @@
val nodeTypeDerivedFrom = bluePrintRuntimeService.bluePrintContext().nodeTemplateNodeType(it).derivedFrom
check(
- nodeTypeDerivedFrom == BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW ||
- nodeTypeDerivedFrom == BlueprintConstants.MODEL_TYPE_NODE_COMPONENT
+ nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW ||
+ nodeTypeDerivedFrom == BluePrintConstants.MODEL_TYPE_NODE_COMPONENT
) {
"NodeType(${nodeTemplate.type}) derived from is '$nodeTypeDerivedFrom', Expected " +
- "'${BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW}' or '${BlueprintConstants.MODEL_TYPE_NODE_COMPONENT}'"
+ "'${BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW}' or '${BluePrintConstants.MODEL_TYPE_NODE_COMPONENT}'"
}
} catch (e: Exception) {
- bluePrintRuntimeService.getBlueprintError()
+ bluePrintRuntimeService.getBluePrintError()
.addError(
"Failed to validate Workflow($workflowName)'s step($stepName)'s " +
"definition",
- paths.joinToString(BlueprintConstants.PATH_DIVIDER), e.message!!,
+ paths.joinToString(BluePrintConstants.PATH_DIVIDER), e.message!!,
"BlueprintWorkflowValidatorImpl"
)
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintTypeValidatorServiceImpl.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintTypeValidatorServiceImpl.kt
deleted file mode 100644
index 4e5f0da..0000000
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintTypeValidatorServiceImpl.kt
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.
- */
-
-package org.onap.ccsdk.cds.controllerblueprints.validation
-
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactDefinitionValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintAttributeDefinitionValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintDataTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTemplateValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPropertyDefinitionValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintServiceTemplateValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTopologyTemplateValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowValidator
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.context.ApplicationContext
-import org.springframework.stereotype.Service
-
-@Service
-class BlueprintTypeValidatorServiceImpl : BlueprintTypeValidatorService {
-
- companion object {
-
- const val PREFIX_DEFAULT = "default"
- }
-
- @Autowired
- private lateinit var context: ApplicationContext
-
- override fun <T : BlueprintValidator<*>> bluePrintValidator(referenceName: String, classType: Class<T>): T? {
- return if (context.containsBean(referenceName)) {
- context.getBean(referenceName, classType)
- } else {
- null
- }
- }
-
- override fun <T : BlueprintValidator<*>> bluePrintValidators(referenceNamePrefix: String, classType: Class<T>): List<T>? {
- return context.getBeansOfType(classType)
- .filter { it.key.startsWith(referenceNamePrefix) }
- .mapNotNull { it.value }
- }
-
- override fun <T : BlueprintValidator<*>> bluePrintValidators(classType: Class<T>): List<T>? {
- return context.getBeansOfType(classType).mapNotNull { it.value }
- }
-
- override fun getServiceTemplateValidators(): List<BlueprintServiceTemplateValidator> {
- return bluePrintValidators(PREFIX_DEFAULT, BlueprintServiceTemplateValidator::class.java)
- ?: throw BlueprintProcessorException("failed to get default ServiceTemplate validators")
- }
-
- override fun getDataTypeValidators(): List<BlueprintDataTypeValidator> {
- return bluePrintValidators(PREFIX_DEFAULT, BlueprintDataTypeValidator::class.java)
- ?: throw BlueprintProcessorException("failed to get default DataType validators")
- }
-
- override fun getArtifactTypeValidators(): List<BlueprintArtifactTypeValidator> {
- return bluePrintValidators(PREFIX_DEFAULT, BlueprintArtifactTypeValidator::class.java)
- ?: throw BlueprintProcessorException("failed to get default ArtifactType validators")
- }
-
- override fun getArtifactDefinitionsValidators(): List<BlueprintArtifactDefinitionValidator> {
- return bluePrintValidators(PREFIX_DEFAULT, BlueprintArtifactDefinitionValidator::class.java)
- ?: throw BlueprintProcessorException("failed to get default ArtifactDefinition validators")
- }
-
- override fun getNodeTypeValidators(): List<BlueprintNodeTypeValidator> {
- return bluePrintValidators(PREFIX_DEFAULT, BlueprintNodeTypeValidator::class.java)
- ?: throw BlueprintProcessorException("failed to get default NodeType validators")
- }
-
- override fun getTopologyTemplateValidators(): List<BlueprintTopologyTemplateValidator> {
- return bluePrintValidators(PREFIX_DEFAULT, BlueprintTopologyTemplateValidator::class.java)
- ?: throw BlueprintProcessorException("failed to get default TopologyTemplate validators")
- }
-
- override fun getNodeTemplateValidators(): List<BlueprintNodeTemplateValidator> {
- return bluePrintValidators(PREFIX_DEFAULT, BlueprintNodeTemplateValidator::class.java)
- ?: throw BlueprintProcessorException("failed to get default NodeTemplate validators")
- }
-
- override fun getWorkflowValidators(): List<BlueprintWorkflowValidator> {
- return bluePrintValidators(PREFIX_DEFAULT, BlueprintWorkflowValidator::class.java)
- ?: throw BlueprintProcessorException("failed to get default Workflow validators")
- }
-
- override fun getPropertyDefinitionValidators(): List<BlueprintPropertyDefinitionValidator> {
- return bluePrintValidators(PREFIX_DEFAULT, BlueprintPropertyDefinitionValidator::class.java)
- ?: throw BlueprintProcessorException("failed to get default PropertyDefinition validators")
- }
-
- override fun getAttributeDefinitionValidators(): List<BlueprintAttributeDefinitionValidator> {
- return bluePrintValidators(PREFIX_DEFAULT, BlueprintAttributeDefinitionValidator::class.java)
- ?: throw BlueprintProcessorException("failed to get default AttributeDefinition validators")
- }
-}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/extension/ArtifactMappingResourceValidator.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/extension/ArtifactMappingResourceValidator.kt
index d7dcd97..78a5d37 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/extension/ArtifactMappingResourceValidator.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/extension/ArtifactMappingResourceValidator.kt
@@ -17,9 +17,9 @@
package org.onap.ccsdk.cds.controllerblueprints.validation.extension
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactDefinitionValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.service.ResourceAssignmentValidationServiceImpl
@@ -28,13 +28,13 @@
import java.io.File
@Service("artifact-mapping-resource-artifact-definition-validator")
-open class ArtifactMappingResourceValidator(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) :
- BlueprintArtifactDefinitionValidator {
+open class ArtifactMappingResourceValidator(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) :
+ BluePrintArtifactDefinitionValidator {
private val log = LoggerFactory.getLogger(ArtifactMappingResourceValidator::class.toString())
override fun validate(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
artifactDefinition: ArtifactDefinition
) {
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/extension/ResourceDefinitionValidation.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/extension/ResourceDefinitionValidation.kt
index 044c529..dc5da26 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/extension/ResourceDefinitionValidation.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/extension/ResourceDefinitionValidation.kt
@@ -16,25 +16,25 @@
package org.onap.ccsdk.cds.controllerblueprints.validation.extension
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
-interface ResourceDefinitionValidator : BlueprintValidator<ResourceDefinition>
+interface ResourceDefinitionValidator : BluePrintValidator<ResourceDefinition>
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class ResourceDefinitionValidatorImpl(private val bluePrintTypeValidatorService: BlueprintTypeValidatorService) : ResourceDefinitionValidator {
+open class ResourceDefinitionValidatorImpl(private val bluePrintTypeValidatorService: BluePrintTypeValidatorService) : ResourceDefinitionValidator {
private val log = LoggerFactory.getLogger(ResourceDefinitionValidatorImpl::class.java)
override fun validate(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
resourceDefinition: ResourceDefinition
) {
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/utils/PropertyAssignmentValidationUtils.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/utils/PropertyAssignmentValidationUtils.kt
index 91d01c6..63aa7e5 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/utils/PropertyAssignmentValidationUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/utils/PropertyAssignmentValidationUtils.kt
@@ -18,15 +18,15 @@
package org.onap.ccsdk.cds.controllerblueprints.validation.utils
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.format
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintExpressionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintExpressionService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
-open class PropertyAssignmentValidationUtils(private val bluePrintContext: BlueprintContext) {
+open class PropertyAssignmentValidationUtils(private val bluePrintContext: BluePrintContext) {
// Property Definition holds both Definitons and Expression in same construct
open fun validatePropertyDefinitionNAssignments(propertyDefinitions: MutableMap<String, PropertyDefinition>) {
@@ -39,10 +39,10 @@
open fun validatePropertyDefinitionNAssignment(propertyName: String, propertyDefinition: PropertyDefinition) {
// Check and Validate if Expression Node
checkNotNull(propertyDefinition.value) {
- throw BlueprintException("couldn't get 'value' property from PropertyDefinition($propertyName)")
+ throw BluePrintException("couldn't get 'value' property from PropertyDefinition($propertyName)")
}
val propertyAssignment = propertyDefinition.value!!
- val expressionData = BlueprintExpressionService.getExpressionData(propertyAssignment)
+ val expressionData = BluePrintExpressionService.getExpressionData(propertyAssignment)
if (!expressionData.isExpression) {
checkPropertyValue(propertyName, propertyDefinition, propertyAssignment)
}
@@ -54,7 +54,7 @@
) {
properties.forEach { propertyName, propertyAssignment ->
val propertyDefinition: PropertyDefinition = nodeTypeProperties[propertyName]
- ?: throw BlueprintException("validatePropertyAssignments failed to get definition for the property ($propertyName)")
+ ?: throw BluePrintException("validatePropertyAssignments failed to get definition for the property ($propertyName)")
validatePropertyAssignment(propertyName, propertyDefinition, propertyAssignment)
}
@@ -66,7 +66,7 @@
propertyAssignment: JsonNode
) {
// Check and Validate if Expression Node
- val expressionData = BlueprintExpressionService.getExpressionData(propertyAssignment)
+ val expressionData = BluePrintExpressionService.getExpressionData(propertyAssignment)
if (!expressionData.isExpression) {
checkPropertyValue(propertyName, propertyDefinition, propertyAssignment)
}
@@ -76,16 +76,16 @@
val propertyType = propertyDefinition.type
val isValid: Boolean
- if (BlueprintTypes.validPrimitiveTypes().contains(propertyType)) {
+ if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)) {
isValid = JacksonUtils.checkJsonNodeValueOfPrimitiveType(propertyType, propertyAssignment)
- } else if (BlueprintTypes.validComplexTypes().contains(propertyType)) {
+ } else if (BluePrintTypes.validComplexTypes().contains(propertyType)) {
isValid = true
- } else if (BlueprintTypes.validCollectionTypes().contains(propertyType)) {
+ } else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
val entrySchemaType = propertyDefinition.entrySchema?.type
- ?: throw BlueprintException(format("Failed to get EntrySchema type for the collection property ({})", propertyName))
+ ?: throw BluePrintException(format("Failed to get EntrySchema type for the collection property ({})", propertyName))
- if (!BlueprintTypes.validPropertyTypes().contains(entrySchemaType)) {
+ if (!BluePrintTypes.validPropertyTypes().contains(entrySchemaType)) {
checkPropertyDataType(entrySchemaType, propertyName)
}
isValid = JacksonUtils.checkJsonNodeValueOfCollectionType(propertyType, propertyAssignment)
@@ -95,21 +95,21 @@
}
check(isValid) {
- throw BlueprintException("property($propertyName) defined of type($propertyType) is not compatible with the value ($propertyAssignment)")
+ throw BluePrintException("property($propertyName) defined of type($propertyType) is not compatible with the value ($propertyAssignment)")
}
}
open fun checkPropertyDataType(dataTypeName: String, propertyName: String) {
val dataType = bluePrintContext.serviceTemplate.dataTypes?.get(dataTypeName)
- ?: throw BlueprintException("DataType ($dataTypeName) for the property ($propertyName) not found")
+ ?: throw BluePrintException("DataType ($dataTypeName) for the property ($propertyName) not found")
checkValidDataTypeDerivedFrom(propertyName, dataType.derivedFrom)
}
open fun checkValidDataTypeDerivedFrom(dataTypeName: String, derivedFrom: String) {
- check(BlueprintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {
- throw BlueprintException("Failed to get DataType($dataTypeName)'s derivedFrom($derivedFrom) definition ")
+ check(BluePrintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {
+ throw BluePrintException("Failed to get DataType($dataTypeName)'s derivedFrom($derivedFrom) definition ")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt
similarity index 78%
rename from ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorServiceTest.kt
rename to ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt
index dd82ec5..fd39f8f 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintDesignTimeValidatorServiceTest.kt
@@ -21,34 +21,34 @@
import io.mockk.mockk
import kotlinx.coroutines.runBlocking
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.Step
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.validation.extension.ResourceDefinitionValidator
import kotlin.test.assertEquals
import kotlin.test.assertTrue
-class BlueprintDesignTimeValidatorServiceTest {
+class BluePrintDesignTimeValidatorServiceTest {
private val blueprintBasePath = "./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
- private val bluePrintRuntime = BlueprintMetadataUtils.bluePrintRuntime("1234", blueprintBasePath)
- private val mockBlueprintTypeValidatorService = MockBlueprintTypeValidatorService()
+ private val bluePrintRuntime = BluePrintMetadataUtils.bluePrintRuntime("1234", blueprintBasePath)
+ private val mockBluePrintTypeValidatorService = MockBluePrintTypeValidatorService()
private val resourceDefinitionValidator = mockk<ResourceDefinitionValidator>()
- private val defaultBlueprintValidatorService =
- BlueprintDesignTimeValidatorService(mockBlueprintTypeValidatorService, resourceDefinitionValidator)
- private val workflowValidator = BlueprintWorkflowValidatorImpl(mockBlueprintTypeValidatorService)
+ private val defaultBluePrintValidatorService =
+ BluePrintDesignTimeValidatorService(mockBluePrintTypeValidatorService, resourceDefinitionValidator)
+ private val workflowValidator = BluePrintWorkflowValidatorImpl(mockBluePrintTypeValidatorService)
@Test
fun testValidateOfType() {
runBlocking {
every { resourceDefinitionValidator.validate(bluePrintRuntime, any(), any()) } returns Unit
- val valid = defaultBlueprintValidatorService.validateBlueprints(bluePrintRuntime)
+ val valid = defaultBluePrintValidatorService.validateBluePrints(bluePrintRuntime)
assertTrue(valid, "failed in blueprint Validation")
}
}
@@ -63,10 +63,10 @@
workflow.steps = mutableMapOf("test" to step)
workflowValidator.validate(bluePrintRuntime, workflowName, workflow)
- assertEquals(1, bluePrintRuntime.getBlueprintError().allErrors().size)
+ assertEquals(1, bluePrintRuntime.getBluePrintError().allErrors().size)
assertEquals(
"Failed to validate Workflow(resource-assignment)'s step(test)'s definition : resource-assignment/steps/test : could't get node template for the name(TestCaseFailNoNodeTemplate)",
- bluePrintRuntime.getBlueprintError().allErrors()[0]
+ bluePrintRuntime.getBluePrintError().allErrors()[0]
)
}
@@ -81,13 +81,13 @@
val nodeType = mockk<NodeType>()
every { nodeType.derivedFrom } returns "tosca.nodes.TEST"
- val blueprintContext = mockk<BlueprintContext>()
+ val blueprintContext = mockk<BluePrintContext>()
every { blueprintContext.nodeTemplateByName(nodeTemplateName) } returns nodeTemplate
every { blueprintContext.nodeTemplateNodeType(nodeTemplateName) } returns nodeType
- val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("1234")
+ val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("1234")
- every { bluePrintRuntime.getBlueprintError() } returns BlueprintError()
+ every { bluePrintRuntime.getBluePrintError() } returns BluePrintError()
every { bluePrintRuntime.bluePrintContext() } returns blueprintContext
val step = Step()
@@ -96,12 +96,12 @@
workflow.steps = mutableMapOf("test" to step)
workflowValidator.validate(bluePrintRuntime, workflowName, workflow)
- assertEquals(1, bluePrintRuntime.getBlueprintError().allErrors().size)
+ assertEquals(1, bluePrintRuntime.getBluePrintError().allErrors().size)
assertEquals(
"Failed to validate Workflow(resource-assignment)'s step(test)'s definition : " +
"resource-assignment/steps/test : NodeType(TestNodeType) derived from is 'tosca.nodes.TEST', " +
"Expected 'tosca.nodes.Workflow' or 'tosca.nodes.Component'",
- bluePrintRuntime.getBlueprintError().allErrors()[0]
+ bluePrintRuntime.getBluePrintError().allErrors()[0]
)
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/MockBluePrintTypeValidatorService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/MockBluePrintTypeValidatorService.kt
new file mode 100644
index 0000000..11c6c03
--- /dev/null
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/MockBluePrintTypeValidatorService.kt
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+package org.onap.ccsdk.cds.controllerblueprints.validation
+
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintDataTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTypeValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintServiceTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTopologyTemplateValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidator
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowValidator
+
+class MockBluePrintTypeValidatorService : BluePrintTypeValidatorService {
+
+ override fun <T : BluePrintValidator<*>> bluePrintValidator(referenceName: String, classType: Class<T>): T? {
+ return null
+ }
+
+ override fun <T : BluePrintValidator<*>> bluePrintValidators(referenceNamePrefix: String, classType: Class<T>): List<T>? {
+ return null
+ }
+
+ override fun <T : BluePrintValidator<*>> bluePrintValidators(classType: Class<T>): List<T>? {
+ return null
+ }
+
+ override fun getServiceTemplateValidators(): List<BluePrintServiceTemplateValidator> {
+ return listOf(BluePrintServiceTemplateValidatorImpl(this))
+ }
+
+ override fun getDataTypeValidators(): List<BluePrintDataTypeValidator> {
+ return listOf(BluePrintDataTypeValidatorImpl(this))
+ }
+
+ override fun getArtifactTypeValidators(): List<BluePrintArtifactTypeValidator> {
+ return listOf(BluePrintArtifactTypeValidatorImpl(this))
+ }
+
+ override fun getArtifactDefinitionsValidators(): List<BluePrintArtifactDefinitionValidator> {
+ return listOf(BluePrintArtifactDefinitionValidatorImpl(this))
+ }
+
+ override fun getNodeTypeValidators(): List<BluePrintNodeTypeValidator> {
+ return listOf(BluePrintNodeTypeValidatorImpl(this))
+ }
+
+ override fun getTopologyTemplateValidators(): List<BluePrintTopologyTemplateValidator> {
+ return listOf(BluePrintTopologyTemplateValidatorImpl(this))
+ }
+
+ override fun getNodeTemplateValidators(): List<BluePrintNodeTemplateValidator> {
+ return listOf(BluePrintNodeTemplateValidatorImpl(this))
+ }
+
+ override fun getWorkflowValidators(): List<BluePrintWorkflowValidator> {
+ return listOf(BluePrintWorkflowValidatorImpl(this))
+ }
+
+ override fun getPropertyDefinitionValidators(): List<BluePrintPropertyDefinitionValidator> {
+ return listOf(BluePrintPropertyDefinitionValidatorImpl(this))
+ }
+
+ override fun getAttributeDefinitionValidators(): List<BluePrintAttributeDefinitionValidator> {
+ return listOf(BluePrintAttributeDefinitionValidatorImpl(this))
+ }
+}
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/MockBlueprintTypeValidatorService.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/MockBlueprintTypeValidatorService.kt
deleted file mode 100644
index 69f57a0..0000000
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/MockBlueprintTypeValidatorService.kt
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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.
- */
-
-package org.onap.ccsdk.cds.controllerblueprints.validation
-
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactDefinitionValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintAttributeDefinitionValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintDataTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTemplateValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPropertyDefinitionValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintServiceTemplateValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTopologyTemplateValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowValidator
-
-class MockBlueprintTypeValidatorService : BlueprintTypeValidatorService {
-
- override fun <T : BlueprintValidator<*>> bluePrintValidator(referenceName: String, classType: Class<T>): T? {
- return null
- }
-
- override fun <T : BlueprintValidator<*>> bluePrintValidators(referenceNamePrefix: String, classType: Class<T>): List<T>? {
- return null
- }
-
- override fun <T : BlueprintValidator<*>> bluePrintValidators(classType: Class<T>): List<T>? {
- return null
- }
-
- override fun getServiceTemplateValidators(): List<BlueprintServiceTemplateValidator> {
- return listOf(BlueprintServiceTemplateValidatorImpl(this))
- }
-
- override fun getDataTypeValidators(): List<BlueprintDataTypeValidator> {
- return listOf(BlueprintDataTypeValidatorImpl(this))
- }
-
- override fun getArtifactTypeValidators(): List<BlueprintArtifactTypeValidator> {
- return listOf(BlueprintArtifactTypeValidatorImpl(this))
- }
-
- override fun getArtifactDefinitionsValidators(): List<BlueprintArtifactDefinitionValidator> {
- return listOf(BlueprintArtifactDefinitionValidatorImpl(this))
- }
-
- override fun getNodeTypeValidators(): List<BlueprintNodeTypeValidator> {
- return listOf(BlueprintNodeTypeValidatorImpl(this))
- }
-
- override fun getTopologyTemplateValidators(): List<BlueprintTopologyTemplateValidator> {
- return listOf(BlueprintTopologyTemplateValidatorImpl(this))
- }
-
- override fun getNodeTemplateValidators(): List<BlueprintNodeTemplateValidator> {
- return listOf(BlueprintNodeTemplateValidatorImpl(this))
- }
-
- override fun getWorkflowValidators(): List<BlueprintWorkflowValidator> {
- return listOf(BlueprintWorkflowValidatorImpl(this))
- }
-
- override fun getPropertyDefinitionValidators(): List<BlueprintPropertyDefinitionValidator> {
- return listOf(BlueprintPropertyDefinitionValidatorImpl(this))
- }
-
- override fun getAttributeDefinitionValidators(): List<BlueprintAttributeDefinitionValidator> {
- return listOf(BlueprintAttributeDefinitionValidatorImpl(this))
- }
-}
diff --git a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactory.kt b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactory.kt
index e6a0ab6..f8dea98 100644
--- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactory.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactory.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.controllerblueprints.resource.dict.factory
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.format
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceSourceMapping
@@ -35,7 +35,7 @@
fun getRegisterSourceMapping(sourceInstance: String): String {
return resourceSourceMappings[sourceInstance]
- ?: throw BlueprintException(format("failed to get source({}) mapping", sourceInstance))
+ ?: throw BluePrintException(format("failed to get source({}) mapping", sourceInstance))
}
fun getRegisterSourceMapping(): ResourceSourceMapping {
diff --git a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt
index e5d9f5f..b97492d 100644
--- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationService.kt
@@ -20,7 +20,7 @@
import org.apache.commons.collections.CollectionUtils
import org.apache.commons.lang3.StringUtils
import org.apache.commons.lang3.text.StrBuilder
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.TopologicalSortingUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.slf4j.LoggerFactory
@@ -33,7 +33,7 @@
*/
interface ResourceAssignmentValidationService : Serializable {
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun validate(resourceAssignments: List<ResourceAssignment>): Boolean
}
@@ -54,10 +54,10 @@
validateTemplateNDictionaryKeys(resourceAssignments)
validateCyclicDependency(resourceAssignments)
if (StringUtils.isNotBlank(validationMessage)) {
- throw BlueprintException("Resource Assignment Validation Failure")
+ throw BluePrintException("Resource Assignment Validation Failure")
}
} catch (e: Exception) {
- throw BlueprintException("Resource Assignment Validation :" + validationMessage.toString(), e)
+ throw BluePrintException("Resource Assignment Validation :" + validationMessage.toString(), e)
}
return true
}
@@ -85,7 +85,7 @@
}
if (StringUtils.isNotBlank(validationMessage)) {
- throw BlueprintException("Resource Assignment Validation Failure")
+ throw BluePrintException("Resource Assignment Validation Failure")
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtils.kt b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtils.kt
index 7da46f5..5117c43 100644
--- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/BulkResourceSequencingUtils.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils
import org.apache.commons.collections.CollectionUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asListOfString
import org.onap.ccsdk.cds.controllerblueprints.core.utils.TopologicalSortingUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -60,7 +60,7 @@
} else if (CollectionUtils.isNotEmpty(resourceAssignment.dependencies)) {
for (dependency in resourceAssignment.dependencies!!) {
val ra = resourceAssignmentMap[dependency]
- ?: throw BlueprintProcessorException(
+ ?: throw BluePrintProcessorException(
"Couldn't get Resource Assignment dependency " +
"Key($dependency)"
)
diff --git a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtils.kt b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtils.kt
index 3833cbe..c09474a 100644
--- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtils.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtils.kt
@@ -20,10 +20,10 @@
import com.fasterxml.jackson.databind.node.NullNode
import org.apache.commons.collections.MapUtils
import org.apache.commons.lang3.StringUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
@@ -75,7 +75,7 @@
data.fields().forEach { field ->
val valueNode: JsonNode = data.at("/".plus(field.key)) ?: NullNode.getInstance()
- val path = BlueprintConstants.PATH_INPUTS.plus(BlueprintConstants.PATH_DIVIDER).plus(field.key)
+ val path = BluePrintConstants.PATH_INPUTS.plus(BluePrintConstants.PATH_DIVIDER).plus(field.key)
log.trace("setting path ({}), values ({})", path, valueNode)
context[path] = valueNode
}
@@ -83,7 +83,7 @@
fun getResourceAssignmentFromFile(filePath: String): List<ResourceAssignment> {
return JacksonUtils.getListFromFile(filePath, ResourceAssignment::class.java)
- ?: throw BlueprintProcessorException("couldn't get ResourceAssignment definitions for the file($filePath)")
+ ?: throw BluePrintProcessorException("couldn't get ResourceAssignment definitions for the file($filePath)")
}
fun writeResourceDefinitionTypes(basePath: String, resourceDefinitions: List<ResourceDefinition>) {
@@ -92,9 +92,9 @@
}
fun writeResourceDefinitionTypes(basePath: String, resourceDefinitionMap: Map<String, ResourceDefinition>) {
- val typePath = basePath.plus(File.separator).plus(BlueprintConstants.TOSCA_DEFINITIONS_DIR)
+ val typePath = basePath.plus(File.separator).plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR)
.plus(File.separator).plus("${ResourceDictionaryConstants.PATH_RESOURCE_DEFINITION_TYPE}.json")
val resourceDefinitionContent = JacksonUtils.getJson(resourceDefinitionMap.toSortedMap(), true)
- BlueprintFileUtils.writeDefinitionFile(typePath, resourceDefinitionContent)
+ BluePrintFileUtils.writeDefinitionFile(typePath, resourceDefinitionContent)
}
}
diff --git a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt
index af06077..66df507 100644
--- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/service/ResourceAssignmentValidationServiceTest.kt
@@ -19,7 +19,7 @@
import org.junit.Assert
import org.junit.Before
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryTestUtils
@@ -49,7 +49,7 @@
Assert.assertTrue("Failed to Validate", result)
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testValidateDuplicate() {
log.info(" **************** testValidateDuplicate *****************")
val assignments = JacksonUtils.getListFromClassPathFile("validation/duplicate.json", ResourceAssignment::class.java)
@@ -57,7 +57,7 @@
resourceAssignmentValidator.validate(assignments!!)
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun testValidateCyclic() {
log.info(" **************** testValidateCyclic *****************")
val assignments = JacksonUtils.getListFromClassPathFile("validation/cyclic.json", ResourceAssignment::class.java)
diff --git a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
index 79f21cf..862f189 100644
--- a/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
+++ b/ms/blueprintsprocessor/modules/blueprints/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java
@@ -20,7 +20,7 @@
import com.fasterxml.jackson.databind.JsonNode;
import org.junit.Assert;
import org.junit.Test;
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants;
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants;
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate;
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils;
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment;
@@ -93,7 +93,7 @@
JsonNode data = JacksonUtils.Companion.jsonNodeFromClassPathFile("data/resource-assignment-input.json");
Map<String, Object> context = new HashMap<>();
ResourceDictionaryUtils.assignInputs(data, context);
- String path = BlueprintConstants.PATH_INPUTS.concat(BlueprintConstants.PATH_DIVIDER).concat("mapValue");
+ String path = BluePrintConstants.PATH_INPUTS.concat(BluePrintConstants.PATH_DIVIDER).concat("mapValue");
log.info("populated context {}", context);
Assert.assertTrue(String.format("failed to get variable : %s", path), context.containsKey(path));
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt
similarity index 78%
rename from ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibConfiguration.kt
rename to ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt
index f11832b..d4b3f80 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibConfiguration.kt
@@ -16,11 +16,11 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BlueprintDBLibPropertyService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.BluePrintDBLibPropertyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -30,12 +30,12 @@
@Configuration
@Import(
- BlueprintPropertyConfiguration::class,
- BlueprintPropertiesService::class,
- BlueprintCoreConfiguration::class
+ BluePrintPropertyConfiguration::class,
+ BluePrintPropertiesService::class,
+ BluePrintCoreConfiguration::class
)
@EnableConfigurationProperties
-open class BlueprintDBLibConfiguration(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintDBLibConfiguration(private var bluePrintPropertiesService: BluePrintPropertiesService) {
@Bean("primary-database-properties")
open fun getPrimaryProperties(): PrimaryDataSourceProperties {
@@ -54,10 +54,10 @@
/**
* Exposed Dependency Service by this SSH Lib Module
*/
-fun BlueprintDependencyService.dbLibPropertyService(): BlueprintDBLibPropertyService =
- instance(BlueprintDBLibPropertyService::class)
+fun BluePrintDependencyService.dbLibPropertyService(): BluePrintDBLibPropertyService =
+ instance(BluePrintDBLibPropertyService::class)
-fun BlueprintDependencyService.primaryDBLibGenericService(): BlueprintDBLibGenericService =
+fun BluePrintDependencyService.primaryDBLibGenericService(): BluePrintDBLibGenericService =
instance(PrimaryDBLibGenericService::class)
class DBLibConstants {
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibData.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibData.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibData.kt
rename to ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibGenericService.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibGenericService.kt
similarity index 95%
rename from ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibGenericService.kt
rename to ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibGenericService.kt
index 6c38237..aeb87fd 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintDBLibGenericService.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BluePrintDBLibGenericService.kt
@@ -18,7 +18,7 @@
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
-interface BlueprintDBLibGenericService {
+interface BluePrintDBLibGenericService {
fun namedParameterJdbcTemplate(): NamedParameterJdbcTemplate
@@ -28,7 +28,7 @@
}
abstract class AbstractDBLibGenericService(private val namedParameterJdbcTemplate: NamedParameterJdbcTemplate) :
- BlueprintDBLibGenericService {
+ BluePrintDBLibGenericService {
override fun namedParameterJdbcTemplate(): NamedParameterJdbcTemplate {
return namedParameterJdbcTemplate
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt
index fd51da1..34dd0a4 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,25 +30,25 @@
/** Relationships Types DSL for Database Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToDb() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToDb()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToDb()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToDb(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToDb(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through Database."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -66,25 +66,25 @@
class DbRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB, description
) {
fun mariaDb(block: DbMariaDataSourcePropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.mariaDbProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.mariaDbProperties(block))
}
fun mySqlDb(block: DbMySqlDataSourcePropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.mySqlDbProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.mySqlDbProperties(block))
}
}
-fun BlueprintTypes.mariaDbProperties(block: DbMariaDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.mariaDbProperties(block: DbMariaDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = DbMariaDataSourcePropertiesAssignmentBuilder().apply(block).build()
assignments[DBDataSourceProperties::type.name] = DBLibConstants.MARIA_DB.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.mySqlDbProperties(block: DbMySqlDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.mySqlDbProperties(block: DbMySqlDataSourcePropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = DbMySqlDataSourcePropertiesAssignmentBuilder().apply(block).build()
assignments[DBDataSourceProperties::type.name] = DBLibConstants.MYSQL_DB.asJsonPrimitive()
return assignments.asJsonNode()
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BlueprintDBLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt
similarity index 84%
rename from ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BlueprintDBLibPropertyService.kt
rename to ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt
index b272a97..79f5c09 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BlueprintDBLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/BluePrintDBLibPropertyService.kt
@@ -17,25 +17,25 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.DBDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.DBLibConstants.Companion.MARIA_DB
import org.onap.ccsdk.cds.blueprintsprocessor.db.DBLibConstants.Companion.MYSQL_DB
import org.onap.ccsdk.cds.blueprintsprocessor.db.DBLibConstants.Companion.PROCESSOR_DB
import org.onap.ccsdk.cds.blueprintsprocessor.db.MariaDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.MySqlDataSourceProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service
-class BlueprintDBLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+class BluePrintDBLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
- fun JdbcTemplate(jsonNode: JsonNode): BlueprintDBLibGenericService =
+ fun JdbcTemplate(jsonNode: JsonNode): BluePrintDBLibGenericService =
blueprintDBDataSourceService(dBDataSourceProperties(jsonNode))
- fun JdbcTemplate(selector: String): BlueprintDBLibGenericService =
+ fun JdbcTemplate(selector: String): BluePrintDBLibGenericService =
blueprintDBDataSourceService(dBDataSourceProperties("blueprintsprocessor.db.$selector"))
private fun dBDataSourceProperties(jsonNode: JsonNode): DBDataSourceProperties =
@@ -43,7 +43,7 @@
MYSQL_DB -> JacksonUtils.readValue(jsonNode, MySqlDataSourceProperties::class.java)
MARIA_DB -> JacksonUtils.readValue(jsonNode, MariaDataSourceProperties::class.java)
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"DB type ($type) is not supported. Valid types: $MARIA_DB, $MYSQL_DB"
)
}
@@ -55,18 +55,18 @@
MARIA_DB, PROCESSOR_DB -> mariaDBConnectionProperties(prefix)
MYSQL_DB -> mySqlDBConnectionProperties(prefix)
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"DB type ($it) is not supported. Valid types: $MARIA_DB, $MYSQL_DB, $PROCESSOR_DB"
)
}
}
}
- private fun blueprintDBDataSourceService(dBConnetionProperties: DBDataSourceProperties): BlueprintDBLibGenericService =
+ private fun blueprintDBDataSourceService(dBConnetionProperties: DBDataSourceProperties): BluePrintDBLibGenericService =
when (dBConnetionProperties) {
is MariaDataSourceProperties -> MariaDatabaseConfiguration(dBConnetionProperties)
is MySqlDataSourceProperties -> MySqlDatabaseConfiguration(dBConnetionProperties)
- else -> throw BlueprintProcessorException(
+ else -> throw BluePrintProcessorException(
"Failed to create db configuration for ${dBConnetionProperties.url}"
)
}
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt
index 6132190..8289525 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MariaDatabaseConfiguration.kt
@@ -16,14 +16,14 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.MariaDataSourceProperties
import org.slf4j.LoggerFactory
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
import org.springframework.jdbc.datasource.DriverManagerDataSource
import javax.sql.DataSource
-class MariaDatabaseConfiguration(private val mariaDataSourceProperties: MariaDataSourceProperties) : BlueprintDBLibGenericService {
+class MariaDatabaseConfiguration(private val mariaDataSourceProperties: MariaDataSourceProperties) : BluePrintDBLibGenericService {
val log = LoggerFactory.getLogger(MariaDatabaseConfiguration::class.java)!!
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MySqlDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MySqlDatabaseConfiguration.kt
index ea13dfb..0761b72 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MySqlDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/MySqlDatabaseConfiguration.kt
@@ -16,14 +16,14 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db.primary
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.MySqlDataSourceProperties
import org.slf4j.LoggerFactory
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
import org.springframework.jdbc.datasource.DriverManagerDataSource
import javax.sql.DataSource
-class MySqlDatabaseConfiguration(private val mySqlDataSourceProperties: MySqlDataSourceProperties) : BlueprintDBLibGenericService {
+class MySqlDatabaseConfiguration(private val mySqlDataSourceProperties: MySqlDataSourceProperties) : BluePrintDBLibGenericService {
override fun namedParameterJdbcTemplate(): NamedParameterJdbcTemplate {
return mySqlNamedParameterJdbcTemplate(mySqlDataSource())
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintCatalogServiceImpl.kt
index fe6da17..9d18263 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintCatalogServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintCatalogServiceImpl.kt
@@ -18,16 +18,16 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db.primary.service
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.deCompress
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.slf4j.LoggerFactory
import java.io.File
import java.nio.file.Path
@@ -35,9 +35,9 @@
@MappedSuperclass
abstract class BlueprintCatalogServiceImpl(
- private val bluePrintLoadConfiguration: BlueprintLoadConfiguration,
- private val blueprintValidator: BlueprintValidatorService
-) : BlueprintCatalogService {
+ private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
+ private val blueprintValidator: BluePrintValidatorService
+) : BluePrintCatalogService {
private val log = LoggerFactory.getLogger(BlueprintCatalogServiceImpl::class.java)!!
@@ -51,8 +51,8 @@
workingDir = blueprintFile.absolutePath
archiveFile = normalizedFile(bluePrintLoadConfiguration.blueprintArchivePath, processingId, "cba.zip")
- if (!BlueprintArchiveUtils.compress(blueprintFile, archiveFile)) {
- throw BlueprintException("Fail to compress blueprint")
+ if (!BluePrintArchiveUtils.compress(blueprintFile, archiveFile)) {
+ throw BluePrintException("Fail to compress blueprint")
}
} else {
// Compressed File
@@ -63,16 +63,16 @@
blueprintFile.deCompress(workingDir)
}
- var valid = BlueprintConstants.FLAG_N
+ var valid = BluePrintConstants.FLAG_N
if (validate) {
- blueprintValidator.validateBlueprints(workingDir!!)
- valid = BlueprintConstants.FLAG_Y
+ blueprintValidator.validateBluePrints(workingDir!!)
+ valid = BluePrintConstants.FLAG_Y
}
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(processingId, workingDir!!)
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(processingId, workingDir!!)
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- metadata[BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = processingId
- metadata[BlueprintConstants.PROPERTY_BLUEPRINT_VALID] = valid
+ metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = processingId
+ metadata[BluePrintConstants.PROPERTY_BLUEPRINT_VALID] = valid
save(metadata, archiveFile)
@@ -83,7 +83,7 @@
name, version,
extract
)
- ?: throw BlueprintException("Could not find blueprint $name:$version from database")
+ ?: throw BluePrintException("Could not find blueprint $name:$version from database")
override suspend fun deleteFromDatabase(name: String, version: String) = delete(name, version)
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintProcessorCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintProcessorCatalogServiceImpl.kt
index 5b98538..9c007da 100755
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintProcessorCatalogServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/primary/service/BlueprintProcessorCatalogServiceImpl.kt
@@ -23,21 +23,21 @@
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModel
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModelContent
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository.BlueprintModelRepository
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.common.ApplicationConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.data.ErrorCode
import org.onap.ccsdk.cds.controllerblueprints.core.deCompress
import org.onap.ccsdk.cds.controllerblueprints.core.deleteNBDir
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
import org.onap.ccsdk.cds.controllerblueprints.core.reCreateNBDirs
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintCompileCache
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
import org.slf4j.LoggerFactory
import org.springframework.dao.DataIntegrityViolationException
import org.springframework.stereotype.Service
@@ -51,8 +51,8 @@
*/
@Service("blueprintsProcessorCatalogService")
class BlueprintProcessorCatalogServiceImpl(
- bluePrintRuntimeValidatorService: BlueprintValidatorService,
- private val bluePrintLoadConfiguration: BlueprintLoadConfiguration,
+ bluePrintRuntimeValidatorService: BluePrintValidatorService,
+ private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
private val blueprintModelRepository: BlueprintModelRepository
) :
BlueprintCatalogServiceImpl(bluePrintLoadConfiguration, bluePrintRuntimeValidatorService) {
@@ -61,7 +61,7 @@
override suspend fun delete(name: String, version: String) {
// Clean blueprint script cache
- val cacheKey = BlueprintFileUtils
+ val cacheKey = BluePrintFileUtils
.compileCacheKey(normalizedPathName(bluePrintLoadConfiguration.blueprintDeployPath, name, version))
cleanClassLoader(cacheKey)
log.info("removed cba file name($name), version($version) from cache")
@@ -100,11 +100,11 @@
}
check(deployFile.exists() && deployFile.list().isNotEmpty()) {
- throw BlueprintProcessorException("file check failed")
+ throw BluePrintProcessorException("file check failed")
}
} catch (e: Exception) {
deleteNBDir(deployFile.absolutePath)
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"failed to get get cba file name($name), version($version) from db" +
" : ${e.message}"
)
@@ -121,11 +121,11 @@
}
override suspend fun save(metadata: MutableMap<String, String>, archiveFile: File) {
- val artifactName = metadata[BlueprintConstants.METADATA_TEMPLATE_NAME]
- val artifactVersion = metadata[BlueprintConstants.METADATA_TEMPLATE_VERSION]
+ val artifactName = metadata[BluePrintConstants.METADATA_TEMPLATE_NAME]
+ val artifactVersion = metadata[BluePrintConstants.METADATA_TEMPLATE_VERSION]
check(archiveFile.isFile && !archiveFile.isDirectory) {
- throw BlueprintException("Not a valid Archive file(${archiveFile.absolutePath})")
+ throw BluePrintException("Not a valid Archive file(${archiveFile.absolutePath})")
}
blueprintModelRepository.findByArtifactNameAndArtifactVersion(artifactName!!, artifactVersion!!)?.let {
@@ -134,7 +134,7 @@
val deployFile =
normalizedPathName(bluePrintLoadConfiguration.blueprintDeployPath, artifactName, artifactVersion)
- val cacheKey = BlueprintFileUtils.compileCacheKey(deployFile)
+ val cacheKey = BluePrintFileUtils.compileCacheKey(deployFile)
cleanClassLoader(cacheKey)
deleteNBDir(deployFile).let {
@@ -144,20 +144,20 @@
}
val blueprintModel = BlueprintModel()
- blueprintModel.id = metadata[BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID]
+ blueprintModel.id = metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID]
blueprintModel.artifactType = ApplicationConstants.ASDC_ARTIFACT_TYPE_SDNC_MODEL
- blueprintModel.published = metadata[BlueprintConstants.PROPERTY_BLUEPRINT_VALID]
- ?: BlueprintConstants.FLAG_N
+ blueprintModel.published = metadata[BluePrintConstants.PROPERTY_BLUEPRINT_VALID]
+ ?: BluePrintConstants.FLAG_N
blueprintModel.artifactName = artifactName
blueprintModel.artifactVersion = artifactVersion
- blueprintModel.updatedBy = metadata[BlueprintConstants.METADATA_TEMPLATE_AUTHOR]!!
- blueprintModel.tags = metadata[BlueprintConstants.METADATA_TEMPLATE_TAGS]!!
+ blueprintModel.updatedBy = metadata[BluePrintConstants.METADATA_TEMPLATE_AUTHOR]!!
+ blueprintModel.tags = metadata[BluePrintConstants.METADATA_TEMPLATE_TAGS]!!
val description =
- if (null != metadata[BlueprintConstants.METADATA_TEMPLATE_DESCRIPTION]) metadata[BlueprintConstants.METADATA_TEMPLATE_DESCRIPTION] else ""
+ if (null != metadata[BluePrintConstants.METADATA_TEMPLATE_DESCRIPTION]) metadata[BluePrintConstants.METADATA_TEMPLATE_DESCRIPTION] else ""
blueprintModel.artifactDescription = description
val blueprintModelContent = BlueprintModelContent()
- blueprintModelContent.id = metadata[BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID]
+ blueprintModelContent.id = metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID]
blueprintModelContent.contentType = "CBA_ZIP"
blueprintModelContent.name = "$artifactName:$artifactVersion"
blueprintModelContent.description = "$artifactName:$artifactVersion CBA Zip Content"
@@ -169,7 +169,7 @@
try {
blueprintModelRepository.saveAndFlush(blueprintModel)
} catch (ex: DataIntegrityViolationException) {
- throw BlueprintException(
+ throw BluePrintException(
ErrorCode.CONFLICT_ADDING_RESOURCE.value,
"The blueprint entry " +
"is already exist in database: ${ex.message}",
@@ -179,10 +179,10 @@
}
private suspend fun cleanClassLoader(cacheKey: String) {
- val clusterService = BlueprintDependencyService.optionalClusterService()
+ val clusterService = BluePrintDependencyService.optionalClusterService()
if (clusterService != null && clusterService.clusterJoined()) {
log.info("Sending ClusterMessage: Clean Classloader Cache")
clusterService.sendMessage(BlueprintClusterTopic.BLUEPRINT_CLEAN_COMPILER_CACHE, cacheKey)
- } else BlueprintCompileCache.cleanClassLoader(cacheKey)
+ } else BluePrintCompileCache.cleanClassLoader(cacheKey)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt
index 4084e15..b7b1f78 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt
@@ -20,16 +20,16 @@
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.mock.MockBlueprintProcessorCatalogServiceImpl
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.service.BlueprintCatalogServiceImpl
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.service.BlueprintProcessorCatalogServiceImpl
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.compress
import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.context.annotation.ComponentScan
@@ -46,7 +46,7 @@
@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor"])
@ContextConfiguration(
classes = [
- BlueprintProcessorCatalogServiceImpl::class, BlueprintCoreConfiguration::class,
+ BlueprintProcessorCatalogServiceImpl::class, BluePrintCoreConfiguration::class,
MockBlueprintProcessorCatalogServiceImpl::class
]
)
@@ -57,9 +57,9 @@
lateinit var blueprintsProcessorCatalogService: BlueprintCatalogServiceImpl
@Autowired
- lateinit var blueprintCoreConfiguration: BlueprintCoreConfiguration
+ lateinit var blueprintCoreConfiguration: BluePrintCoreConfiguration
- private lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ private lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
private val blueprintId = "1234"
@@ -72,7 +72,7 @@
normalizedFile("./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration")
.compress(normalizedFile("./target/blueprints/generated-cba.zip"))
- bluePrintRuntimeService = BlueprintMetadataUtils.bluePrintRuntime(
+ bluePrintRuntimeService = BluePrintMetadataUtils.bluePrintRuntime(
blueprintId,
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -103,7 +103,7 @@
val file = normalizedFile("./target/blueprints/generated-cba.zip")
assertTrue(file.exists(), "couldnt get file ${file.absolutePath}")
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- metadata[BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
+ metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
blueprintsProcessorCatalogService.save(metadata, file)
}
@@ -115,7 +115,7 @@
val file = normalizedFile("./target/blueprints/generated-cba.zip")
assertTrue(file.exists(), "couldnt get file ${file.absolutePath}")
val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
- metadata[BlueprintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
+ metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
blueprintsProcessorCatalogService.save(metadata, file)
blueprintsProcessorCatalogService.get("baseconfiguration", "1.0.0", true)
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSLTest.kt
index d182651..dd84e5b 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/DatabasePropertiesDSLTest.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.db
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -68,12 +68,12 @@
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_DB}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/TestDatabaseConfiguration.kt
index 38a8ef4..d8192ac 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/TestDatabaseConfiguration.kt
@@ -27,7 +27,7 @@
import javax.sql.DataSource
@Configuration
-@Import(BlueprintDBLibConfiguration::class)
+@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor.db.primary"],
entityManagerFactoryRef = "primaryEntityManager",
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/mock/MockBlueprintProcessorCatalogServiceImpl.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/mock/MockBlueprintProcessorCatalogServiceImpl.kt
index 6135f5b..248181f1 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/mock/MockBlueprintProcessorCatalogServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/mock/MockBlueprintProcessorCatalogServiceImpl.kt
@@ -17,8 +17,8 @@
import io.mockk.coEvery
import io.mockk.mockk
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@@ -26,10 +26,10 @@
open class MockBlueprintProcessorCatalogServiceImpl {
@Bean(name = ["bluePrintRuntimeValidatorService"])
- open fun bluePrintRuntimeValidatorService(): BlueprintValidatorService {
- val bluePrintValidatorService = mockk<BlueprintValidatorService>()
- coEvery { bluePrintValidatorService.validateBlueprints(any<String>()) } returns true
- coEvery { bluePrintValidatorService.validateBlueprints(any<BlueprintRuntimeService<*>>()) } returns true
+ open fun bluePrintRuntimeValidatorService(): BluePrintValidatorService {
+ val bluePrintValidatorService = mockk<BluePrintValidatorService>()
+ coEvery { bluePrintValidatorService.validateBluePrints(any<String>()) } returns true
+ coEvery { bluePrintValidatorService.validateBluePrints(any<BluePrintRuntimeService<*>>()) } returns true
return bluePrintValidatorService
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/AafAuthDmaapClientService.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/AafAuthDmaapClientService.kt
index 587e020..dfe9573 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/AafAuthDmaapClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/AafAuthDmaapClientService.kt
@@ -30,7 +30,7 @@
class AafAuthDmaapClientService(
private val clientProps: AafAuthDmaapClientProperties
) :
- BlueprintDmaapClientService {
+ BluePrintDmaapClientService {
/**
* The constructed DMAAP client.
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapClientService.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapClientService.kt
similarity index 97%
rename from ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapClientService.kt
rename to ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapClientService.kt
index c275e7e..82c3f3a 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapClientService.kt
@@ -31,7 +31,7 @@
* properties provided. This abstraction also provides a mechanism to send
* messages with the given partition in a session and closing the same.
*/
-interface BlueprintDmaapClientService {
+interface BluePrintDmaapClientService {
/**
* Static variable for logging.
@@ -39,7 +39,7 @@
companion object {
var log = LoggerFactory.getLogger(
- BlueprintDmaapClientService::class.java
+ BluePrintDmaapClientService::class.java
)!!
}
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibConfiguration.kt
similarity index 97%
rename from ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibConfiguration.kt
rename to ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibConfiguration.kt
index c64c332..20d9afd 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibConfiguration.kt
@@ -31,7 +31,7 @@
@Configuration
@ComponentScan
@EnableConfigurationProperties
-open class BlueprintDmaapLibConfiguration
+open class BluePrintDmaapLibConfiguration
/**
* Util constants required for DMAAP library to use.
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibPropertyService.kt
similarity index 92%
rename from ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibPropertyService.kt
rename to ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibPropertyService.kt
index 7bc9d60..e5c9d43 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BlueprintDmaapLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/BluePrintDmaapLibPropertyService.kt
@@ -21,11 +21,11 @@
package org.onap.ccsdk.cds.blueprintsprocessor.dmaap
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.SERVICE_BLUEPRINT_DMAAP_LIB_PROPERTY
import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.TYPE_HTTP_AAF_AUTH
import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.DmaapLibConstants.Companion.TYPE_HTTP_NO_AUTH
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
@@ -46,7 +46,7 @@
@Service(SERVICE_BLUEPRINT_DMAAP_LIB_PROPERTY)
@Configuration
@PropertySources(PropertySource("classpath:event.properties"))
-open class BlueprintDmaapLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintDmaapLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
/**
* Static variable for logging.
@@ -54,7 +54,7 @@
companion object {
var log = LoggerFactory.getLogger(
- BlueprintDmaapLibPropertyService::class.java
+ BluePrintDmaapLibPropertyService::class.java
)!!
}
@@ -70,7 +70,7 @@
* node.
*/
fun blueprintDmaapClientService(jsonNode: JsonNode):
- BlueprintDmaapClientService {
+ BluePrintDmaapClientService {
val dmaapProps = dmaapClientProperties(jsonNode)
return blueprintDmaapClientService(dmaapProps)
}
@@ -80,7 +80,7 @@
* selector string.
*/
fun blueprintDmaapClientService(selector: String):
- BlueprintDmaapClientService {
+ BluePrintDmaapClientService {
val prefix = "blueprintsprocessor.dmaapclient.$selector"
val dmaapProps = dmaapClientProperties(prefix)
return blueprintDmaapClientService(dmaapProps)
@@ -112,7 +112,7 @@
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"DMAAP adaptor($type) is " +
"not supported"
)
@@ -147,7 +147,7 @@
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"DMAAP adaptor($type) is " +
"not supported"
)
@@ -160,7 +160,7 @@
* Returns DMAAP client service according to the type of client properties.
*/
private fun blueprintDmaapClientService(clientProps: DmaapClientProperties):
- BlueprintDmaapClientService {
+ BluePrintDmaapClientService {
when (clientProps) {
is HttpNoAuthDmaapClientProperties -> {
return HttpNoAuthDmaapClientService(clientProps)
@@ -171,7 +171,7 @@
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Unable to get the DMAAP " +
"client"
)
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/HttpNoAuthDmaapClientService.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/HttpNoAuthDmaapClientService.kt
index 4f9f89a..d4adfca 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/HttpNoAuthDmaapClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/dmaap/HttpNoAuthDmaapClientService.kt
@@ -31,7 +31,7 @@
private val clientProps:
HttpNoAuthDmaapClientProperties
) :
- BlueprintDmaapClientService {
+ BluePrintDmaapClientService {
/**
* The constructed DMAAP client.
diff --git a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/kotlin/org/ccsdk/cds/blueprintprocessor/dmaap/TestDmaapEventPublisher.kt b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/kotlin/org/ccsdk/cds/blueprintprocessor/dmaap/TestDmaapEventPublisher.kt
index c44f6a4..e6043ca 100644
--- a/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/kotlin/org/ccsdk/cds/blueprintprocessor/dmaap/TestDmaapEventPublisher.kt
+++ b/ms/blueprintsprocessor/modules/commons/dmaap-lib/src/test/kotlin/org/ccsdk/cds/blueprintprocessor/dmaap/TestDmaapEventPublisher.kt
@@ -23,10 +23,10 @@
import com.fasterxml.jackson.databind.ObjectMapper
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BlueprintDmaapLibConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BlueprintDmaapLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BluePrintDmaapLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.dmaap.BluePrintDmaapLibPropertyService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
@@ -51,8 +51,8 @@
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
@ContextConfiguration(
classes = [
- BlueprintDmaapLibConfiguration::class, TestController::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintDmaapLibConfiguration::class, TestController::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -69,7 +69,7 @@
class TestDmaapEventPublisher {
@Autowired
- lateinit var dmaapService: BlueprintDmaapLibPropertyService
+ lateinit var dmaapService: BluePrintDmaapLibPropertyService
/**
* Tests the event properties being set properly and sent as request.
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcExtensions.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcExtensions.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcExtensions.kt
rename to ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcExtensions.kt
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibConfiguration.kt
similarity index 80%
rename from ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibConfiguration.kt
rename to ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibConfiguration.kt
index 806e4c6..e94400d 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibConfiguration.kt
@@ -18,27 +18,27 @@
package org.onap.ccsdk.cds.blueprintsprocessor.grpc
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcClientService
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcLibPropertyService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcClientService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcLibPropertyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan
-open class BlueprintGrpcLibConfiguration
+open class BluePrintGrpcLibConfiguration
/**
* Exposed Dependency Service by this GRPC Lib Module
*/
-fun BlueprintDependencyService.grpcLibPropertyService(): BlueprintGrpcLibPropertyService =
+fun BluePrintDependencyService.grpcLibPropertyService(): BluePrintGrpcLibPropertyService =
instance(GRPCLibConstants.SERVICE_BLUEPRINT_GRPC_LIB_PROPERTY)
-fun BlueprintDependencyService.grpcClientService(selector: String): BlueprintGrpcClientService {
+fun BluePrintDependencyService.grpcClientService(selector: String): BluePrintGrpcClientService {
return grpcLibPropertyService().blueprintGrpcClientService(selector)
}
-fun BlueprintDependencyService.grpcClientService(jsonNode: JsonNode): BlueprintGrpcClientService {
+fun BluePrintDependencyService.grpcClientService(jsonNode: JsonNode): BluePrintGrpcClientService {
return grpcLibPropertyService().blueprintGrpcClientService(jsonNode)
}
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibData.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibData.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BlueprintGrpcLibData.kt
rename to ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/BluePrintGrpcLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt
index 853f749..8063e89 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.grpc
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,48 +30,48 @@
/** Relationships Types DSL for GRPC Server Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToGrpcServer() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToGrpcServer()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToGrpcServer()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToGrpcServer(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToGrpcServer(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through GRPC Server."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
fun ServiceTemplateBuilder.relationshipTypeConnectsToGrpcClient() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToGrpcClient()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToGrpcClient()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToGrpcClient(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToGrpcClient(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through GRPC Client."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -89,25 +89,25 @@
class GrpcServerRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER, description
) {
fun tokenAuth(block: GrpcServerTokenAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tokenAuthGrpcServerProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tokenAuthGrpcServerProperties(block))
}
fun tlsAuth(block: GrpcServerTLSAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tlsAuthGrpcServerProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tlsAuthGrpcServerProperties(block))
}
}
-fun BlueprintTypes.tokenAuthGrpcServerProperties(block: GrpcServerTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tokenAuthGrpcServerProperties(block: GrpcServerTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = GrpcServerTokenAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[GrpcServerProperties::type.name] = GRPCLibConstants.TYPE_TOKEN_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.tlsAuthGrpcServerProperties(block: GrpcServerTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tlsAuthGrpcServerProperties(block: GrpcServerTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = GrpcServerTLSAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[GrpcServerProperties::type.name] = GRPCLibConstants.TYPE_TLS_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
@@ -158,35 +158,35 @@
class GrpcClientRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT, description
) {
fun basicAuth(block: GrpcClientBasicAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.basicAuthGrpcClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.basicAuthGrpcClientProperties(block))
}
fun tokenAuth(block: GrpcClientTokenAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tokenAuthGrpcClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tokenAuthGrpcClientProperties(block))
}
fun tlsAuth(block: GrpcClientTLSAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tlsAuthGrpcClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tlsAuthGrpcClientProperties(block))
}
}
-fun BlueprintTypes.basicAuthGrpcClientProperties(block: GrpcClientBasicAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.basicAuthGrpcClientProperties(block: GrpcClientBasicAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = GrpcClientBasicAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[GrpcClientProperties::type.name] = GRPCLibConstants.TYPE_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.tokenAuthGrpcClientProperties(block: GrpcClientTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tokenAuthGrpcClientProperties(block: GrpcClientTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = GrpcClientTokenAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[GrpcClientProperties::type.name] = GRPCLibConstants.TYPE_TOKEN_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.tlsAuthGrpcClientProperties(block: GrpcClientTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tlsAuthGrpcClientProperties(block: GrpcClientTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = GrpcClientTLSAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[GrpcClientProperties::type.name] = GRPCLibConstants.TYPE_TLS_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/interceptor/GrpcServerLoggingInterceptor.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/interceptor/GrpcServerLoggingInterceptor.kt
index 7465ba0..aaa4d5f 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/interceptor/GrpcServerLoggingInterceptor.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/interceptor/GrpcServerLoggingInterceptor.kt
@@ -23,11 +23,11 @@
import io.grpc.ServerCallHandler
import io.grpc.ServerInterceptor
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.GrpcLoggerService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.slf4j.MDC
@@ -62,22 +62,22 @@
when (message) {
is ExecutionServiceInput -> {
val commonHeader = message.commonHeader
- ?: throw BlueprintProcessorException("missing common header in request")
+ ?: throw BluePrintProcessorException("missing common header in request")
loggingService.grpcRequesting(call, commonHeader, next)
}
- is BlueprintUploadInput -> {
+ is BluePrintUploadInput -> {
val commonHeader = message.commonHeader
- ?: throw BlueprintProcessorException("missing common header in request")
+ ?: throw BluePrintProcessorException("missing common header in request")
loggingService.grpcRequesting(call, commonHeader, next)
}
- is BlueprintDownloadInput -> {
+ is BluePrintDownloadInput -> {
val commonHeader = message.commonHeader
- ?: throw BlueprintProcessorException("missing common header in request")
+ ?: throw BluePrintProcessorException("missing common header in request")
loggingService.grpcRequesting(call, commonHeader, next)
}
- is BlueprintRemoveInput -> {
+ is BluePrintRemoveInput -> {
val commonHeader = message.commonHeader
- ?: throw BlueprintProcessorException("missing common header in request")
+ ?: throw BluePrintProcessorException("missing common header in request")
loggingService.grpcRequesting(call, commonHeader, next)
}
else -> {
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BasicAuthGrpcClientService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BasicAuthGrpcClientService.kt
index 72453f5..f7be8c6 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BasicAuthGrpcClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BasicAuthGrpcClientService.kt
@@ -22,7 +22,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.BasicAuthGrpcClientProperties
open class BasicAuthGrpcClientService(private val basicAuthGrpcClientProperties: BasicAuthGrpcClientProperties) :
- BlueprintGrpcClientService {
+ BluePrintGrpcClientService {
override suspend fun channel(): ManagedChannel {
val managedChannel = NettyChannelBuilder
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyService.kt
similarity index 87%
rename from ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcLibPropertyService.kt
rename to ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyService.kt
index 9b95edf..a102ee6 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyService.kt
@@ -18,7 +18,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.grpc.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.BasicAuthGrpcClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.GRPCLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.GrpcClientProperties
@@ -27,20 +27,20 @@
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TLSAuthGrpcServerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TokenAuthGrpcClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TokenAuthGrpcServerProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(GRPCLibConstants.SERVICE_BLUEPRINT_GRPC_LIB_PROPERTY)
-open class BlueprintGrpcLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintGrpcLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
- fun blueprintGrpcServerService(jsonNode: JsonNode): BlueprintGrpcServerService {
+ fun blueprintGrpcServerService(jsonNode: JsonNode): BluePrintGrpcServerService {
val grpcServerProperties = grpcServerProperties(jsonNode)
return blueprintGrpcServerService(grpcServerProperties)
}
- fun blueprintGrpcServerService(selector: String): BlueprintGrpcServerService {
+ fun blueprintGrpcServerService(selector: String): BluePrintGrpcServerService {
val prefix = "${GRPCLibConstants.PROPERTY_GRPC_SERVER_PREFIX}$selector"
val grpcServerProperties = grpcServerProperties(prefix)
return blueprintGrpcServerService(grpcServerProperties)
@@ -56,7 +56,7 @@
JacksonUtils.readValue(jsonNode, TLSAuthGrpcServerProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("Grpc type($type) not supported")
+ throw BluePrintProcessorException("Grpc type($type) not supported")
}
}
}
@@ -73,7 +73,7 @@
tlsAuthGrpcServerProperties(prefix)
}
else -> {
- throw BlueprintProcessorException("Grpc type($type) not supported")
+ throw BluePrintProcessorException("Grpc type($type) not supported")
}
}
}
@@ -87,25 +87,25 @@
}
private fun blueprintGrpcServerService(grpcServerProperties: GrpcServerProperties):
- BlueprintGrpcServerService {
+ BluePrintGrpcServerService {
when (grpcServerProperties) {
is TLSAuthGrpcServerProperties -> {
return TLSAuthGrpcServerService(grpcServerProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get grpc client service for properties $grpcServerProperties")
+ throw BluePrintProcessorException("couldn't get grpc client service for properties $grpcServerProperties")
}
}
}
/** GRPC Client Lib Property Service */
- fun blueprintGrpcClientService(jsonNode: JsonNode): BlueprintGrpcClientService {
+ fun blueprintGrpcClientService(jsonNode: JsonNode): BluePrintGrpcClientService {
val restClientProperties = grpcClientProperties(jsonNode)
return blueprintGrpcClientService(restClientProperties)
}
- fun blueprintGrpcClientService(selector: String): BlueprintGrpcClientService {
+ fun blueprintGrpcClientService(selector: String): BluePrintGrpcClientService {
val prefix = "${GRPCLibConstants.PROPERTY_GRPC_CLIENT_PREFIX}$selector"
val restClientProperties = grpcClientProperties(prefix)
return blueprintGrpcClientService(restClientProperties)
@@ -113,7 +113,7 @@
fun grpcClientProperties(jsonNode: JsonNode): GrpcClientProperties {
val type = jsonNode.get("type").returnNullIfMissing()?.textValue()
- ?: BlueprintProcessorException("missing type property")
+ ?: BluePrintProcessorException("missing type property")
return when (type) {
GRPCLibConstants.TYPE_TOKEN_AUTH -> {
JacksonUtils.readValue(jsonNode, TokenAuthGrpcClientProperties::class.java)!!
@@ -125,7 +125,7 @@
JacksonUtils.readValue(jsonNode, BasicAuthGrpcClientProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("Grpc type($type) not supported")
+ throw BluePrintProcessorException("Grpc type($type) not supported")
}
}
}
@@ -145,13 +145,13 @@
basicAuthGrpcClientProperties(prefix)
}
else -> {
- throw BlueprintProcessorException("Grpc type($type) not supported")
+ throw BluePrintProcessorException("Grpc type($type) not supported")
}
}
}
fun blueprintGrpcClientService(grpcClientProperties: GrpcClientProperties):
- BlueprintGrpcClientService {
+ BluePrintGrpcClientService {
return when (grpcClientProperties) {
is TokenAuthGrpcClientProperties -> {
TokenAuthGrpcClientService(grpcClientProperties)
@@ -163,7 +163,7 @@
BasicAuthGrpcClientService(grpcClientProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get grpc service for type(${grpcClientProperties.type})")
+ throw BluePrintProcessorException("couldn't get grpc service for type(${grpcClientProperties.type})")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcService.kt
similarity index 91%
rename from ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcService.kt
rename to ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcService.kt
index a9485b3..d2db14a 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcService.kt
@@ -20,12 +20,12 @@
import io.grpc.ManagedChannel
import io.grpc.netty.NettyServerBuilder
-interface BlueprintGrpcServerService {
+interface BluePrintGrpcServerService {
fun serverBuilder(): NettyServerBuilder
}
-interface BlueprintGrpcClientService {
+interface BluePrintGrpcClientService {
suspend fun channel(): ManagedChannel
}
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/GrpcLoggerService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/GrpcLoggerService.kt
index a2be05d..732f4fe 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/GrpcLoggerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/GrpcLoggerService.kt
@@ -23,11 +23,11 @@
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.getStringKey
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.putStringKeyValue
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_INVOCATION_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_PARTNER_NAME
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_REQUEST_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_INVOCATION_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_PARTNER_NAME
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_REQUEST_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToUUID
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -75,7 +75,7 @@
val localhost = InetAddress.getLocalHost()
val clientSocketAddress = call.attributes.get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR) as? InetSocketAddress
- ?: throw BlueprintProcessorException("failed to get client address")
+ ?: throw BluePrintProcessorException("failed to get client address")
val serviceName = call.methodDescriptor.fullMethodName
MDC.put("InvokeTimestamp", ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT))
@@ -94,7 +94,7 @@
fun grpcInvoking(requestHeader: Metadata) {
requestHeader.putStringKeyValue(ONAP_REQUEST_ID, MDC.get("InvocationID").defaultToUUID())
requestHeader.putStringKeyValue(ONAP_INVOCATION_ID, UUID.randomUUID().toString())
- requestHeader.putStringKeyValue(ONAP_PARTNER_NAME, BlueprintConstants.APP_NAME)
+ requestHeader.putStringKeyValue(ONAP_PARTNER_NAME, BluePrintConstants.APP_NAME)
}
/** Used when server returns response */
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcClientService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcClientService.kt
index a8374d6..44df5fb 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcClientService.kt
@@ -26,7 +26,7 @@
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
class TLSAuthGrpcClientService(private val tlsAuthGrpcClientProperties: TLSAuthGrpcClientProperties) :
- BlueprintGrpcClientService {
+ BluePrintGrpcClientService {
override suspend fun channel(): ManagedChannel {
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcServerService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcServerService.kt
index c5f8df4..915ea17 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcServerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TLSAuthGrpcServerService.kt
@@ -25,7 +25,7 @@
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
class TLSAuthGrpcServerService(private val tlsAuthGrpcServerProperties: TLSAuthGrpcServerProperties) :
- BlueprintGrpcServerService {
+ BluePrintGrpcServerService {
override fun serverBuilder(): NettyServerBuilder {
return NettyServerBuilder
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TokenAuthGrpcClientService.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TokenAuthGrpcClientService.kt
index b14e1d6..4c991df 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TokenAuthGrpcClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/TokenAuthGrpcClientService.kt
@@ -30,7 +30,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.interceptor.GrpcClientLoggingInterceptor
class TokenAuthGrpcClientService(private val tokenAuthGrpcClientProperties: TokenAuthGrpcClientProperties) :
- BlueprintGrpcClientService {
+ BluePrintGrpcClientService {
override suspend fun channel(): ManagedChannel {
val target =
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSLTest.kt
index 1e7000e..3de857f 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/GrpcPropertiesDSLTest.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.grpc
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -60,12 +60,12 @@
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_SERVER}"
)
}
@@ -115,12 +115,12 @@
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_GRPC_CLIENT}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyServiceTest.kt
similarity index 95%
rename from ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcLibPropertyServiceTest.kt
rename to ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyServiceTest.kt
index 40e245a..30722c8 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcLibPropertyServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcLibPropertyServiceTest.kt
@@ -22,10 +22,10 @@
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.BasicAuthGrpcClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.BlueprintGrpcLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.BluePrintGrpcLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TLSAuthGrpcClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TLSAuthGrpcServerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TokenAuthGrpcClientProperties
@@ -41,8 +41,8 @@
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintGrpcLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintGrpcLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -74,10 +74,10 @@
"blueprintsprocessor.grpcclient.tls-sample.clientPrivateKey=client.key"
]
)
-class BlueprintGrpcLibPropertyServiceTest {
+class BluePrintGrpcLibPropertyServiceTest {
@Autowired
- lateinit var bluePrintGrpcLibPropertyService: BlueprintGrpcLibPropertyService
+ lateinit var bluePrintGrpcLibPropertyService: BluePrintGrpcLibPropertyService
/**
* Tests the GRPC client properties with selector for basic auth.
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcServerTest.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcServerTest.kt
similarity index 97%
rename from ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcServerTest.kt
rename to ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcServerTest.kt
index 130175e..026fe5a 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BlueprintGrpcServerTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/BluePrintGrpcServerTest.kt
@@ -28,13 +28,13 @@
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import java.util.UUID
import kotlin.test.Test
import kotlin.test.assertNotNull
-class BlueprintGrpcServerTest {
+class BluePrintGrpcServerTest {
private val tlsAuthGrpcServerProperties = TLSAuthGrpcServerProperties().apply {
port = 50052
@@ -69,7 +69,7 @@
val grpcChannel = tlsAuthGrpcClientService.channel()
/** Get Send and Receive Channel for bidirectional process method*/
val (reqChannel, resChannel) = clientCallBidiStreaming(
- BlueprintProcessingServiceGrpc.getProcessMethod(),
+ BluePrintProcessingServiceGrpc.getProcessMethod(),
grpcChannel
)
launch {
diff --git a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBlueprintProcessingServer.kt b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBluePrintProcessingServer.kt
similarity index 93%
rename from ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBlueprintProcessingServer.kt
rename to ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBluePrintProcessingServer.kt
index 5426d73..78fa27d 100644
--- a/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBlueprintProcessingServer.kt
+++ b/ms/blueprintsprocessor/modules/commons/grpc-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/grpc/service/MockTLSBluePrintProcessingServer.kt
@@ -23,11 +23,11 @@
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
-val log = logger(MockTLSBlueprintProcessingServer::class)
+val log = logger(MockTLSBluePrintProcessingServer::class)
/** For Integration testing stat this server, Set the working path to run this method */
fun main() {
@@ -40,7 +40,7 @@
}
val server = TLSAuthGrpcServerService(tlsAuthGrpcServerProperties).serverBuilder()
.intercept(GrpcServerLoggingInterceptor())
- .addService(MockTLSBlueprintProcessingServer())
+ .addService(MockTLSBluePrintProcessingServer())
.build()
server.start()
log.info("GRPC Serve started(${server.isShutdown}) on port(${server.port})...")
@@ -50,7 +50,7 @@
}
}
-class MockTLSBlueprintProcessingServer : BlueprintProcessingServiceGrpc.BlueprintProcessingServiceImplBase() {
+class MockTLSBluePrintProcessingServer : BluePrintProcessingServiceGrpc.BluePrintProcessingServiceImplBase() {
override fun process(responseObserver: StreamObserver<ExecutionServiceOutput>): StreamObserver<ExecutionServiceInput> {
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageExtensions.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageExtensions.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageExtensions.kt
rename to ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageExtensions.kt
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibConfiguration.kt
similarity index 86%
rename from ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibConfiguration.kt
rename to ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibConfiguration.kt
index 88931d1..659295a 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibConfiguration.kt
@@ -18,10 +18,10 @@
package org.onap.ccsdk.cds.blueprintsprocessor.message
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BluePrintMessageLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageConsumerService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageProducerService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@@ -29,29 +29,29 @@
@Configuration
@ComponentScan
@EnableConfigurationProperties
-open class BlueprintMessageLibConfiguration
+open class BluePrintMessageLibConfiguration
/**
* Exposed Dependency Service by this Message Lib Module
*/
-fun BlueprintDependencyService.messageLibPropertyService(): BlueprintMessageLibPropertyService =
+fun BluePrintDependencyService.messageLibPropertyService(): BluePrintMessageLibPropertyService =
instance(MessageLibConstants.SERVICE_BLUEPRINT_MESSAGE_LIB_PROPERTY)
/** Extension functions for message producer service **/
-fun BlueprintDependencyService.messageProducerService(selector: String): BlueprintMessageProducerService {
+fun BluePrintDependencyService.messageProducerService(selector: String): BlueprintMessageProducerService {
return messageLibPropertyService().blueprintMessageProducerService(selector)
}
-fun BlueprintDependencyService.messageProducerService(jsonNode: JsonNode): BlueprintMessageProducerService {
+fun BluePrintDependencyService.messageProducerService(jsonNode: JsonNode): BlueprintMessageProducerService {
return messageLibPropertyService().blueprintMessageProducerService(jsonNode)
}
/** Extension functions for message consumer service **/
-fun BlueprintDependencyService.messageConsumerService(selector: String): BlueprintMessageConsumerService {
+fun BluePrintDependencyService.messageConsumerService(selector: String): BlueprintMessageConsumerService {
return messageLibPropertyService().blueprintMessageConsumerService(selector)
}
-fun BlueprintDependencyService.messageConsumerService(jsonNode: JsonNode): BlueprintMessageConsumerService {
+fun BluePrintDependencyService.messageConsumerService(jsonNode: JsonNode): BlueprintMessageConsumerService {
return messageLibPropertyService().blueprintMessageConsumerService(jsonNode)
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibData.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibData.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BlueprintMessageLibData.kt
rename to ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/BluePrintMessageLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSL.kt
index 527374f..8b31de9 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.message
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,48 +30,48 @@
/** Relationships Types DSL for Message Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToMessageProducer() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToMessageProducer()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToMessageProducer()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToMessageProducer(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToMessageProducer(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through message producer."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
fun ServiceTemplateBuilder.relationshipTypeConnectsToMessageConsumer() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToMessageConsumer()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToMessageConsumer()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToMessageConsumer(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToMessageConsumer(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship type connects to message consumer."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -90,46 +90,46 @@
class MessageProducerRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER, description
) {
fun kafkaBasicAuth(block: KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaBasicAuthMessageProducerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaBasicAuthMessageProducerProperties(block)
)
}
fun kafkaSslAuth(block: KafkaSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaSslAuthMessageProducerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaSslAuthMessageProducerProperties(block)
)
}
fun kafkaScramSslAuth(block: KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaScramSslAuthMessageProducerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaScramSslAuthMessageProducerProperties(block)
)
}
}
-fun BlueprintTypes.kafkaBasicAuthMessageProducerProperties(block: KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaBasicAuthMessageProducerProperties(block: KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaBasicAuthMessageProducerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaSslAuthMessageProducerProperties(block: KafkaSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaSslAuthMessageProducerProperties(block: KafkaSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaSslAuthMessageProducerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaSslAuthMessageProducerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_SSL_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaScramSslAuthMessageProducerProperties(block: KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaScramSslAuthMessageProducerProperties(block: KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaScramSslAuthMessageProducerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_SCRAM_SSL_AUTH.asJsonPrimitive()
@@ -245,88 +245,88 @@
class MessageConsumerRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER, description
) {
fun kafkaBasicAuth(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaBasicAuthMessageConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaBasicAuthMessageConsumerProperties(block)
)
}
fun kafkaSslAuth(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaSslAuthMessageConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaSslAuthMessageConsumerProperties(block)
)
}
fun kafkaScramSslAuth(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaScramSslAuthMessageConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaScramSslAuthMessageConsumerProperties(block)
)
}
fun kafkaStreamsBasicAuth(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaStreamsBasicAuthConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaStreamsBasicAuthConsumerProperties(block)
)
}
fun kafkaStreamsSslAuth(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaStreamsSslAuthConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaStreamsSslAuthConsumerProperties(block)
)
}
fun kafkaStreamsScramSslAuth(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintTypes.kafkaStreamsScramSslAuthConsumerProperties(block)
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintTypes.kafkaStreamsScramSslAuthConsumerProperties(block)
)
}
}
-fun BlueprintTypes.kafkaBasicAuthMessageConsumerProperties(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaBasicAuthMessageConsumerProperties(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaBasicAuthMessageConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaSslAuthMessageConsumerProperties(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaSslAuthMessageConsumerProperties(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaSslAuthMessageConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_SSL_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaScramSslAuthMessageConsumerProperties(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaScramSslAuthMessageConsumerProperties(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaScramSslAuthMessageConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_SCRAM_SSL_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaStreamsBasicAuthConsumerProperties(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaStreamsBasicAuthConsumerProperties(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaStreamsBasicAuthConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_STREAMS_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaStreamsSslAuthConsumerProperties(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaStreamsSslAuthConsumerProperties(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaStreamsSslAuthConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_STREAMS_SSL_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.kafkaStreamsScramSslAuthConsumerProperties(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.kafkaStreamsScramSslAuthConsumerProperties(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
assignments[KafkaStreamsScramSslAuthConsumerProperties::type.name] =
MessageLibConstants.TYPE_KAFKA_STREAMS_SCRAM_SSL_AUTH.asJsonPrimitive()
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/AbstractKafkaTopologyComponents.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/AbstractKafkaTopologyComponents.kt
index 23eca18..72a7089 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/AbstractKafkaTopologyComponents.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/AbstractKafkaTopologyComponents.kt
@@ -24,9 +24,9 @@
import org.onap.ccsdk.cds.controllerblueprints.core.logger
/** CDS Kafka Stream Processor abstract class to implement */
-abstract class AbstractBlueprintMessageProcessor<K, V> : Processor<K, V> {
+abstract class AbstractBluePrintMessageProcessor<K, V> : Processor<K, V> {
- private val log = logger(AbstractBlueprintMessageProcessor::class)
+ private val log = logger(AbstractBluePrintMessageProcessor::class)
lateinit var processorContext: ProcessorContext
@@ -51,7 +51,7 @@
}
/** CDS Kafka Stream Punctuator abstract class to implement */
-abstract class AbstractBlueprintMessagePunctuator : Punctuator {
+abstract class AbstractBluePrintMessagePunctuator : Punctuator {
lateinit var processorContext: ProcessorContext
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/KafkaJDBCStores.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/KafkaJDBCStores.kt
index ecf5870..86ccd74 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/KafkaJDBCStores.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/kafka/KafkaJDBCStores.kt
@@ -21,10 +21,10 @@
import org.apache.kafka.streams.processor.StateStore
import org.apache.kafka.streams.state.StoreBuilder
import org.apache.kafka.streams.state.StoreSupplier
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibGenericService
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibGenericService
import org.onap.ccsdk.cds.blueprintsprocessor.db.primaryDBLibGenericService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import java.util.*
@@ -32,7 +32,7 @@
override fun get(): KafkaJDBCStore {
// Get the DBLibGenericService Instance
- val bluePrintDBLibGenericService = BlueprintDependencyService.primaryDBLibGenericService()
+ val bluePrintDBLibGenericService = BluePrintDependencyService.primaryDBLibGenericService()
return KafkaJDBCStoreImpl(name, bluePrintDBLibGenericService)
}
@@ -98,7 +98,7 @@
class KafkaJDBCStoreImpl(private val name: String,
- private val bluePrintDBLibGenericService: BlueprintDBLibGenericService)
+ private val bluePrintDBLibGenericService: BluePrintDBLibGenericService)
: KafkaJDBCStore {
private val log = logger(KafkaJDBCStoreImpl::class)
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt
similarity index 95%
rename from ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageLibPropertyService.kt
rename to ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt
index cb0bc32..c0cf51b 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BluePrintMessageLibPropertyService.kt
@@ -19,7 +19,7 @@
import com.fasterxml.jackson.databind.JsonNode
import io.micrometer.core.instrument.MeterRegistry
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaBasicAuthMessageConsumerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaBasicAuthMessageProducerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaScramSslAuthMessageConsumerProperties
@@ -32,13 +32,13 @@
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageProducerProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(MessageLibConstants.SERVICE_BLUEPRINT_MESSAGE_LIB_PROPERTY)
-open class BlueprintMessageLibPropertyService(
- private var bluePrintPropertiesService: BlueprintPropertiesService,
+open class BluePrintMessageLibPropertyService(
+ private var bluePrintPropertiesService: BluePrintPropertiesService,
private val meterRegistry: MeterRegistry
) {
@@ -72,7 +72,7 @@
)
}
else -> {
- throw BlueprintProcessorException("Message adaptor($type) is not supported")
+ throw BluePrintProcessorException("Message adaptor($type) is not supported")
}
}
}
@@ -90,7 +90,7 @@
JacksonUtils.readValue(jsonNode, KafkaScramSslAuthMessageProducerProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("Message adaptor($type) is not supported")
+ throw BluePrintProcessorException("Message adaptor($type) is not supported")
}
}
}
@@ -147,7 +147,7 @@
)
}
else -> {
- throw BlueprintProcessorException("Message adaptor($type) is not supported")
+ throw BluePrintProcessorException("Message adaptor($type) is not supported")
}
}
}
@@ -176,7 +176,7 @@
JacksonUtils.readValue(jsonNode, KafkaStreamsScramSslAuthConsumerProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("Message adaptor($type) is not supported")
+ throw BluePrintProcessorException("Message adaptor($type) is not supported")
}
}
}
@@ -221,7 +221,7 @@
)
}
else -> {
- throw BlueprintProcessorException("couldn't get message client service for ${messageConsumerProperties.type}")
+ throw BluePrintProcessorException("couldn't get message client service for ${messageConsumerProperties.type}")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerService.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerService.kt
index 887a7a7..b39d89b 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerService.kt
@@ -23,7 +23,7 @@
import org.apache.kafka.clients.consumer.ConsumerRecords
import org.apache.kafka.streams.Topology
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
/** Consumer Function Interfaces */
interface ConsumerFunction
@@ -47,7 +47,7 @@
/** Consume with [additionalConfig], so that we can execute dynamic function [consumerFunction] */
suspend fun consume(additionalConfig: Map<String, Any>?, consumerFunction: ConsumerFunction) {
- throw BlueprintProcessorException("Not Implemented")
+ throw BluePrintProcessorException("Not Implemented")
}
/** Consume the [topics] with [additionalConfig], so that we can execute dynamic function [consumerFunction] */
@@ -56,7 +56,7 @@
additionalConfig: Map<String, Any>?,
consumerFunction: ConsumerFunction
) {
- throw BlueprintProcessorException("Not Implemented")
+ throw BluePrintProcessorException("Not Implemented")
}
/** close the channel, consumer and other resources */
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerService.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerService.kt
index beaa995..4340e48 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerService.kt
@@ -20,7 +20,7 @@
import org.apache.kafka.clients.consumer.ConsumerRecord
import org.apache.kafka.streams.KafkaStreams
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import java.util.Properties
@@ -41,11 +41,11 @@
}
override suspend fun subscribe(additionalConfig: Map<String, Any>?): Channel<ConsumerRecord<String, ByteArray>> {
- throw BlueprintProcessorException("not implemented")
+ throw BluePrintProcessorException("not implemented")
}
override suspend fun subscribe(topics: List<String>, additionalConfig: Map<String, Any>?): Channel<ConsumerRecord<String, ByteArray>> {
- throw BlueprintProcessorException("not implemented")
+ throw BluePrintProcessorException("not implemented")
}
override suspend fun consume(additionalConfig: Map<String, Any>?, consumerFunction: ConsumerFunction) {
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerService.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerService.kt
index 7e5f35d..90b8500 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerService.kt
@@ -21,7 +21,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.message.addHeader
import org.onap.ccsdk.cds.blueprintsprocessor.message.toMap
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToUUID
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -46,9 +46,9 @@
fun messageConsuming(consumerRecord: ConsumerRecord<*, *>) {
val headers = consumerRecord.headers().toMap()
- val requestID = headers[BlueprintConstants.ONAP_REQUEST_ID].defaultToUUID()
- val invocationID = headers[BlueprintConstants.ONAP_INVOCATION_ID].defaultToUUID()
- val partnerName = headers[BlueprintConstants.ONAP_PARTNER_NAME] ?: "UNKNOWN"
+ val requestID = headers[BluePrintConstants.ONAP_REQUEST_ID].defaultToUUID()
+ val invocationID = headers[BluePrintConstants.ONAP_INVOCATION_ID].defaultToUUID()
+ val partnerName = headers[BluePrintConstants.ONAP_PARTNER_NAME] ?: "UNKNOWN"
messageConsuming(requestID, invocationID, partnerName, consumerRecord)
}
@@ -83,9 +83,9 @@
*/
fun messageProducing(requestHeader: Headers) {
val localhost = InetAddress.getLocalHost()
- requestHeader.addHeader(BlueprintConstants.ONAP_REQUEST_ID, MDC.get("InvocationID").defaultToUUID())
- requestHeader.addHeader(BlueprintConstants.ONAP_INVOCATION_ID, UUID.randomUUID().toString())
- requestHeader.addHeader(BlueprintConstants.ONAP_PARTNER_NAME, BlueprintConstants.APP_NAME)
+ requestHeader.addHeader(BluePrintConstants.ONAP_REQUEST_ID, MDC.get("InvocationID").defaultToUUID())
+ requestHeader.addHeader(BluePrintConstants.ONAP_INVOCATION_ID, UUID.randomUUID().toString())
+ requestHeader.addHeader(BluePrintConstants.ONAP_PARTNER_NAME, BluePrintConstants.APP_NAME)
requestHeader.addHeader("ClientIPAddress", localhost.hostAddress)
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtils.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtils.kt
index 7431998..795d386 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtils.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtils.kt
@@ -17,13 +17,13 @@
package org.onap.ccsdk.cds.blueprintsprocessor.message.utils
import io.micrometer.core.instrument.Tag
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
class BlueprintMessageUtils {
companion object {
fun kafkaMetricTag(topic: String): MutableList<Tag> =
mutableListOf(
- Tag.of(BlueprintConstants.METRIC_TAG_TOPIC, topic)
+ Tag.of(BluePrintConstants.METRIC_TAG_TOPIC, topic)
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt
index 8130016..b68678b 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/MessagePropertiesDSLTest.kt
@@ -18,7 +18,7 @@
import org.apache.kafka.streams.StreamsConfig
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -67,12 +67,12 @@
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER}"
)
}
@@ -138,12 +138,12 @@
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt
index fb53ff4..aa9171d 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageConsumerServiceTest.kt
@@ -41,9 +41,9 @@
import org.apache.kafka.common.serialization.StringDeserializer
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.message.BlueprintMessageLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageLibConstants
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -62,8 +62,8 @@
@DirtiesContext
@ContextConfiguration(
classes = [
- BlueprintMessageLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintMessageLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -100,7 +100,7 @@
val log = logger(BlueprintMessageConsumerServiceTest::class)
@Autowired
- lateinit var bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService
+ lateinit var bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService
@MockBean
lateinit var meterRegistry: MeterRegistry
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt
index 1490a33..54601ce 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/BlueprintMessageProducerServiceTest.kt
@@ -34,9 +34,9 @@
import org.apache.kafka.common.serialization.ByteArraySerializer
import org.apache.kafka.common.serialization.StringSerializer
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.message.BlueprintMessageLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageLibConstants
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.mock.mockito.MockBean
@@ -53,8 +53,8 @@
@DirtiesContext
@ContextConfiguration(
classes = [
- BlueprintMessageLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintMessageLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -75,7 +75,7 @@
open class BlueprintMessageProducerServiceTest {
@Autowired
- lateinit var bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService
+ lateinit var bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService
@MockBean
lateinit var meterRegistry: MeterRegistry
@@ -93,11 +93,11 @@
every { mockKafkaTemplate.send(any(), any()) } returns responseMock
- val spyBlueprintMessageProducerService = spyk(blueprintMessageProducerService, recordPrivateCalls = true)
+ val spyBluePrintMessageProducerService = spyk(blueprintMessageProducerService, recordPrivateCalls = true)
- every { spyBlueprintMessageProducerService.messageTemplate(any()) } returns mockKafkaTemplate
+ every { spyBluePrintMessageProducerService.messageTemplate(any()) } returns mockKafkaTemplate
- val response = spyBlueprintMessageProducerService.sendMessage("mykey", "Testing message")
+ val response = spyBluePrintMessageProducerService.sendMessage("mykey", "Testing message")
assertTrue(response, "failed to get command response")
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt
index b93cd42..657cf64 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/KafkaStreamsConsumerServiceTest.kt
@@ -28,9 +28,9 @@
import org.apache.kafka.streams.state.Stores
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.message.BlueprintMessageLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.message.KafkaStreamsBasicAuthConsumerProperties
import org.onap.ccsdk.cds.blueprintsprocessor.message.MessageConsumerProperties
import org.springframework.beans.factory.annotation.Autowired
@@ -45,8 +45,8 @@
@DirtiesContext
@ContextConfiguration(
classes = [
- BlueprintMessageLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintMessageLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -75,7 +75,7 @@
class KafkaStreamsConsumerServiceTest {
@Autowired
- lateinit var bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService
+ lateinit var bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService
@MockBean
lateinit var meterRegistry: MeterRegistry
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerServiceTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerServiceTest.kt
index dc36ac6..3dce334 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MessageLoggerServiceTest.kt
@@ -23,7 +23,7 @@
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.message.toMap
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.slf4j.MDC
import kotlin.test.assertEquals
@@ -51,7 +51,7 @@
val mockHeaders = RecordHeaders()
messageLoggerService.messageProducing(mockHeaders)
val map = mockHeaders.toMap()
- assertEquals("1234-12", map[BlueprintConstants.ONAP_REQUEST_ID])
+ assertEquals("1234-12", map[BluePrintConstants.ONAP_REQUEST_ID])
messageLoggerService.messageConsumingExisting()
}
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt
index 97a81f1..aa38b6e 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/service/MockKafkaTopologyComponents.kt
@@ -22,7 +22,7 @@
import org.apache.kafka.streams.processor.Processor
import org.apache.kafka.streams.processor.ProcessorContext
import org.apache.kafka.streams.state.KeyValueStore
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -48,7 +48,7 @@
return object : Deserializer<PriorityMessage> {
override fun deserialize(topic: String, data: ByteArray): PriorityMessage {
return JacksonUtils.readValue(String(data), PriorityMessage::class.java)
- ?: throw BlueprintProcessorException("failed to convert")
+ ?: throw BluePrintProcessorException("failed to convert")
}
override fun configure(configs: MutableMap<String, *>?, isKey: Boolean) {
diff --git a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtilsTest.kt b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtilsTest.kt
index 849a411..09c3387 100644
--- a/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/message-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/message/utils/BlueprintMessageUtilsTest.kt
@@ -18,7 +18,7 @@
import io.micrometer.core.instrument.Tag
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import kotlin.test.assertEquals
class BlueprintMessageUtilsTest {
@@ -26,7 +26,7 @@
@Test
fun testKafkaMetricTag() {
val expected = mutableListOf<Tag>(
- Tag.of(BlueprintConstants.METRIC_TAG_TOPIC, "my-topic")
+ Tag.of(BluePrintConstants.METRIC_TAG_TOPIC, "my-topic")
)
val tags = BlueprintMessageUtils.kafkaMetricTag("my-topic")
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsExtensions.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsExtensions.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsExtensions.kt
rename to ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsExtensions.kt
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibConfiguration.kt
similarity index 83%
rename from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibConfiguration.kt
rename to ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibConfiguration.kt
index c83906c..a47dd89 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibConfiguration.kt
@@ -16,23 +16,23 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsLibPropertyService
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BlueprintNatsService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.service.BluePrintNatsService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@Configuration
@ComponentScan
-open class BlueprintNatsLibConfiguration
+open class BluePrintNatsLibConfiguration
/**
* Exposed Dependency Service by this NATS Lib Module
*/
-fun BlueprintDependencyService.natsLibPropertyService(): BlueprintNatsLibPropertyService =
+fun BluePrintDependencyService.natsLibPropertyService(): BluePrintNatsLibPropertyService =
instance(NatsLibConstants.SERVICE_BLUEPRINT_NATS_LIB_PROPERTY)
-fun BlueprintDependencyService.controllerNatsService(): BlueprintNatsService {
+fun BluePrintDependencyService.controllerNatsService(): BluePrintNatsService {
return natsLibPropertyService().bluePrintNatsService(NatsLibConstants.DEFULT_NATS_SELECTOR)
}
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibData.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibData.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BlueprintNatsLibData.kt
rename to ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/BluePrintNatsLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt
index 9e771a6..4c54717 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonNode
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,25 +30,25 @@
/** Relationships Types DSL for NATS Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToNats() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToNats()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToNats()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToNats(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToNats(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through NATS Client."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -66,25 +66,25 @@
class NatsRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS, description
) {
fun tokenAuth(block: NatsTokenAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tokenAuthNatsProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tokenAuthNatsProperties(block))
}
fun tlsAuth(block: NatsTLSAuthPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tlsAuthNatsProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tlsAuthNatsProperties(block))
}
}
-fun BlueprintTypes.tokenAuthNatsProperties(block: NatsTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tokenAuthNatsProperties(block: NatsTokenAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = NatsTokenAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[NatsConnectionProperties::type.name] = NatsLibConstants.TYPE_TOKEN_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
}
-fun BlueprintTypes.tlsAuthNatsProperties(block: NatsTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tlsAuthNatsProperties(block: NatsTLSAuthPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = NatsTLSAuthPropertiesAssignmentBuilder().apply(block).build()
assignments[NatsConnectionProperties::type.name] = NatsLibConstants.TYPE_TLS_AUTH.asJsonPrimitive()
return assignments.asJsonNode()
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyService.kt
similarity index 86%
rename from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyService.kt
rename to ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyService.kt
index 457bf87..1ac44bc 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyService.kt
@@ -17,24 +17,24 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsConnectionProperties
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.nats.TLSAuthNatsConnectionProperties
import org.onap.ccsdk.cds.blueprintsprocessor.nats.TokenAuthNatsConnectionProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(NatsLibConstants.SERVICE_BLUEPRINT_NATS_LIB_PROPERTY)
-open class BlueprintNatsLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintNatsLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
- fun bluePrintNatsService(jsonNode: JsonNode): BlueprintNatsService {
+ fun bluePrintNatsService(jsonNode: JsonNode): BluePrintNatsService {
val natsConnectionProperties = natsConnectionProperties(jsonNode)
return bluePrintNatsService(natsConnectionProperties)
}
- fun bluePrintNatsService(selector: String): BlueprintNatsService {
+ fun bluePrintNatsService(selector: String): BluePrintNatsService {
val prefix = "${NatsLibConstants.PROPERTY_NATS_PREFIX}$selector"
val natsConnectionProperties = natsConnectionProperties(prefix)
return bluePrintNatsService(natsConnectionProperties)
@@ -50,7 +50,7 @@
JacksonUtils.readValue(jsonNode, TLSAuthNatsConnectionProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException("NATS type($type) not supported")
+ throw BluePrintProcessorException("NATS type($type) not supported")
}
}
}
@@ -65,7 +65,7 @@
tlsAuthNatsConnectionProperties(prefix)
}
else -> {
- throw BlueprintProcessorException("NATS type($type) not supported")
+ throw BluePrintProcessorException("NATS type($type) not supported")
}
}
}
@@ -79,7 +79,7 @@
}
fun bluePrintNatsService(natsConnectionProperties: NatsConnectionProperties):
- BlueprintNatsService {
+ BluePrintNatsService {
return when (natsConnectionProperties) {
is TokenAuthNatsConnectionProperties -> {
TokenAuthNatsService(natsConnectionProperties)
@@ -88,7 +88,7 @@
TLSAuthNatsService(natsConnectionProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get NATS service for properties $natsConnectionProperties")
+ throw BluePrintProcessorException("couldn't get NATS service for properties $natsConnectionProperties")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsService.kt
similarity index 99%
rename from ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsService.kt
rename to ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsService.kt
index 67de951..9548fe7 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsService.kt
@@ -25,7 +25,7 @@
import io.nats.streaming.SubscriptionOptions
import java.time.Duration
-interface BlueprintNatsService {
+interface BluePrintNatsService {
/** Create and Return the NATS streaming connection */
suspend fun connection(): StreamingConnection
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt
index 1bde8e5..00a972e 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TLSAuthNatsService.kt
@@ -25,7 +25,7 @@
import javax.net.ssl.SSLContext
open class TLSAuthNatsService(private val natsConnectionProperties: TLSAuthNatsConnectionProperties) :
- BlueprintNatsService {
+ BluePrintNatsService {
lateinit var streamingConnection: StreamingConnection
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt
index 9d4aacf..7c24b70 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/TokenAuthNatsService.kt
@@ -25,7 +25,7 @@
import org.onap.ccsdk.cds.controllerblueprints.core.splitCommaAsList
open class TokenAuthNatsService(private val natsConnectionProperties: TokenAuthNatsConnectionProperties) :
- BlueprintNatsService {
+ BluePrintNatsService {
private val log = logger(TokenAuthNatsService::class)
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt
index a155a07..a7726a1 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/utils/NatsClusterUtils.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats.utils
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsLibConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ClusterUtils
object NatsClusterUtils {
@@ -32,7 +32,7 @@
}
fun currentApplicationSubject(subject: String): String {
- return "${BlueprintConstants.APP_NAME}.$subject"
+ return "${BluePrintConstants.APP_NAME}.$subject"
}
fun currentNodeDurable(subject: String): String {
@@ -40,6 +40,6 @@
}
fun applicationLoadBalanceGroup(): String {
- return "${BlueprintConstants.APP_NAME}"
+ return "${BluePrintConstants.APP_NAME}"
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSLTest.kt
index fa70f07..a95b900 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/NatsPropertiesDSLTest.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.nats
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.getInput
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
@@ -59,12 +59,12 @@
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_NATS}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsExtensionsTest.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsExtensionsTest.kt
similarity index 97%
rename from ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsExtensionsTest.kt
rename to ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsExtensionsTest.kt
index 816b6c8..ec120dc 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsExtensionsTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsExtensionsTest.kt
@@ -27,7 +27,7 @@
import java.nio.charset.Charset
import kotlin.test.assertEquals
-class BlueprintNatsExtensionsTest {
+class BluePrintNatsExtensionsTest {
@Test
fun testMessageStrConversion() {
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyServiceTest.kt
similarity index 81%
rename from ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyServiceTest.kt
rename to ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyServiceTest.kt
index 5ef4a72..9a332d5 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsLibPropertyServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsLibPropertyServiceTest.kt
@@ -18,9 +18,9 @@
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.nats.BlueprintNatsLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.nats.BluePrintNatsLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.nats.NatsLibConstants
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -31,8 +31,8 @@
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintNatsLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintNatsLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -43,10 +43,10 @@
"blueprintsprocessor.nats.cds-controller.token=tokenAuth"
]
)
-class BlueprintNatsLibPropertyServiceTest {
+class BluePrintNatsLibPropertyServiceTest {
@Autowired
- lateinit var bluePrintNatsLibPropertyService: BlueprintNatsLibPropertyService
+ lateinit var bluePrintNatsLibPropertyService: BluePrintNatsLibPropertyService
@Test
fun testNatsProperties() {
diff --git a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsServiceTest.kt b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsServiceTest.kt
similarity index 92%
rename from ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsServiceTest.kt
rename to ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsServiceTest.kt
index 8e7ee63..721828a 100644
--- a/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BlueprintNatsServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/nats-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/nats/service/BluePrintNatsServiceTest.kt
@@ -31,7 +31,7 @@
import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
import kotlin.test.assertNotNull
-class BlueprintNatsServiceTest {
+class BluePrintNatsServiceTest {
@Test
fun testTokenAuthNatService() {
@@ -42,18 +42,18 @@
}
""".trimIndent()
- val bluePrintNatsLibPropertyService = BlueprintNatsLibPropertyService(mockk())
+ val bluePrintNatsLibPropertyService = BluePrintNatsLibPropertyService(mockk())
- val spkBlueprintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
+ val spkBluePrintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
every {
- spkBlueprintNatsLibPropertyService
+ spkBluePrintNatsLibPropertyService
.bluePrintNatsService(any<NatsConnectionProperties>())
} returns TokenAuthNatsService(
mockk()
)
val bluePrintNatsService =
- spkBlueprintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
+ spkBluePrintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
assertNotNull(bluePrintNatsService, "failed to get NATS Service")
}
@@ -65,18 +65,18 @@
}
""".trimIndent()
- val bluePrintNatsLibPropertyService = BlueprintNatsLibPropertyService(mockk())
+ val bluePrintNatsLibPropertyService = BluePrintNatsLibPropertyService(mockk())
- val spkBlueprintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
+ val spkBluePrintNatsLibPropertyService = spyk(bluePrintNatsLibPropertyService)
every {
- spkBlueprintNatsLibPropertyService
+ spkBluePrintNatsLibPropertyService
.bluePrintNatsService(any<NatsConnectionProperties>())
} returns TLSAuthNatsService(
mockk()
)
val bluePrintNatsService =
- spkBlueprintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
+ spkBluePrintNatsLibPropertyService.bluePrintNatsService(configuration.jsonAsJsonType())
assertNotNull(bluePrintNatsService, "failed to get NATS Service")
}
@@ -114,7 +114,7 @@
}
}
- private fun testMultiPublish(natsService: BlueprintNatsService) {
+ private fun testMultiPublish(natsService: BluePrintNatsService) {
runBlocking {
/** Multiple Publish Message Test **/
val messageHandler1 =
@@ -131,7 +131,7 @@
}
}
- private fun testLoadBalance(natsService: BlueprintNatsService) {
+ private fun testLoadBalance(natsService: BluePrintNatsService) {
runBlocking {
/** Load balance Publish Message Test **/
val lbMessageHandler1 =
@@ -150,7 +150,7 @@
}
}
- private fun testLimitSubscription(natsService: BlueprintNatsService) {
+ private fun testLimitSubscription(natsService: BluePrintNatsService) {
runBlocking {
/** Load balance Publish Message Test **/
val lbMessageHandler1 =
@@ -185,7 +185,7 @@
}
}
- private fun testRequestReply(natsService: BlueprintNatsService) {
+ private fun testRequestReply(natsService: BluePrintNatsService) {
runBlocking {
val lbMessageHandler1 = io.nats.client.MessageHandler { message ->
println("LB RR Request Handler 1: ${String(message.data)} will reply to(${message.replyTo})")
@@ -217,7 +217,7 @@
}
}
- private fun testMultiRequestReply(natsService: BlueprintNatsService) {
+ private fun testMultiRequestReply(natsService: BluePrintNatsService) {
runBlocking {
/** Request Reply **/
val lbMessageHandler1 = io.nats.client.MessageHandler { message ->
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintCoreConfiguration.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt
similarity index 78%
rename from ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintCoreConfiguration.kt
rename to ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt
index 782a7b0..2a4d05d 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintCoreConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintCoreConfiguration.kt
@@ -17,10 +17,10 @@
package org.onap.ccsdk.cds.blueprintsprocessor.core
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.context.properties.bind.Bindable
@@ -33,7 +33,7 @@
import org.springframework.stereotype.Service
@Configuration
-open class BlueprintCoreConfiguration(private val bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintCoreConfiguration(private val bluePrintPropertiesService: BluePrintPropertiesService) {
companion object {
@@ -41,14 +41,14 @@
}
@Bean
- open fun bluePrintLoadConfiguration(): BlueprintLoadConfiguration {
+ open fun bluePrintLoadConfiguration(): BluePrintLoadConfiguration {
return bluePrintPropertiesService
- .propertyBeanType(PREFIX_BLUEPRINT_PROCESSOR, BlueprintLoadConfiguration::class.java)
+ .propertyBeanType(PREFIX_BLUEPRINT_PROCESSOR, BluePrintLoadConfiguration::class.java)
}
}
@Configuration
-open class BlueprintPropertyConfiguration {
+open class BluePrintPropertyConfiguration {
@Autowired
lateinit var environment: Environment
@@ -60,9 +60,9 @@
}
@Service
-open class BlueprintPropertiesService(private var bluePrintPropertyConfig: BlueprintPropertyConfiguration) {
+open class BluePrintPropertiesService(private var bluePrintPropertyConfig: BluePrintPropertyConfiguration) {
- private val log = logger(BlueprintPropertiesService::class)
+ private val log = logger(BluePrintPropertiesService::class)
fun <T> propertyBeanType(prefix: String, type: Class<T>): T {
return try {
@@ -70,7 +70,7 @@
} catch (e: NoSuchElementException) {
val errMsg = "Error: missing property \"$prefix\"... Check the application.properties file."
log.error(errMsg)
- throw BlueprintProcessorException(e, errMsg)
+ throw BluePrintProcessorException(e, errMsg)
}
}
}
@@ -82,7 +82,7 @@
private val log = LoggerFactory.getLogger(BlueprintDependencyConfiguration::class.java)!!
override fun setApplicationContext(applicationContext: ApplicationContext) {
- BlueprintDependencyService.inject(applicationContext)
+ BluePrintDependencyService.inject(applicationContext)
log.info("Dependency Management module created...")
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
index 924aed8..6199706 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
@@ -23,7 +23,7 @@
import com.fasterxml.jackson.databind.node.ObjectNode
import io.swagger.annotations.ApiModelProperty
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import java.util.Date
import java.util.UUID
@@ -154,7 +154,7 @@
var errorMessage: String? = null
@get:ApiModelProperty(required = true, value = "Message providing request status")
- var message: String = BlueprintConstants.STATUS_SUCCESS
+ var message: String = BluePrintConstants.STATUS_SUCCESS
}
open class StepData {
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensions.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensions.kt
similarity index 79%
rename from ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensions.kt
rename to ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensions.kt
index f050455..edb5bbf 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensions.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensions.kt
@@ -20,30 +20,30 @@
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.newSingleThreadContext
import kotlinx.coroutines.withContext
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterLock
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterMember
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
/**
* Exposed Dependency Service by this Hazelcast Lib Module
*/
-fun BlueprintDependencyService.clusterService(): BlueprintClusterService =
+fun BluePrintDependencyService.clusterService(): BluePrintClusterService =
instance(HazelcastClusterService::class)
/** Optional Cluster Service, returns only if Cluster is enabled */
-fun BlueprintDependencyService.optionalClusterService(): BlueprintClusterService? {
- return if (BlueprintConstants.CLUSTER_ENABLED) {
- BlueprintDependencyService.clusterService()
+fun BluePrintDependencyService.optionalClusterService(): BluePrintClusterService? {
+ return if (BluePrintConstants.CLUSTER_ENABLED) {
+ BluePrintDependencyService.clusterService()
} else null
}
/** Extension to convert Hazelcast Member to Blueprints Cluster Member */
fun Member.toClusterMember(): ClusterMember {
- val memberName: String = this.getAttribute(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID) ?: this.uuid.toString()
+ val memberName: String = this.getAttribute(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID) ?: this.uuid.toString()
return ClusterMember(
id = this.uuid.toString(),
name = memberName,
@@ -53,7 +53,7 @@
/**
* This function will try to acquire the lock and then execute the provided block.
- * If the lock cannot be acquired within timeout, a BlueprintException will be thrown.
+ * If the lock cannot be acquired within timeout, a BluePrintException will be thrown.
*
* Since a lock can only be unlocked by the the thread which acquired the lock,
* this function will confine coroutines within the block to a dedicated thread.
@@ -69,7 +69,7 @@
lock.unLock()
}
} else
- throw BlueprintException("Failed to acquire lock within timeout")
+ throw BluePrintException("Failed to acquire lock within timeout")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterService.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterService.kt
index 613fc4a..fb90567 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterService.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterService.kt
@@ -33,15 +33,15 @@
import com.hazelcast.topic.Message
import com.hazelcast.topic.MessageListener
import kotlinx.coroutines.delay
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessage
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterMessage
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessageListener
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterInfo
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterJoinedEvent
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterLock
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterMember
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.utils.ClusterUtils
@@ -53,7 +53,7 @@
import java.util.concurrent.TimeUnit
@Service
-open class HazelcastClusterService(private val applicationEventPublisher: ApplicationEventPublisher) : BlueprintClusterService {
+open class HazelcastClusterService(private val applicationEventPublisher: ApplicationEventPublisher) : BluePrintClusterService {
private val log = logger(HazelcastClusterService::class)
lateinit var hazelcast: HazelcastInstance
@@ -78,12 +78,12 @@
}
is ClusterInfo -> {
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_ID, configuration.id)
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID, configuration.nodeId)
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_ID, configuration.id)
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID, configuration.nodeId)
val memberAttributeConfig = MemberAttributeConfig()
memberAttributeConfig.setAttribute(
- BlueprintConstants.PROPERTY_CLUSTER_NODE_ID,
+ BluePrintConstants.PROPERTY_CLUSTER_NODE_ID,
configuration.nodeId
)
@@ -122,7 +122,7 @@
}
}
else -> {
- throw BlueprintProcessorException("couldn't understand the cluster configuration")
+ throw BluePrintProcessorException("couldn't understand the cluster configuration")
}
}
@@ -179,7 +179,7 @@
return ClusterLockImpl(hazelcast, name)
}
- /** Return interface may change and it will be included in BlueprintClusterService */
+ /** Return interface may change and it will be included in BluePrintClusterService */
@UseExperimental
suspend fun clusterScheduler(name: String): IScheduledExecutorService {
check(::hazelcast.isInitialized) { "failed to start and join cluster" }
@@ -225,7 +225,7 @@
check(::hazelcast.isInitialized) { "failed to start and join cluster" }
val applicationMembers: MutableMap<String, Member> = hashMapOf()
hazelcast.cluster.members.map { member ->
- val memberName: String = member.getAttribute(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID)
+ val memberName: String = member.getAttribute(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID)
if (memberName.startsWith(appName, true)) {
applicationMembers[memberName] = member
}
@@ -300,7 +300,7 @@
class HazelcastMessageListenerAdapter<E>(val listener: BlueprintClusterMessageListener<E>) : MessageListener<E> {
override fun onMessage(message: Message<E>?) = message?.let {
- BlueprintClusterMessage<E>(
+ BluePrintClusterMessage<E>(
BlueprintClusterTopic.valueOf(it.source as String),
it.messageObject,
it.publishTime,
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/factory/ComponentNodeFactory.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/factory/ComponentNodeFactory.kt
index 46ab25e..2f925dc 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/factory/ComponentNodeFactory.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/factory/ComponentNodeFactory.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.core.factory
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.slf4j.LoggerFactory
import org.springframework.context.ApplicationContext
import org.springframework.context.ApplicationContextAware
@@ -29,16 +29,16 @@
*/
interface ComponentNode {
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun validate(context: MutableMap<String, Any>, componentContext: MutableMap<String, Any?>)
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun process(context: MutableMap<String, Any>, componentContext: MutableMap<String, Any?>)
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun errorHandle(context: MutableMap<String, Any>, componentContext: MutableMap<String, Any?>)
- @Throws(BlueprintProcessorException::class)
+ @Throws(BluePrintProcessorException::class)
fun reTrigger(context: MutableMap<String, Any>, componentContext: MutableMap<String, Any?>)
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/listeners/BlueprintCompilerCacheMessageListener.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/listeners/BlueprintCompilerCacheMessageListener.kt
index 64b4f0a..3833379 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/listeners/BlueprintCompilerCacheMessageListener.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/listeners/BlueprintCompilerCacheMessageListener.kt
@@ -17,19 +17,19 @@
package org.onap.ccsdk.cds.blueprintsprocessor.core.listeners
import org.onap.ccsdk.cds.blueprintsprocessor.core.cluster.BlueprintClusterTopic
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessage
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterMessage
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessageListener
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterJoinedEvent
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintCompileCache
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.context.event.EventListener
import org.springframework.stereotype.Component
@Component
@ConditionalOnProperty("CLUSTER_ENABLED", havingValue = "true")
-open class BlueprintCompilerCacheMessageListener(private val clusterService: BlueprintClusterService) : BlueprintClusterMessageListener<String> {
+open class BlueprintCompilerCacheMessageListener(private val clusterService: BluePrintClusterService) : BlueprintClusterMessageListener<String> {
private val log = logger(BlueprintCompilerCacheMessageListener::class)
@EventListener(ClusterJoinedEvent::class)
@@ -38,10 +38,10 @@
clusterService.addBlueprintClusterMessageListener(BlueprintClusterTopic.BLUEPRINT_CLEAN_COMPILER_CACHE, this)
}
- override fun onMessage(message: BlueprintClusterMessage<String>?) {
+ override fun onMessage(message: BluePrintClusterMessage<String>?) {
message?.let {
log.info("Received ClusterMessage - Cleaning compile cache for blueprint (${it.payload})")
- BlueprintCompileCache.cleanClassLoader(it.payload)
+ BluePrintCompileCache.cleanClassLoader(it.payload)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BlueprintClusterService.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BluePrintClusterService.kt
similarity index 95%
rename from ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BlueprintClusterService.kt
rename to ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BluePrintClusterService.kt
index 900ae92..f7ba6f2 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BlueprintClusterService.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/service/BluePrintClusterService.kt
@@ -22,7 +22,7 @@
import java.util.Properties
import java.util.UUID
-interface BlueprintClusterService {
+interface BluePrintClusterService {
/** Start the cluster with [clusterInfo], By default clustering service is disabled.
* Application module has to start cluster */
@@ -95,10 +95,10 @@
fun close()
}
-class BlueprintClusterMessage<E>(val topic: BlueprintClusterTopic, val payload: E, publishTime: Long, clusterMember: ClusterMember)
+class BluePrintClusterMessage<E>(val topic: BlueprintClusterTopic, val payload: E, publishTime: Long, clusterMember: ClusterMember)
interface BlueprintClusterMessageListener<E> {
- fun onMessage(message: BlueprintClusterMessage<E>?)
+ fun onMessage(message: BluePrintClusterMessage<E>?)
}
class ClusterJoinedEvent(source: Any) : ApplicationEvent(source)
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt
index 4ac5980..72e5654 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/PayloadUtils.kt
@@ -17,11 +17,11 @@
package org.onap.ccsdk.cds.blueprintsprocessor.core.utils
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.returnNullIfMissing
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
object PayloadUtils {
@@ -38,11 +38,11 @@
fun getResponseDataFromPayload(workflowName: String, responsePayload: JsonNode): JsonNode {
return responsePayload.get("$workflowName-response").returnNullIfMissing()
- ?: throw BlueprintProcessorException("failed to get property($workflowName-response)")
+ ?: throw BluePrintProcessorException("failed to get property($workflowName-response)")
}
fun prepareInputsFromWorkflowPayload(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
payload: JsonNode,
workflowName: String
) {
@@ -51,7 +51,7 @@
}
fun prepareDynamicInputsFromWorkflowPayload(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
payload: JsonNode,
workflowName: String
) {
@@ -61,12 +61,12 @@
}
fun prepareDynamicInputsFromComponentPayload(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
payload: JsonNode
) {
payload.fields().forEach { property ->
- val path = StringBuilder(BlueprintConstants.PATH_INPUTS)
- .append(BlueprintConstants.PATH_DIVIDER).append(property.key).toString()
+ val path = StringBuilder(BluePrintConstants.PATH_INPUTS)
+ .append(BluePrintConstants.PATH_DIVIDER).append(property.key).toString()
bluePrintRuntimeService.put(path, property.value)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintPropertiesTest.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintPropertiesTest.kt
similarity index 94%
rename from ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintPropertiesTest.kt
rename to ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintPropertiesTest.kt
index fa2e4d4..c272850 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BlueprintPropertiesTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/BluePrintPropertiesTest.kt
@@ -17,4 +17,4 @@
package org.onap.ccsdk.cds.blueprintsprocessor.core
// TODO
-open class BlueprintPropertiesTest
+open class BluePrintPropertiesTest
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensionsTest.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensionsTest.kt
similarity index 94%
rename from ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensionsTest.kt
rename to ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensionsTest.kt
index ead24b5..95394e7 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BlueprintClusterExtensionsTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/BluePrintClusterExtensionsTest.kt
@@ -23,10 +23,10 @@
import org.junit.Before
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterLock
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import kotlin.test.assertEquals
-class BlueprintClusterExtensionsTest {
+class BluePrintClusterExtensionsTest {
private lateinit var clusterLockMock: ClusterLock
@@ -64,7 +64,7 @@
}
}
- @Test(expected = BlueprintException::class)
+ @Test(expected = BluePrintException::class)
fun `executeWithLock - should throw exception when lock was not acquired within timeout`() {
runBlocking {
every { runBlocking { clusterLockMock.tryLock(eq(0L)) } } returns false
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterServiceTest.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterServiceTest.kt
index 91ad657..ded0179 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/cluster/HazelcastClusterServiceTest.kt
@@ -33,11 +33,11 @@
import org.junit.After
import org.junit.Before
import org.junit.Test
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessage
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterMessage
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterMessageListener
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterInfo
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
@@ -61,8 +61,8 @@
@Test
fun testClientFileSystemYamlConfig() {
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_ID, "test-cluster")
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID, "node-1234")
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_ID, "test-cluster")
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID, "node-1234")
System.setProperty(
"hazelcast.client.config",
normalizedFile("./src/test/resources/hazelcast/hazelcast-client.yaml").absolutePath
@@ -75,8 +75,8 @@
@Test
fun testServerFileSystemYamlConfig() {
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_ID, "test-cluster")
- System.setProperty(BlueprintConstants.PROPERTY_CLUSTER_NODE_ID, "node-1234")
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_ID, "test-cluster")
+ System.setProperty(BluePrintConstants.PROPERTY_CLUSTER_NODE_ID, "node-1234")
val configFile = normalizedFile("./src/test/resources/hazelcast/hazelcast.yaml")
val config = FileSystemYamlConfig(configFile)
assertNotNull(config)
@@ -105,7 +105,7 @@
}
}
- private suspend fun testMessageReceived(bluePrintClusterServices: List<BlueprintClusterService>) {
+ private suspend fun testMessageReceived(bluePrintClusterServices: List<BluePrintClusterService>) {
val sender = bluePrintClusterServices[0] as HazelcastClusterService
val receiver = bluePrintClusterServices[1] as HazelcastClusterService
val messageSent = "hello world"
@@ -113,7 +113,7 @@
val uuid = receiver.addBlueprintClusterMessageListener(
BlueprintClusterTopic.BLUEPRINT_CLEAN_COMPILER_CACHE,
object : BlueprintClusterMessageListener<String> {
- override fun onMessage(message: BlueprintClusterMessage<String>?) {
+ override fun onMessage(message: BluePrintClusterMessage<String>?) {
log.info("Message received - ${message?.payload}")
isMessageReceived = messageSent == message?.payload
}
@@ -132,7 +132,7 @@
private suspend fun createCluster(
ids: List<Int>,
joinAsClient: Boolean? = false
- ): List<BlueprintClusterService> {
+ ): List<BluePrintClusterService> {
return withContext(Dispatchers.Default) {
val deferred = ids.map { id ->
@@ -164,7 +164,7 @@
}
}
- private suspend fun testDistributedStore(bluePrintClusterServices: List<BlueprintClusterService>) {
+ private suspend fun testDistributedStore(bluePrintClusterServices: List<BluePrintClusterService>) {
/** Test Distributed store creation */
repeat(2) { storeId ->
val store = bluePrintClusterServices[0].clusterMapStore<JsonNode>(
@@ -187,7 +187,7 @@
}
}
- private suspend fun testDistributedLock(bluePrintClusterServices: List<BlueprintClusterService>) {
+ private suspend fun testDistributedLock(bluePrintClusterServices: List<BluePrintClusterService>) {
val lockName = "sample-lock"
withContext(Dispatchers.IO) {
val deferred = async {
@@ -218,7 +218,7 @@
}
private suspend fun executeLock(
- bluePrintClusterService: BlueprintClusterService,
+ bluePrintClusterService: BluePrintClusterService,
lockId: String,
lockName: String
) {
@@ -237,7 +237,7 @@
distributedLock.close()
}
- private suspend fun executeScheduler(bluePrintClusterService: BlueprintClusterService) {
+ private suspend fun executeScheduler(bluePrintClusterService: BluePrintClusterService) {
log.info("initialising ...")
val hazelcastClusterService = bluePrintClusterService as HazelcastClusterService
@@ -251,7 +251,7 @@
// scheduler.scheduleOnAllMembersAtFixedRate(SampleSchedulerTask(), 0, 5, TimeUnit.SECONDS)
}
- private suspend fun printReachableMembers(bluePrintClusterServices: List<BlueprintClusterService>) {
+ private suspend fun printReachableMembers(bluePrintClusterServices: List<BluePrintClusterService>) {
bluePrintClusterServices.forEach { bluePrintClusterService ->
val hazelcastClusterService = bluePrintClusterService as HazelcastClusterService
val hazelcast = hazelcastClusterService.hazelcast
diff --git a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BlueprintMappingsTest.kt b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BluePrintMappingsTest.kt
similarity index 99%
rename from ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BlueprintMappingsTest.kt
rename to ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BluePrintMappingsTest.kt
index 1549c9c..e8bdbf9 100644
--- a/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BlueprintMappingsTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/processor-core/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/core/utils/BluePrintMappingsTest.kt
@@ -13,7 +13,7 @@
import java.text.SimpleDateFormat
@RunWith(SpringRunner::class)
-class BlueprintMappingsTest {
+class BluePrintMappingsTest {
val formatter = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
val dateString = "2019-01-16T18:25:43.511Z"
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt
similarity index 87%
rename from ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibConfiguration.kt
rename to ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt
index 701fd17..6e9e4b5 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibConfiguration.kt
@@ -19,9 +19,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintRestLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BluePrintRestLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@@ -29,19 +29,19 @@
@Configuration
@ComponentScan
@EnableConfigurationProperties
-open class BlueprintRestLibConfiguration
+open class BluePrintRestLibConfiguration
/**
* Exposed Dependency Service by this Rest Lib Module
*/
-fun BlueprintDependencyService.restLibPropertyService(): BlueprintRestLibPropertyService =
+fun BluePrintDependencyService.restLibPropertyService(): BluePrintRestLibPropertyService =
instance(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
-fun BlueprintDependencyService.restClientService(selector: String): BlueprintWebClientService {
+fun BluePrintDependencyService.restClientService(selector: String): BlueprintWebClientService {
return restLibPropertyService().blueprintWebClientService(selector)
}
-fun BlueprintDependencyService.restClientService(jsonNode: JsonNode): BlueprintWebClientService {
+fun BluePrintDependencyService.restClientService(jsonNode: JsonNode): BlueprintWebClientService {
return restLibPropertyService().blueprintWebClientService(jsonNode)
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibData.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BlueprintRestLibData.kt
rename to ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/BluePrintRestLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt
index 45b9e38..ca1046d 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/RestClientPropertiesDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -30,25 +30,25 @@
/** Relationships Type DSL for Rest */
fun ServiceTemplateBuilder.relationshipTypeConnectsToRestClient() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToRestClient()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToRestClient()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToRestClient(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToRestClient(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through"
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -66,35 +66,35 @@
open class RestClientRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT, description
) {
fun basicAuth(block: BasicAuthRestClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.basicAuthRestClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.basicAuthRestClientProperties(block))
}
fun tokenAuth(block: TokenAuthRestClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.tokenAuthRestClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.tokenAuthRestClientProperties(block))
}
fun sslAuth(block: SslAuthRestClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.sslRestClientProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.sslRestClientProperties(block))
}
}
-fun BlueprintTypes.basicAuthRestClientProperties(block: BasicAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.basicAuthRestClientProperties(block: BasicAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = BasicAuthRestClientPropertiesAssignmentBuilder().apply(block).build()
assignments[RestClientProperties::type.name] = RestLibConstants.TYPE_BASIC_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.tokenAuthRestClientProperties(block: TokenAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.tokenAuthRestClientProperties(block: TokenAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = TokenAuthRestClientPropertiesAssignmentBuilder().apply(block).build()
assignments[RestClientProperties::type.name] = RestLibConstants.TYPE_TOKEN_AUTH.asJsonPrimitive()
return assignments.asJsonType()
}
-fun BlueprintTypes.sslRestClientProperties(block: SslAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.sslRestClientProperties(block: SslAuthRestClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val assignments = SslAuthRestClientPropertiesAssignmentBuilder().apply(block).build()
assignments[RestClientProperties::type.name] = RestLibConstants.TYPE_SSL_NO_AUTH.asJsonPrimitive()
return assignments.asJsonType()
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
similarity index 95%
rename from ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyService.kt
rename to ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
index d28bd77..a2c68ec 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyService.kt
@@ -19,7 +19,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.PolicyManagerRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
@@ -28,12 +28,12 @@
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLTokenAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.TokenAuthRestClientProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(RestLibConstants.SERVICE_BLUEPRINT_REST_LIB_PROPERTY)
-open class BlueprintRestLibPropertyService(private var bluePrintPropertiesService: BlueprintPropertiesService) {
+open class BluePrintRestLibPropertyService(private var bluePrintPropertiesService: BluePrintPropertiesService) {
private var preInterceptor: PreInterceptor? = null
private var postInterceptor: PostInterceptor? = null
@@ -88,7 +88,7 @@
policyManagerRestClientProperties(prefix)
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Rest adaptor($type) is" +
" not supported"
)
@@ -120,7 +120,7 @@
JacksonUtils.readValue(jsonNode, SSLRestClientProperties::class.java)!!
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"Rest adaptor($type) is not supported"
)
}
@@ -141,7 +141,7 @@
return BasicAuthRestClientService(restClientProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get rest service for type:${restClientProperties.type} uri: ${restClientProperties.url}")
+ throw BluePrintProcessorException("couldn't get rest service for type:${restClientProperties.type} uri: ${restClientProperties.url}")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
index 43dbcbe..945d298 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintWebClientService.kt
@@ -36,9 +36,9 @@
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.RestLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.rest.utils.WebClientUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintRetryException
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintIOUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintRetryException
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintIOUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.http.HttpHeaders
import org.springframework.http.HttpMethod
@@ -59,7 +59,7 @@
.build()
}
- /** High performance non blocking Retry function, If execution block [block] throws BlueprintRetryException
+ /** High performance non blocking Retry function, If execution block [block] throws BluePrintRetryException
* exception then this will perform wait and retrigger accoring to times [times] with delay [delay]
*/
suspend fun <T> retry(
@@ -69,11 +69,11 @@
block: suspend (Int) -> T
): T {
val exceptionBlock = { e: Exception ->
- if (e !is BlueprintRetryException) {
+ if (e !is BluePrintRetryException) {
throw e
}
}
- return BlueprintIOUtils.retry(times, initialDelay, delay, block, exceptionBlock)
+ return BluePrintIOUtils.retry(times, initialDelay, delay, block, exceptionBlock)
}
fun exchangeResource(methodType: String, path: String, request: String): WebClientResponse<String> {
@@ -98,7 +98,7 @@
HttpMethod.POST -> post(path, request, convertedHeaders, String::class.java)
HttpMethod.PUT -> put(path, request, convertedHeaders, String::class.java)
HttpMethod.PATCH -> patch(path, request, convertedHeaders, String::class.java)
- else -> throw BlueprintProcessorException(
+ else -> throw BluePrintProcessorException(
"Unsupported methodType($methodType) attempted on path($path)"
)
}
@@ -270,7 +270,7 @@
HttpMethod.DELETE -> deleteNB(path, convertedHeaders, responseType)
HttpMethod.PUT -> putNB(path, request, convertedHeaders, responseType)
HttpMethod.PATCH -> patchNB(path, request, convertedHeaders, responseType)
- else -> throw BlueprintProcessorException("Unsupported methodType($methodType)")
+ else -> throw BluePrintProcessorException("Unsupported methodType($methodType)")
}
}
@@ -323,7 +323,7 @@
" User-supplied \"additionalHeaders\" cannot contain AUTHORIZATION header with" +
" auth-type \"${RestLibConstants.TYPE_BASIC_AUTH}\""
WebClientUtils.log.error(errMsg)
- throw BlueprintProcessorException(errMsg)
+ throw BluePrintProcessorException(errMsg)
} else {
customHeaders.putAll(it)
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt
index 8c7ba65..611c085 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestLoggerService.kt
@@ -29,12 +29,12 @@
import kotlinx.coroutines.reactor.asCoroutineContext
import kotlinx.coroutines.withContext
import org.apache.http.message.BasicHeader
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_INVOCATION_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_ORIGINATOR_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_PARTNER_NAME
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_REQUEST_ID
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.ONAP_SUBREQUEST_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_INVOCATION_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_ORIGINATOR_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_PARTNER_NAME
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_REQUEST_ID
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.ONAP_SUBREQUEST_ID
import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.defaultToUUID
@@ -65,7 +65,7 @@
fun httpInvoking(headers: Array<BasicHeader>) {
headers.plusElement(BasicHeader(ONAP_REQUEST_ID, MDC.get("InvocationID").defaultToUUID()))
headers.plusElement(BasicHeader(ONAP_INVOCATION_ID, UUID.randomUUID().toString()))
- headers.plusElement(BasicHeader(ONAP_PARTNER_NAME, BlueprintConstants.APP_NAME))
+ headers.plusElement(BasicHeader(ONAP_PARTNER_NAME, BluePrintConstants.APP_NAME))
}
}
@@ -98,7 +98,7 @@
resHeaders[ONAP_SUBREQUEST_ID] = MDC.get("SubRequestID")
resHeaders[ONAP_ORIGINATOR_ID] = MDC.get("OriginatorID")
resHeaders[ONAP_INVOCATION_ID] = MDC.get("InvocationID")
- resHeaders[ONAP_PARTNER_NAME] = BlueprintConstants.APP_NAME
+ resHeaders[ONAP_PARTNER_NAME] = BluePrintConstants.APP_NAME
} catch (e: Exception) {
log.warn("couldn't set response headers", e)
} finally {
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
similarity index 94%
rename from ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt
rename to ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
index 117fbbd..62fca20 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BlueprintRestLibPropertyServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BluePrintRestLibPropertyServiceTest.kt
@@ -23,13 +23,13 @@
import com.fasterxml.jackson.databind.ObjectMapper
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BlueprintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLBasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.SSLTokenAuthRestClientProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
@@ -43,8 +43,8 @@
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintRestLibConfiguration::class, BlueprintPropertyConfiguration::class,
- BlueprintPropertiesService::class
+ BluePrintRestLibConfiguration::class, BluePrintPropertyConfiguration::class,
+ BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -75,10 +75,10 @@
"blueprintsprocessor.restclient.ssl.sslKeyPassword=changeit"
]
)
-class BlueprintRestLibPropertyServiceTest {
+class BluePrintRestLibPropertyServiceTest {
@Autowired
- lateinit var bluePrintRestLibPropertyService: BlueprintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
@Test
fun testRestClientProperties() {
@@ -287,7 +287,7 @@
additionalHeadersChangedContentTypeToAPPLICATION_XML(endPointWithHeadersJson)
}
- // called from within "assertFailsWith(exceptionClass = BlueprintProcessorException::class) {"
+ // called from within "assertFailsWith(exceptionClass = BluePrintProcessorException::class) {"
private fun attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson: String) {
val parsedObj: JsonNode = defaultMapper.readTree(endPointWithHeadersJson)
val bpWebClientService =
@@ -296,13 +296,13 @@
}
@Test
- fun `BasicAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `BasicAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = basicAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = basicAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -335,13 +335,13 @@
}
@Test
- fun `TokenAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `TokenAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslTokenAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslTokenAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -375,13 +375,13 @@
}
@Test
- fun `SSLBasicAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `SSLBasicAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslBasicAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslBasicAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
@@ -415,19 +415,19 @@
}
@Test
- fun `SSLNoAuth WebClientService throws BlueprintProcessorException if additionalHeaders contain Authorization`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ fun `SSLNoAuth WebClientService throws BluePrintProcessorException if additionalHeaders contain Authorization`() {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslNoAuthEndpointWithHeadersField(additionalHeadersWithAuth)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
// spec says headers are case insensitive...
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
val endPointWithHeadersJson = sslNoAuthEndpointWithHeadersField(additionalHeadersWithAuthLowercased)
attemptToPutAuthorizationHeaderIntoAdditionalHeaders(endPointWithHeadersJson)
}
}
- companion object BlueprintRestLibPropertyServiceTest {
+ companion object BluePrintRestLibPropertyServiceTest {
val defaultMapper = ObjectMapper()
val expectedTokenAuthDefaultHeaders = mapOf<String, String>(
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
index 6b083aa..f06f827 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientPropertiesDSLTest.kt
@@ -19,7 +19,7 @@
import org.junit.Test
import org.onap.ccsdk.cds.blueprintsprocessor.rest.relationshipTemplateRestClient
import org.onap.ccsdk.cds.blueprintsprocessor.rest.relationshipTypeConnectsToRestClient
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -73,12 +73,12 @@
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_REST_CLIENT}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
index e14e035..0309966 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/RestClientServiceTest.kt
@@ -27,9 +27,9 @@
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.BlueprintRestLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.rest.BluePrintRestLibConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
@@ -66,9 +66,9 @@
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
@ContextConfiguration(
classes = [
- BlueprintRestLibConfiguration::class, SampleController::class,
+ BluePrintRestLibConfiguration::class, SampleController::class,
SecurityConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -96,7 +96,7 @@
class RestClientServiceTest {
@Autowired
- lateinit var bluePrintRestLibPropertyService: BlueprintRestLibPropertyService
+ lateinit var bluePrintRestLibPropertyService: BluePrintRestLibPropertyService
@Autowired
lateinit var httpHandler: HttpHandler
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibConfiguration.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt
similarity index 84%
rename from ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibConfiguration.kt
rename to ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt
index 7b47187..dc10722 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibConfiguration.kt
@@ -17,9 +17,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.ssh
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.BlueprintSshLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.BluePrintSshLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.BlueprintSshClientService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
@@ -27,18 +27,18 @@
@Configuration
@ComponentScan
@EnableConfigurationProperties
-open class BlueprintSshLibConfiguration
+open class BluePrintSshLibConfiguration
/**
* Exposed Dependency Service by this SSH Lib Module
*/
-fun BlueprintDependencyService.sshLibPropertyService(): BlueprintSshLibPropertyService =
+fun BluePrintDependencyService.sshLibPropertyService(): BluePrintSshLibPropertyService =
instance(SshLibConstants.SERVICE_BLUEPRINT_SSH_LIB_PROPERTY)
-fun BlueprintDependencyService.sshClientService(selector: String): BlueprintSshClientService =
+fun BluePrintDependencyService.sshClientService(selector: String): BlueprintSshClientService =
sshLibPropertyService().blueprintSshClientService(selector)
-fun BlueprintDependencyService.sshClientService(jsonNode: JsonNode): BlueprintSshClientService =
+fun BluePrintDependencyService.sshClientService(jsonNode: JsonNode): BlueprintSshClientService =
sshLibPropertyService().blueprintSshClientService(jsonNode)
class SshLibConstants {
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibData.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibData.kt
similarity index 100%
rename from ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BlueprintSshLibData.kt
rename to ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/BluePrintSshLibData.kt
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSL.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSL.kt
index 256924c..a7702d4 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSL.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSL.kt
@@ -19,8 +19,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.ssh
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
@@ -32,25 +32,25 @@
/** Relationships Types DSL for Message Producer */
fun ServiceTemplateBuilder.relationshipTypeConnectsToSshClient() {
- val relationshipType = BlueprintTypes.relationshipTypeConnectsToSshClient()
+ val relationshipType = BluePrintTypes.relationshipTypeConnectsToSshClient()
if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
this.relationshipTypes!![relationshipType.id!!] = relationshipType
}
-fun BlueprintTypes.relationshipTypeConnectsToSshClient(): RelationshipType {
+fun BluePrintTypes.relationshipTypeConnectsToSshClient(): RelationshipType {
return relationshipType(
- id = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT,
- version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
+ id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT,
+ version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
description = "Relationship connects to through SSH Client."
) {
property(
- BlueprintConstants.PROPERTY_CONNECTION_CONFIG,
- BlueprintConstants.DATA_TYPE_MAP,
+ BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
+ BluePrintConstants.DATA_TYPE_MAP,
true,
"Connection Config details."
)
- validTargetTypes(arrayListOf(BlueprintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
+ validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
}
}
@@ -68,15 +68,15 @@
open class SshRelationshipTemplateBuilder(name: String, description: String) :
RelationshipTemplateBuilder(
name,
- BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT, description
+ BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT, description
) {
fun basicAuth(block: BasicAuthSshClientPropertiesAssignmentBuilder.() -> Unit) {
- property(BlueprintConstants.PROPERTY_CONNECTION_CONFIG, BlueprintTypes.basicAuthSshProperties(block))
+ property(BluePrintConstants.PROPERTY_CONNECTION_CONFIG, BluePrintTypes.basicAuthSshProperties(block))
}
}
-fun BlueprintTypes.basicAuthSshProperties(block: BasicAuthSshClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
+fun BluePrintTypes.basicAuthSshProperties(block: BasicAuthSshClientPropertiesAssignmentBuilder.() -> Unit): JsonNode {
val sshProperties = BasicAuthSshClientPropertiesAssignmentBuilder().apply(block).build()
sshProperties[SshClientProperties::type.name] = SshLibConstants.TYPE_BASIC_AUTH.asJsonPrimitive()
return sshProperties.asJsonType()
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt
index 46756e6..6ee73c2 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BasicAuthSshClientService.kt
@@ -25,7 +25,7 @@
import org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier
import org.apache.sshd.client.session.ClientSession
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BasicAuthSshClientProperties
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.slf4j.LoggerFactory
import java.io.ByteArrayOutputStream
import java.io.IOException
@@ -76,7 +76,7 @@
channel!!.err = ByteArrayOutputStream()
channel!!.open()
} catch (e: Exception) {
- throw BlueprintProcessorException("Failed to start Shell channel: ${e.message}")
+ throw BluePrintProcessorException("Failed to start Shell channel: ${e.message}")
}
}
@@ -97,7 +97,7 @@
}
}
} catch (e: Exception) {
- throw BlueprintProcessorException("Failed to execute commands, below the error message : ${e.message}")
+ throw BluePrintProcessorException("Failed to execute commands, below the error message : ${e.message}")
}
return response
}
@@ -111,7 +111,7 @@
teeOutput!!.flush()
deviceOutput = waitForPrompt(timeOut)
} catch (e: IOException) {
- throw BlueprintProcessorException("Exception during command execution: ${e.message}", e)
+ throw BluePrintProcessorException("Exception during command execution: ${e.message}", e)
}
if (detectFailure(deviceOutput)) {
@@ -130,7 +130,7 @@
Collections.unmodifiableSet(EnumSet.of(ClientChannelEvent.CLOSED)), timeOut
)
if (channel!!.out.toString().indexOfAny(arrayListOf("$", ">", "#")) <= 0 && waitMask.contains(ClientChannelEvent.TIMEOUT)) {
- throw BlueprintProcessorException("Timeout: Failed to retrieve commands result in $timeOut ms")
+ throw BluePrintProcessorException("Timeout: Failed to retrieve commands result in $timeOut ms")
}
val outputResult = channel!!.out.toString()
channel!!.out.flush()
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyService.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyService.kt
similarity index 86%
rename from ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyService.kt
rename to ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyService.kt
index 4803d5f..90a1746 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyService.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyService.kt
@@ -17,16 +17,16 @@
package org.onap.ccsdk.cds.blueprintsprocessor.ssh.service
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BasicAuthSshClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.SshClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.SshLibConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.stereotype.Service
@Service(SshLibConstants.SERVICE_BLUEPRINT_SSH_LIB_PROPERTY)
-open class BlueprintSshLibPropertyService(private var bluePrintProperties: BlueprintPropertiesService) {
+open class BluePrintSshLibPropertyService(private var bluePrintProperties: BluePrintPropertiesService) {
fun blueprintSshClientService(jsonNode: JsonNode): BlueprintSshClientService {
val restClientProperties = sshClientProperties(jsonNode)
@@ -46,14 +46,14 @@
basicAuthSshClientProperties(prefix)
}
else -> {
- throw BlueprintProcessorException("SSH adaptor($type) is not supported")
+ throw BluePrintProcessorException("SSH adaptor($type) is not supported")
}
}
}
fun sshClientProperties(jsonNode: JsonNode): SshClientProperties {
val type = jsonNode.get("type")?.textValue()
- ?: throw BlueprintProcessorException("missing type field in ssh client properties")
+ ?: throw BluePrintProcessorException("missing type field in ssh client properties")
return when (type) {
SshLibConstants.TYPE_BASIC_AUTH -> {
JacksonUtils.readValue(
@@ -62,7 +62,7 @@
)!!
}
else -> {
- throw BlueprintProcessorException("SSH adaptor($type) is not supported")
+ throw BluePrintProcessorException("SSH adaptor($type) is not supported")
}
}
}
@@ -74,7 +74,7 @@
return BasicAuthSshClientService(sshClientProperties)
}
else -> {
- throw BlueprintProcessorException("couldn't get SSH client service for")
+ throw BluePrintProcessorException("couldn't get SSH client service for")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSLTest.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSLTest.kt
index 510dc7d..85891b1 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSLTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/SshPropertiesDSLTest.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.ssh
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipTypeConnectsTo
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import kotlin.test.assertEquals
@@ -53,12 +53,12 @@
assertNotNull(relationshipTypes, "failed to get relationship types")
assertEquals(2, relationshipTypes.size, "relationshipTypes doesn't match")
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO}"
)
assertNotNull(
- relationshipTypes[BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT],
- "failed to get ${BlueprintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT}"
+ relationshipTypes[BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT],
+ "failed to get ${BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_SSH_CLIENT}"
)
}
}
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyServiceTest.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyServiceTest.kt
similarity index 84%
rename from ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyServiceTest.kt
rename to ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyServiceTest.kt
index 88c734a..43a997a 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshLibPropertyServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BluePrintSshLibPropertyServiceTest.kt
@@ -18,10 +18,10 @@
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BasicAuthSshClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BlueprintSshLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BluePrintSshLibConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
@@ -32,8 +32,8 @@
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintSshLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintSshLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -46,10 +46,10 @@
"blueprintsprocessor.sshclient.sample.username=dummy"
]
)
-class BlueprintSshLibPropertyServiceTest {
+class BluePrintSshLibPropertyServiceTest {
@Autowired
- lateinit var bluePrintSshLibPropertyService: BlueprintSshLibPropertyService
+ lateinit var bluePrintSshLibPropertyService: BluePrintSshLibPropertyService
@Test
fun testRestClientProperties() {
diff --git a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshClientServiceTest.kt b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshClientServiceTest.kt
index 1c9d8d1..1cf0de5 100644
--- a/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshClientServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/ssh-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/ssh/service/BlueprintSshClientServiceTest.kt
@@ -28,9 +28,9 @@
import org.apache.sshd.server.session.ServerSession
import org.apache.sshd.server.shell.ProcessShellCommandFactory
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BlueprintSshLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.ssh.BluePrintSshLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.ssh.service.echoShell.EchoShellFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -47,8 +47,8 @@
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintSshLibConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class
+ BluePrintSshLibConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class
]
)
@TestPropertySource(
@@ -64,9 +64,9 @@
class BlueprintSshClientServiceTest {
@Autowired
- lateinit var bluePrintSshLibPropertyService: BlueprintSshLibPropertyService
+ lateinit var bluePrintSshLibPropertyService: BluePrintSshLibPropertyService
- lateinit var bluePrintSshLibPropertyServiceMock: BlueprintSshLibPropertyService
+ lateinit var bluePrintSshLibPropertyServiceMock: BluePrintSshLibPropertyService
private lateinit var sshServer: SshServer
diff --git a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
index 58d5726..634c336 100644
--- a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/ResourceConfigSnapshotControllerTest.kt
@@ -19,8 +19,8 @@
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
@@ -35,7 +35,7 @@
@RunWith(SpringRunner::class)
@WebFluxTest
@ContextConfiguration(
- classes = [BlueprintCoreConfiguration::class, BlueprintCatalogService::class, ErrorCatalogTestConfiguration::class]
+ classes = [BluePrintCoreConfiguration::class, BluePrintCatalogService::class, ErrorCatalogTestConfiguration::class]
)
@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@TestPropertySource(locations = ["classpath:application-test.properties"])
diff --git a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/TestDatabaseConfiguration.kt
index 9567ebc..ee4c0a5 100644
--- a/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/configs-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/configs/api/TestDatabaseConfiguration.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.configs.api
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDatabaseConfiguration
import org.springframework.context.annotation.Bean
@@ -29,7 +29,7 @@
import javax.sql.DataSource
@Configuration
-@Import(BlueprintDBLibConfiguration::class)
+@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = [
"org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution",
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandler.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandler.kt
similarity index 85%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandler.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandler.kt
index 97e43ec..54f8dbc 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandler.kt
@@ -22,21 +22,21 @@
import com.google.protobuf.util.JsonFormat
import io.grpc.stub.StreamObserver
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.BlueprintModelHandler
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.BluePrintModelHandler
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.onap.ccsdk.cds.controllerblueprints.core.emptyTONull
import org.onap.ccsdk.cds.controllerblueprints.core.utils.currentTimestamp
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementServiceGrpc
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput
import org.onap.ccsdk.cds.controllerblueprints.management.api.DownloadAction
import org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk
import org.onap.ccsdk.cds.controllerblueprints.management.api.RemoveAction
@@ -51,18 +51,18 @@
// TODO("Convert to coroutines handler")
@Service
-open class BlueprintManagementGRPCHandler(
- private val bluePrintModelHandler: BlueprintModelHandler,
+open class BluePrintManagementGRPCHandler(
+ private val bluePrintModelHandler: BluePrintModelHandler,
private val errorCatalogService: ErrorCatalogService
) :
- BlueprintManagementServiceGrpc.BlueprintManagementServiceImplBase() {
+ BluePrintManagementServiceGrpc.BluePrintManagementServiceImplBase() {
- private val log = LoggerFactory.getLogger(BlueprintManagementGRPCHandler::class.java)
+ private val log = LoggerFactory.getLogger(BluePrintManagementGRPCHandler::class.java)
@PreAuthorize("hasRole('USER')")
override fun uploadBlueprint(
- request: BlueprintUploadInput,
- responseObserver: StreamObserver<BlueprintManagementOutput>
+ request: BluePrintUploadInput,
+ responseObserver: StreamObserver<BluePrintManagementOutput>
) {
runBlocking {
@@ -91,7 +91,7 @@
failStatus(
request.commonHeader,
"Upload action($uploadAction) not implemented",
- BlueprintProcessorException("Not Implemented")
+ BluePrintProcessorException("Not Implemented")
)
)
}
@@ -104,7 +104,7 @@
failStatus(
request.commonHeader,
"Upload action($uploadAction) not implemented",
- BlueprintProcessorException("Not implemented")
+ BluePrintProcessorException("Not implemented")
)
)
}
@@ -124,8 +124,8 @@
@PreAuthorize("hasRole('USER')")
override fun downloadBlueprint(
- request: BlueprintDownloadInput,
- responseObserver: StreamObserver<BlueprintManagementOutput>
+ request: BluePrintDownloadInput,
+ responseObserver: StreamObserver<BluePrintManagementOutput>
) {
runBlocking {
val blueprintName = request.actionIdentifiers.blueprintName
@@ -148,7 +148,7 @@
failStatus(
request.commonHeader,
"Search action($searchAction) not implemented",
- BlueprintProcessorException("Not implemented")
+ BluePrintProcessorException("Not implemented")
)
)
}
@@ -168,9 +168,9 @@
@PreAuthorize("hasRole('USER')")
override fun removeBlueprint(
- request: BlueprintRemoveInput,
+ request: BluePrintRemoveInput,
responseObserver:
- StreamObserver<BlueprintManagementOutput>
+ StreamObserver<BluePrintManagementOutput>
) {
runBlocking {
@@ -195,7 +195,7 @@
failStatus(
request.commonHeader,
"Remove action($removeAction) not implemented",
- BlueprintProcessorException("Not implemented")
+ BluePrintProcessorException("Not implemented")
)
)
}
@@ -214,8 +214,8 @@
}
override fun bootstrapBlueprint(
- request: BlueprintBootstrapInput,
- responseObserver: StreamObserver<BlueprintManagementOutput>
+ request: BluePrintBootstrapInput,
+ responseObserver: StreamObserver<BluePrintManagementOutput>
) {
runBlocking {
try {
@@ -241,33 +241,33 @@
}
}
- private fun outputWithFileBytes(header: CommonHeader, byteArray: ByteArray): BlueprintManagementOutput =
- BlueprintManagementOutput.newBuilder()
+ private fun outputWithFileBytes(header: CommonHeader, byteArray: ByteArray): BluePrintManagementOutput =
+ BluePrintManagementOutput.newBuilder()
.setCommonHeader(header)
.setFileChunk(FileChunk.newBuilder().setChunk(ByteString.copyFrom(byteArray)))
.setStatus(
Status.newBuilder()
.setTimestamp(currentTimestamp())
.setEventType(EventType.EVENT_COMPONENT_EXECUTED)
- .setMessage(BlueprintConstants.STATUS_SUCCESS)
+ .setMessage(BluePrintConstants.STATUS_SUCCESS)
.setCode(200)
.build()
)
.build()
- private fun successStatus(header: CommonHeader, propertyContent: String? = null): BlueprintManagementOutput {
+ private fun successStatus(header: CommonHeader, propertyContent: String? = null): BluePrintManagementOutput {
// Populate Response Payload
- val propertiesBuilder = BlueprintManagementOutput.newBuilder().propertiesBuilder
+ val propertiesBuilder = BluePrintManagementOutput.newBuilder().propertiesBuilder
propertyContent?.let {
JsonFormat.parser().merge(propertyContent, propertiesBuilder)
}
- return BlueprintManagementOutput.newBuilder()
+ return BluePrintManagementOutput.newBuilder()
.setCommonHeader(header)
.setProperties(propertiesBuilder.build())
.setStatus(
Status.newBuilder()
.setTimestamp(currentTimestamp())
- .setMessage(BlueprintConstants.STATUS_SUCCESS)
+ .setMessage(BluePrintConstants.STATUS_SUCCESS)
.setEventType(EventType.EVENT_COMPONENT_EXECUTED)
.setCode(200)
.build()
@@ -275,19 +275,19 @@
.build()
}
- private fun failStatus(header: CommonHeader, message: String, e: Exception): BlueprintManagementOutput {
+ private fun failStatus(header: CommonHeader, message: String, e: Exception): BluePrintManagementOutput {
log.error(message, e)
- return if (e is BlueprintProcessorException) onErrorCatalog(header, message, e) else onError(header, message, e)
+ return if (e is BluePrintProcessorException) onErrorCatalog(header, message, e) else onError(header, message, e)
}
- private fun onError(header: CommonHeader, message: String, error: Exception): BlueprintManagementOutput {
+ private fun onError(header: CommonHeader, message: String, error: Exception): BluePrintManagementOutput {
val code = GrpcErrorCodes.code(ErrorCatalogCodes.GENERIC_FAILURE)
- return BlueprintManagementOutput.newBuilder()
+ return BluePrintManagementOutput.newBuilder()
.setCommonHeader(header)
.setStatus(
Status.newBuilder()
.setTimestamp(currentTimestamp())
- .setMessage(BlueprintConstants.STATUS_FAILURE)
+ .setMessage(BluePrintConstants.STATUS_FAILURE)
.setEventType(EventType.EVENT_COMPONENT_FAILURE)
.setErrorMessage("Error : $message \n Details: ${error.errorMessageOrDefault()}")
.setCode(code)
@@ -296,20 +296,20 @@
.build()
}
- private fun onErrorCatalog(header: CommonHeader, message: String, error: BlueprintProcessorException):
- BlueprintManagementOutput {
+ private fun onErrorCatalog(header: CommonHeader, message: String, error: BluePrintProcessorException):
+ BluePrintManagementOutput {
val err = if (error.protocol == "") {
error.grpc(ErrorCatalogCodes.GENERIC_FAILURE)
} else {
error.convertToGrpc()
}
val errorPayload = errorCatalogService.errorPayload(err.addErrorPayloadMessage(message))
- return BlueprintManagementOutput.newBuilder()
+ return BluePrintManagementOutput.newBuilder()
.setCommonHeader(header)
.setStatus(
Status.newBuilder()
.setTimestamp(currentTimestamp())
- .setMessage(BlueprintConstants.STATUS_FAILURE)
+ .setMessage(BluePrintConstants.STATUS_FAILURE)
.setEventType(EventType.EVENT_COMPONENT_FAILURE)
.setErrorMessage("Error : ${errorPayload.message}")
.setCode(errorPayload.code)
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt
index f19824d..66d4b0e 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt
@@ -25,10 +25,10 @@
import io.swagger.annotations.ApiResponses
import org.jetbrains.annotations.NotNull
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModelSearch
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.BlueprintModelHandler
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.BluePrintModelHandler
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintSortByOption
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.mdcWebCoroutineScope
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonString
import org.springframework.core.io.Resource
import org.springframework.data.domain.Page
@@ -62,7 +62,7 @@
value = "Blueprint Model Catalog",
description = "Manages all blueprint models which are available in CDS"
)
-open class BlueprintModelController(private val bluePrintModelHandler: BlueprintModelHandler) {
+open class BlueprintModelController(private val bluePrintModelHandler: BluePrintModelHandler) {
@PostMapping(
path = arrayOf("/bootstrap"), produces = arrayOf(MediaType.APPLICATION_JSON_VALUE),
@@ -79,7 +79,7 @@
ApiResponse(code = 500, message = "Internal Server Error")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun bootstrap(
@ApiParam(required = true, value = "Specifies which elements to load")
@@ -100,7 +100,7 @@
ApiResponse(code = 500, message = "Internal Server Error")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun saveBlueprint(
@ApiParam(name = "file", value = "CBA file to be uploaded (example: cba.zip)", required = true)
@@ -162,7 +162,7 @@
@PathVariable(value = "keyword") keyWord: String
): List<BlueprintModelSearch> =
mdcWebCoroutineScope {
- bluePrintModelHandler.searchBlueprintModelsByKeyWord(keyWord)
+ bluePrintModelHandler.searchBluePrintModelsByKeyWord(keyWord)
}
@GetMapping("/paged/meta-data/{keyword}", produces = [MediaType.APPLICATION_JSON_VALUE])
@@ -186,7 +186,7 @@
offset, limit,
Sort.Direction.fromString(sortType), sort.columnName
)
- return this.bluePrintModelHandler.searchBlueprintModelsByKeyWordPaged(keyWord, pageRequest)
+ return this.bluePrintModelHandler.searchBluePrintModelsByKeyWordPaged(keyWord, pageRequest)
}
@DeleteMapping("/{id}")
@@ -198,7 +198,7 @@
ApiResponse(code = 200, message = "OK"),
ApiResponse(code = 404, message = "RESOURCE_NOT_FOUND")
)
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun deleteBlueprint(
@ApiParam(value = "ID of the blueprint model to delete", required = true, example = "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4")
@@ -218,7 +218,7 @@
ApiResponse(code = 404, message = "Not Found")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun getBlueprintByNameAndVersion(
@ApiParam(value = "Name of the blueprint model", required = true, example = "pnf_netconf") @PathVariable(value = "name") name: String,
@@ -242,7 +242,7 @@
ApiResponse(code = 404, message = "Not Found")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun downloadBlueprintByNameAndVersion(
@ApiParam(value = "Name of the blueprint model", required = true, example = "pnf_netconf") @PathVariable(value = "name") name: String,
@@ -262,7 +262,7 @@
ApiResponse(code = 404, message = "Not Found")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun getBlueprintModel(
@ApiParam(value = "ID of the blueprint model to search for", required = true, example = "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4")
@@ -281,9 +281,9 @@
ApiResponse(code = 404, message = "Not Found")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
- suspend fun downloadBlueprint(
+ suspend fun downloadBluePrint(
@ApiParam(value = "ID of the blueprint model to download", required = true, example = "67ec1f96-ab55-4b81-aff9-23ee0ed1d7a4")
@PathVariable(value = "id") id: String
): ResponseEntity<Resource> =
@@ -304,7 +304,7 @@
"The enrichment process will complete the package by providing all the definition of types used."
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun enrichBlueprint(
@ApiParam(name = "file", value = "CBA zip file to be uploaded (example: cba_unenriched.zip)", required = true)
@@ -330,7 +330,7 @@
ApiResponse(code = 503, message = "Service Unavailable")
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun enrichAndPubishlueprint(
@ApiParam(name = "file", value = "Unenriched CBA zip file to be uploaded (example: cba_unenriched.zip)", required = true)
@@ -346,7 +346,7 @@
response = BlueprintModelSearch::class
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun publishBlueprint(
@ApiParam(name = "file", value = "Enriched CBA zip file to be uploaded (example: cba_enriched.zip)", required = true)
@@ -405,7 +405,7 @@
"Inputs, outputs and data types of workflow is returned."
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun workflowSpec(
@ApiParam(required = true, value = "Blueprint and workflow identification")
@@ -428,7 +428,7 @@
notes = "Get all available workflows of a Blueprint identified by its name and version."
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
@PreAuthorize("hasRole('USER')")
suspend fun getWorkflowList(
@ApiParam(value = "Name of the blueprint model", example = "pnf_netconf", required = true)
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/DesignerApiData.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/DesignerApiData.kt
index 5406b77..741a911 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/DesignerApiData.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/DesignerApiData.kt
@@ -20,9 +20,9 @@
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ResourceDictionary
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.DATA_TYPE_JSON
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.DEFAULT_VERSION_NUMBER
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants.TOSCA_SPEC
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.DATA_TYPE_JSON
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.DEFAULT_VERSION_NUMBER
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants.TOSCA_SPEC
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeController.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeController.kt
index eb9a980..3689f73 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeController.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeController.kt
@@ -22,7 +22,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.ModelTypeHandler
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.mdcWebCoroutineScope
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.springframework.http.MediaType
import org.springframework.web.bind.annotation.DeleteMapping
import org.springframework.web.bind.annotation.GetMapping
@@ -86,7 +86,7 @@
response = ModelType::class
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveModelType(@RequestBody modelType: ModelType): ModelType = mdcWebCoroutineScope {
modelTypeHandler.saveModel(modelType)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryController.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryController.kt
index 62997cc..8d69ccd 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryController.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ResourceDictionaryController.kt
@@ -22,7 +22,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ResourceDictionary
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.ResourceDictionaryHandler
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.mdcWebCoroutineScope
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceSourceMapping
import org.springframework.http.MediaType
@@ -50,7 +50,7 @@
response = ResourceDictionary::class
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun getResourceDictionaryByName(
@ApiParam(value = "Name of the resource", required = true, example = "\"hostname\"")
@PathVariable(value = "name") name: String
@@ -69,7 +69,7 @@
response = ResourceDictionary::class
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveResourceDictionary(
@ApiParam(value = "Resource dictionary to store", required = true)
@RequestBody dataDictionary: ResourceDictionary
@@ -90,7 +90,7 @@
response = ResourceDefinition::class
)
@ResponseBody
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveResourceDictionary(
@ApiParam(value = "Resource definition to generate", required = true)
@RequestBody resourceDefinition: ResourceDefinition
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintArtifactDefinitionEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintArtifactDefinitionEnhancerImpl.kt
similarity index 77%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintArtifactDefinitionEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintArtifactDefinitionEnhancerImpl.kt
index a85d71f..c63c726 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintArtifactDefinitionEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintArtifactDefinitionEnhancerImpl.kt
@@ -16,50 +16,50 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.stereotype.Service
@Service
-open class BlueprintArtifactDefinitionEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
+open class BluePrintArtifactDefinitionEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
private val resourceAssignmentEnhancerService: ResourceAssignmentEnhancerService
) :
- BlueprintArtifactDefinitionEnhancer {
+ BluePrintArtifactDefinitionEnhancer {
companion object {
const val ARTIFACT_TYPE_MAPPING_SOURCE: String = "artifact-mapping-resource"
}
- private val log = logger(BlueprintArtifactDefinitionEnhancerImpl::class)
+ private val log = logger(BluePrintArtifactDefinitionEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, artifactDefinition: ArtifactDefinition) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, artifactDefinition: ArtifactDefinition) {
log.info("enhancing ArtifactDefinition($name)")
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val artifactTypeName = artifactDefinition.type
- ?: throw BlueprintException("artifact type is missing for ArtifactDefinition($name)")
+ ?: throw BluePrintException("artifact type is missing for ArtifactDefinition($name)")
// Populate Artifact Type
- BlueprintEnhancerUtils.populateArtifactType(bluePrintContext, bluePrintRepoService, artifactTypeName)
+ BluePrintEnhancerUtils.populateArtifactType(bluePrintContext, bluePrintRepoService, artifactTypeName)
when (artifactTypeName) {
ARTIFACT_TYPE_MAPPING_SOURCE -> {
@@ -81,10 +81,10 @@
if (!alreadyEnhanced) {
val resourceAssignments: MutableList<ResourceAssignment> = JacksonUtils.getListFromFile(artifactFilePath, ResourceAssignment::class.java)
as? MutableList<ResourceAssignment>
- ?: throw BlueprintProcessorException("couldn't get ResourceAssignment definitions for the file($artifactFilePath)")
+ ?: throw BluePrintProcessorException("couldn't get ResourceAssignment definitions for the file($artifactFilePath)")
// Call Resource Assignment Enhancer
- resourceAssignmentEnhancerService.enhanceBlueprint(bluePrintTypeEnhancerService, bluePrintRuntimeService, resourceAssignments)
+ resourceAssignmentEnhancerService.enhanceBluePrint(bluePrintTypeEnhancerService, bluePrintRuntimeService, resourceAssignments)
bluePrintRuntimeService.put(alreadyEnhancedKey, true.asJsonPrimitive())
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintAttributeDefinitionEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintAttributeDefinitionEnhancerImpl.kt
similarity index 62%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintAttributeDefinitionEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintAttributeDefinitionEnhancerImpl.kt
index cd05c62..030fbe8 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintAttributeDefinitionEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintAttributeDefinitionEnhancerImpl.kt
@@ -16,40 +16,40 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.AttributeDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintAttributeDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-class BlueprintAttributeDefinitionEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+class BluePrintAttributeDefinitionEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintAttributeDefinitionEnhancer {
+ BluePrintAttributeDefinitionEnhancer {
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, attributeDefinition: AttributeDefinition) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, attributeDefinition: AttributeDefinition) {
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val propertyType = attributeDefinition.type
- if (BlueprintTypes.validPrimitiveTypes().contains(propertyType)) {
- } else if (BlueprintTypes.validCollectionTypes().contains(propertyType)) {
+ if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)) {
+ } else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
val entrySchema = attributeDefinition.entrySchema
- ?: throw BlueprintException("Entry Schema is missing for collection property($name)")
+ ?: throw BluePrintException("Entry Schema is missing for collection property($name)")
- if (!BlueprintTypes.validPrimitiveTypes().contains(entrySchema.type)) {
- BlueprintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, entrySchema.type)
+ if (!BluePrintTypes.validPrimitiveTypes().contains(entrySchema.type)) {
+ BluePrintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, entrySchema.type)
}
} else {
- BlueprintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, propertyType)
+ BluePrintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, propertyType)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImpl.kt
similarity index 76%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImpl.kt
index 7603963..8240b1d 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImpl.kt
@@ -18,16 +18,16 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiDomains
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.httpProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.onap.ccsdk.cds.controllerblueprints.core.updateErrorMessage
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintFileUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils
import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogCodes
import org.onap.ccsdk.cds.error.catalog.core.utils.errorCauseOrDefault
@@ -36,28 +36,28 @@
import java.util.UUID
@Service
-open class BlueprintEnhancerServiceImpl(
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
+open class BluePrintEnhancerServiceImpl(
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
private val resourceDefinitionEnhancerService: ResourceDefinitionEnhancerService
-) : BlueprintEnhancerService {
+) : BluePrintEnhancerService {
- private val log = logger(BlueprintEnhancerServiceImpl::class)
+ private val log = logger(BluePrintEnhancerServiceImpl::class)
- override suspend fun enhance(basePath: String, enrichedBasePath: String): BlueprintContext {
+ override suspend fun enhance(basePath: String, enrichedBasePath: String): BluePrintContext {
// Copy the Blueprint Content to Target Location
- BlueprintFileUtils.copyBlueprint(basePath, enrichedBasePath)
+ BluePrintFileUtils.copyBluePrint(basePath, enrichedBasePath)
// Enhance the Blueprint
return enhance(enrichedBasePath)
}
- @Throws(BlueprintException::class)
- override suspend fun enhance(basePath: String): BlueprintContext {
+ @Throws(BluePrintException::class)
+ override suspend fun enhance(basePath: String): BluePrintContext {
log.info("Enhancing blueprint($basePath)")
- val blueprintRuntimeService = BlueprintMetadataUtils
- .getBaseEnhancementBlueprintRuntime(UUID.randomUUID().toString(), basePath)
+ val blueprintRuntimeService = BluePrintMetadataUtils
+ .getBaseEnhancementBluePrintRuntime(UUID.randomUUID().toString(), basePath)
try {
@@ -73,15 +73,15 @@
)
// Write the Enhanced Blueprint Definitions
- BlueprintFileUtils.writeEnhancedBlueprint(blueprintRuntimeService.bluePrintContext())
+ BluePrintFileUtils.writeEnhancedBluePrint(blueprintRuntimeService.bluePrintContext())
// Write the Enhanced Blueprint Resource Definitions
ResourceDictionaryUtils.writeResourceDefinitionTypes(basePath, resourceDefinitions)
- if (blueprintRuntimeService.getBlueprintError().allErrors().isNotEmpty()) {
- throw BlueprintException(blueprintRuntimeService.getBlueprintError().allErrors().toString())
+ if (blueprintRuntimeService.getBluePrintError().allErrors().isNotEmpty()) {
+ throw BluePrintException(blueprintRuntimeService.getBluePrintError().allErrors().toString())
}
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
val errorMsg = "Error while enriching the CBA package."
throw e.updateErrorMessage(
DesignerApiDomains.DESIGNER_API, errorMsg,
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTemplateEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTemplateEnhancerImpl.kt
similarity index 79%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTemplateEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTemplateEnhancerImpl.kt
index 0dd5ed1..6ca0b2d 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTemplateEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTemplateEnhancerImpl.kt
@@ -17,39 +17,39 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintNodeTemplateEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+open class BluePrintNodeTemplateEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintNodeTemplateEnhancer {
+ BluePrintNodeTemplateEnhancer {
- private val log = logger(BlueprintNodeTemplateEnhancerImpl::class)
+ private val log = logger(BluePrintNodeTemplateEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, nodeTemplate: NodeTemplate) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, nodeTemplate: NodeTemplate) {
log.info("***** Enhancing NodeTemplate($name)")
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val nodeTypeName = nodeTemplate.type
// Get NodeType from Repo and Update Service Template
- val nodeType = BlueprintEnhancerUtils.populateNodeType(bluePrintContext, bluePrintRepoService, nodeTypeName)
+ val nodeType = BluePrintEnhancerUtils.populateNodeType(bluePrintContext, bluePrintRepoService, nodeTypeName)
// Enrich NodeType
bluePrintTypeEnhancerService.enhanceNodeType(bluePrintRuntimeService, nodeTypeName, nodeType)
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTypeEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTypeEnhancerImpl.kt
similarity index 85%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTypeEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTypeEnhancerImpl.kt
index 4011918..bb178b1 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintNodeTypeEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintNodeTypeEnhancerImpl.kt
@@ -16,42 +16,42 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.InterfaceDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.OperationDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintNodeTypeEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
-) : BlueprintNodeTypeEnhancer {
+open class BluePrintNodeTypeEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
+) : BluePrintNodeTypeEnhancer {
- private val log = logger(BlueprintNodeTypeEnhancerImpl::class)
+ private val log = logger(BluePrintNodeTypeEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, nodeType: NodeType) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, nodeType: NodeType) {
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val derivedFrom = nodeType.derivedFrom
- if (!BlueprintTypes.rootNodeTypes().contains(derivedFrom)) {
- val derivedFromNodeType = BlueprintEnhancerUtils.populateNodeType(bluePrintContext, bluePrintRepoService, name)
+ if (!BluePrintTypes.rootNodeTypes().contains(derivedFrom)) {
+ val derivedFromNodeType = BluePrintEnhancerUtils.populateNodeType(bluePrintContext, bluePrintRepoService, name)
// Enrich NodeType
enhance(bluePrintRuntimeService, derivedFrom, derivedFromNodeType)
}
@@ -90,7 +90,7 @@
// Populate Requirement Node
requirementDefinition.node?.let { requirementNodeTypeName ->
// Get Requirement NodeType from Repo and Update Service Template
- val requirementNodeType = BlueprintEnhancerUtils.populateNodeType(
+ val requirementNodeType = BluePrintEnhancerUtils.populateNodeType(
bluePrintContext,
bluePrintRepoService, requirementNodeTypeName
)
@@ -99,7 +99,7 @@
// Enhance Relationship Type
val relationShipTypeName = requirementDefinition.relationship
- ?: throw BlueprintException(
+ ?: throw BluePrintException(
"couldn't get relationship name for the NodeType($nodeTypeName) " +
"Requirement($requirementName)"
)
@@ -152,6 +152,6 @@
* Get the Relationship Type from database and add to Blueprint Context
*/
open fun enrichRelationShipType(relationshipName: String) {
- BlueprintEnhancerUtils.populateRelationshipType(bluePrintContext, bluePrintRepoService, relationshipName)
+ BluePrintEnhancerUtils.populateRelationshipType(bluePrintContext, bluePrintRepoService, relationshipName)
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPolicyTypeEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPolicyTypeEnhancerImpl.kt
similarity index 78%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPolicyTypeEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPolicyTypeEnhancerImpl.kt
index d58c82f..212dc44 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPolicyTypeEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPolicyTypeEnhancerImpl.kt
@@ -17,25 +17,25 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
import org.onap.ccsdk.cds.controllerblueprints.core.data.PolicyType
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPolicyTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPolicyTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-class BlueprintPolicyTypeEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+class BluePrintPolicyTypeEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintPolicyTypeEnhancer {
+ BluePrintPolicyTypeEnhancer {
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, type: PolicyType) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, type: PolicyType) {
this.bluePrintRuntimeService = bluePrintRuntimeService
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPropertyDefinitionEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt
similarity index 65%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPropertyDefinitionEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt
index 4ac52bb..eb74434 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintPropertyDefinitionEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintPropertyDefinitionEnhancerImpl.kt
@@ -17,48 +17,48 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPropertyDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintPropertyDefinitionEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+open class BluePrintPropertyDefinitionEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintPropertyDefinitionEnhancer {
+ BluePrintPropertyDefinitionEnhancer {
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, propertyDefinition: PropertyDefinition) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, propertyDefinition: PropertyDefinition) {
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
val propertyType = propertyDefinition.type
- if (BlueprintTypes.validPrimitiveTypes().contains(propertyType) ||
- BlueprintTypes.validComplexTypes().contains(propertyType)
+ if (BluePrintTypes.validPrimitiveTypes().contains(propertyType) ||
+ BluePrintTypes.validComplexTypes().contains(propertyType)
) {
// Do Nothing,
- } else if (BlueprintTypes.validCollectionTypes().contains(propertyType)) {
+ } else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
val entrySchema = propertyDefinition.entrySchema
- ?: throw BlueprintException("Entry Schema is missing for collection property($name)")
+ ?: throw BluePrintException("Entry Schema is missing for collection property($name)")
- if (!BlueprintTypes.validPrimitiveTypes().contains(entrySchema.type)) {
- BlueprintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, entrySchema.type)
+ if (!BluePrintTypes.validPrimitiveTypes().contains(entrySchema.type)) {
+ BluePrintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, entrySchema.type)
}
} else {
- BlueprintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, propertyType)
+ BluePrintEnhancerUtils.populateDataTypes(bluePrintContext, bluePrintRepoService, propertyType)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTemplateEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTemplateEnhancerImpl.kt
similarity index 77%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTemplateEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTemplateEnhancerImpl.kt
index cd345a8..c208f68 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTemplateEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTemplateEnhancerImpl.kt
@@ -16,33 +16,33 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRelationshipTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRelationshipTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintRelationshipTemplateEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+open class BluePrintRelationshipTemplateEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintRelationshipTemplateEnhancer {
+ BluePrintRelationshipTemplateEnhancer {
- private val log = logger(BlueprintRelationshipTemplateEnhancerImpl::class)
+ private val log = logger(BluePrintRelationshipTemplateEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
override fun enhance(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
relationshipTemplate: RelationshipTemplate
) {
@@ -53,7 +53,7 @@
val relationshipTypeName = relationshipTemplate.type
// Get RelationshipType from Repo and Update Service Template
val relationshipType =
- BlueprintEnhancerUtils.populateRelationshipType(
+ BluePrintEnhancerUtils.populateRelationshipType(
bluePrintContext,
bluePrintRepoService,
relationshipTypeName
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTypeEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTypeEnhancerImpl.kt
similarity index 79%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTypeEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTypeEnhancerImpl.kt
index 2216caf..b0e1660 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintRelationshipTypeEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintRelationshipTypeEnhancerImpl.kt
@@ -16,33 +16,33 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRelationshipTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRelationshipTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintRelationshipTypeEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
-) : BlueprintRelationshipTypeEnhancer {
+open class BluePrintRelationshipTypeEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
+) : BluePrintRelationshipTypeEnhancer {
- private val log = logger(BlueprintRelationshipTypeEnhancerImpl::class)
+ private val log = logger(BluePrintRelationshipTypeEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
override fun enhance(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
name: String,
relationshipType: RelationshipType
) {
@@ -51,9 +51,9 @@
val derivedFrom = relationshipType.derivedFrom
- if (!BlueprintTypes.rootRelationshipTypes().contains(derivedFrom)) {
+ if (!BluePrintTypes.rootRelationshipTypes().contains(derivedFrom)) {
val derivedFromRelationshipType =
- BlueprintEnhancerUtils.populateRelationshipType(bluePrintContext, bluePrintRepoService, name)
+ BluePrintEnhancerUtils.populateRelationshipType(bluePrintContext, bluePrintRepoService, name)
// Enrich RelationshipType
enhance(bluePrintRuntimeService, derivedFrom, derivedFromRelationshipType)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintServiceTemplateEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintServiceTemplateEnhancerImpl.kt
similarity index 84%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintServiceTemplateEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintServiceTemplateEnhancerImpl.kt
index 80855ce..9f4a459 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintServiceTemplateEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintServiceTemplateEnhancerImpl.kt
@@ -17,26 +17,26 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintServiceTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintServiceTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintServiceTemplateEnhancerImpl(private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService) :
- BlueprintServiceTemplateEnhancer {
+open class BluePrintServiceTemplateEnhancerImpl(private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService) :
+ BluePrintServiceTemplateEnhancer {
- private val log = logger(BlueprintServiceTemplateEnhancerImpl::class)
+ private val log = logger(BluePrintServiceTemplateEnhancerImpl::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, type: ServiceTemplate) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, type: ServiceTemplate) {
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTopologyTemplateEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTopologyTemplateEnhancerImpl.kt
similarity index 86%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTopologyTemplateEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTopologyTemplateEnhancerImpl.kt
index 768f5ab..750cd0f 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTopologyTemplateEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTopologyTemplateEnhancerImpl.kt
@@ -17,25 +17,25 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
import org.onap.ccsdk.cds.controllerblueprints.core.data.TopologyTemplate
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTopologyTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTopologyTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Service
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintTopologyTemplateEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService
+open class BluePrintTopologyTemplateEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService
) :
- BlueprintTopologyTemplateEnhancer {
+ BluePrintTopologyTemplateEnhancer {
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, type: TopologyTemplate) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, type: TopologyTemplate) {
this.bluePrintRuntimeService = bluePrintRuntimeService
enhanceTopologyTemplateInputs(type)
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTypeEnhancerServiceImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTypeEnhancerServiceImpl.kt
new file mode 100644
index 0000000..c27c206
--- /dev/null
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintTypeEnhancerServiceImpl.kt
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ */
+
+package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
+
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintArtifactDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintAttributeDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPolicyTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintPropertyDefinitionEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRelationshipTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRelationshipTypeEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintServiceTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTopologyTemplateEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowEnhancer
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.context.ApplicationContext
+import org.springframework.stereotype.Service
+
+@Service
+open class BluePrintTypeEnhancerServiceImpl : BluePrintTypeEnhancerService {
+
+ @Autowired
+ private lateinit var context: ApplicationContext
+
+ override fun getServiceTemplateEnhancers(): List<BluePrintServiceTemplateEnhancer> {
+ return context.getBeansOfType(BluePrintServiceTemplateEnhancer::class.java).map { it.value }
+ }
+
+ override fun getTopologyTemplateEnhancers(): List<BluePrintTopologyTemplateEnhancer> {
+ return context.getBeansOfType(BluePrintTopologyTemplateEnhancer::class.java).map { it.value }
+ }
+
+ override fun getWorkflowEnhancers(): List<BluePrintWorkflowEnhancer> {
+ return context.getBeansOfType(BluePrintWorkflowEnhancer::class.java).map { it.value }
+ }
+
+ override fun getNodeTemplateEnhancers(): List<BluePrintNodeTemplateEnhancer> {
+ return context.getBeansOfType(BluePrintNodeTemplateEnhancer::class.java).map { it.value }
+ }
+
+ override fun getNodeTypeEnhancers(): List<BluePrintNodeTypeEnhancer> {
+ return context.getBeansOfType(BluePrintNodeTypeEnhancer::class.java).map { it.value }
+ }
+
+ override fun getRelationshipTemplateEnhancers(): List<BluePrintRelationshipTemplateEnhancer> {
+ return context.getBeansOfType(BluePrintRelationshipTemplateEnhancer::class.java).map { it.value }
+ }
+
+ override fun getRelationshipTypeEnhancers(): List<BluePrintRelationshipTypeEnhancer> {
+ return context.getBeansOfType(BluePrintRelationshipTypeEnhancer::class.java).map { it.value }
+ }
+
+ override fun getArtifactDefinitionEnhancers(): List<BluePrintArtifactDefinitionEnhancer> {
+ return context.getBeansOfType(BluePrintArtifactDefinitionEnhancer::class.java).map { it.value }
+ }
+
+ override fun getPolicyTypeEnhancers(): List<BluePrintPolicyTypeEnhancer> {
+ return context.getBeansOfType(BluePrintPolicyTypeEnhancer::class.java).map { it.value }
+ }
+
+ override fun getPropertyDefinitionEnhancers(): List<BluePrintPropertyDefinitionEnhancer> {
+ return context.getBeansOfType(BluePrintPropertyDefinitionEnhancer::class.java).map { it.value }
+ }
+
+ override fun getAttributeDefinitionEnhancers(): List<BluePrintAttributeDefinitionEnhancer> {
+ return context.getBeansOfType(BluePrintAttributeDefinitionEnhancer::class.java).map { it.value }
+ }
+}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintWorkflowEnhancerImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintWorkflowEnhancerImpl.kt
similarity index 89%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintWorkflowEnhancerImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintWorkflowEnhancerImpl.kt
index 8b19af0..dd60aca 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintWorkflowEnhancerImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintWorkflowEnhancerImpl.kt
@@ -17,19 +17,19 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowEnhancer
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowEnhancer
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.springframework.beans.factory.config.ConfigurableBeanFactory
@@ -38,14 +38,14 @@
@Service
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class BlueprintWorkflowEnhancerImpl(
- private val bluePrintRepoService: BlueprintRepoService,
- private val bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
+open class BluePrintWorkflowEnhancerImpl(
+ private val bluePrintRepoService: BluePrintRepoService,
+ private val bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
private val resourceAssignmentEnhancerService: ResourceAssignmentEnhancerService
) :
- BlueprintWorkflowEnhancer {
+ BluePrintWorkflowEnhancer {
- private val log = logger(BlueprintWorkflowEnhancerImpl::class)
+ private val log = logger(BluePrintWorkflowEnhancerImpl::class)
companion object {
@@ -53,12 +53,12 @@
const val PROPERTY_DEPENDENCY_NODE_TEMPLATES = "dependency-node-templates"
}
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintContext: BlueprintContext
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintContext: BluePrintContext
private val workflowDataTypes: MutableMap<String, DataType> = hashMapOf()
- override fun enhance(bluePrintRuntimeService: BlueprintRuntimeService<*>, name: String, workflow: Workflow) {
+ override fun enhance(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, workflow: Workflow) {
log.info("##### Enhancing Workflow($name)")
this.bluePrintRuntimeService = bluePrintRuntimeService
this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
@@ -101,14 +101,14 @@
val derivedFrom = bluePrintContext.nodeTemplateNodeType(firstNodeTemplateName).derivedFrom
when {
- derivedFrom.startsWith(BlueprintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
+ derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
enhanceStepTargets(name, workflow, firstNodeTemplateName, false)
}
- derivedFrom.startsWith(BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
+ derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
enhanceStepTargets(name, workflow, firstNodeTemplateName, true)
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"couldn't execute workflow($name) step mapped " +
"to node template($firstNodeTemplateName) derived from($derivedFrom)"
)
@@ -124,7 +124,7 @@
// Get the Dependent Component Node Template Names
val dependencyNodeTemplateNodes = dgNodeTemplate.properties?.get(PROPERTY_DEPENDENCY_NODE_TEMPLATES)
- ?: throw BlueprintException("couldn't get property($PROPERTY_DEPENDENCY_NODE_TEMPLATES) ")
+ ?: throw BluePrintException("couldn't get property($PROPERTY_DEPENDENCY_NODE_TEMPLATES) ")
dependencyNodeTemplates =
JacksonUtils.getListFromJsonNode(dependencyNodeTemplateNodes, String::class.java)
@@ -175,7 +175,7 @@
val resourceAssignments: MutableList<ResourceAssignment> = JacksonUtils.getListFromFile(filePath, ResourceAssignment::class.java)
as? MutableList<ResourceAssignment>
- ?: throw BlueprintProcessorException("couldn't get ResourceAssignment definitions for the file($filePath)")
+ ?: throw BluePrintProcessorException("couldn't get ResourceAssignment definitions for the file($filePath)")
val alreadyEnhancedKey = "enhanced-$fileName"
val alreadyEnhanced = bluePrintRuntimeService.check(alreadyEnhancedKey)
@@ -184,7 +184,7 @@
if (!alreadyEnhanced) {
// Call Resource Assignment Enhancer
- resourceAssignmentEnhancerService.enhanceBlueprint(bluePrintTypeEnhancerService, bluePrintRuntimeService, resourceAssignments)
+ resourceAssignmentEnhancerService.enhanceBluePrint(bluePrintTypeEnhancerService, bluePrintRuntimeService, resourceAssignments)
bluePrintRuntimeService.put(alreadyEnhancedKey, true.asJsonPrimitive())
}
@@ -215,7 +215,7 @@
dynamicDataType = DataType()
dynamicDataType.version = "1.0.0"
dynamicDataType.description = "Dynamic DataType definition for workflow($workflowName)."
- dynamicDataType.derivedFrom = BlueprintConstants.MODEL_TYPE_DATA_TYPE_DYNAMIC
+ dynamicDataType.derivedFrom = BluePrintConstants.MODEL_TYPE_DATA_TYPE_DYNAMIC
val dataTypeProperties: MutableMap<String, PropertyDefinition> = hashMapOf()
dynamicDataType.properties = dataTypeProperties
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTypeEnhancerServiceImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTypeEnhancerServiceImpl.kt
deleted file mode 100644
index d3b2859..0000000
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintTypeEnhancerServiceImpl.kt
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.
- */
-
-package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
-
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintArtifactDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintAttributeDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintNodeTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPolicyTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintPropertyDefinitionEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRelationshipTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRelationshipTypeEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintServiceTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTopologyTemplateEnhancer
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowEnhancer
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.context.ApplicationContext
-import org.springframework.stereotype.Service
-
-@Service
-open class BlueprintTypeEnhancerServiceImpl : BlueprintTypeEnhancerService {
-
- @Autowired
- private lateinit var context: ApplicationContext
-
- override fun getServiceTemplateEnhancers(): List<BlueprintServiceTemplateEnhancer> {
- return context.getBeansOfType(BlueprintServiceTemplateEnhancer::class.java).map { it.value }
- }
-
- override fun getTopologyTemplateEnhancers(): List<BlueprintTopologyTemplateEnhancer> {
- return context.getBeansOfType(BlueprintTopologyTemplateEnhancer::class.java).map { it.value }
- }
-
- override fun getWorkflowEnhancers(): List<BlueprintWorkflowEnhancer> {
- return context.getBeansOfType(BlueprintWorkflowEnhancer::class.java).map { it.value }
- }
-
- override fun getNodeTemplateEnhancers(): List<BlueprintNodeTemplateEnhancer> {
- return context.getBeansOfType(BlueprintNodeTemplateEnhancer::class.java).map { it.value }
- }
-
- override fun getNodeTypeEnhancers(): List<BlueprintNodeTypeEnhancer> {
- return context.getBeansOfType(BlueprintNodeTypeEnhancer::class.java).map { it.value }
- }
-
- override fun getRelationshipTemplateEnhancers(): List<BlueprintRelationshipTemplateEnhancer> {
- return context.getBeansOfType(BlueprintRelationshipTemplateEnhancer::class.java).map { it.value }
- }
-
- override fun getRelationshipTypeEnhancers(): List<BlueprintRelationshipTypeEnhancer> {
- return context.getBeansOfType(BlueprintRelationshipTypeEnhancer::class.java).map { it.value }
- }
-
- override fun getArtifactDefinitionEnhancers(): List<BlueprintArtifactDefinitionEnhancer> {
- return context.getBeansOfType(BlueprintArtifactDefinitionEnhancer::class.java).map { it.value }
- }
-
- override fun getPolicyTypeEnhancers(): List<BlueprintPolicyTypeEnhancer> {
- return context.getBeansOfType(BlueprintPolicyTypeEnhancer::class.java).map { it.value }
- }
-
- override fun getPropertyDefinitionEnhancers(): List<BlueprintPropertyDefinitionEnhancer> {
- return context.getBeansOfType(BlueprintPropertyDefinitionEnhancer::class.java).map { it.value }
- }
-
- override fun getAttributeDefinitionEnhancers(): List<BlueprintAttributeDefinitionEnhancer> {
- return context.getBeansOfType(BlueprintAttributeDefinitionEnhancer::class.java).map { it.value }
- }
-}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceAssignmentEnhancerService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceAssignmentEnhancerService.kt
index 4d1995d..621b046 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceAssignmentEnhancerService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceAssignmentEnhancerService.kt
@@ -17,11 +17,11 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.enhancer
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.service.ResourceDefinitionRepoService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDictionaryConstants
@@ -37,10 +37,10 @@
*/
interface ResourceAssignmentEnhancerService {
- @Throws(BlueprintException::class)
- fun enhanceBlueprint(
- bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ @Throws(BluePrintException::class)
+ fun enhanceBluePrint(
+ bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
resourceAssignments: List<ResourceAssignment>
)
}
@@ -61,9 +61,9 @@
* Get the defined source instance from the ResourceAssignment,
* then get the NodeType of the Sources assigned
*/
- override fun enhanceBlueprint(
- bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ override fun enhanceBluePrint(
+ bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
resourceAssignments: List<ResourceAssignment>
) {
@@ -91,7 +91,7 @@
val resourceDefinition: ResourceDefinition = getResourceDefinition(dictionaryName)
val sourceNodeTemplate = resourceDefinition.sources[dictionarySource]
- ?: throw BlueprintException("failed to get assigned dictionarySource($dictionarySource) from resourceDefinition($dictionaryName)")
+ ?: throw BluePrintException("failed to get assigned dictionarySource($dictionarySource) from resourceDefinition($dictionaryName)")
// Enrich as NodeTemplate
bluePrintTypeEnhancerService.enhanceNodeTemplate(bluePrintRuntimeService, dictionarySource, sourceNodeTemplate)
@@ -110,7 +110,7 @@
resourceAssignment.dictionarySource.equals(ResourceDictionaryConstants.SOURCE_INPUT) ||
resourceAssignment.dictionarySource.equals(ResourceDictionaryConstants.SOURCE_DEFAULT)
) &&
- BlueprintTypes.validPrimitiveOrCollectionPrimitive(resourceAssignment.property!!)
+ BluePrintTypes.validPrimitiveOrCollectionPrimitive(resourceAssignment.property!!)
)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceDefinitionEnhancerService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceDefinitionEnhancerService.kt
index 08a41f7..bbec8e6 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceDefinitionEnhancerService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/ResourceDefinitionEnhancerService.kt
@@ -21,12 +21,12 @@
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.service.ResourceDefinitionRepoService
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeEnhancerService
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.utils.ResourceDictionaryUtils
@@ -34,10 +34,10 @@
interface ResourceDefinitionEnhancerService {
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun enhance(
- bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
- bluePrintRuntimeService: BlueprintRuntimeService<*>
+ bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>
): List<ResourceDefinition>
}
@@ -58,8 +58,8 @@
// 3. Collect the Resource Definition for Resource Assignment names from database.
// 4. Create the Resource Definition under blueprint base path.
override fun enhance(
- bluePrintTypeEnhancerService: BlueprintTypeEnhancerService,
- bluePrintRuntimeService: BlueprintRuntimeService<*>
+ bluePrintTypeEnhancerService: BluePrintTypeEnhancerService,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>
): List<ResourceDefinition> {
var resourceDefinitions: List<ResourceDefinition> = mutableListOf()
@@ -77,7 +77,7 @@
}
// Get all the Mapping files from all node templates.
- private fun getAllResourceMappingFiles(blueprintContext: BlueprintContext): List<String>? {
+ private fun getAllResourceMappingFiles(blueprintContext: BluePrintContext): List<String>? {
return blueprintContext.nodeTemplates()?.mapNotNull { nodeTemplateMap ->
@@ -91,7 +91,7 @@
}
// Convert file content to ResourceAssignments asynchronously
- private fun getResourceDefinition(blueprintContext: BlueprintContext, files: List<String>) = runBlocking {
+ private fun getResourceDefinition(blueprintContext: BluePrintContext, files: List<String>) = runBlocking {
val blueprintBasePath = blueprintContext.rootPath
val deferredResourceAssignments = mutableListOf<Deferred<List<ResourceAssignment>>>()
for (file in files) {
@@ -124,7 +124,7 @@
}
private fun enrichResourceDefinitionSources(
- bluePrintContext: BlueprintContext,
+ bluePrintContext: BluePrintContext,
resourceDefinitions: List<ResourceDefinition>
) {
val sources = resourceDefinitions
@@ -138,7 +138,7 @@
.flatten().distinct()
log.info("Enriching Resource Definition sources Node Template: $sources")
sources.forEach {
- BlueprintEnhancerUtils.populateNodeType(bluePrintContext, resourceDefinitionRepoService, it)
+ BluePrintEnhancerUtils.populateNodeType(bluePrintContext, resourceDefinitionRepoService, it)
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BlueprintModelHandler.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BluePrintModelHandler.kt
similarity index 87%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BlueprintModelHandler.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BluePrintModelHandler.kt
index 42954c1..7bbaa8c 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BlueprintModelHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/BluePrintModelHandler.kt
@@ -30,25 +30,25 @@
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.WorkFlowSpecRequest
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.WorkFlowSpecResponse
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.WorkFlowsResponse
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load.BlueprintDatabaseLoadService
-import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BlueprintEnhancerUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load.BluePrintDatabaseLoadService
+import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.BluePrintEnhancerUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.deleteNBDir
import org.onap.ccsdk.cds.controllerblueprints.core.httpProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintCompileCache
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.onap.ccsdk.cds.controllerblueprints.core.updateErrorMessage
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintFileUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintFileUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogCodes
@@ -77,17 +77,17 @@
*/
@Service
-open class BlueprintModelHandler(
- private val bluePrintDatabaseLoadService: BlueprintDatabaseLoadService,
- private val blueprintsProcessorCatalogService: BlueprintCatalogService,
- private val bluePrintLoadConfiguration: BlueprintLoadConfiguration,
+open class BluePrintModelHandler(
+ private val bluePrintDatabaseLoadService: BluePrintDatabaseLoadService,
+ private val blueprintsProcessorCatalogService: BluePrintCatalogService,
+ private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
private val blueprintModelSearchRepository: BlueprintModelSearchRepository,
private val blueprintModelRepository: BlueprintModelRepository,
private val blueprintModelContentRepository: BlueprintModelContentRepository,
- private val bluePrintEnhancerService: BlueprintEnhancerService
+ private val bluePrintEnhancerService: BluePrintEnhancerService
) {
- private val log = logger(BlueprintModelHandler::class)
+ private val log = logger(BluePrintModelHandler::class)
open suspend fun bootstrapBlueprint(bootstrapRequest: BootstrapRequest) {
log.info(
@@ -102,11 +102,11 @@
bluePrintDatabaseLoadService.initResourceDictionary()
}
if (bootstrapRequest.loadCBA) {
- bluePrintDatabaseLoadService.initBlueprintCatalog()
+ bluePrintDatabaseLoadService.initBluePrintCatalog()
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun prepareWorkFlowSpec(req: WorkFlowSpecRequest):
WorkFlowSpecResponse {
val basePath = blueprintsProcessorCatalogService.getFromDatabase(
@@ -116,7 +116,7 @@
)
log.info("blueprint base path $basePath")
- val blueprintContext = BlueprintMetadataUtils.getBlueprintContext(basePath.toString())
+ val blueprintContext = BluePrintMetadataUtils.getBluePrintContext(basePath.toString())
val workFlow = blueprintContext.workflowByName(req.workflowName)
val wfRes = WorkFlowSpecResponse()
@@ -144,7 +144,7 @@
return wfRes
}
- private fun addPropertyInfo(propName: String, prop: PropertyDefinition, ctx: BlueprintContext, res: WorkFlowSpecResponse) {
+ private fun addPropertyInfo(propName: String, prop: PropertyDefinition, ctx: BluePrintContext, res: WorkFlowSpecResponse) {
updatePropertyInfo(propName, prop, ctx, res)
addDataType(prop.type, ctx, res)
if (prop.entrySchema != null && prop.entrySchema!!.type != null) {
@@ -152,7 +152,7 @@
}
}
- private fun updatePropertyInfo(name: String, prop: PropertyDefinition, ctx: BlueprintContext, res: WorkFlowSpecResponse) {
+ private fun updatePropertyInfo(name: String, prop: PropertyDefinition, ctx: BluePrintContext, res: WorkFlowSpecResponse) {
if (prop.inputparam == null || prop.inputparam == false) {
var workflow = ctx.workflowByName(res.workFlowData.workFlowName)
for ((k, v) in workflow.steps!!) {
@@ -176,7 +176,7 @@
}
}
- private fun addDataType(name: String, ctx: BlueprintContext, res: WorkFlowSpecResponse) {
+ private fun addDataType(name: String, ctx: BluePrintContext, res: WorkFlowSpecResponse) {
var data = ctx.dataTypeByName(name)
if (data != null) {
res.dataTypes?.put(name, data)
@@ -184,7 +184,7 @@
}
}
- private fun addParentDataType(data: DataType, ctx: BlueprintContext, res: WorkFlowSpecResponse) {
+ private fun addParentDataType(data: DataType, ctx: BluePrintContext, res: WorkFlowSpecResponse) {
if (data.properties != null) {
for ((k, v) in data.properties!!) {
addPropertyInfo(k, v, ctx, res)
@@ -192,7 +192,7 @@
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun getWorkflowNames(name: String, version: String): WorkFlowsResponse {
val basePath = blueprintsProcessorCatalogService.getFromDatabase(
name, version
@@ -203,7 +203,7 @@
res.blueprintName = name
res.version = version
- val blueprintContext = BlueprintMetadataUtils.getBlueprintContext(
+ val blueprintContext = BluePrintMetadataUtils.getBluePrintContext(
basePath.toString()
)
if (blueprintContext.workflows() != null) {
@@ -235,9 +235,9 @@
*
* @param filePart filePart
* @return Mono<BlueprintModelSearch>
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
</BlueprintModelSearch> */
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun saveBlueprintModel(filePart: FilePart): BlueprintModelSearch {
try {
return upload(filePart, false)
@@ -265,12 +265,12 @@
* @param name name
* @param version version
* @return BlueprintModelSearch
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun getBlueprintModelSearchByNameAndVersion(name: String, version: String): BlueprintModelSearch? {
return blueprintModelSearchRepository.findByArtifactNameAndArtifactVersion(name, version)
- /*?: throw BlueprintException(
+ /*?: throw BluePrintException(
ErrorCode.RESOURCE_NOT_FOUND.value,
String.format(BLUEPRINT_MODEL_NAME_VERSION_FAILURE_MSG, name, version)
)*/
@@ -282,9 +282,9 @@
* @param name name
* @param version version
* @return ResponseEntity<Resource>
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
</Resource> */
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun downloadBlueprintModelFileByNameAndVersion(
name: String,
version: String
@@ -293,7 +293,7 @@
val archiveByteArray = download(name, version)
val fileName = "${name}_$version.zip"
return prepareResourceEntity(fileName, archiveByteArray)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
e.http(ErrorCatalogCodes.RESOURCE_NOT_FOUND)
val errorMsg = "Error while downloading the CBA file by Blueprint Name ($name) and Version ($version)."
throw e.updateErrorMessage(
@@ -307,14 +307,14 @@
* This is a downloadBlueprintModelFile method to find the target file to download and return a file resource
*
* @return ResponseEntity<Resource>
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
</Resource> */
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun downloadBlueprintModelFile(id: String): ResponseEntity<Resource> {
val blueprintModel: BlueprintModel
try {
blueprintModel = getBlueprintModel(id)
- } catch (e: BlueprintException) {
+ } catch (e: BluePrintException) {
throw httpProcessorException(
ErrorCatalogCodes.RESOURCE_NOT_FOUND, DesignerApiDomains.DESIGNER_API,
"Error while downloading the CBA file: couldn't get blueprint modelby ID ($id)",
@@ -346,9 +346,9 @@
*
* @param id id
* @return BlueprintModel
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun getBlueprintModel(id: String): BlueprintModel {
val blueprintModel: BlueprintModel
val dbBlueprintModel = blueprintModelRepository.findById(id)
@@ -367,9 +367,9 @@
* @param name name
* @param version version
* @return BlueprintModel
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun getBlueprintModelByNameAndVersion(name: String, version: String): BlueprintModel {
val blueprintModel = blueprintModelRepository
.findByArtifactNameAndArtifactVersion(name, version)
@@ -386,9 +386,9 @@
*
* @param id id
* @return BlueprintModelSearch
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun getBlueprintModelSearch(id: String): BlueprintModelSearch {
return blueprintModelSearchRepository.findById(id)
?: throw httpProcessorException(
@@ -398,28 +398,28 @@
}
/**
- * This is a searchBlueprintModelsByKeyWord method to retrieve specific BlueprintModel in Database
+ * This is a searchBluePrintModelsByKeyWord method to retrieve specific BlueprintModel in Database
* where keyword equals updatedBy or tags or artifcat name or artifcat version or artifact type
* @author Shaaban Ebrahim
* @param keyWord
*
* @return List<BlueprintModelSearch> list of the controller blueprint
</BlueprintModelSearch> */
- open fun searchBlueprintModelsByKeyWord(keyWord: String): List<BlueprintModelSearch> {
+ open fun searchBluePrintModelsByKeyWord(keyWord: String): List<BlueprintModelSearch> {
return blueprintModelSearchRepository.findByUpdatedByOrTagsOrOrArtifactNameOrOrArtifactVersionOrArtifactType(
keyWord, keyWord, keyWord, keyWord, keyWord
)
}
/**
- * This is a searchBlueprintModelsByKeyWordPagebale method to retrieve specific BlueprintModel in Database
+ * This is a searchBluePrintModelsByKeyWordPagebale method to retrieve specific BlueprintModel in Database
* where keyword equals updatedBy or tags or artifcat name or artifcat version or artifact type and pageable
* @author Shaaban Ebrahim
* @param keyWord
*
* @return List<BlueprintModelSearch> list of the controller blueprint
</BlueprintModelSearch> */
- open fun searchBlueprintModelsByKeyWordPaged(keyWord: String, pageRequest: PageRequest): Page<BlueprintModelSearch> {
+ open fun searchBluePrintModelsByKeyWordPaged(keyWord: String, pageRequest: PageRequest): Page<BlueprintModelSearch> {
return blueprintModelSearchRepository.findByUpdatedByContainingIgnoreCaseOrTagsContainingIgnoreCaseOrArtifactNameContainingIgnoreCaseOrArtifactVersionContainingIgnoreCaseOrArtifactTypeContainingIgnoreCase(
keyWord,
keyWord,
@@ -434,10 +434,10 @@
* This is a deleteBlueprintModel method
*
* @param id id
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
@Transactional
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open fun deleteBlueprintModel(id: String) {
val dbBlueprintModel = blueprintModelRepository.findById(id)
if (dbBlueprintModel.isPresent) {
@@ -463,14 +463,14 @@
*
* @param filePart filePart
* @return ResponseEntity<Resource>
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun enrichBlueprint(filePart: FilePart): ResponseEntity<Resource> {
try {
val enhancedByteArray = enrichBlueprintFileSource(filePart)
- return BlueprintEnhancerUtils.prepareResourceEntity("enhanced-cba.zip", enhancedByteArray)
- } catch (e: BlueprintProcessorException) {
+ return BluePrintEnhancerUtils.prepareResourceEntity("enhanced-cba.zip", enhancedByteArray)
+ } catch (e: BluePrintProcessorException) {
e.http(ErrorCatalogCodes.IO_FILE_INTERRUPT)
val errorMsg = "Error while enhancing the CBA package."
throw e.updateErrorMessage(
@@ -491,13 +491,13 @@
*
* @param filePart filePart
* @return BlueprintModelSearch
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun publishBlueprint(filePart: FilePart): BlueprintModelSearch {
try {
return upload(filePart, true)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
e.http(ErrorCatalogCodes.IO_FILE_INTERRUPT)
val errorMsg = "Error in Publishing CBA."
throw e.updateErrorMessage(
@@ -519,14 +519,14 @@
*
* @param filePart filePart
* @return BlueprintModelSearch
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun enrichAndPublishBlueprint(filePart: FilePart): BlueprintModelSearch {
try {
val enhancedByteArray = enrichBlueprintFileSource(filePart)
return upload(enhancedByteArray, true)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
e.http(ErrorCatalogCodes.IO_FILE_INTERRUPT)
val errorMsg = "Error while enhancing and uploading the CBA package."
throw e.updateErrorMessage(
@@ -550,8 +550,8 @@
try {
val compressedFile = normalizedFile(blueprintArchive, "cba.zip")
when (fileSource) {
- is FilePart -> BlueprintEnhancerUtils.filePartAsFile(fileSource, compressedFile)
- is ByteArray -> BlueprintEnhancerUtils.byteArrayAsFile(fileSource, compressedFile)
+ is FilePart -> BluePrintEnhancerUtils.filePartAsFile(fileSource, compressedFile)
+ is ByteArray -> BluePrintEnhancerUtils.byteArrayAsFile(fileSource, compressedFile)
}
// Save the Copied file to Database
val blueprintId = blueprintsProcessorCatalogService.saveToDatabase(saveId, compressedFile, validate)
@@ -561,7 +561,7 @@
ErrorCatalogCodes.RESOURCE_NOT_FOUND, DesignerApiDomains.DESIGNER_API,
String.format(BLUEPRINT_MODEL_ID_FAILURE_MSG, blueprintId)
)
- } catch (e: BlueprintException) {
+ } catch (e: BluePrintException) {
e.http(ErrorCatalogCodes.IO_FILE_INTERRUPT)
val errorMsg = "Error in Upload CBA."
throw e.updateErrorMessage(
@@ -575,9 +575,9 @@
)
} finally {
// Clean blueprint script cache
- val cacheKey = BlueprintFileUtils
+ val cacheKey = BluePrintFileUtils
.compileCacheKey(normalizedPathName(bluePrintLoadConfiguration.blueprintWorkingPath, saveId))
- BlueprintCompileCache.cleanClassLoader(cacheKey)
+ BluePrintCompileCache.cleanClassLoader(cacheKey)
deleteNBDir(blueprintArchive)
deleteNBDir(blueprintWorking)
}
@@ -593,7 +593,7 @@
ErrorCatalogCodes.RESOURCE_NOT_FOUND, DesignerApiDomains.DESIGNER_API,
"Error while downloading the CBA file: couldn't get model content"
)
- } catch (e: BlueprintException) {
+ } catch (e: BluePrintException) {
e.http(ErrorCatalogCodes.RESOURCE_NOT_FOUND)
val errorMsg = "Fail to get Blueprint Model content."
throw e.updateErrorMessage(
@@ -612,16 +612,16 @@
try {
when (fileSource) {
is FilePart ->
- BlueprintEnhancerUtils
+ BluePrintEnhancerUtils
.copyFilePartToEnhanceDir(fileSource, blueprintArchive, blueprintWorkingDir)
is ByteArray ->
- BlueprintEnhancerUtils
+ BluePrintEnhancerUtils
.copyByteArrayToEnhanceDir(fileSource, blueprintArchive, blueprintWorkingDir)
} // Enhance the Blue Prints
bluePrintEnhancerService.enhance(blueprintWorkingDir)
- return BlueprintEnhancerUtils.compressEnhanceDirAndReturnByteArray(blueprintWorkingDir, blueprintArchive)
- } catch (e: BlueprintException) {
+ return BluePrintEnhancerUtils.compressEnhanceDirAndReturnByteArray(blueprintWorkingDir, blueprintArchive)
+ } catch (e: BluePrintException) {
e.http(ErrorCatalogCodes.IO_FILE_INTERRUPT)
val errorMsg = "Fail Enriching the CBA."
throw e.updateErrorMessage(DesignerApiDomains.DESIGNER_API, errorMsg)
@@ -631,7 +631,7 @@
"Error while Enriching the CBA file.", e.errorCauseOrDefault()
)
} finally {
- BlueprintEnhancerUtils.cleanEnhancer(blueprintArchive, blueprintWorkingDir)
+ BluePrintEnhancerUtils.cleanEnhancer(blueprintArchive, blueprintWorkingDir)
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeHandler.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeHandler.kt
index 864fe7c..0d94aab 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeHandler.kt
@@ -21,7 +21,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.repository.ModelTypeRepository
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils.ModelTypeValidator
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.httpProcessorException
import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogCodes
import org.slf4j.LoggerFactory
@@ -68,9 +68,9 @@
*
* @param modelType modelType
* @return ModelType
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
open suspend fun saveModel(modelType: ModelType): ModelType {
lateinit var dbModel: ModelType
ModelTypeValidator.validateModelType(modelType)
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ResourceDictionaryHandler.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ResourceDictionaryHandler.kt
index e2e7268..3f06a4a 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ResourceDictionaryHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ResourceDictionaryHandler.kt
@@ -23,7 +23,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiDomains
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ResourceDictionary
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.repository.ResourceDictionaryRepository
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.httpProcessorException
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
@@ -40,9 +40,9 @@
*
* @param name name
* @return DataDictionary
- * @throws BlueprintException BlueprintException
+ * @throws BluePrintException BluePrintException
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun getResourceDictionaryByName(name: String): ResourceDictionary {
Preconditions.checkArgument(StringUtils.isNotBlank(name), "Resource dictionary Name Information is missing.")
val resourceDictionaryDb = resourceDictionaryRepository.findByName(name)
@@ -84,7 +84,7 @@
* @param resourceDictionary resourceDictionary
* @return DataDictionary
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveResourceDictionary(resourceDictionary: ResourceDictionary): ResourceDictionary {
var resourceDictionary = resourceDictionary
@@ -133,7 +133,7 @@
* @param resourceDefinition ResourceDefinition
* @return ResourceDefinition
*/
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
suspend fun saveResourceDefinition(resourceDefinition: ResourceDefinition): ResourceDefinition {
val resourceDictionary = ResourceDictionary()
resourceDictionary.name = resourceDefinition.name
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintCatalogLoadService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintCatalogLoadService.kt
similarity index 78%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintCatalogLoadService.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintCatalogLoadService.kt
index bcb1ebb..8d20944 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintCatalogLoadService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintCatalogLoadService.kt
@@ -21,22 +21,22 @@
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
import org.apache.commons.lang.text.StrBuilder
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
import java.io.File
import java.util.UUID
@Service
-open class BlueprintCatalogLoadService(private val controllerBlueprintsCatalogService: BlueprintCatalogService) {
+open class BluePrintCatalogLoadService(private val controllerBlueprintsCatalogService: BluePrintCatalogService) {
- private val log = LoggerFactory.getLogger(BlueprintCatalogLoadService::class.java)
+ private val log = LoggerFactory.getLogger(BluePrintCatalogLoadService::class.java)
- open fun loadPathsBlueprintModelCatalog(paths: List<String>) {
- paths.forEach { loadPathBlueprintModelCatalog(it) }
+ open fun loadPathsBluePrintModelCatalog(paths: List<String>) {
+ paths.forEach { loadPathBluePrintModelCatalog(it) }
}
- open fun loadPathBlueprintModelCatalog(path: String) {
+ open fun loadPathBluePrintModelCatalog(path: String) {
val files = File(path).listFiles()
runBlocking {
@@ -45,7 +45,7 @@
for (file in files) {
deferredResults += async {
- loadBlueprintModelCatalog(errorBuilder, file)
+ loadBluePrintModelCatalog(errorBuilder, file)
}
}
@@ -59,7 +59,7 @@
}
}
- open suspend fun loadBlueprintModelCatalog(errorBuilder: StrBuilder, file: File) {
+ open suspend fun loadBluePrintModelCatalog(errorBuilder: StrBuilder, file: File) {
try {
controllerBlueprintsCatalogService.saveToDatabase(UUID.randomUUID().toString(), file)
} catch (e: Exception) {
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintDatabaseLoadService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintDatabaseLoadService.kt
similarity index 78%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintDatabaseLoadService.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintDatabaseLoadService.kt
index 0534e16..02d6ad3 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BlueprintDatabaseLoadService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/BluePrintDatabaseLoadService.kt
@@ -18,24 +18,24 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
@Service
-open class BlueprintDatabaseLoadService(
- private val bluePrintLoadConfiguration: BlueprintLoadConfiguration,
+open class BluePrintDatabaseLoadService(
+ private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
private val modelTypeLoadService: ModelTypeLoadService,
private val resourceDictionaryLoadService: ResourceDictionaryLoadService,
- private val bluePrintCatalogLoadService: BlueprintCatalogLoadService
+ private val bluePrintCatalogLoadService: BluePrintCatalogLoadService
) {
- private val log = LoggerFactory.getLogger(BlueprintDatabaseLoadService::class.java)
+ private val log = LoggerFactory.getLogger(BluePrintDatabaseLoadService::class.java)
open fun init() = runBlocking {
initModelTypes()
initResourceDictionary()
- initBlueprintCatalog()
+ initBluePrintCatalog()
}
open suspend fun initModelTypes() {
@@ -56,12 +56,12 @@
}
}
- open suspend fun initBlueprintCatalog() {
- log.info("cba load from paths(${bluePrintLoadConfiguration.loadBlueprintPaths})")
+ open suspend fun initBluePrintCatalog() {
+ log.info("cba load from paths(${bluePrintLoadConfiguration.loadBluePrintPaths})")
- val paths = bluePrintLoadConfiguration.loadBlueprintPaths?.split(",")
+ val paths = bluePrintLoadConfiguration.loadBluePrintPaths?.split(",")
paths?.let {
- bluePrintCatalogLoadService.loadPathsBlueprintModelCatalog(paths)
+ bluePrintCatalogLoadService.loadPathsBluePrintModelCatalog(paths)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ModelTypeLoadService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ModelTypeLoadService.kt
index cb79533..e96daf9 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ModelTypeLoadService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ModelTypeLoadService.kt
@@ -24,8 +24,8 @@
import org.apache.commons.lang3.text.StrBuilder
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.ModelTypeHandler
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.EntityType
@@ -118,19 +118,19 @@
val definitionType: String?
when (T::class) {
DataType::class -> {
- definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
}
RelationshipType::class -> {
- definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE
+ definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE
}
ArtifactType::class -> {
- definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE
+ definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE
}
NodeType::class -> {
- definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE
+ definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE
}
else -> {
- throw BlueprintException("couldn't process model type($classType) definition")
+ throw BluePrintException("couldn't process model type($classType) definition")
}
}
modelType.definitionType = definitionType
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ResourceDictionaryLoadService.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ResourceDictionaryLoadService.kt
index 295e89a..15cf3dc 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ResourceDictionaryLoadService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/load/ResourceDictionaryLoadService.kt
@@ -22,7 +22,7 @@
import kotlinx.coroutines.coroutineScope
import org.apache.commons.lang3.text.StrBuilder
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.handler.ResourceDictionaryHandler
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.readNBText
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -75,7 +75,7 @@
resourceDictionaryHandler.saveResourceDefinition(resourceDefinition)
log.trace("Resource dictionary(${file.name}) loaded successfully ")
} else {
- throw BlueprintException("couldn't get dictionary from content information")
+ throw BluePrintException("couldn't get dictionary from content information")
}
} catch (e: Exception) {
errorBuilder.appendln("Couldn't load Resource dictionary (${file.name}: ${e.message})")
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BlueprintRepoServiceImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BluePrintRepoServiceImpl.kt
similarity index 80%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BlueprintRepoServiceImpl.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BluePrintRepoServiceImpl.kt
index 19f4e61..420a9fc 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BlueprintRepoServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/service/BluePrintRepoServiceImpl.kt
@@ -22,70 +22,70 @@
import org.apache.commons.lang3.StringUtils
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.repository.ModelTypeRepository
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.repository.ResourceDictionaryRepository
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceDefinition
import org.springframework.stereotype.Service
-interface ResourceDefinitionRepoService : BlueprintRepoService {
+interface ResourceDefinitionRepoService : BluePrintRepoService {
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
fun getResourceDefinition(resourceDefinitionName: String): ResourceDefinition
}
@Service
-open class BlueprintRepoFileService(
+open class BluePrintRepoFileService(
private val modelTypeRepository: ModelTypeRepository,
private val resourceDictionaryRepository: ResourceDictionaryRepository
) : ResourceDefinitionRepoService {
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getNodeType(nodeTypeName: String): NodeType {
return getModelType(nodeTypeName, NodeType::class.java)
- ?: throw BlueprintException("couldn't get NodeType($nodeTypeName)")
+ ?: throw BluePrintException("couldn't get NodeType($nodeTypeName)")
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getDataType(dataTypeName: String): DataType {
return getModelType(dataTypeName, DataType::class.java)
- ?: throw BlueprintException("couldn't get DataType($dataTypeName)")
+ ?: throw BluePrintException("couldn't get DataType($dataTypeName)")
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getArtifactType(artifactTypeName: String): ArtifactType {
return getModelType(artifactTypeName, ArtifactType::class.java)
- ?: throw BlueprintException("couldn't get ArtifactType($artifactTypeName)")
+ ?: throw BluePrintException("couldn't get ArtifactType($artifactTypeName)")
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getRelationshipType(relationshipTypeName: String): RelationshipType {
return getModelType(relationshipTypeName, RelationshipType::class.java)
- ?: throw BlueprintException("couldn't get RelationshipType($relationshipTypeName)")
+ ?: throw BluePrintException("couldn't get RelationshipType($relationshipTypeName)")
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getCapabilityDefinition(capabilityDefinitionName: String): CapabilityDefinition {
return getModelType(capabilityDefinitionName, CapabilityDefinition::class.java)
- ?: throw BlueprintException("couldn't get CapabilityDefinition($capabilityDefinitionName)")
+ ?: throw BluePrintException("couldn't get CapabilityDefinition($capabilityDefinitionName)")
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
override fun getResourceDefinition(resourceDefinitionName: String): ResourceDefinition {
val dbResourceDictionary = resourceDictionaryRepository.findByName(resourceDefinitionName)
return if (dbResourceDictionary != null) {
dbResourceDictionary.definition
} else {
- throw BlueprintException(String.format("failed to get resource dictionary (%s) from repo", resourceDefinitionName))
+ throw BluePrintException(String.format("failed to get resource dictionary (%s) from repo", resourceDefinitionName))
}
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
private fun <T> getModelType(modelName: String, valueClass: Class<T>): T? {
Preconditions.checkArgument(
StringUtils.isNotBlank(modelName),
@@ -101,14 +101,14 @@
return JacksonUtils.readValue(modelDefinition, valueClass)
}
- @Throws(BlueprintException::class)
+ @Throws(BluePrintException::class)
private fun getModelDefinition(modelName: String): JsonNode {
val modelDefinition: JsonNode
val modelTypeDb = modelTypeRepository.findByModelName(modelName)
if (modelTypeDb != null) {
modelDefinition = modelTypeDb.definition
} else {
- throw BlueprintException(String.format("failed to get model definition (%s) from repo", modelName))
+ throw BluePrintException(String.format("failed to get model definition (%s) from repo", modelName))
}
return modelDefinition
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtils.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtils.kt
similarity index 88%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtils.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtils.kt
index b10b170..6d72c27 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtils.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtils.kt
@@ -19,20 +19,20 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api.utils
import kotlinx.coroutines.reactive.awaitSingle
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeType
import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
import org.onap.ccsdk.cds.controllerblueprints.core.deCompress
import org.onap.ccsdk.cds.controllerblueprints.core.deleteNBDir
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintRepoService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintRepoService
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
import org.onap.ccsdk.cds.controllerblueprints.core.reCreateNBDirs
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintArchiveUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintArchiveUtils
import org.springframework.core.io.ByteArrayResource
import org.springframework.core.io.Resource
import org.springframework.http.HttpHeaders
@@ -42,58 +42,58 @@
import java.io.File
import java.nio.file.Paths
-class BlueprintEnhancerUtils {
+class BluePrintEnhancerUtils {
companion object {
- val log = logger(BlueprintEnhancerUtils)
+ val log = logger(BluePrintEnhancerUtils)
fun populateDataTypes(
- bluePrintContext: BlueprintContext,
- bluePrintRepoService: BlueprintRepoService,
+ bluePrintContext: BluePrintContext,
+ bluePrintRepoService: BluePrintRepoService,
dataTypeName: String
): DataType {
val dataType = bluePrintContext.serviceTemplate.dataTypes?.get(dataTypeName)
?: bluePrintRepoService.getDataType(dataTypeName)
- ?: throw BlueprintException("couldn't get DataType($dataTypeName) from repo.")
+ ?: throw BluePrintException("couldn't get DataType($dataTypeName) from repo.")
bluePrintContext.serviceTemplate.dataTypes?.put(dataTypeName, dataType)
return dataType
}
fun populateRelationshipType(
- bluePrintContext: BlueprintContext,
- bluePrintRepoService: BlueprintRepoService,
+ bluePrintContext: BluePrintContext,
+ bluePrintRepoService: BluePrintRepoService,
relationshipName: String
): RelationshipType {
val relationshipType = bluePrintContext.serviceTemplate.relationshipTypes?.get(relationshipName)
?: bluePrintRepoService.getRelationshipType(relationshipName)
- ?: throw BlueprintException("couldn't get RelationshipType($relationshipName) from repo.")
+ ?: throw BluePrintException("couldn't get RelationshipType($relationshipName) from repo.")
bluePrintContext.serviceTemplate.relationshipTypes?.put(relationshipName, relationshipType)
return relationshipType
}
fun populateNodeType(
- bluePrintContext: BlueprintContext,
- bluePrintRepoService: BlueprintRepoService,
+ bluePrintContext: BluePrintContext,
+ bluePrintRepoService: BluePrintRepoService,
nodeTypeName: String
): NodeType {
val nodeType = bluePrintContext.serviceTemplate.nodeTypes?.get(nodeTypeName)
?: bluePrintRepoService.getNodeType(nodeTypeName)
- ?: throw BlueprintException("couldn't get NodeType($nodeTypeName) from repo.")
+ ?: throw BluePrintException("couldn't get NodeType($nodeTypeName) from repo.")
bluePrintContext.serviceTemplate.nodeTypes?.put(nodeTypeName, nodeType)
return nodeType
}
fun populateArtifactType(
- bluePrintContext: BlueprintContext,
- bluePrintRepoService: BlueprintRepoService,
+ bluePrintContext: BluePrintContext,
+ bluePrintRepoService: BluePrintRepoService,
artifactTypeName: String
): ArtifactType {
val artifactType = bluePrintContext.serviceTemplate.artifactTypes?.get(artifactTypeName)
?: bluePrintRepoService.getArtifactType(artifactTypeName)
- ?: throw BlueprintException("couldn't get ArtifactType($artifactTypeName) from repo.")
+ ?: throw BluePrintException("couldn't get ArtifactType($artifactTypeName) from repo.")
bluePrintContext.serviceTemplate.artifactTypes?.put(artifactTypeName, artifactType)
return artifactType
}
@@ -154,7 +154,7 @@
outputFileName: String = "enhanced-cba.zip"
): ByteArray {
val compressedFile = normalizedFile(archiveDir, outputFileName)
- BlueprintArchiveUtils.compress(Paths.get(enhanceDir).toFile(), compressedFile)
+ BluePrintArchiveUtils.compress(Paths.get(enhanceDir).toFile(), compressedFile)
return compressedFile.readBytes()
}
@@ -166,7 +166,7 @@
):
ResponseEntity<Resource> {
val compressedFile = normalizedFile(archiveDir, outputFileName)
- BlueprintArchiveUtils.compress(Paths.get(enhanceDir).toFile(), compressedFile)
+ BluePrintArchiveUtils.compress(Paths.get(enhanceDir).toFile(), compressedFile)
return prepareResourceEntity(compressedFile)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
index 78f9e16..08de136 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/ModelTypeValidator.kt
@@ -18,9 +18,9 @@
import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.ArtifactType
import org.onap.ccsdk.cds.controllerblueprints.core.data.CapabilityDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.data.DataType
@@ -41,25 +41,25 @@
fun validateModelTypeDefinition(definitionType: String, definitionContent: JsonNode): Boolean {
when (definitionType) {
- BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE -> {
JacksonUtils.readValue(definitionContent, DataType::class.java)
- ?: throw BlueprintException("Model type definition is not DataType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not DataType valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TYPE -> {
JacksonUtils.readValue(definitionContent, NodeType::class.java)
- ?: throw BlueprintException("Model type definition is not NodeType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not NodeType valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_ARTIFACT_TYPE -> {
JacksonUtils.readValue(definitionContent, ArtifactType::class.java)
- ?: throw BlueprintException("Model type definition is not ArtifactType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not ArtifactType valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_CAPABILITY_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_CAPABILITY_TYPE -> {
JacksonUtils.readValue(definitionContent, CapabilityDefinition::class.java)
- ?: throw BlueprintException("Model type definition is not CapabilityDefinition valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not CapabilityDefinition valid content $definitionContent")
}
- BlueprintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE -> {
+ BluePrintConstants.MODEL_DEFINITION_TYPE_RELATIONSHIP_TYPE -> {
JacksonUtils.readValue(definitionContent, RelationshipType::class.java)
- ?: throw BlueprintException("Model type definition is not RelationshipType valid content $definitionContent")
+ ?: throw BluePrintException("Model type definition is not RelationshipType valid content $definitionContent")
}
}
return true
@@ -74,7 +74,7 @@
fun validateModelType(modelType: ModelType?): Boolean {
checkNotNull(modelType) { "Model Type Information is missing." }
- val validRootTypes = BlueprintTypes.validModelTypes()
+ val validRootTypes = BluePrintTypes.validModelTypes()
check(validRootTypes.contains(modelType.definitionType)) {
"Not Valid Model Root Type(${modelType.definitionType}), It should be $validRootTypes"
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandlerTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandlerTest.kt
similarity index 88%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandlerTest.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandlerTest.kt
index ed60f72..a2f2083 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintManagementGRPCHandlerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BluePrintManagementGRPCHandlerTest.kt
@@ -30,15 +30,15 @@
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.compress
import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementServiceGrpc
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput
import org.onap.ccsdk.cds.controllerblueprints.management.api.DownloadAction
import org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk
import org.onap.ccsdk.cds.controllerblueprints.management.api.RemoveAction
@@ -58,13 +58,13 @@
classes = [DesignerApiTestConfiguration::class, ErrorCatalogTestConfiguration::class]
)
@TestPropertySource(locations = ["classpath:application-test.properties"])
-class BlueprintManagementGRPCHandlerTest {
+class BluePrintManagementGRPCHandlerTest {
@get:Rule
val grpcServerRule = GrpcServerRule().directExecutor()
@Autowired
- lateinit var bluePrintManagementGRPCHandler: BlueprintManagementGRPCHandler
+ lateinit var bluePrintManagementGRPCHandler: BluePrintManagementGRPCHandler
@BeforeTest
fun init() {
@@ -86,13 +86,13 @@
@Test
fun testBootstrap() {
- val blockingStub = BlueprintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
+ val blockingStub = BluePrintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
val id = "123_Bootstrap"
val req = createBootstrapInputRequest(id)
val bootstrapOutput = blockingStub.bootstrapBlueprint(req)
assertEquals(200, bootstrapOutput.status.code)
assertTrue(
- bootstrapOutput.status.message!!.contentEquals(BlueprintConstants.STATUS_SUCCESS),
+ bootstrapOutput.status.message!!.contentEquals(BluePrintConstants.STATUS_SUCCESS),
"failed to get success status"
)
assertEquals(EventType.EVENT_COMPONENT_EXECUTED, bootstrapOutput.status.eventType)
@@ -101,14 +101,14 @@
@Test
fun `test upload and download blueprint`() {
- val blockingStub = BlueprintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
+ val blockingStub = BluePrintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
val id = "123_upload"
val req = createUploadInputRequest(id, UploadAction.PUBLISH.toString())
val output = blockingStub.uploadBlueprint(req)
assertEquals(200, output.status.code)
assertTrue(
- output.status.message!!.contentEquals(BlueprintConstants.STATUS_SUCCESS),
+ output.status.message!!.contentEquals(BluePrintConstants.STATUS_SUCCESS),
"failed to get success status"
)
assertEquals(EventType.EVENT_COMPONENT_EXECUTED, output.status.eventType)
@@ -120,7 +120,7 @@
val downloadOutput = blockingStub.downloadBlueprint(downloadReq)
assertEquals(200, downloadOutput.status.code)
assertTrue(
- downloadOutput.status.message!!.contentEquals(BlueprintConstants.STATUS_SUCCESS),
+ downloadOutput.status.message!!.contentEquals(BluePrintConstants.STATUS_SUCCESS),
"failed to get success status"
)
assertEquals(EventType.EVENT_COMPONENT_EXECUTED, downloadOutput.status.eventType)
@@ -130,14 +130,14 @@
@Test
fun `test delete blueprint`() {
- val blockingStub = BlueprintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
+ val blockingStub = BluePrintManagementServiceGrpc.newBlockingStub(grpcServerRule.channel)
val id = "123_delete"
val req = createUploadInputRequest(id, UploadAction.DRAFT.toString())
var output = blockingStub.uploadBlueprint(req)
assertEquals(200, output.status.code)
assertTrue(
- output.status.message!!.contentEquals(BlueprintConstants.STATUS_SUCCESS),
+ output.status.message!!.contentEquals(BluePrintConstants.STATUS_SUCCESS),
"failed to get success status"
)
assertEquals(id, output.commonHeader.requestId)
@@ -160,7 +160,7 @@
val basicAuthGrpcClientService = TokenAuthGrpcClientService(tokenAuthGrpcClientProperties)
val channel = basicAuthGrpcClientService.channel()
- val blockingStub = BlueprintManagementServiceGrpc.newBlockingStub(channel)
+ val blockingStub = BluePrintManagementServiceGrpc.newBlockingStub(channel)
val bluePrintUploadInput = createUploadInputRequest("12345", UploadAction.DRAFT.toString())
@@ -169,7 +169,7 @@
}
}
- private fun createBootstrapInputRequest(id: String): BlueprintBootstrapInput {
+ private fun createBootstrapInputRequest(id: String): BluePrintBootstrapInput {
val commonHeader = CommonHeader
.newBuilder()
.setTimestamp("2012-04-23T18:25:43.511Z")
@@ -177,7 +177,7 @@
.setRequestId(id)
.setSubRequestId("1234-56").build()
- return BlueprintBootstrapInput.newBuilder()
+ return BluePrintBootstrapInput.newBuilder()
.setCommonHeader(commonHeader)
.setLoadModelType(false)
.setLoadResourceDictionary(false)
@@ -185,7 +185,7 @@
.build()
}
- private fun createUploadInputRequest(id: String, action: String): BlueprintUploadInput {
+ private fun createUploadInputRequest(id: String, action: String): BluePrintUploadInput {
val file = normalizedFile("./target/blueprints/generated-cba.zip")
assertTrue(file.exists(), "couldnt get file ${file.absolutePath}")
@@ -205,14 +205,14 @@
val fileChunk = FileChunk.newBuilder().setChunk(ByteString.copyFrom(file.inputStream().readBytes()))
.build()
- return BlueprintUploadInput.newBuilder()
+ return BluePrintUploadInput.newBuilder()
.setCommonHeader(commonHeader)
.setActionIdentifiers(actionIdentifier)
.setFileChunk(fileChunk)
.build()
}
- private fun createDownloadInputRequest(id: String, action: String): BlueprintDownloadInput {
+ private fun createDownloadInputRequest(id: String, action: String): BluePrintDownloadInput {
val commonHeader = CommonHeader
.newBuilder()
.setTimestamp("2012-04-23T18:25:43.511Z")
@@ -220,7 +220,7 @@
.setRequestId(id)
.setSubRequestId("1234-56").build()
- return BlueprintDownloadInput.newBuilder()
+ return BluePrintDownloadInput.newBuilder()
.setCommonHeader(commonHeader)
.setActionIdentifiers(
ActionIdentifiers.newBuilder()
@@ -231,7 +231,7 @@
.build()
}
- private fun createRemoveInputRequest(id: String): BlueprintRemoveInput {
+ private fun createRemoveInputRequest(id: String): BluePrintRemoveInput {
val commonHeader = CommonHeader
.newBuilder()
.setTimestamp("2012-04-23T18:25:43.511Z")
@@ -239,7 +239,7 @@
.setRequestId(id)
.setSubRequestId("1234-56").build()
- return BlueprintRemoveInput.newBuilder()
+ return BluePrintRemoveInput.newBuilder()
.setCommonHeader(commonHeader)
.setActionIdentifiers(
ActionIdentifiers.newBuilder()
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelControllerTest.kt
index 92f369b..a42ac05 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelControllerTest.kt
@@ -28,7 +28,7 @@
import org.junit.runners.MethodSorters
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.domain.BlueprintModelSearch
import org.onap.ccsdk.cds.controllerblueprints.core.compress
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
@@ -79,7 +79,7 @@
@Autowired
lateinit var webTestClient: WebTestClient
- private var bluePrintLoadConfiguration: BlueprintLoadConfiguration? = null
+ private var bluePrintLoadConfiguration: BluePrintLoadConfiguration? = null
private val blueprintDir = "./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
private var zipBlueprintFileName: String? = null
@@ -90,7 +90,7 @@
fun setUp() {
assertNotNull(webTestClient, " Failed to create WebTestClient")
- bluePrintLoadConfiguration = BlueprintLoadConfiguration().apply {
+ bluePrintLoadConfiguration = BluePrintLoadConfiguration().apply {
blueprintArchivePath = "./target/blueprints/archive"
blueprintWorkingPath = "./target/blueprints/work"
blueprintDeployPath = "./target/blueprints/deploy"
@@ -113,7 +113,7 @@
}
@Test
- fun test01_saveBlueprint() {
+ fun test01_saveBluePrint() {
bp = runBlocking {
val body = MultipartBodyBuilder().apply {
part(
@@ -146,7 +146,7 @@
@Test
@Throws(JSONException::class)
- fun test02_getBlueprintByNameAndVersion() {
+ fun test02_getBluePrintByNameAndVersion() {
webTestClient(
HttpMethod.GET, null,
"/api/v1/blueprint-model/by-name/${bp!!.artifactName}/version/${bp!!.artifactVersion}",
@@ -172,7 +172,7 @@
@Test
@Throws(JSONException::class)
- fun test05_downloadBlueprint() {
+ fun test05_downloadBluePrint() {
webTestClient(
HttpMethod.GET, null,
"/api/v1/blueprint-model/download/${bp!!.id}",
@@ -237,7 +237,7 @@
}
@Test
- fun test10_deleteBlueprint() {
+ fun test10_deleteBluePrint() {
// webTestClient.delete().uri("/api/v1/blueprint-model/${bp!!.id}")
// .header("Authorization", "Basic " + Base64Utils
// .encodeToString(("ccsdkapps" + ":" + "ccsdkapps").toByteArray(UTF_8)))
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt
index bcce13e..8226aaa 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/ModelTypeControllerTest.kt
@@ -23,7 +23,7 @@
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
@@ -56,15 +56,15 @@
val content = JacksonUtils.getClassPathFileContent("model_type/data_type/datatype-property.json")
var modelType = ModelType()
- modelType.definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
- modelType.derivedFrom = BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT
+ modelType.definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ modelType.derivedFrom = BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT
modelType.description = "Definition for Sample Datatype "
modelType.definition = JacksonUtils.jsonNode(content)
modelType.modelName = modelName
modelType.version = "1.0.0"
modelType.tags = (
- "test-datatype ," + BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
- BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ "test-datatype ," + BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
)
modelType.updatedBy = "xxxxxx@xxx.com"
modelType = modelTypeController.saveModelType(modelType)
@@ -108,7 +108,7 @@
Assert.assertNotNull("Failed to get Id for api call getModelByName ", dbModelType!!.modelName)
val dbDatatypeModelTypes =
- modelTypeController.getModelTypeByDefinitionType(BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
+ modelTypeController.getModelTypeByDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
Assert.assertNotNull("Failed to find getModelTypeByDefinitionType by tags", dbDatatypeModelTypes)
Assert.assertTrue("Failed to find getModelTypeByDefinitionType by count", dbDatatypeModelTypes.isNotEmpty())
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/TestDatabaseConfiguration.kt
index 7fcea4d..6808a27 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/TestDatabaseConfiguration.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.designer.api
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDatabaseConfiguration
import org.springframework.context.annotation.Bean
@@ -29,7 +29,7 @@
import javax.sql.DataSource
@Configuration
-@Import(BlueprintDBLibConfiguration::class)
+@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = [
"org.onap.ccsdk.cds.blueprintsprocessor.db.primary",
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImplTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImplTest.kt
similarity index 93%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImplTest.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImplTest.kt
index 8bdfbbb..a866dca 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImplTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BluePrintEnhancerServiceImplTest.kt
@@ -25,8 +25,8 @@
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load.ModelTypeLoadService
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.load.ResourceDictionaryLoadService
import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintEnhancerService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -38,7 +38,7 @@
classes = [DesignerApiTestConfiguration::class]
)
@TestPropertySource(locations = ["classpath:application-test.properties"])
-class BlueprintEnhancerServiceImplTest {
+class BluePrintEnhancerServiceImplTest {
@Autowired
lateinit var modelTypeLoadService: ModelTypeLoadService
@@ -47,10 +47,10 @@
lateinit var resourceDictionaryLoadService: ResourceDictionaryLoadService
@Autowired
- lateinit var bluePrintEnhancerService: BlueprintEnhancerService
+ lateinit var bluePrintEnhancerService: BluePrintEnhancerService
@Autowired
- lateinit var bluePrintValidatorService: BlueprintValidatorService
+ lateinit var bluePrintValidatorService: BluePrintValidatorService
@Test
@Throws(Exception::class)
@@ -100,8 +100,8 @@
val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath)
Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext)
- // Validate the Generated Blueprints
- val valid = bluePrintValidatorService.validateBlueprints(targetPath)
+ // Validate the Generated BluePrints
+ val valid = bluePrintValidatorService.validateBluePrints(targetPath)
Assert.assertTrue("blueprint($basePath) validation failed ", valid)
// Enable this to get the enhanced zip file
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt
index 3112bfb..8ee2eb3 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/handler/ModelTypeServiceTest.kt
@@ -24,7 +24,7 @@
import org.junit.runners.MethodSorters
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
@@ -57,15 +57,15 @@
val content = JacksonUtils.getClassPathFileContent("model_type/data_type/datatype-property.json")
var modelType = ModelType()
- modelType.definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
- modelType.derivedFrom = BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT
+ modelType.definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ modelType.derivedFrom = BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT
modelType.description = "Definition for Sample Datatype "
modelType.definition = JacksonUtils.jsonNode(content)
modelType.modelName = modelName
modelType.version = "1.0.0"
modelType.tags = (
- "test-datatype ," + BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
- BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ "test-datatype ," + BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
)
modelType.updatedBy = "xxxxxx@xxx.com"
modelType = modelTypeHandler!!.saveModel(modelType)
@@ -110,11 +110,11 @@
Assert.assertNotNull("Failed to get response for api call getModelByName ", dbModelType)
Assert.assertNotNull("Failed to get Id for api call getModelByName ", dbModelType!!.modelName)
- val dbDatatypeModelTypes = modelTypeHandler.getModelTypeByDefinitionType(BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
+ val dbDatatypeModelTypes = modelTypeHandler.getModelTypeByDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)
Assert.assertNotNull("Failed to find getModelTypeByDefinitionType by tags", dbDatatypeModelTypes)
Assert.assertTrue("Failed to find getModelTypeByDefinitionType by count", dbDatatypeModelTypes.size > 0)
- val dbModelTypeByDerivedFroms = modelTypeHandler.getModelTypeByDerivedFrom(BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT)
+ val dbModelTypeByDerivedFroms = modelTypeHandler.getModelTypeByDerivedFrom(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT)
Assert.assertNotNull("Failed to find getModelTypeByDerivedFrom by tags", dbModelTypeByDerivedFroms)
Assert.assertTrue("Failed to find getModelTypeByDerivedFrom by count", dbModelTypeByDerivedFroms.size > 0)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt
index 9bc8c62..ca85ed2 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/repository/ModelTypeReactRepositoryTest.kt
@@ -23,7 +23,7 @@
import org.junit.runners.MethodSorters
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.DesignerApiTestConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.designer.api.domain.ModelType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
@@ -59,15 +59,15 @@
val content = normalizedFile("./src/test/resources/model_type/data_type/datatype-property.json")
.readText(Charset.defaultCharset())
val modelType = ModelType()
- modelType.definitionType = BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
- modelType.derivedFrom = BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT
+ modelType.definitionType = BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ modelType.derivedFrom = BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT
modelType.description = "Definition for Sample Datatype "
modelType.definition = JacksonUtils.jsonNode(content)
modelType.modelName = modelName
modelType.version = "1.0.0"
modelType.tags = (
- "test-datatype ," + BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
- BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
+ "test-datatype ," + BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT + "," +
+ BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE
)
modelType.updatedBy = "xxxxxx@xxx.com"
@@ -81,11 +81,11 @@
Assert.assertNotNull("Failed to findByModelName ", dbFindByModelName)
val dbFindByDefinitionType =
- modelTypeReactRepository.findByDefinitionType(BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE).collectList().block()
+ modelTypeReactRepository.findByDefinitionType(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE).collectList().block()
Assert.assertNotNull("Failed to findByDefinitionType ", dbFindByDefinitionType)
Assert.assertTrue("Failed to findByDefinitionType count", dbFindByDefinitionType!!.size > 0)
- val dbFindByDerivedFrom = modelTypeReactRepository.findByDerivedFrom(BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT).collectList().block()
+ val dbFindByDerivedFrom = modelTypeReactRepository.findByDerivedFrom(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT).collectList().block()
Assert.assertNotNull("Failed to find findByDerivedFrom", dbFindByDerivedFrom)
Assert.assertTrue("Failed to find findByDerivedFrom by count", dbFindByDerivedFrom!!.size > 0)
@@ -94,12 +94,12 @@
Assert.assertTrue("Failed to findByModelNameIn by count", dbFindByModelNameIn!!.size > 0)
val dbFindByDefinitionTypeIn =
- modelTypeReactRepository.findByDefinitionTypeIn(Arrays.asList(BlueprintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)).collectList().block()
+ modelTypeReactRepository.findByDefinitionTypeIn(Arrays.asList(BluePrintConstants.MODEL_DEFINITION_TYPE_DATA_TYPE)).collectList().block()
Assert.assertNotNull("Failed to findByDefinitionTypeIn", dbFindByDefinitionTypeIn)
Assert.assertTrue("Failed to findByDefinitionTypeIn by count", dbFindByDefinitionTypeIn!!.size > 0)
val dbFindByDerivedFromIn =
- modelTypeReactRepository.findByDerivedFromIn(Arrays.asList(BlueprintConstants.MODEL_TYPE_DATATYPES_ROOT)).collectList().block()
+ modelTypeReactRepository.findByDerivedFromIn(Arrays.asList(BluePrintConstants.MODEL_TYPE_DATATYPES_ROOT)).collectList().block()
Assert.assertNotNull("Failed to find findByDerivedFromIn", dbFindByDerivedFromIn)
Assert.assertTrue("Failed to find findByDerivedFromIn by count", dbFindByDerivedFromIn!!.size > 0)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtilsTest.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtilsTest.kt
similarity index 94%
rename from ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtilsTest.kt
rename to ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtilsTest.kt
index 461af84..c644aee 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BlueprintEnhancerUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/utils/BluePrintEnhancerUtilsTest.kt
@@ -29,7 +29,7 @@
import java.util.UUID
import kotlin.test.assertTrue
-class BlueprintEnhancerUtilsTest {
+class BluePrintEnhancerUtilsTest {
private val blueprintDir = "./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
private val blueprintArchivePath: String = "./target/blueprints/archive"
@@ -61,8 +61,8 @@
val enhanceId = UUID.randomUUID().toString()
val blueprintArchiveLocation = normalizedPathName(blueprintArchivePath, enhanceId)
val blueprintEnrichmentLocation = normalizedPathName(blueprintEnrichmentPath, enhanceId)
- BlueprintEnhancerUtils.copyFilePartToEnhanceDir(filePart, blueprintArchiveLocation, blueprintEnrichmentLocation)
- BlueprintEnhancerUtils.compressEnhanceDirAndReturnFilePart(blueprintEnrichmentLocation, blueprintArchiveLocation)
+ BluePrintEnhancerUtils.copyFilePartToEnhanceDir(filePart, blueprintArchiveLocation, blueprintEnrichmentLocation)
+ BluePrintEnhancerUtils.compressEnhanceDirAndReturnFilePart(blueprintEnrichmentLocation, blueprintArchiveLocation)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt
index ab1f9eb..c1532cd 100644
--- a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/configuration/HealthCheckProperties.kt
@@ -38,7 +38,7 @@
@Value("#{'\${cdslistener.healthcheck.mapping-service-name-with-service-link:}'.split(']')}")
private val cdsListenerServiceMapping: List<String>? = null
- open fun getBlueprintBaseURL(): String? {
+ open fun getBluePrintBaseURL(): String? {
return bluePrintProcessorBaseURL
}
@@ -46,7 +46,7 @@
return cdsListenerBaseURL
}
- open fun getBlueprintServiceInformation(): List<ServiceEndpoint> {
+ open fun getBluePrintServiceInformation(): List<ServiceEndpoint> {
val serviceName = ServiceName.BLUEPRINT
return getListOfServiceEndPoints(blueprintprocessorServiceMapping, serviceName)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/AbstractHealthCheck.kt b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/AbstractHealthCheck.kt
index 6bfc182..6d49ebe 100644
--- a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/AbstractHealthCheck.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/AbstractHealthCheck.kt
@@ -33,7 +33,7 @@
*/
abstract class AbstractHealthCheck(private val endPointExecution: EndPointExecution) {
- private var logger = LoggerFactory.getLogger(BlueprintProcessorHealthCheck::class.java)
+ private var logger = LoggerFactory.getLogger(BluePrintProcessorHealthCheck::class.java)
private fun retrieveSystemStatus(list: List<ServiceEndpoint>): HealthApiResponse {
val healthApiResponse: HealthApiResponse
diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BlueprintProcessorHealthCheck.kt b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BluePrintProcessorHealthCheck.kt
similarity index 92%
rename from ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BlueprintProcessorHealthCheck.kt
rename to ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BluePrintProcessorHealthCheck.kt
index 9ffa824..dddad52 100644
--- a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BlueprintProcessorHealthCheck.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/health/BluePrintProcessorHealthCheck.kt
@@ -28,13 +28,13 @@
* @version 1.0
*/
@Service
-open class BlueprintProcessorHealthCheck(
+open class BluePrintProcessorHealthCheck(
private val endPointExecution: EndPointExecution,
private val healthCheckProperties: HealthCheckProperties
) :
AbstractHealthCheck(endPointExecution) {
override fun setupServiceEndpoint(): List<ServiceEndpoint> {
- return healthCheckProperties.getBlueprintServiceInformation()
+ return healthCheckProperties.getBluePrintServiceInformation()
}
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.kt b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.kt
index 186d419..e3ba724 100644
--- a/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/health-api-common/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckServiceTest.kt
@@ -31,7 +31,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.domain.HealthCheckStatus
import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.domain.ServiceEndpoint
import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.EndPointExecution
-import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.health.BlueprintProcessorHealthCheck
+import org.onap.ccsdk.cds.blueprintsprocessor.healthapi.service.health.BluePrintProcessorHealthCheck
import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BasicAuthRestClientService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.BlueprintWebClientService
@@ -52,12 +52,12 @@
@InjectMocks
private var endPointExecution: EndPointExecution? = null
- private var bluePrintProcessorHealthCheck: BlueprintProcessorHealthCheck? = null
+ private var bluePrintProcessorHealthCheck: BluePrintProcessorHealthCheck? = null
@Before
fun setup() {
endPointExecution = Mockito.spy(endPointExecution!!)
- Mockito.`when`(healthCheckProperties!!.getBlueprintServiceInformation()).thenReturn(
+ Mockito.`when`(healthCheckProperties!!.getBluePrintServiceInformation()).thenReturn(
Arrays.asList(
ServiceEndpoint("Execution service ", "http://cds-blueprints-processor-http:8080/api/v1/execution-service/health-check"),
ServiceEndpoint("Resources service", "http://cds-blueprints-processor-http:8080/api/v1/resources/health-check"),
@@ -65,7 +65,7 @@
)
)
- bluePrintProcessorHealthCheck = BlueprintProcessorHealthCheck(endPointExecution!!, healthCheckProperties)
+ bluePrintProcessorHealthCheck = BluePrintProcessorHealthCheck(endPointExecution!!, healthCheckProperties)
}
@Test
diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/controller/CombinedMetrics.kt b/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/controller/CombinedMetrics.kt
index d2206df..d2f0202 100644
--- a/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/controller/CombinedMetrics.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/controller/CombinedMetrics.kt
@@ -28,7 +28,7 @@
import org.springframework.web.bind.annotation.RestController
/**
- * Exposes API for checking Metrics of Blueprint processor and CDSListener.
+ * Exposes API for checking Metrics of BluePrint processor and CDSListener.
*
* @author Shaaban Ebrahim
* @version 1.0
@@ -37,7 +37,7 @@
@RequestMapping("/api/v1/combinedMetrics")
@Api(
value = "/api/v1/combinedMetrics",
- description = "gather all Metrics info from Blueprint and CDSListener"
+ description = "gather all Metrics info from BluePrint and CDSListener"
)
open class CombinedMetrics(private val combinedMetricsService: CombinedMetricsService) {
diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/CombinedHealthService.kt b/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/CombinedHealthService.kt
index c765201..f4c3e93 100644
--- a/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/CombinedHealthService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/CombinedHealthService.kt
@@ -23,7 +23,7 @@
import org.springframework.stereotype.Service
/**
- *Service for combined health (BlueprintProcessor and CDSListener)
+ *Service for combined health (BluePrintProcessor and CDSListener)
*
* @author Shaaban Ebrahim
* @version 1.0
@@ -36,7 +36,7 @@
private fun setupServiceEndpoint(): List<ServiceEndpoint> {
return listOf(
- ServiceEndpoint("BlueprintProcessor Health Check ", healthCheckProperties.getBlueprintBaseURL() + "actuator/health"),
+ ServiceEndpoint("BluePrintProcessor Health Check ", healthCheckProperties.getBluePrintBaseURL() + "actuator/health"),
ServiceEndpoint("CDSListener Health Check", healthCheckProperties.getCDSListenerBaseURL() + "actuator/health")
)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/CombinedMetricsService.kt b/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/CombinedMetricsService.kt
index b4d54f6..0a2e7ae 100644
--- a/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/CombinedMetricsService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/health-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/service/CombinedMetricsService.kt
@@ -27,7 +27,7 @@
import org.springframework.stereotype.Service
/**
- *Service for combined Metrics for CDS Listener and BlueprintProcessor
+ *Service for combined Metrics for CDS Listener and BluePrintProcessor
*
* @author Shaaban Ebrahim
* @version 1.0
@@ -41,7 +41,7 @@
private fun setupServiceEndpoint(): List<ServiceEndpoint> {
return listOf(
- ServiceEndpoint("BlueprintProcessor metrics", healthCheckProperties.getBlueprintBaseURL() + "/actuator/metrics"),
+ ServiceEndpoint("BluePrintProcessor metrics", healthCheckProperties.getBluePrintBaseURL() + "/actuator/metrics"),
ServiceEndpoint("CDS Listener metrics", healthCheckProperties.getCDSListenerBaseURL() + "/actuator/metrics")
)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckApplicationTests.kt b/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckApplicationTests.kt
index 5c35fc3..1f3d256 100644
--- a/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckApplicationTests.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/health-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/healthapi/HealthCheckApplicationTests.kt
@@ -18,10 +18,10 @@
/*
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
import org.springframework.context.annotation.ComponentScan
@@ -41,8 +41,8 @@
@RunWith(SpringRunner::class)
@WebFluxTest
@ContextConfiguration(
- classes = [BlueprintRuntimeService::class, BlueprintCoreConfiguration::class,
- BlueprintCatalogService::class, ComponentScriptExecutor::class]
+ classes = [BluePrintRuntimeService::class, BluePrintCoreConfiguration::class,
+ BluePrintCatalogService::class, ComponentScriptExecutor::class]
)
@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
@TestPropertySource(locations = ["classpath:application-test.properties"])
diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceControllerTest.kt
index 77471bd..40d6f56 100644
--- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/ResourceControllerTest.kt
@@ -22,7 +22,7 @@
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.ResourceResolution
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.db.ResourceResolutionDBService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
@@ -242,7 +242,7 @@
resourceAssignment.dictionaryName = "dd$prefix"
resourceAssignment.dictionarySource = "source$prefix"
resourceAssignment.version = 2
- resourceAssignment.status = BlueprintConstants.STATUS_SUCCESS
+ resourceAssignment.status = BluePrintConstants.STATUS_SUCCESS
resourceAssignment.property = property
return resourceAssignment
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt
index ff9aadb..945a30c 100644
--- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TemplateControllerTest.kt
@@ -19,9 +19,9 @@
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest
@@ -38,8 +38,8 @@
@WebFluxTest
@ContextConfiguration(
classes = [
- TestDatabaseConfiguration::class, BlueprintCoreConfiguration::class,
- BlueprintCatalogService::class, ErrorCatalogTestConfiguration::class
+ TestDatabaseConfiguration::class, BluePrintCoreConfiguration::class,
+ BluePrintCatalogService::class, ErrorCatalogTestConfiguration::class
]
)
@ComponentScan(basePackages = ["org.onap.ccsdk.cds.blueprintsprocessor", "org.onap.ccsdk.cds.controllerblueprints"])
diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TestDatabaseConfiguration.kt
index 61d1595..6d87d27 100644
--- a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/resource/api/TestDatabaseConfiguration.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.resource.api
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDatabaseConfiguration
import org.springframework.context.annotation.Bean
@@ -29,7 +29,7 @@
import javax.sql.DataSource
@Configuration
-@Import(BlueprintDBLibConfiguration::class)
+@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = [
"org.onap.ccsdk.cds.blueprintsprocessor.db.primary",
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingGRPCHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandler.kt
similarity index 87%
rename from ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingGRPCHandler.kt
rename to ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandler.kt
index 98577db..79106c2 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingGRPCHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandler.kt
@@ -20,10 +20,10 @@
import io.grpc.Status
import io.grpc.stub.StreamObserver
import kotlinx.coroutines.runBlocking
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.toJava
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogCodes
@@ -37,14 +37,14 @@
import javax.annotation.PreDestroy
@Service
-open class BlueprintProcessingGRPCHandler(
- private val bluePrintCoreConfiguration: BlueprintCoreConfiguration,
+open class BluePrintProcessingGRPCHandler(
+ private val bluePrintCoreConfiguration: BluePrintCoreConfiguration,
private val executionServiceHandler: ExecutionServiceHandler,
private val errorCatalogService: ErrorCatalogService
) :
- BlueprintProcessingServiceGrpc.BlueprintProcessingServiceImplBase() {
+ BluePrintProcessingServiceGrpc.BluePrintProcessingServiceImplBase() {
- private val log = LoggerFactory.getLogger(BlueprintProcessingGRPCHandler::class.java)
+ private val log = LoggerFactory.getLogger(BluePrintProcessingGRPCHandler::class.java)
private val ph = Phaser(1)
@@ -69,7 +69,7 @@
override fun onError(error: Throwable) {
log.debug("Fail to process message", error)
- if (error is BlueprintProcessorException) onErrorCatalog(error) else onError(error)
+ if (error is BluePrintProcessorException) onErrorCatalog(error) else onError(error)
}
fun onError(error: Exception) {
@@ -81,7 +81,7 @@
)
}
- fun onErrorCatalog(error: BlueprintProcessorException) {
+ fun onErrorCatalog(error: BluePrintProcessorException) {
if (error.protocol == "") {
error.grpc(ErrorCatalogCodes.GENERIC_FAILURE)
}
@@ -103,7 +103,7 @@
@PreDestroy
fun preDestroy() {
- val name = "BlueprintProcessingGRPCHandler"
+ val name = "BluePrintProcessingGRPCHandler"
log.info("Starting to shutdown $name waiting for in-flight requests to finish ...")
ph.arriveAndAwaitAdvance()
log.info("Done waiting in $name")
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingKafkaConsumer.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingKafkaConsumer.kt
similarity index 93%
rename from ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingKafkaConsumer.kt
rename to ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingKafkaConsumer.kt
index 661e76b..4d735d9 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingKafkaConsumer.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingKafkaConsumer.kt
@@ -24,10 +24,10 @@
import kotlinx.coroutines.runBlocking
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.message.BlueprintMessageMetricConstants
-import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BluePrintMessageLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageConsumerService
import org.onap.ccsdk.cds.blueprintsprocessor.message.utils.BlueprintMessageUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsType
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.updateErrorMessage
@@ -45,13 +45,13 @@
havingValue = "true"
)
@Service
-open class BlueprintProcessingKafkaConsumer(
- private val blueprintMessageLibPropertyService: BlueprintMessageLibPropertyService,
+open class BluePrintProcessingKafkaConsumer(
+ private val blueprintMessageLibPropertyService: BluePrintMessageLibPropertyService,
private val executionServiceHandler: ExecutionServiceHandler,
private val meterRegistry: MeterRegistry
) {
- val log = logger(BlueprintProcessingKafkaConsumer::class)
+ val log = logger(BluePrintProcessingKafkaConsumer::class)
private val ph = Phaser(1)
@@ -75,28 +75,28 @@
blueprintMessageConsumerService = try {
blueprintMessageLibPropertyService
.blueprintMessageConsumerService(CONSUMER_SELECTOR)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
val errorMsg = "Failed creating Kafka consumer message service."
throw e.updateErrorMessage(
SelfServiceApiDomains.SELF_SERVICE_API, errorMsg,
"Wrong Kafka selector provided or internal error in Kafka service."
)
} catch (e: Exception) {
- throw BlueprintProcessorException("failed to create consumer service ${e.message}")
+ throw BluePrintProcessorException("failed to create consumer service ${e.message}")
}
/** Get the Message Producer Service **/
val blueprintMessageProducerService = try {
blueprintMessageLibPropertyService
.blueprintMessageProducerService(PRODUCER_SELECTOR)
- } catch (e: BlueprintProcessorException) {
+ } catch (e: BluePrintProcessorException) {
val errorMsg = "Failed creating Kafka producer message service."
throw e.updateErrorMessage(
SelfServiceApiDomains.SELF_SERVICE_API, errorMsg,
"Wrong Kafka selector provided or internal error in Kafka service."
)
} catch (e: Exception) {
- throw BlueprintProcessorException("failed to create producer service ${e.message}")
+ throw BluePrintProcessorException("failed to create producer service ${e.message}")
}
launch {
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceController.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceController.kt
index 6c6c26c..bb7ecc6 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceController.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceController.kt
@@ -27,11 +27,11 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.cluster.optionalClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.rest.service.mdcWebCoroutineScope
import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils.determineHttpStatusCode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.httpProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.onap.ccsdk.cds.error.catalog.core.ErrorCatalogCodes
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.http.MediaType
@@ -70,8 +70,8 @@
suspend fun executionServiceControllerHealthCheck(): ResponseEntity<JsonNode> = mdcWebCoroutineScope {
var body = mutableMapOf("success" to true)
var statusCode = 200
- if (BlueprintConstants.CLUSTER_ENABLED &&
- BlueprintDependencyService.optionalClusterService()?.clusterJoined() != true
+ if (BluePrintConstants.CLUSTER_ENABLED &&
+ BluePrintDependencyService.optionalClusterService()?.clusterJoined() != true
) {
statusCode = 503
body.remove("success")
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt
index 8c958c4..e604987 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt
@@ -34,21 +34,21 @@
import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils.cbaMetricTags
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractServiceFunction
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.config.BlueprintLoadConfiguration
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.config.BluePrintLoadConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
@Service
class ExecutionServiceHandler(
- private val bluePrintLoadConfiguration: BlueprintLoadConfiguration,
- private val blueprintsProcessorCatalogService: BlueprintCatalogService,
+ private val bluePrintLoadConfiguration: BluePrintLoadConfiguration,
+ private val blueprintsProcessorCatalogService: BluePrintCatalogService,
private val bluePrintWorkflowExecutionService:
- BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput>,
+ BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput>,
private val publishAuditService: PublishAuditService,
private val meterRegistry: MeterRegistry
) {
@@ -111,14 +111,14 @@
val basePath = blueprintsProcessorCatalogService.getFromDatabase(blueprintName, blueprintVersion)
log.info("blueprint base path $basePath")
- val blueprintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(requestId, basePath.toString())
+ val blueprintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(requestId, basePath.toString())
- executionServiceOutput = bluePrintWorkflowExecutionService.executeBlueprintWorkflow(
+ executionServiceOutput = bluePrintWorkflowExecutionService.executeBluePrintWorkflow(
blueprintRuntimeService,
executionServiceInput, hashMapOf()
)
- val errors = blueprintRuntimeService.getBlueprintError().allErrors()
+ val errors = blueprintRuntimeService.getBluePrintError().allErrors()
if (errors.isNotEmpty()) {
setErrorStatus(errors.joinToString(", "), executionServiceOutput.status)
}
@@ -144,7 +144,7 @@
/** If no blueprint is needed, then get the Service function instance mapping to the action name and execute it */
suspend fun executeServiceFunction(executionServiceInput: ExecutionServiceInput): ExecutionServiceOutput {
val actionName = executionServiceInput.actionIdentifiers.actionName
- val instance = BlueprintDependencyService.instance<AbstractServiceFunction>(actionName)
+ val instance = BluePrintDependencyService.instance<AbstractServiceFunction>(actionName)
checkNotNull(instance) { "failed to initialize service function($actionName)" }
instance.actionName = actionName
return instance.applyNB(executionServiceInput)
@@ -154,7 +154,7 @@
status.errorMessage = errorMessage
status.eventType = EventType.EVENT_COMPONENT_FAILURE.name
status.code = 500
- status.message = BlueprintConstants.STATUS_FAILURE
+ status.message = BluePrintConstants.STATUS_FAILURE
}
private fun response(
@@ -173,7 +173,7 @@
} else {
status.eventType = EventType.EVENT_COMPONENT_PROCESSING.name
status.code = 200
- status.message = BlueprintConstants.STATUS_PROCESSING
+ status.message = BluePrintConstants.STATUS_PROCESSING
}
executionServiceOutput.status = status
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/KafkaPublishAuditService.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/KafkaPublishAuditService.kt
index 46befee..ce407bc 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/KafkaPublishAuditService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/KafkaPublishAuditService.kt
@@ -22,16 +22,16 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants
-import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BluePrintMessageLibPropertyService
import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageProducerService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.common.ApplicationConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.service.PropertyAssignmentService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.PropertyDefinitionUtils
import org.onap.ccsdk.cds.controllerblueprints.resource.dict.ResourceAssignment
@@ -57,8 +57,8 @@
)
@Service
class KafkaPublishAuditService(
- private val bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService,
- private val blueprintsProcessorCatalogService: BlueprintCatalogService
+ private val bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService,
+ private val blueprintsProcessorCatalogService: BluePrintCatalogService
) : PublishAuditService {
private var inputInstance: BlueprintMessageProducerService? = null
@@ -166,7 +166,7 @@
val basePath = blueprintsProcessorCatalogService.getFromDatabase(blueprintName, blueprintVersion)
- val blueprintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(requestId, basePath.toString())
+ val blueprintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(requestId, basePath.toString())
val blueprintContext = blueprintRuntimeService.bluePrintContext()
blueprintContext.workflowSteps(workflowName).forEach { step ->
@@ -175,9 +175,9 @@
val nodeTemplate = blueprintContext.nodeTemplateByName(nodeTemplateName)
/** We need to check in his Node Template Dependencies is case of a Node Template DG */
- if (nodeTemplate.type == BlueprintConstants.NODE_TEMPLATE_TYPE_DG) {
+ if (nodeTemplate.type == BluePrintConstants.NODE_TEMPLATE_TYPE_DG) {
val dependencyNodeTemplate =
- nodeTemplate.properties?.get(BlueprintConstants.PROPERTY_DG_DEPENDENCY_NODE_TEMPLATE) as ArrayNode
+ nodeTemplate.properties?.get(BluePrintConstants.PROPERTY_DG_DEPENDENCY_NODE_TEMPLATE) as ArrayNode
dependencyNodeTemplate.forEach { dependencyNodeTemplateName ->
clonedExecutionServiceInput = hideSensitiveDataFromResourceResolution(
blueprintRuntimeService,
@@ -220,15 +220,15 @@
* @return [executionServiceInput] with sensitive inputs replaced by a generic string
*/
private suspend fun hideSensitiveDataFromResourceResolution(
- blueprintRuntimeService: BlueprintRuntimeService<MutableMap<String, JsonNode>>,
- blueprintContext: BlueprintContext,
+ blueprintRuntimeService: BluePrintRuntimeService<MutableMap<String, JsonNode>>,
+ blueprintContext: BluePrintContext,
executionServiceInput: ExecutionServiceInput,
workflowName: String,
nodeTemplateName: String
): ExecutionServiceInput {
val nodeTemplate = blueprintContext.nodeTemplateByName(nodeTemplateName)
- if (nodeTemplate.type == BlueprintConstants.NODE_TEMPLATE_TYPE_COMPONENT_RESOURCE_RESOLUTION) {
+ if (nodeTemplate.type == BluePrintConstants.NODE_TEMPLATE_TYPE_COMPONENT_RESOURCE_RESOLUTION) {
val interfaceName = blueprintContext.nodeTemplateFirstInterfaceName(nodeTemplateName)
val operationName = blueprintContext.nodeTemplateFirstInterfaceFirstOperationName(nodeTemplateName)
@@ -242,7 +242,7 @@
val artifactPrefixNamesNode = propertyAssignments[ResourceResolutionConstants.INPUT_ARTIFACT_PREFIX_NAMES]
val propertyAssignmentService = PropertyAssignmentService(blueprintRuntimeService)
val artifactPrefixNamesNodeValue = propertyAssignmentService.resolveAssignmentExpression(
- BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
nodeTemplateName,
ResourceResolutionConstants.INPUT_ARTIFACT_PREFIX_NAMES,
artifactPrefixNamesNode!!
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BlueprintProcessingUtils.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BlueprintProcessingUtils.kt
index c04410a..17f7722 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BlueprintProcessingUtils.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BlueprintProcessingUtils.kt
@@ -18,8 +18,8 @@
import io.micrometer.core.instrument.Tag
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.springframework.http.HttpStatus
import org.springframework.http.codec.multipart.FilePart
import org.springframework.util.StringUtils
@@ -30,13 +30,13 @@
const val INTERNAL_SERVER_ERROR_HTTP_STATUS_CODE = 500
-@Throws(BlueprintException::class, IOException::class)
+@Throws(BluePrintException::class, IOException::class)
fun saveCBAFile(filePart: FilePart, targetDirectory: Path): Path {
val fileName = StringUtils.cleanPath(filePart.filename())
if (StringUtils.getFilenameExtension(fileName) != "zip") {
- throw BlueprintException("Invalid file extension required ZIP")
+ throw BluePrintException("Invalid file extension required ZIP")
}
val changedFileName = UUID.randomUUID().toString() + ".zip"
@@ -68,19 +68,19 @@
fun cbaMetricTags(executionServiceInput: ExecutionServiceInput): MutableList<Tag> =
executionServiceInput.actionIdentifiers.let {
mutableListOf(
- Tag.of(BlueprintConstants.METRIC_TAG_BP_NAME, it.blueprintName),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_VERSION, it.blueprintVersion),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_ACTION, it.actionName)
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_NAME, it.blueprintName),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_VERSION, it.blueprintVersion),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_ACTION, it.actionName)
)
}
fun cbaMetricTags(executionServiceOutput: ExecutionServiceOutput): MutableList<Tag> =
executionServiceOutput.let {
mutableListOf(
- Tag.of(BlueprintConstants.METRIC_TAG_BP_NAME, it.actionIdentifiers.blueprintName),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_VERSION, it.actionIdentifiers.blueprintVersion),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_ACTION, it.actionIdentifiers.actionName),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_STATUS, it.status.code.toString()),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_OUTCOME, it.status.message)
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_NAME, it.actionIdentifiers.blueprintName),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_VERSION, it.actionIdentifiers.blueprintVersion),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_ACTION, it.actionIdentifiers.actionName),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_STATUS, it.status.code.toString()),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_OUTCOME, it.status.message)
)
}
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BlueprintRuntimeValidatorService.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorService.kt
similarity index 80%
rename from ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BlueprintRuntimeValidatorService.kt
rename to ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorService.kt
index 23d4bf0..ff61553 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BlueprintRuntimeValidatorService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorService.kt
@@ -16,14 +16,14 @@
package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.validation
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintTypeValidatorService
-import org.onap.ccsdk.cds.controllerblueprints.validation.BlueprintDesignTimeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
+import org.onap.ccsdk.cds.controllerblueprints.validation.BluePrintDesignTimeValidatorService
import org.onap.ccsdk.cds.controllerblueprints.validation.extension.ResourceDefinitionValidator
import org.springframework.stereotype.Service
@Service("bluePrintRuntimeValidatorService")
-open class BlueprintRuntimeValidatorService(
- bluePrintTypeValidatorService: BlueprintTypeValidatorService,
+open class BluePrintRuntimeValidatorService(
+ bluePrintTypeValidatorService: BluePrintTypeValidatorService,
resourceDefinitionValidator: ResourceDefinitionValidator
) :
- BlueprintDesignTimeValidatorService(bluePrintTypeValidatorService, resourceDefinitionValidator)
+ BluePrintDesignTimeValidatorService(bluePrintTypeValidatorService, resourceDefinitionValidator)
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingGRPCHandlerTest.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandlerTest.kt
similarity index 94%
rename from ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingGRPCHandlerTest.kt
rename to ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandlerTest.kt
index 3033103..0d79368 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingGRPCHandlerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingGRPCHandlerTest.kt
@@ -29,7 +29,7 @@
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
import org.slf4j.LoggerFactory
@@ -50,9 +50,9 @@
]
)
@TestPropertySource(locations = ["classpath:application-test.properties"])
-class BlueprintProcessingGRPCHandlerTest {
+class BluePrintProcessingGRPCHandlerTest {
- private val log = LoggerFactory.getLogger(BlueprintProcessingGRPCHandlerTest::class.java)
+ private val log = LoggerFactory.getLogger(BluePrintProcessingGRPCHandlerTest::class.java)
@MockBean
lateinit var meterRegistry: MeterRegistry
@@ -61,7 +61,7 @@
val grpcServerRule = GrpcServerRule().directExecutor()
@Autowired
- lateinit var bluePrintProcessingGRPCHandler: BlueprintProcessingGRPCHandler
+ lateinit var bluePrintProcessingGRPCHandler: BluePrintProcessingGRPCHandler
lateinit var requestObs: StreamObserver<ExecutionServiceInput>
@@ -69,7 +69,7 @@
fun init() {
grpcServerRule.serviceRegistry.addService(bluePrintProcessingGRPCHandler)
- val blockingStub = BlueprintProcessingServiceGrpc.newStub(grpcServerRule.channel)
+ val blockingStub = BluePrintProcessingServiceGrpc.newStub(grpcServerRule.channel)
requestObs = blockingStub.process(object : StreamObserver<ExecutionServiceOutput> {
override fun onNext(executionServiceOuput: ExecutionServiceOutput) {
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingIntegrationTest.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingIntegrationTest.kt
similarity index 95%
rename from ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingIntegrationTest.kt
rename to ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingIntegrationTest.kt
index d610972..80e9538 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingIntegrationTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingIntegrationTest.kt
@@ -27,7 +27,7 @@
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
import org.springframework.test.context.ContextConfiguration
@@ -35,9 +35,9 @@
@ContextConfiguration(
classes = [SelfServiceApiTestConfiguration::class, ErrorCatalogTestConfiguration::class]
)
-class BlueprintProcessingIntegrationTest {
+class BluePrintProcessingIntegrationTest {
- private val log = logger(BlueprintProcessingIntegrationTest::class)
+ private val log = logger(BluePrintProcessingIntegrationTest::class)
/** This is Integration test sample, Do not enable this test case in server build, this is for local desktop testing*/
// @Test
@@ -52,7 +52,7 @@
val basicAuthGrpcClientService = TokenAuthGrpcClientService(tokenAuthGrpcClientProperties)
val channel = basicAuthGrpcClientService.channel()
- val stub = BlueprintProcessingServiceGrpc.newStub(channel)
+ val stub = BluePrintProcessingServiceGrpc.newStub(channel)
repeat(1) {
val requestObs = stub.process(object : StreamObserver<ExecutionServiceOutput> {
override fun onNext(executionServiceOuput: ExecutionServiceOutput) {
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingKafkaConsumerTest.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingKafkaConsumerTest.kt
similarity index 82%
rename from ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingKafkaConsumerTest.kt
rename to ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingKafkaConsumerTest.kt
index 56cc691..9143d73 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BlueprintProcessingKafkaConsumerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/BluePrintProcessingKafkaConsumerTest.kt
@@ -24,10 +24,10 @@
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertyConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.message.BlueprintMessageLibConfiguration
-import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BlueprintMessageLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertyConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.message.BluePrintMessageLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.message.service.BluePrintMessageLibPropertyService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.mock.mockito.MockBean
import org.springframework.test.context.ContextConfiguration
@@ -39,18 +39,18 @@
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintMessageLibConfiguration::class, SelfServiceApiTestConfiguration::class,
- BlueprintPropertyConfiguration::class, BlueprintPropertiesService::class, ErrorCatalogTestConfiguration::class
+ BluePrintMessageLibConfiguration::class, SelfServiceApiTestConfiguration::class,
+ BluePrintPropertyConfiguration::class, BluePrintPropertiesService::class, ErrorCatalogTestConfiguration::class
]
)
@TestPropertySource(locations = ["classpath:application-test.properties"])
-class BlueprintProcessingKafkaConsumerTest {
+class BluePrintProcessingKafkaConsumerTest {
@MockBean
lateinit var meterRegistry: MeterRegistry
@Autowired
- lateinit var bluePrintMessageLibPropertyService: BlueprintMessageLibPropertyService
+ lateinit var bluePrintMessageLibPropertyService: BluePrintMessageLibPropertyService
@Test
fun testExecutionInputMessageConsumer() {
@@ -64,7 +64,7 @@
coEvery { executionServiceHandle.doProcess(any()) } returns mockk()
- val bluePrintProcessingKafkaConsumer = BlueprintProcessingKafkaConsumer(
+ val bluePrintProcessingKafkaConsumer = BluePrintProcessingKafkaConsumer(
bluePrintMessageLibPropertyService,
executionServiceHandle,
meterRegistry
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceControllerTest.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceControllerTest.kt
index f184711..d7d7aaa 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceControllerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceControllerTest.kt
@@ -21,11 +21,11 @@
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.junit.runner.RunWith
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintCoreConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintCoreConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.core.compress
import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintCatalogService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintCatalogService
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
@@ -45,8 +45,8 @@
@WebFluxTest
@ContextConfiguration(
classes = [
- ExecutionServiceHandler::class, BlueprintCoreConfiguration::class,
- BlueprintCatalogService::class, SelfServiceApiTestConfiguration::class,
+ ExecutionServiceHandler::class, BluePrintCoreConfiguration::class,
+ BluePrintCatalogService::class, SelfServiceApiTestConfiguration::class,
ErrorCatalogTestConfiguration::class, SimpleMeterRegistry::class
]
)
@@ -54,7 +54,7 @@
class ExecutionServiceControllerTest {
@Autowired
- lateinit var blueprintsProcessorCatalogService: BlueprintCatalogService
+ lateinit var blueprintsProcessorCatalogService: BluePrintCatalogService
@Autowired
lateinit var webTestClient: WebTestClient
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandlerTest.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandlerTest.kt
index 526491e..0a89c57 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandlerTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandlerTest.kt
@@ -32,7 +32,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractServiceFunction
import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.mock.mockito.MockBean
import org.springframework.context.ApplicationContext
@@ -62,7 +62,7 @@
@Before
fun init() {
- BlueprintDependencyService.inject(applicationContext)
+ BluePrintDependencyService.inject(applicationContext)
}
@Test
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/TestDatabaseConfiguration.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/TestDatabaseConfiguration.kt
index 4401fde..bca05f6 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/TestDatabaseConfiguration.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/TestDatabaseConfiguration.kt
@@ -16,7 +16,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api
-import org.onap.ccsdk.cds.blueprintsprocessor.db.BlueprintDBLibConfiguration
+import org.onap.ccsdk.cds.blueprintsprocessor.db.BluePrintDBLibConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.db.PrimaryDataSourceProperties
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.PrimaryDatabaseConfiguration
import org.springframework.context.annotation.Bean
@@ -29,7 +29,7 @@
import javax.sql.DataSource
@Configuration
-@Import(BlueprintDBLibConfiguration::class)
+@Import(BluePrintDBLibConfiguration::class)
@EnableJpaRepositories(
basePackages = [
"org.onap.ccsdk.cds.blueprintsprocessor.db.primary",
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BlueprintProcessingUtilsTest.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BlueprintProcessingUtilsTest.kt
index 10db349..375faa1 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BlueprintProcessingUtilsTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/BlueprintProcessingUtilsTest.kt
@@ -24,7 +24,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.springframework.http.HttpStatus
import org.springframework.test.context.junit4.SpringRunner
@@ -57,9 +57,9 @@
}
val expectedTags = mutableListOf(
- Tag.of(BlueprintConstants.METRIC_TAG_BP_NAME, executionServiceInput.actionIdentifiers.blueprintName),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_VERSION, executionServiceInput.actionIdentifiers.blueprintVersion),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_ACTION, executionServiceInput.actionIdentifiers.actionName)
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_NAME, executionServiceInput.actionIdentifiers.blueprintName),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_VERSION, executionServiceInput.actionIdentifiers.blueprintVersion),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_ACTION, executionServiceInput.actionIdentifiers.actionName)
)
val metricTag = cbaMetricTags(executionServiceInput)
@@ -82,11 +82,11 @@
}
val expectedTags = mutableListOf(
- Tag.of(BlueprintConstants.METRIC_TAG_BP_NAME, executionServiceOutput.actionIdentifiers.blueprintName),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_VERSION, executionServiceOutput.actionIdentifiers.blueprintVersion),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_ACTION, executionServiceOutput.actionIdentifiers.actionName),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_STATUS, executionServiceOutput.status.code.toString()),
- Tag.of(BlueprintConstants.METRIC_TAG_BP_OUTCOME, executionServiceOutput.status.message)
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_NAME, executionServiceOutput.actionIdentifiers.blueprintName),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_VERSION, executionServiceOutput.actionIdentifiers.blueprintVersion),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_ACTION, executionServiceOutput.actionIdentifiers.actionName),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_STATUS, executionServiceOutput.status.code.toString()),
+ Tag.of(BluePrintConstants.METRIC_TAG_BP_OUTCOME, executionServiceOutput.status.message)
)
val metricTag = cbaMetricTags(executionServiceOutput)
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BlueprintRuntimeValidatorServiceTest.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorServiceTest.kt
similarity index 82%
rename from ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BlueprintRuntimeValidatorServiceTest.kt
rename to ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorServiceTest.kt
index c6b90e5..84d057f 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BlueprintRuntimeValidatorServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/validation/BluePrintRuntimeValidatorServiceTest.kt
@@ -20,7 +20,7 @@
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.mock.MockResourceSource
-import org.onap.ccsdk.cds.controllerblueprints.validation.BlueprintValidationConfiguration
+import org.onap.ccsdk.cds.controllerblueprints.validation.BluePrintValidationConfiguration
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.junit4.SpringRunner
@@ -29,14 +29,14 @@
@RunWith(SpringRunner::class)
@ContextConfiguration(
classes = [
- BlueprintRuntimeValidatorService::class,
- BlueprintValidationConfiguration::class, MockResourceSource::class
+ BluePrintRuntimeValidatorService::class,
+ BluePrintValidationConfiguration::class, MockResourceSource::class
]
)
-class BlueprintRuntimeValidatorServiceTest {
+class BluePrintRuntimeValidatorServiceTest {
@Autowired
- lateinit var bluePrintRuntimeValidatorService: BlueprintRuntimeValidatorService
+ lateinit var bluePrintRuntimeValidatorService: BluePrintRuntimeValidatorService
@Test
fun testBlueprintRuntimeValidation() {
@@ -45,7 +45,7 @@
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
assertNotNull(bluePrintRuntimeValidatorService, " failed to initilize bluePrintRuntimeValidatorService")
- bluePrintRuntimeValidatorService.validateBlueprints(blueprintBasePath)
+ bluePrintRuntimeValidatorService.validateBluePrints(blueprintBasePath)
}
}
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
index f85b642..2186d47 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
@@ -24,11 +24,11 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.core.cluster.executeWithLock
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.CDS_LOCK_GROUP
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotBlank
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
@@ -38,8 +38,8 @@
import org.onap.ccsdk.cds.controllerblueprints.core.jsonPathParse
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile
import org.onap.ccsdk.cds.controllerblueprints.core.readNBLines
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintVelocityTemplateService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintVelocityTemplateService
import org.slf4j.LoggerFactory
/**
@@ -53,8 +53,8 @@
lateinit var executionServiceInput: ExecutionServiceInput
var executionServiceOutput = ExecutionServiceOutput()
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
- lateinit var bluePrintClusterService: BlueprintClusterService
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
+ lateinit var bluePrintClusterService: BluePrintClusterService
lateinit var implementation: Implementation
lateinit var processId: String
lateinit var workflowName: String
@@ -88,13 +88,13 @@
log.info("preparing request id($processId) for workflow($workflowName) step($stepName)")
- nodeTemplateName = this.operationInputs.getAsString(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE)
+ nodeTemplateName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE)
check(nodeTemplateName.isNotEmpty()) { "couldn't get NodeTemplate name for step($stepName)" }
- interfaceName = this.operationInputs.getAsString(BlueprintConstants.PROPERTY_CURRENT_INTERFACE)
+ interfaceName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_INTERFACE)
check(interfaceName.isNotEmpty()) { "couldn't get Interface name for step($stepName)" }
- operationName = this.operationInputs.getAsString(BlueprintConstants.PROPERTY_CURRENT_OPERATION)
+ operationName = this.operationInputs.getAsString(BluePrintConstants.PROPERTY_CURRENT_OPERATION)
check(operationName.isNotEmpty()) { "couldn't get Operation name for step($stepName)" }
/** Get the Implementation Details */
@@ -105,7 +105,7 @@
/** Resolve and validate lock properties */
implementation.lock?.apply {
val resolvedValues = bluePrintRuntimeService.resolvePropertyAssignments(
- BlueprintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
+ BluePrintConstants.MODEL_DEFINITION_TYPE_NODE_TEMPLATE,
interfaceName,
mutableMapOf("key" to this.key, "acquireTimeout" to this.acquireTimeout)
)
@@ -146,11 +146,11 @@
status.eventType = EventType.EVENT_COMPONENT_EXECUTED.name
- bluePrintRuntimeService.getBlueprintError().stepErrors(stepName)?.let {
- status.message = BlueprintConstants.STATUS_FAILURE
+ bluePrintRuntimeService.getBluePrintError().stepErrors(stepName)?.let {
+ status.message = BluePrintConstants.STATUS_FAILURE
}
} catch (e: Exception) {
- status.message = BlueprintConstants.STATUS_FAILURE
+ status.message = BluePrintConstants.STATUS_FAILURE
status.eventType = EventType.EVENT_COMPONENT_FAILURE.name
}
executionServiceOutput.status = status
@@ -184,7 +184,7 @@
fun getOperationInput(key: String): JsonNode {
return operationInputs[key]
- ?: throw BlueprintProcessorException("couldn't get the operation input($key) value.")
+ ?: throw BluePrintProcessorException("couldn't get the operation input($key) value.")
}
fun getOptionalOperationInput(key: String): JsonNode? {
@@ -196,11 +196,11 @@
}
fun addError(type: String, name: String, error: String) {
- bluePrintRuntimeService.getBlueprintError().addError(type, name, error, stepName)
+ bluePrintRuntimeService.getBluePrintError().addError(type, name, error, stepName)
}
fun addError(error: String) {
- bluePrintRuntimeService.getBlueprintError().addError(error, stepName)
+ bluePrintRuntimeService.getBluePrintError().addError(error, stepName)
}
/**
@@ -229,12 +229,12 @@
suspend fun relationshipProperty(relationshipName: String, propertyName: String): JsonNode {
return bluePrintRuntimeService.resolveRelationshipTemplateProperties(relationshipName).get(propertyName)
- ?: throw BlueprintProcessorException("failed to get relationship($relationshipName) property($propertyName)")
+ ?: throw BluePrintProcessorException("failed to get relationship($relationshipName) property($propertyName)")
}
suspend fun mashTemplateNData(artifactName: String, json: String): String {
val content = artifactContent(artifactName)
- return BlueprintVelocityTemplateService.generateContent(content, json)
+ return BluePrintVelocityTemplateService.generateContent(content, json)
}
suspend fun readLinesFromArtifact(artifactName: String): List<String> {
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractScriptComponentFunction.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractScriptComponentFunction.kt
index 3cb46ed..8b46ae6 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractScriptComponentFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractScriptComponentFunction.kt
@@ -19,9 +19,9 @@
import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.slf4j.LoggerFactory
abstract class AbstractScriptComponentFunction : AbstractComponentFunction() {
@@ -47,7 +47,7 @@
@Deprecated("Dependencies will be resolved dynamically")
open fun <T> functionDependencyInstanceAsType(name: String): T {
return functionDependencyInstances[name] as? T
- ?: throw BlueprintProcessorException("couldn't get script property instance ($name)")
+ ?: throw BluePrintProcessorException("couldn't get script property instance ($name)")
}
fun checkDynamicProperties(key: String): Boolean {
@@ -60,7 +60,7 @@
suspend fun executeScript(executionServiceInput: ExecutionServiceInput) {
return when (scriptType) {
- BlueprintConstants.SCRIPT_JYTHON -> {
+ BluePrintConstants.SCRIPT_JYTHON -> {
executeScriptBlocking(executionServiceInput)
}
else -> {
@@ -97,34 +97,34 @@
*/
final override fun apply(executionServiceInput: ExecutionServiceInput): ExecutionServiceOutput {
- throw BlueprintException("Not Implemented, use applyNB method")
+ throw BluePrintException("Not Implemented, use applyNB method")
}
final override fun prepareRequest(executionRequest: ExecutionServiceInput): ExecutionServiceInput {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
final override fun prepareResponse(): ExecutionServiceOutput {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
final override suspend fun applyNB(executionServiceInput: ExecutionServiceInput): ExecutionServiceOutput {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
final override suspend fun prepareRequestNB(executionRequest: ExecutionServiceInput): ExecutionServiceInput {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
final override suspend fun prepareResponseNB(): ExecutionServiceOutput {
- throw BlueprintException("Not Implemented required")
+ throw BluePrintException("Not Implemented required")
}
override fun process(executionRequest: ExecutionServiceInput) {
- throw BlueprintException("Not Implemented, child class will implement this")
+ throw BluePrintException("Not Implemented, child class will implement this")
}
override fun recover(runtimeException: RuntimeException, executionRequest: ExecutionServiceInput) {
- throw BlueprintException("Not Implemented, child class will implement this")
+ throw BluePrintException("Not Implemented, child class will implement this")
}
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractServiceFunction.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractServiceFunction.kt
index 41e26e4..33f5d74 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractServiceFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractServiceFunction.kt
@@ -21,7 +21,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
import org.onap.ccsdk.cds.controllerblueprints.core.jsonPathParse
import org.onap.ccsdk.cds.controllerblueprints.core.logger
@@ -79,7 +79,7 @@
// Set the Default Step Status
status.eventType = EventType.EVENT_COMPONENT_EXECUTED.name
} catch (e: Exception) {
- status.message = BlueprintConstants.STATUS_FAILURE
+ status.message = BluePrintConstants.STATUS_FAILURE
status.eventType = EventType.EVENT_COMPONENT_FAILURE.name
}
executionServiceOutput.status = status
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt
index b798f00..3483ce1 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt
@@ -17,12 +17,12 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.execution
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintScriptsService
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintScriptsService
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintScriptsServiceImpl
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintScriptsServiceImpl
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.slf4j.LoggerFactory
import org.springframework.context.ApplicationContext
import org.springframework.stereotype.Service
@@ -74,29 +74,29 @@
}
suspend fun <T : BlueprintFunctionNode<*, *>> scriptInstance(
- bluePrintContext: BlueprintContext,
+ bluePrintContext: BluePrintContext,
scriptType: String,
scriptClassReference: String
): T {
var scriptComponent: T? = null
when (scriptType) {
- BlueprintConstants.SCRIPT_INTERNAL -> {
- val bluePrintScriptsService: BlueprintScriptsService = BlueprintScriptsServiceImpl()
+ BluePrintConstants.SCRIPT_INTERNAL -> {
+ val bluePrintScriptsService: BluePrintScriptsService = BluePrintScriptsServiceImpl()
scriptComponent = bluePrintScriptsService.scriptInstance<T>(scriptClassReference)
}
- BlueprintConstants.SCRIPT_KOTLIN -> {
- val bluePrintScriptsService: BlueprintScriptsService = BlueprintScriptsServiceImpl()
+ BluePrintConstants.SCRIPT_KOTLIN -> {
+ val bluePrintScriptsService: BluePrintScriptsService = BluePrintScriptsServiceImpl()
scriptComponent = bluePrintScriptsService.scriptInstance<T>(
bluePrintContext.rootPath,
bluePrintContext.name(), bluePrintContext.version(), scriptClassReference, false
)
}
- BlueprintConstants.SCRIPT_JYTHON -> {
+ BluePrintConstants.SCRIPT_JYTHON -> {
scriptComponent = blueprintJythonService.jythonComponentInstance(bluePrintContext, scriptClassReference) as T
}
else -> {
- throw BlueprintProcessorException("script type($scriptType) is not supported")
+ throw BluePrintProcessorException("script type($scriptType) is not supported")
}
}
return scriptComponent
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt
index 5a552e3..2581e56 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutor.kt
@@ -22,8 +22,8 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.createActionIdentifiersProto
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.createCommonHeaderProto
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.createExecutionServiceInputProto
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
@@ -70,7 +70,7 @@
val txId = UUID.randomUUID().toString()
val commonHeader = createCommonHeaderProto(
executionRequest.commonHeader.subRequestId,
- txId, BlueprintConstants.APP_NAME
+ txId, BluePrintConstants.APP_NAME
)
val actionIdentifier = createActionIdentifiersProto(blueprintName, blueprintVersion, blueprintAction)
@@ -92,11 +92,11 @@
/** set node template attribute */
val statusMessage = executionServiceOutputProto.status.message
- if (statusMessage == BlueprintConstants.STATUS_SUCCESS) {
- setAttribute(ATTRIBUTE_STATUS, BlueprintConstants.STATUS_SUCCESS.asJsonPrimitive())
+ if (statusMessage == BluePrintConstants.STATUS_SUCCESS) {
+ setAttribute(ATTRIBUTE_STATUS, BluePrintConstants.STATUS_SUCCESS.asJsonPrimitive())
} else {
val errorMessage = executionServiceOutputProto.status.errorMessage ?: "failed in remote execution"
- throw BlueprintProcessorException(errorMessage)
+ throw BluePrintProcessorException(errorMessage)
}
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt
index 4263768..7bb0715 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.execution
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
@@ -31,24 +31,24 @@
/** Component Extensions **/
fun ServiceTemplateBuilder.nodeTypeComponentRemoteScriptExecutor() {
- val nodeType = BlueprintTypes.nodeTypeComponentRemoteScriptExecutor()
+ val nodeType = BluePrintTypes.nodeTypeComponentRemoteScriptExecutor()
if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
this.nodeTypes!![nodeType.id!!] = nodeType
}
-fun BlueprintTypes.nodeTypeComponentRemoteScriptExecutor(): NodeType {
+fun BluePrintTypes.nodeTypeComponentRemoteScriptExecutor(): NodeType {
return nodeType(
- id = "component-remote-script-executor", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
+ id = "component-remote-script-executor", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
description = "Generic Remote Script Component Executor"
) {
/** Attribute definitions */
attribute(
- ComponentRemoteScriptExecutor.ATTRIBUTE_RESPONSE_DATA, BlueprintConstants.DATA_TYPE_JSON, false,
+ ComponentRemoteScriptExecutor.ATTRIBUTE_RESPONSE_DATA, BluePrintConstants.DATA_TYPE_JSON, false,
"Remote executed response data."
)
attribute(
- ComponentRemoteScriptExecutor.ATTRIBUTE_STATUS, BlueprintConstants.DATA_TYPE_STRING, true,
+ ComponentRemoteScriptExecutor.ATTRIBUTE_STATUS, BluePrintConstants.DATA_TYPE_STRING, true,
"Remote execution status."
)
@@ -56,35 +56,35 @@
operation("ComponentRemoteScriptExecutor", "ComponentRemoteScriptExecutor Operation") {
inputs {
property(
- ComponentRemoteScriptExecutor.INPUT_SELECTOR, BlueprintConstants.DATA_TYPE_JSON,
+ ComponentRemoteScriptExecutor.INPUT_SELECTOR, BluePrintConstants.DATA_TYPE_JSON,
true, "Remote GRPC selector or DSL reference or GRPC Json config."
)
property(
- ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_NAME, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_NAME, BluePrintConstants.DATA_TYPE_STRING,
true, "Blueprint name."
)
property(
- ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_VERSION, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_VERSION, BluePrintConstants.DATA_TYPE_STRING,
true, "Blueprint version."
)
property(
- ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_ACTION, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_ACTION, BluePrintConstants.DATA_TYPE_STRING,
true, "Blueprint action name."
)
property(
- ComponentRemoteScriptExecutor.INPUT_TIMEOUT, BlueprintConstants.DATA_TYPE_INTEGER,
+ ComponentRemoteScriptExecutor.INPUT_TIMEOUT, BluePrintConstants.DATA_TYPE_INTEGER,
true, "Remote execution timeout in sec."
) {
defaultValue(180)
}
property(
- ComponentRemoteScriptExecutor.INPUT_REQUEST_DATA, BlueprintConstants.DATA_TYPE_JSON,
+ ComponentRemoteScriptExecutor.INPUT_REQUEST_DATA, BluePrintConstants.DATA_TYPE_JSON,
false, "Dynamic Json Content or DSL Json reference."
)
}
outputs {
property(
- ComponentRemoteScriptExecutor.OUTPUT_STATUS, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentRemoteScriptExecutor.OUTPUT_STATUS, BluePrintConstants.DATA_TYPE_STRING,
true, "Status of the Component Execution ( success or failure )"
)
}
@@ -98,7 +98,7 @@
description: String,
block: ComponentRemoteScriptExecutorNodeTemplateBuilder.() -> Unit
) {
- val nodeTemplate = BlueprintTypes.nodeTemplateComponentRemoteScriptExecutor(
+ val nodeTemplate = BluePrintTypes.nodeTemplateComponentRemoteScriptExecutor(
id, description,
block
)
@@ -106,7 +106,7 @@
nodeTemplates!![nodeTemplate.id!!] = nodeTemplate
}
-fun BlueprintTypes.nodeTemplateComponentRemoteScriptExecutor(
+fun BluePrintTypes.nodeTemplateComponentRemoteScriptExecutor(
id: String,
description: String,
block: ComponentRemoteScriptExecutorNodeTemplateBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutorDSL.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutorDSL.kt
index 08a964b..8592ce6 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutorDSL.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentScriptExecutorDSL.kt
@@ -17,8 +17,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.execution
import com.fasterxml.jackson.databind.JsonNode
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.NodeTemplate
@@ -32,53 +32,53 @@
/** Component Extensions **/
fun ServiceTemplateBuilder.nodeTypeComponentScriptExecutor() {
- val nodeType = BlueprintTypes.nodeTypeComponentScriptExecutor()
+ val nodeType = BluePrintTypes.nodeTypeComponentScriptExecutor()
if (this.nodeTypes == null) this.nodeTypes = hashMapOf()
this.nodeTypes!![nodeType.id!!] = nodeType
}
-fun BlueprintTypes.nodeTypeComponentScriptExecutor(): NodeType {
+fun BluePrintTypes.nodeTypeComponentScriptExecutor(): NodeType {
return nodeType(
- id = "component-script-executor", version = BlueprintConstants.DEFAULT_VERSION_NUMBER,
- derivedFrom = BlueprintConstants.MODEL_TYPE_NODE_COMPONENT,
+ id = "component-script-executor", version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
+ derivedFrom = BluePrintConstants.MODEL_TYPE_NODE_COMPONENT,
description = "Generic Script Component Executor"
) {
- attribute(ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA, BlueprintConstants.DATA_TYPE_JSON, false)
- attribute(ComponentScriptExecutor.ATTRIBUTE_STATUS, BlueprintConstants.DATA_TYPE_STRING, true)
+ attribute(ComponentScriptExecutor.ATTRIBUTE_RESPONSE_DATA, BluePrintConstants.DATA_TYPE_JSON, false)
+ attribute(ComponentScriptExecutor.ATTRIBUTE_STATUS, BluePrintConstants.DATA_TYPE_STRING, true)
operation("ComponentScriptExecutor", "ComponentScriptExecutor Operation") {
inputs {
property(
- ComponentScriptExecutor.INPUT_SCRIPT_TYPE, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentScriptExecutor.INPUT_SCRIPT_TYPE, BluePrintConstants.DATA_TYPE_STRING,
true, "Script Type"
) {
- defaultValue(BlueprintConstants.SCRIPT_INTERNAL)
+ defaultValue(BluePrintConstants.SCRIPT_INTERNAL)
constrain {
validValues(
listOf(
- BlueprintConstants.SCRIPT_INTERNAL.asJsonPrimitive(),
- BlueprintConstants.SCRIPT_JYTHON.asJsonPrimitive(),
- BlueprintConstants.SCRIPT_KOTLIN.asJsonPrimitive()
+ BluePrintConstants.SCRIPT_INTERNAL.asJsonPrimitive(),
+ BluePrintConstants.SCRIPT_JYTHON.asJsonPrimitive(),
+ BluePrintConstants.SCRIPT_KOTLIN.asJsonPrimitive()
)
)
}
}
property(
- ComponentScriptExecutor.INPUT_SCRIPT_CLASS_REFERENCE, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentScriptExecutor.INPUT_SCRIPT_CLASS_REFERENCE, BluePrintConstants.DATA_TYPE_STRING,
true, "Kotlin Script class name or jython script name."
)
property(
- ComponentScriptExecutor.INPUT_DYNAMIC_PROPERTIES, BlueprintConstants.DATA_TYPE_JSON,
+ ComponentScriptExecutor.INPUT_DYNAMIC_PROPERTIES, BluePrintConstants.DATA_TYPE_JSON,
false, "Dynamic Json Content or DSL Json reference."
)
}
outputs {
property(
- ComponentScriptExecutor.OUTPUT_RESPONSE_DATA, BlueprintConstants.DATA_TYPE_JSON,
+ ComponentScriptExecutor.OUTPUT_RESPONSE_DATA, BluePrintConstants.DATA_TYPE_JSON,
false, "Output Response"
)
property(
- ComponentScriptExecutor.OUTPUT_STATUS, BlueprintConstants.DATA_TYPE_STRING,
+ ComponentScriptExecutor.OUTPUT_STATUS, BluePrintConstants.DATA_TYPE_STRING,
true, "Status of the Component Execution ( success or failure )"
)
}
@@ -92,7 +92,7 @@
description: String,
block: ComponentScriptExecutorNodeTemplateBuilder.() -> Unit
) {
- val nodeTemplate = BlueprintTypes.nodeTemplateComponentScriptExecutor(
+ val nodeTemplate = BluePrintTypes.nodeTemplateComponentScriptExecutor(
id, description,
block
)
@@ -100,7 +100,7 @@
nodeTemplates!![nodeTemplate.id!!] = nodeTemplate
}
-fun BlueprintTypes.nodeTemplateComponentScriptExecutor(
+fun BluePrintTypes.nodeTemplateComponentScriptExecutor(
id: String,
description: String,
block: ComponentScriptExecutorNodeTemplateBuilder.() -> Unit
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt
index 7e3f16f..ff60273 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/RemoteScriptExecutionService.kt
@@ -29,8 +29,8 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteScriptExecutionOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteScriptUploadBlueprintOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StatusType
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcClientService
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcClientService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcLibPropertyService
import org.onap.ccsdk.cds.controllerblueprints.command.api.CommandExecutorServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.command.api.ExecutionInput
import org.onap.ccsdk.cds.controllerblueprints.command.api.ExecutionOutput
@@ -63,7 +63,7 @@
havingValue = "true", matchIfMissing = false
)
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-class GrpcRemoteScriptExecutionService(private val bluePrintGrpcLibPropertyService: BlueprintGrpcLibPropertyService) :
+class GrpcRemoteScriptExecutionService(private val bluePrintGrpcLibPropertyService: BluePrintGrpcLibPropertyService) :
RemoteScriptExecutionService {
private val log = LoggerFactory.getLogger(GrpcRemoteScriptExecutionService::class.java)!!
@@ -73,7 +73,7 @@
override suspend fun init(selector: Any) {
// Get the GRPC Client Service based on selector
- val grpcClientService: BlueprintGrpcClientService = if (selector is JsonNode) {
+ val grpcClientService: BluePrintGrpcClientService = if (selector is JsonNode) {
bluePrintGrpcLibPropertyService.blueprintGrpcClientService(selector)
} else {
bluePrintGrpcLibPropertyService.blueprintGrpcClientService(selector.toString())
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt
index dadf72e..fc37b48 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionService.kt
@@ -29,12 +29,12 @@
import kotlinx.coroutines.launch
import kotlinx.coroutines.withTimeout
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.GrpcClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcClientService
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcClientService
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcLibPropertyService
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
@@ -58,7 +58,7 @@
prefix = "blueprintsprocessor.streamingRemoteExecution", name = ["enabled"],
havingValue = "true", matchIfMissing = false
)
-class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertyService: BlueprintGrpcLibPropertyService) :
+class StreamingRemoteExecutionServiceImpl(private val bluePrintGrpcLibPropertyService: BluePrintGrpcLibPropertyService) :
StreamingRemoteExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
private val log = logger(StreamingRemoteExecutionServiceImpl::class)
@@ -84,12 +84,12 @@
val grpcChannel = grpcChannel(selector)
/** Get Send and Receive Channel for bidirectional process method*/
- val channels = clientCallBidiStreaming(BlueprintProcessingServiceGrpc.getProcessMethod(), grpcChannel)
+ val channels = clientCallBidiStreaming(BluePrintProcessingServiceGrpc.getProcessMethod(), grpcChannel)
commChannels[txId] = channels
}
val commChannel = commChannels[txId]
- ?: throw BlueprintException("failed to create response subscription for transactionId($txId) channel")
+ ?: throw BluePrintException("failed to create response subscription for transactionId($txId) channel")
log.info("created subscription for transactionId($txId)")
@@ -102,7 +102,7 @@
*/
override suspend fun send(txId: String, input: ExecutionServiceInput) {
val sendChannel = commChannels[txId]?.requestChannel
- ?: throw BlueprintException("failed to get transactionId($txId) send channel")
+ ?: throw BluePrintException("failed to get transactionId($txId) send channel")
coroutineScope {
launch {
sendChannel.send(input)
@@ -127,7 +127,7 @@
/** Send the request */
val sendChannel = commChannels[txId]?.requestChannel
- ?: throw BlueprintException("failed to get transactionId($txId) send channel")
+ ?: throw BluePrintException("failed to get transactionId($txId) send channel")
sendChannel.send(input)
/** Receive the response with timeout */
@@ -186,7 +186,7 @@
}
suspend fun createGrpcChannel(grpcProperties: GrpcClientProperties): ManagedChannel {
- val grpcClientService: BlueprintGrpcClientService = bluePrintGrpcLibPropertyService
+ val grpcClientService: BluePrintGrpcClientService = bluePrintGrpcLibPropertyService
.blueprintGrpcClientService(grpcProperties)
return grpcClientService.channel()
}
@@ -203,7 +203,7 @@
selector
}
else -> {
- throw BlueprintException("couldn't process selector($selector)")
+ throw BluePrintException("couldn't process selector($selector)")
}
}
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt
index 69cb0b6..2f1ae2f 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt
@@ -16,9 +16,9 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintFunctionNode
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.springframework.stereotype.Service
// TODO("After Jython depreciation, this interface will be removed")
@@ -26,15 +26,15 @@
@Deprecated("CDS won's support Jython services")
interface BlueprintJythonService {
- fun jythonComponentInstance(bluePrintContext: BlueprintContext, scriptClassReference: String):
+ fun jythonComponentInstance(bluePrintContext: BluePrintContext, scriptClassReference: String):
BlueprintFunctionNode<*, *>
}
@Service
open class DeprecatedBlueprintJythonService : BlueprintJythonService {
- override fun jythonComponentInstance(bluePrintContext: BlueprintContext, scriptClassReference: String):
+ override fun jythonComponentInstance(bluePrintContext: BluePrintContext, scriptClassReference: String):
BlueprintFunctionNode<*, *> {
- throw BlueprintProcessorException("Include python-executor module for Jython support")
+ throw BluePrintProcessorException("Include python-executor module for Jython support")
}
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorTest.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorTest.kt
index 5ef62d0..b3a0a58 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorTest.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/ComponentRemoteScriptExecutorTest.kt
@@ -32,15 +32,15 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.createExecutionServiceOutputProto
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.createStatus
import org.onap.ccsdk.cds.blueprintsprocessor.core.utils.toProto
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.jsonAsJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
import kotlin.test.assertNotNull
@@ -48,7 +48,7 @@
@Test
fun testNodeComponentRemoteScriptExecutorType() {
- val nodeType = BlueprintTypes.nodeTypeComponentRemoteScriptExecutor()
+ val nodeType = BluePrintTypes.nodeTypeComponentRemoteScriptExecutor()
assertNotNull(nodeType, "failed to generate nodeType Component Remote Script Executor")
}
@@ -96,7 +96,7 @@
fun testComponentRemoteScriptExecutor() {
runBlocking {
/** Mock blueprint context */
- val blueprintContext = mockk<BlueprintContext>()
+ val blueprintContext = mockk<BluePrintContext>()
every { blueprintContext.rootPath } returns normalizedPathName("target")
every {
blueprintContext.nodeTemplateOperationImplementation(
@@ -104,7 +104,7 @@
)
} returns Implementation()
- val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("1234")
+ val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("1234")
every { bluePrintRuntime.bluePrintContext() } returns blueprintContext
val mockExecutionServiceInput = mockExecutionServiceInput(bluePrintRuntime)
@@ -130,7 +130,7 @@
}
}
- private fun mockExecutionServiceInput(bluePrintRuntime: DefaultBlueprintRuntimeService): ExecutionServiceInput {
+ private fun mockExecutionServiceInput(bluePrintRuntime: DefaultBluePrintRuntimeService): ExecutionServiceInput {
val mapper = ObjectMapper()
val requestNode = mapper.createObjectNode()
@@ -138,10 +138,10 @@
requestNode.put("type", "grpc")
val operationInputs = hashMapOf<String, JsonNode>()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "remote-execute".asJsonPrimitive()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] =
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = "remote-execute".asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] =
"ComponentRemoteScriptExecutor".asJsonPrimitive()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] = "process".asJsonPrimitive()
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] = "process".asJsonPrimitive()
operationInputs[ComponentRemoteScriptExecutor.INPUT_SELECTOR] = "remote-script-executor".asJsonPrimitive()
operationInputs[ComponentRemoteScriptExecutor.INPUT_BLUEPRINT_NAME] = "sample-blueprint".asJsonPrimitive()
@@ -205,7 +205,7 @@
return createExecutionServiceOutputProto(
executionServiceInput.commonHeader.toProto(),
executionServiceInput.actionIdentifiers.toProto(),
- createStatus(BlueprintConstants.STATUS_SUCCESS, 200),
+ createStatus(BluePrintConstants.STATUS_SUCCESS, 200),
responsePayload
)
}
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBlueprintProcessingServer.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBluePrintProcessingServer.kt
similarity index 93%
rename from ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBlueprintProcessingServer.kt
rename to ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBluePrintProcessingServer.kt
index 7ac6134..8edea46 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBlueprintProcessingServer.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/MockBluePrintProcessingServer.kt
@@ -25,13 +25,13 @@
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status
import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingServiceGrpc
+import org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingServiceGrpc
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput
import org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput
-private val log = logger(MockBlueprintProcessingServer::class)
+private val log = logger(MockBluePrintProcessingServer::class)
-class MockBlueprintProcessingServer : BlueprintProcessingServiceGrpc.BlueprintProcessingServiceImplBase() {
+class MockBluePrintProcessingServer : BluePrintProcessingServiceGrpc.BluePrintProcessingServiceImplBase() {
override fun process(responseObserver: StreamObserver<ExecutionServiceOutput>): StreamObserver<ExecutionServiceInput> {
@@ -96,7 +96,7 @@
val server = ServerBuilder
.forPort(50052)
.intercept(GrpcServerLoggingInterceptor())
- .addService(MockBlueprintProcessingServer())
+ .addService(MockBluePrintProcessingServer())
.build()
server.start()
log.info("GRPC Serve started(${server.isShutdown}) on port(${server.port})...")
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionServiceTest.kt
index 0d3e42a..28e2b11 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/StreamingRemoteExecutionServiceTest.kt
@@ -35,8 +35,8 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ACTION_MODE_SYNC
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.GRPCLibConstants
import org.onap.ccsdk.cds.blueprintsprocessor.grpc.TokenAuthGrpcClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BlueprintGrpcLibPropertyService
-import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.MockBlueprintProcessingServer
+import org.onap.ccsdk.cds.blueprintsprocessor.grpc.service.BluePrintGrpcLibPropertyService
+import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.scripts.MockBluePrintProcessingServer
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
@@ -67,11 +67,11 @@
@ExperimentalCoroutinesApi
@FlowPreview
fun testStreamingChannel() {
- grpcCleanup.register(serverBuilder.addService(MockBlueprintProcessingServer()).build().start())
+ grpcCleanup.register(serverBuilder.addService(MockBluePrintProcessingServer()).build().start())
val channel = grpcCleanup.register(channelBuilder.maxInboundMessageSize(1024).build())
runBlocking {
- val bluePrintGrpcLibPropertyService = BlueprintGrpcLibPropertyService(mockk())
+ val bluePrintGrpcLibPropertyService = BluePrintGrpcLibPropertyService(mockk())
val streamingRemoteExecutionService = StreamingRemoteExecutionServiceImpl(bluePrintGrpcLibPropertyService)
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/AbstractComponentFunctionTest.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/AbstractComponentFunctionTest.kt
index 3438821..b575781 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/AbstractComponentFunctionTest.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/AbstractComponentFunctionTest.kt
@@ -34,23 +34,23 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.CDS_LOCK_GROUP
import org.onap.ccsdk.cds.blueprintsprocessor.core.service.ClusterLock
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.nodeTypeComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
import org.onap.ccsdk.cds.controllerblueprints.core.data.LockAssignment
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintScriptsServiceImpl
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintScriptsServiceImpl
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -66,14 +66,14 @@
@ContextConfiguration(
classes = [
ComponentFunctionScriptingService::class,
- BlueprintScriptsServiceImpl::class, DeprecatedBlueprintJythonService::class
+ BluePrintScriptsServiceImpl::class, DeprecatedBlueprintJythonService::class
]
)
class AbstractComponentFunctionTest {
- lateinit var bluePrintRuntimeService: DefaultBlueprintRuntimeService
- lateinit var blueprintContext: BlueprintContext
- lateinit var blueprintClusterService: BlueprintClusterService
+ lateinit var bluePrintRuntimeService: DefaultBluePrintRuntimeService
+ lateinit var blueprintContext: BluePrintContext
+ lateinit var blueprintClusterService: BluePrintClusterService
@Autowired
lateinit var compSvc: ComponentFunctionScriptingService
@@ -92,7 +92,7 @@
)
} returns Implementation()
- every { bluePrintRuntimeService.getBlueprintError() } returns BlueprintError()
+ every { bluePrintRuntimeService.getBluePrintError() } returns BluePrintError()
}
@Test
@@ -152,7 +152,7 @@
@Test
fun testComponentScriptExecutorNodeType() {
- val componentScriptExecutor = BlueprintTypes.nodeTypeComponentScriptExecutor()
+ val componentScriptExecutor = BluePrintTypes.nodeTypeComponentScriptExecutor()
assertNotNull(componentScriptExecutor.interfaces, "failed to get interface operations")
}
@@ -277,7 +277,7 @@
/**
* Mocked input for abstract function test.
*/
- private fun getMockedInput(bluePrintRuntime: DefaultBlueprintRuntimeService):
+ private fun getMockedInput(bluePrintRuntime: DefaultBluePrintRuntimeService):
ExecutionServiceInput {
val mapper = ObjectMapper()
@@ -286,11 +286,11 @@
rootNode.put("type", "rest")
val operationInputs = hashMapOf<String, JsonNode>()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] =
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] =
"activate-restconf".asJsonPrimitive()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] =
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] =
"interfaceName".asJsonPrimitive()
- operationInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] =
+ operationInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] =
"operationName".asJsonPrimitive()
operationInputs["dynamic-properties"] = rootNode
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintWorkflowExecutionServiceImpl.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
similarity index 81%
rename from ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintWorkflowExecutionServiceImpl.kt
rename to ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
index 5a175b0..0f80076 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintWorkflowExecutionServiceImpl.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt
@@ -19,26 +19,26 @@
import com.fasterxml.jackson.databind.JsonNode
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asObjectNode
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
@Service("bluePrintWorkflowExecutionService")
-open class BlueprintWorkflowExecutionServiceImpl(
+open class BluePrintWorkflowExecutionServiceImpl(
private val componentWorkflowExecutionService: ComponentWorkflowExecutionService,
private val dgWorkflowExecutionService: DGWorkflowExecutionService,
private val imperativeWorkflowExecutionService: ImperativeWorkflowExecutionService
-) : BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
+) : BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
- private val log = LoggerFactory.getLogger(BlueprintWorkflowExecutionServiceImpl::class.java)!!
+ private val log = LoggerFactory.getLogger(BluePrintWorkflowExecutionServiceImpl::class.java)!!
- override suspend fun executeBlueprintWorkflow(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ override suspend fun executeBluePrintWorkflow(
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
executionServiceInput: ExecutionServiceInput,
properties: MutableMap<String, Any>
): ExecutionServiceOutput {
@@ -50,19 +50,19 @@
// Assign Workflow inputs
// check if request structure exists
if (!executionServiceInput.payload.has("$workflowName-request")) {
- throw BlueprintProcessorException("Input request missing the expected '$workflowName-request' block!")
+ throw BluePrintProcessorException("Input request missing the expected '$workflowName-request' block!")
}
val input = executionServiceInput.payload.get("$workflowName-request")
bluePrintRuntimeService.assignWorkflowInputs(workflowName, input)
val workflow = bluePrintContext.workflowByName(workflowName)
- val steps = workflow.steps ?: throw BlueprintProcessorException("could't get steps for workflow($workflowName)")
+ val steps = workflow.steps ?: throw BluePrintProcessorException("could't get steps for workflow($workflowName)")
/** If workflow has multiple steps, then it is imperative workflow */
val executionServiceOutput: ExecutionServiceOutput = if (steps.size > 1) {
imperativeWorkflowExecutionService
- .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
} else {
// Get the DG Node Template
val nodeTemplateName = bluePrintContext.workflowFirstStepNodeTemplate(workflowName)
@@ -72,16 +72,16 @@
log.info("Executing workflow($workflowName) NodeTemplate($nodeTemplateName), derived from($derivedFrom)")
/** Return ExecutionServiceOutput based on DG node or Component Node */
when {
- derivedFrom.startsWith(BlueprintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
+ derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_COMPONENT, true) -> {
componentWorkflowExecutionService
- .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
}
- derivedFrom.startsWith(BlueprintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
+ derivedFrom.startsWith(BluePrintConstants.MODEL_TYPE_NODE_WORKFLOW, true) -> {
dgWorkflowExecutionService
- .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, properties)
}
else -> {
- throw BlueprintProcessorException(
+ throw BluePrintProcessorException(
"couldn't execute workflow($workflowName) step mapped " +
"to node template($nodeTemplateName) derived from($derivedFrom)"
)
@@ -97,7 +97,7 @@
workflowOutputs = bluePrintRuntimeService.resolveWorkflowOutputs(workflowName)
} catch (e: RuntimeException) {
log.error("Failed to resolve outputs for workflow: $workflowName", e)
- e.message?.let { bluePrintRuntimeService.getBlueprintError().addError(it, "workflow") }
+ e.message?.let { bluePrintRuntimeService.getBluePrintError().addError(it, "workflow") }
}
// Set the Response Payload
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt
index 64bb70e..044e8cf 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicContext.kt
@@ -16,20 +16,20 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.sli.core.sli.SvcLogicContext
class BlueprintSvcLogicContext : SvcLogicContext() {
- private var bluePrintRuntimeService: BlueprintRuntimeService<*>? = null
+ private var bluePrintRuntimeService: BluePrintRuntimeService<*>? = null
private var request: Any? = null
private var response: Any? = null
- fun getBlueprintService(): BlueprintRuntimeService<*> {
+ fun getBluePrintService(): BluePrintRuntimeService<*> {
return this.bluePrintRuntimeService!!
}
- fun setBlueprintRuntimeService(bluePrintRuntimeService: BlueprintRuntimeService<*>) {
+ fun setBluePrintRuntimeService(bluePrintRuntimeService: BluePrintRuntimeService<*>) {
this.bluePrintRuntimeService = bluePrintRuntimeService
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt
index ebad150..4efe9f1 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintSvcLogicService.kt
@@ -17,7 +17,7 @@
package org.onap.ccsdk.cds.blueprintsprocessor.services.workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.sli.core.sli.ExitNodeException
import org.onap.ccsdk.sli.core.sli.SvcLogicContext
import org.onap.ccsdk.sli.core.sli.SvcLogicException
@@ -47,7 +47,7 @@
fun unRegisterExecutors(name: String)
- suspend fun execute(graph: SvcLogicGraph, bluePrintRuntimeService: BlueprintRuntimeService<*>, input: Any): Any
+ suspend fun execute(graph: SvcLogicGraph, bluePrintRuntimeService: BluePrintRuntimeService<*>, input: Any): Any
override fun execute(module: String, rpc: String, version: String, mode: String, ctx: SvcLogicContext): SvcLogicContext {
TODO("not implemented")
@@ -104,12 +104,12 @@
override suspend fun execute(
graph: SvcLogicGraph,
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
input: Any
): Any {
// Initialise BlueprintSvcLogic Context with Blueprint Runtime Service and Input Request
val blueprintSvcLogicContext = BlueprintSvcLogicContext()
- blueprintSvcLogicContext.setBlueprintRuntimeService(bluePrintRuntimeService)
+ blueprintSvcLogicContext.setBluePrintRuntimeService(bluePrintRuntimeService)
blueprintSvcLogicContext.setRequest(input)
// Execute the Graph
execute(graph, blueprintSvcLogicContext)
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt
index 3221808..397dd3f 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ComponentWorkflowExecutionService.kt
@@ -18,16 +18,16 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.springframework.stereotype.Service
@Service("componentWorkflowExecutionService")
open class ComponentWorkflowExecutionService(private val nodeTemplateExecutionService: NodeTemplateExecutionService) :
- BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
+ BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
- override suspend fun executeBlueprintWorkflow(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ override suspend fun executeBluePrintWorkflow(
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
executionServiceInput: ExecutionServiceInput,
properties: MutableMap<String, Any>
): ExecutionServiceOutput {
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt
index efcae4a..d40b8f1 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionService.kt
@@ -21,20 +21,20 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.utils.SvcGraphUtils
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
@Service("dgWorkflowExecutionService")
open class DGWorkflowExecutionService(private val blueprintSvcLogicService: BlueprintSvcLogicService) :
- BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
+ BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
private val log = LoggerFactory.getLogger(DGWorkflowExecutionService::class.java)
- override suspend fun executeBlueprintWorkflow(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ override suspend fun executeBluePrintWorkflow(
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
executionServiceInput: ExecutionServiceInput,
properties: MutableMap<String, Any>
): ExecutionServiceOutput {
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt
index 29019b7..b8350f4 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt
@@ -22,19 +22,19 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.Status
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintException
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
import org.onap.ccsdk.cds.controllerblueprints.core.MDCContext
import org.onap.ccsdk.cds.controllerblueprints.core.asGraph
import org.onap.ccsdk.cds.controllerblueprints.core.checkNotEmpty
import org.onap.ccsdk.cds.controllerblueprints.core.data.EdgeLabel
import org.onap.ccsdk.cds.controllerblueprints.core.data.Graph
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
import org.onap.ccsdk.cds.controllerblueprints.core.isAcyclic
import org.onap.ccsdk.cds.controllerblueprints.core.logger
-import org.onap.ccsdk.cds.controllerblueprints.core.service.AbstractBlueprintWorkFlowService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.AbstractBluePrintWorkFlowService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.onap.ccsdk.cds.controllerblueprints.core.service.NodeExecuteMessage
import org.onap.ccsdk.cds.controllerblueprints.core.service.NodeSkipMessage
import org.onap.ccsdk.cds.controllerblueprints.core.service.WorkflowExecuteMessage
@@ -45,10 +45,10 @@
class ImperativeWorkflowExecutionService(
private val nodeTemplateExecutionService: NodeTemplateExecutionService
) :
- BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
+ BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput> {
- override suspend fun executeBlueprintWorkflow(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ override suspend fun executeBluePrintWorkflow(
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
executionServiceInput: ExecutionServiceInput,
properties: MutableMap<String, Any>
): ExecutionServiceOutput {
@@ -60,11 +60,11 @@
val graph = bluePrintContext.workflowByName(workflowName).asGraph()
if (!graph.isAcyclic()) {
- throw BlueprintException("Imperative workflow must be acyclic. Check on_success/on_failure for circular references")
+ throw BluePrintException("Imperative workflow must be acyclic. Check on_success/on_failure for circular references")
}
return coroutineScope {
- ImperativeBlueprintWorkflowService(
+ ImperativeBluePrintWorkflowService(
nodeTemplateExecutionService,
this.coroutineContext[MDCContext]
)
@@ -72,21 +72,21 @@
}
}
-open class ImperativeBlueprintWorkflowService(private val nodeTemplateExecutionService: NodeTemplateExecutionService, private val mdcContext: CoroutineContext?) :
- AbstractBlueprintWorkFlowService<ExecutionServiceInput, ExecutionServiceOutput>() {
+open class ImperativeBluePrintWorkflowService(private val nodeTemplateExecutionService: NodeTemplateExecutionService, private val mdcContext: CoroutineContext?) :
+ AbstractBluePrintWorkFlowService<ExecutionServiceInput, ExecutionServiceOutput>() {
final override val coroutineContext: CoroutineContext
get() = mdcContext?.let { super.coroutineContext + it } ?: super.coroutineContext
- val log = logger(ImperativeBlueprintWorkflowService::class)
+ val log = logger(ImperativeBluePrintWorkflowService::class)
- lateinit var bluePrintRuntimeService: BlueprintRuntimeService<*>
+ lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
lateinit var executionServiceInput: ExecutionServiceInput
lateinit var workflowName: String
override suspend fun executeWorkflow(
graph: Graph,
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
input: ExecutionServiceInput
): ExecutionServiceOutput {
this.graph = graph
@@ -100,7 +100,7 @@
if (!workflowActor.isClosedForSend) {
workflowActor.send(startMessage)
} else {
- throw BlueprintProcessorException("workflow($workflowActor) actor is closed")
+ throw BluePrintProcessorException("workflow($workflowActor) actor is closed")
}
return output.await()
}
@@ -114,12 +114,12 @@
if (exceptions.isNotEmpty()) {
exceptions.forEach {
val errorMessage = it.message ?: ""
- bluePrintRuntimeService.getBlueprintError().addError(errorMessage, "workflow")
+ bluePrintRuntimeService.getBluePrintError().addError(errorMessage, "workflow")
log.error("workflow($workflowId) exception :", it)
}
- message = BlueprintConstants.STATUS_FAILURE
+ message = BluePrintConstants.STATUS_FAILURE
} else {
- message = BlueprintConstants.STATUS_SUCCESS
+ message = BluePrintConstants.STATUS_SUCCESS
}
eventType = EventType.EVENT_COMPONENT_EXECUTED.name
}
@@ -162,9 +162,9 @@
val executionServiceOutput = nodeTemplateExecutionService
.executeNodeTemplate(bluePrintRuntimeService, node.id, nodeTemplateName, nodeInput)
- if (executionServiceOutput.status.message == BlueprintConstants.STATUS_FAILURE) {
+ if (executionServiceOutput.status.message == BluePrintConstants.STATUS_FAILURE) {
// Clear step errors so that the workflow does not fail
- bluePrintRuntimeService.getBlueprintError().stepErrors(node.id)?.clear()
+ bluePrintRuntimeService.getBluePrintError().stepErrors(node.id)?.clear()
return EdgeLabel.FAILURE
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt
index ff8f5b8..88799d1 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionService.kt
@@ -20,23 +20,23 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.data.Implementation
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
@Service
-open class NodeTemplateExecutionService(private val bluePrintClusterService: BlueprintClusterService) {
+open class NodeTemplateExecutionService(private val bluePrintClusterService: BluePrintClusterService) {
private val log = LoggerFactory.getLogger(NodeTemplateExecutionService::class.java)!!
suspend fun executeNodeTemplate(
- bluePrintRuntimeService: BlueprintRuntimeService<*>,
+ bluePrintRuntimeService: BluePrintRuntimeService<*>,
stepName: String,
nodeTemplateName: String,
executionServiceInput: ExecutionServiceInput
@@ -63,7 +63,7 @@
)
// Get the Component Instance
- val plugin = BlueprintDependencyService.instance<AbstractComponentFunction>(componentName)
+ val plugin = BluePrintDependencyService.instance<AbstractComponentFunction>(componentName)
// Set the Blueprint Services
plugin.bluePrintRuntimeService = bluePrintRuntimeService
plugin.bluePrintClusterService = bluePrintClusterService
@@ -79,9 +79,9 @@
// Populate Step Meta Data
val stepInputs: MutableMap<String, JsonNode> = hashMapOf()
- stepInputs[BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = nodeTemplateName.asJsonPrimitive()
- stepInputs[BlueprintConstants.PROPERTY_CURRENT_INTERFACE] = interfaceName.asJsonPrimitive()
- stepInputs[BlueprintConstants.PROPERTY_CURRENT_OPERATION] = operationName.asJsonPrimitive()
+ stepInputs[BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE] = nodeTemplateName.asJsonPrimitive()
+ stepInputs[BluePrintConstants.PROPERTY_CURRENT_INTERFACE] = interfaceName.asJsonPrimitive()
+ stepInputs[BluePrintConstants.PROPERTY_CURRENT_OPERATION] = operationName.asJsonPrimitive()
val stepInputData = StepData().apply {
name = stepName
properties = stepInputs
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt
index 2e3f78a..8ef7415 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt
@@ -52,7 +52,7 @@
try { // Get the Request from the Context and Set to the Function Input and Invoke the function
val executionOutput = nodeTemplateExecutionService.executeNodeTemplate(
- ctx.getBlueprintService(), stepName, nodeTemplateName, executionInput
+ ctx.getBluePrintService(), stepName, nodeTemplateName, executionInput
)
ctx.setResponse(executionOutput)
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintWorkflowExecutionServiceImplTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImplTest.kt
similarity index 78%
rename from ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintWorkflowExecutionServiceImplTest.kt
rename to ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImplTest.kt
index b7087b3..c28e36a 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintWorkflowExecutionServiceImplTest.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImplTest.kt
@@ -31,19 +31,19 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.CommonHeader
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceOutput
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.MockComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintProcessorException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.data.Step
import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
-import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BlueprintWorkflowExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintWorkflowExecutionService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.mock.mockito.MockBean
@@ -55,18 +55,18 @@
@RunWith(SpringRunner::class)
@ContextConfiguration(classes = [WorkflowServiceConfiguration::class])
-class BlueprintWorkflowExecutionServiceImplTest {
+class BluePrintWorkflowExecutionServiceImplTest {
@Autowired
- lateinit var bluePrintWorkflowExecutionService: BlueprintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput>
+ lateinit var bluePrintWorkflowExecutionService: BluePrintWorkflowExecutionService<ExecutionServiceInput, ExecutionServiceOutput>
@MockBean
- lateinit var bluePrintClusterService: BlueprintClusterService
+ lateinit var bluePrintClusterService: BluePrintClusterService
@Before
fun init() {
- mockkObject(BlueprintDependencyService)
- every { BlueprintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
+ mockkObject(BluePrintDependencyService)
+ every { BluePrintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
}
@After
@@ -75,9 +75,9 @@
}
@Test
- fun testBlueprintWorkflowExecutionService() {
+ fun testBluePrintWorkflowExecutionService() {
runBlocking {
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -88,20 +88,20 @@
)!!
val executionServiceOutput = bluePrintWorkflowExecutionService
- .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
}
@Test
- fun testImperativeBlueprintWorkflowExecutionService() {
+ fun testImperativeBluePrintWorkflowExecutionService() {
runBlocking {
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -112,11 +112,11 @@
)!!
val executionServiceOutput = bluePrintWorkflowExecutionService
- .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
@@ -124,9 +124,9 @@
@Test
fun `Blueprint fails on missing workflowName-parameters with a useful message`() {
- assertFailsWith(exceptionClass = BlueprintProcessorException::class) {
+ assertFailsWith(exceptionClass = BluePrintProcessorException::class) {
runBlocking {
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -138,7 +138,7 @@
)!!
val executionServiceOutput = bluePrintWorkflowExecutionService
- .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
}
}
}
@@ -146,11 +146,11 @@
@Test
fun `Should handle errors from resolve workflow output`() {
val imperativeWorkflowExecutionService: ImperativeWorkflowExecutionService = mockk()
- val bluePrintWorkflowExecutionServiceImpl = BlueprintWorkflowExecutionServiceImpl(
+ val bluePrintWorkflowExecutionServiceImpl = BluePrintWorkflowExecutionServiceImpl(
mockk(), mockk(), imperativeWorkflowExecutionService
)
- val bluePrintRuntimeService: BlueprintRuntimeService<MutableMap<String, JsonNode>> = mockk()
- val bluePrintContext: BlueprintContext = mockk()
+ val bluePrintRuntimeService: BluePrintRuntimeService<MutableMap<String, JsonNode>> = mockk()
+ val bluePrintContext: BluePrintContext = mockk()
val executionServiceInput = ExecutionServiceInput().apply {
this.actionIdentifiers = ActionIdentifiers().apply { this.actionName = "config-assign" }
this.commonHeader = CommonHeader()
@@ -159,7 +159,7 @@
val workflow = Workflow().apply {
this.steps = mutableMapOf("one" to Step(), "two" to Step())
}
- val blueprintError = BlueprintError()
+ val blueprintError = BluePrintError()
every { bluePrintRuntimeService.bluePrintContext() } returns bluePrintContext
every { bluePrintRuntimeService.assignWorkflowInputs(any(), any()) } returns Unit
@@ -169,13 +169,13 @@
} throws RuntimeException("failed to resolve property...")
every {
runBlocking {
- imperativeWorkflowExecutionService.executeBlueprintWorkflow(any(), any(), any())
+ imperativeWorkflowExecutionService.executeBluePrintWorkflow(any(), any(), any())
}
} returns ExecutionServiceOutput()
- every { bluePrintRuntimeService.getBlueprintError() } returns blueprintError
+ every { bluePrintRuntimeService.getBluePrintError() } returns blueprintError
runBlocking {
- val output = bluePrintWorkflowExecutionServiceImpl.executeBlueprintWorkflow(
+ val output = bluePrintWorkflowExecutionServiceImpl.executeBluePrintWorkflow(
bluePrintRuntimeService, executionServiceInput, mutableMapOf()
)
assertEquals("failed to resolve property...", blueprintError.allErrors()[0])
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintServiceLogicTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintServiceLogicTest.kt
index e7dd9de..d391050 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintServiceLogicTest.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BlueprintServiceLogicTest.kt
@@ -22,13 +22,13 @@
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.executor.ComponentExecuteNodeExecutor
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.PrototypeComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.SingletonComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonReactorUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.mock.mockito.MockBean
@@ -49,17 +49,17 @@
lateinit var dgWorkflowExecutionService: DGWorkflowExecutionService
@MockBean
- lateinit var bluePrintClusterService: BlueprintClusterService
+ lateinit var bluePrintClusterService: BluePrintClusterService
@Before
fun init() {
- BlueprintDependencyService.inject(applicationContext)
+ BluePrintDependencyService.inject(applicationContext)
}
@Test
fun testExecuteGraphWithSingleComponent() {
runBlocking {
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -72,10 +72,10 @@
bluePrintRuntimeService.assignWorkflowInputs("resource-assignment", input)
val executionServiceOutput = dgWorkflowExecutionService
- .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, mutableMapOf())
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, mutableMapOf())
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
@@ -84,7 +84,7 @@
@Test
fun testExecuteGraphWithMultipleComponents() {
runBlocking {
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -97,10 +97,10 @@
bluePrintRuntimeService.assignWorkflowInputs("assign-activate", input)
val executionServiceOutput = dgWorkflowExecutionService
- .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, mutableMapOf())
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, mutableMapOf())
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt
index 355939c..cc1bfee 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/DGWorkflowExecutionServiceTest.kt
@@ -22,11 +22,11 @@
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.executor.ComponentExecuteNodeExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonReactorUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.mock.mockito.MockBean
@@ -47,18 +47,18 @@
lateinit var dgWorkflowExecutionService: DGWorkflowExecutionService
@MockBean
- lateinit var bluePrintClusterService: BlueprintClusterService
+ lateinit var bluePrintClusterService: BluePrintClusterService
@Before
fun init() {
- BlueprintDependencyService.inject(applicationContext)
+ BluePrintDependencyService.inject(applicationContext)
}
@Test
fun testExecuteDirectedGraph() {
runBlocking {
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -70,14 +70,14 @@
val input = executionServiceInput.payload.get("resource-assignment-request")
bluePrintRuntimeService.assignWorkflowInputs("resource-assignment", input)
- val executionServiceOutput = dgWorkflowExecutionService.executeBlueprintWorkflow(
+ val executionServiceOutput = dgWorkflowExecutionService.executeBluePrintWorkflow(
bluePrintRuntimeService,
executionServiceInput, mutableMapOf()
)
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt
index 9ba607c..2367422 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionServiceTest.kt
@@ -28,15 +28,15 @@
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.MockComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.mockNodeTemplateComponentScriptExecutor
import org.onap.ccsdk.cds.controllerblueprints.common.api.EventType
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.data.ServiceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.dsl.serviceTemplate
import org.onap.ccsdk.cds.controllerblueprints.core.logger
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.Test
import kotlin.test.assertEquals
@@ -48,8 +48,8 @@
@Before
fun init() {
- mockkObject(BlueprintDependencyService)
- every { BlueprintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
+ mockkObject(BluePrintDependencyService)
+ every { BluePrintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
}
@After
@@ -101,7 +101,7 @@
step("activate-licence", "activate-licence", "")
}
}
- nodeType(BlueprintTypes.nodeTypeComponentScriptExecutor())
+ nodeType(BluePrintTypes.nodeTypeComponentScriptExecutor())
}
}
@@ -109,10 +109,10 @@
fun testImperativeExecutionService() {
runBlocking {
val serviceTemplate = mockServiceTemplate()
- val bluePrintContext = BlueprintContext(serviceTemplate)
+ val bluePrintContext = BluePrintContext(serviceTemplate)
bluePrintContext.rootPath = normalizedPathName(".")
bluePrintContext.entryDefinition = "cba.imperative.test.ImperativeTestDefinitions.kt"
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime("12345", bluePrintContext)
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime("12345", bluePrintContext)
val executionServiceInput = JacksonUtils
.readValueFromClassPathFile(
@@ -122,10 +122,10 @@
val imperativeWorkflowExecutionService = ImperativeWorkflowExecutionService(NodeTemplateExecutionService(mockk()))
val output = imperativeWorkflowExecutionService
- .executeBlueprintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
+ .executeBluePrintWorkflow(bluePrintRuntimeService, executionServiceInput, hashMapOf())
assertNotNull(output, "failed to get imperative workflow output")
assertNotNull(output.status, "failed to get imperative workflow output status")
- assertEquals(output.status.message, BlueprintConstants.STATUS_SUCCESS)
+ assertEquals(output.status.message, BluePrintConstants.STATUS_SUCCESS)
assertEquals(output.status.eventType, EventType.EVENT_COMPONENT_EXECUTED.name)
}
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionServiceTest.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionServiceTest.kt
index b113987..7839398 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionServiceTest.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/NodeTemplateExecutionServiceTest.kt
@@ -24,11 +24,11 @@
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BlueprintClusterService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.service.BluePrintClusterService
import org.onap.ccsdk.cds.blueprintsprocessor.services.workflow.mock.MockComponentFunction
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintDependencyService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.boot.test.mock.mockito.MockBean
import org.springframework.test.context.ContextConfiguration
@@ -42,12 +42,12 @@
class NodeTemplateExecutionServiceTest {
@MockBean
- lateinit var bluePrintClusterService: BlueprintClusterService
+ lateinit var bluePrintClusterService: BluePrintClusterService
@Before
fun init() {
- mockkObject(BlueprintDependencyService)
- every { BlueprintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
+ mockkObject(BluePrintDependencyService)
+ every { BluePrintDependencyService.applicationContext.getBean(any()) } returns MockComponentFunction()
}
@After
@@ -58,7 +58,7 @@
@Test
fun testExecuteNodeTemplate() {
runBlocking {
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
@@ -81,7 +81,7 @@
assertNotNull(executionServiceOutput, "failed to get response")
assertEquals(
- BlueprintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
+ BluePrintConstants.STATUS_SUCCESS, executionServiceOutput.status.message,
"failed to get successful response"
)
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt
index e2bc0f1..9c37272 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/mock/MockComponentFunction.kt
@@ -20,7 +20,7 @@
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.nodeTemplateComponentScriptExecutor
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.config.ConfigurableBeanFactory
@@ -29,7 +29,7 @@
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component
-fun mockNodeTemplateComponentScriptExecutor(id: String, script: String) = BlueprintTypes.nodeTemplateComponentScriptExecutor(
+fun mockNodeTemplateComponentScriptExecutor(id: String, script: String) = BluePrintTypes.nodeTemplateComponentScriptExecutor(
id,
"mock($id) component function"
) {
diff --git a/ms/py-executor/blueprints_grpc/__init__.py b/ms/py-executor/blueprints_grpc/__init__.py
index 991ddeb..8a2db9e 100644
--- a/ms/py-executor/blueprints_grpc/__init__.py
+++ b/ms/py-executor/blueprints_grpc/__init__.py
@@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from proto.BlueprintCommon_pb2 import *
-from proto.BlueprintProcessing_pb2 import *
+from proto.BluePrintCommon_pb2 import *
+from proto.BluePrintProcessing_pb2 import *
from .script_executor_configuration import *
from .executor_utils import *
from .blueprint_processing_server import *
\ No newline at end of file
diff --git a/ms/py-executor/blueprints_grpc/blueprint_processing_server.py b/ms/py-executor/blueprints_grpc/blueprint_processing_server.py
index 1d2eab7..322d34b 100644
--- a/ms/py-executor/blueprints_grpc/blueprint_processing_server.py
+++ b/ms/py-executor/blueprints_grpc/blueprint_processing_server.py
@@ -16,7 +16,7 @@
import logging
from google.protobuf.json_format import MessageToJson
-from proto import BlueprintProcessing_pb2_grpc as BlueprintProcessing_pb2_grpc
+from proto import BluePrintProcessing_pb2_grpc as BluePrintProcessing_pb2_grpc
from .script_executor_configuration import ScriptExecutorConfiguration
from .executor_utils import instance_for_input
@@ -33,7 +33,7 @@
pass
-class BlueprintProcessingServer(BlueprintProcessing_pb2_grpc.BlueprintProcessingServiceServicer):
+class BluePrintProcessingServer(BluePrintProcessing_pb2_grpc.BluePrintProcessingServiceServicer):
def __init__(self, configuration: ScriptExecutorConfiguration):
self.logger = logging.getLogger(self.__class__.__name__)
diff --git a/ms/py-executor/blueprints_grpc/executor_utils.py b/ms/py-executor/blueprints_grpc/executor_utils.py
index 9319711..701958f 100644
--- a/ms/py-executor/blueprints_grpc/executor_utils.py
+++ b/ms/py-executor/blueprints_grpc/executor_utils.py
@@ -24,14 +24,14 @@
from google.protobuf import json_format, struct_pb2
from google.protobuf.timestamp_pb2 import Timestamp
-from proto.BlueprintCommon_pb2 import (
+from proto.BluePrintCommon_pb2 import (
EVENT_COMPONENT_EXECUTED,
EVENT_COMPONENT_NOTIFICATION,
EVENT_COMPONENT_PROCESSING,
EVENT_COMPONENT_TRACE,
Status
)
-from proto.BlueprintProcessing_pb2 import (
+from proto.BluePrintProcessing_pb2 import (
ExecutionServiceInput,
ExecutionServiceOutput,
)
diff --git a/ms/py-executor/client.py b/ms/py-executor/client.py
index bf636a8..482bcbd 100644
--- a/ms/py-executor/client.py
+++ b/ms/py-executor/client.py
@@ -25,9 +25,9 @@
# limitations under the License.
import grpc
-from proto.BlueprintCommon_pb2 import ActionIdentifiers, CommonHeader
-from proto.BlueprintProcessing_pb2 import ExecutionServiceInput
-from proto.BlueprintProcessing_pb2_grpc import BlueprintProcessingServiceStub
+from proto.BluePrintCommon_pb2 import ActionIdentifiers, CommonHeader
+from proto.BluePrintProcessing_pb2 import ExecutionServiceInput
+from proto.BluePrintProcessing_pb2_grpc import BluePrintProcessingServiceStub
def generate_messages():
@@ -59,7 +59,7 @@
with open('py-executor-chain.pem', 'rb') as f:
creds = grpc.ssl_channel_credentials(f.read())
channel = grpc.secure_channel('localhost:50052', creds)
- stub = BlueprintProcessingServiceStub(channel)
+ stub = BluePrintProcessingServiceStub(channel)
messages = generate_messages()
responses = stub.process(messages)
diff --git a/ms/py-executor/resource_resolution/README.md b/ms/py-executor/resource_resolution/README.md
index a2edebf..3920338 100644
--- a/ms/py-executor/resource_resolution/README.md
+++ b/ms/py-executor/resource_resolution/README.md
@@ -5,8 +5,8 @@
### Insecure channel
```
-from proto.BlueprintCommon_pb2_grpc import ActionIdentifiers, CommonHeader
-from proto.BlueprintProcessing_pb2_grpc import ExecutionServiceInput
+from proto.BluePrintCommon_pb2_grpc import ActionIdentifiers, CommonHeader
+from proto.BluePrintProcessing_pb2_grpc import ExecutionServiceInput
from resource_resolution.grpc.client import Client as ResourceResolutionClient
@@ -43,8 +43,8 @@
### Secure channel
```
-from proto.BlueprintCommon_pb2_grpc import ActionIdentifiers, CommonHeader
-from proto.BlueprintProcessing_pb2_grpc import ExecutionServiceInput
+from proto.BluePrintCommon_pb2_grpc import ActionIdentifiers, CommonHeader
+from proto.BluePrintProcessing_pb2_grpc import ExecutionServiceInput
from resource_resolution.grpc.client import Client as ResourceResolutionClient
@@ -82,8 +82,8 @@
### Authorizarion header
```
-from proto.BlueprintCommon_pb2 import ActionIdentifiers, CommonHeader
-from proto.BlueprintProcessing_pb2 import ExecutionServiceInput
+from proto.BluePrintCommon_pb2 import ActionIdentifiers, CommonHeader
+from proto.BluePrintProcessing_pb2 import ExecutionServiceInput
from resource_resolution.grpc.client import Client as ResourceResolutionClient
diff --git a/ms/py-executor/resource_resolution/grpc/client.py b/ms/py-executor/resource_resolution/grpc/client.py
index 95f59b5..fee1686 100644
--- a/ms/py-executor/resource_resolution/grpc/client.py
+++ b/ms/py-executor/resource_resolution/grpc/client.py
@@ -23,8 +23,8 @@
secure_channel,
ssl_channel_credentials,
)
-from proto.BlueprintProcessing_pb2 import ExecutionServiceInput, ExecutionServiceOutput
-from proto.BlueprintProcessing_pb2_grpc import BlueprintProcessingServiceStub
+from proto.BluePrintProcessing_pb2 import ExecutionServiceInput, ExecutionServiceOutput
+from proto.BluePrintProcessing_pb2_grpc import BluePrintProcessingServiceStub
from .authorization import AuthTokenInterceptor
@@ -69,7 +69,7 @@
self.logger.debug(f"Create insecure channel to connect to {server_address}")
if use_header_auth:
self.channel: Channel = intercept_channel(self.channel, AuthTokenInterceptor(header_auth_token))
- self.stub: BlueprintProcessingServiceStub = BlueprintProcessingServiceStub(self.channel)
+ self.stub: BluePrintProcessingServiceStub = BluePrintProcessingServiceStub(self.channel)
def close(self) -> None:
"""Close client session.
diff --git a/ms/py-executor/resource_resolution/resource_resolution.py b/ms/py-executor/resource_resolution/resource_resolution.py
index c5f7585..3b8c19b 100644
--- a/ms/py-executor/resource_resolution/resource_resolution.py
+++ b/ms/py-executor/resource_resolution/resource_resolution.py
@@ -23,7 +23,7 @@
from google.protobuf import json_format
-from proto.BlueprintProcessing_pb2 import ExecutionServiceInput, ExecutionServiceOutput
+from proto.BluePrintProcessing_pb2 import ExecutionServiceInput, ExecutionServiceOutput
from .grpc import Client as GrpcClient
from .http import Client as HttpClient
@@ -361,12 +361,12 @@
It's possible to store/retrieve templates using pair of artifact name and resolution key OR
resource type and resource id. This method checks if valid combination of parameters were used.
-
+
Args:
resolution_key (str, optional): resolutionKey HTTP request parameter value. Defaults to None.
resource_type (str, optional): resourceType HTTP request parameter value. Defaults to None.
resource_id (str, optional): resourceId HTTP request parameter value. Defaults to None.
-
+
Raises:
AttributeError: Invalid combination of parametes used
"""
diff --git a/ms/py-executor/server.py b/ms/py-executor/server.py
index 5df6f93..7f65370 100644
--- a/ms/py-executor/server.py
+++ b/ms/py-executor/server.py
@@ -24,10 +24,10 @@
import grpc
from manager.servicer import ArtifactManagerServicer
-from proto.BlueprintManagement_pb2_grpc import add_BlueprintManagementServiceServicer_to_server
+from proto.BluePrintManagement_pb2_grpc import add_BluePrintManagementServiceServicer_to_server
-from blueprints_grpc import BlueprintProcessing_pb2_grpc, ScriptExecutorConfiguration
-from blueprints_grpc.blueprint_processing_server import BlueprintProcessingServer
+from blueprints_grpc import BluePrintProcessing_pb2_grpc, ScriptExecutorConfiguration
+from blueprints_grpc.blueprint_processing_server import BluePrintProcessingServer
from blueprints_grpc.request_header_validator_interceptor import RequestHeaderValidatorInterceptor
logger = logging.getLogger("Server")
@@ -56,10 +56,10 @@
# create server
server = grpc.server(futures.ThreadPoolExecutor(max_workers=int(maxWorkers)))
- BlueprintProcessing_pb2_grpc.add_BlueprintProcessingServiceServicer_to_server(
- BlueprintProcessingServer(configuration), server
+ BluePrintProcessing_pb2_grpc.add_BluePrintProcessingServiceServicer_to_server(
+ BluePrintProcessingServer(configuration), server
)
- add_BlueprintManagementServiceServicer_to_server(ArtifactManagerServicer(), server)
+ add_BluePrintManagementServiceServicer_to_server(ArtifactManagerServicer(), server)
# add secure port using credentials
server.add_secure_port('[::]:' + port, server_credentials)
@@ -73,10 +73,10 @@
# create server with token authentication interceptors
server = grpc.server(futures.ThreadPoolExecutor(max_workers=int(maxWorkers)),
interceptors=(header_validator,))
- BlueprintProcessing_pb2_grpc.add_BlueprintProcessingServiceServicer_to_server(
- BlueprintProcessingServer(configuration), server
+ BluePrintProcessing_pb2_grpc.add_BluePrintProcessingServiceServicer_to_server(
+ BluePrintProcessingServer(configuration), server
)
- add_BlueprintManagementServiceServicer_to_server(ArtifactManagerServicer(), server)
+ add_BluePrintManagementServiceServicer_to_server(ArtifactManagerServicer(), server)
server.add_insecure_port('[::]:' + port)
server.start()
diff --git a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/SdcListenerNotificationCallback.java b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/SdcListenerNotificationCallback.java
index 45fb367..b886832 100644
--- a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/SdcListenerNotificationCallback.java
+++ b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/SdcListenerNotificationCallback.java
@@ -122,13 +122,13 @@
final String archivePath = cbaArchivePath.toString();
// Extract CBA archive from CSAR package and store it into local disk
- csarFiles.forEach(file -> listenerService.extractBlueprint(file.getAbsolutePath(), archivePath));
+ csarFiles.forEach(file -> listenerService.extractBluePrint(file.getAbsolutePath(), archivePath));
csarFiles.forEach(file -> FileUtil.deleteFile(file, csarArchivePath.toString()));
} else {
LOGGER.error("Could not able to read CSAR files from this location {}", csarArchivePath);
}
- listenerService.saveBlueprintToCdsDatabase(cbaArchivePath, sdcListenerDto.getManagedChannelForGrpc());
+ listenerService.saveBluePrintToCdsDatabase(cbaArchivePath, sdcListenerDto.getManagedChannelForGrpc());
}
}
diff --git a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/handler/BlueprintProcesssorHandler.java b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcesssorHandler.java
similarity index 78%
rename from ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/handler/BlueprintProcesssorHandler.java
rename to ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcesssorHandler.java
index 41475cd..b80dd26 100644
--- a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/handler/BlueprintProcesssorHandler.java
+++ b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcesssorHandler.java
@@ -18,10 +18,10 @@
import io.grpc.ManagedChannel;
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status;
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput;
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementServiceGrpc;
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementServiceGrpc.BlueprintManagementServiceBlockingStub;
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput;
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput;
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc;
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc.BluePrintManagementServiceBlockingStub;
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -29,29 +29,29 @@
@ConfigurationProperties("listenerservice")
@Component
-public class BlueprintProcesssorHandler implements AutoCloseable {
+public class BluePrintProcesssorHandler implements AutoCloseable {
- private static final Logger LOGGER = LoggerFactory.getLogger(BlueprintProcesssorHandler.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(BluePrintProcesssorHandler.class);
private ManagedChannel channel;
/**
* Sending CBA archive to CDS backend to store into its Database.
*
- * @param request BlueprintManagementInput object holds CBA archive, its version and blueprints.
+ * @param request BluePrintManagementInput object holds CBA archive, its version and blueprints.
* @param managedChannel - ManagedChannel object helps to access the server or application end point.
*
* @return A response object
*/
- public Status sendRequest(BlueprintUploadInput request, ManagedChannel managedChannel) {
+ public Status sendRequest(BluePrintUploadInput request, ManagedChannel managedChannel) {
LOGGER.info("Sending request to blueprint processor");
this.channel = managedChannel;
- final BlueprintManagementServiceBlockingStub syncStub = BlueprintManagementServiceGrpc.newBlockingStub(channel);
+ final BluePrintManagementServiceBlockingStub syncStub = BluePrintManagementServiceGrpc.newBlockingStub(channel);
// Send the request to CDS backend.
- final BlueprintManagementOutput response = syncStub.uploadBlueprint(request);
+ final BluePrintManagementOutput response = syncStub.uploadBlueprint(request);
return response.getStatus();
}
diff --git a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/service/ListenerService.java b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/service/ListenerService.java
index 231054f..5fa3fb3 100644
--- a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/service/ListenerService.java
+++ b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/service/ListenerService.java
@@ -29,7 +29,7 @@
* @param csarArchivePath The path where CSAR archive is stored.
* @param cbaArchivePath The destination path where CBA will be stored.
*/
- void extractBlueprint(String csarArchivePath, String cbaArchivePath);
+ void extractBluePrint(String csarArchivePath, String cbaArchivePath);
/**
* Store the Zip file into CDS database.
@@ -37,7 +37,7 @@
* @param path path where zip file exists.
* @param managedChannel To access the blueprint processor application end point
*/
- void saveBlueprintToCdsDatabase(Path path, ManagedChannel managedChannel);
+ void saveBluePrintToCdsDatabase(Path path, ManagedChannel managedChannel);
/**
* Extract and store the csar package to local disk.
diff --git a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImpl.java b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImpl.java
index 1aebd74..ee27a94 100644
--- a/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImpl.java
+++ b/ms/sdclistener/application/src/main/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImpl.java
@@ -23,12 +23,12 @@
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers;
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader;
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status;
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput;
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput;
import org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk;
import org.onap.ccsdk.cds.controllerblueprints.management.api.UploadAction;
import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
-import org.onap.ccsdk.cds.sdclistener.handler.BlueprintProcesssorHandler;
+import org.onap.ccsdk.cds.sdclistener.handler.BluePrintProcesssorHandler;
import org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus;
import org.onap.ccsdk.cds.sdclistener.util.FileUtil;
import org.onap.sdc.api.results.IDistributionClientDownloadResult;
@@ -64,7 +64,7 @@
public class ListenerServiceImpl implements ListenerService {
@Autowired
- private BlueprintProcesssorHandler bluePrintProcesssorHandler;
+ private BluePrintProcesssorHandler bluePrintProcesssorHandler;
@Autowired
private SdcListenerAuthClientInterceptor sdcListenerAuthClientInterceptor;
@@ -87,7 +87,7 @@
private static final Logger LOGGER = LoggerFactory.getLogger(ListenerServiceImpl.class);
@Override
- public void extractBlueprint(String csarArchivePath, String cbaArchivePath) {
+ public void extractBluePrint(String csarArchivePath, String cbaArchivePath) {
int validPathCount = 0;
final String distributionId = getDistributionId();
final String artifactUrl = getArtifactUrl();
@@ -101,7 +101,7 @@
validPathCount++;
final String cbaArchiveName = Paths.get(fileName).getFileName().toString();
LOGGER.info("Storing the CBA archive {}", cbaArchiveName);
- storeBlueprint(zipFile, cbaArchiveName, cbaStorageDir, entry);
+ storeBluePrint(zipFile, cbaArchiveName, cbaStorageDir, entry);
}
}
@@ -121,7 +121,7 @@
}
}
- private void storeBlueprint(ZipFile zipFile, String fileName, Path cbaArchivePath, ZipEntry entry) {
+ private void storeBluePrint(ZipFile zipFile, String fileName, Path cbaArchivePath, ZipEntry entry) {
Path targetLocation = cbaArchivePath.resolve(fileName);
LOGGER.info("The target location for zip file is {}", targetLocation);
File targetZipFile = new File(targetLocation.toString());
@@ -144,7 +144,7 @@
}
@Override
- public void saveBlueprintToCdsDatabase(Path cbaArchivePath, ManagedChannel channel) {
+ public void saveBluePrintToCdsDatabase(Path cbaArchivePath, ManagedChannel channel) {
List<File> zipFiles = FileUtil.getFilesFromDisk(cbaArchivePath);
if (!zipFiles.isEmpty()) {
prepareRequestForCdsBackend(zipFiles, channel, cbaArchivePath.toString());
@@ -193,7 +193,7 @@
files.forEach(zipFile -> {
try {
- final BlueprintUploadInput request = generateBlueprintUploadInputBuilder(zipFile, path);
+ final BluePrintUploadInput request = generateBluePrintUploadInputBuilder(zipFile, path);
// Send request to CDS Backend.
final Status responseStatus = bluePrintProcesssorHandler.sendRequest(request, managedChannel);
@@ -219,11 +219,11 @@
});
}
- private BlueprintUploadInput generateBlueprintUploadInputBuilder(File file, String path) throws IOException {
+ private BluePrintUploadInput generateBluePrintUploadInputBuilder(File file, String path) throws IOException {
byte[] bytes = FileUtils.readFileToByteArray(file);
FileChunk fileChunk = FileChunk.newBuilder().setChunk(ByteString.copyFrom(bytes)).build();
FileUtil.deleteFile(file, path);
- return BlueprintUploadInput.newBuilder()
+ return BluePrintUploadInput.newBuilder()
.setCommonHeader(CommonHeader.newBuilder().setRequestId(UUID.randomUUID().toString())
.setSubRequestId(UUID.randomUUID().toString()).setOriginatorId("SDC-LISTENER").build())
.setActionIdentifiers(
diff --git a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BlueprintProcessorHandlerTest.java b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcessorHandlerTest.java
similarity index 82%
rename from ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BlueprintProcessorHandlerTest.java
rename to ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcessorHandlerTest.java
index b48a98e..7cde45d 100644
--- a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BlueprintProcessorHandlerTest.java
+++ b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/handler/BluePrintProcessorHandlerTest.java
@@ -30,9 +30,9 @@
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers;
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader;
import org.onap.ccsdk.cds.controllerblueprints.common.api.Status;
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput;
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementServiceGrpc.BlueprintManagementServiceImplBase;
-import org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput;
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput;
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementServiceGrpc.BluePrintManagementServiceImplBase;
+import org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput;
import org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk;
import org.onap.ccsdk.cds.controllerblueprints.management.api.UploadAction;
import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
@@ -50,12 +50,12 @@
import static org.junit.Assert.assertTrue;
@RunWith(SpringRunner.class)
-@EnableConfigurationProperties({BlueprintProcesssorHandler.class, SdcListenerAuthClientInterceptor.class})
-@SpringBootTest(classes = {BlueprintProcessorHandlerTest.class})
-public class BlueprintProcessorHandlerTest {
+@EnableConfigurationProperties({BluePrintProcesssorHandler.class, SdcListenerAuthClientInterceptor.class})
+@SpringBootTest(classes = {BluePrintProcessorHandlerTest.class})
+public class BluePrintProcessorHandlerTest {
@Autowired
- private BlueprintProcesssorHandler bluePrintProcesssorHandler;
+ private BluePrintProcesssorHandler bluePrintProcesssorHandler;
@Autowired
private SdcListenerAuthClientInterceptor sdcListenerAuthClientInterceptor;
@@ -70,11 +70,11 @@
@Before
public void setUp() throws IOException {
- final BlueprintManagementServiceImplBase serviceImplBase = new BlueprintManagementServiceImplBase() {
+ final BluePrintManagementServiceImplBase serviceImplBase = new BluePrintManagementServiceImplBase() {
@Override
- public void uploadBlueprint(BlueprintUploadInput request,
- StreamObserver<BlueprintManagementOutput> responseObserver) {
- responseObserver.onNext(getBlueprintManagementOutput());
+ public void uploadBlueprint(BluePrintUploadInput request,
+ StreamObserver<BluePrintManagementOutput> responseObserver) {
+ responseObserver.onNext(getBluePrintManagementOutput());
responseObserver.onCompleted();
}
};
@@ -93,7 +93,7 @@
@Test
public void testApplicationEndPointSucess() throws IOException {
// Arrange
- BlueprintUploadInput request = generateRequest();
+ BluePrintUploadInput request = generateRequest();
// Act
Status output = bluePrintProcesssorHandler.sendRequest(request, channel);
@@ -103,12 +103,12 @@
assertTrue(output.getMessage().contains(SUCCESS_MSG));
}
- private BlueprintUploadInput generateRequest() throws IOException {
+ private BluePrintUploadInput generateRequest() throws IOException {
File file = Paths.get(CBA_ARCHIVE).toFile();
byte[] bytes = FileUtils.readFileToByteArray(file);
FileChunk fileChunk = FileChunk.newBuilder().setChunk(ByteString.copyFrom(bytes)).build();
- return BlueprintUploadInput.newBuilder()
+ return BluePrintUploadInput.newBuilder()
.setCommonHeader(CommonHeader.newBuilder().setRequestId(UUID.randomUUID().toString())
.setSubRequestId(UUID.randomUUID().toString()).setOriginatorId("SDC-LISTENER").build())
.setActionIdentifiers(
@@ -116,8 +116,8 @@
.setFileChunk(fileChunk).build();
}
- private BlueprintManagementOutput getBlueprintManagementOutput() {
- return BlueprintManagementOutput.newBuilder()
+ private BluePrintManagementOutput getBluePrintManagementOutput() {
+ return BluePrintManagementOutput.newBuilder()
.setStatus(Status.newBuilder().setMessage(SUCCESS_MSG).setCode(200).build()).build();
}
diff --git a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java
index 2e55c8e..4179cca 100644
--- a/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java
+++ b/ms/sdclistener/application/src/test/java/org/onap/ccsdk/cds/sdclistener/service/ListenerServiceImplTest.java
@@ -29,7 +29,7 @@
import org.onap.ccsdk.cds.sdclistener.SdcListenerConfiguration;
import org.onap.ccsdk.cds.sdclistener.client.SdcListenerAuthClientInterceptor;
import org.onap.ccsdk.cds.sdclistener.dto.SdcListenerDto;
-import org.onap.ccsdk.cds.sdclistener.handler.BlueprintProcesssorHandler;
+import org.onap.ccsdk.cds.sdclistener.handler.BluePrintProcesssorHandler;
import org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus;
import org.onap.sdc.api.results.IDistributionClientDownloadResult;
import org.onap.sdc.impl.mock.DistributionClientResultStubImpl;
@@ -50,7 +50,7 @@
import static org.onap.sdc.utils.DistributionStatusEnum.COMPONENT_DONE_OK;
@RunWith(SpringRunner.class)
-@EnableConfigurationProperties({SdcListenerAuthClientInterceptor.class, BlueprintProcesssorHandler.class,
+@EnableConfigurationProperties({SdcListenerAuthClientInterceptor.class, BluePrintProcesssorHandler.class,
SdcListenerDto.class, ListenerServiceImpl.class, SdcListenerStatus.class, SdcListenerConfiguration.class})
@SpringBootTest(classes = {ListenerServiceImplTest.class})
public class ListenerServiceImplTest {
@@ -90,9 +90,9 @@
}
@Test
- public void extractBlueprintSuccessfully() throws IOException {
+ public void extractBluePrintSuccessfully() throws IOException {
// Act
- listenerService.extractBlueprint(CSAR_SAMPLE, tempDirectoryPath.toString());
+ listenerService.extractBluePrint(CSAR_SAMPLE, tempDirectoryPath.toString());
// Verify.
String result = checkFileExists(tempDirectoryPath);
@@ -100,7 +100,7 @@
}
@Test
- public void extractBlueprintFailure() {
+ public void extractBluePrintFailure() {
// Arrange
Mockito.when(listenerDto.getDistributionId()).thenReturn(DISTRIBUTION_ID);
Mockito.when(listenerDto.getArtifactUrl()).thenReturn(URL);
@@ -108,7 +108,7 @@
SDC_LISTENER_COMPONENT);
// Act
- listenerService.extractBlueprint(WRONG_CSAR_SAMPLE, tempDirectoryPath.toString());
+ listenerService.extractBluePrint(WRONG_CSAR_SAMPLE, tempDirectoryPath.toString());
// Verify
Mockito.verify(status).sendResponseBackToSdc(DISTRIBUTION_ID, COMPONENT_DONE_OK, null, URL,
diff --git a/py-modules/common/proto/BluePrintCommon_pb2.py b/py-modules/common/proto/BluePrintCommon_pb2.py
new file mode 100644
index 0000000..bfa353a
--- /dev/null
+++ b/py-modules/common/proto/BluePrintCommon_pb2.py
@@ -0,0 +1,325 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: BluePrintCommon.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+ name='BluePrintCommon.proto',
+ package='org.onap.ccsdk.cds.controllerblueprints.common.api',
+ syntax='proto3',
+ serialized_options=b'P\001',
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\n\x15\x42luePrintCommon.proto\x12\x32org.onap.ccsdk.cds.controllerblueprints.common.api\"\xa8\x01\n\x0c\x43ommonHeader\x12\x11\n\ttimestamp\x18\x01 \x01(\t\x12\x14\n\x0coriginatorId\x18\x17 \x01(\t\x12\x11\n\trequestId\x18\x03 \x01(\t\x12\x14\n\x0csubRequestId\x18\x04 \x01(\t\x12\x46\n\x04\x66lag\x18\x05 \x01(\x0b\x32\x38.org.onap.ccsdk.cds.controllerblueprints.common.api.Flag\"$\n\x04\x46lag\x12\x0f\n\x07isForce\x18\x01 \x01(\x08\x12\x0b\n\x03ttl\x18\x02 \x01(\x05\"f\n\x11\x41\x63tionIdentifiers\x12\x15\n\rblueprintName\x18\x01 \x01(\t\x12\x18\n\x10\x62lueprintVersion\x18\x02 \x01(\t\x12\x12\n\nactionName\x18\x03 \x01(\t\x12\x0c\n\x04mode\x18\x04 \x01(\t\"\xa2\x01\n\x06Status\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x14\n\x0c\x65rrorMessage\x18\x02 \x01(\t\x12\x0f\n\x07message\x18\x03 \x01(\t\x12P\n\teventType\x18\x04 \x01(\x0e\x32=.org.onap.ccsdk.cds.controllerblueprints.common.api.EventType\x12\x11\n\ttimestamp\x18\x05 \x01(\t*\xa3\x01\n\tEventType\x12\x1b\n\x17\x45VENT_COMPONENT_FAILURE\x10\x00\x12\x1e\n\x1a\x45VENT_COMPONENT_PROCESSING\x10\x01\x12 \n\x1c\x45VENT_COMPONENT_NOTIFICATION\x10\x02\x12\x1c\n\x18\x45VENT_COMPONENT_EXECUTED\x10\x03\x12\x19\n\x15\x45VENT_COMPONENT_TRACE\x10\x04\x42\x02P\x01\x62\x06proto3'
+)
+
+_EVENTTYPE = _descriptor.EnumDescriptor(
+ name='EventType',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.EventType',
+ filename=None,
+ file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
+ values=[
+ _descriptor.EnumValueDescriptor(
+ name='EVENT_COMPONENT_FAILURE', index=0, number=0,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='EVENT_COMPONENT_PROCESSING', index=1, number=1,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='EVENT_COMPONENT_NOTIFICATION', index=2, number=2,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='EVENT_COMPONENT_EXECUTED', index=3, number=3,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='EVENT_COMPONENT_TRACE', index=4, number=4,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ ],
+ containing_type=None,
+ serialized_options=None,
+ serialized_start=556,
+ serialized_end=719,
+)
+_sym_db.RegisterEnumDescriptor(_EVENTTYPE)
+
+EventType = enum_type_wrapper.EnumTypeWrapper(_EVENTTYPE)
+EVENT_COMPONENT_FAILURE = 0
+EVENT_COMPONENT_PROCESSING = 1
+EVENT_COMPONENT_NOTIFICATION = 2
+EVENT_COMPONENT_EXECUTED = 3
+EVENT_COMPONENT_TRACE = 4
+
+
+
+_COMMONHEADER = _descriptor.Descriptor(
+ name='CommonHeader',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='timestamp', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader.timestamp', index=0,
+ number=1, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='originatorId', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader.originatorId', index=1,
+ number=23, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='requestId', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader.requestId', index=2,
+ number=3, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='subRequestId', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader.subRequestId', index=3,
+ number=4, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='flag', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader.flag', index=4,
+ number=5, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=78,
+ serialized_end=246,
+)
+
+
+_FLAG = _descriptor.Descriptor(
+ name='Flag',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Flag',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='isForce', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Flag.isForce', index=0,
+ number=1, type=8, cpp_type=7, label=1,
+ has_default_value=False, default_value=False,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='ttl', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Flag.ttl', index=1,
+ number=2, type=5, cpp_type=1, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=248,
+ serialized_end=284,
+)
+
+
+_ACTIONIDENTIFIERS = _descriptor.Descriptor(
+ name='ActionIdentifiers',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='blueprintName', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers.blueprintName', index=0,
+ number=1, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='blueprintVersion', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers.blueprintVersion', index=1,
+ number=2, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='actionName', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers.actionName', index=2,
+ number=3, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='mode', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers.mode', index=3,
+ number=4, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=286,
+ serialized_end=388,
+)
+
+
+_STATUS = _descriptor.Descriptor(
+ name='Status',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='code', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status.code', index=0,
+ number=1, type=5, cpp_type=1, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='errorMessage', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status.errorMessage', index=1,
+ number=2, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='message', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status.message', index=2,
+ number=3, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='eventType', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status.eventType', index=3,
+ number=4, type=14, cpp_type=8, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='timestamp', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status.timestamp', index=4,
+ number=5, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=391,
+ serialized_end=553,
+)
+
+_COMMONHEADER.fields_by_name['flag'].message_type = _FLAG
+_STATUS.fields_by_name['eventType'].enum_type = _EVENTTYPE
+DESCRIPTOR.message_types_by_name['CommonHeader'] = _COMMONHEADER
+DESCRIPTOR.message_types_by_name['Flag'] = _FLAG
+DESCRIPTOR.message_types_by_name['ActionIdentifiers'] = _ACTIONIDENTIFIERS
+DESCRIPTOR.message_types_by_name['Status'] = _STATUS
+DESCRIPTOR.enum_types_by_name['EventType'] = _EVENTTYPE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+CommonHeader = _reflection.GeneratedProtocolMessageType('CommonHeader', (_message.Message,), {
+ 'DESCRIPTOR' : _COMMONHEADER,
+ '__module__' : 'BluePrintCommon_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader)
+})
+_sym_db.RegisterMessage(CommonHeader)
+
+Flag = _reflection.GeneratedProtocolMessageType('Flag', (_message.Message,), {
+ 'DESCRIPTOR' : _FLAG,
+ '__module__' : 'BluePrintCommon_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.common.api.Flag)
+})
+_sym_db.RegisterMessage(Flag)
+
+ActionIdentifiers = _reflection.GeneratedProtocolMessageType('ActionIdentifiers', (_message.Message,), {
+ 'DESCRIPTOR' : _ACTIONIDENTIFIERS,
+ '__module__' : 'BluePrintCommon_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers)
+})
+_sym_db.RegisterMessage(ActionIdentifiers)
+
+Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), {
+ 'DESCRIPTOR' : _STATUS,
+ '__module__' : 'BluePrintCommon_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.common.api.Status)
+})
+_sym_db.RegisterMessage(Status)
+
+
+DESCRIPTOR._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/py-modules/common/proto/BlueprintCommon_pb2_grpc.py b/py-modules/common/proto/BluePrintCommon_pb2_grpc.py
similarity index 100%
rename from py-modules/common/proto/BlueprintCommon_pb2_grpc.py
rename to py-modules/common/proto/BluePrintCommon_pb2_grpc.py
diff --git a/py-modules/common/proto/BluePrintManagement_pb2.py b/py-modules/common/proto/BluePrintManagement_pb2.py
new file mode 100644
index 0000000..43a8356
--- /dev/null
+++ b/py-modules/common/proto/BluePrintManagement_pb2.py
@@ -0,0 +1,536 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: BluePrintManagement.proto
+"""Generated protocol buffer code."""
+from google.protobuf.internal import enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
+import proto.BluePrintCommon_pb2 as BluePrintCommon__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+ name='BluePrintManagement.proto',
+ package='org.onap.ccsdk.cds.controllerblueprints.management.api',
+ syntax='proto3',
+ serialized_options=b'P\001',
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\n\x19\x42luePrintManagement.proto\x12\x36org.onap.ccsdk.cds.controllerblueprints.management.api\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15\x42luePrintCommon.proto\"\xd3\x02\n\x14\x42luePrintUploadInput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12T\n\tfileChunk\x18\x02 \x01(\x0b\x32\x41.org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk\x12`\n\x11\x61\x63tionIdentifiers\x18\x03 \x01(\x0b\x32\x45.org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers\x12+\n\nproperties\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xff\x01\n\x16\x42luePrintDownloadInput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12`\n\x11\x61\x63tionIdentifiers\x18\x02 \x01(\x0b\x32\x45.org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xfd\x01\n\x14\x42luePrintRemoveInput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12`\n\x11\x61\x63tionIdentifiers\x18\x02 \x01(\x0b\x32\x45.org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xb9\x01\n\x17\x42luePrintBootstrapInput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12\x0f\n\x07loadCBA\x18\x02 \x01(\x08\x12\x15\n\rloadModelType\x18\x03 \x01(\x08\x12\x1e\n\x16loadResourceDictionary\x18\x04 \x01(\x08\"\xc2\x02\n\x19\x42luePrintManagementOutput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12T\n\tfileChunk\x18\x02 \x01(\x0b\x32\x41.org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk\x12J\n\x06status\x18\x03 \x01(\x0b\x32:.org.onap.ccsdk.cds.controllerblueprints.common.api.Status\x12+\n\nproperties\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\"\x1a\n\tFileChunk\x12\r\n\x05\x63hunk\x18\x01 \x01(\x0c*4\n\x0e\x44ownloadAction\x12\n\n\x06SEARCH\x10\x00\x12\x0b\n\x07STARTER\x10\x01\x12\t\n\x05\x43LONE\x10\x02*@\n\x0cUploadAction\x12\t\n\x05\x44RAFT\x10\x00\x12\n\n\x06\x45NRICH\x10\x01\x12\x0c\n\x08VALIDATE\x10\x02\x12\x0b\n\x07PUBLISH\x10\x03*\x1b\n\x0cRemoveAction\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x32\xfa\x05\n\x1a\x42luePrintManagementService\x12\xb6\x01\n\x11\x64ownloadBlueprint\x12N.org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput\x1aQ.org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput\x12\xb2\x01\n\x0fuploadBlueprint\x12L.org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput\x1aQ.org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput\x12\xb2\x01\n\x0fremoveBlueprint\x12L.org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput\x1aQ.org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput\x12\xb8\x01\n\x12\x62ootstrapBlueprint\x12O.org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput\x1aQ.org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutputB\x02P\x01\x62\x06proto3'
+ ,
+ dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,BluePrintCommon__pb2.DESCRIPTOR,])
+
+_DOWNLOADACTION = _descriptor.EnumDescriptor(
+ name='DownloadAction',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.DownloadAction',
+ filename=None,
+ file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
+ values=[
+ _descriptor.EnumValueDescriptor(
+ name='SEARCH', index=0, number=0,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='STARTER', index=1, number=1,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='CLONE', index=2, number=2,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ ],
+ containing_type=None,
+ serialized_options=None,
+ serialized_start=1535,
+ serialized_end=1587,
+)
+_sym_db.RegisterEnumDescriptor(_DOWNLOADACTION)
+
+DownloadAction = enum_type_wrapper.EnumTypeWrapper(_DOWNLOADACTION)
+_UPLOADACTION = _descriptor.EnumDescriptor(
+ name='UploadAction',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.UploadAction',
+ filename=None,
+ file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
+ values=[
+ _descriptor.EnumValueDescriptor(
+ name='DRAFT', index=0, number=0,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ENRICH', index=1, number=1,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='VALIDATE', index=2, number=2,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='PUBLISH', index=3, number=3,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ ],
+ containing_type=None,
+ serialized_options=None,
+ serialized_start=1589,
+ serialized_end=1653,
+)
+_sym_db.RegisterEnumDescriptor(_UPLOADACTION)
+
+UploadAction = enum_type_wrapper.EnumTypeWrapper(_UPLOADACTION)
+_REMOVEACTION = _descriptor.EnumDescriptor(
+ name='RemoveAction',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.RemoveAction',
+ filename=None,
+ file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
+ values=[
+ _descriptor.EnumValueDescriptor(
+ name='DEFAULT', index=0, number=0,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ ],
+ containing_type=None,
+ serialized_options=None,
+ serialized_start=1655,
+ serialized_end=1682,
+)
+_sym_db.RegisterEnumDescriptor(_REMOVEACTION)
+
+RemoveAction = enum_type_wrapper.EnumTypeWrapper(_REMOVEACTION)
+SEARCH = 0
+STARTER = 1
+CLONE = 2
+DRAFT = 0
+ENRICH = 1
+VALIDATE = 2
+PUBLISH = 3
+DEFAULT = 0
+
+
+
+_BLUEPRINTUPLOADINPUT = _descriptor.Descriptor(
+ name='BluePrintUploadInput',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput.commonHeader', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='fileChunk', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput.fileChunk', index=1,
+ number=2, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='actionIdentifiers', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput.actionIdentifiers', index=2,
+ number=3, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='properties', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput.properties', index=3,
+ number=4, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=139,
+ serialized_end=478,
+)
+
+
+_BLUEPRINTDOWNLOADINPUT = _descriptor.Descriptor(
+ name='BluePrintDownloadInput',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput.commonHeader', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='actionIdentifiers', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput.actionIdentifiers', index=1,
+ number=2, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='properties', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput.properties', index=2,
+ number=3, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=481,
+ serialized_end=736,
+)
+
+
+_BLUEPRINTREMOVEINPUT = _descriptor.Descriptor(
+ name='BluePrintRemoveInput',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput.commonHeader', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='actionIdentifiers', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput.actionIdentifiers', index=1,
+ number=2, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='properties', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput.properties', index=2,
+ number=3, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=739,
+ serialized_end=992,
+)
+
+
+_BLUEPRINTBOOTSTRAPINPUT = _descriptor.Descriptor(
+ name='BluePrintBootstrapInput',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput.commonHeader', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='loadCBA', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput.loadCBA', index=1,
+ number=2, type=8, cpp_type=7, label=1,
+ has_default_value=False, default_value=False,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='loadModelType', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput.loadModelType', index=2,
+ number=3, type=8, cpp_type=7, label=1,
+ has_default_value=False, default_value=False,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='loadResourceDictionary', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput.loadResourceDictionary', index=3,
+ number=4, type=8, cpp_type=7, label=1,
+ has_default_value=False, default_value=False,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=995,
+ serialized_end=1180,
+)
+
+
+_BLUEPRINTMANAGEMENTOUTPUT = _descriptor.Descriptor(
+ name='BluePrintManagementOutput',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput.commonHeader', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='fileChunk', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput.fileChunk', index=1,
+ number=2, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='status', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput.status', index=2,
+ number=3, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='properties', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput.properties', index=3,
+ number=4, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=1183,
+ serialized_end=1505,
+)
+
+
+_FILECHUNK = _descriptor.Descriptor(
+ name='FileChunk',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='chunk', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk.chunk', index=0,
+ number=1, type=12, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"",
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=1507,
+ serialized_end=1533,
+)
+
+_BLUEPRINTUPLOADINPUT.fields_by_name['commonHeader'].message_type = BluePrintCommon__pb2._COMMONHEADER
+_BLUEPRINTUPLOADINPUT.fields_by_name['fileChunk'].message_type = _FILECHUNK
+_BLUEPRINTUPLOADINPUT.fields_by_name['actionIdentifiers'].message_type = BluePrintCommon__pb2._ACTIONIDENTIFIERS
+_BLUEPRINTUPLOADINPUT.fields_by_name['properties'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
+_BLUEPRINTDOWNLOADINPUT.fields_by_name['commonHeader'].message_type = BluePrintCommon__pb2._COMMONHEADER
+_BLUEPRINTDOWNLOADINPUT.fields_by_name['actionIdentifiers'].message_type = BluePrintCommon__pb2._ACTIONIDENTIFIERS
+_BLUEPRINTDOWNLOADINPUT.fields_by_name['properties'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
+_BLUEPRINTREMOVEINPUT.fields_by_name['commonHeader'].message_type = BluePrintCommon__pb2._COMMONHEADER
+_BLUEPRINTREMOVEINPUT.fields_by_name['actionIdentifiers'].message_type = BluePrintCommon__pb2._ACTIONIDENTIFIERS
+_BLUEPRINTREMOVEINPUT.fields_by_name['properties'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
+_BLUEPRINTBOOTSTRAPINPUT.fields_by_name['commonHeader'].message_type = BluePrintCommon__pb2._COMMONHEADER
+_BLUEPRINTMANAGEMENTOUTPUT.fields_by_name['commonHeader'].message_type = BluePrintCommon__pb2._COMMONHEADER
+_BLUEPRINTMANAGEMENTOUTPUT.fields_by_name['fileChunk'].message_type = _FILECHUNK
+_BLUEPRINTMANAGEMENTOUTPUT.fields_by_name['status'].message_type = BluePrintCommon__pb2._STATUS
+_BLUEPRINTMANAGEMENTOUTPUT.fields_by_name['properties'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
+DESCRIPTOR.message_types_by_name['BluePrintUploadInput'] = _BLUEPRINTUPLOADINPUT
+DESCRIPTOR.message_types_by_name['BluePrintDownloadInput'] = _BLUEPRINTDOWNLOADINPUT
+DESCRIPTOR.message_types_by_name['BluePrintRemoveInput'] = _BLUEPRINTREMOVEINPUT
+DESCRIPTOR.message_types_by_name['BluePrintBootstrapInput'] = _BLUEPRINTBOOTSTRAPINPUT
+DESCRIPTOR.message_types_by_name['BluePrintManagementOutput'] = _BLUEPRINTMANAGEMENTOUTPUT
+DESCRIPTOR.message_types_by_name['FileChunk'] = _FILECHUNK
+DESCRIPTOR.enum_types_by_name['DownloadAction'] = _DOWNLOADACTION
+DESCRIPTOR.enum_types_by_name['UploadAction'] = _UPLOADACTION
+DESCRIPTOR.enum_types_by_name['RemoveAction'] = _REMOVEACTION
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+BluePrintUploadInput = _reflection.GeneratedProtocolMessageType('BluePrintUploadInput', (_message.Message,), {
+ 'DESCRIPTOR' : _BLUEPRINTUPLOADINPUT,
+ '__module__' : 'BluePrintManagement_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintUploadInput)
+})
+_sym_db.RegisterMessage(BluePrintUploadInput)
+
+BluePrintDownloadInput = _reflection.GeneratedProtocolMessageType('BluePrintDownloadInput', (_message.Message,), {
+ 'DESCRIPTOR' : _BLUEPRINTDOWNLOADINPUT,
+ '__module__' : 'BluePrintManagement_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintDownloadInput)
+})
+_sym_db.RegisterMessage(BluePrintDownloadInput)
+
+BluePrintRemoveInput = _reflection.GeneratedProtocolMessageType('BluePrintRemoveInput', (_message.Message,), {
+ 'DESCRIPTOR' : _BLUEPRINTREMOVEINPUT,
+ '__module__' : 'BluePrintManagement_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintRemoveInput)
+})
+_sym_db.RegisterMessage(BluePrintRemoveInput)
+
+BluePrintBootstrapInput = _reflection.GeneratedProtocolMessageType('BluePrintBootstrapInput', (_message.Message,), {
+ 'DESCRIPTOR' : _BLUEPRINTBOOTSTRAPINPUT,
+ '__module__' : 'BluePrintManagement_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintBootstrapInput)
+})
+_sym_db.RegisterMessage(BluePrintBootstrapInput)
+
+BluePrintManagementOutput = _reflection.GeneratedProtocolMessageType('BluePrintManagementOutput', (_message.Message,), {
+ 'DESCRIPTOR' : _BLUEPRINTMANAGEMENTOUTPUT,
+ '__module__' : 'BluePrintManagement_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementOutput)
+})
+_sym_db.RegisterMessage(BluePrintManagementOutput)
+
+FileChunk = _reflection.GeneratedProtocolMessageType('FileChunk', (_message.Message,), {
+ 'DESCRIPTOR' : _FILECHUNK,
+ '__module__' : 'BluePrintManagement_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk)
+})
+_sym_db.RegisterMessage(FileChunk)
+
+
+DESCRIPTOR._options = None
+
+_BLUEPRINTMANAGEMENTSERVICE = _descriptor.ServiceDescriptor(
+ name='BluePrintManagementService',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService',
+ file=DESCRIPTOR,
+ index=0,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ serialized_start=1685,
+ serialized_end=2447,
+ methods=[
+ _descriptor.MethodDescriptor(
+ name='downloadBlueprint',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService.downloadBlueprint',
+ index=0,
+ containing_service=None,
+ input_type=_BLUEPRINTDOWNLOADINPUT,
+ output_type=_BLUEPRINTMANAGEMENTOUTPUT,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='uploadBlueprint',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService.uploadBlueprint',
+ index=1,
+ containing_service=None,
+ input_type=_BLUEPRINTUPLOADINPUT,
+ output_type=_BLUEPRINTMANAGEMENTOUTPUT,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='removeBlueprint',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService.removeBlueprint',
+ index=2,
+ containing_service=None,
+ input_type=_BLUEPRINTREMOVEINPUT,
+ output_type=_BLUEPRINTMANAGEMENTOUTPUT,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='bootstrapBlueprint',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService.bootstrapBlueprint',
+ index=3,
+ containing_service=None,
+ input_type=_BLUEPRINTBOOTSTRAPINPUT,
+ output_type=_BLUEPRINTMANAGEMENTOUTPUT,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ ])
+_sym_db.RegisterServiceDescriptor(_BLUEPRINTMANAGEMENTSERVICE)
+
+DESCRIPTOR.services_by_name['BluePrintManagementService'] = _BLUEPRINTMANAGEMENTSERVICE
+
+# @@protoc_insertion_point(module_scope)
diff --git a/py-modules/common/proto/BluePrintManagement_pb2_grpc.py b/py-modules/common/proto/BluePrintManagement_pb2_grpc.py
new file mode 100644
index 0000000..0e92c7e
--- /dev/null
+++ b/py-modules/common/proto/BluePrintManagement_pb2_grpc.py
@@ -0,0 +1,165 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+
+import proto.BluePrintManagement_pb2 as BluePrintManagement__pb2
+
+
+class BluePrintManagementServiceStub(object):
+ """Missing associated documentation comment in .proto file."""
+
+ def __init__(self, channel):
+ """Constructor.
+
+ Args:
+ channel: A grpc.Channel.
+ """
+ self.downloadBlueprint = channel.unary_unary(
+ '/org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService/downloadBlueprint',
+ request_serializer=BluePrintManagement__pb2.BluePrintDownloadInput.SerializeToString,
+ response_deserializer=BluePrintManagement__pb2.BluePrintManagementOutput.FromString,
+ )
+ self.uploadBlueprint = channel.unary_unary(
+ '/org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService/uploadBlueprint',
+ request_serializer=BluePrintManagement__pb2.BluePrintUploadInput.SerializeToString,
+ response_deserializer=BluePrintManagement__pb2.BluePrintManagementOutput.FromString,
+ )
+ self.removeBlueprint = channel.unary_unary(
+ '/org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService/removeBlueprint',
+ request_serializer=BluePrintManagement__pb2.BluePrintRemoveInput.SerializeToString,
+ response_deserializer=BluePrintManagement__pb2.BluePrintManagementOutput.FromString,
+ )
+ self.bootstrapBlueprint = channel.unary_unary(
+ '/org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService/bootstrapBlueprint',
+ request_serializer=BluePrintManagement__pb2.BluePrintBootstrapInput.SerializeToString,
+ response_deserializer=BluePrintManagement__pb2.BluePrintManagementOutput.FromString,
+ )
+
+
+class BluePrintManagementServiceServicer(object):
+ """Missing associated documentation comment in .proto file."""
+
+ def downloadBlueprint(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def uploadBlueprint(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def removeBlueprint(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def bootstrapBlueprint(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+
+def add_BluePrintManagementServiceServicer_to_server(servicer, server):
+ rpc_method_handlers = {
+ 'downloadBlueprint': grpc.unary_unary_rpc_method_handler(
+ servicer.downloadBlueprint,
+ request_deserializer=BluePrintManagement__pb2.BluePrintDownloadInput.FromString,
+ response_serializer=BluePrintManagement__pb2.BluePrintManagementOutput.SerializeToString,
+ ),
+ 'uploadBlueprint': grpc.unary_unary_rpc_method_handler(
+ servicer.uploadBlueprint,
+ request_deserializer=BluePrintManagement__pb2.BluePrintUploadInput.FromString,
+ response_serializer=BluePrintManagement__pb2.BluePrintManagementOutput.SerializeToString,
+ ),
+ 'removeBlueprint': grpc.unary_unary_rpc_method_handler(
+ servicer.removeBlueprint,
+ request_deserializer=BluePrintManagement__pb2.BluePrintRemoveInput.FromString,
+ response_serializer=BluePrintManagement__pb2.BluePrintManagementOutput.SerializeToString,
+ ),
+ 'bootstrapBlueprint': grpc.unary_unary_rpc_method_handler(
+ servicer.bootstrapBlueprint,
+ request_deserializer=BluePrintManagement__pb2.BluePrintBootstrapInput.FromString,
+ response_serializer=BluePrintManagement__pb2.BluePrintManagementOutput.SerializeToString,
+ ),
+ }
+ generic_handler = grpc.method_handlers_generic_handler(
+ 'org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService', rpc_method_handlers)
+ server.add_generic_rpc_handlers((generic_handler,))
+
+
+# This class is part of an EXPERIMENTAL API.
+class BluePrintManagementService(object):
+ """Missing associated documentation comment in .proto file."""
+
+ @staticmethod
+ def downloadBlueprint(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(request, target, '/org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService/downloadBlueprint',
+ BluePrintManagement__pb2.BluePrintDownloadInput.SerializeToString,
+ BluePrintManagement__pb2.BluePrintManagementOutput.FromString,
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
+
+ @staticmethod
+ def uploadBlueprint(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(request, target, '/org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService/uploadBlueprint',
+ BluePrintManagement__pb2.BluePrintUploadInput.SerializeToString,
+ BluePrintManagement__pb2.BluePrintManagementOutput.FromString,
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
+
+ @staticmethod
+ def removeBlueprint(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(request, target, '/org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService/removeBlueprint',
+ BluePrintManagement__pb2.BluePrintRemoveInput.SerializeToString,
+ BluePrintManagement__pb2.BluePrintManagementOutput.FromString,
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
+
+ @staticmethod
+ def bootstrapBlueprint(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(request, target, '/org.onap.ccsdk.cds.controllerblueprints.management.api.BluePrintManagementService/bootstrapBlueprint',
+ BluePrintManagement__pb2.BluePrintBootstrapInput.SerializeToString,
+ BluePrintManagement__pb2.BluePrintManagementOutput.FromString,
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
diff --git a/py-modules/common/proto/BluePrintProcessing_pb2.py b/py-modules/common/proto/BluePrintProcessing_pb2.py
new file mode 100644
index 0000000..06f8081
--- /dev/null
+++ b/py-modules/common/proto/BluePrintProcessing_pb2.py
@@ -0,0 +1,182 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: BluePrintProcessing.proto
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
+import proto.BluePrintCommon_pb2 as BluePrintCommon__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+ name='BluePrintProcessing.proto',
+ package='org.onap.ccsdk.cds.controllerblueprints.processing.api',
+ syntax='proto3',
+ serialized_options=b'P\001',
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\n\x19\x42luePrintProcessing.proto\x12\x36org.onap.ccsdk.cds.controllerblueprints.processing.api\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15\x42luePrintCommon.proto\"\xfb\x01\n\x15\x45xecutionServiceInput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12`\n\x11\x61\x63tionIdentifiers\x18\x02 \x01(\x0b\x32\x45.org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers\x12(\n\x07payload\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xc8\x02\n\x16\x45xecutionServiceOutput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12`\n\x11\x61\x63tionIdentifiers\x18\x02 \x01(\x0b\x32\x45.org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers\x12J\n\x06status\x18\x03 \x01(\x0b\x32:.org.onap.ccsdk.cds.controllerblueprints.common.api.Status\x12(\n\x07payload\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct2\xcb\x01\n\x1a\x42luePrintProcessingService\x12\xac\x01\n\x07process\x12M.org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput\x1aN.org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput(\x01\x30\x01\x42\x02P\x01\x62\x06proto3'
+ ,
+ dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,BluePrintCommon__pb2.DESCRIPTOR,])
+
+
+
+
+_EXECUTIONSERVICEINPUT = _descriptor.Descriptor(
+ name='ExecutionServiceInput',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput.commonHeader', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='actionIdentifiers', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput.actionIdentifiers', index=1,
+ number=2, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='payload', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput.payload', index=2,
+ number=3, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=139,
+ serialized_end=390,
+)
+
+
+_EXECUTIONSERVICEOUTPUT = _descriptor.Descriptor(
+ name='ExecutionServiceOutput',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput.commonHeader', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='actionIdentifiers', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput.actionIdentifiers', index=1,
+ number=2, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='status', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput.status', index=2,
+ number=3, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='payload', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput.payload', index=3,
+ number=4, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=393,
+ serialized_end=721,
+)
+
+_EXECUTIONSERVICEINPUT.fields_by_name['commonHeader'].message_type = BluePrintCommon__pb2._COMMONHEADER
+_EXECUTIONSERVICEINPUT.fields_by_name['actionIdentifiers'].message_type = BluePrintCommon__pb2._ACTIONIDENTIFIERS
+_EXECUTIONSERVICEINPUT.fields_by_name['payload'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
+_EXECUTIONSERVICEOUTPUT.fields_by_name['commonHeader'].message_type = BluePrintCommon__pb2._COMMONHEADER
+_EXECUTIONSERVICEOUTPUT.fields_by_name['actionIdentifiers'].message_type = BluePrintCommon__pb2._ACTIONIDENTIFIERS
+_EXECUTIONSERVICEOUTPUT.fields_by_name['status'].message_type = BluePrintCommon__pb2._STATUS
+_EXECUTIONSERVICEOUTPUT.fields_by_name['payload'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
+DESCRIPTOR.message_types_by_name['ExecutionServiceInput'] = _EXECUTIONSERVICEINPUT
+DESCRIPTOR.message_types_by_name['ExecutionServiceOutput'] = _EXECUTIONSERVICEOUTPUT
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+ExecutionServiceInput = _reflection.GeneratedProtocolMessageType('ExecutionServiceInput', (_message.Message,), {
+ 'DESCRIPTOR' : _EXECUTIONSERVICEINPUT,
+ '__module__' : 'BluePrintProcessing_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput)
+})
+_sym_db.RegisterMessage(ExecutionServiceInput)
+
+ExecutionServiceOutput = _reflection.GeneratedProtocolMessageType('ExecutionServiceOutput', (_message.Message,), {
+ 'DESCRIPTOR' : _EXECUTIONSERVICEOUTPUT,
+ '__module__' : 'BluePrintProcessing_pb2'
+ # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput)
+})
+_sym_db.RegisterMessage(ExecutionServiceOutput)
+
+
+DESCRIPTOR._options = None
+
+_BLUEPRINTPROCESSINGSERVICE = _descriptor.ServiceDescriptor(
+ name='BluePrintProcessingService',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingService',
+ file=DESCRIPTOR,
+ index=0,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ serialized_start=724,
+ serialized_end=927,
+ methods=[
+ _descriptor.MethodDescriptor(
+ name='process',
+ full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingService.process',
+ index=0,
+ containing_service=None,
+ input_type=_EXECUTIONSERVICEINPUT,
+ output_type=_EXECUTIONSERVICEOUTPUT,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ ])
+_sym_db.RegisterServiceDescriptor(_BLUEPRINTPROCESSINGSERVICE)
+
+DESCRIPTOR.services_by_name['BluePrintProcessingService'] = _BLUEPRINTPROCESSINGSERVICE
+
+# @@protoc_insertion_point(module_scope)
diff --git a/py-modules/common/proto/BluePrintProcessing_pb2_grpc.py b/py-modules/common/proto/BluePrintProcessing_pb2_grpc.py
new file mode 100644
index 0000000..cb40ae2
--- /dev/null
+++ b/py-modules/common/proto/BluePrintProcessing_pb2_grpc.py
@@ -0,0 +1,66 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+
+import proto.BluePrintProcessing_pb2 as BluePrintProcessing__pb2
+
+
+class BluePrintProcessingServiceStub(object):
+ """Missing associated documentation comment in .proto file."""
+
+ def __init__(self, channel):
+ """Constructor.
+
+ Args:
+ channel: A grpc.Channel.
+ """
+ self.process = channel.stream_stream(
+ '/org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingService/process',
+ request_serializer=BluePrintProcessing__pb2.ExecutionServiceInput.SerializeToString,
+ response_deserializer=BluePrintProcessing__pb2.ExecutionServiceOutput.FromString,
+ )
+
+
+class BluePrintProcessingServiceServicer(object):
+ """Missing associated documentation comment in .proto file."""
+
+ def process(self, request_iterator, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+
+def add_BluePrintProcessingServiceServicer_to_server(servicer, server):
+ rpc_method_handlers = {
+ 'process': grpc.stream_stream_rpc_method_handler(
+ servicer.process,
+ request_deserializer=BluePrintProcessing__pb2.ExecutionServiceInput.FromString,
+ response_serializer=BluePrintProcessing__pb2.ExecutionServiceOutput.SerializeToString,
+ ),
+ }
+ generic_handler = grpc.method_handlers_generic_handler(
+ 'org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingService', rpc_method_handlers)
+ server.add_generic_rpc_handlers((generic_handler,))
+
+
+# This class is part of an EXPERIMENTAL API.
+class BluePrintProcessingService(object):
+ """Missing associated documentation comment in .proto file."""
+
+ @staticmethod
+ def process(request_iterator,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.stream_stream(request_iterator, target, '/org.onap.ccsdk.cds.controllerblueprints.processing.api.BluePrintProcessingService/process',
+ BluePrintProcessing__pb2.ExecutionServiceInput.SerializeToString,
+ BluePrintProcessing__pb2.ExecutionServiceOutput.FromString,
+ options, channel_credentials,
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
diff --git a/py-modules/common/proto/BlueprintCommon_pb2.py b/py-modules/common/proto/BlueprintCommon_pb2.py
deleted file mode 100644
index c3eddf8..0000000
--- a/py-modules/common/proto/BlueprintCommon_pb2.py
+++ /dev/null
@@ -1,316 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: BlueprintCommon.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf.internal import enum_type_wrapper
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='BlueprintCommon.proto',
- package='org.onap.ccsdk.cds.controllerblueprints.common.api',
- syntax='proto3',
- serialized_options=_b('P\001'),
- serialized_pb=_b('\n\x15\x42lueprintCommon.proto\x12\x32org.onap.ccsdk.cds.controllerblueprints.common.api\"\xa8\x01\n\x0c\x43ommonHeader\x12\x11\n\ttimestamp\x18\x01 \x01(\t\x12\x14\n\x0coriginatorId\x18\x17 \x01(\t\x12\x11\n\trequestId\x18\x03 \x01(\t\x12\x14\n\x0csubRequestId\x18\x04 \x01(\t\x12\x46\n\x04\x66lag\x18\x05 \x01(\x0b\x32\x38.org.onap.ccsdk.cds.controllerblueprints.common.api.Flag\"$\n\x04\x46lag\x12\x0f\n\x07isForce\x18\x01 \x01(\x08\x12\x0b\n\x03ttl\x18\x02 \x01(\x05\"f\n\x11\x41\x63tionIdentifiers\x12\x15\n\rblueprintName\x18\x01 \x01(\t\x12\x18\n\x10\x62lueprintVersion\x18\x02 \x01(\t\x12\x12\n\nactionName\x18\x03 \x01(\t\x12\x0c\n\x04mode\x18\x04 \x01(\t\"\xa2\x01\n\x06Status\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x14\n\x0c\x65rrorMessage\x18\x02 \x01(\t\x12\x0f\n\x07message\x18\x03 \x01(\t\x12P\n\teventType\x18\x04 \x01(\x0e\x32=.org.onap.ccsdk.cds.controllerblueprints.common.api.EventType\x12\x11\n\ttimestamp\x18\x05 \x01(\t*\xa3\x01\n\tEventType\x12\x1b\n\x17\x45VENT_COMPONENT_FAILURE\x10\x00\x12\x1e\n\x1a\x45VENT_COMPONENT_PROCESSING\x10\x01\x12 \n\x1c\x45VENT_COMPONENT_NOTIFICATION\x10\x02\x12\x1c\n\x18\x45VENT_COMPONENT_EXECUTED\x10\x03\x12\x19\n\x15\x45VENT_COMPONENT_TRACE\x10\x04\x42\x02P\x01\x62\x06proto3')
-)
-
-_EVENTTYPE = _descriptor.EnumDescriptor(
- name='EventType',
- full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.EventType',
- filename=None,
- file=DESCRIPTOR,
- values=[
- _descriptor.EnumValueDescriptor(
- name='EVENT_COMPONENT_FAILURE', index=0, number=0,
- serialized_options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='EVENT_COMPONENT_PROCESSING', index=1, number=1,
- serialized_options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='EVENT_COMPONENT_NOTIFICATION', index=2, number=2,
- serialized_options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='EVENT_COMPONENT_EXECUTED', index=3, number=3,
- serialized_options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='EVENT_COMPONENT_TRACE', index=4, number=4,
- serialized_options=None,
- type=None),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=556,
- serialized_end=719,
-)
-_sym_db.RegisterEnumDescriptor(_EVENTTYPE)
-
-EventType = enum_type_wrapper.EnumTypeWrapper(_EVENTTYPE)
-EVENT_COMPONENT_FAILURE = 0
-EVENT_COMPONENT_PROCESSING = 1
-EVENT_COMPONENT_NOTIFICATION = 2
-EVENT_COMPONENT_EXECUTED = 3
-EVENT_COMPONENT_TRACE = 4
-
-
-
-_COMMONHEADER = _descriptor.Descriptor(
- name='CommonHeader',
- full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='timestamp', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader.timestamp', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='originatorId', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader.originatorId', index=1,
- number=23, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='requestId', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader.requestId', index=2,
- number=3, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='subRequestId', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader.subRequestId', index=3,
- number=4, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='flag', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader.flag', index=4,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=78,
- serialized_end=246,
-)
-
-
-_FLAG = _descriptor.Descriptor(
- name='Flag',
- full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Flag',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='isForce', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Flag.isForce', index=0,
- number=1, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='ttl', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Flag.ttl', index=1,
- number=2, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=248,
- serialized_end=284,
-)
-
-
-_ACTIONIDENTIFIERS = _descriptor.Descriptor(
- name='ActionIdentifiers',
- full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='blueprintName', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers.blueprintName', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='blueprintVersion', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers.blueprintVersion', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='actionName', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers.actionName', index=2,
- number=3, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='mode', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers.mode', index=3,
- number=4, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=286,
- serialized_end=388,
-)
-
-
-_STATUS = _descriptor.Descriptor(
- name='Status',
- full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='code', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status.code', index=0,
- number=1, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='errorMessage', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status.errorMessage', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='message', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status.message', index=2,
- number=3, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='eventType', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status.eventType', index=3,
- number=4, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='timestamp', full_name='org.onap.ccsdk.cds.controllerblueprints.common.api.Status.timestamp', index=4,
- number=5, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=_b("").decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=391,
- serialized_end=553,
-)
-
-_COMMONHEADER.fields_by_name['flag'].message_type = _FLAG
-_STATUS.fields_by_name['eventType'].enum_type = _EVENTTYPE
-DESCRIPTOR.message_types_by_name['CommonHeader'] = _COMMONHEADER
-DESCRIPTOR.message_types_by_name['Flag'] = _FLAG
-DESCRIPTOR.message_types_by_name['ActionIdentifiers'] = _ACTIONIDENTIFIERS
-DESCRIPTOR.message_types_by_name['Status'] = _STATUS
-DESCRIPTOR.enum_types_by_name['EventType'] = _EVENTTYPE
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-CommonHeader = _reflection.GeneratedProtocolMessageType('CommonHeader', (_message.Message,), dict(
- DESCRIPTOR = _COMMONHEADER,
- __module__ = 'BlueprintCommon_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader)
- ))
-_sym_db.RegisterMessage(CommonHeader)
-
-Flag = _reflection.GeneratedProtocolMessageType('Flag', (_message.Message,), dict(
- DESCRIPTOR = _FLAG,
- __module__ = 'BlueprintCommon_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.common.api.Flag)
- ))
-_sym_db.RegisterMessage(Flag)
-
-ActionIdentifiers = _reflection.GeneratedProtocolMessageType('ActionIdentifiers', (_message.Message,), dict(
- DESCRIPTOR = _ACTIONIDENTIFIERS,
- __module__ = 'BlueprintCommon_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers)
- ))
-_sym_db.RegisterMessage(ActionIdentifiers)
-
-Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), dict(
- DESCRIPTOR = _STATUS,
- __module__ = 'BlueprintCommon_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.common.api.Status)
- ))
-_sym_db.RegisterMessage(Status)
-
-
-DESCRIPTOR._options = None
-# @@protoc_insertion_point(module_scope)
diff --git a/py-modules/common/proto/BlueprintManagement_pb2.py b/py-modules/common/proto/BlueprintManagement_pb2.py
deleted file mode 100644
index 183d8dd..0000000
--- a/py-modules/common/proto/BlueprintManagement_pb2.py
+++ /dev/null
@@ -1,515 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: BlueprintManagement.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf.internal import enum_type_wrapper
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
-import proto.BlueprintCommon_pb2 as BlueprintCommon__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='BlueprintManagement.proto',
- package='org.onap.ccsdk.cds.controllerblueprints.management.api',
- syntax='proto3',
- serialized_options=_b('P\001'),
- serialized_pb=_b('\n\x19\x42lueprintManagement.proto\x12\x36org.onap.ccsdk.cds.controllerblueprints.management.api\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15\x42lueprintCommon.proto\"\xd3\x02\n\x14\x42lueprintUploadInput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12T\n\tfileChunk\x18\x02 \x01(\x0b\x32\x41.org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk\x12`\n\x11\x61\x63tionIdentifiers\x18\x03 \x01(\x0b\x32\x45.org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers\x12+\n\nproperties\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xff\x01\n\x16\x42lueprintDownloadInput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12`\n\x11\x61\x63tionIdentifiers\x18\x02 \x01(\x0b\x32\x45.org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xfd\x01\n\x14\x42lueprintRemoveInput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12`\n\x11\x61\x63tionIdentifiers\x18\x02 \x01(\x0b\x32\x45.org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers\x12+\n\nproperties\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xb9\x01\n\x17\x42lueprintBootstrapInput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12\x0f\n\x07loadCBA\x18\x02 \x01(\x08\x12\x15\n\rloadModelType\x18\x03 \x01(\x08\x12\x1e\n\x16loadResourceDictionary\x18\x04 \x01(\x08\"\xc2\x02\n\x19\x42lueprintManagementOutput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12T\n\tfileChunk\x18\x02 \x01(\x0b\x32\x41.org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk\x12J\n\x06status\x18\x03 \x01(\x0b\x32:.org.onap.ccsdk.cds.controllerblueprints.common.api.Status\x12+\n\nproperties\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\"\x1a\n\tFileChunk\x12\r\n\x05\x63hunk\x18\x01 \x01(\x0c*4\n\x0e\x44ownloadAction\x12\n\n\x06SEARCH\x10\x00\x12\x0b\n\x07STARTER\x10\x01\x12\t\n\x05\x43LONE\x10\x02*@\n\x0cUploadAction\x12\t\n\x05\x44RAFT\x10\x00\x12\n\n\x06\x45NRICH\x10\x01\x12\x0c\n\x08VALIDATE\x10\x02\x12\x0b\n\x07PUBLISH\x10\x03*\x1b\n\x0cRemoveAction\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x32\xfa\x05\n\x1a\x42lueprintManagementService\x12\xb6\x01\n\x11\x64ownloadBlueprint\x12N.org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput\x1aQ.org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput\x12\xb2\x01\n\x0fuploadBlueprint\x12L.org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput\x1aQ.org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput\x12\xb2\x01\n\x0fremoveBlueprint\x12L.org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput\x1aQ.org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput\x12\xb8\x01\n\x12\x62ootstrapBlueprint\x12O.org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput\x1aQ.org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutputB\x02P\x01\x62\x06proto3')
- ,
- dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,BlueprintCommon__pb2.DESCRIPTOR,])
-
-_DOWNLOADACTION = _descriptor.EnumDescriptor(
- name='DownloadAction',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.DownloadAction',
- filename=None,
- file=DESCRIPTOR,
- values=[
- _descriptor.EnumValueDescriptor(
- name='SEARCH', index=0, number=0,
- serialized_options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='STARTER', index=1, number=1,
- serialized_options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='CLONE', index=2, number=2,
- serialized_options=None,
- type=None),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1535,
- serialized_end=1587,
-)
-_sym_db.RegisterEnumDescriptor(_DOWNLOADACTION)
-
-DownloadAction = enum_type_wrapper.EnumTypeWrapper(_DOWNLOADACTION)
-_UPLOADACTION = _descriptor.EnumDescriptor(
- name='UploadAction',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.UploadAction',
- filename=None,
- file=DESCRIPTOR,
- values=[
- _descriptor.EnumValueDescriptor(
- name='DRAFT', index=0, number=0,
- serialized_options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='ENRICH', index=1, number=1,
- serialized_options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='VALIDATE', index=2, number=2,
- serialized_options=None,
- type=None),
- _descriptor.EnumValueDescriptor(
- name='PUBLISH', index=3, number=3,
- serialized_options=None,
- type=None),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1589,
- serialized_end=1653,
-)
-_sym_db.RegisterEnumDescriptor(_UPLOADACTION)
-
-UploadAction = enum_type_wrapper.EnumTypeWrapper(_UPLOADACTION)
-_REMOVEACTION = _descriptor.EnumDescriptor(
- name='RemoveAction',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.RemoveAction',
- filename=None,
- file=DESCRIPTOR,
- values=[
- _descriptor.EnumValueDescriptor(
- name='DEFAULT', index=0, number=0,
- serialized_options=None,
- type=None),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1655,
- serialized_end=1682,
-)
-_sym_db.RegisterEnumDescriptor(_REMOVEACTION)
-
-RemoveAction = enum_type_wrapper.EnumTypeWrapper(_REMOVEACTION)
-SEARCH = 0
-STARTER = 1
-CLONE = 2
-DRAFT = 0
-ENRICH = 1
-VALIDATE = 2
-PUBLISH = 3
-DEFAULT = 0
-
-
-
-_BLUEPRINTUPLOADINPUT = _descriptor.Descriptor(
- name='BlueprintUploadInput',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput.commonHeader', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='fileChunk', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput.fileChunk', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='actionIdentifiers', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput.actionIdentifiers', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='properties', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput.properties', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=139,
- serialized_end=478,
-)
-
-
-_BLUEPRINTDOWNLOADINPUT = _descriptor.Descriptor(
- name='BlueprintDownloadInput',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput.commonHeader', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='actionIdentifiers', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput.actionIdentifiers', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='properties', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput.properties', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=481,
- serialized_end=736,
-)
-
-
-_BLUEPRINTREMOVEINPUT = _descriptor.Descriptor(
- name='BlueprintRemoveInput',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput.commonHeader', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='actionIdentifiers', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput.actionIdentifiers', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='properties', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput.properties', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=739,
- serialized_end=992,
-)
-
-
-_BLUEPRINTBOOTSTRAPINPUT = _descriptor.Descriptor(
- name='BlueprintBootstrapInput',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput.commonHeader', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='loadCBA', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput.loadCBA', index=1,
- number=2, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='loadModelType', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput.loadModelType', index=2,
- number=3, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='loadResourceDictionary', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput.loadResourceDictionary', index=3,
- number=4, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=995,
- serialized_end=1180,
-)
-
-
-_BLUEPRINTMANAGEMENTOUTPUT = _descriptor.Descriptor(
- name='BlueprintManagementOutput',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput.commonHeader', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='fileChunk', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput.fileChunk', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='status', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput.status', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='properties', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput.properties', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1183,
- serialized_end=1505,
-)
-
-
-_FILECHUNK = _descriptor.Descriptor(
- name='FileChunk',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='chunk', full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk.chunk', index=0,
- number=1, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=_b(""),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1507,
- serialized_end=1533,
-)
-
-_BLUEPRINTUPLOADINPUT.fields_by_name['commonHeader'].message_type = BlueprintCommon__pb2._COMMONHEADER
-_BLUEPRINTUPLOADINPUT.fields_by_name['fileChunk'].message_type = _FILECHUNK
-_BLUEPRINTUPLOADINPUT.fields_by_name['actionIdentifiers'].message_type = BlueprintCommon__pb2._ACTIONIDENTIFIERS
-_BLUEPRINTUPLOADINPUT.fields_by_name['properties'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
-_BLUEPRINTDOWNLOADINPUT.fields_by_name['commonHeader'].message_type = BlueprintCommon__pb2._COMMONHEADER
-_BLUEPRINTDOWNLOADINPUT.fields_by_name['actionIdentifiers'].message_type = BlueprintCommon__pb2._ACTIONIDENTIFIERS
-_BLUEPRINTDOWNLOADINPUT.fields_by_name['properties'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
-_BLUEPRINTREMOVEINPUT.fields_by_name['commonHeader'].message_type = BlueprintCommon__pb2._COMMONHEADER
-_BLUEPRINTREMOVEINPUT.fields_by_name['actionIdentifiers'].message_type = BlueprintCommon__pb2._ACTIONIDENTIFIERS
-_BLUEPRINTREMOVEINPUT.fields_by_name['properties'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
-_BLUEPRINTBOOTSTRAPINPUT.fields_by_name['commonHeader'].message_type = BlueprintCommon__pb2._COMMONHEADER
-_BLUEPRINTMANAGEMENTOUTPUT.fields_by_name['commonHeader'].message_type = BlueprintCommon__pb2._COMMONHEADER
-_BLUEPRINTMANAGEMENTOUTPUT.fields_by_name['fileChunk'].message_type = _FILECHUNK
-_BLUEPRINTMANAGEMENTOUTPUT.fields_by_name['status'].message_type = BlueprintCommon__pb2._STATUS
-_BLUEPRINTMANAGEMENTOUTPUT.fields_by_name['properties'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
-DESCRIPTOR.message_types_by_name['BlueprintUploadInput'] = _BLUEPRINTUPLOADINPUT
-DESCRIPTOR.message_types_by_name['BlueprintDownloadInput'] = _BLUEPRINTDOWNLOADINPUT
-DESCRIPTOR.message_types_by_name['BlueprintRemoveInput'] = _BLUEPRINTREMOVEINPUT
-DESCRIPTOR.message_types_by_name['BlueprintBootstrapInput'] = _BLUEPRINTBOOTSTRAPINPUT
-DESCRIPTOR.message_types_by_name['BlueprintManagementOutput'] = _BLUEPRINTMANAGEMENTOUTPUT
-DESCRIPTOR.message_types_by_name['FileChunk'] = _FILECHUNK
-DESCRIPTOR.enum_types_by_name['DownloadAction'] = _DOWNLOADACTION
-DESCRIPTOR.enum_types_by_name['UploadAction'] = _UPLOADACTION
-DESCRIPTOR.enum_types_by_name['RemoveAction'] = _REMOVEACTION
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-BlueprintUploadInput = _reflection.GeneratedProtocolMessageType('BlueprintUploadInput', (_message.Message,), dict(
- DESCRIPTOR = _BLUEPRINTUPLOADINPUT,
- __module__ = 'BlueprintManagement_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintUploadInput)
- ))
-_sym_db.RegisterMessage(BlueprintUploadInput)
-
-BlueprintDownloadInput = _reflection.GeneratedProtocolMessageType('BlueprintDownloadInput', (_message.Message,), dict(
- DESCRIPTOR = _BLUEPRINTDOWNLOADINPUT,
- __module__ = 'BlueprintManagement_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintDownloadInput)
- ))
-_sym_db.RegisterMessage(BlueprintDownloadInput)
-
-BlueprintRemoveInput = _reflection.GeneratedProtocolMessageType('BlueprintRemoveInput', (_message.Message,), dict(
- DESCRIPTOR = _BLUEPRINTREMOVEINPUT,
- __module__ = 'BlueprintManagement_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintRemoveInput)
- ))
-_sym_db.RegisterMessage(BlueprintRemoveInput)
-
-BlueprintBootstrapInput = _reflection.GeneratedProtocolMessageType('BlueprintBootstrapInput', (_message.Message,), dict(
- DESCRIPTOR = _BLUEPRINTBOOTSTRAPINPUT,
- __module__ = 'BlueprintManagement_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintBootstrapInput)
- ))
-_sym_db.RegisterMessage(BlueprintBootstrapInput)
-
-BlueprintManagementOutput = _reflection.GeneratedProtocolMessageType('BlueprintManagementOutput', (_message.Message,), dict(
- DESCRIPTOR = _BLUEPRINTMANAGEMENTOUTPUT,
- __module__ = 'BlueprintManagement_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementOutput)
- ))
-_sym_db.RegisterMessage(BlueprintManagementOutput)
-
-FileChunk = _reflection.GeneratedProtocolMessageType('FileChunk', (_message.Message,), dict(
- DESCRIPTOR = _FILECHUNK,
- __module__ = 'BlueprintManagement_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.management.api.FileChunk)
- ))
-_sym_db.RegisterMessage(FileChunk)
-
-
-DESCRIPTOR._options = None
-
-_BLUEPRINTMANAGEMENTSERVICE = _descriptor.ServiceDescriptor(
- name='BlueprintManagementService',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService',
- file=DESCRIPTOR,
- index=0,
- serialized_options=None,
- serialized_start=1685,
- serialized_end=2447,
- methods=[
- _descriptor.MethodDescriptor(
- name='downloadBlueprint',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService.downloadBlueprint',
- index=0,
- containing_service=None,
- input_type=_BLUEPRINTDOWNLOADINPUT,
- output_type=_BLUEPRINTMANAGEMENTOUTPUT,
- serialized_options=None,
- ),
- _descriptor.MethodDescriptor(
- name='uploadBlueprint',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService.uploadBlueprint',
- index=1,
- containing_service=None,
- input_type=_BLUEPRINTUPLOADINPUT,
- output_type=_BLUEPRINTMANAGEMENTOUTPUT,
- serialized_options=None,
- ),
- _descriptor.MethodDescriptor(
- name='removeBlueprint',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService.removeBlueprint',
- index=2,
- containing_service=None,
- input_type=_BLUEPRINTREMOVEINPUT,
- output_type=_BLUEPRINTMANAGEMENTOUTPUT,
- serialized_options=None,
- ),
- _descriptor.MethodDescriptor(
- name='bootstrapBlueprint',
- full_name='org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService.bootstrapBlueprint',
- index=3,
- containing_service=None,
- input_type=_BLUEPRINTBOOTSTRAPINPUT,
- output_type=_BLUEPRINTMANAGEMENTOUTPUT,
- serialized_options=None,
- ),
-])
-_sym_db.RegisterServiceDescriptor(_BLUEPRINTMANAGEMENTSERVICE)
-
-DESCRIPTOR.services_by_name['BlueprintManagementService'] = _BLUEPRINTMANAGEMENTSERVICE
-
-# @@protoc_insertion_point(module_scope)
diff --git a/py-modules/common/proto/BlueprintManagement_pb2_grpc.py b/py-modules/common/proto/BlueprintManagement_pb2_grpc.py
deleted file mode 100644
index 09db2d1..0000000
--- a/py-modules/common/proto/BlueprintManagement_pb2_grpc.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-import grpc
-
-import proto.BlueprintManagement_pb2 as BlueprintManagement__pb2
-
-
-class BlueprintManagementServiceStub(object):
- # missing associated documentation comment in .proto file
- pass
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.downloadBlueprint = channel.unary_unary(
- '/org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService/downloadBlueprint',
- request_serializer=BlueprintManagement__pb2.BlueprintDownloadInput.SerializeToString,
- response_deserializer=BlueprintManagement__pb2.BlueprintManagementOutput.FromString,
- )
- self.uploadBlueprint = channel.unary_unary(
- '/org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService/uploadBlueprint',
- request_serializer=BlueprintManagement__pb2.BlueprintUploadInput.SerializeToString,
- response_deserializer=BlueprintManagement__pb2.BlueprintManagementOutput.FromString,
- )
- self.removeBlueprint = channel.unary_unary(
- '/org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService/removeBlueprint',
- request_serializer=BlueprintManagement__pb2.BlueprintRemoveInput.SerializeToString,
- response_deserializer=BlueprintManagement__pb2.BlueprintManagementOutput.FromString,
- )
- self.bootstrapBlueprint = channel.unary_unary(
- '/org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService/bootstrapBlueprint',
- request_serializer=BlueprintManagement__pb2.BlueprintBootstrapInput.SerializeToString,
- response_deserializer=BlueprintManagement__pb2.BlueprintManagementOutput.FromString,
- )
-
-
-class BlueprintManagementServiceServicer(object):
- # missing associated documentation comment in .proto file
- pass
-
- def downloadBlueprint(self, request, context):
- # missing associated documentation comment in .proto file
- pass
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def uploadBlueprint(self, request, context):
- # missing associated documentation comment in .proto file
- pass
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def removeBlueprint(self, request, context):
- # missing associated documentation comment in .proto file
- pass
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
- def bootstrapBlueprint(self, request, context):
- # missing associated documentation comment in .proto file
- pass
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
-
-def add_BlueprintManagementServiceServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'downloadBlueprint': grpc.unary_unary_rpc_method_handler(
- servicer.downloadBlueprint,
- request_deserializer=BlueprintManagement__pb2.BlueprintDownloadInput.FromString,
- response_serializer=BlueprintManagement__pb2.BlueprintManagementOutput.SerializeToString,
- ),
- 'uploadBlueprint': grpc.unary_unary_rpc_method_handler(
- servicer.uploadBlueprint,
- request_deserializer=BlueprintManagement__pb2.BlueprintUploadInput.FromString,
- response_serializer=BlueprintManagement__pb2.BlueprintManagementOutput.SerializeToString,
- ),
- 'removeBlueprint': grpc.unary_unary_rpc_method_handler(
- servicer.removeBlueprint,
- request_deserializer=BlueprintManagement__pb2.BlueprintRemoveInput.FromString,
- response_serializer=BlueprintManagement__pb2.BlueprintManagementOutput.SerializeToString,
- ),
- 'bootstrapBlueprint': grpc.unary_unary_rpc_method_handler(
- servicer.bootstrapBlueprint,
- request_deserializer=BlueprintManagement__pb2.BlueprintBootstrapInput.FromString,
- response_serializer=BlueprintManagement__pb2.BlueprintManagementOutput.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'org.onap.ccsdk.cds.controllerblueprints.management.api.BlueprintManagementService', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))
diff --git a/py-modules/common/proto/BlueprintProcessing_pb2.py b/py-modules/common/proto/BlueprintProcessing_pb2.py
deleted file mode 100644
index dc5ca4f..0000000
--- a/py-modules/common/proto/BlueprintProcessing_pb2.py
+++ /dev/null
@@ -1,179 +0,0 @@
-# -*- coding: utf-8 -*-
-# Generated by the protocol buffer compiler. DO NOT EDIT!
-# source: BlueprintProcessing.proto
-
-import sys
-_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
-from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
-from google.protobuf import symbol_database as _symbol_database
-# @@protoc_insertion_point(imports)
-
-_sym_db = _symbol_database.Default()
-
-
-from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
-import proto.BlueprintCommon_pb2 as BlueprintCommon__pb2
-
-
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='BlueprintProcessing.proto',
- package='org.onap.ccsdk.cds.controllerblueprints.processing.api',
- syntax='proto3',
- serialized_options=_b('P\001'),
- serialized_pb=_b('\n\x19\x42lueprintProcessing.proto\x12\x36org.onap.ccsdk.cds.controllerblueprints.processing.api\x1a\x1cgoogle/protobuf/struct.proto\x1a\x15\x42lueprintCommon.proto\"\xfb\x01\n\x15\x45xecutionServiceInput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12`\n\x11\x61\x63tionIdentifiers\x18\x02 \x01(\x0b\x32\x45.org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers\x12(\n\x07payload\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xc8\x02\n\x16\x45xecutionServiceOutput\x12V\n\x0c\x63ommonHeader\x18\x01 \x01(\x0b\x32@.org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader\x12`\n\x11\x61\x63tionIdentifiers\x18\x02 \x01(\x0b\x32\x45.org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers\x12J\n\x06status\x18\x03 \x01(\x0b\x32:.org.onap.ccsdk.cds.controllerblueprints.common.api.Status\x12(\n\x07payload\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct2\xcb\x01\n\x1a\x42lueprintProcessingService\x12\xac\x01\n\x07process\x12M.org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput\x1aN.org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput(\x01\x30\x01\x42\x02P\x01\x62\x06proto3')
- ,
- dependencies=[google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,BlueprintCommon__pb2.DESCRIPTOR,])
-
-
-
-
-_EXECUTIONSERVICEINPUT = _descriptor.Descriptor(
- name='ExecutionServiceInput',
- full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput.commonHeader', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='actionIdentifiers', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput.actionIdentifiers', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='payload', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput.payload', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=139,
- serialized_end=390,
-)
-
-
-_EXECUTIONSERVICEOUTPUT = _descriptor.Descriptor(
- name='ExecutionServiceOutput',
- full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- fields=[
- _descriptor.FieldDescriptor(
- name='commonHeader', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput.commonHeader', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='actionIdentifiers', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput.actionIdentifiers', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='status', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput.status', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- _descriptor.FieldDescriptor(
- name='payload', full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput.payload', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=393,
- serialized_end=721,
-)
-
-_EXECUTIONSERVICEINPUT.fields_by_name['commonHeader'].message_type = BlueprintCommon__pb2._COMMONHEADER
-_EXECUTIONSERVICEINPUT.fields_by_name['actionIdentifiers'].message_type = BlueprintCommon__pb2._ACTIONIDENTIFIERS
-_EXECUTIONSERVICEINPUT.fields_by_name['payload'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
-_EXECUTIONSERVICEOUTPUT.fields_by_name['commonHeader'].message_type = BlueprintCommon__pb2._COMMONHEADER
-_EXECUTIONSERVICEOUTPUT.fields_by_name['actionIdentifiers'].message_type = BlueprintCommon__pb2._ACTIONIDENTIFIERS
-_EXECUTIONSERVICEOUTPUT.fields_by_name['status'].message_type = BlueprintCommon__pb2._STATUS
-_EXECUTIONSERVICEOUTPUT.fields_by_name['payload'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT
-DESCRIPTOR.message_types_by_name['ExecutionServiceInput'] = _EXECUTIONSERVICEINPUT
-DESCRIPTOR.message_types_by_name['ExecutionServiceOutput'] = _EXECUTIONSERVICEOUTPUT
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-ExecutionServiceInput = _reflection.GeneratedProtocolMessageType('ExecutionServiceInput', (_message.Message,), dict(
- DESCRIPTOR = _EXECUTIONSERVICEINPUT,
- __module__ = 'BlueprintProcessing_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceInput)
- ))
-_sym_db.RegisterMessage(ExecutionServiceInput)
-
-ExecutionServiceOutput = _reflection.GeneratedProtocolMessageType('ExecutionServiceOutput', (_message.Message,), dict(
- DESCRIPTOR = _EXECUTIONSERVICEOUTPUT,
- __module__ = 'BlueprintProcessing_pb2'
- # @@protoc_insertion_point(class_scope:org.onap.ccsdk.cds.controllerblueprints.processing.api.ExecutionServiceOutput)
- ))
-_sym_db.RegisterMessage(ExecutionServiceOutput)
-
-
-DESCRIPTOR._options = None
-
-_BLUEPRINTPROCESSINGSERVICE = _descriptor.ServiceDescriptor(
- name='BlueprintProcessingService',
- full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingService',
- file=DESCRIPTOR,
- index=0,
- serialized_options=None,
- serialized_start=724,
- serialized_end=927,
- methods=[
- _descriptor.MethodDescriptor(
- name='process',
- full_name='org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingService.process',
- index=0,
- containing_service=None,
- input_type=_EXECUTIONSERVICEINPUT,
- output_type=_EXECUTIONSERVICEOUTPUT,
- serialized_options=None,
- ),
-])
-_sym_db.RegisterServiceDescriptor(_BLUEPRINTPROCESSINGSERVICE)
-
-DESCRIPTOR.services_by_name['BlueprintProcessingService'] = _BLUEPRINTPROCESSINGSERVICE
-
-# @@protoc_insertion_point(module_scope)
diff --git a/py-modules/common/proto/BlueprintProcessing_pb2_grpc.py b/py-modules/common/proto/BlueprintProcessing_pb2_grpc.py
deleted file mode 100644
index f1f14ca..0000000
--- a/py-modules/common/proto/BlueprintProcessing_pb2_grpc.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
-import grpc
-
-import proto.BlueprintProcessing_pb2 as BlueprintProcessing__pb2
-
-
-class BlueprintProcessingServiceStub(object):
- # missing associated documentation comment in .proto file
- pass
-
- def __init__(self, channel):
- """Constructor.
-
- Args:
- channel: A grpc.Channel.
- """
- self.process = channel.stream_stream(
- '/org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingService/process',
- request_serializer=BlueprintProcessing__pb2.ExecutionServiceInput.SerializeToString,
- response_deserializer=BlueprintProcessing__pb2.ExecutionServiceOutput.FromString,
- )
-
-
-class BlueprintProcessingServiceServicer(object):
- # missing associated documentation comment in .proto file
- pass
-
- def process(self, request_iterator, context):
- # missing associated documentation comment in .proto file
- pass
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
- context.set_details('Method not implemented!')
- raise NotImplementedError('Method not implemented!')
-
-
-def add_BlueprintProcessingServiceServicer_to_server(servicer, server):
- rpc_method_handlers = {
- 'process': grpc.stream_stream_rpc_method_handler(
- servicer.process,
- request_deserializer=BlueprintProcessing__pb2.ExecutionServiceInput.FromString,
- response_serializer=BlueprintProcessing__pb2.ExecutionServiceOutput.SerializeToString,
- ),
- }
- generic_handler = grpc.method_handlers_generic_handler(
- 'org.onap.ccsdk.cds.controllerblueprints.processing.api.BlueprintProcessingService', rpc_method_handlers)
- server.add_generic_rpc_handlers((generic_handler,))