Class: BigIpCluster

BigIpCluster(bigIpCore, optionsopt)

Provides clustering functionality to a base BigIp object

Constructor

new BigIpCluster(bigIpCore, optionsopt)

Cluster constructor

Parameters:
Name Type Attributes Description
bigIpCore Object

Base BigIp object.

options Object <optional>

Optional parameters.

Properties
Name Type Attributes Description
logger Object <optional>

Logger to use. Or, pass loggerOptions to get your own logger.

loggerOptions Object <optional>

Options for the logger. See module:logger.getLogger for details.

Methods

addToDeviceGroup(deviceName, deviceGroup, retryOptionsopt) → {Promise}

Adds a device to a device group.

Parameters:
Name Type Attributes Description
deviceName String

Device name to add.

deviceGroup String

Name of the device group to add device to.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

addToTrust(deviceName, remoteHost, remoteUser, remotePassword, retryOptionsopt) → {Promise}

Adds a device to the trust group.

Parameters:
Name Type Attributes Description
deviceName String

Device name to add.

remoteHost String

IP address of remote host to add

remoteUser String

Admin user name on remote host

remotePassword String

Admin user password on remote host

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

areInDeviceGroup(deviceNames, deviceGroup, retryOptionsopt) → {Promise}

Checks to see if a device is in a device group

Parameters:
Name Type Attributes Description
deviceNames Array.<String>

Device names to check for.

deviceGroup String

Device group to look in.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved with an array of names that are in the device group and in deviceNames, or rejected if an error occurs.

Type
Promise

areInTrustGroup(deviceNames, retryOptionsopt) → {Promise}

Checks to see if a device is in the trust group

Parameters:
Name Type Attributes Description
deviceNames Array.<String>

Device names to check for.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved with an array of names that are in the trust group and in deviceNames, or rejected if an error occurs.

Type
Promise

configSyncIp(syncIp, retryOptionsopt) → {Promise}

Sets the config sync ip

Parameters:
Name Type Attributes Description
syncIp String

The IP address to use for config sync.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

createDeviceGroup(deviceGroup, type, deviceNamesopt, optionsopt, retryOptionsopt) → {Promise}

Creates a device group

Parameters:
Name Type Attributes Description
deviceGroup String

Name for device group.

type String

Type of device group. Must be 'sync-only' || 'sync-failover'.

deviceNames String | Array.<String> <optional>

Device name or array of names to add to the group.

options Object <optional>

Object containg device group options.

Properties
Name Type Attributes Description
autoSync Boolean <optional>

Whether or not to autoSync. Default false.

saveOnAutoSync Boolean <optional>

If autoSync is eanbled, whether or not to save on autoSync. Default false.

networkFailover Boolean <optional>

Whether or not to use network fail-over. Default false.

fullLoadOnSync Boolean <optional>

Whether or not to do a full sync. Default false.

asmSync Boolean <optional>

Whether or not do to ASM sync. Default false.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

deleteDeviceGroup(deviceGroup) → {Promise}

Deletes a device group

Parameters:
Name Type Description
deviceGroup String

Name of device group.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

getCmSyncStatus() → {Promise}

Gets cm sync status

Returns:

Promise which is resolved with a list of connected and disconnected host names

Type
Promise

hasDeviceGroup(deviceGroup, retryOptionsopt) → {Promise}

Checks for existence of a device group

Parameters:
Name Type Attributes Description
deviceGroup String

Name for device group.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved with true/false based on device group existence or rejected if an error occurs.

Type
Promise

isInDeviceGroup(deviceName, deviceGroup, retryOptionsopt) → {Promise}

Checks to see if a device is device group

Parameters:
Name Type Attributes Description
deviceName String

Device name to check for.

deviceGroup String

Device group to check in.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved with true or false or rejected if an error occurs.

Type
Promise

isInTrustGroup(deviceName, retryOptionsopt) → {Promise}

Checks to see if a device is in the trust group

Parameters:
Name Type Attributes Description
deviceName String

Device name to check for.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved with true or false or rejected if an error occurs.

Type
Promise

joinCluster(deviceGroup, remoteHost, remoteUser, remotePassword, isLocal, optionsopt) → {Promise}

Joins a cluster and optionally syncs.

