Advacned Cluster Management Enhancements

	- Added force dleete support in KSU, OKA, Profile and cluster
	- Integrated upgrade api in cluster

Change-Id: Iaa0b342ce5e33b239e2f76622f3f837961e1cd8c
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.html b/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.html
index e8b57b6..e9ac743 100644
--- a/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.html
+++ b/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.html
@@ -29,12 +29,6 @@
     <h4 *ngIf="profileType === 'update'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.UPDATECLUSTER' |
       translate}}
     </h4>
-    <h4 *ngIf="profileType === 'vertical'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.VERTICALSCALING' |
-      translate}}
-    </h4>
-    <h4 *ngIf="profileType === 'horizontal'" class="modal-title" id="modal-basic-title">{{'PAGE.K8S.HORIZONTALSCALING' |
-      translate}}
-    </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>
@@ -163,20 +157,6 @@
           required>
       </div>
     </div>
-    <div class="form-group row mb-3" *ngIf="profileType === 'horizontal'">
-      <label class="col-sm-4 col-form-label" for="node_count">{{'PAGE.K8S.NODECOUNT' | translate}}</label>
-      <div class="col-sm-8">
-        <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NODECOUNT' | translate}}" type="text"
-          formControlName="nodeCount" id="node_count" [ngClass]="{ 'is-invalid': submitted && f.nodeCount.errors }">
-      </div>
-    </div>
-    <div class="form-group row mb-3" *ngIf="profileType === 'vertical'">
-      <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.NODESIZE' | translate}}</label>
-      <div class="col-sm-8">
-        <input autocomplete="off" class="form-control" placeholder="{{'PAGE.K8S.NODESIZE' | translate}}" type="text"
-          formControlName="nodeSize" id="k8s_version" [ngClass]="{ 'is-invalid': submitted && f.nodeSize.errors }">
-      </div>
-    </div>
     <div class="form-group row mb-3" *ngIf="profileType === 'upgrade'">
       <label class="col-sm-4 col-form-label" for="k8s_version">{{'PAGE.K8S.K8SVERSION' | translate}}</label>
       <div class="col-sm-8">
@@ -189,7 +169,7 @@
     <button type="button" class="btn btn-danger" (click)="activeModal.close()">{{'CANCEL' | translate}}</button>
     <button *ngIf="profileType === 'Manage'" type="submit" class="btn btn-primary">{{'CREATE' | translate}}</button>
     <button *ngIf="profileType === 'Register'" type="submit" class="btn btn-primary">{{'REGISTER' | translate}}</button>
-    <button *ngIf="profileType === 'upgrade' || profileType === 'vertical' || profileType === 'horizontal' || profileType === 'update'"
+    <button *ngIf="profileType === 'upgrade'|| profileType === 'update'"
       type="submit" class="btn btn-primary">{{'APPLY'
       | translate}}</button>
   </div>
diff --git a/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts b/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts
index 37ddc13..34ceeab 100644
--- a/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts
+++ b/src/app/k8s/k8s-add-cluster/K8sAddClusterComponent.ts
@@ -67,7 +67,7 @@
   public selectedDeploymentMethods: string[] = ['helm-chart-v3', 'juju-bundle'];
 
   /** Contains all action types */
-  public actionTypes: string[] = ['update', 'upgrade', 'horizontal', 'vertical'];
+  public actionTypes: string[] = ['update', 'upgrade'];
 
   /** Instance for active modal service @public */
   public activeModal: NgbActiveModal;
@@ -175,8 +175,6 @@
       node_size: ['', [Validators.required]],
       bootstrap: [true],
       k8sVersion: ['', [Validators.required]],
-      nodeCount: ['', [Validators.required]],
-      nodeSize: ['', [Validators.required]],
       update: ['']
     });
   }
