Feature 10922: Start, Stop and Rebuild 82/11982/5
authorSANDHYA.JS <sandhya.j@tataelxsi.co.in>
Mon, 2 May 2022 02:55:39 +0000 (08:25 +0530)
committerSANDHYA.JS <sandhya.j@tataelxsi.co.in>
Mon, 20 Jun 2022 13:31:56 +0000 (19:01 +0530)
*Added NG-UI support for Start, Stop and Rebuild
*In NS Instances page. Click "Start" or "Stop" or "Rebuild" in the actions menu.
        *Then a new pop-up page will be opened.
        *In the popup there will be fields containing membervnfIndex, vduid, count index mandatory fields to start, stop or rebuild VNF Instances
        *When the fields are selected then Click Apply button.
        *The pop-up window is closed and the page is directed to "History of operations" page

Change-Id: Idc0b6316af06b2190732beb198d1e74bcb8b23b0
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
12 files changed:
src/app/AppModule.ts
src/app/utilities/ns-instances-action/NSInstancesActionComponent.html
src/app/utilities/ns-instances-action/NSInstancesActionComponent.ts
src/app/utilities/start-stop-rebuild/StartStopRebuildComponent.html [new file with mode: 0644]
src/app/utilities/start-stop-rebuild/StartStopRebuildComponent.scss [new file with mode: 0644]
src/app/utilities/start-stop-rebuild/StartStopRebuildComponent.ts [new file with mode: 0644]
src/assets/i18n/de.json
src/assets/i18n/en.json
src/assets/i18n/es.json
src/assets/i18n/pt.json
src/models/NSInstanceModel.ts
tsconfig.json

index cc9af15..30c6842 100644 (file)
@@ -74,6 +74,7 @@ import { ScalingComponent } from 'ScalingComponent';
 import { SDNControllerActionComponent } from 'SDNControllerActionComponent';
 import { SharedModule } from 'SharedModule';
 import { ShowInfoComponent } from 'ShowInfoComponent';
+import { StartStopRebuildComponent } from 'StartStopRebuildComponent';
 import { SwitchProjectComponent } from 'SwitchProjectComponent';
 import { UsersActionComponent } from 'UsersActionComponent';
 import { UserSettingsComponent } from 'UserSettingsComponent';
@@ -133,7 +134,8 @@ const customNotifierOptions: NotifierOptions = {
         ChangePasswordComponent,
         VmMigrationComponent,
         NsUpdateComponent,
-        WarningComponent
+        WarningComponent,
+        StartStopRebuildComponent
     ],
     imports: [
         NotifierModule.withConfig(customNotifierOptions),
@@ -210,7 +212,8 @@ const customNotifierOptions: NotifierOptions = {
         ChangePasswordComponent,
         VmMigrationComponent,
         NsUpdateComponent,
-        WarningComponent
+        WarningComponent,
+        StartStopRebuildComponent
     ]
 })
 
index 92e462f..db3311a 100644 (file)
@@ -28,7 +28,26 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
     <button type="button" class="btn btn-primary" (click)="deleteNSInstance(false)" placement="top" container="body" ngbTooltip="{{'DELETE' | translate}}">
         <i class="far fa-trash-alt icons"></i>
     </button>
-    <div class="btn-group" ngbDropdown display="dynamic" container="body">
+    <div class="btn-group" placement="bottom-right" ngbDropdown display="dynamic" container="body">
+        <button type="button" class="btn btn-primary" ngbDropdownToggle placement="top" container="body" [disabled]="operationalStatus === 'failed' || configStatus === 'failed'" ngbTooltip="{{'VIMACTION' | translate}}">
+            <i class="fas fa-desktop"></i>
+        </button>
+        <div class="dropdown-menu list-action-dropdown" ngbDropdownMenu>
+            <button type="button" class="btn btn-primary dropdown-item" (click)="openStart('start')" placement="left"
+                data-container="body" ngbTooltip="{{'START' | translate}}">
+                <i class="fas fa-toggle-on"></i> {{'START' | translate}}
+            </button>
+            <button type="button" class="btn btn-primary dropdown-item" (click)="openStart('stop')" placement="left"
+                data-container="body" ngbTooltip="{{'STOP' | translate}}">
+                <i class="fas fa-toggle-off"></i> {{'STOP' | translate}}
+            </button>
+            <button type="button" class="btn btn-primary dropdown-item" (click)="openStart('rebuild')" placement="left"
+                data-container="body" ngbTooltip="{{'REBUILD' | translate}}">
+                <i class="fas fa-arrows-alt"></i> {{'REBUILD' | translate}}
+            </button>
+        </div>
+    </div>
+    <div class="btn-group" placement="bottom-right" ngbDropdown display="dynamic" container="body">
         <button type="button" class="btn btn-primary dropdown-toggle action-button" ngbDropdownToggle>
             {{'ACTION' | translate}}
         </button>
