org

Description

Contains methods to access common organization management functions available from the web interface.

Namespace:

org

Method: create

Description:

Create a new organization and associated administrator account.

Parameters:

  • string sessionKey

  • string orgName - Organization name. Must meet same criteria as in the web UI.

  • string adminLogin - New administrator login name.

  • string adminPassword - New administrator password.

  • string prefix - New administrator’s prefix. Must match one of the values available in the web UI. (i.e. Dr., Mr., Mrs., Sr., etc.)

  • string firstName - New administrator’s first name.

  • string lastName - New administrator’s first name.

  • string email - New administrator’s e-mail.

  • boolean usePamAuth - True if PAM authentication should be used for the new administrator account.

Returns:

  • * struct - organization info

    • int "id"

    • string "name"

    • int "active_users" - Number of active users in the organization.

    • int "systems" - Number of systems in the organization.

    • int "trusts" - Number of trusted organizations.

    • int "system_groups" - Number of system groups in the organization. (optional)

    • int "activation_keys" - Number of activation keys in the organization. (optional)

    • int "kickstart_profiles" - Number of kickstart profiles in the organization. (optional)

    • int "configuration_channels" - Number of configuration channels in the organization. (optional)

    • boolean "staging_content_enabled" - Is staging content enabled in organization. (optional)

Method: delete

Description:

Delete an organization. The default organization (i.e. orgId=1) cannot be deleted.

Parameters:

  • string sessionKey

  • int orgId

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: getDetails

Description:

The detailed information about an organization given the organization ID.

Parameters:

  • string sessionKey

  • int orgId

Returns:

  • * struct - organization info

    • int "id"

    • string "name"

    • int "active_users" - Number of active users in the organization.

    • int "systems" - Number of systems in the organization.

    • int "trusts" - Number of trusted organizations.

    • int "system_groups" - Number of system groups in the organization. (optional)

    • int "activation_keys" - Number of activation keys in the organization. (optional)

    • int "kickstart_profiles" - Number of kickstart profiles in the organization. (optional)

    • int "configuration_channels" - Number of configuration channels in the organization. (optional)

    • boolean "staging_content_enabled" - Is staging content enabled in organization. (optional)

Method: getDetails

Description:

The detailed information about an organization given the organization name.

Parameters:

  • string sessionKey

  • string name

Returns:

  • * struct - organization info

    • int "id"

    • string "name"

    • int "active_users" - Number of active users in the organization.

    • int "systems" - Number of systems in the organization.

    • int "trusts" - Number of trusted organizations.

    • int "system_groups" - Number of system groups in the organization. (optional)

    • int "activation_keys" - Number of activation keys in the organization. (optional)

    • int "kickstart_profiles" - Number of kickstart profiles in the organization. (optional)

    • int "configuration_channels" - Number of configuration channels in the organization. (optional)

    • boolean "staging_content_enabled" - Is staging content enabled in organization. (optional)

Method: getPolicyForScapFileUpload

Description:

Get the status of SCAP detailed result file upload settings for the given organization.

Parameters:

  • string sessionKey

  • int orgId

Returns:

  • struct - scap_upload_info

    • boolean "enabled" - Aggregation of detailed SCAP results is enabled.

    • int "size_limit" - Limit (in Bytes) for a single SCAP file upload.

Method: getPolicyForScapResultDeletion

Description:

Get the status of SCAP result deletion settings for the given organization.

Parameters:

  • string sessionKey

  • int orgId

Returns:

  • struct - scap_deletion_info

    • boolean "enabled" - Deletion of SCAP results is enabled

    • int "retention_period" - Period (in days) after which a scan can be deleted (if enabled).

Method: isContentStagingEnabled

Description:

Get the status of content staging settings for the given organization. Returns true if enabled, false otherwise.

Parameters:

  • string sessionKey

  • int orgId

Returns:

  • boolean status - Get the status of content staging settings

Method: isErrataEmailNotifsForOrg

Description:

Returns whether errata e-mail notifications are enabled for the organization

Parameters:

  • string sessionKey

  • int orgId

