systemgroup

Description

Provides methods to access and modify system groups.

Namespace:

systemgroup

Method: addOrRemoveAdmins

Description:

Add or remove administrators to/from the given group. Uyuni and Organization administrators are granted access to groups within their organization by default; therefore, users with those roles should not be included in the array provided. Caller must be an organization administrator.

Parameters:

  • string sessionKey

  • string systemGroupName

  • array :

    • string - loginName - User’s loginName

  • int add - 1 to add administrators, 0 to remove.

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: addOrRemoveSystems

Description:

Add/remove the given servers to a system group.

Parameters:

  • string sessionKey

  • string systemGroupName

  • array :

    • int - serverId

  • boolean add - True to add to the group, False to remove.

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: create

Description:

Create a new system group.

Parameters:

  • string sessionKey

  • string name - Name of the system group.

  • string description - Description of the system group.

Returns:

  • * struct - Server Group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"

Method: delete

Description:

Delete a system group.

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: getDetails

Description:

Retrieve details of a ServerGroup based on it’s id

Parameters:

  • string sessionKey

  • int systemGroupId

Returns:

  • * struct - Server Group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"

Method: getDetails

Description:

Retrieve details of a ServerGroup based on it’s name

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • * struct - Server Group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"

Method: listActiveSystemsInGroup

Description:

Lists active systems within a server group

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

    • int - server_id

Method: listAdministrators

Description:

Returns the list of users who can administer the given group. Caller must be a system group admin or an organization administrator.

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

  • struct - user

    • int "id"

    • string "login"

    • string "login_uc" - upper case version of the login

    • boolean "enabled" - true if user is enabled, false if the user is disabled

Method: listAllGroups

Description:

Retrieve a list of system groups that are accessible by the logged in user.

Parameters:

  • string sessionKey

Returns:

  • array :

  • struct - Server Group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"

Method: listAssignedConfigChannels

Description:

List all Configuration Channels assigned to a system group

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

  • struct - Configuration Channel information

    • int "id"

    • int "orgId"

    • string "label"

    • string "name"

    • string "description"

    • struct "configChannelType"

  • struct - Configuration Channel Type information

    • int "id"

    • string "label"

    • string "name"

    • int "priority"

Available since API version: 25

Method: listAssignedFormuals

Description:

List all Configuration Channels assigned to a system group

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

  • struct - formula

    • string "name"

    • string "description"

    • string "formula_group"

Available since API version: 25

Method: listGroupsWithNoAssociatedAdmins

Description:

Returns a list of system groups that do not have an administrator. (who is not an organization administrator, as they have implicit access to system groups) Caller must be an organization administrator.

Parameters:

  • string sessionKey

Returns:

  • array :

  • struct - Server Group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"

Method: listInactiveSystemsInGroup

Description:

Lists inactive systems within a server group using a specified inactivity time.

Parameters:

  • string sessionKey

  • string systemGroupName

  • int daysInactive - Number of days a system must not check in to be considered inactive.

Returns:

  • array :

    • int - server_id

Method: listInactiveSystemsInGroup

Description:

Lists inactive systems within a server group using the default 1 day threshold.

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

    • int - server_id

Method: listSystems

Description:

Return a list of systems associated with this system group. User must have access to this system group.

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

  • struct - server details

    • int "id" - System id

    • string "profile_name"

    • string "machine_id"

    • string "minion_id"

    • string "base_entitlement" - System’s base entitlement label

    • array "string"

      • addon_entitlements - System’s addon entitlements labels, currently only 'virtualization_host'

    • boolean "auto_update" - True if system has auto errata updates enabled.

    • string "release" - The Operating System release (i.e. 4AS, 5Server

    • string "address1"

    • string "address2"

    • string "city"

    • string "state"

    • string "country"

    • string "building"

    • string "room"

    • string "rack"

    • string "description"

    • string "hostname"

    • dateTime.iso8601 "last_boot"

    • string "osa_status" - Either 'unknown', 'offline', or 'online'.

    • boolean "lock_status" - True indicates that the system is locked. False indicates that the system is unlocked.

    • string "virtualization" - Virtualization type - for virtual guests only (optional)

    • string "contact_method" - One of the following:

    • default

    • ssh-push

    • ssh-push-tunnel

Method: listSystemsMinimal

Description:

Return a list of systems associated with this system group. User must have access to this system group.

Parameters:

  • string sessionKey

  • string systemGroupName

Returns:

  • array :

  • struct - system

    • int "id"

    • string "name"

    • dateTime.iso8601 "last_checkin" - Last time server successfully checked in

    • dateTime.iso8601 "created" - Server registration time

    • dateTime.iso8601 "last_boot" - Last server boot time

    • int "extra_pkg_count" - Number of packages not belonging to any assigned channel

    • int "outdated_pkg_count" - Number of out-of-date packages

Method: scheduleApplyErrataToActive

Description:

Schedules an action to apply errata updates to active systems from a group.

Parameters:

  • string sessionKey

  • string systemGroupName

  • array :

    • int - errataId

Returns:

  • array :

    • int - actionId

Available since API version: 13.0

Method: scheduleApplyErrataToActive

Description:

Schedules an action to apply errata updates to active systems from a group at a given date/time.

Parameters:

  • string sessionKey

  • string systemGroupName

  • array :

    • int - errataId

  • dateTime.iso8601 earliestOccurrence

Returns:

  • array :

    • int - actionId

Available since API version: 13.0

Method: scheduleApplyErrataToActive

Description:

Schedules an action to apply errata updates to active systems from a group at a given date/time.

Parameters:

  • string sessionKey

  • string systemGroupName

  • array :

    • int - errataId

  • dateTime.iso8601 earliestOccurrence

Returns:

  • array :

    • int - actionId

Available since API version: 24

Method: subscribeConfigChannel

Description:

Subscribe given config channels to a system group

Parameters:

  • string sessionKey

  • string systemGroupName

  • array :

    • string - configChannelLabels

Returns:

  • 1 on success, exception on failure

Method: unsubscribeConfigChannel

Description:

Unsubscribe given config channels to a system group

Parameters:

  • string sessionKey

  • string systemGroupName

  • array :

    • string - configChannelLabels

Returns:

  • 1 on success, exception on failure

Method: update

Description:

Update an existing system group.

Parameters:

  • string sessionKey

  • string systemGroupName

  • string description

Returns:

  • * struct - Server Group

    • int "id"

    • string "name"

    • string "description"

    • int "org_id"

    • int "system_count"