fix: Fix for fip's binding resource that not belong to current project
fix for fip's binding resource that not belong to current project Change-Id: I26e52a4a31e7dd12023fe5fabfb748eb328870f2
This commit is contained in:
parent
7419565aa2
commit
9bfc537493
@ -107,26 +107,31 @@ export class FloatingIpStore extends Base {
|
|||||||
promises.push(Promise.resolve({}));
|
promises.push(Promise.resolve({}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const results = await Promise.all(promises);
|
const results = await Promise.allSettled(promises);
|
||||||
results.forEach((result, index) => {
|
results.forEach(({ status, value: result }, index) => {
|
||||||
let resource_name = '';
|
let resource_name = '-';
|
||||||
if (
|
if (status === 'fulfilled') {
|
||||||
allData[index].port_details &&
|
if (
|
||||||
allData[index].port_details.device_owner === 'compute:nova'
|
allData[index].port_details &&
|
||||||
) {
|
allData[index].port_details.device_owner === 'compute:nova'
|
||||||
resource_name = `${result.name}: ${allData[index].fixed_ip_address}`;
|
) {
|
||||||
} else if (
|
resource_name = `${result.name}: ${allData[index].fixed_ip_address}`;
|
||||||
allData[index].port_details &&
|
} else if (
|
||||||
(allData[index].port_details.device_owner ===
|
allData[index].port_details &&
|
||||||
'network:router_gateway' ||
|
(allData[index].port_details.device_owner ===
|
||||||
allData[index].port_details.device_owner === '')
|
'network:router_gateway' ||
|
||||||
) {
|
allData[index].port_details.device_owner === '')
|
||||||
resource_name = `${result.name}: ${allData[index].fixed_ip_address}`;
|
) {
|
||||||
} else if (
|
resource_name = `${result.name}: ${allData[index].fixed_ip_address}`;
|
||||||
allData[index].port_details &&
|
} else if (
|
||||||
allData[index].port_details.device_owner === 'Octavia'
|
allData[index].port_details &&
|
||||||
) {
|
allData[index].port_details.device_owner === 'Octavia'
|
||||||
resource_name = `${result.name}: ${allData[index].fixed_ip_address}`;
|
) {
|
||||||
|
resource_name = `${result.name}: ${allData[index].fixed_ip_address}`;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// deal with resources from other projects
|
||||||
|
resource_name = `${t('Resource Id')}: ${allData[index].port_details.device_id} `;
|
||||||
}
|
}
|
||||||
allData[index].resource_name = resource_name;
|
allData[index].resource_name = resource_name;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user