import {MessageModal} from "../../../messageModal/message-modal.service";
import {ButtonType} from "../../../customModal/models/button.type";
import {SharedTreeService} from "../../../../../drawingBoard/service-planning/objectsToTree/shared.tree.service";
+import {FeatureFlagsService, Features} from "../../../../services/featureFlag/feature-flags.service";
+import {PauseStatus} from "../../../../models/serviceInstanceActions";
export enum FormControlNames {
INSTANCE_NAME = 'instanceName',
private store: NgRedux<AppState>,
private http: HttpClient,
private _aaiService: AaiService,
- private _logService: LogService) {
+ private _logService: LogService,
+ private _featureFlagsService:FeatureFlagsService) {
this.aaiService = _aaiService;
}
}
private newVNFModel(serviceId: string, vnf: VnfInstance) {
- const vnfModelName: string = vnf.originalName;
+ const vnfModelName: string = this._sharedTreeService.modelUniqueNameOrId(vnf);
const serviceModelFromHierarchy = this.store.getState().service.serviceHierarchy[serviceId];
- const model = this._sharedTreeService.modelByIdentifier(serviceModelFromHierarchy, "vnfs", vnfModelName);
+ const model = this._sharedTreeService.modelByIdentifiers(serviceModelFromHierarchy, "vnfs", vnfModelName);
return new VNFModel(model);
}
}
const vnf: VnfInstance = this.store.getState().service.serviceInstance[serviceId].vnfs[vnfStoreKey];
const vnfModel = this.newVNFModel(serviceId, vnf);
-
const vfModuleInstance = this._basicControlGenerator.retrieveInstanceIfUpdateMode(this.store, this.getVfModuleInstance(serviceId, vnfStoreKey, uuidData, isUpdateMode));
let result: FormControlModel[] = [];
this.pushInstanceAndVGToForm(result, vfModuleInstance, serviceId, vnfModel, true);
- result.push(this._sharedControllersService.getLcpRegionControl(serviceId, vfModuleInstance, result));
- result.push(this._sharedControllersService.getLegacyRegion(vfModuleInstance));
- result.push(this._sharedControllersService.getTenantControl(serviceId, vfModuleInstance));
+ if( !this._featureFlagsService.getFlagState(Features.FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF)) {
+ result.push(this._sharedControllersService.getLcpRegionControl(serviceId, vfModuleInstance, result));
+ result.push(this._sharedControllersService.getLegacyRegion(vfModuleInstance));
+ result.push(this._sharedControllersService.getTenantControl(serviceId, vfModuleInstance));
+ }
result.push(this._sharedControllersService.getRollbackOnFailureControl(vfModuleInstance));
- result.push(this._sharedControllersService.getSDNCControl(vfModuleInstance, this.getSdncExtraContents()));
+ result.push(this._sharedControllersService.getSDNCControl(vfModuleInstance, false, this.getSdncExtraContents()));
+
+ if(this._featureFlagsService.getFlagState(Features.FLAG_2008_PAUSE_INSTANTIATION_ON_VFMODULE_POPUP)){
+ console.log(Features.FLAG_2008_PAUSE_INSTANTIATION_ON_VFMODULE_POPUP);
+ result.push(this._sharedControllersService.getPauseInstantiation(vfModuleInstance));
+ }
if (this.store.getState().global.flags['FLAG_SUPPLEMENTARY_FILE']) {
result = this._basicControlGenerator.concatSupplementaryFile(result, vfModuleInstance);
}