Merge "Edit templates_instance_template.json file to correct values for service edit...
authorAmichai Hemli <amichai.hemli@intl.att.com>
Thu, 12 Dec 2019 15:22:06 +0000 (15:22 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 12 Dec 2019 15:22:06 +0000 (15:22 +0000)
17 files changed:
INFO.yaml
docs/release-notes.rst
vid-app-common/src/main/webapp/app/vid/scripts/constants/componentConstants.js
vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
vid-webpack-master/cypress/integration/iFrames/vnf.popup.e2e.ts
vid-webpack-master/src/app/app.routing.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html
vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.scss
vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html
vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss
vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts
vid-webpack-master/src/app/shared/utils/constants.ts

index a784a2f..bf74caf 100644 (file)
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -37,11 +37,6 @@ committers:
       company: 'ATT'
       id: 'ahemli'
       timezone: 'Asia/Jerusalem'
-    - name: 'Wojciech Sliwka'
-      email: 'wojciech.sliwka@nokia.com'
-      company: 'Nokia'
-      id: 'wsliwka'
-      timezone: 'Europe/Warsaw'
     - name: 'Ofir Sonsino'
       email: 'os0695@att.com'
       company: 'ATT'
@@ -67,3 +62,6 @@ tsc:
         - type: 'Addition'
           name: 'Eylon Malin'
           link: 'https://lists.onap.org/g/onap-tsc/topic/62892813#5725'
+        - type: 'Removal'
+          name: 'Wojciech Sliwka'
+          link: 'https://lists.onap.org/g/onap-tsc/topic/67968691#5770'
index 03f2a6e..58fd74b 100644 (file)
@@ -3,22 +3,41 @@
 VID Release Notes
 =================
 
+Version: El-Alto (6.0.x)
+------------------------
+**Known Issues**
+
+
+**Resolved Issues**
+
+
+**Security Notes**
+
+*Fixed Security Issues*
+
+*Known Security Issues*
+
+
+
 Version: El-Alto (5.0.x)
---------------
+------------------------
+**Known Issues**
+
+  - `↗ <https://jira.onap.org/browse/VID-659>`__ VID generates always the same VF module name during scale out
 
 **Resolved Issues**
 
-  - `↗ <https://jira.onap.org/browse/VID-520>`_ Remove "Dissociate" button for Macro-orchestrated PNF resources
-  - `↗ <https://jira.onap.org/browse/VID-517>`_ Added liquidBase for follow changes in DB
-  - `↗ <https://jira.onap.org/browse/VID-488>`_ Added "Report" popup for common diagnosable cases
-  - `↗ <https://jira.onap.org/browse/VID-358>`_ vid-mariadb-galera runs in high-availability mode
+  - `↗ <https://jira.onap.org/browse/VID-520>`__ Remove "Dissociate" button for Macro-orchestrated PNF resources
+  - `↗ <https://jira.onap.org/browse/VID-517>`__ Added liquidBase for follow changes in DB
+  - `↗ <https://jira.onap.org/browse/VID-488>`__ Added "Report" popup for common diagnosable cases
+  - `↗ <https://jira.onap.org/browse/VID-358>`__ vid-mariadb-galera runs in high-availability mode
 
 
 **Security Notes**
 
 *Fixed Security Issues*
 
-  - `↗ <https://jira.onap.org/browse/OJSI-119>`_ Closed plain-text HTTP endpoint, port 30238
+  - `↗ <https://jira.onap.org/browse/OJSI-119>`__ Closed plain-text HTTP endpoint, port 30238
 
 *Known Security Issues*
 
@@ -126,9 +145,9 @@ VID code has been formally scanned during build time using NexusIQ and all Criti
 
 Quick Links:
 
-- `VID project page <https://wiki.onap.org/display/DW/Virtual+Infrastructure+Deployment+Project>`_
-- `Passing Badge information for VID <https://bestpractices.coreinfrastructure.org/en/projects/1658>`_
-- `Project Vulnerability Review Table for VID <https://wiki.onap.org/pages/viewpage.action?pageId=45300871>`_
+- `VID project page <https://wiki.onap.org/display/DW/Virtual+Infrastructure+Deployment+Project>`__
+- `Passing Badge information for VID <https://bestpractices.coreinfrastructure.org/en/projects/1658>`__
+- `Project Vulnerability Review Table for VID <https://wiki.onap.org/pages/viewpage.action?pageId=45300871>`__
 
 **Other**
 
@@ -281,7 +300,7 @@ New Features
 
 **Security Notes**
 
-VID code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been addressed, items that remain open have been assessed for risk and determined to be false positive. The VID open Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=28378623>`_.
+VID code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been addressed, items that remain open have been assessed for risk and determined to be false positive. The VID open Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=28378623>`__.
 
 Quick Links:
 
index ba9f0f5..9cdd5ce 100755 (executable)
@@ -197,6 +197,7 @@ appDS2
     WELCOME_PATH: "welcome.htm",
     IS_PERMITTED_SUB_PATH: "&isPermitted=",
     SERVICE_POPUP_IFRAME_URL: "app/ui/#/servicePopup?serviceModelId=",
+    INSTANTIATION_TEMPLATES_IFRAME_URL: "app/ui/#/instantiationTemplatesPopup?serviceModelId=",
     SUB_INTERFACE_POPUP_IFRAME_URL: "app/ui/#/vlan?",
     VERIFY_SERVICE_URL: "rest/models/services/verifyService",
 
@@ -264,6 +265,7 @@ appDS2
       FLAG_FLASH_REPLACE_VF_MODULE: "FLAG_FLASH_REPLACE_VF_MODULE",
       FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT: "FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT",
       FLAG_SHOW_ORCHESTRATION_TYPE: "FLAG_SHOW_ORCHESTRATION_TYPE",
+      FLAG_2004_INSTANTIATION_TEMPLATES_POPUP : "FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"
     }
 
   };
