sync.master

Description

Contains methods to set up information about known-"masters", for use on the "slave" side of ISS

Namespace:

sync.master

Method: addToMaster

Description:

Add a single organizations to the list of those the specified Master has exported to this Slave

Parameters:

  • string sessionKey

  • int id - Id of the desired Master

  • struct - master-org details

    • int "masterOrgId"

    • string "masterOrgName"

    • int "localOrgId"

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: create

Description:

Create a new Master, known to this Slave.

Parameters:

  • string sessionKey

  • string label - Master’s fully-qualified domain name

Returns:

  • * struct - IssMaster info

    • int "id"

    • string "label"

    • string "caCert"

    • boolean "isCurrentMaster"

Method: delete

Description:

Remove the specified Master

Parameters:

  • string sessionKey

  • int id - Id of the Master to remove

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: getDefaultMaster

Description:

Return the current default-Master for this Slave

Parameters:

  • string sessionKey

Returns:

  • * struct - IssMaster info

    • int "id"

    • string "label"

    • string "caCert"

    • boolean "isCurrentMaster"

Method: getMaster

Description:

Find a Master by specifying its ID

Parameters:

  • string sessionKey

  • int id - Id of the desired Master

Returns:

  • * struct - IssMaster info

    • int "id"

    • string "label"

    • string "caCert"

    • boolean "isCurrentMaster"

Method: getMasterByLabel

Description:

Find a Master by specifying its label

Parameters:

  • string sessionKey

  • string label - Label of the desired Master

Returns:

  • * struct - IssMaster info

    • int "id"

    • string "label"

    • string "caCert"

    • boolean "isCurrentMaster"

Method: getMasterOrgs

Description:

List all organizations the specified Master has exported to this Slave

Parameters:

  • string sessionKey

  • int id - Id of the desired Master

Returns:

  • array :

  • struct - IssMasterOrg info

    • int "masterOrgId"

    • string "masterOrgName"

    • int "localOrgId"

Method: getMasters

Description:

Get all the Masters this Slave knows about

Parameters:

  • string sessionKey

Returns:

  • array :

  • struct - IssMaster info

    • int "id"

    • string "label"

    • string "caCert"

    • boolean "isCurrentMaster"

Method: hasMaster

Description:

Check if this host is reading configuration from an ISS master.

Parameters:

Returns:

  • boolean master - True if has an ISS master, false otherwise

Method: makeDefault

Description:

Make the specified Master the default for this Slave’s inter-server-sync

Parameters:

  • string sessionKey

  • int id - Id of the Master to make the default

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: mapToLocal

Description:

Add a single organizations to the list of those the specified Master has exported to this Slave

Parameters:

  • string sessionKey

  • int masterId - Id of the desired Master

  • int masterOrgId - Id of the desired Master

  • int localOrgId - Id of the desired Master

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setCaCert

Description:

Set the CA-CERT filename for specified Master on this Slave

Parameters:

  • string sessionKey

  • int id - Id of the Master to affect

  • string caCertFilename - path to specified Master’s CA cert

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setMasterOrgs

Description:

Reset all organizations the specified Master has exported to this Slave

Parameters:

  • string sessionKey

  • int id - Id of the desired Master

  • array :

    • struct - master-org details

      • int "masterOrgId"

      • string "masterOrgName"

      • int "localOrgId"

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: unsetDefaultMaster

Description:

Make this slave have no default Master for inter-server-sync

Parameters:

  • string sessionKey

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: update

Description:

Updates the label of the specified Master

Parameters:

  • string sessionKey

  • int id - Id of the Master to update

  • string label - Desired new label

Returns:

  • * struct - IssMaster info

    • int "id"

    • string "label"

    • string "caCert"

    • boolean "isCurrentMaster"