@@ -204,10 +202,6 @@
         this.k8sclusterForm.patchValue({ update: k8sData.name, description: !isNullOrUndefined(k8sData.description) ? k8sData.description : '' });
       } else if (this.profileType === 'upgrade') {
         this.k8sclusterForm.patchValue({ k8sVersion: !isNullOrUndefined(k8sData.k8s_version) ? k8sData.k8s_version : '' });
-      } else if (this.profileType === 'horizontal') {
-        this.k8sclusterForm.patchValue({ nodeCount: !isNullOrUndefined(k8sData.node_count) ? k8sData.node_count : '' });
-      } else if (this.profileType === 'vertical') {
-        this.k8sclusterForm.patchValue({ nodeSize: !isNullOrUndefined(k8sData.node_size) ? k8sData.node_size : '' });
       }
       this.isLoadingResults = false;
     }, (error: ERRORDATA) => {
@@ -234,8 +228,6 @@
       this.getFormControl('credentials').disable();
       this.getFormControl('deployment_methods').disable();
       this.getFormControl('k8sVersion').disable();
-      this.getFormControl('nodeSize').disable();
-      this.getFormControl('nodeCount').disable();
       this.getFormControl('update').disable();
       this.manageCluster();
     } else if (this.profileType === 'Register' && this.isChecked === true) {
@@ -248,8 +240,6 @@
       this.getFormControl('nets').disable();
       this.getFormControl('deployment_methods').disable();
       this.getFormControl('k8sVersion').disable();
-      this.getFormControl('nodeSize').disable();
-      this.getFormControl('nodeCount').disable();
       this.getFormControl('update').disable();
       this.registerCluster();
     } if (this.isChecked === false && this.profileType === 'Register') {
@@ -260,12 +250,10 @@
       this.getFormControl('node_count').disable();
       this.getFormControl('node_size').disable();
       this.getFormControl('k8sVersion').disable();
-      this.getFormControl('nodeSize').disable();
-      this.getFormControl('nodeCount').disable();
       this.getFormControl('update').disable();
       this.oldregisterCluster();
-    } else if (this.profileType === 'upgrade' || this.profileType === 'horizontal' || this.profileType === 'vertical') {
-      this.clusterUrl = environment.K8SCREATECLUSTER_URL + '/' + this.profileID + '/' + 'update';
+    } else if (this.profileType === 'upgrade') {
+      this.clusterUrl = environment.K8SCREATECLUSTER_URL + '/' + this.profileID + '/' + 'upgrade';
       this.getFormControl('region_name').disable();
       this.getFormControl('resource_group').disable();
       this.getFormControl('nets').disable();
@@ -279,16 +267,6 @@
       this.getFormControl('node_size').disable();
       this.getFormControl('k8s_version').disable();
       this.getFormControl('update').disable();
-      if (this.profileType === 'upgrade') {
-        this.getFormControl('nodeCount').disable();
-        this.getFormControl('nodeSize').disable();
-      } else if (this.profileType === 'vertical') {
-        this.getFormControl('nodeCount').disable();
-        this.getFormControl('k8sVersion').disable();
-      } else if (this.profileType === 'horizontal') {
-        this.getFormControl('nodeSize').disable();
-        this.getFormControl('k8sVersion').disable();
-      }
       this.updateCluster();
     } else if (this.profileType === 'update') {
       this.clusterUrl = environment.K8SCREATECLUSTER_URL + '/' + this.profileID;
@@ -302,9 +280,7 @@
       this.getFormControl('node_count').disable();
       this.getFormControl('node_size').disable();
       this.getFormControl('k8s_version').disable();
-      this.getFormControl('nodeCount').disable();
       this.getFormControl('k8sVersion').disable();
-      this.getFormControl('nodeSize').disable();
       this.getFormControl('name').disable();
 
       this.editCluster();
@@ -486,14 +462,6 @@
       this.payload = {
         k8s_version: this.k8sclusterForm.value.k8sVersion
       };
-    } else if (this.profileType === 'vertical') {
-      this.payload = {
-        node_size: (this.k8sclusterForm.value.nodeSize)
-      };
-    } else if (this.profileType === 'horizontal') {
-      this.payload = {
-        node_count: Number(this.k8sclusterForm.value.nodeCount)
-      };
     }
     this.isLoadingResults = true;
     this.restService.postResource(apiURLHeader, this.payload).subscribe((result: {}) => {