Skip to main content

Writing a script

Operation configuration

In order for agtpython to perform an operation, you must configure the corresponding operation function in your script. You write these functions to provide interaction details between Bravura Security Fabric and the target system.

Additionally, the login and logout operations are executed (if present in the script). The login is executed preceding an operation call. The logout is executed succeeding an operation call.

An operation function includes a cinfo dictionary object that contains the following:

  • userid The profile ID of the user

  • fullname The full name of the user

  • acctid The ID for the account that the user has on this system

  • newpw The new password (for password reset and create operations

  • oldpw The old password (for verify operations)

  • modeluid The template ID for create

  • groupid The group ID for group operations

  • groupname The group description for group operations

  • listattributes A list containing attributes to list and load

  • attributes A dictionary containing information about attributes to set during create and update operations, in the following general format:

    attributes = {'attrName': {'ACTION': 'VALUE'},
    
                              {'SEQUENCE': '-1'},
    
                              {'VALUE': ["VALUE1", "VALUE2"]},
    
                              {'GROUP': '0'}
    
                 }

The connect() and disconnect() functions also include the cinfo dictionary object with additional variables.

The following built-in variables are available for replacement:

  • address The target address

  • adminid Administrator ID

  • adminpw Administrator password

  • sysid System account ID

  • syspw System account password

  • settings A dictionary containing any additional settings, in the following format:

    settings = {'key1': 'value1',' key2': 'value2'}