diff options
68 files changed, 191 insertions, 106 deletions
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model-routing.module.ts index 3935b65f6..3a7efdcbd 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model-routing.module.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model-routing.module.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html index 4a738b79c..b9a842028 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.scss index cafd2bf8f..cd9725f83 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.scss +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.scss @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.spec.ts index 97b3d73e2..595c8ba5f 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.spec.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.spec.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts index 9d262c600..a74fd4b4b 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts index 2963cfc59..7ba8d5218 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html index a2e0a7c05..fe1c92c4f 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.scss index cafd2bf8f..cd9725f83 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.scss +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.scss @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.spec.ts index 9051a86fa..6d4b81823 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.spec.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.spec.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts index b81a7335e..7ef40920b 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation-routing.module.ts index 6b7a23882..228ba821b 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation-routing.module.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation-routing.module.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.module.ts index 5ad98bfae..ae323d825 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.module.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-creation.module.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.html index a0e6b15c3..b33978d13 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.html +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.html @@ -3,6 +3,8 @@ * ONAP : CDS
* ================================================================================
* Copyright 2019 TechMahindra
+*
+* Modifications Copyright (C) 2019 IBM
*=================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.scss index 2205ac8e7..946165a9a 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.scss +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.scss @@ -3,6 +3,8 @@ * ONAP : CDS
* ================================================================================
* Copyright 2019 TechMahindra
+*
+* Modifications Copyright (C) 2019 IBM
*=================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.spec.ts index 2061ed27c..8a7a10b65 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.spec.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.spec.ts @@ -3,6 +3,8 @@ * ONAP : CDS
* ================================================================================
* Copyright 2019 TechMahindra
+*
+* Modifications Copyright (C) 2019 IBM
*=================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.ts index 1c6efc9c8..ec7767576 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/resource-template-options/resource-template-options.component.ts @@ -3,6 +3,8 @@ * ONAP : CDS
* ================================================================================
* Copyright 2019 TechMahindra
+*
+* Modifications Copyright (C) 2019 IBM
*=================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource-routing.module.ts index 73e6459a5..c3f00b827 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource-routing.module.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource-routing.module.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.html index 3d60dabb8..2b79dd44d 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.html +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.html @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.scss index cafd2bf8f..cd9725f83 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.scss +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.scss @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.spec.ts index 9893230ed..18d607310 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.spec.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.spec.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.ts index ac3561a21..5299a08e5 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.component.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.module.ts index 3f27c2db2..5be0bfce9 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.module.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/upload-resource/upload-resource.module.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit-routing.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit-routing.module.ts index ae417c454..494e765b2 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit-routing.module.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit-routing.module.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright (C) 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM * ================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.html index 4bd4ad456..5be2a1457 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.html +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.html @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright (C) 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.scss index 9c2d42a83..236aa97ce 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.scss +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.scss @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright (C) 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.spec.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.spec.ts index f88452d31..af2adc077 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.spec.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.spec.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright (C) 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.ts index 77e901717..4603c529f 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.component.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright (C) 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts index ae7143cfb..8d2c9aabb 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-edit.module.ts @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright (C) 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html index 3b35a9929..d40dbd957 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.html @@ -3,6 +3,8 @@ * ONAP : CDS * ================================================================================ * Copyright 2019 TechMahindra +* +* Modifications Copyright (C) 2019 IBM *================================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.scss b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.scss index aa8ca61b5..833376c33 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.scss +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-edit/resource-metadata/resource-metadata.component.scss @@ -3,6 +3,8 @@ * ONAP : CDS
* ================================================================================
* Copyright 2019 TechMahindra
+*
+* Modifications Copyright (C) 2019 IBM
*=================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json index 07e4df140..8e9d13e3a 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json +++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/node_types.json @@ -340,7 +340,7 @@ }, "derived_from": "tosca.nodes.ResourceSource" }, - "source-primary-db": { + "source-processor-db": { "description": "This is Database Resource Source Node Type", "version": "1.0.0", "properties": { diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json index b771d25f9..fe364f974 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json +++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Definitions/resources_definition_types.json @@ -27,7 +27,7 @@ "properties": {} }, "processor-db": { - "type": "source-primary-db", + "type": "source-processor-db", "properties": { "endpoint-selector": "dynamic-db-source", "query": "SELECT artifact_name FROM sdnctl.BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"", diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/resources_definition_types.json b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/resources_definition_types.json index d2c470fe8..265377be4 100755 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/resources_definition_types.json +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_python/Definitions/resources_definition_types.json @@ -13,7 +13,7 @@ "properties" : { } }, "primary-db": { - "type": "source-primary-db", + "type": "source-processor-db", "properties": { "query": "SELECT artifact_name FROM BLUEPRINT_RUNTIME where artifact_version=\"1.0.0\"", "input-key-mapping": { diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json b/components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json deleted file mode 100644 index 6f03dbfc4..000000000 --- a/components/model-catalog/definition-type/starter-type/node_type/source-primary-db.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "description": "This is Database Resource Source Node Type", - "version": "1.0.0", - "properties": { - "type": { - "required": true, - "default": "SQL", - "type": "string", - "constraints": [ - { - "valid_values": [ - "SQL" - ] - } - ] - }, - "endpoint-selector": { - "required": false, - "type": "string" - }, - "query": { - "required": true, - "type": "string" - }, - "input-key-mapping": { - "required": false, - "type": "map", - "entry_schema": { - "type": "string" - } - }, - "output-key-mapping": { - "required": false, - "type": "map", - "entry_schema": { - "type": "string" - } - }, - "key-dependencies": { - "required": true, - "type": "list", - "entry_schema": { - "type": "string" - } - } - }, - "derived_from": "tosca.nodes.ResourceSource" -}
\ No newline at end of file diff --git a/components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json b/components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json index 702748f8a..02e403bc2 100644 --- a/components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json +++ b/components/model-catalog/definition-type/starter-type/node_type/source-processor-db.json @@ -4,6 +4,7 @@ "properties": { "type": { "required": true, + "default": "SQL", "type": "string", "constraints": [ { 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 7cbc89583..eff977348 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 @@ -22,9 +22,12 @@ import kotlinx.coroutines.runBlocking import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ACTION_MODE_ASYNC 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.selfservice.api.utils.determineHttpStatusCode import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException import org.springframework.beans.factory.annotation.Autowired +import org.springframework.http.HttpStatus import org.springframework.http.MediaType +import org.springframework.http.ResponseEntity import org.springframework.http.codec.multipart.FilePart import org.springframework.security.access.prepost.PreAuthorize import org.springframework.web.bind.annotation.* @@ -63,10 +66,11 @@ open class ExecutionServiceController { notes = "Takes the blueprint information and process as per the payload") @ResponseBody @PreAuthorize("hasRole('USER')") - fun process(@RequestBody executionServiceInput: ExecutionServiceInput): ExecutionServiceOutput = runBlocking { + fun process(@RequestBody executionServiceInput: ExecutionServiceInput): ResponseEntity<ExecutionServiceOutput> = runBlocking { if (executionServiceInput.actionIdentifiers.mode == ACTION_MODE_ASYNC) { throw IllegalStateException("Can't process async request through the REST endpoint. Use gRPC for async processing.") } - executionServiceHandler.doProcess(executionServiceInput) + val processResult = executionServiceHandler.doProcess(executionServiceInput) + ResponseEntity(processResult, determineHttpStatusCode(processResult.status.code)) } } diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/Utils.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/Utils.kt index 32be3e0a0..2cf1c1dd0 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/Utils.kt +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/Utils.kt @@ -16,6 +16,7 @@ package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils 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 import java.io.File @@ -26,6 +27,7 @@ import java.time.ZoneId import java.time.format.DateTimeFormatter import java.util.* +const val INTERNAL_SERVER_ERROR_HTTP_STATUS_CODE = 500 fun currentTimestamp(): String { val now = LocalDateTime.now(ZoneId.systemDefault()) @@ -56,4 +58,15 @@ fun saveCBAFile(filePart: FilePart, targetDirectory: Path): Path { filePart.transferTo(file) return targetLocation +} + +fun determineHttpStatusCode(statusCode: Int): HttpStatus { + + try { + return HttpStatus.valueOf(statusCode) + } catch (exception: Exception) { + //if statusCode cannot be converted to a proper HttpStatus, the resource still needs to assign a HTTP status + // code to the response. In this case, a 500 Internal Server Error will be returned as default. + return HttpStatus.valueOf(INTERNAL_SERVER_ERROR_HTTP_STATUS_CODE) + } }
\ No newline at end of file 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 d14761cc9..9cbd898dc 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 @@ -38,6 +38,7 @@ import org.springframework.test.context.junit4.SpringRunner import org.springframework.test.web.reactive.server.WebTestClient import org.springframework.test.web.reactive.server.returnResult import org.springframework.web.reactive.function.BodyInserters +import java.io.File import java.nio.file.Files import java.nio.file.Paths import java.util.* @@ -71,11 +72,8 @@ class ExecutionServiceHandlerTest { @Test fun `test rest upload blueprint`() { runBlocking { - val file = Paths.get("./src/test/resources/test-cba.zip").toFile() - assertTrue(file.exists(), "couldn't get file ${file.absolutePath}") - val body = MultipartBodyBuilder().apply { - part("file", object : ByteArrayResource(Files.readAllBytes(Paths.get("./src/test/resources/test-cba.zip"))) { + part("file", object : ByteArrayResource(Files.readAllBytes(loadTestCbaFile().toPath())) { override fun getFilename(): String { return "test-cba.zip" } @@ -98,9 +96,7 @@ class ExecutionServiceHandlerTest { @Test fun `test rest process`() { runBlocking { - val file = Paths.get("./src/test/resources/test-cba.zip").toFile() - assertTrue(file.exists(), "couldnt get file ${file.absolutePath}") - blueprintCatalog.saveToDatabase(UUID.randomUUID().toString(), file) + blueprintCatalog.saveToDatabase(UUID.randomUUID().toString(), loadTestCbaFile()) val executionServiceInput = JacksonUtils .readValueFromClassPathFile("execution-input/default-input.json", @@ -114,4 +110,28 @@ class ExecutionServiceHandlerTest { .expectStatus().isOk } } + + @Test + fun `rest resource process should return status code 500 in case of server-side exception`() { + runBlocking { + blueprintCatalog.saveToDatabase(UUID.randomUUID().toString(), loadTestCbaFile()) + + val executionServiceInput = JacksonUtils + .readValueFromClassPathFile("execution-input/faulty-input.json", + ExecutionServiceInput::class.java)!! + + webTestClient + .post() + .uri("/api/v1/execution-service/process") + .body(BodyInserters.fromObject(executionServiceInput)) + .exchange() + .expectStatus().is5xxServerError + } + } + + private fun loadTestCbaFile(): File { + val testCbaFile = Paths.get("./src/test/resources/test-cba.zip").toFile() + assertTrue(testCbaFile.exists(), "couldn't get file ${testCbaFile.absolutePath}") + return testCbaFile + } }
\ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/mock/Mock.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/mock/Mock.kt index dab2419da..29d4f48a5 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/mock/Mock.kt +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/mock/Mock.kt @@ -54,7 +54,7 @@ open class MockResourceSource { @Bean(name = [ "rr-processor-source-input", "rr-processor-source-default", - "rr-processor-source-primary-db", + "rr-processor-source-processor-db", "rr-processor-source-rest"]) open fun sourceInstance(): ResourceAssignmentProcessor { return mockk<ResourceAssignmentProcessor>() diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/Utils.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/Utils.kt new file mode 100644 index 000000000..07d8ca4e1 --- /dev/null +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/utils/Utils.kt @@ -0,0 +1,27 @@ +package org.onap.ccsdk.cds.blueprintsprocessor.selfservice.api.utils + +import org.junit.Assert.assertEquals +import org.junit.Test +import org.junit.runner.RunWith +import org.springframework.http.HttpStatus +import org.springframework.test.context.junit4.SpringRunner + +@RunWith(SpringRunner::class) +class UtilsTest { + + @Test + fun `valid Http status codes should be produced for valid parameters`() { + val httpStatusCode200 = determineHttpStatusCode(200) + assertEquals(HttpStatus.OK, httpStatusCode200) + + val httpStatusCode500 = determineHttpStatusCode(500) + assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, httpStatusCode500) + } + + @Test + fun `Http status code 500 should be produced for any invalid parameter`() { + val nonExistentHttpStatusCode = determineHttpStatusCode(999999) + assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, nonExistentHttpStatusCode) + } + +}
\ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/execution-input/faulty-input.json b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/execution-input/faulty-input.json new file mode 100644 index 000000000..999039e11 --- /dev/null +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/test/resources/execution-input/faulty-input.json @@ -0,0 +1,15 @@ +{ + "commonHeader": { + "originatorId": "System", + "requestId": "1234", + "subRequestId": "1234-12234" + }, + "actionIdentifiers": { + "blueprintName": "baseconfiguration", + "blueprintVersion": "1.0.0", + "actionName": "activate", + "mode": "sync" + }, + "payload": { + } +}
\ No newline at end of file diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonServiceTest.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonServiceTest.kt index ae7b7b2ef..fd18baf52 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonServiceTest.kt +++ b/ms/blueprintsprocessor/modules/services/execution-service/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/scripts/BlueprintJythonServiceTest.kt @@ -50,23 +50,23 @@ class BlueprintJythonServiceTest { @Test fun testGetAbstractPythonPlugin() { - val content = JacksonUtils.getClassPathFileContent("scripts/SamplePythonComponentNode.py") - val dependencies: MutableMap<String, Any> = hashMapOf() + val content = JacksonUtils.getClassPathFileContent("scripts/SamplePythonComponentNode.py") + val dependencies: MutableMap<String, Any> = hashMapOf() - val abstractPythonPlugin = blueprintJythonService - .jythonInstance<AbstractComponentFunction>(blueprintContext, "SamplePythonComponentNode", - content, dependencies) + val abstractPythonPlugin = blueprintJythonService + .jythonInstance<AbstractComponentFunction>(blueprintContext, "SamplePythonComponentNode", + content, dependencies) - assertNotNull(abstractPythonPlugin, "failed to get python component") + assertNotNull(abstractPythonPlugin, "failed to get python component") } @Test fun testGetAbstractJythonComponent() { - val scriptInstance = "test-classes/scripts/SamplePythonComponentNode.py" + val scriptInstance = "test-classes/scripts/SamplePythonComponentNode.py" - val abstractJythonComponent = blueprintJythonService.jythonComponentInstance(blueprintContext, scriptInstance) + val abstractJythonComponent = blueprintJythonService.jythonComponentInstance(blueprintContext, scriptInstance) - assertNotNull(abstractJythonComponent, "failed to get Jython component") + assertNotNull(abstractJythonComponent, "failed to get Jython component") } }
\ No newline at end of file diff --git a/ms/controllerblueprints/application/src/main/resources/application-dev.properties b/ms/controllerblueprints/application/src/main/resources/application-dev.properties index 68d76333a..09d10dc69 100755 --- a/ms/controllerblueprints/application/src/main/resources/application-dev.properties +++ b/ms/controllerblueprints/application/src/main/resources/application-dev.properties @@ -49,7 +49,7 @@ spring.jpa.hibernate.ddl-auto=none spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect # Load Resource Source Mappings -resourceSourceMappings=processor-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,primary-aai-data=source-rest,capability=source-capability +resourceSourceMappings=processor-db=source-processor-db,primary-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,primary-aai-data=source-rest,capability=source-capability # Controller Blueprints Core Configuration controllerblueprints.blueprintDeployPath=/etc/blueprints/deploy controllerblueprints.blueprintArchivePath=/etc/blueprints/archive diff --git a/ms/controllerblueprints/application/src/main/resources/application.properties b/ms/controllerblueprints/application/src/main/resources/application.properties index b9c1d4f4e..4be06d81f 100755 --- a/ms/controllerblueprints/application/src/main/resources/application.properties +++ b/ms/controllerblueprints/application/src/main/resources/application.properties @@ -52,7 +52,7 @@ spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect # Load Resource Source Mappings -resourceSourceMappings=processor-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability +resourceSourceMappings=processor-db=source-processor-db,primary-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,primary-aai-data=source-rest,capability=source-capability # Controller Blueprints Core Configuration controllerblueprints.blueprintDeployPath=/etc/blueprints/deploy diff --git a/ms/controllerblueprints/application/src/test/resources/application.properties b/ms/controllerblueprints/application/src/test/resources/application.properties index 9c5d35cab..0e96343d5 100755 --- a/ms/controllerblueprints/application/src/test/resources/application.properties +++ b/ms/controllerblueprints/application/src/test/resources/application.properties @@ -33,7 +33,7 @@ swagger.contact.url=www.onap.com swagger.contact.email=brindasanth@onap.com
# Load Resource Source Mappings
-resourceSourceMappings=processor-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,primary-aai-data=source-rest,capability=source-capability
+resourceSourceMappings=processor-db=source-processor-db,primary-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,primary-aai-data=source-rest,capability=source-capability
# Controller Blueprints Core Configuration
controllerblueprints.blueprintDeployPath=./target/blueprints/deploy
diff --git a/ms/controllerblueprints/modules/resource-dict/load/model_type/node_type/source-primary-db.json b/ms/controllerblueprints/modules/resource-dict/load/model_type/node_type/source-processor-db.json index 661a9503b..661a9503b 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/model_type/node_type/source-primary-db.json +++ b/ms/controllerblueprints/modules/resource-dict/load/model_type/node_type/source-processor-db.json diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/nf-role.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/nf-role.json index 6da5ea22f..9b20c1dc5 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/nf-role.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/nf-role.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.VF_MODEL.nf_role as vf_model_role from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnfmodelcustomizationuuid", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/nfc-naming-code.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/nfc-naming-code.json index 4e1ba2b0a..97d591bef 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/nfc-naming-code.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/nfc-naming-code.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select nfc_naming_code as nfc_naming_code from sdnctl.VFC_MODEL where customization_uuid=:vfccustomizationuuid", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/onap_private_net_cidr.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/onap_private_net_cidr.json index b359320be..87448eb20 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/onap_private_net_cidr.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/onap_private_net_cidr.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = private", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/primary-db-source.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/primary-db-source.json index 26e62e85d..0fd436bfb 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/primary-db-source.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/primary-db-source.json @@ -8,7 +8,7 @@ "tags": "bundle-id, brindasanth@onap.com", "sources": { "primary-db": { - "type": "source-primary-db", + "type": "source-processor-db", "properties": { "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name", "input-key-mapping": { diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/private-prefix-id.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/private-prefix-id.json index 4f4868d97..5776b1b06 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/private-prefix-id.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/private-prefix-id.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = private", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/protected-prefix-id.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/protected-prefix-id.json index dd418d550..d291715a8 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/protected-prefix-id.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/protected-prefix-id.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = protected", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/protected_private_net_cidr.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/protected_private_net_cidr.json index dcd32c7ce..bea7f25fb 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/protected_private_net_cidr.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/protected_private_net_cidr.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = protected", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/unprotected-prefix-id.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/unprotected-prefix-id.json index 1e4cd7bdb..b4bf22e02 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/unprotected-prefix-id.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/unprotected-prefix-id.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.IPAM_IP_POOL.prefix_id as prefix_id from sdnctl.IPAM_IP_POOL where description = unprotected", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/unprotected_private_net_cidr.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/unprotected_private_net_cidr.json index 241147c3f..362f627d4 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/unprotected_private_net_cidr.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/unprotected_private_net_cidr.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.IPAM_IP_POOL.prefix as prefix from sdnctl.IPAM_IP_POOL where description = unprotected", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-module-label.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-module-label.json index faa7ea49e..038921835 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-module-label.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-module-label.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.VF_MODULE_MODEL.vf_module_label as vf_module_label from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-module-type.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-module-type.json index dbd51bbd9..c06e307e2 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-module-type.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-module-type.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select vf_module_type as vf_module_type from sdnctl.VF_MODULE_MODEL where customization_uuid=:customizationid", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-naming-policy.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-naming-policy.json index 70792f86f..e332d3bf1 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-naming-policy.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-naming-policy.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.VF_MODEL.naming_policy as vf_naming_policy from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:vnf_model_customization_uuid", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-nf-code.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-nf-code.json index a21982c0c..52359a41d 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-nf-code.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vf-nf-code.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.VF_MODEL.nf_code as vf_nf_code from sdnctl.VF_MODEL where sdnctl.VF_MODEL.customization_uuid=:customizationid", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vfccustomizationuuid.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vfccustomizationuuid.json index 9f3e7cf17..b87473c73 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vfccustomizationuuid.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vfccustomizationuuid.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select sdnctl.VF_MODULE_TO_VFC_MAPPING.vfc_customization_uuid as vnf_customid from sdnctl.VF_MODULE_TO_VFC_MAPPING where vm_count = 1 and sdnctl.VF_MODULE_TO_VFC_MAPPING.vf_module_customization_uuid=:vfmodulecustomizationuuid", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vm-type.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vm-type.json index dabb23815..b0d2a01da 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vm-type.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vm-type.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select vfc_model.vm_type as vm_type from VFC_MODEL where customization_uuid=:vfccustomizationuuid", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnfc-model-invariant-uuid.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnfc-model-invariant-uuid.json index 8ce692cc3..44a5c99a7 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnfc-model-invariant-uuid.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnfc-model-invariant-uuid.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select vfc_model.invariant_uuid as vfc_invariant_uuid from VFC_MODEL where customization_uuid=:vfccustomizationuuid", diff --git a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnfc-model-version.json b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnfc-model-version.json index d74a6bae2..267dea39b 100644 --- a/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnfc-model-version.json +++ b/ms/controllerblueprints/modules/resource-dict/load/resource_dictionary/vnfc-model-version.json @@ -8,7 +8,7 @@ }, "sources" : { "primary-db" : { - "type" : "source-primary-db", + "type" : "source-processor-db", "properties" : { "type" : "SQL", "query" : "select vfc_model.version as vnfc_model_version from VFC_MODEL where customization_uuid=:vfccustomizationuuid", diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java index 6c75f0bd8..8c4173182 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java +++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java @@ -25,10 +25,12 @@ public class ResourceSourceMappingFactoryTest { @Test public void testRegisterResourceMapping() { - ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("primary-db", "source-primary-db"); + ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("primary-db", "source-processor-db"); + ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("processor-db", "source-processor-db"); ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("input", "source-input"); ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("default", "source-default"); ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("primary-config-data", "source-rest"); + ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("primary-aai-data", "source-rest"); String nodeTypeName = ResourceSourceMappingFactory.INSTANCE.getRegisterSourceMapping("primary-db"); Assert.notNull(nodeTypeName, "Failed to get primary-db mapping"); diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt b/ms/controllerblueprints/modules/resource-dict/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt index a2d525ac3..57394173b 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt +++ b/ms/controllerblueprints/modules/resource-dict/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt @@ -22,7 +22,8 @@ object ResourceDictionaryTestUtils { @JvmStatic fun setUpResourceSourceMapping() { - ResourceSourceMappingFactory.registerSourceMapping("primary-db", "source-primary-db") + ResourceSourceMappingFactory.registerSourceMapping("primary-db", "source-processor-db") + ResourceSourceMappingFactory.registerSourceMapping("processor-db", "source-processor-db") ResourceSourceMappingFactory.registerSourceMapping("input", "source-input") ResourceSourceMappingFactory.registerSourceMapping("default", "source-default") ResourceSourceMappingFactory.registerSourceMapping("primary-config-data", "source-rest") diff --git a/ms/controllerblueprints/modules/service/src/test/resources/application.properties b/ms/controllerblueprints/modules/service/src/test/resources/application.properties index 19430ad08..2b16fc05e 100755 --- a/ms/controllerblueprints/modules/service/src/test/resources/application.properties +++ b/ms/controllerblueprints/modules/service/src/test/resources/application.properties @@ -20,7 +20,7 @@ logging.level.org.springframework.web=INFO logging.level.org.hibernate.SQL=warn logging.level.org.hibernate.type.descriptor.sql=debug # Load Resource Source Mappings -resourceSourceMappings=processor-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,capability=source-capability +resourceSourceMappings=processor-db=source-processor-db,primary-db=source-processor-db,input=source-input,default=source-default,primary-config-data=source-rest,primary-aai-data=source-rest,capability=source-capability # Controller Blueprints Core Configuration controllerblueprints.blueprintDeployPath=./target/blueprints/deploy controllerblueprints.blueprintArchivePath=./target/blueprints/archive 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 c78505377..148d0c028 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 @@ -31,7 +31,6 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.Enumeration; import java.util.List; -import java.util.Optional; import java.util.regex.Pattern; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; @@ -138,10 +137,7 @@ public class ListenerServiceImpl implements ListenerService { public void saveBluePrintToCdsDatabase(Path cbaArchivePath, ManagedChannel channel) { List<File> zipFiles = FileUtil.getFilesFromDisk(cbaArchivePath); if (!zipFiles.isEmpty()) { - zipFiles.forEach(file -> FileUtil.deleteFile(file, cbaArchivePath.toString())); prepareRequestForCdsBackend(zipFiles, channel, cbaArchivePath.toString()); - } else { - LOGGER.error("Could not able to read CBA archives from this location {}", cbaArchivePath); } } @@ -187,7 +183,7 @@ public class ListenerServiceImpl implements ListenerService { files.forEach(zipFile -> { try { - final BluePrintUploadInput request = generateBluePrintUploadInputBuilder(zipFile); + final BluePrintUploadInput request = generateBluePrintUploadInputBuilder(zipFile, path); // Send request to CDS Backend. final Status responseStatus = bluePrintProcesssorHandler.sendRequest(request, managedChannel); @@ -209,16 +205,14 @@ public class ListenerServiceImpl implements ListenerService { listenerStatus.sendResponseBackToSdc(distributionId, COMPONENT_DONE_ERROR, errorMessage, artifactUrl, SDC_LISTENER_COMPONENT); LOGGER.error(errorMessage); - } finally { - FileUtil.deleteFile(zipFile, path); } }); } - private BluePrintUploadInput generateBluePrintUploadInputBuilder(File file) 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() .setFileChunk(fileChunk) .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 ecb753892..aa8f8e4e8 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 @@ -17,7 +17,6 @@ package org.onap.ccsdk.cds.sdclistener.service; import static junit.framework.TestCase.assertTrue; import static org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus.NotificationType.SDC_LISTENER_COMPONENT; -import static org.onap.sdc.utils.DistributionStatusEnum.COMPONENT_DONE_ERROR; import static org.onap.sdc.utils.DistributionStatusEnum.COMPONENT_DONE_OK; import java.io.File; import java.io.IOException; @@ -39,7 +38,6 @@ 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.status.SdcListenerStatus; -import org.onap.ccsdk.cds.sdclistener.status.SdcListenerStatus.NotificationType; import org.onap.sdc.api.results.IDistributionClientDownloadResult; import org.onap.sdc.impl.mock.DistributionClientResultStubImpl; import org.springframework.beans.factory.annotation.Autowired; @@ -102,8 +100,6 @@ public class ListenerServiceImplTest { @Test public void extractBluePrintFailure() { // Arrange - final String errorMessage = String - .format("The CBA Archive doesn't exist as per this given regex %s", CBA_ZIP_PATH); Mockito.when(listenerDto.getDistributionId()).thenReturn(DISTRIBUTION_ID); Mockito.when(listenerDto.getArtifactUrl()).thenReturn(URL); Mockito.doCallRealMethod().when(status) |