index d77460a..59e15d3 100644 (file)
@@ -331,7 +331,7 @@ describe('View only drawing board', function () {
       ['Model version', '2.0'],
       ['Model customization ID', '91415b44-753d-494c-926a-456a9172bbb9'],
       ['Min instances', '0'],
-      //['Max instances', '1']
+      ['Max instances', 'Unlimited (default)']
     ];
     const extraLabelsAndValuesForInstance = [['Instance type', 'VNF2_INSTANCE_TYPE'],['In maintenance','true'], ['Instance ID', 'VNF2_INSTANCE_ID']];
     testComponentInfoByType('node-VF_vGeraldine 0', labelsAndValuesForModel,'VNF INFO',
index b1adff1..41ab833 100644 (file)
@@ -66,7 +66,7 @@ describe('Vnf popup', function () {
         cy.getElementByDataTestsId('model-item-label-vnf-min').contains('Minimum to instantiate');
         cy.getElementByDataTestsId('model-item-value-vnf-min').contains('0');
         cy.getElementByDataTestsId('model-item-label-vnf-max').contains('Maximum to instantiate');
-        cy.getElementByDataTestsId('model-item-value-vnf-max').contains('1');
+        cy.getElementByDataTestsId('model-item-value-vnf-max').contains('Unlimited (default)');
       })
      });
 
index 779d17e..eaf4e9c 100644 (file)
@@ -6,11 +6,19 @@ import {SupportComponent} from "./support/support.component";
 import {HealthStatusRoutes} from "./healthStatus/health-status.routing";
 import {VlanTaggingRoutes} from "./vlanTagging/vlan-tagging.routing";
 import {InstantiationStatusRoutes} from "./instantiationStatus/InstantiationStatus.routing";
