Advanced Cluster Management - NGUI

	- Added new OKA packages module under packages
	- Added Profiless, KSU under k8s section
	- Feature 11020. 11022, 11023, 11024, 11025, 11026

Change-Id: Ibddeb4d5693ce24d80e378277693405c810f6e04
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/utilities/compose-packages/ComposePackages.html b/src/app/utilities/compose-packages/ComposePackages.html
index 03ec3b7..048e8cd 100644
--- a/src/app/utilities/compose-packages/ComposePackages.html
+++ b/src/app/utilities/compose-packages/ComposePackages.html
@@ -17,11 +17,16 @@
 -->
 <form [formGroup]="packagesForm" (ngSubmit)="createPackages()" autocomplete="off">
   <div class="modal-header">
-    <h4 class="modal-title" *ngIf="!template" id="modal-basic-title">{{'CREATEPACKAGE' | translate}}</h4>
+    <h4 class="modal-title" *ngIf="params.page === 'vnf-packages' || params.page === 'ns-packages'"
+      id="modal-basic-title">{{'CREATEPACKAGE' | translate}}</h4>
     <h4 class="modal-title" *ngIf="params.page === 'ns-config-template'" id="modal-basic-title">
       {{'PAGE.NSCONFIGTEMPLATE.CREATENSCONFIGTEMPLATE' | translate}}</h4>
     <h4 class="modal-title" *ngIf="params.page === 'ns-config-template-edit'" id="modal-basic-title">
       {{'PAGE.NSCONFIGTEMPLATE.EDITNSCONFIGTEMPLATE' | translate}}</h4>
+    <h4 class="modal-title" *ngIf="params.page === 'oka-packages'" id="modal-basic-title">
+      {{'Create New OKA' | translate}}</h4>
+    <h4 class="modal-title" *ngIf="params.page === 'oka-packages-edit'" id="modal-basic-title">
+      {{'Edit OKA' | translate}}</h4>
     <button class="button-xs" type="button" class="close" (click)="activeModal.close()">
       <i class="fas fa-times-circle text-danger"></i>
     </button>
@@ -31,7 +36,8 @@
       <label class="col-sm-12 col-form-label mandatory-label"
         [ngClass]="{'text-danger': packagesForm.invalid === true && submitted === true}">{{'MANDATORYCHECK' |
         translate}}</label>
-      <label class="col-sm-6 col-form-label" *ngIf="!template else configtemplate">{{'PACKAGE' | translate}} {{'NAME' | translate}}*</label>
+      <label class="col-sm-6 col-form-label" *ngIf="!template else configtemplate">{{'PACKAGE' | translate}} {{'NAME' |
+        translate}}*</label>
       <ng-template #configtemplate>
         <label class="col-sm-6 col-form-label">{{'NAME' | translate}}*</label>
       </ng-template>
@@ -40,6 +46,14 @@
           [ngClass]="{ 'is-invalid': submitted && f.name.errors }" required>
       </div>
     </div>
+    <div class="form-group row mb-3" *ngIf="oka">
+      <label class="col-sm-6 col-form-label" for="description">{{'PAGE.K8S.DESCRIPTION' | translate}}*</label>
+      <div class="col-sm-6">
+        <textarea class="form-control" placeholder="{{'PAGE.K8S.DESCRIPTION' | translate}}" type="text"
+          formControlName="description" id="description" [ngClass]="{ 'is-invalid': submitted && f.description.errors }"
+          required></textarea>
+      </div>
+    </div>
     <div class="form-group row mb-3" *ngIf="template">
       <label class="col-sm-6 col-form-label">{{'NSD' | translate}} {{'NAME' | translate}}*</label>
       <div class="col-sm-6">
@@ -61,12 +75,30 @@
         </div>
       </div>
     </div>