index 3735df7..1c3f1f2 100644 (file)
@@ -35,6 +35,7 @@ import { forkJoin, Observable } from 'rxjs';
 import { ScalingComponent } from 'ScalingComponent';
 import { SharedService } from 'SharedService';
 import { ShowInfoComponent } from 'ShowInfoComponent';
+import { StartStopRebuildComponent } from 'StartStopRebuildComponent';
 import { isNullOrUndefined } from 'util';
 import { VmMigrationComponent } from 'VmMigrationComponent';
 import { DF, VDU, VNFD } from 'VNFDModel';
@@ -284,6 +285,27 @@ export class NSInstancesActionComponent {
     }).catch();
   }
 
+  /** To open the Start, Stop & Rebuild pop-up */
+  public openStart(actionType: string): void {
+    const modalRef: NgbModalRef = this.modalService.open(StartStopRebuildComponent, { backdrop: 'static' });
+    modalRef.componentInstance.params = {
+      id: this.instanceID
+    };
+    if (actionType === 'start') {
+      modalRef.componentInstance.instanceTitle = this.translateService.instant('START');
+    } else if (actionType === 'stop') {
+      modalRef.componentInstance.instanceTitle = this.translateService.instant('STOP');
+    } else {
+      modalRef.componentInstance.instanceTitle = this.translateService.instant('REBUILD');
+    }
+    modalRef.componentInstance.instanceType = actionType;
+    modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => {
+      if (result) {
+        this.sharedService.callData();
+      }
+    }).catch();
+  }
+
   /**
    * Check any changes in the child component @public
    */