Returns:

  • boolean status - Returns the status of the errata e-mail notification setting for the organization

Method: isOrgConfigManagedByOrgAdmin

Description:

Returns whether Organization Administrator is able to manage his organization configuration. This may have a high impact on general Uyuni performance.

Parameters:

  • string sessionKey

  • int orgId

Returns:

  • boolean status - Returns the status org admin management setting

Method: listOrgs

Description:

Returns the list of organizations.

Parameters:

  • string sessionKey

Returns:

  • array :

  • struct - organization info

    • int "id"

    • string "name"

    • int "active_users" - Number of active users in the organization.

    • int "systems" - Number of systems in the organization.

    • int "trusts" - Number of trusted organizations.

    • int "system_groups" - Number of system groups in the organization. (optional)

    • int "activation_keys" - Number of activation keys in the organization. (optional)

    • int "kickstart_profiles" - Number of kickstart profiles in the organization. (optional)

    • int "configuration_channels" - Number of configuration channels in the organization. (optional)

    • boolean "staging_content_enabled" - Is staging content enabled in organization. (optional)

Method: listUsers

Description:

Returns the list of users in a given organization.

Parameters:

  • string sessionKey

  • int orgId

Returns:

  • array :

  • struct - user

    • string "login"

    • string "login_uc"

    • string "name"

    • string "email"

    • boolean "is_org_admin"

Method: migrateSystems

Description:

Migrate systems from one organization to another. If executed by a Uyuni administrator, the systems will be migrated from their current organization to the organization specified by the toOrgId. If executed by an organization administrator, the systems must exist in the same organization as that administrator and the systems will be migrated to the organization specified by the toOrgId. In any scenario, the origination and destination organizations must be defined in a trust.

Parameters:

  • string sessionKey

  • int toOrgId - ID of the organization where the system(s) will be migrated to.

  • array :

    • int - systemId

Returns:

  • array :

    • int - serverIdMigrated

Method: setContentStaging

Description:

Set the status of content staging for the given organization.

Parameters:

  • string sessionKey

  • int orgId

  • boolean enable - Use true/false to enable/disable

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setErrataEmailNotifsForOrg

Description:

Dis/enables errata e-mail notifications for the organization

Parameters:

  • string sessionKey

  • int orgId

  • boolean enable - Use true/false to enable/disable

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setOrgConfigManagedByOrgAdmin

Description:

Sets whether Organization Administrator can manage his organization configuration. This may have a high impact on general Uyuni performance.

Parameters:

  • string sessionKey

  • int orgId

  • boolean enable - Use true/false to enable/disable

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setPolicyForScapFileUpload

Description:

Set the status of SCAP detailed result file upload settings for the given organization.

Parameters:

  • string sessionKey

  • int orgId

  • struct - scap_upload_info

    • boolean "enabled" - Aggregation of detailed SCAP results is enabled.

    • int "size_limit" - Limit (in Bytes) for a single SCAP file upload.

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setPolicyForScapResultDeletion

Description:

Set the status of SCAP result deletion settins for the given organization.

Parameters:

  • string sessionKey

  • int orgId

  • struct - scap_deletion_info

    • boolean "enabled" - Deletion of SCAP results is enabled

    • int "retention_period" - Period (in days) after which a scan can be deleted (if enabled).

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: updateName

Description:

Updates the name of an organization

Parameters:

  • string sessionKey

  • int orgId

  • string name - Organization name. Must meet same criteria as in the web UI.

Returns:

  • * struct - organization info

    • int "id"

    • string "name"

    • int "active_users" - Number of active users in the organization.

    • int "systems" - Number of systems in the organization.

    • int "trusts" - Number of trusted organizations.

    • int "system_groups" - Number of system groups in the organization. (optional)

    • int "activation_keys" - Number of activation keys in the organization. (optional)

    • int "kickstart_profiles" - Number of kickstart profiles in the organization. (optional)

    • int "configuration_channels" - Number of configuration channels in the organization. (optional)

    • boolean "staging_content_enabled" - Is staging content enabled in organization. (optional)