Add Deployment Artifacts to PNF 21/82121/1
authordermot123 <dermot.melia@est.tech>
Wed, 13 Mar 2019 12:37:35 +0000 (12:37 +0000)
committerdermot123 <dermot.melia@est.tech>
Wed, 13 Mar 2019 12:37:35 +0000 (12:37 +0000)
Add support for PM_Dictionary and VES Events Deployment Artifacts to PNF

Change-Id: Ief85d40bd180aae0662cfb58f794f5b0d7e5ec9c
Issue-ID: SDC-2109
Issue-ID: SDC-2155
Signed-off-by: dermot123 <dermot.melia@est.tech>
asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/configuration.yaml.erb
asdctool/src/main/resources/config/configuration.yaml
catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb
catalog-be/src/main/resources/config/configuration.yaml
catalog-ui/configurations/menu.js
catalog-ui/src/app/view-models/workspace/tabs/composition/composition-view.html
catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view-model.ts
catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html
common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java

index 52697f7..ed98008 100644 (file)
@@ -378,7 +378,15 @@ resourceDeploymentArtifacts:
         acceptedTypes:
             - yaml
             - yml
-        validForResourceTypes: *allResourceTypes
+        validForResourceTypes:
+            - VFC
+            - CP
+            - VL
+            - VF
+            - VFCMT
+            - Abstract
+            - CVFC
+            - PNF
     PERFORMANCE_COUNTER:
         acceptedTypes:
             - csv
@@ -435,6 +443,13 @@ resourceDeploymentArtifacts:
     SNMP_TRAP:
         acceptedTypes:
         validForResourceTypes: *allResourceTypes
+    PM_DICTIONARY:
+        acceptedTypes:
+            - yaml
+            - yml
+        validForResourceTypes:
+            - VF
+            - PNF
 
 #PLAN
     PLAN:
index 3b58372..f481a10 100644 (file)
@@ -405,7 +405,15 @@ resourceDeploymentArtifacts:
         acceptedTypes:
             - yaml
             - yml
-        validForResourceTypes: *allResourceTypes
+        validForResourceTypes:
+            - VFC
+            - CP
+            - VL
+            - VF
+            - VFCMT
+            - Abstract
+            - CVFC
+            - PNF
     PERFORMANCE_COUNTER:
         acceptedTypes:
             - csv
@@ -462,6 +470,13 @@ resourceDeploymentArtifacts:
     SNMP_TRAP:
         acceptedTypes:
         validForResourceTypes: *allResourceTypes
+    PM_DICTIONARY:
+        acceptedTypes:
+            - yaml
+            - yml
+        validForResourceTypes:
+            - VF
+            - PNF
 
 resourceInstanceDeploymentArtifacts:
     HEAT_ENV:
index 0204673..78468b4 100644 (file)
@@ -386,7 +386,16 @@ resourceDeploymentArtifacts:
         acceptedTypes:
             - yaml
             - yml
-        validForResourceTypes: *allResourceTypes
+        validForResourceTypes:
+            - VFC
+            - CP
+            - VL
+            - VF
+            - CR
+            - VFCMT
+            - Abstract
+            - CVFC
+            - PNF
     PERFORMANCE_COUNTER:
         acceptedTypes:
             - csv
@@ -443,6 +452,13 @@ resourceDeploymentArtifacts:
     SNMP_TRAP:
         acceptedTypes:
         validForResourceTypes: *allResourceTypes
+    PM_DICTIONARY:
+        acceptedTypes:
+            - yaml
+            - yml
+        validForResourceTypes:
+            - VF
+            - PNF
 
 #PLAN
     PLAN:
index 610fd72..12815b1 100644 (file)
@@ -411,7 +411,16 @@ resourceDeploymentArtifacts:
         acceptedTypes:
             - yaml
             - yml
-        validForResourceTypes: *allResourceTypes
+        validForResourceTypes:
+            - VFC
+            - CP
+            - VL
+            - VF
+            - CR
+            - VFCMT
+            - Abstract
+            - CVFC
+            - PNF
     PERFORMANCE_COUNTER:
         acceptedTypes:
             - csv
@@ -468,6 +477,13 @@ resourceDeploymentArtifacts:
     SNMP_TRAP:
         acceptedTypes:
         validForResourceTypes: *allResourceTypes
+    PM_DICTIONARY:
+        acceptedTypes:
+            - yaml
+            - yml
+        validForResourceTypes:
+            - VF
+            - PNF
 
 resourceInstanceDeploymentArtifacts:
     HEAT_ENV:
index d93b3ac..d9138ae 100644 (file)
@@ -475,6 +475,7 @@ const SDC_MENU_CONFIG = {
         ],
         "PNF": [
             {"text": "General", "action": "onMenuItemPressed", "state": "workspace.general"},
+            {"text": "Deployment Artifact", "action": "onMenuItemPressed", "state": "workspace.deployment_artifacts"},
             {"text": "Information Artifact", "action": "onMenuItemPressed", "state": "workspace.information_artifacts"},
             {"text": "TOSCA Artifacts", "action": "onMenuItemPressed", "state": "workspace.tosca_artifacts"},
             {"text": "Composition", "action": "onMenuItemPressed", "state": "workspace.composition.details"},
index a571fdc..5559e53 100644 (file)
@@ -81,7 +81,7 @@
                         data-ui-sref="workspace.composition.deployment"
                         tooltips tooltip-class="tooltip-custom tab-tooltip" tooltip-content="Deployment Artifacts"
                         data-tests-id="deployment-artifact-tab"
-                        data-ng-if="!isPNF() && !isConfiguration() && !(isComponentInstanceSelected() && currentComponent.selectedInstance.isServiceProxy())"
+                        data-ng-if="!isConfiguration() && !(isComponentInstanceSelected() && currentComponent.selectedInstance.isServiceProxy())"
                         data-ng-class="{'disabled': disabledTabs}">
                     <div class="i-sdc-designer-sidebar-tab-icon sprite-new deployment-artifacts"></div>
                 </button>
index 627d205..2af341b 100644 (file)
@@ -7,9 +7,9 @@
  * 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.
@@ -50,6 +50,7 @@ export interface IArtifactsViewModelScope extends ICompositionViewModelScope {
     getEnvArtifact(heatArtifact:ArtifactModel):any;
     getEnvArtifactName(artifact:ArtifactModel):string;
     isLicenseArtifact(artifact:ArtifactModel):boolean;
+    isVfOrPnf():boolean;
     //isVFiArtifact(artifact:ArtifactModel):boolean;
 }
 
@@ -329,6 +330,14 @@ export class ResourceArtifactsViewModel {
             });
         };
 
+        this.$scope.isVfOrPnf = ():boolean => {
+            if (this.$scope.selectedComponent.isResource()) {
+                let selectedResourceType = (<Resource>this.$scope.selectedComponent).resourceType;
+                return selectedResourceType == 'VF' || selectedResourceType == 'PNF';
+            }
+            return false;
+        }
+
         this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_NODE_SELECTED, this.loadArtifacts);
         this.eventListenerService.registerObserverCallback(GRAPH_EVENTS.ON_GRAPH_BACKGROUND_CLICKED, this.loadArtifacts);
 
index ce1b8ae..ec81ed8 100644 (file)
@@ -77,7 +77,7 @@
             </div>
 
         </div>
-        <div class="w-sdc-designer-sidebar-section-footer" data-ng-if="!isViewMode() && artifactType!=='api' && (!isComponentInstanceSelected()||selectedComponent.resourceType=='VF') && ('deployment' != artifactType || selectedComponent.isComplex())">
+        <div class="w-sdc-designer-sidebar-section-footer" data-ng-if="!isViewMode() && artifactType!=='api' && (!isComponentInstanceSelected()||isVfOrPnf()) && ('deployment' != artifactType || selectedComponent.isComplex())">
             <button class="w-sdc-designer-sidebar-section-footer-action tlv-btn blue" data-tests-id="add_Artifact_Button" data-ng-click="addOrUpdate({})" type="button">Add Artifact</button>
         </div>
     </div>
index 47babee..c0dc90e 100644 (file)
@@ -39,7 +39,8 @@ public enum ArtifactTypeEnum {
        AAI_SERVICE_MODEL("AAI_SERVICE_MODEL"), AAI_VF_MODEL("AAI_VF_MODEL"), AAI_VF_MODULE_MODEL("AAI_VF_MODULE_MODEL"), AAI_VF_INSTANCE_MODEL("AAI_VF_INSTANCE_MODEL"),
        // MIB artifacts
        SNMP_POLL ("SNMP_POLL"), SNMP_TRAP("SNMP_TRAP"), GUIDE("GUIDE"),
-       PLAN("PLAN")
+       PLAN("PLAN"),
+       PM_DICTIONARY("PM_DICTIONARY")
        ;
        
        ArtifactTypeEnum(String type) {