diff --git a/src/app/utilities/start-stop-rebuild/StartStopRebuildComponent.html b/src/app/utilities/start-stop-rebuild/StartStopRebuildComponent.html
new file mode 100644 (file)
index 0000000..b0bba96
--- /dev/null
@@ -0,0 +1,71 @@
+<!--
+Copyright 2020 TATA ELXSI
+
+Licensed under the Apache License, Version 2.0 (the 'License');
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
+-->
+<div class="modal-header">
+    <h4 class="modal-title" id="modal-basic-title"> {{instanceTitle}} </h4>
+    <button class="button-xs" type="button" class="close" aria-label="Close" (click)="activeModal.close()">
+        <i class="fas fa-times-circle text-danger"></i>
+    </button>
+</div>
+<form [formGroup]="startForm" (ngSubmit)="instanceCheck(instanceType)" autocomplete="off">
+    <div class="modal-body">
+        <div class="form-group row">
+            <label class="col-sm-12 col-form-label mandatory-label"
+                [ngClass]="{'text-danger': startForm.invalid === true && submitted === true}">
+                {{'MANDATORYCHECK' | translate}}
+            </label>
+            <div class="col-sm-6">
+                <label for="memberVnfIndex"> {{'MEMBERVNFINDEX' | translate}} *</label>
+            </div>
+            <div class="col-sm-6">
+                <ng-select (change)="getVdu($event.vnfinstanceId)" formControlName="memberVnfIndex" [clearable]="false"
+                    placeholder="{{'SELECTMEMBERVNFINDEX' | translate}}" [items]="memberTypes" bindLabel="id"
+                    bindValue="id" [ngClass]="{ 'is-invalid': submitted && f.memberVnfIndex.errors }">
+                </ng-select>
+                <small class="form-text text-muted" *ngIf="selectedvnfId !== ''">vnfd-id : {{ selectedvnfId }}</small>
+            </div>
+        </div>
+        <div class="form-group row">
+            <div class="col-sm-6">
+                <label for="vdu-id"> {{'VDUID' | translate}} *</label>
+            </div>
+            <div class="col-sm-6">
+                <ng-select formControlName="vduId" [clearable]="false"
+                    placeholder="{{'SELECT' | translate}} {{'VDUID' | translate}}" [items]="vdu" bindLabel="VDU"
+                    bindValue="VDU" [ngClass]="{ 'is-invalid': submitted && f.vduId.errors }">
+                </ng-select>
+            </div>
+        </div>
+        <div class="form-group row">
+            <div class="col-sm-6">
+                <label for="count-index"> {{'COUNTINDEX' | translate}} *</label>
+            </div>
+            <div class="col-sm-6">
+                <ng-select formControlName="countIndex" [clearable]="false"
+                    placeholder="{{'SELECT' | translate}} {{'COUNTINDEX' | translate}}" [items]="vdu"
+                    bindLabel="count-index" bindValue="count-index"
+                    [ngClass]="{ 'is-invalid': submitted && f.countIndex.errors }">
+                </ng-select>
+            </div>
+        </div>
+    </div>
+    <div class="modal-footer">
+        <button type="button" (click)="activeModal.close()" class="btn btn-danger">{{'CANCEL' | translate}}</button>
+        <button type="submit" class="btn btn-primary">{{'APPLY' | translate }}</button>
+    </div>
+</form>
+<app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader>
\ No newline at end of file
diff --git a/src/app/utilities/start-stop-rebuild/StartStopRebuildComponent.scss b/src/app/utilities/start-stop-rebuild/StartStopRebuildComponent.scss
new file mode 100644 (file)
index 0000000..f7fbc0a
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ Copyright 2020 TATA ELXSI
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
+*/
diff --git a/src/app/utilities/start-stop-rebuild/StartStopRebuildComponent.ts b/src/app/utilities/start-stop-rebuild/StartStopRebuildComponent.ts
new file mode 100644 (file)
index 0000000..18b6058
--- /dev/null
@@ -0,0 +1,278 @@
+/*
+ Copyright 2020 TATA ELXSI
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ Author: SANDHYA JS (sandhya.j@tataelxsi.co.in)
+*/
+/**
+ * @file StartStopRebuild Component
+ */
+import { HttpHeaders } from '@angular/common/http';
+import { Component, Injector, Input, OnInit } from '@angular/core';
+import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { Router } from '@angular/router';
+import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
+import { APIURLHEADER, ERRORDATA, MODALCLOSERESPONSEDATA, URLPARAMS } from 'CommonModel';
+import { environment } from 'environment';
+import { StartStopRebuild } from 'NSInstanceModel';
+import { RestService } from 'RestService';
+import { SharedService } from 'SharedService';
+import { isNullOrUndefined } from 'util';
+import { DF, VNFD } from 'VNFDModel';
+import { VDUR, VNFInstanceDetails } from 'VNFInstanceModel';
+
+/**
+ * Creating component
+ * @Component takes StartStopRebuildComponent.html as template url
+ */
+@Component({
+    selector: 'app-start-stop-rebuild',
+    templateUrl: './StartStopRebuildComponent.html',
+    styleUrls: ['./StartStopRebuildComponent.scss']
+})
+export class StartStopRebuildComponent implements OnInit {
+    /** To inject services @public */
+    public injector: Injector;
+    /** Instance for active modal service @public */
+    public activeModal: NgbActiveModal;
+    /** Check the loading results @public */
+    public isLoadingResults: Boolean = false;
+    /** Give the message for the loading @public */
+    public message: string = 'PLEASEWAIT';
+    /** FormGroup instance added to the form @ html @public */
+    public startForm: FormGroup;
+    /** Items for the memberVNFIndex @public */
+    public memberTypes: {}[];
+    /** Contains MemberVNFIndex values @public */
+    public memberVnfIndex: {}[] = [];
+    /** Contains vnfInstanceId of the selected MemberVnfIndex  @public */
+    public instanceId: string;
+    /** Items for vduId & countIndex @public */
+    public vdu: {}[];
+    /** Selected VNFInstanceId @public */
+    public selectedvnfId: string = '';
+    /** Check day1-2 operation  @public */
+    public 'day1-2': boolean;
+    /** Array holds VNFR Data filtered with nsr ID @public */
+    public nsIdFilteredData: {}[] = [];
+    /** Form valid on submit trigger @public */
+    public submitted: boolean = false;
+    /** Input contains Modal dialog component Instance @public */
+    @Input() public instanceType: string;
+    /** Input contains Modal dialog component Instance @public */
+    @Input() public instanceTitle: string;
+    /** Input contains component objects @private */
+    @Input() private params: URLPARAMS;
+    /** FormBuilder instance added to the formBuilder @private */
+    private formBuilder: FormBuilder;
+    /** Instance of the rest service @private */
+    private restService: RestService;
+    /** Controls the header form @private */
+    private headers: HttpHeaders;
+    /** Contains all methods related to shared @private */
+    private sharedService: SharedService;
+    /** Holds the instance of AuthService class of type AuthService @private */
+    private router: Router;
+    constructor(injector: Injector) {
+        this.injector = injector;
+        this.restService = this.injector.get(RestService);
+        this.activeModal = this.injector.get(NgbActiveModal);
+        this.formBuilder = this.injector.get(FormBuilder);
+        this.sharedService = this.injector.get(SharedService);
+        this.router = this.injector.get(Router);
+    }
+    /** convenience getter for easy access to form fields */
+    get f(): FormGroup['controls'] { return this.startForm.controls; }
+    /**
+     * Lifecyle Hooks the trigger before component is instantiate
+     */
+    public ngOnInit(): void {
+        this.initializeForm();
+        this.getMemberVnfIndex();
+        this.headers = new HttpHeaders({
+            'Content-Type': 'application/json',
+            Accept: 'application/json',
+            'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0'
+        });
+    }
+    /** Initialize start, stop or rebuild Forms @public */
+    public initializeForm(): void {
+        this.startForm = this.formBuilder.group({
+            memberVnfIndex: [null, [Validators.required]],
+            vduId: [null, [Validators.required]],
+            countIndex: [null, [Validators.required]]
+        });
+    }
+
+    /** Getting MemberVnfIndex using VNFInstances API @public */
+    public getMemberVnfIndex(): void {
+        const vnfInstanceData: {}[] = [];
+        this.restService.getResource(environment.VNFINSTANCES_URL).subscribe((vnfInstancesData: VNFInstanceDetails[]): void => {
+            vnfInstancesData.forEach((vnfData: VNFInstanceDetails): void => {
+                const vnfDataObj: {} =
+                {
+                    VNFD: vnfData['vnfd-ref'],
+                    VNFInstanceId: vnfData._id,
+                    MemberIndex: vnfData['member-vnf-index-ref'],
+                    NS: vnfData['nsr-id-ref'],
+                    VNFID: vnfData['vnfd-id']
+                };
+                vnfInstanceData.push(vnfDataObj);
+            });
+            const nsId: string = 'NS';
+            this.nsIdFilteredData = vnfInstanceData.filter((vnfdData: {}[]): boolean => vnfdData[nsId] === this.params.id);
+            this.nsIdFilteredData.forEach((resVNF: {}[]): void => {
+                const memberIndex: string = 'MemberIndex';
+                const vnfinstanceID: string = 'VNFInstanceId';
+                const assignMemberIndex: {} = {
+                    id: resVNF[memberIndex],
+                    vnfinstanceId: resVNF[vnfinstanceID]
+                };
+                this.memberVnfIndex.push(assignMemberIndex);
+            });
+            this.memberTypes = this.memberVnfIndex;
+            this.isLoadingResults = false;
+        }, (error: ERRORDATA): void => {
+            this.restService.handleError(error, 'get');
+            this.isLoadingResults = false;
+        });
+    }
+
+    /** Getting vdu-id & count-index from VNFInstance API */
+    public getVdu(id: string): void {
+        const vnfInstanceData: {}[] = [];
+        const vnfrDetails: {}[] = [];
+        this.getFormControl('vduId').setValue(null);
+        this.getFormControl('countIndex').setValue(null);
+        if (!isNullOrUndefined(id)) {
+            this.restService.getResource(environment.VNFINSTANCES_URL + '/' + id).
+                subscribe((vnfInstanceDetail: VNFInstanceDetails[]): void => {
+                    this.instanceId = id;
+                    this.selectedvnfId = vnfInstanceDetail['vnfd-ref'];
+                    const VDU: string = 'vdur';
+                    if (vnfInstanceDetail[VDU] !== undefined) {
+                        vnfInstanceDetail[VDU].forEach((vdu: VDUR): void => {
+                            const vnfInstanceDataObj: {} =
+                            {
+                                'count-index': vdu['count-index'],
+                                VDU: vdu['vdu-id-ref']
+
+                            };
+                            vnfInstanceData.push(vnfInstanceDataObj);
+                        });
+                        this.vdu = vnfInstanceData;
+                    }
+                    this.checkDay12Operation(this.selectedvnfId);
+                }, (error: ERRORDATA): void => {
+                    this.restService.handleError(error, 'get');
+                    this.isLoadingResults = false;
+                });
+        }
+    }
+
+    /** To check primitve actions from VNFR  */
+    public checkDay12Operation(id: string): void {
+        const apiUrl: string = environment.VNFPACKAGES_URL + '?id=' + id;
+        this.restService.getResource(apiUrl).subscribe((vnfdInfo: VNFD[]): void => {
+            const vnfInstances: VNFD = vnfdInfo[0];
+            if (!isNullOrUndefined(vnfInstances.df)) {
+                vnfInstances.df.forEach((df: DF): void => {
+                    if (df['lcm-operations-configuration'] !== undefined) {
+                        if (df['lcm-operations-configuration']['operate-vnf-op-config']['day1-2'] !== undefined) {
+                            this['day1-2'] = true;
+                        }
+                    } else {
+                        this['day1-2'] = false;
+                    }
+                });
+            }
+        }, (error: ERRORDATA): void => {
+            this.isLoadingResults = false;
+            this.restService.handleError(error, 'get');
+        });
+    }
+    /** Check Instance type is start or stop or rebuild and proceed action */
+    public instanceCheck(instanceType: string): void {
+        this.submitted = true;
+        this.sharedService.cleanForm(this.startForm);
+        if (this.startForm.invalid) { return; } // Proceed, onces form is valid
+        if (instanceType === 'start') {
+            const startPayload: StartStopRebuild = {
+                updateType: 'OPERATE_VNF',
+                operateVnfData: {
+                    vnfInstanceId: this.instanceId,
+                    changeStateTo: 'start',
+                    additionalParam: {
+                        'run-day1': false,
+                        vdu_id: this.startForm.value.vduId,
+                        'count-index': this.startForm.value.countIndex
+                    }
+                }
+            };
+            this.startInitialization(startPayload);
+        } else if (instanceType === 'stop') {
+            const stopPayload: StartStopRebuild = {
+                updateType: 'OPERATE_VNF',
+                operateVnfData: {
+                    vnfInstanceId: this.instanceId,
+                    changeStateTo: 'stop',
+                    additionalParam: {
+                        'run-day1': false,
+                        vdu_id: this.startForm.value.vduId,
+                        'count-index': this.startForm.value.countIndex
+                    }
+                }
+            };
+            this.startInitialization(stopPayload);
+        } else {
+            const rebuildPayload: StartStopRebuild = {
+                updateType: 'OPERATE_VNF',
+                operateVnfData: {
+                    vnfInstanceId: this.instanceId,
+                    changeStateTo: 'rebuild',
+                    additionalParam: {
+                        'run-day1': (this['day1-2'] === true) ? true : false,
+                        vdu_id: this.startForm.value.vduId,
+                        'count-index': this.startForm.value.countIndex
+                    }
+                }
+            };
+            this.startInitialization(rebuildPayload);
+        }
+    }
+
+    /** Initialize the start, stop or rebuild operation @public */
+    public startInitialization(startPayload: object): void {
+        this.isLoadingResults = true;
+        const apiURLHeader: APIURLHEADER = {
+            url: environment.NSDINSTANCES_URL + '/' + this.params.id + '/update',
+            httpOptions: { headers: this.headers }
+        };
+        const modalData: MODALCLOSERESPONSEDATA = {
+            message: 'Done'
+        };
+        this.restService.postResource(apiURLHeader, startPayload).subscribe((result: {}): void => {
+            this.activeModal.close(modalData);
+            this.router.navigate(['/instances/ns/history-operations/' + this.params.id]).catch();
+        }, (error: ERRORDATA): void => {
+            this.restService.handleError(error, 'post');
+            this.isLoadingResults = false;
+        });
+    }
+
+    /** Used to get the AbstractControl of controlName passed @private */
+    private getFormControl(controlName: string): AbstractControl {
+        return this.startForm.controls[controlName];
+    }
+}
index 9fa8bd4..3da4bea 100644 (file)
     "UPDATEPOLICIESCONTENT": "Diese Aktion umfasst die Neuerstellung der Richtlinien dieser VNF. Sind Sie sicher, dass Sie fortfahren möchten",
     "REDEPLOYCONTENT": "Diese Aktion umfasst die erneute Bereitstellung aller Ressourcen dieser VNF. Sind Sie sicher, dass Sie fortfahren möchten",
     "TERMINATEVNFCONTENT": "Diese Aktion beinhaltet das Beenden dieser VNF. Sind Sie sicher, dass Sie fortfahren möchten",
