Skip to main content

Return callbacks

Add Account Attribute

Adds an attribute and it's value(s) to the output KVG.

Signature: agent.addAccountAttr('name', valueList)

Parameters:

  • name - The name of the attribute

  • valueList - One or more values for the attribute

Remarks:

For the valueList either a single string value may be specified or a list of string values if the attribute can be multi-valued.

Add Address Attribute

Defines an address attribute for the scripted platform.

Signature: agent.addAddressAttr('name', 'desc', 'type', 'valueDefault', required, advancedOptions)

Parameters:

  • name - Name of the address attribute

  • desc - Description of the address attribute

  • type - The type of the address attribute

  • valueDefault - The default value that should be used if the address attribute is not specified

  • required - Boolean flag for If the address attribute is required to be specified

  • advancedOptions - Defines the potential values when adding a "restricted" type attribute

Remarks:

Valid options for the type parameter are: "boolean" "integer" "kvgroup" "restricted" "script" "string" "dir" "file" "readonly" "multivalue".

If an address attribute with restricted type is being added, the syntax for defining the restricted values in advancedOptions is:

{'restrictedValues':<list of potential restricted values>, 'advanced': 'true'}

Where the syntax for each restricted value option is:

{'value': '<value>', 'description': '<description>'}

Add Challenge

Adds a challenge string to the agent output.

Signature: agent.addChallenge('challenge')

Parameters:

  • challenge - The challenge string that should be returned

Remarks:

This callback should only be used with the Challenge Response operation

Add Custom Attributes

Adds attributes to a custom list file.

Signature: agent.addCustomAttrs('id', attrsDict)

Parameters:

  • id - ID for the object to add attributes for

  • attrsDict - Dictionary object of the attributes for the object

Remarks:

This callback should only be used with the custom operation. For the expected format on the attrsDict object see the definitions section for full details.

Add Group Attribute

Adds a group attribute and it's value(s) to the output KVG.

Signature: agent.addGroupAttr('name', valueList)

Parameters:

  • name - The name of the attribute

  • valueList - One or more values for the attribute

Remarks:

For the valueList either a single string value may be specified or a list of string values if the attribute can be multi-valued.

Add Retry Data

Adds the retry data to the agent output KVG.

Signature: agent.retryData('retrydata')

Parameters:

  • retrydata - The value for the data to retry for the operation.

Remarks:

This callback is usually used along with retryTime for agent codes such as ACTryAgainLater.

Add Retry Time

Adds the retry time to the agent output KVG.

Signature: agent.retryTime(retrytime)

Parameters:

  • retrytime - The value for the number of times to retry for the operation.

Remarks:

This callback is usually used along with retryData for agent codes such as ACTryAgainLater.

Add Response

Adds a response and it's attributes to the output KVG.

Signature: agent.addResponse('response', attrsDict)

Parameters:

  • response - The response message

  • attrsDict - Dictionary object of the attributes for the response

Remarks:

This callback should only be used with the challenge response operation. For the expected format on the attrsDict object see the definitions section for full details.

Add Supported Operation

Adds an operation to the supported operations for a platform

Signature: agent.addSupportedOp(operation)

Parameters:

  • operation - The string for the operation that should be supported

Remarks:

The operation string should take the form OpReset, OpGroupUserAdd, OpListUsers, etc.

Set Error Message

Sets the agent error message in the output KVG.

Signature: agent.error('errormsg')

Parameters:

  • errormsg - The message that should be set

Set Info Message

Sets the agent info message in the output KVG.

Signature: agent.info('infomsg')

Parameters:

  • infomsg - The message that should be set

Set Account Expired

Sets the account expiration value in the output KVG.

Signature: agent.isAcctExpired(expiredStatus)

Parameters:

  • expiredStatus - Boolean flag indicating if the account is expired or not

Remarks:

This callback should only be used with the isacctexpired operation

Set Account Enabled

Sets the account expired value in the output KVG.

Signature: agent.isEnabled(enabledStatus)

Parameters:

  • enabledStatus - Boolean flag indicating if the account is enabled or not

Remarks:

This callback should only be used with the isEnabled operation

Set Account Locked

Sets the account expired value in the output KVG.

Signature: agent.isLocked(lockedStatus)

Parameters:

  • lockedStatus - Boolean flag indicating if the account is locked or not

Remarks:

This callback should only be used with the isLocked operation

Set Groups

Sets the groups for a newly created account in the output KVG.

Signature: agent.groups(groupList)

Parameters:

  • groupList - One or more groups the account is a member of

Remarks:

This callback should only be used with the create operation

Set Password Expired

Sets the password expired value in the output KVG.

Signature: agent.isPwExpired(expiredStatus)

Parameters:

  • expiredStatus - Boolean flag indicating if the password is expired or not

Remarks:

This callback should only be used with the ispwexpired operation

Set Long ID

Sets the long id value for the object in the output KVG

Signature: agent.longId('longid')

Parameters:

  • longid - The long id of the object

Remarks:

This callback should only be used with the create, update, groupcreate and groupupdate operation

Set Server Info

Sets the server information in the output KVG.

Signature: agent.serverInfo('version', attrsDict)

Parameters:

  • version - Version string of the target system

  • attrsDict - Optional dictionary object of attributes of the target

Remarks:

This callback should only be used with the serverinfo operation. For the expected format on the attrsDict object see the definitions section for full details.

Set Short ID

Sets the short id value for the object in the output KVG.

Signature: agent.shortId('shortid')

Parameters:

  • shortid - The short id id of the object

Remarks:

This callback should only be used with the create, update, groupcreate and groupupdate operation.

Set Stable ID

Sets the stable id value for the object in the output KVG.

Signature: agent.stableId('stableid')

Parameters:

  • stableid - The stable id of the object

Remarks:

This callback should only be used with the create, update, groupcreate and groupupdate operation.

Set Warning Message

Sets the agent warning message in the output KVG.

Signature: agent.warning('warningmsg')

Parameters:

  • warningmsg - The message that should be set