How to use the @f5devcentral/f5-cloud-libs.util.MEDIUM_RETRY function in @f5devcentral/f5-cloud-libs

To help you get started, we’ve selected a few @f5devcentral/f5-cloud-libs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github F5Networks / f5-declarative-onboarding / src / lib / doUtil.js View on Github external
error.code = 424;
                            reject(error);
                            return;
                        }
                        resolve(true);
                    });
                } catch (error) {
                    // if DNS.resolve errors it throws an exception instead of rejecting
                    error.message = `Unable to resolve host ${addrToCheck}: ${error.message}`;
                    error.code = 424;
                    reject(error);
                }
            });
        }

        return cloudUtil.tryUntil(this, cloudUtil.MEDIUM_RETRY, checkDns, [address]);
    },
github F5Networks / f5-declarative-onboarding / src / lib / systemHandler.js View on Github external
&& dhcpStats.apiRawValues.apiAnonymous
                            && dhcpStats.apiRawValues.apiAnonymous.indexOf('running') !== -1) {
                            return Promise.resolve();
                        }

                        let message;
                        if (dhcpStats.apiRawValues && dhcpStats.apiRawValues.apiAnonymous) {
                            message = `dhclient status is ${dhcpStats.apiRawValues.apiAnonymous}`;
                        } else {
                            message = 'Unable to read dhclient status';
                        }
                        return Promise.reject(new Error(message));
                    });
            }

            return cloudUtil.tryUntil(this, cloudUtil.MEDIUM_RETRY, isDhcpRunning);
        });
}
github F5Networks / f5-declarative-onboarding / src / lib / networkHandler.js View on Github external
matchingRoutes.forEach((matchingRoute) => {
                routeDeletePromises.push(
                    this.bigIp.delete(
                        `${PATHS.Route}/~${matchingRoute.partition}~${matchingRoute.name}`,
                        null,
                        null,
                        cloudUtil.MEDIUM_RETRY
                    )
                );
                deletedRoutes.push(matchingRoute);
            });
            return Promise.all(routeDeletePromises);
github F5Networks / f5-declarative-onboarding / src / lib / networkHandler.js View on Github external
routesToRecreate.forEach((route) => {
                    const routeBody = {
                        name: route.name,
                        partition: route.partition,
                        gw: route.gw,
                        network: route.network,
                        mtu: route.mtu
                    };
                    createPromises.push(
                        this.bigIp.create(PATHS.Route, routeBody, null, cloudUtil.MEDIUM_RETRY)
                    );
                });
                return Promise.all(createPromises);