This is a just a higher level function that calls other funcitons in this and other bigIp* files:

- Add to trust on remote host
- Add to remote device group
- Sync remote device group
- Check for datasync-global-dg and sync that as well if it is present
  (this is necessary so that we know when syncing is complete)

The device group must already exist on the remote host.

Parameters:
Name Type Attributes Description
deviceGroup String

Name of device group to join.

remoteHost String

Managemnt IP for the remote device.

remoteUser String

Remote device admin user name.

remotePassword String

Remote device admin user password.

isLocal Boolean

Whether the device group is defined locally or if we are joining one on a remote host.

options Object <optional>

Optional arguments.

Properties
Name Type Attributes Description
remotePort Number <optional>

Remote device port to connect to. Default the port of this device instance.

sync Boolean <optional>

Whether or not to perform a sync. Default true.

syncDelay Number <optional>

Delay in ms to wait after sending sync command before proceeding. Default 30000.

syncCompDelay Number <optional>

Delay in ms to wait between checking sync complete. Default 10000.

syncCompDevices Array.<String> <optional>

List of device names that should be connected. If defined, sync complete failures are ignored when device trust can not sync due to disconnected devices that are not in this list. Default is to leave undefined and fail on all sync complete failures.

passwordIsUrl Boolean <optional>

Indicates that password is a URL for the password.

passwordEncrypted Boolean <optional>

Indicates that the password is encrypted (with the local cloud public key)

remoteHostname String <optional>

If adding to a local group (isLocal === true) the cm hostname of the remote host.

noWait Boolean <optional>

Don't wait for configSyncIp, just fail if it's not ready right away. This is used for providers that have messaging - they will try again periodically

product String <optional>

The product we are running on (BIG-IP | BIG-IQ). Default is to determine the product programmatically.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs. If promise is resolved, it is is resolved with true if syncing occurred.

Type
Promise

removeAllFromDeviceGroup(deviceGroup, retryOptionsopt) → {Promise}

Removes all devices from a device group

Parameters:
Name Type Attributes Description
deviceGroup String

Name of device group.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

removeFromCluster(deviceNames) → {Promise}

Removes a device from cluster

This is a just a higher level function that calls other funcitons in this and other bigIp* files:

- Remove from device group
- Remove from trust
Parameters:
Name Type Description
deviceNames String | Array.<String>

Name or array of names of devices to remove

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

removeFromDeviceGroup(deviceNames, deviceGroup, retryOptionsopt) → {Promise}

Removes a device from a device group

Parameters:
Name Type Attributes Description
deviceNames String | Array.<String>

Name or array of names of devices to remove.

deviceGroup String

Name of device group.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

removeFromTrust(deviceNames, retryOptionsopt) → {Promise}

Removes a device from the device trust

Parameters:
Name Type Attributes Description
deviceNames String | Array.<String>

Name or array of names of devices to remove

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

resetTrust(retryOptionsopt) → {Promise}

Resets the device trust

Parameters:
Name Type Attributes Description
retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

sync(direction, deviceGroup, forceFullLoadPushopt, retryOptionsopt) → {Promise}

Syncs to/from device group

Parameters:
Name Type Attributes Description
direction String

'to-group' || 'from-group'

deviceGroup String

Name of the device group to sync.

forceFullLoadPush Boolean <optional>

Whether or not to use the force-full-load-push option. Default false.

retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

Returns:

A promise which is resolved when the request is complete or rejected if an error occurs.

Type
Promise

syncComplete(retryOptionsopt, optionsopt) → {Promise}

Checks sync status to see if it is complete

Parameters:
Name Type Attributes Description
retryOptions Object <optional>

Options for retrying the request.

Properties
Name Type Attributes Description
maxRetries Integer <optional>

Number of times to retry if first try fails. 0 to not retry. Default 60.

retryIntervalMs Integer <optional>

Milliseconds between retries. Default 10000.

options Object <optional>

Optional arguments.

Properties
Name Type Attributes Description
connectedDevices Array.<String> <optional>

List of device names that should be connected. If defined, sync complete failures are ignored when device trust can not sync due to disconnected devices that are not in this list. Default is to leave undefined and fail on all sync complete failures.

Returns:

A promise which is resolved if sync is complete, or rejected on error or recommended action.

Type
Promise