+import {InstantiationTemplatesModalComponent} from "./shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component";
 const routes: Routes = [
   ...DrawingBoardRoutes,
   ...HealthStatusRoutes,
   ...VlanTaggingRoutes,
   ...InstantiationStatusRoutes,
+  {
+    path: 'instantiationTemplatesPopup',
+    component: InstantiationTemplatesModalComponent,
+    resolve: {
+      flags: FlagsResolve
+    }
+  },
   {
     path: 'servicePopup',
     component: GenericFormPopupComponent,
index d89280f..3ac6076 100644 (file)
@@ -23,6 +23,7 @@ import {AaiService} from "../../../../../shared/services/aaiService/aai.service"
 import {HttpClient, HttpHandler} from "@angular/common/http";
 import {FeatureFlagsService} from "../../../../../shared/services/featureFlag/feature-flags.service";
 import {VfModuleUpgradePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
+
 class MockFeatureFlagsService extends  FeatureFlagsService{
   getAllFlags(): { [p: string]: boolean } {
     return {};
@@ -467,6 +468,12 @@ describe('Vnf Model Info', () => {
     expect(actualVNFInfo).toEqual(expectedVNFInfo);
   });
 
+  test('When there is no max Max instances text is: Unlimited (default)', () => {
+    let actualVNFInfo = vnfModel.getInfo({just:"not empty"},null);
+    const maxInstancesItem = actualVNFInfo.find((item)=> item.label == 'Max instances');
+    expect(maxInstancesItem.values[0]).toEqual('Unlimited (default)');
+  });
+
   function getVNFModel(){
     return {
       "name":"VF_vGeraldine",
index c1255f5..ff86925 100644 (file)
@@ -9,10 +9,7 @@ import {SharedTreeService} from "../../shared.tree.service";
 import {NgRedux} from "@angular-redux/store";
 import {AppState} from "../../../../../shared/store/reducers";
 import {DefaultDataGeneratorService} from "../../../../../shared/services/defaultDataServiceGenerator/default.data.generator.service";
-import {
-  GenericFormPopupComponent,
-  PopupType
-} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component";
+import {GenericFormPopupComponent, PopupType} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component";
 import {DialogService} from 'ng2-bootstrap-modal';
 import {VnfPopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
 import {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
@@ -26,13 +23,7 @@ import {changeInstanceCounter, removeInstance} from "../../../../../shared/store
 import {MessageBoxData} from "../../../../../shared/components/messageBox/messageBox.data";
 import {MessageBoxService} from "../../../../../shared/components/messageBox/messageBox.service";
 import {ServiceInstanceActions} from "../../../../../shared/models/serviceInstanceActions";
-import {
-  deleteActionVnfInstance,
-  undoDeleteActionVnfInstance,
-  undoUpgradeVnf,
-  updateVnfPosition,
-  upgradeVnf
-} from "../../../../../shared/storeUtil/utils/vnf/vnf.actions";
+import {deleteActionVnfInstance, undoDeleteActionVnfInstance, undoUpgradeVnf, updateVnfPosition, upgradeVnf} from "../../../../../shared/storeUtil/utils/vnf/vnf.actions";
 import * as _ from 'lodash';
 import {IModalConfig} from "onap-ui-angular/dist/modals/models/modal-config";
 import {ComponentInfoType} from "../../../component-info/component-info-model";
@@ -40,6 +31,7 @@ import {ComponentInfoService} from "../../../component-info/component-info.servi
 import {ModelInformationItem} from "../../../../../shared/components/model-information/model-information.component";
 import {VfModuleUpgradePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
 import {FeatureFlagsService} from "../../../../../shared/services/featureFlag/feature-flags.service";
+import {Constants} from "../../../../../shared/utils/constants";
 
 export class VnfModelInfo implements ILevelNodeInfo {
   constructor(private _dynamicInputsService: DynamicInputsService,
@@ -326,8 +318,9 @@ export class VnfModelInfo implements ILevelNodeInfo {
 
   getInfo(model, instance): ModelInformationItem[] {
     const modelInformation = !_.isEmpty(model) ? [
-      ModelInformationItem.createInstance("Min instances", !_.isNull(model.min) ? String(model.min) : null),
-      ModelInformationItem.createInstance("Max instances", !_.isNull(model.max) ? String(model.max) : null)
+      ModelInformationItem.createInstance("Min instances", !_.isNil(model.min) ? String(model.min) : null),
+      ModelInformationItem.createInstance("Max instances", !_.isNil(model.max) ? String(model.max) :
+        Constants.ModelInfo.UNLIMITED_DEFAULT)
     ] : [];
 
     const instanceInfo = !_.isEmpty(instance) ? [
index f9da426..f9a11ea 100644 (file)
@@ -61,7 +61,7 @@
           (click)="openTemplateModal()"
         ><span>Template</span></button>
         <button
-          *ngIf=isInstantiationStatusFilterFlagOn()
+          *ngIf="isShowPreviousInstantiationBtn"
           [attr.data-tests-id]="'ShowPreviousInstancesButton'"
           type="button" class="btn btn-success submit"
           (click)="formPopupDetails.onOtherAction(formPopupDetails.that, dynamicForm)">
index 159871f..3939e44 100644 (file)
@@ -46,6 +46,7 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
   type: PopupType;
   uuidData: UUIDData;
   showTemplateBtn: boolean = false;
+  isShowPreviousInstantiationBtn: boolean = false;
   isUpdateMode: boolean;
   node: ITreeNode = null;
   hasGeneralApiError: boolean = false;
@@ -85,29 +86,7 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
       .subscribe(params => {
         console.log('changed');
         if (params['serviceModelId'] && params['isCreate'] == "true") {
-          this._genericFormPopupService.initReduxOnCreateNewService().then((serviceModelId: string) => {
-            this.uuidData = <any>{
-              bulkSize: 1,
-              isMacro: this._store.getState().service.serviceHierarchy[serviceModelId].service.vidNotions.instantiationType === 'Macro',
-              type: PopupType.SERVICE,
-              serviceId: serviceModelId,
-              popupService: this._servicePopupService,
-            };
-            this.showTemplateBtn = !!this._store.getState().global.flags["FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"];
-
-            this.uuidData.popupService.closeDialogEvent.subscribe((that) => {
-              this.closeDialog(that);
-            });
-
-            this.formPopupDetails = this.uuidData.popupService.getGenericFormPopupDetails(
-              this.uuidData['serviceId'],
-              null,
-              null,
-              this.node,
-              this.uuidData,
-              false
-            );
-          });
+          this.onInitForCreateNewServicePopup();
         }
       });
 
@@ -125,6 +104,34 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
     }
   }
 
+  private onInitForCreateNewServicePopup() {
+    this._genericFormPopupService.initReduxOnCreateNewService().then((serviceModelId: string) => {
+      this.uuidData = <any>{
+        bulkSize: 1,
+        isMacro: this._store.getState().service.serviceHierarchy[serviceModelId].service.vidNotions.instantiationType === 'Macro',
+        type: PopupType.SERVICE,
+        serviceId: serviceModelId,
+        popupService: this._servicePopupService,
+      };
+      this.showTemplateBtn = !!this._store.getState().global.flags["FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"];
+
+      this.isShowPreviousInstantiationBtn = !!this._store.getState().global.flags["FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER"];
+
+      this.uuidData.popupService.closeDialogEvent.subscribe((that) => {
+        this.closeDialog(that);
+      });
+
+      this.formPopupDetails = this.uuidData.popupService.getGenericFormPopupDetails(
+        this.uuidData['serviceId'],
+        null,
+        null,
+        this.node,
+        this.uuidData,
+        false
+      );
+    });
+  }
+
   hasSomeError(formPopupDetails: FormPopupDetails, form: FormGroup): boolean {
     if (_.isNil(formPopupDetails)) return false;
     else {
@@ -148,9 +155,6 @@ export class GenericFormPopupComponent extends DialogComponent<PopupModel, boole
     this._dialogService.addDialog(InstantiationTemplatesModalComponent, {});
   }
 
-  isInstantiationStatusFilterFlagOn() {
-    return FeatureFlagsService.getFlagState(Features.FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER, this._store);
-  }
 }
 
 
index 2f19044..c4317f2 100644 (file)
@@ -2334,6 +2334,10 @@ describe('vnf new popup service', () => {
     expect(service.modelInformations[13].values).toEqual(['5']);
   });
 
+  test('when there is no max instances in model , shell return maximum item with Unlimited text', () =>{
+    expect(service.createMaximumToInstantiateModelInformationItem({}).values[0]).toEqual('Unlimited (default)');
+  });
+
   test('getSubLeftTitle new vnf popup should return service model name', () => {
     service.uuidData = {
       serviceId: '6e59c5de-f052-46fa-aa7e-2fca9d674c44',
index b23f745..2836032 100644 (file)
@@ -97,11 +97,21 @@ export class VnfPopupService implements GenericPopupInterface{
         new ModelInformationItem("Service type", "serviceType", [this.serviceModel.serviceType]),
         new ModelInformationItem("Service role", "serviceRole", [this.serviceModel.serviceRole]),
         new ModelInformationItem("Minimum to instantiate", "vnf-min", [!_.isNil(this.model.min) ? this.model.min.toString() : '0'], "", false),
-        new ModelInformationItem("Maximum to instantiate", "vnf-max", [!_.isNil(this.model.max) ? this.model.max.toString() : '1'], "", false)
+        (this.createMaximumToInstantiateModelInformationItem(this.model))
         ];
     })
   }
 
+  createMaximumToInstantiateModelInformationItem(model) {
+    return new ModelInformationItem(
+      "Maximum to instantiate",
+      "vnf-max",
+      [!_.isNil(model.max) ? model.max.toString() : Constants.ModelInfo.UNLIMITED_DEFAULT],
+      "",
+      false
+    );
+  }
+
   getSubLeftTitle(): string {
     return "VNF MODEL: " + this._store.getState().service.serviceHierarchy[this.uuidData['serviceId']].vnfs[this.uuidData['modelName']].name;
   }
index c231c60..19f641a 100644 (file)
           </div>
         </div>
         <div class="col-md-6">
-          <input
-            (keypress)="onFilterKeypress($event)"
-            class="filter-input form-control input-text"
-            placeholder="Filter...">
+          <div class="col-md-6">
+          </div>
+          <div class="col-md-6">
+            <input
+              class="filter-input form-control input-text"
+              placeholder="Filter..."
+              [(ngModel)]="filterText">
+          </div>
         </div>
-
       </div>
       <div class="row" style="margin-left: 0;margin-right: 0;padding: 20px;">
         <table id="member-table" class="table table-bordered" style="table-layout: fixed">
@@ -37,7 +40,7 @@
             <th class="header-title" id="header-userId">User ID</th>
             <th class="header-title" id="header-createDate" style="width: 21ch;">Date</th>
             <th class="header-title" id="header-instanceName" style="max-width: 50ch;">Instance Name</th>
-            <th class="header-title" id="header-instantiationStatus">Instantiation Status</th>
+            <th class="header-title" id="header-instantiationStatus" style="width: 30ch;">Instantiation Status</th>
             <th class="header-title" id="header-summary">Summary</th>
             <th class="header-title" id="header-region">Region</th>
             <th class="header-title" id="header-tenant">Tenant</th>
@@ -46,7 +49,7 @@
           </thead>
           <tbody>
           <tr class="member-table-row"
-              *ngFor="let item of filterTableData;"
+              *ngFor="let item of filterTableData | searchFilter: filterText ;"
               (click)="selectedJobId = item.jobId"
               [ngClass]="{'selected' : selectedJobId === item.jobId}"
               [attr.data-tests-id]="'row-' + item.jobId">
index ef8d01a..267d2ce 100644 (file)
@@ -166,7 +166,11 @@ $grid-border: 1px #d2d2d2 solid;
 
   .filter-input {
     float: right;
-    width: 25%;
+    width: 50%;
+  }
+
+  .details-item {
+    text-align: right;
   }
 
 
@@ -187,6 +191,6 @@ $grid-border: 1px #d2d2d2 solid;
   }
 
   .member-table-row.selected {
-    background: #009fdbb5 !important;
+    background: #8080808f !important;
   }
 }
index 56abe5b..4d89750 100644 (file)
@@ -18,6 +18,7 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
   templateModalComponentService: InstantiationTemplatesModalService;
   originalTableData: InstantiationTemplatesRowModel[] = [];
   filterTableData : InstantiationTemplatesRowModel[] = [];
+  filterText: string;
 
   constructor(dialogService: DialogService,
               private _iframeService: IframeService,
@@ -29,6 +30,7 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
   }
 
   ngOnInit(): void {
+    this.filterText = '';
     this._route
       .queryParams
       .subscribe(params => {
@@ -44,12 +46,12 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
   };
 
 
-  onFilterKeypress = (event : KeyboardEvent) => {
-    //event.target.value
-      console.log(event.altKey);
-  };
-
   closeModal(): void {
+    this._iframeService.removeClassCloseModal('content');
     this.dialogService.removeDialog(this);
+    setTimeout(() => {
+      window.parent.postMessage("closeIframe", "*");
+    }, 15);
+
   }
 }
index 4f11cd1..f793e05 100644 (file)
@@ -297,4 +297,8 @@ export module Constants {
   export class LegacyRegion {
     public static MEGA_REGION = ['AAIAIC25'];
   }
+
+  export class ModelInfo {
+    public static UNLIMITED_DEFAULT = 'Unlimited (default)';
+  }
 }