+    "REBUILD": "Wiederaufbau",
+    "START": "Start",
+    "STOP": "Halt",
+    "VIMACTION": "VIM-Aktion",
     "PAGE": {
         "DASHBOARD": {
             "DASHBOARD": "Instrumententafel",
index 6f00d56..8825b38 100644 (file)
     "UPDATEPOLICIESCONTENT": "This action involves recreating the policies of this VNF. Are you sure you want to proceed",
     "REDEPLOYCONTENT": "This action involves redeploying all resources of this VNF. Are you sure you want to proceed",
     "TERMINATEVNFCONTENT": "This action involves terminating this VNF. Are you sure you want to proceed",
+    "REBUILD": "Rebuild",
+    "START": "Start",
+    "STOP": "Stop",
+    "VIMACTION": "VIM Action",
     "PAGE": {
         "DASHBOARD": {
             "DASHBOARD": "Dashboard",
index 6c49608..c45ef4d 100644 (file)
     "UPDATEPOLICIESCONTENT": "Esta acción implica recrear las políticas de este VNF. Estas seguro que deseas continuar",
     "REDEPLOYCONTENT": "Esta acción implica redistribuir todos los recursos de este VNF. Estas seguro que deseas continuar",
     "TERMINATEVNFCONTENT": "Esta acción implica la terminación de este VNF. Estas seguro que deseas continuar",
+    "REBUILD": "Reconstruir",
+    "START": "Comienzo",
+    "STOP": "Parada",
+    "VIMACTION": "Acción VIM",
     "PAGE": {
         "DASHBOARD": {
             "DASHBOARD": "Tablero",
index 03b698f..7e936ce 100644 (file)
     "UPDATEPOLICIESCONTENT": "Esta ação envolve a recriação das políticas desta VNF. Tem certeza de que deseja continuar",
     "REDEPLOYCONTENT": "Esta ação envolve a redistribuição de todos os recursos desta VNF. Tem certeza de que deseja continuar",
     "TERMINATEVNFCONTENT": "Esta ação envolve encerrar este VNF. Tem certeza de que deseja continuar",
+    "REBUILD": "Reconstruir",
+    "START": "Começar",
+    "STOP": "Pare",
+    "VIMACTION": "Ação VIM",
     "PAGE": {
         "DASHBOARD": {
             "DASHBOARD": "painel de controle",
index 66a6da8..99af8d7 100644 (file)
@@ -185,6 +185,26 @@ export interface TERMINATEVNF {
     removeVnfInstanceId: string;
 }
 
+/** Interface for Start, Stop & Rebuild */
+export interface StartStopRebuild {
+    updateType: string;
+    operateVnfData: OPERATEVNFDATA;
+}
+
+/** Interface for operateVnfData  in Start, Stop and Rebuild */
+export interface OPERATEVNFDATA {
+    additionalParam: ADDITIONALPARAMS;
+    vnfInstanceId: string;
+    changeStateTo: string;
+}
+
+/** Interface for additionalParam in Start, Stop and Rebuild */
+export interface ADDITIONALPARAMS {
+    'run-day1': boolean;
+    'vdu_id': string;
+    'count-index': string;
+}
+
 /** Interface for InstantiateParam */
 interface InstantiateParam {
     nsdId: string;
index cba3c42..cce28e0 100644 (file)
             "VmMigrationComponent":  ["src/app/utilities/vm-migration/VmMigrationComponent"],
             "NsUpdateComponent":  ["src/app/utilities/ns-update/NsUpdateComponent"],
             "WarningComponent":  ["src/app/utilities/warning/WarningComponent"],
+            "StartStopRebuildComponent":  ["src/app/utilities/start-stop-rebuild/StartStopRebuildComponent"]
         }
     }
 }
\ No newline at end of file