How to use the @f5devcentral/f5-cloud-libs.util.NO_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
.then((promptSaysRebootRequired) => {
                // Double check the db var. If either the prompt or the db var says
                // reboot required, then reboot is required.
                if (!promptSaysRebootRequired) {
                    return bigIp.list('/tm/sys/db/provision.action', null, cloudUtil.NO_RETRY)
                        .then(response => Promise.resolve(response.value === 'reboot'));
                }
                return Promise.resolve(true);
            })
            .then(rebootRequired => Promise.resolve(rebootRequired));
github F5Networks / f5-declarative-onboarding / src / lib / deleteHandler.js View on Github external
Object.keys(this.declaration.Common[deleteableClass]).forEach((itemToDelete) => {
                    // Special case for device groups
                    if (deleteableClass === 'DeviceGroup') {
                        if (READ_ONLY_DEVICE_GROUPS.indexOf(itemToDelete) === -1) {
                            classPromises.push(this.bigIp.cluster.deleteDeviceGroup(itemToDelete));
                        }
                    } else if (deleteableClass === 'RemoteAuthRole') {
                        const path = `${PATHS.AuthRemoteRole}/${itemToDelete}`;
                        classPromises.push(this.bigIp.delete(path, null, null, cloudUtil.NO_RETRY));
                    } else if (deleteableClass === 'RouteDomain' && itemToDelete === '0') {
                        // Route Domain 0 can't be deleted
                    } else {
                        const commonPrefix = deleteableClass === 'Trunk' ? '' : '~Common~';
                        const path = `${PATHS[deleteableClass]}/${commonPrefix}${itemToDelete}`;
                        classPromises.push(this.bigIp.delete(path, null, null, cloudUtil.NO_RETRY));
                    }
                });
                if (classPromises.length > 0) {
github F5Networks / f5-declarative-onboarding / test / unit / src / lib / doUtilTests.js View on Github external
beforeEach(() => {
            sinon.stub(dns, 'lookup').callsArg(1);
            sinon.stub(cloudUtilMock, 'MEDIUM_RETRY').value(cloudUtilMock.NO_RETRY);
        });
        afterEach(() => {
github F5Networks / f5-declarative-onboarding / src / lib / networkHandler.js View on Github external
promise = promise.then(() => this.bigIp.delete(
                `${PATHS.Route}/~Common~${route.name}`,
                null,
                null,
                cloudUtil.NO_RETRY
            ));
        }
github F5Networks / f5-declarative-onboarding / src / lib / deleteHandler.js View on Github external
serverNames.forEach((server) => {
                        authPromises.push(
                            this.bigIp.delete(
                                `${PATHS.AuthRadiusServer}/~Common~${server}`,
                                null, null, cloudUtil.NO_RETRY
                            )
                        );
                    });
                }
github F5Networks / f5-declarative-onboarding / src / lib / systemHandler.js View on Github external
function isDhcpRunning() {
                return this.bigIp.list('/tm/sys/service/dhclient/stats', undefined, cloudUtil.NO_RETRY)
                    .then((dhcpStats) => {
                        if (dhcpStats.apiRawValues
                            && 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));
                    });
            }
github F5Networks / f5-cloud-libs-gce / lib / gceCloudProvider.js View on Github external
.then(() => {
            return masterBigIp.ready(cloudUtil.NO_RETRY);
        })
        .then(() => {
github F5Networks / f5-declarative-onboarding / nodejs / deleteHandler.js View on Github external
Object.keys(this.declaration.Common[classKey]).forEach((itemKey) => {
                const path = `${PATHS[classKey]}/~Common~${itemKey}`;
                promises.push(this.bigIp.delete(path, null, null, cloudUtil.NO_RETRY));
            });
        });