+    <div class="form-group row mb-3" *ngIf="oka">
+      <label class="col-sm-6 col-form-label">{{'PACKAGE' | translate}}*</label>
+      <div class="col-sm-6">
+        <label for="fileInput" class="custom-file-upload" *ngIf="this.params.page === 'oka-packages-edit'">
+          <input type="file" #fileInput class="fileupload custom-file-input" formControlName="package"
+            (change)="onFileDropped($event.target.files)" id="customFile">
+          <span>{{ selectedFileName }}</span>
+          <i class="fas fa-upload"></i>
+        </label>
+        <div class="custom-file" *ngIf="this.params.page === 'oka-packages'">
+          <input type="file" #fileInput class="fileupload custom-file-input" formControlName="package"
+            (change)="onFileDropped($event.target.files)" id="customFile">
+        </div>
+        <small class="text-info">{{'PAGE.K8S.UPLOADCONFIGGZLABEL' | translate}}</small>
+      </div>
+    </div>
   </div>
   <div class="modal-footer">
     <button type="button" class="btn btn-danger" (click)="activeModal.close()">{{'CANCEL' | translate}}</button>
-    <button type="submit" class="btn btn-primary">{{'CREATE' | translate}}</button>
-    <button *ngIf="params.page === 'ns-config-template-edit'" type="submit" class="btn btn-primary">{{'EDIT' |
-      translate}}</button>
+    <button
+      *ngIf="params.page === 'ns-config-template' || params.page === 'oka-packages' || params.page === 'vnf-packages' || params.page === 'ns-packages'"
+      type="submit" class="btn btn-primary">{{'CREATE' | translate}}</button>
+    <button *ngIf="params.page === 'ns-config-template-edit' || params.page === 'oka-packages-edit'" type="submit"
+      class="btn btn-primary">{{'Edit' | translate}}</button>
   </div>
 </form>
 <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader>
\ No newline at end of file
diff --git a/src/app/utilities/compose-packages/ComposePackages.scss b/src/app/utilities/compose-packages/ComposePackages.scss
index 021d205..e44771c 100644
--- a/src/app/utilities/compose-packages/ComposePackages.scss
+++ b/src/app/utilities/compose-packages/ComposePackages.scss
@@ -14,4 +14,34 @@
  limitations under the License.
 
  Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
-*/
\ No newline at end of file
+*/
+@import "../../../assets/scss/mixins/mixin";
+@import "../../../assets/scss/variable";
+
+.custom-file-upload {
+   display: flex;
+   position: relative;
+   cursor: pointer;
+   overflow: hidden;
+   padding: 8px 12px;
+   color: $primary;
+   border: 1px solid;
+   border: 1px solid;
+   border-color: #054c8c;
+   border-radius: 4px;
+   width: 100%;
+}
+
+.custom-file-upload input[type="file"] {
+   position: absolute;
+   left: 0;
+   top: 0;
+   opacity: 0;
+   cursor: pointer;
+}
+
+.custom-file-upload span {
+   color: $primary;
+   width: 100%;
+   align-items: center;
+}
diff --git a/src/app/utilities/compose-packages/ComposePackages.ts b/src/app/utilities/compose-packages/ComposePackages.ts
index 0dff17a..17adaa0 100644
--- a/src/app/utilities/compose-packages/ComposePackages.ts
+++ b/src/app/utilities/compose-packages/ComposePackages.ts
@@ -34,6 +34,7 @@
 import * as pako from 'pako';
 import { RestService } from 'RestService';
 import { SharedService, isNullOrUndefined } from 'SharedService';
+import { VNFD } from 'VNFDModel';
 
 /** This is added globally by the tar.js library */
 // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -77,6 +78,9 @@
   /** contains NSD name @public */
   public nsName: {}[] = [];
 
+  /** set the ns archieve file @public */
+  public okafile: File;
+
   /** contains NSD details @public */
   public nsdDetails: {}[];
 
@@ -92,12 +96,30 @@
   /** Check if template or not @public */
   public template = false;
 
