+ this.primitiveList = [];
+ if (!isNullOrUndefined(vnfInstances.df) && !isNullOrUndefined(vnfInstances['vdu-configuration'])) {
+ vnfInstances.df.forEach((df: DF): void => {
+ if (df['vdu-profile'] !== undefined) {
+ df['vdu-profile'].forEach((element: VDUPROFILE): void => {
+ const vduDataObj: VDUPROFILE = this.generateVDUData(element, vnfInstances['vdu-configuration']);
+ this.vduList.push(vduDataObj);
+ });
+ }
+ });
+ }
+ }
+ if (getType === 'KDU_Primitive') {
+ this.kduList = [];
+ this.vduList = [];
+ this.primitiveList = [];
+ if (!isNullOrUndefined(vnfInstances.kdu)) {
+ vnfInstances.kdu.forEach((kduData: KDUPRIMITIVELEVEL): void => {
+ if (kduData['kdu-configuration']) {
+ const kduDataObj: KDUPRIMITIVELEVEL = this.generateKDUData(kduData);
+ this.kduList.push(kduDataObj);
+ }
+ });
+ }
+ }
+ this.isLoadingResults = false;
+ }, (error: ERRORDATA): void => {
+ this.isLoadingResults = false;
+ this.restService.handleError(error, 'get');
+ });
+ }
+ /** Get primivitive actions from NSD data */
+ private getNSInfo(nsdRef: string): void {
+ this.primitiveList = [];
+ this.primitiveParameter = [];
+ this.getFormControl('primitive').setValue(null);
+ const apiUrl: string = environment.NSDESCRIPTORS_URL + '?name=' + nsdRef;
+ this.isLoadingResults = true;
+ this.restService.getResource(apiUrl)
+ .subscribe((nsdInfo: {}): void => {
+ if (!isNullOrUndefined(nsdInfo[0]['ns-configuration'])) {
+ this.primitiveList = !isNullOrUndefined(nsdInfo[0]['ns-configuration']['config-primitive']) ?
+ nsdInfo[0]['ns-configuration']['config-primitive'] : [];
+ } else {
+ this.primitiveList = [];