- if (this.params.nsd.df.length > 0) {
- const getconstituentVNFD: {}[] = [];
- this.params.nsd.df.forEach((data: NSDF): void => {
- data['vnf-profile'].forEach((vnfProfile: VNFPROFILE): void => {
- const assignMemberIndex: {} = {
- id: vnfProfile.id,
- name: vnfProfile['vnfd-id']
- };
- getconstituentVNFD.push(assignMemberIndex);
- });
+ this.isLoadingResults = true;
+ const vnfInstanceData: {}[] = [];
+ this.restService.getResource(environment.VNFINSTANCES_URL).subscribe((vnfInstancesData: VNFInstanceDetails[]): void => {
+ vnfInstancesData.forEach((vnfData: VNFInstanceDetails): void => {
+ const vnfdRef: string = 'vnfd-ref';
+ const memberIndex: string = 'member-vnf-index-ref';
+ const nsrId: string = 'nsr-id-ref';
+ const vnfId: string = 'vnfd-id';
+ const vnfDataObj: {} =
+ {
+ // eslint-disable-next-line security/detect-object-injection
+ VNFD: vnfData[vnfdRef],
+ VNFInstanceId: vnfData._id,
+ // eslint-disable-next-line security/detect-object-injection
+ MemberIndex: vnfData[memberIndex],
+ // eslint-disable-next-line security/detect-object-injection
+ NS: vnfData[nsrId],
+ // eslint-disable-next-line security/detect-object-injection
+ VNFID: vnfData[vnfId]
+ };
+ vnfInstanceData.push(vnfDataObj);