+  /** Check if template or not @public */
+  public oka = false;
+
+  /** Check if template or not @public */
+  public package_name: string;
+
+  /** Element ref for fileInputConfigLabel @public */
+  @ViewChild('fileInput') fileInput: ElementRef<HTMLInputElement>;
+
+  /** Element ref for fileInputConfigLabel @public */
+  @ViewChild('fileInputLabel') fileInputLabel: ElementRef<HTMLLabelElement>;
+
   /** Data of NS config @public */
   public details: NSConfigData;
 
+  /** Data of OKA packages @public */
+  public packageData: VNFD;
+
   /** Data of NF packages @public */
   public nsConfigData: NSConfigData[] = [];
 
+  /** Contains selected file name @public */
+  public selectedFileName: string = 'Choose file...';
+
   /** Element ref for fileInputConfig @public */
   @ViewChild('fileInputConfig') fileInputConfig: ElementRef<HTMLInputElement>;
 
@@ -156,14 +178,34 @@
     this.initializeForm();
     if (this.params.page === 'ns-config-template') {
       this.template = true;
+      this.oka = false;
       this.getNsdPackageDetails();
+      this.getFormControl('description').disable();
     } else if (this.params.page === 'ns-config-template-edit') {
       this.template = true;
+      this.oka = false;
       this.getNsdPackageDetails();
       this.getFormControl('nsdId').disable();
-    } else {
+      this.getFormControl('description').disable();
+    } else if (this.params.page === 'oka-packages') {
+      this.oka = true;
+      this.template = false;
       this.getFormControl('nsdId').disable();
       this.getFormControl('config').disable();
+    } else if (this.params.page === 'oka-packages-edit') {
+      this.oka = true;
+      this.template = false;
+      this.addNullValueForInvalidFiles();
+      this.packagesForm.value.package = '';
+      this.getOkaDetails();
+      this.getFormControl('nsdId').disable();
+      this.getFormControl('config').disable();
+    } else {
+      this.oka = false;
+      this.template = false;
+      this.getFormControl('nsdId').disable();
+      this.getFormControl('config').disable();
+      this.getFormControl('description').disable();
     }
   }
 
@@ -172,15 +214,17 @@
     this.packagesForm = this.formBuilder.group({
       name: ['', [Validators.required]],
       nsdId: [null, [Validators.required]],
-      config: [null]
+      config: [null],
+      description: ['', [Validators.required]],
+      package: ['']
     });
   }
 
   /** Get NSD Package details @public */
   public getNsdPackageDetails(): void {
-    this.restService.getResource(environment.NSDESCRIPTORSCONTENT_URL)
-      .subscribe((nsdPackageData: NSDDetails[]): void => {
-        nsdPackageData.forEach((nsData: NSDDetails): void => {
+    this.restService.getResource(environment.OKAPACKAGES_URL)
+      .subscribe((nsdPackageData: []): void => {
+        nsdPackageData.forEach((nsData: VNFD): void => {
           const names: {} = {
             nsName: nsData.name,
             nsId: nsData._id
@@ -196,6 +240,23 @@
       });
   }
 
+  /** Get NSD Package details @public */
+  public getOkaDetails(): void {
+    this.addNullValueForInvalidFiles();
+    this.restService.getResource(environment.OKAPACKAGES_URL + '/' + this.params.id)
+      .subscribe((nsdPackageData: VNFD): void => {
+        this.packageData = nsdPackageData;
+        this.packagesForm.value.package = '';
+        this.package_name = nsdPackageData.name;
+        const package_file = nsdPackageData._admin.storage.zipfile;
+        this.selectedFileName = package_file;
+        this.packagesForm.patchValue({ name: this.package_name, description: nsdPackageData.description });
+        this.fileInput.nativeElement.value = null;
+      }, (error: ERRORDATA): void => {
+        this.restService.handleError(error, 'get');
+      });
+  }
+
   /** Get the NSD Content List & patch value in edit form @public */
   public getNSConfigDetails(URL: string, name: {}[]): void {
     this.restService.getResource(URL).subscribe((content: NSConfigData): void => {
@@ -226,6 +287,7 @@
     this.modalData = {
       message: 'Done'
     };
+    this.addNullValueForInvalidFiles();
     this.sharedService.cleanForm(this.packagesForm);
     if (!this.packagesForm.invalid) {
       this.isLoadingResults = true;
@@ -247,6 +309,29 @@
           this.isLoadingResults = false;
           this.notifierService.notify('error', this.translateService.instant('ERROR'));
         }
+      } else if (this.oka) {
+        try {
+          this.headers = new HttpHeaders({
+            Accept: 'application/json',
+            'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0'
+          });
+          if (this.params.page === 'oka-packages') {
+            const apiURLHeader: APIURLHEADER = {
+              url: environment.OKAPACKAGES_URL,
+              httpOptions: { headers: this.headers }
+            };
+            this.saveFileData(apiURLHeader);
+          } else {
+            const apiURLHeader: APIURLHEADER = {
+              url: environment.OKAPACKAGES_URL + '/' + this.params.id,
+              httpOptions: { headers: this.headers }
+            };
+            this.editFileData(apiURLHeader);
+          }
+        } catch (e) {
+          this.isLoadingResults = false;
+          this.notifierService.notify('error', this.translateService.instant('ERROR'));
+        }
       } else {
         try {
           this.headers = new HttpHeaders({
@@ -351,6 +436,68 @@
       this.restService.handleError(error, 'post');
     });
   }
+
+  /** Drag and drop feature and fetchind the details of files  @public */
+  public onFileDropped(files: FileList): void {
+    if (files && files.length === 1) {
+      const file: File = files[0];
+      if (this.sharedService.vaildataFileInfo(file, 'gz')) {
+        this.removeValidationDragDropFiles();
+        this.okafile = file;
+        this.selectedFileName = '';
+        if (this.params.page === 'oka-packages-edit') {
+          this.selectedFileName = files[0].name;
+        } else {
+          this.fileInputLabel.nativeElement.innerText = files[0].name;
+          this.fileInput.nativeElement.value = null;
+        }
+      } else {
+        this.notifierService.notify('error', this.translateService.instant('GZFILETYPEERRROR'));
+        this.addNullValueForInvalidFiles();
+      }
+    } else if (files && files.length > 1) {
+      this.notifierService.notify('error', this.translateService.instant('DROPFILESVALIDATION'));
+    }
+  }
+
+  /** Add Null value for invalid Files @public */
+  public addNullValueForInvalidFiles(): void {
+    this.getFormControl('package').setValue('');
+  }
+
+  /** Remove validation after drag drop Files @public */
+  public removeValidationDragDropFiles(): void {
+    this.getFormControl('package').setValidators([]);
+    this.getFormControl('package').updateValueAndValidity();
+  }
+
+
+  /** Post the droped files and reload the page @public */
+  public saveFileData(urlHeader: APIURLHEADER): void {
+    this.isLoadingResults = true;
+    this.packagesForm.value.package = this.okafile;
+    this.restService.postResource(urlHeader, this.toFormData(this.packagesForm.value)).subscribe((result: {}): void => {
+      this.activeModal.close(this.modalData);
+      this.isLoadingResults = false;
+      this.notifierService.notify('success', this.translateService.instant('OKA Package Created Successfully'));
+    }, (error: ERRORDATA): void => {
+      this.restService.handleError(error, 'post');
+      this.isLoadingResults = false;
+    });
+  }
+
+  /** Post the droped files and reload the page @public */
+  public editFileData(urlHeader: APIURLHEADER): void {
+    this.isLoadingResults = true;
+    this.restService.patchResource(urlHeader, this.toFormData(this.packagesForm.value)).subscribe((result: {}): void => {
+      this.activeModal.close(this.modalData);
+      this.isLoadingResults = false;
+      this.notifierService.notify('success', this.translateService.instant('OKA Package Edited Successfully'));
+    }, (error: ERRORDATA): void => {
+      this.restService.handleError(error, 'post');
+      this.isLoadingResults = false;
+    });
+  }
   /** Config file process @private */
   public configFile(files: FileList): void {
     if (files && files.length === 1) {
@@ -453,6 +600,55 @@
     return jsyaml.dump(packageYaml, { sortKeys: true });
   }
 
+  /** Form data @private */
+  private toFormData<T>(formValue: T): FormData {
+    const formData: FormData = new FormData();
+    for (const key of Object.keys(formValue)) {
+      // eslint-disable-next-line security/detect-object-injection
+      const value: string = formValue[key];
+      if (key === 'name') {
+        if (this.params.page === 'oka-packages') {
+          if (!isNullOrUndefined(this.packagesForm.value.name)) {
+            formData.append(key, this.packagesForm.value.name);
+          }
+        } else if (this.params.page === 'oka-packages-edit') {
+          if (this.package_name.localeCompare(this.packagesForm.value.name) === 0) {
+            delete this.packagesForm.value.name;
+          } else {
+            formData.append(key, this.packagesForm.value.name);
+          }
+        }
+        else {
+          formData.append(key, '');
+        }
+      } else if (key === 'description') {
+        if (this.params.page === 'oka-packages') {
+          if (!isNullOrUndefined(this.packagesForm.value.description)) {
+            formData.append(key, this.packagesForm.value.description);
+          }
+        } else if (this.params.page === 'oka-packages-edit') {
+          if (this.packageData.description.localeCompare(this.packagesForm.value.description) === 0) {
+            delete this.packagesForm.value.description;
+          } else {
+            formData.append(key, this.packagesForm.value.description);
+          }
+        }
+        else {
+          formData.append(key, '');
+        }
+      } else if (key === 'package') {
+        if (!isNullOrUndefined(this.okafile)) {
+          formData.append(key, this.okafile);
+        } else {
+          delete this.packagesForm.value.package;
+        }
+      } else {
+        formData.append(key, value);
+      }
+    }
+    return formData;
+  }
+
   /** Used to get the AbstractControl of controlName passed @private */
   private getFormControl(controlName: string): AbstractControl {
     // eslint-disable-next-line security/detect-object-injection
diff --git a/src/app/utilities/delete/DeleteComponent.html b/src/app/utilities/delete/DeleteComponent.html
index 513bc21..81cece0 100644
--- a/src/app/utilities/delete/DeleteComponent.html
+++ b/src/app/utilities/delete/DeleteComponent.html
@@ -16,9 +16,14 @@
 Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
 -->
 <div class="modal-header">
-  <h4 class="modal-title" id="modal-basic-title">
-    {{'DELETE' | translate}}
+  <h4 *ngIf="isRegisterPage; else Delete" class="modal-title" id="modal-basic-title">
+    {{'DEREGISTER' | translate}}
   </h4>
+  <ng-template #Delete>
+    <h4 class="modal-title" id="modal-basic-title">
+      {{'DELETE' | translate}}
+    </h4>
+  </ng-template>
   <button class="button-xs" type="button" class="close" aria-label="Close" (click)="activeModal.close()">
     <i class="fas fa-times-circle text-danger"></i>
   </button>
diff --git a/src/app/utilities/delete/DeleteComponent.ts b/src/app/utilities/delete/DeleteComponent.ts
index 445c511..c709672 100644
--- a/src/app/utilities/delete/DeleteComponent.ts
+++ b/src/app/utilities/delete/DeleteComponent.ts
@@ -56,7 +56,13 @@
   public isLoadingResults: Boolean = false;
 
   /** Check the page @public */
-  public isPage: Boolean = false;
+  public isPage = false;
+
+  /** Check the register page @public */
+  public isRegisterPage = false;
+
+  /** contain page @public */
+  public page: string;
 
   /** Number of instances @public */
   // eslint-disable-next-line @typescript-eslint/no-magic-numbers
@@ -114,6 +120,9 @@
       if (data.identifier !== undefined || data.identifier !== '' || data.identifier !== null) {
         this.id = data.identifier;
       }
+      if (sessionStorage.getItem('clusterType') === 'Registered') {
+        this.isRegisterPage = true;
+      }
       if (!isNullOrUndefined(this.params)) {
         if (this.params.page === 'instantiateNS') {
           this.isPage = true;
@@ -122,6 +131,10 @@
         } else if (this.params.page === 'ns-instance') {
           this.createDeleteUrl(data);
           this.isPage = false;
+        } else {
+          this.createTitleandID(data);
+          this.createDeleteUrl(data);
+          this.isPage = false;
         }
       } else {
         this.createTitleandID(data);
@@ -147,6 +160,7 @@
     }
   }
   /** Generate Delete url from data @public */
+  // eslint-disable-next-line complexity
   public createDeleteUrl(data: DELETEPARAMS): void {
     this.deleteURL = '';
     if (!isNullOrUndefined(this.params)) {
@@ -193,9 +207,6 @@
     } else if (data.page === 'sdn-controller') {
       this.deleteURL = environment.SDNCONTROLLER_URL;
       this.notifyMessage = 'DELETEDSUCCESSFULLY';
-    } else if (data.page === 'k8-cluster') {
-      this.deleteURL = environment.K8SCLUSTER_URL;
-      this.notifyMessage = 'DELETEDSUCCESSFULLY';
     } else if (data.page === 'k8-repo') {
       this.deleteURL = environment.K8REPOS_URL;
       this.notifyMessage = 'DELETEDSUCCESSFULLY';
@@ -205,6 +216,23 @@
     } else if (data.page === 'ns-config-template') {
       this.deleteURL = environment.NSCONFIGTEMPLATE_URL;
       this.notifyMessage = 'DELETEDSUCCESSFULLY';
+    } else if (data.page === 'k8-infra-profile') {
+      this.deleteURL = environment.K8SINFRACONFIGPROFILE_URL;
+    } else if (data.page === 'k8-infra-controller') {
+      this.deleteURL = environment.K8SINFRACONTROLLERPROFILE_URL;
+    } else if (data.page === 'k8-app-profile') {
+      this.deleteURL = environment.K8SAPPPROFILE_URL;
+    } else if (data.page === 'k8-resource-profile') {
+      this.deleteURL = environment.K8SRESOURCEPROFILE_URL;
+    } else if (data.page === 'oka-packages') {
+      this.deleteURL = environment.OKAPACKAGES_URL;
+    } else if (data.page === 'k8-ksu') {
+      this.deleteURL = environment.KSU_URL;
+    } else if (data.page === 'k8-cluster') {
+      this.page = data.page;
+      if (sessionStorage.getItem('clusterType') === 'Managed' || sessionStorage.getItem('clusterType') === 'Registered') {
+        this.deleteURL = environment.K8SCREATECLUSTER_URL;
+      }
     }
   }
   /** Generate Data function @public */
@@ -217,6 +245,8 @@
     if (this.forceDelete) {
       deletingURl = this.deleteURL + '/' + this.id + '?FORCE=true';
       this.notifyMessage = 'DELETEDSUCCESSFULLY';
+    } else if (this.page === 'k8-cluster' && sessionStorage.getItem('clusterType') === 'Registered') {
+      deletingURl = this.deleteURL + '/' + this.id + '/deregister';
     } else {
       deletingURl = this.deleteURL + '/' + this.id;
     }
diff --git a/src/app/utilities/oka-packages-action/OkaPackagesActionComponent.html b/src/app/utilities/oka-packages-action/OkaPackagesActionComponent.html
new file mode 100644
index 0000000..ca48eb6
--- /dev/null
+++ b/src/app/utilities/oka-packages-action/OkaPackagesActionComponent.html
@@ -0,0 +1,28 @@
+<!--
+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="btn-group list action" role="group">
+    <button [disabled]="state != 'CREATED'" type="button" class="btn btn-primary" (click)="deleteoka()" placement="top" container="body"
+      ngbTooltip="{{'DELETE' | translate}}">
+      <i class="far fa-trash-alt icons"></i>
+    </button>
+    <button [disabled]="state != 'CREATED'" type="button" class="btn btn-primary" (click)="okaEdit()" placement="top" container="body"
+      ngbTooltip="{{'EDIT' | translate}}">
+      <i class="far fa-edit icons"></i>
+    </button>
+  </div>
+  <app-loader [waitingMessage]="message" *ngIf="isLoadingDownloadResult"></app-loader>
\ No newline at end of file
diff --git a/src/app/utilities/oka-packages-action/OkaPackagesActionComponent.scss b/src/app/utilities/oka-packages-action/OkaPackagesActionComponent.scss
new file mode 100644
index 0000000..c55461a
--- /dev/null
+++ b/src/app/utilities/oka-packages-action/OkaPackagesActionComponent.scss
@@ -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)
+*/
\ No newline at end of file
diff --git a/src/app/utilities/oka-packages-action/OkaPackagesActionComponent.ts b/src/app/utilities/oka-packages-action/OkaPackagesActionComponent.ts
new file mode 100644
index 0000000..7fef0d9
--- /dev/null
+++ b/src/app/utilities/oka-packages-action/OkaPackagesActionComponent.ts
@@ -0,0 +1,103 @@
+/*
+ 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 okapackageAction Component
+ */
+import { Component, Injector } from '@angular/core';
+import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
+import { MODALCLOSERESPONSEDATA } from 'CommonModel';
+import { ComposePackages } from 'ComposePackages';
+import { DeleteComponent } from 'DeleteComponent';
+import { SharedService } from 'SharedService';
+import { VNFData } from 'VNFDModel';
+
+/**
+ * Creating component
+ * @Component takes OkaPackagesActionComponent.html as template url
+ */
+@Component({
+    templateUrl: './OkaPackagesActionComponent.html',
+    styleUrls: ['./OkaPackagesActionComponent.scss']
+})
+/** Exporting a class @exports OkaPackagesActionComponent */
+export class OkaPackagesActionComponent {
+    /** To get the value from the vnfpackage via valuePrepareFunction default Property of ng-smarttable @public */
+    public value: VNFData;
+
+    /** To inject services @public */
+    public injector: Injector;
+
+    /** Check the loading results for loader status @public */
+    public isLoadingDownloadResult: boolean = false;
+
+    /** Give the message for the loading @public */
+    public message: string = 'PLEASEWAIT';
+
+    /** Contains state @public */
+    public state: string;
+
+    /** Instance of the modal service @private */
+    private modalService: NgbModal;
+
+    /** Variables holds oka ID @private */
+    private okaID: string;
+
+    /** Contains all methods related to shared @private */
+    private sharedService: SharedService;
+
+    constructor(injector: Injector) {
+        this.injector = injector;
+        this.sharedService = this.injector.get(SharedService);
+        this.modalService = this.injector.get(NgbModal);
+    }
+
+    /**
+     * Lifecyle Hooks the trigger before component is instantiate
+     */
+    public ngOnInit(): void {
+        this.okaID = this.value.identifier;
+        this.state = this.value.state;
+    }
+
+    /** Delete NS Config oka @public */
+    public deleteoka(): void {
+        // eslint-disable-next-line security/detect-non-literal-fs-filename
+        const modalRef: NgbModalRef = this.modalService.open(DeleteComponent, { backdrop: 'static' });
+        modalRef.result.then((result: MODALCLOSERESPONSEDATA) => {
+            if (result) {
+                this.sharedService.callData();
+            }
+        }).catch((): void => {
+            // Catch Navigation Error
+        });
+    }
+
+    /** Set instance for oka Edit @public */
+    public okaEdit(): void {
+        // eslint-disable-next-line security/detect-non-literal-fs-filename
+        const modalRef: NgbModalRef = this.modalService.open(ComposePackages, { backdrop: 'static' });
+        modalRef.componentInstance.params = { id: this.okaID, page: 'oka-packages-edit' };
+        modalRef.result.then((result: MODALCLOSERESPONSEDATA) => {
+            if (result) {
+                this.sharedService.callData();
+            }
+        }).catch((): void => {
+            // Catch Navigation Error
+        });
+    }
+}