Fork me on GitHub API Reference — Space 0.0.1 documentation

API Reference

Namespace: activationkey

Contains methods to access common activation key functions available from the web interface.

space.lib.activationkey.addChildChannels(sw, keyname, channels)

Description: Add child channels to an activation key.

Parameters:
  • string sessionKey
  • string key
array:
  • string - childChannelLabel

Returns:

int - 1 on success, exception thrown otherwise.

space.lib.activationkey.addConfigChannels(sw, key, channellabels, addtotop=False)

Description: Given a list of activation keys and configuration channels, this method adds given configuration channels to either the top or the bottom (whichever you specify) of an activation key’s configuration channels list. The ordering of the configuration channels provided in the add list is maintained while adding. If one of the configuration channels in the ‘add’ list already exists in an activation key, the configuration channel will be re-ranked to the appropriate place.

Parameters:
  • string sessionKey

  • array:
    • string - activationKey
  • array:
    • string - List of configuration channel labels in the ranked

      order.

  • boolean addToTop
    • true - To prepend the given channels to the beginning of

      the activation key’s config channel list

    • false - To append the given channels to the end of the

      activation key’s config channel list

Returns:
-int - 1 on success, exception thrown otherwise.
space.lib.activationkey.addEntitlements(sw, key, entitlement_label)

Description: Add entitlements to an activation key. Currently only add-on entitlements are permitted. (monitoring_entitled, provisioning_entitled,

virtualization_host, virtualization_host_platform)
Parameters:
  • string sessionKey

  • string key

  • array:
    • string - entitlement label
      • monitoring_entitled
      • provisioning_entitled
      • virtualization_host
      • virtualization_host_platform

Returns:

  • int - 1 on success, exception thrown otherwise.
space.lib.activationkey.addPackages(sw, key, packages)

Description: - Add packages to an activation key.

Parameters:
  • string sessionKey

  • string key

  • array:
    • struct - packages
      • string “name” - Package name
      • string “arch” - Arch label - Optional

Returns:

  • int - 1 on success, exception thrown otherwise.
space.lib.activationkey.addServerGroups(sw, keyname, groupid)
Description:
Add server groups to an activation key.
Parameters:

string sessionKey string key array:

int - serverGroupId

Returns:

int - 1 on success, exception thrown otherwise.

space.lib.activationkey.checkConfigDeployment(sw, key)
Description:
  • Check configuration file deployment status for the activation key specified.
Parameters:
  • string sessionKey
  • string key

Returns:

  • 1 if enabled, 0 if disabled, exception thrown otherwise.
space.lib.activationkey.create(sw, keyname, description, baseChannelLabel, entitlements=[], universalDefault=False)

Description: Create a new activation key with unlimited usage. The activation key parameter passed in will be prefixed with the organization ID, and this value will be returned from the create call. Eg. If the caller passes in the key “foo” and belong to an organization with the ID 100, the actual activation key will be “100-foo”.

Parameters:
  • string sessionKey

  • string key - Leave empty to have new key autogenerated.

  • string description

  • string baseChannelLabel - Leave empty to accept default.

  • array:
    • string - Add-on entitlement label to associate with the key.
    • monitoring_entitled
    • provisioning_entitled
    • virtualization_host
    • virtualization_host_platform
  • boolean universalDefault

Returns:
  • string - The new activation key.
space.lib.activationkey.delete(sw, keyname)

Description: Delete an activation key.

Parameters:
  • string sessionKey
  • string key

Returns:

  • int - 1 on success, exception thrown otherwise.
space.lib.activationkey.disableConfigDeployment(sw, keyname)

Description: Disable configuration file deployment for the specified activation key.

Parameters:
  • string sessionKey
  • string key
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.activationkey.enableConfigDeployment(sw, keyname)

Description: Enable configuration file deployment for the specified activation key.

Parameters:
  • string sessionKey
  • string key
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.activationkey.getDetails(sw, keyname)

Description: Lookup an activation key’s details.

Parameters:

  • string sessionKey
  • string key

Returns:

  • struct - activation key
    • string “key”

    • string “description”

    • int “usage_limit”

    • string “base_channel_label”

    • array “child_channel_labels”
      • string childChannelLabel
    • array “entitlements”
      • string entitlementLabel
    • array “server_group_ids”
      • string serverGroupId
    • array “package_names”
      • string packageName - (deprecated by packages)
    • array “packages”
      • struct - package
        • string “name” - packageName
        • string “arch” - archLabel - optional
    • boolean “universal_default”

    • boolean “disabled”

space.lib.activationkey.listActivatedSystems(sw, keyname)

Description: List the systems activated with the key provided.

Parameters: string sessionKey string key

Returns:
  • array:
    • struct - system structure
      • int “id” - System id
      • string “hostname”
      • dateTime.iso8601 “last_checkin” - Last time server successfully checked in
space.lib.activationkey.listActivationKeys(sw)

Description: List activation keys that are visible to the user.

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - activation key
      • string “key”

      • string “description”

      • int “usage_limit”

      • string “base_channel_label”

      • array “child_channel_labels”
        • string childChannelLabel
      • array “entitlements”
        • string entitlementLabel
      • array “server_group_ids”
        • string serverGroupId
      • array “package_names”
        • string packageName - (deprecated by packages)
      • array “packages”
        • struct - package
          • string “name” - packageName
          • string “arch” - archLabel - optional
      • boolean “universal_default”

      • boolean “disabled”

space.lib.activationkey.listConfigChannels(sw, keyname)

Description: List configuration channels associated to an activation key.

Parameters:
  • string sessionKey
  • string key
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”
space.lib.activationkey.removeChildChannels(sw, keyname, channellabel)

Description: Remove child channels from an activation key.

Parameters:
  • string sessionKey

  • string key

  • array:

    = string - childChannelLabel

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.activationkey.removeConfigChannels(sw, activationkeys, channellabels)

Description: Remove configuration channels from the given activation keys.

Parameters:
  • string sessionKey

  • array:
    • string - activationKey
  • array:
    • string - configChannelLabel

Returns: - int - 1 on success, exception thrown otherwise.

space.lib.activationkey.removeEntitlements(sw, keyname, entitlements)

Description: Remove entitlements (by label) from an activation key. Currently only add-on entitlements are permitted.

  • monitoring_entitled,
  • provisioning_entitled,
  • virualization_host,
  • virtualization_host_platform
Parameters:
  • string sessionKey

  • string key

  • array:

    -string - entitlement label - monitoring_entitled - provisioning_entitled - virtualization_host - virtualization_host_platform

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.activationkey.removePackages(sw, packages)

Description: Remove package names from an activation key.

Parameters:
  • string key

  • array:
    • struct - packages
      • string “name” - Package name
      • string “arch” - Arch label - Optional
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.activationkey.removeServerGroups(sw, keyname, servergroups)

Description: Remove server groups from an activation key.

Parameters:
  • string sessionKey

  • string key

  • array:
    • int - serverGroupId
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.activationkey.setConfigChannels(sw, activationkeys, channellabels)

Description: Replace the existing set of configuration channels on the given activation keys. Channels are ranked by their order in the array.

Parameters:
  • string sessionKey

  • array:
    • string - activationKey
  • array:
    • string - configChannelLabel
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.activationkey.setDetails(sw, keyname, keystruct)

Description: Update the details of an activation key. Parameters:

  • string sessionKey

  • string key

  • struct - activation key
    • string “description” - optional
    • string “base_channel_label” - optional
    • int “usage_limit” - optional
    • boolean “unlimited_usage_limit” - Set true for unlimited usage and to override usage_limit
    • boolean “universal_default” - optional
    • boolean “disabled” - optional
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: api

Methods providing information about the API.

Available methods:

space.lib.api.getApiCallList(sw)

Description: Lists all available api calls grouped by namespace

Parameters:

  • string sessionKey

Returns:

  • struct - method_info
    • string “name” - method name
    • string “parameters” - method parameters
    • string “exceptions” - method exceptions
    • string “return” - method return type
space.lib.api.getApiNamespaceCallList(sw, namespace)

Description: Lists all available api calls for the specified namespace

Parameters:

  • string sessionKey
  • string namespace

Returns:

  • struct - method_info
    • string “name” - method name
    • string “parameters” - method parameters
    • string “exceptions” - method exceptions
    • string “return” - method return type
space.lib.api.getApiNamespaces(sw)

Description: Lists available API namespaces

Parameters:

  • string sessionKey

Returns:

  • struct - namespace
    • string “namespace” - API namespace
    • string “handler” - API Handler
space.lib.api.getVersion(sw)
Description:
Returns the version of the API. Since Spacewalk 0.4 (Satellie 5.3)
it is no more related to server version.

Parameters:

Returns:
  • string
space.lib.api.systemVersion(sw)

Description: Returns the server version.

Parameters:

Returns:

  • string

Namespace: channel

Provides method to get back a list of Software Channels.

Available methods:

space.lib.channel.listAllChannels(sw)

Description: List all software channels that belong to the user’s organization.

Parameters:
  • sw session object
Returns:
  • array:
    • struct - channel info
      • int “id”
      • string “label”
      • string “name”
      • string “provider_name”
      • int “packages”
      • int “systems”
      • string “arch_name”
space.lib.channel.listMyChannels(sw)
Description:
List all software channels that belong to the user’s organization.
Parameters:
  • sw session object
Returns:
  • array:
    • struct - channel info
      • int “id”
      • string “label”
      • string “name”
      • string “provider_name”
      • int “packages”
      • int “systems”
      • string “arch_name”
space.lib.channel.listPopularChannels(sw, popcount)

Description: List the most popular software channels. Channels that have at least the number of systems subscribed as specified by the popularity count will be returned.

Parameters:
  • sw session
  • int “popularityCount”
Returns:
  • array:
    • struct - channel info
      • int “id”
      • string “label”
      • string “name”
      • string “provider_name”
      • int “packages”
      • int “systems”
      • string “arch_name”
space.lib.channel.listRetiredChannels(sw)
Description:
List all retired software channels. These are channels that the user’s organization is entitled to, but are no longer supported because they have reached their ‘end-of-life’ date.
Parameters:
  • sw session object
Returns:
  • array:
    • struct - channel info
    • int “id”
    • string “label”
    • string “name”
    • string “provider_name”
    • int “packages”
    • int “systems”
    • string “arch_name”
space.lib.channel.listSharedChannels(sw)

Description: List all software channels that may be shared by the user’s organization.

Parameters:
  • sw session object

Returns:

  • array:
    • struct - channel info
      • int “id”
      • string “label”
      • string “name”
      • string “provider_name”
      • int “packages”
      • int “systems”
      • string “arch_name”
space.lib.channel.listSoftwareChannels(sw)

Description: List all software channels that the user’s organization is entitled to.

Parameters:
  • sw session object
Returns:
  • array:
    • struct - channel info
    • int “id”
    • string “label”
    • string “name”
    • string “provider_name”
    • int “packages”
    • int “systems”
    • string “arch_name”
space.lib.channel.listVendorChannels(sw)
Description:
Lists all the vendor software channels that the user’s organization is entitled to.
Parameters:
  • sw session
Returns:
  • array:
    • struct - channel info
      • int “id”
      • string “label”
      • string “name”
      • string “provider_name”
      • int “packages”
      • int “systems”
      • string “arch_name”

Namespace: channel.access

Provides methods to retrieve and alter channel access restrictions.

space.lib.channel.access.disableUserRestrictions(sw, channellabel)
Description:
Disable user restrictions for the given channel. If disabled, all users within the organization may subscribe to the channel.
Parameters:
  • sw session
  • string channellabel - label of the channel
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.access.enableUserRestrictions(sw, channellabel)
Description:
Enable user restrictions for the given channel. If enabled, only selected users within the organization may subscribe to the channel.
Parameters:
  • sw session
  • string channellabel - label of the channel
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.access.getOrgSharing(sw, channellabel)
Description:
Get organization sharing access control.
Parameters:
  • sw session
  • string channellabel - label of the channel
Returns:
  • string - The access value (one of the following: ‘public’,

    ‘private’, or ‘protected’.

space.lib.channel.access.setOrgSharing(sw, channellabel, accesslevel)
Description:
Set organization sharing access control.
Parameters:
  • sw session

  • string channelLabel - label of the channel

  • string “access” - Access (one of the following: ‘public’, ‘private’,

    or ‘protected’

Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: channel.org

Provides methods to retrieve and alter organization trust relationships
for a channel.
space.lib.channel.org.disableAccess(sw, channellabel, orgid)
Description:
Disable access to the channel for the given organization.
Parameters:
  • sw session
  • string channelLabel - label of the channel
  • int orgId - id of org being removed access
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.org.enableAccess(sw, channellabel, orgid)

Description: Enable access to the channel for the given organization.

Parameters:
  • sw session
  • string channelLabel - label of the channel
  • int orgId - id of org being granted access
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.org.list(sw, channellabel)

Description: List the organizations associated with the given channel that may be trusted.

Parameters:
  • sw session
  • string channelLabel - label of the channel
Returns:
  • struct - org
  • int “org_id”
  • string “org_name”
  • boolean “access_enabled”

Namespace: channel.software

Provides methods to access and modify many aspects of a channel.

space.lib.channel.software.addPackages(sw, channellabel, packagelist)
Description:
Adds a given list of packages to the given channel.
Parameters:
  • sw session

  • string channelLabel - target channel.

  • array:
    • int - packageId - id of a package to add to the channel.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.software.associateRepo(sw, channellabel, repositorylabel)
Description:
Associates a repository with a channel
Parameters:
  • sw session
  • string channelLabel - channel label
  • string repoLabel - repository label
Returns:
  • struct - channel
    • int “id”
    • string “name”
    • string “label”
    • string “arch_name”
    • string “summary”
    • string “description”
    • string “checksum_label”
    • dateTime.iso8601 “last_modified”
    • string “maintainer_name”
    • string “maintainer_email”
    • string “maintainer_phone”
    • string “support_policy”
    • string “gpg_key_url”
    • string “gpg_key_id”
    • string “gpg_key_fp”
    • string “yumrepo_source_url”
    • string “yumrepo_label”
    • dateTime.iso8601 “yumrepo_last_sync”
    • string “end_of_life”
    • string “parent_channel_label”
    • string “clone_original”
space.lib.channel.software.availableEntitlements(sw, channellabel)
Parameters:
  • channellabel
description:
  • Reports the number of available entitlements for the given channel
returns:
  • available entitlement count (int)
space.lib.channel.software.clone(sw, source_channel, name, label, summary, parent_label=None, arch_label=None, gpg_url=None, gpg_id=None, gpg_fingerprint=None, description=None, no_errata=False)
Description:
Clone a channel. If arch_label is omitted, the arch label of the original channel will be used. If parent_label is omitted, the clone will be a base channel.
Parameters:
  • string sessionKey

  • string original_label

  • struct - channel details
    • string “name”
    • string “label”
    • string “summary”
    • string “parent_label” - (optional)
    • string “arch_label” - (optional)
    • string “gpg_key_url” - (optional), gpg_url
    • string “gpg_key_id” - (optional), gpg_id
    • string “gpg_key_fp” - (optional), gpg_fingerprint
    • string “description” - (optional)
  • boolean original_state

Returns:

  • int the cloned channel ID
space.lib.channel.software.create(sw, channellabel, channame, summary, arch, parent='', checksum=None, gpgkey=None)
Description:
  • Creates a software channel
Parameters:
  • string sessionKey

  • string label - label of the new channel

  • string name - name of the new channel

  • string summary - summary of the channel

  • string archLabel - the label of the architecture the channel

    corresponds to

    • channel-ia32 - For 32 bit channel architecture

    • channel-ia64 - For 64 bit channel architecture

    • channel-sparc - For Sparc channel architecture

    • channel-alpha - For Alpha channel architecture

    • channel-s390 - For s390 channel architecture

    • channel-s390x - For s390x channel architecture

    • channel-iSeries - For i-Series channel architecture

    • channel-pSeries - For p-Series channel architecture

    • channel-x86_64 - For x86_64 channel architecture

    • channel-ppc - For PPC channel architecture

    • channel-sparc-sun-solaris - For Sparc Solaris channel

      architecture

    • channel-i386-sun-solaris - For i386 Solaris channel architecture

  • string parentLabel - label of the parent of this channel, an empty

    string if it does not have one

  • string checksumType - checksum type for this channel, used for yum

    repository metadata generation

    • sha1 - Offers widest compatibility with clients

    • sha256 - Offers highest security, but is compatible only with

      newer clients: Fedora 11 and newer, or Enterprise Linux 6 and newer.

  • struct - gpgKey
    • string “url” - GPG key URL
    • string “id” - GPG key ID
    • string “fingerprint” - GPG key Fingerprint
space.lib.channel.software.createRepo(sw, repolabel, repotype, repourl)
Description:
  • Creates a repository
Parameters:
  • string sessionKey
  • string label - repository label
  • string type - repository type (only YUM is supported)
  • string url - repository url

Returns:

struct - channel
  • int “id”
  • string “label”
  • string “sourceUrl”
  • string “type”
space.lib.channel.software.delete(sw, channellabel)
Description:
  • Deletes a custom software channel
Parameters:
  • string sessionKey
  • string channelLabel - channel to delete
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.software.disassociateRepo(sw, channellabel, repoLabel)

Description: Disassociates a repository from a channel

Parameters:
  • string sessionKey
  • string channelLabel - channel label
  • string repoLabel - repository label
Returns:
  • struct - channel

  • int “id”

  • string “name”

  • string “label”

  • string “arch_name”

  • string “summary”

  • string “description”

  • string “checksum_label”

  • dateTime.iso8601 “last_modified”

  • string “maintainer_name”

  • string “maintainer_email”

  • string “maintainer_phone”

  • string “support_policy”

  • string “gpg_key_url”

  • string “gpg_key_id”

  • string “gpg_key_fp”

  • dateTime.iso8601 “yumrepo_last_sync” - (optional)

  • string “end_of_life”

  • string “parent_channel_label”

  • string “clone_original”

  • array:
    • struct - contentSources
      • int “id”
      • string “label”
      • string “sourceUrl”
      • string “type”
space.lib.channel.software.getChannelLastBuildById(sw, channel_id)

Description: Returns the last build date of the repomd.xml file for the given channel as a localised string.

Parameters:
  • string sessionKey
  • int id - id of channel wanted

Returns:

the last build date of the repomd.xml file as a localised string

space.lib.channel.software.getDetails(sw, chan)

Description: Returns details of the given channel as a map

Parameters:
  • string sessionKey
  • int id | string name - channel to query
Returns:
  • struct - channel
    • int “id”

    • string “name”

    • string “label”

    • string “arch_name”

    • string “summary”

    • string “description”

    • string “checksum_label”

    • dateTime.iso8601 “last_modified”

    • string “maintainer_name”

    • string “maintainer_email”

    • string “maintainer_phone”

    • string “support_policy”

    • string “gpg_key_url”

    • string “gpg_key_id”

    • string “gpg_key_fp”

    • dateTime.iso8601 “yumrepo_last_sync” - (optional)

    • string “end_of_life”

    • string “parent_channel_label”

    • string “clone_original”

    • array:
      • struct - contentSources
        • int “id”
        • string “label”
        • string “sourceUrl”
        • string “type”
space.lib.channel.software.getRepoDetails(sw, repolabel)

Description: Returns details of the given repository

Parameters:
  • string sessionKey
  • string repoLabel - repo to query
Returns:
  • struct - channel
    • int “id”
    • string “label”
    • string “sourceUrl”
    • string “type”
space.lib.channel.software.getRepoSyncCronExpression(sw, channellabel)

Description: Returns repo synchronization cron expression

Parameters:

  • string sessionKey
  • string channelLabel - channel label
Returns:
  • string quartz expression
space.lib.channel.software.isGloballySubscribable(sw, channellabel)
Description:
Returns whether the channel is subscribable by any user in the organization

Parameters:

  • string sessionKey
  • string channelLabel - channel to query
Returns:
  • int - 1 if true, 0 otherwise
space.lib.channel.software.isUserManageable(sw, channellabel, login)

Description: Returns whether the channel may be managed by the given user.

Parameters:
  • string sessionKey
  • string channelLabel - label of the channel
  • string login - login of the target user
Returns:
  • int - 1 if manageable, 0 if not
space.lib.channel.software.isUserSubscribable(sw, channellabel, username)

Description: Returns whether the channel may be subscribed to by the given user.

Parameters:
  • string sessionKey
  • string channelLabel - label of the channel
  • string login - login of the target user
Returns:
  • int - 1 if subscribable, 0 if not
space.lib.channel.software.listAllPackages(sw, channellabel, start_date=None, end_date=None)

Description: If start and end are giving:

Lists all packages in the channel, regardless of package version, between the given dates.
If start is given:
Lists all packages in the channel, regardless of version whose last modified date is greater than given date.
If only channelLabel is given:
Lists all packages in the channel, regardless of the package version
Parameters:
  • string sessionKey
  • string channelLabel - channel to query
  • dateTime.iso8601 startDate
  • dateTime.iso8601 endDate
Returns:
  • array:
    • struct - package
      • string “name”
      • string “version”
      • string “release”
      • string “epoch”
      • string “checksum”
      • string “checksum_type”
      • int “id”
      • string “arch_label”
      • string “last_modified_date”
space.lib.channel.software.listArches(sw)

Description: Lists the potential software channel architectures that can be created

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - channel arch
    • string “name”
    • string “label”
space.lib.channel.software.listChannelRepos(sw, channellabel)

Description: Lists associated repos with the given channel

Parameters:
  • string sessionKey
  • string channelLabel - channel label
Returns:
  • array:
    • struct - channel
      • int “id”
      • string “label”
      • string “sourceUrl”
      • string “type”
space.lib.channel.software.listChildren(sw, channellabel)

Description: List the children of a channel

Parameters: string sessionKey string channelLabel - the label of the channel

Returns:
array:
  • struct - channel
    • int “id”

    • string “name”

    • string “label”

    • string “arch_name”

    • string “summary”

    • string “description”

    • string “checksum_label”

    • dateTime.iso8601 “last_modified”

    • string “maintainer_name”

    • string “maintainer_email”

    • string “maintainer_phone”

    • string “support_policy”

    • string “gpg_key_url”

    • string “gpg_key_id”

    • string “gpg_key_fp”

    • dateTime.iso8601 “yumrepo_last_sync” - (optional)

    • string “end_of_life”

    • string “parent_channel_label”

    • string “clone_original”

    • array:
      • struct - contentSources
        • int “id”
        • string “label”
        • string “sourceUrl”
        • string “type”
space.lib.channel.software.listErrata(sw, channellabel, start_date=None, end_date=None)

Description: List the errata applicable to a channel between startDate and endDate.

If start and end are giving:
List the errata applicable to a channel between startDate and endDate.
If start is given:
List the errata applicable to a channel after given startDate
If only channelLabel is given:
List the errata applicable to a channel
Parameters:
  • string sessionKey
  • string channelLabel - channel to query
  • dateTime.iso8601 startDate
  • dateTime.iso8601 endDate
Returns:
  • array:
    • struct - errata
      • int “id” - Errata ID.

      • string “date” - Date erratum was created.

      • string “update_date” - Date erratum was updated.

      • string “advisory_synopsis” - Summary of the erratum.

      • string “advisory_type” - Type label such as Security,

        Bug Fix

      • string “advisory_name” - Name such as RHSA, etc

space.lib.channel.software.listErrataByType(sw, channellabel, errtype)

Description: List the errata of a specific type that are applicable to a channel

Parameters:
  • string sessionKey

  • string channelLabel - channel to query

  • string advisoryType - type of advisory (one of of the following:

    ‘Security Advisory’, ‘Product Enhancement Advisory’, ‘Bug Fix Advisory’

Returns:
  • array:
    • struct - errata
      • string “advisory” - name of the advisory

      • string “issue_date” - date format follows

        YYYY-MM-DD HH24:MI:SS

      • string “update_date” - date format follows

        YYYY-MM-DD HH24:MI:SS

      • string “synopsis”

      • string “advisory_type”

      • string “last_modified_date” - date format follows

        YYYY-MM-DD HH24:MI:SS

space.lib.channel.software.listLatestPackages(sw, channellabel)

Description: Lists the packages with the latest version (including release and epoch) for the given channel

Parameters:
  • string sessionKey
  • string channelLabel - channel to query
Returns:
  • array:
    • struct - package
      • string “name”
      • string “version”
      • string “release”
      • string “epoch”
      • int “id”
      • string “arch_label”
space.lib.channel.software.listPackagesWithoutChannel(sw)

Description: Lists all packages that are not associated with a channel. Typically these are custom packages.

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - package
      • string “name”

      • string “version”

      • string “release”

      • string “epoch”

      • int “id”

      • string “arch_label”

      • string “path” - The path on that file system that the

        package resides

      • string “provider” - The provider of the package,

        determined by the gpg key it was signed with.

      • dateTime.iso8601 “last_modified”

space.lib.channel.software.listRepoFilters(sw, repolabel)

Description: Lists the filters for a repo

Parameters:
  • string sessionKey
  • string label - repository label
Returns:
  • array:
    • struct - filter
      • int “sortOrder”
      • string “filter”
      • string “flag”
space.lib.channel.software.listSubscribedSystems(sw, channellabel)

Description: Returns list of subscribed systems for the given channel label

Parameters:
  • string sessionKey
  • string channelLabel - channel to query
Returns:
  • array:
    • struct - system
      • int “id”
      • string “name”
space.lib.channel.software.listSystemChannels(sw, systemid)

Description: Returns a list of channels that a system is subscribed to for the given system id

Parameters:
  • string sessionKey
  • int serverId
Returns:
  • array:
    • struct - channel
      • string “label”
      • string “name”
space.lib.channel.software.listUserRepos(sw)

Description: Returns a list of ContentSource (repos) that the user can see

Parameters: string sessionKey

Returns:
  • array:
    • struct - map
      • long “id” - ID of the repo
      • string “label” - label of the repo
      • string “sourceUrl” - URL of the repo
space.lib.channel.software.mergeErrata(sw, sourcechan, destchan, start_date=None, end_date=None)

Description: Merges all errata from one channel into another

Parameters:
  • string sessionKey
  • string mergeFromLabel - the label of the channel to pull errata from
  • string mergeToLabel - the label to push the errata into
  • string startDate (Not Required)
  • string endDate (Not Required)
Returns:
  • array:
    • struct - errata
    • int “id” - Errata Id
    • string “date” - Date erratum was created.
    • string “advisory_type” - Type of the advisory.
    • string “advisory_name” - Name of the advisory.
    • string “advisory_synopsis” - Summary of the erratum.
space.lib.channel.software.mergePackages(sw, sourcechan, destchan)

Description: Merges all packages from one channel into another

Parameters:
  • string sessionKey

  • string mergeFromLabel - the label of the channel to pull

    packages from

  • string mergeToLabel - the label to push the packages into

Returns:
  • array:
    • struct - package
      • string “name”

      • string “version”

      • string “release”

      • string “epoch”

      • int “id”

      • string “arch_label”

      • string “path” - The path on that file system that

        the package resides

      • string “provider” - The provider of the package, determined

        by the gpg key it was signed with.

      • dateTime.iso8601 “last_modified”

space.lib.channel.software.regenerateNeededCache(sw, channellabel=None)

Description: Completely clear and regenerate the needed Errata and Package cache or all systems subscribed to the specified channel. This should be used only if you believe your cache is incorrect for all the systems in a given channel.

Parameters:
  • string sessionKey
  • string channelLabel - the label of the channel

Returns:

  • int - 1 on success, exception thrown otherwise.
space.lib.channel.software.regenerateYumCache(sw, channellabel)

Description: Regenerate yum cache for the specified channel.

Parameters:
  • string sessionKey
  • string channelLabel - the label of the channel
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.software.removePackages(sw, channellabel, package_ids)

Description: Removes a given list of packages from the given channel.

Parameters:
  • string sessionKey

  • string channelLabel - target channel.

  • array:
    • int - packageId - id of a package to remove from the channel.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.software.removeRepo(sw, repository)

Description: Removes a repository

Parameters:
  • string sessionKey
  • long id - ID of repo to be removed or repo label (string)
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.software.setContactDetails(sw, channellabel, name, email, phone, policy)

Description: Set contact/support information for given channel.

Parameters:
  • string sessionKey
  • string channelLabel - label of the channel
  • string maintainerName - name of the channel maintainer
  • string maintainerEmail - email of the channel maintainer
  • string maintainerPhone - phone number of the channel maintainer
  • string supportPolicy - channel support policy
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.software.setDetails(sw, channel_id, channel_map)

Description: Allows to modify channel attributes

Parameters:
  • string sessionKey

  • int channelDd - channel id

  • struct - channel_map
    • string “checksum_label” - new channel repository checksum label

      (optional)

    • string “name” - new channel name (optional)

    • string “summary” - new channel summary (optional)

    • string “description” - new channel description (optional)

    • string “maintainer_name” - new channel maintainer name (optional)

    • string “maintainer_email” - new channel email address (optional)

    • string “maintainer_phone” - new channel phone number (optional)

    • string “gpg_key_url” - new channel gpg key url (optional)

    • string “gpg_key_id” - new channel gpg key id (optional)

    • string “gpg_key_fp” - new channel gpg key fingerprint (optional)

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.software.setGloballySubscribable(sw, channellabel)
Description:
  • Set globally subscribable attribute for given channel.
Parameters:
  • string sessionKey

  • string channelLabel - label of the channel

  • boolean subscribable - true if the channel is to be

    globally subscribable. False otherwise.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.channel.software.setSystemChannels(sw, systemid, chanlist)

Description: Returns a list of ContentSource (repos) that the user can see

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - map
      • long “id” - ID of the repo
      • string “label” - label of the repo
      • string “sourceUrl” - URL of the repo
space.lib.channel.software.setUserManageable(sw, channellabel, login, action)

Description: Set the manageable flag for a given channel and user.

If value is set to ‘true’, this method will give the user manage permissions to the channel. Otherwise, that privilege is revoked.

Parameters:
  • string sessionKey
  • string channelLabel - label of the channel
  • string login - login of the target user
  • boolean value - value of the flag to set
Returns:
int - 1 on success, exception thrown otherwise.
space.lib.channel.software.setUserSubscribable(sw, channellabel, username)

Description: Set the subscribable flag for a given channel and user. If value is set to ‘true’, this method will give the user subscribe permissions to the channel. Otherwise, that privilege is revoked.

Parameters:
  • string sessionKey
  • string channelLabel - label of the channel
  • string login - login of the target user
  • boolean value - value of the flag to set
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: configchannel

Provides methods to access and modify many aspects of configuration channels.

space.lib.configchannel.channelExists(sw, channellabel)

Description: Check for the existence of the config channel provided.

Parameters:
  • string sessionKey
  • string channelLabel - Channel to check for.
Returns:
  • 1 if exists, 0 otherwise.
space.lib.configchannel.create(sw, channellabel, channelname, channeldescription)

Description: Create a new global config channel. Caller must be at least a config admin or an organization admin.

Parameters:
  • string sessionKey
  • string channelLabel
  • string channelName
  • string channelDescription
Returns:
  • 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”
space.lib.configchannel.createOrUpdatePath(sw, configlabel, path, isdir, path_info)

Description: Create a new file or directory with the given path, or update an existing path.

Parameters:
  • string sessionKey

  • string configChannelLabel

  • string path

  • boolean isDir

  • struct - path info
    • string “contents” - Contents of the file

    • boolean “contents_enc64” - Identifies base64 encoded content
      (default: disabled,

      only for non-directories)

    • string “owner” - Owner of the file/directory.

    • string “group” - Group name of the file/directory.

    • string “permissions” - Octal file/directory permissions (eg: 644)

    • string “selinux_ctx” - SELinux Security context (optional)

    • string “macro-start-delimiter” - Config file macro start

      delimiter. Use null or empty string to accept the default. (only for non-directories)

    • string “macro-end-delimiter” - Config file macro end delimiter.

      Use null or empty string to accept the default. (only for non-directories)

    • int “revision” - next revision number, auto increment for null

    • boolean “binary” - mark the binary content, if True,

      base64 encoded content is expected (only for non-directories)

Returns:
  • struct - Configuration Revision information

  • string “type”
    • file
    • directory
    • symlink
  • string “path” - File Path

  • string “target_path” - Symbolic link Target File Path.

  • string “channel” - Channel Name

  • string “contents” - File contents (base64 encoded according to

    the contents_enc64 attribute)

  • boolean “contents_enc64” - Identifies base64 encoded content

  • int “revision” - File Revision

  • dateTime.iso8601 “creation” - Creation Date

  • dateTime.iso8601 “modified” - Last Modified Date

  • string “owner” - File Owner.

  • string “group” - File Group.

  • int “permissions” - File Permissions (Deprecated). Present for

    files or directories only.

  • string “permissions_mode” - File Permissions. Present for files

    or directories only.

  • string “selinux_ctx” - SELinux Context (optional).

  • boolean “binary” - true/false , Present for files only.

  • string “md5” - File’s md5 signature. Present for files only.

  • string “macro-start-delimiter” - Macro start delimiter for a

    config file.

Description: Create a new symbolic link with the given path, or update an existing path

Parameters:
  • string sessionKey

  • string configChannelLabel

  • string path

  • struct - path info
    • string “target_path” - The target path for the symbolic link

    • string “selinux_ctx” - SELinux Security context (optional)

    • int “revision” - next revision number, skip this field

      for automatic revision number assignment

Returns:
  • struct - Configuration Revision information
    • string “type”
      • file
      • directory
      • symlink
    • string “path” - File Path

    • string “target_path” - Symbolic link Target File Path.

    • string “channel” - Channel Name

    • string “contents” - File contents (base64 encoded according

      to the contents_enc64 attribute)

    • boolean “contents_enc64” - Identifies base64 encoded content

    • int “revision” - File Revision

    • dateTime.iso8601 “creation” - Creation Date

    • dateTime.iso8601 “modified” - Last Modified Date

    • string “owner” - File Owner.

    • string “group” - File Group.

    • int “permissions” - File Permissions (Deprecated).

    • string “permissions_mode” - File Permissions.

    • string “selinux_ctx” - SELinux Context (optional).

    • boolean “binary” - true/false , Present for files only.

    • string “md5” - File’s md5 signature. Present for files only.

    • string “macro-start-delimiter” - Macro start delimiter for

      a config file.

    • string “macro-end-delimiter” - Macro end delimiter for a config

      file. Present for text files only.

space.lib.configchannel.deleteChannels(sw, channellabels)

Description: Delete a list of global config channels. Caller must be a config admin.

Parameters:
  • string sessionKey

  • array:
    • string - configuration channel labels to delete.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.configchannel.deleteFileRevisions(sw, channellabel, filepath, revisions)

Description: Delete specified revisions of a given configuration file

Parameters:
  • string sessionKey

  • string channelLabel - Label of config channel to lookup on.

  • string filePath - Configuration file path.

  • array:
    • int - List of revisions to delete
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.configchannel.deleteFiles(sw, channellabel, filepaths)
Description:
  • Remove file paths from a global channel.
Parameters:
  • string sessionKey

  • string channelLabel - Channel to remove the files from.

  • array:
    • string - file paths to remove.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.configchannel.deployAllSystems(sw, channellabel, date_time)

Description: Schedule an immediate configuration deployment for all systems subscribed to a particular configuration channel.

Parameters:
  • string sessionKey
  • string channelLabel - The configuration channel’s label.
  • dateTime.iso8601 date - The date to schedule the action (OPTIONAL)
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.configchannel.getDetails(sw, channellabel)

Description: Lookup config channel details.

Parameters:
  • string sessionKey
  • string channelLabel or int channelid
Returns:
  • 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”
space.lib.configchannel.getEncodedFileRevision(sw, configchan, filepath, revision)

Description: Get revision of the specified config file

Parameters:
  • string sessionKey
  • string configChannelLabel - label of config channel to lookup on
  • string filePath - config file path to examine
  • int revision - config file revision to examine
Returns:
  • struct - Configuration Revision information
    • string “type”
      • file
      • directory
      • symlink
  • string “path” - File Path

  • string “target_path” - Symbolic link Target File Path.

  • string “channel” - Channel Name

  • string “contents” - File contents
    (base64 encoded according to the

    contents_enc64 attribute)

  • boolean “contents_enc64” - Identifies base64 encoded content

  • int “revision” - File Revision

  • dateTime.iso8601 “creation” - Creation Date

  • dateTime.iso8601 “modified” - Last Modified Date

  • string “owner” - File Owner.

  • string “group” - File Group.

  • int “permissions” - File Permissions (Deprecated). Present for files

    or directories only.

  • string “permissions_mode” - File Permissions. Present for files

    or directories only.

  • string “selinux_ctx” - SELinux Context (optional).

  • boolean “binary” - true/false , Present for files only.

  • string “md5” - File’s md5 signature. Present for files only.

  • string “macro-start-delimiter” - Macro start delimiter for a config file.

    Present for text files only.

  • string “macro-end-delimiter” - Macro end delimiter for a config file.

    Present for text files only.

space.lib.configchannel.getFileRevision(sw, configchan, filepath, revision)

Description: Get revision of the specified config file

Parameters:
  • string sessionKey
  • string configChannelLabel - label of config channel to lookup on
  • string filePath - config file path to examine
  • int revision - config file revision to examine
Returns:
  • struct - Configuration Revision information
    • string “type”
      • file
      • directory
      • symlink
    • string “path” - File Path

    • string “target_path” - Symbolic link Target File Path.

    • string “channel” - Channel Name

    • string “contents” - File contents (base64 encoded according

      to the contents_enc64 attribute)

    • boolean “contents_enc64” - Identifies base64 encoded content

    • int “revision” - File Revision

    • dateTime.iso8601 “creation” - Creation Date

    • dateTime.iso8601 “modified” - Last Modified Date

    • string “owner” - File Owner.

    • string “group” - File Group.

    • int “permissions” - File Permissions (Deprecated).

    • string “permissions_mode” - File Permissions.

    • string “selinux_ctx” - SELinux Context (optional).

    • boolean “binary” - true/false , Present for files only.

    • string “md5” - File’s md5 signature. Present for files only.

    • string “macro-start-delimiter” - Macro start delimiter for

      a config file.

    • string “macro-end-delimiter” - Macro end delimiter for

      a config file.

space.lib.configchannel.getFileRevisions(sw, channellabel, filepath)

Description: Get list of revisions for specified config file

Parameters:
  • string sessionKey
  • string channelLabel - label of config channel to lookup on
  • string filePath - config file path to examine
Returns:
  • array:
struct - Configuration Revision information
  • string “type”
    • file
    • directory
    • symlink
  • string “path” - File Path

  • string “target_path” - Symbolic link Target File Path.

  • string “channel” - Channel Name

  • string “contents” - File contents (base64 encoded according

    to the contents_enc64 attribute)

  • boolean “contents_enc64” - Identifies base64 encoded content

  • int “revision” - File Revision

  • dateTime.iso8601 “creation” - Creation Date

  • dateTime.iso8601 “modified” - Last Modified Date

  • string “owner” - File Owner.

  • string “group” - File Group.

  • int “permissions” - File Permissions (Deprecated).

  • string “permissions_mode” - File Permissions.

  • string “selinux_ctx” - SELinux Context (optional).

  • boolean “binary” - true/false , Present for files only.

  • string “md5” - File’s md5 signature. Present for files only.

  • string “macro-start-delimiter” - Macro start delimiter for a config

    file.

  • string “macro-end-delimiter” - Macro end delimiter for a config file

space.lib.configchannel.listFiles(sw, channellabel)

Description: Return a list of files in a channel.

Parameters:
  • string sessionKey
  • string channelLabel - label of config channel to list files on.
Returns:
  • array:
    • struct - Configuration File information
      • string “type”
        • file
        • directory
        • symlink
      • string “path” - File Path

      • dateTime.iso8601 “last_modified” - Last Modified Date

space.lib.configchannel.listGlobals(sw)

Description: List all the global config channels accessible to the logged-in user.

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - Configuration Channel information
      • int “id”

      • int “orgId”

      • string “label”

      • string “name”

      • string “description”

      • string “type”

      • struct “configChannelType”

      • struct - Configuration Channel Type information
        • int “id”
        • string “label”
        • string “name”
        • int “priority”
space.lib.configchannel.listSubscribedSystems(sw, channellabel)

Description: Return a list of systems subscribed to a configuration channel

Parameters:
  • string sessionKey
  • string channelLabel - label of config channel to list subscribed systems.
Returns:
  • array:
    • struct - system
      • int “id”
      • string “name”
space.lib.configchannel.lookupChannelInfo(sw, configchannel)

Description: Lists details on a list channels given their channel labels.

Parameters:
  • string sessionKey

  • array:
    • string - configuration channel label
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”
space.lib.configchannel.lookupFileInfo(sw, channellabel, filepaths)

Description: Given a list of paths and a channel, returns details about the latest revisions of the paths.

Parameters:
  • string sessionKey

  • string channelLabel - label of config channel to lookup on

  • array:
    • string - List of paths to examine.
Returns:
  • array:
    • struct - Configuration Revision information
      • string “type”
        • file
        • directory
        • symlink
      • string “path” - File Path

      • string “target_path” - Symbolic link Target File Path.

      • string “channel” - Channel Name

      • string “contents” - File contents (base64 encoded according

        to the contents_enc64 attribute)

      • boolean “contents_enc64” - Identifies base64 encoded content

      • int “revision” - File Revision

      • dateTime.iso8601 “creation” - Creation Date

      • dateTime.iso8601 “modified” - Last Modified Date

      • string “owner” - File Owner.

      • string “group” - File Group.

      • int “permissions” - File Permissions (Deprecated).

      • string “permissions_mode” - File Permissions.

      • string “selinux_ctx” - SELinux Context (optional).

      • boolean “binary” - true/false , Present for files only.

      • string “md5” - File’s md5 signature. Present for files only.

      • string “macro-start-delimiter” - Macro start delimiter for a

        config file.

      • string “macro-end-delimiter” - Macro end delimiter for a

        config file.

space.lib.configchannel.scheduleFileComparisons(sw, channellabel, filepath, serverids)

Description: Schedule a comparison of the latest revision of a file against the version deployed on a list of systems.

Parameters:
  • string sessionKey

  • string channelLabel - Label of config channel

  • string path - File path

  • array:
    • long - The list of server id that the comparison will be

      performed on

Returns:
  • int actionId - The action id of the scheduled action
space.lib.configchannel.update(sw, channellabel, channelname, description)

Description: Update a global config channel. Caller must be at least a config admin or an organization admin, or have access to a system containing this config channel.

Parameters:
  • string sessionKey
  • string channelLabel
  • string channelName
  • string description
Returns:
  • 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”

Namespace: distchannel

Provides methods to access and modify distribution channel information.

Available methods:

space.lib.distchannel.listDefaultMaps(sw)

Description: Lists the default distribution channel maps

Parameters:
  • string sessionKey
Returns:
  • struct - distChannelMap
    • string “os” - Operationg System
    • string “release” - OS Relase
    • string “arch_name” - Channel architecture
    • string “channel_label” - Channel label
    • string “org_specific” - ‘Y’ organization specific, ‘N’ default
space.lib.distchannel.listMapsForOrg(sw, orgid=None)

Description: Lists distribution channel maps valid for an organization, satellite admin right needed Parameters: string sessionKey int orgId Returns:

struct - distChannelMap string “os” - Operationg System string “release” - OS Relase string “arch_name” - Channel architecture string “channel_label” - Channel label string “org_specific” - ‘Y’ organization specific, ‘N’ default

space.lib.distchannel.setMapForOrg(sw, os, release, archname, channellabel)

Description: Sets, overrides (/removes if channelLabel empty) a distribution channel map within an organization Parameters: string sessionKey string os string release string archName string channelLabel Returns:

int - 1 on success, exception thrown otherwise.

Namespace: errata

Provides methods to access and modify distribution channel information.

Available methods:

space.lib.errata.addPackages(sw, advisoryname, packageids)

Description: Add a set of packages to an erratum with the given advisory name. This method will only allow for modification of custom errata created either through the UI or API.

Parameters:
  • string sessionKey

  • string advisoryName

  • array:
    • int - packageId

Returns:

int - representing the number of packages added, exception otherwise

space.lib.errata.applicableToChannels(sw, advisoryname)

Description: Returns a list of channels applicable to the erratum with the given advisory name.

Parameters:
  • string sessionKey
  • string advisoryName
Returns:
  • array:
    • struct - channel
      • int “channel_id”
      • string “label”
      • string “name”
      • string “parent_channel_label”
space.lib.errata.bugzillaFixes(sw, advisoryname)

Description: Get the Bugzilla fixes for an erratum matching the given advisoryName. The bugs will be returned in a struct where the bug id is the key. i.e. 208144=”errata.bugzillaFixes Method Returns different results than docs say”

Parameters:
  • string sessionKey
  • string advisoryName
Returns:
  • struct - Bugzilla info
  • string “bugzilla_id” - actual bug number is the key into the struct
  • string “bug_summary” - summary who’s key is the bug id
space.lib.errata.clone(sw, channel_label, advisories)

Description: Clone a list of errata into the specified channel.

Parameters:
  • string sessionKey

  • string channel_label

  • array:
    • string - advisory - The advisory name of the errata to clone.
Returns:
  • array:
    • struct - errata
      • int “id” - Errata Id
      • string “date” - Date erratum was created.
      • string “advisory_type” - Type of the advisory.
      • string “advisory_name” - Name of the advisory.
      • string “advisory_synopsis” - Summary of the erratum.
space.lib.errata.cloneAsOriginal(sw, channel_label, advisories)

Description: Clones a list of errata into a specified cloned channel according the original erratas.

Parameters:
  • string sessionKey

  • string channel_label

  • array:
    • string - advisory - The advisory name of the errata to clone.
Returns:
  • array:
    • struct - errata
      • int “id” - Errata Id
      • string “date” - Date erratum was created.
      • string “advisory_type” - Type of the advisory.
      • string “advisory_name” - Name of the advisory.
      • string “advisory_synopsis” - Summary of the erratum.
space.lib.errata.cloneAsOriginalAsync(sw, channel_label, advisories)

Description: Asynchronously clones a list of errata into a specified cloned channel according the original erratas

Parameters:
  • string sessionKey

  • string channel_label

  • array:
    • string - advisory - The advisory name of the errata to clone.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.errata.cloneAsync(sw, channel_label, advisories)

Description: Asynchronously clone a list of errata into the specified channel.

Parameters:
  • string sessionKey

  • string channel_label

  • array:
    • string - advisory - The advisory name of the errata to clone.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.errata.create(sw, errata_info, bug_dict, keywords, packageids, publish, channel_labels)

Description: Create a custom errata. If “publish” is set to true, the errata will be published as well

Parameters:
  • string sessionKey

  • struct - errata info
    • string “synopsis”

    • string “advisory_name”

    • int “advisory_release”

    • string “advisory_type” - Type of advisory (one of the following:

      ‘Security Advisory’, ‘Product Enhancement Advisory’, or ‘Bug Fix Advisory’

    • string “product”

    • string “errataFrom”

    • string “topic”

    • string “description”

    • string “references”

    • string “notes”

    • string “solution”

  • array:
    • struct - bug
      • int “id” - Bug Id
      • string “summary”
      • string “url”
  • array:
    • string - keyword - List of keywords to associate with the errata.
  • array:
    • int - packageId
  • boolean publish - Should the errata be published.

  • array:
    • string - channelLabel - list of channels the errata should be

      published too, ignored if publish is set to false

Returns:
  • struct - errata
    • int “id” - Errata Id
    • string “date” - Date erratum was created.
    • string “advisory_type” - Type of the advisory.
    • string “advisory_name” - Name of the advisory.
    • string “advisory_synopsis” - Summary of the erratum.
space.lib.errata.delete(sw, advisoryname)

Description: Delete an erratum. This method will only allow for deletion of custom errata created either through the UI or API.

Parameters:
  • string sessionKey
  • string advisoryName
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.errata.findByCve(sw, cvename)

Description: Lookup the details for errata associated with the given CVE (e.g. CVE-2008-3270)

Parameters:
  • string sessionKey
  • string cveName
Returns:
  • array:
    • struct - errata
      • int “id” - Errata Id
      • string “date” - Date erratum was created.
      • string “advisory_type” - Type of the advisory.
      • string “advisory_name” - Name of the advisory.
      • string “advisory_synopsis” - Summary of the erratum.
space.lib.errata.getDetails(sw, advisoryname)

Description: Retrieves the details for the erratum matching the given advisory name.

Parameters:
  • string sessionKey
  • string advisoryName
Returns:
  • struct - erratum
    • string “issue_date”

    • string “update_date”

    • string “last_modified_date” - This date is only included for

      published erratum and it represents the last time the erratum was modified.

    • string “synopsis”

    • int “release”

    • string “type”

    • string “product”

    • string “errataFrom”

    • string “topic”

    • string “description”

    • string “references”

    • string “notes”

    • string “solution”

space.lib.errata.listAffectedSystems(sw, advisoryname)

Description: Return the list of systems affected by the erratum with advisory name.

Parameters:
  • string sessionKey
  • string advisoryName
Returns:
  • array:
    • struct - system
      • int “id”

      • string “name”

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in

space.lib.errata.listCves(sw, advisoryname)

Description: Returns a list of CVEs applicable to the erratum with the given advisory name.

Parameters:
  • string sessionKey
  • string advisoryName
Returns:
  • array:
    • string - cveName
space.lib.errata.listKeywords(sw, advisoryname)

Description: Get the keywords associated with an erratum matching the given advisory name.

Parameters:
  • string sessionKey
  • string advisoryName
Returns:
  • array:
    • string - Keyword associated with erratum.
space.lib.errata.listPackages(sw, advisoryname)

Description: Returns a list of the packages affected by the erratum with the given advisory name.

Parameters:
  • string sessionKey
  • string advisoryName
Returns:
  • array:
    • struct - package
      • int “id”

      • string “name”

      • string “epoch”

      • string “version”

      • string “release”

      • string “arch_label”

      • array “providing_channels”
        • string - Channel label providing this package.
      • string “build_host”

      • string “description”

      • string “checksum”

      • string “checksum_type”

      • string “vendor”

      • string “summary”

      • string “cookie”

      • string “license”

      • string “path”

      • string “file”

      • string “build_date”

      • string “last_modified_date”

      • string “size”

      • string “payload_size”

space.lib.errata.listUnpublishedErrata(sw)

Description: Returns a list of unpublished errata

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - erratum
      • int “id”
      • int “published”
      • string “advisory”
      • string “advisory_name”
      • string “advisory_type”
      • string “synopsis”
      • dateTime.iso8601 “created”
      • dateTime.iso8601 “update_date”
space.lib.errata.publish(sw, advisoryname, channel_labels)

Description: Publish an existing (unpublished) errata to a set of channels.

Parameters:
  • string sessionKey

  • string advisoryName

  • array:
    • string - channelLabel - list of channel labels to publish to
Returns:
  • struct - errata
    • int “id” - Errata Id
    • string “date” - Date erratum was created.
    • string “advisory_type” - Type of the advisory.
    • string “advisory_name” - Name of the advisory.
    • string “advisory_synopsis” - Summary of the erratum.
space.lib.errata.publishAsOriginal(sw, advisoryname, channel_labels)

Description: Publishes an existing (unpublished) cloned errata to a set of cloned channels according to its original erratum

Parameters:
  • string sessionKey

  • string advisoryName

  • array:
    • string - channelLabel - list of channel labels to publish to
Returns:
  • struct - errata
    • int “id” - Errata Id
    • string “date” - Date erratum was created.
    • string “advisory_type” - Type of the advisory.
    • string “advisory_name” - Name of the advisory.
    • string “advisory_synopsis” - Summary of the erratum.
space.lib.errata.removePackages(sw, advisoryname, packageids)

Description: Remove a set of packages from an erratum with the given advisory name. This method will only allow for modification of custom errata created either through the UI or API.

Parameters:
  • string sessionKey

  • string advisoryName

  • array:
    • int - packageId
Returns:
  • int - representing the number of packages removed, exception

    otherwise

space.lib.errata.setDetails(sw, advisoryname, errata_info)

Description: Set erratum details. All arguments are optional and will only be modified if included in the struct. This method will only allow for modification of custom errata created either through the UI or API.

Parameters:
  • string sessionKey

  • string advisoryName

  • struct - errata details
    • string “synopsis”

    string “advisory_name” - int “advisory_release” - string “advisory_type” - Type of advisory (one of the following:

    ‘Security Advisory’, ‘Product Enhancement Advisory’, or ‘Bug Fix Advisory’

    • string “product”

    • string “errataFrom”

    • string “topic”

    • string “description”

    • string “references”

    • string “notes”

    • string “solution”

    • array “bugs” - ‘bugs’ is the key into the struct
      • struct - bug
        • int “id” - Bug Id
        • string “summary”
        • string “url”
    • array “keywords” - ‘keywords’ is the key into the struct
      • string - keyword - List of keywords to associate with the

        errata.

    • array “CVEs” - ‘cves’ is the key into the struct
      • string - cves - List of CVEs to associate with the errata.
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: kickstart

Provides methods to access and modify distribution channel information.

Available methods:

space.lib.kickstart.cloneProfile(sw, kslabeltoclone, newkslabel)

Description: Clone a Kickstart Profile

Parameters:
  • string sessionKey
  • string ksLabelToClone - Label of the kickstart profile to clone
  • string newKsLabel - label of the cloned profile

Returns: int - 1 on success, exception thrown otherwise.

space.lib.kickstart.createProfile(sw, profilelabel, virtualizationtype, kickstartabletreelabel, kickstarthost, rootpassword)

Description: Import a kickstart profile into RHN.

Parameters:
  • string sessionKey

  • string profileLabel - Label for the new kickstart profile.

  • string virtualizationType - none, para_host, qemu, xenfv or xenpv.

  • string kickstartableTreeLabel - Label of a kickstartable tree to

    associate the new profile with.

  • string kickstartHost - Kickstart hostname (of a satellite or proxy)

    used to construct the default download URL for the new kickstart profile.

  • string rootPassword - Root password.

Returns: int - 1 on success, exception thrown otherwise.

space.lib.kickstart.createProfileWithCustomUrl(sw, profilelabel, virtualizationtype, kickstartabletreelabel, downloadurl, rootpassword)

Description: Import a kickstart profile into RHN.

Parameters:
  • string sessionKey

  • string profileLabel - Label for the new kickstart profile.

  • string virtualizationType - none, para_host, qemu, xenfv or xenpv.

  • string kickstartableTreeLabel - Label of a kickstartable tree to

    associate the new profile with.

  • boolean downloadUrl - Download URL, or ‘default’ to use the kickstart

    tree’s default URL.

  • string rootPassword - Root password.

Returns: int - 1 on success, exception thrown otherwise.

space.lib.kickstart.deleteProfile(sw, kslabel)

Description: Delete a kickstart profile

Parameters:
  • string sessionKey

  • string ksLabel - The label of the kickstart profile you want to

    remove

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.disableProfile(sw, profilelabel, disabled)

Description: Enable/Disable a Kickstart Profile

Parameters:
  • string sessionKey

  • string profileLabel - Label for the kickstart tree you want to

    en/disable

  • string disabled - true to disable the profile

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.findKickstartForIp(sw, ipaddress)

Description: Find an associated kickstart for a given ip address.

Parameters:
  • string sessionKey
  • string ipAddress - The ip address to search for (i.e. 192.168.0.1)
Returns:
  • string - label of the kickstart. Empty string (“”) if not found.
space.lib.kickstart.importFile(sw, profilelabel, virtualizationtype, kickstartabletreelabel, kickstartfilecontents, kickstarthost=None)

Description: Import a kickstart profile into RHN.

Parameters:
  • string sessionKey

  • string profileLabel - Label for the new kickstart profile.

  • string virtualizationType - none, para_host, qemu, xenfv or xenpv.

  • string kickstartableTreeLabel - Label of a kickstartable tree to

    associate the new profile with.

  • string kickstartHost - Kickstart hostname (of a satellite or proxy)

    used to construct the default download URL for the new kickstart profile. Using this option signifies that this default URL will be used instead of any url/nfs/cdrom/harddrive commands in the kickstart file itself.

  • string kickstartFileContents - Contents of the kickstart file to

    import.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.importRawFile(sw, profilelabel, virtualizationtype, kickstartabletreelabel, kickstartfilecontents)

Description: Import a raw kickstart file into satellite.

Parameters:
  • string sessionKey

  • string profileLabel - Label for the new kickstart profile.

  • string virtualizationType - none, para_host, qemu, xenfv or xenpv.

  • string kickstartableTreeLabel - Label of a kickstartable tree to

    associate the new profile with.

  • string kickstartFileContents - Contents of the kickstart file to

    import.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.isProfileDisabled(sw, profilelabel)

Description: Returns whether a kickstart profile is disabled

Parameters:
  • string sessionKey
  • string profileLabel - kickstart profile label
Returns:
  • true if profile is disabled
space.lib.kickstart.listAllIpRanges(sw)

Description: List all Ip Ranges and their associated kickstarts available in the user’s org.

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - Kickstart Ip Range
      • string “ksLabel” - The kickstart label associated with the ip

        range

      • string “max” - The max ip of the range

      • string “min” - The min ip of the range

space.lib.kickstart.listKickstartableChannels(sw)

Description: List kickstartable channels for the logged in user.

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - channel
      • int “id”

      • string “name”

      • string “label”

      • string “arch_name”

      • string “summary”

      • string “description”

      • string “checksum_label”

      • dateTime.iso8601 “last_modified”

      • string “maintainer_name”

      • string “maintainer_email”

      • string “maintainer_phone”

      • string “support_policy”

      • string “gpg_key_url”

      • string “gpg_key_id”

      • string “gpg_key_fp”

      • dateTime.iso8601 “yumrepo_last_sync” - (optional)

      • string “end_of_life”

      • string “parent_channel_label”

      • string “clone_original”

      • array:
        • struct - contentSources
          • int “id”
          • string “label”
          • string “sourceUrl”
          • string “type”
space.lib.kickstart.listKickstarts(sw)

Description: Provides a list of kickstart profiles visible to the user’s org

Parameters:
  • string sessionKey
Returns:
  • array:

  • struct - kickstart
    • string “label”
    • string “tree_label”
    • string “name”
    • boolean “advanced_mode”
    • boolean “org_default”
    • boolean “active”
space.lib.kickstart.renameProfile(sw, originallabel, newlabel)

Description: Rename a Kickstart Profile in Satellite

Parameters:
  • string sessionKey

  • string originalLabel - Label for the kickstart profile you want to

    rename

  • string newLabel - new label to change to

Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: kickstart.filepreservation

Provides methods to retrieve and manipulate kickstart file preservation lists.

Available methods:

space.lib.kickstart.filepreservation.create(sw, name, filenames)

Description: Create a new file preservation list.

Parameters:
  • string session_key

  • string name - name of the file list to create

  • array:
    • string - name - file names to include
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.filepreservation.delete(sw, name)

Description: Delete a file preservation list.

Parameters:
  • string session_key
  • string name - name of the file list to delete
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.filepreservation.getDetails(sw, name)

Description: Returns all of the data associated with the given file preservation list.

Parameters:
  • string session_key
  • string name - name of the file list to retrieve details for
Returns:
  • struct - file list
    • string “name”

    • array “file_names”
      • string name
space.lib.kickstart.filepreservation.listAllFilePreservations(sw)

Description: List all file preservation lists for the organization associated with the user logged into the given session

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - file preservation
      • int “id”
      • string “name”
      • dateTime.iso8601 “created”
      • dateTime.iso8601 “last_modified”

Namespace: kickstart.keys

Provides methods to manipulate kickstart keys.

Available methods:

space.lib.kickstart.keys.create(sw, description, keytype, content)

Description: creates a new key with the given parameters

Parameters:
  • string session_key
  • string description
  • string type - valid values are GPG or SSL
  • string content
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.keys.delete(sw, description)

Description: deletes the key identified by the given parameters

Parameters:
  • string session_key
  • string description
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.keys.getDetails(sw, description)

Description: returns all of the data associated with the given key

Parameters:
  • string session_key
  • string description
Returns:
  • struct - key
    • string “description”
    • string “type”
    • string “content”
space.lib.kickstart.keys.listAllKeys(sw)

Description: list all keys for the org associated with the user logged into the given session

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - key
      • string “description”
      • string “type”
space.lib.kickstart.keys.update(sw, description, keytype, content)

Description: Updates type and content of the key identified by the description

Parameters:
  • string session_key
  • string description
  • string type - valid values are GPG or SSL
  • string content
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: kickstart.profile

Provides methods to access and modify many aspects of a kickstart profile.

Available methods:

space.lib.kickstart.profile.addIpRange(sw, label, minrange, maxrange)

Description: Add an ip range to a kickstart profile.

Parameters:
  • string sessionKey

  • string label - The label of the kickstart

  • string min - The ip address making up the minimum of the range

    (i.e. 192.168.0.1)

  • string max - The ip address making up the maximum of the range

    (i.e. 192.168.0.254)

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.addScript(sw, kslabel, contents, interpreter, script_type, chroot, template)

Description: Add a pre/post script to a kickstart profile.

Parameters:
  • string sessionKey

  • string ksLabel - The kickstart label to add the script to.

  • string contents - The full script to add.

  • string interpreter - The path to the interpreter to use

    (i.e. /bin/bash). An empty string will use the kickstart default interpreter.

  • string type - The type of script (either ‘pre’ or ‘post’).

  • boolean chroot - Whether to run the script in the chrooted install

    location (recommended) or not.

  • boolean template - Enable templating using cobbler.

Returns:
  • int id - the id of the added script
space.lib.kickstart.profile.compareActivationKeys(sw, kickstartlabel1, kickstartlabel2)

Description: Returns a list for each kickstart profile; each list will contain activation keys not present on the other profile.

Parameters:
  • string sessionKey
  • string kickstartlabel1
  • string kickstartlabel2
Returns:
  • struct - Comparison Info
    • array “kickstartLabel1” - Actual label of the first kickstart

      profile is the key into the struct

      • struct - activation key
        • string “key”

        • string “description”

        • int “usage_limit”

        • string “base_channel_label”

        • array “child_channel_labels”
          • string childChannelLabel
        • array “entitlements”
          • string entitlementLabel
        • array “server_group_ids”
          • string serverGroupId
        • array “package_names”
          • string packageName - (deprecated by packages)
        • array “packages”
          • struct - package
            • string “name” - packageName
            • string “arch” - archLabel - optional
        • boolean “universal_default”

        • boolean “disabled”

    • array “kickstartLabel2” - Actual label of the second kickstart

      profile is the key into the struct

      • struct - activation key
        • string “key”

        • string “description”

        • int “usage_limit”

        • string “base_channel_label”

        • array “child_channel_labels”
          • string childChannelLabel
        • array “entitlements”
          • string entitlementLabel
        • array “server_group_ids”
          • string serverGroupId
        • array “package_names”
          • string packageName - (deprecated by packages)
        • array “packages”
          • struct - package
            • string “name” - packageName
            • string “arch” - archLabel - optional
        • boolean “universal_default”

        • boolean “disabled”

space.lib.kickstart.profile.compareAdvancedOptions(sw, kickstartlabel1, kickstartlabel2)

Description: Returns a list for each kickstart profile; each list will contain the properties that differ between the profiles and their values for that specific profile .

Parameters:
  • string sessionKey
  • string kickstartlabel1
  • string kickstartlabel2
Returns:
  • struct - Comparison Info
    • array “kickstartlabel1” - Actual label of the first kickstart

      profile is the key into the struct

      • struct - value
        • string “name”
        • string “value”
        • boolean “enabled”
    • array “kickstartlabel2” - Actual label of the second kickstart

      profile is the key into the struct

      • struct - value
        • string “name”
        • string “value”
        • boolean “enabled”
space.lib.kickstart.profile.comparePackages(sw, kickstartlabel1, kickstartlabel2)

Description: Returns a list for each kickstart profile; each list will contain package names not present on the other profile.

Parameters:
  • string sessionKey
  • string kickstartlabel1
  • string kickstartlabel2
Returns:
  • struct - Comparison Info
    • array “kickstartlabel1” - Actual label of the first kickstart

      profile is the key into the struct

      • string - package name
    • array “kickstartlabel2” - Actual label of the second kickstart

      profile is the key into the struct

      • string - package name
space.lib.kickstart.profile.downloadKickstart(sw, kslabel, host)

Description: Download the full contents of a kickstart file.

Parameters: string sessionKey string kslabel - The label of the kickstart to download. string host - The host to use when referring to the satellite itself

Returns: string - The contents of the kickstart file.

space.lib.kickstart.profile.downloadRenderedKickstart(sw, kslabel)

Description: Downloads the Cobbler-rendered Kickstart file.

Parameters:
  • string sessionKey
  • string kslabel - The label of the kickstart to download.
Returns:
  • string - The contents of the kickstart file.
space.lib.kickstart.profile.getAdvancedOptions(sw, kslabel)

Description: Get advanced options for a kickstart profile.

Parameters: string sessionKey string kslabel - Label of kickstart profile to be changed.

Returns:
  • array:
    • struct - option
      • string “name”
      • string “arguments”
space.lib.kickstart.profile.getCfgPreservation(sw, kslabel)

Description: Get ks.cfg preservation option for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel - Label of kickstart profile to be changed.
Returns:
  • boolean - The value of the option. True means that ks.cfg will be

    copied to /root, false means that it will not.

space.lib.kickstart.profile.getChildChannels(sw, kslabel)

Description: Get the child channels for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel - Label of kickstart profile.
Returns:
  • string - channelLabel
space.lib.kickstart.profile.getCustomOptions(sw, kslabel)

Description: Get custom options for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel
Returns:
  • struct - option
    • int “id”
    • string “arguments”
space.lib.kickstart.profile.getKickstartTree(sw, kslabel)

Description: Get the kickstart tree for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel - Label of kickstart profile to be changed.
Returns:
  • string kstreeLabel - Label of the kickstart tree.
space.lib.kickstart.profile.getVariables(sw, kslabel)

Description: Returns a list of variables associated with the specified kickstart profile

Parameters:
  • string sessionKey
  • string ksLabel
Returns:
  • struct - kickstart variable
    • string “key”
    • string or int “value”
space.lib.kickstart.profile.listIpRanges(sw, label)

Description: List all ip ranges for a kickstart profile.

Parameters:
  • string sessionKey
  • string label - The label of the kickstart
Returns:
  • struct - Kickstart Ip Range
    • string “ksLabel” - The kickstart label associated with the ip

      range

    • string “max” - The max ip of the range

    • string “min” - The min ip of the range

space.lib.kickstart.profile.listScripts(sw, kslabel)

Description: List the pre and post scripts for a kickstart profile. profile

Parameters:
  • string sessionKey
  • string kslabel - The label of the kickstart
Returns:
  • struct - kickstart script
    • int “id”

    • string “contents”

    • string “script_type” - Which type of script (‘pre’ or ‘post’).

    • string “interpreter” - The scripting language interpreter to use

      for this script. An empty string indicates the default kickstart shell.

    • boolean “chroot” - True if the script will be executed within the

      chroot environment.

    • boolean “template” - True if templating using cobbler is enabled

space.lib.kickstart.profile.removeIpRange(sw, kslabel)

Description: Remove an ip range from a kickstart profile.

Parameters:
  • string sessionKey

  • string kslabel - The kickstart label of the ip range you want to

    remove

  • string ip_address - An Ip Address that falls within the range that

    you are wanting to remove. The min or max of the range will work.

Returns:
  • int - 1 on successful removal, 0 if range wasn’t found for the

    specified kickstart, exception otherwise.

space.lib.kickstart.profile.removeScript(sw, kslabel, scriptid)

Description: Remove a script from a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel - The kickstart from which to remove the script from.
  • int scriptid - The id of the script to remove.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.setAdvancedOptions(sw, kslabel, options)

Description: Set advanced options for a kickstart profile. Parameters:

  • string sessionKey

  • string kslabel

  • options - array:
    • struct - advanced options

    • string “name” - Name of the advanced option. Valid Option names:

      autostep, interactive, install, upgrade, text, network, cdrom, harddrive, nfs, url, lang, langsupport keyboard, mouse, device, deviceprobe, zerombr, clearpart, bootloader, timezone, auth, rootpw, selinux, reboot, firewall, xconfig, skipx, key, ignoredisk, autopart, cmdline, firstboot, graphical, iscsi, iscsiname, logging, monitor, multipath, poweroff, halt, services, shutdown, user, vnc, zfcp, driverdisk

    • string “arguments” - Arguments of the option

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.setCfgPreservation(sw, kslabel, preserve)

Description: Set ks.cfg preservation option for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel - Label of kickstart profile to be changed.
  • boolean preserve - whether or not ks.cfg and all include fragments will be copied to /root.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.setChildChannels(sw, kslabel, channellabels)

Description: Set the child channels for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel - Label of kickstart profile to be changed.
  • array: channellabels - List of labels of child channels
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.setCustomOptions(sw, kslabel, options)

Description: Set custom options for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel
  • array: [] options
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.setKickstartTree(sw, kslabel, kstreelabel)

Description: Set the kickstart tree for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel - Label of kickstart profile to be changed.
  • string kstreelabel - Label of new kickstart tree.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.setLogging(sw, kslabel, preks, postks)

Description: Set logging options for a kickstart profile.

Parameters:
  • string sessionKey

  • string kslabel - Label of kickstart profile to be changed.

  • boolean preks - whether or not to log the pre section of a kickstart

    to /root/ks-pre.log

  • boolean postks - whether or not to log the post section of a

    kickstart to /root/ks-post.log

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.setVariables(sw, kslabel, ksvars)

Description: Associates list of kickstart variables with the specified kickstart profile

Parameters:
  • string sessionKey

  • string kslabel

  • ksvars: array:
    • struct - kickstart variable
      • string “key”
      • string or int “value”

Returns: int - 1 on success, exception thrown otherwise.

Namespace: kickstart.profile.keys

Provides methods to access and modify the list of activation keys associated with a kickstart profile.

Available methods:

space.lib.kickstart.profile.keys.addActivationKey(sw, kslabel, keyname)

Description: Add an activation key association to the kickstart profile

Parameters:
  • string sessionKey
  • string ksLabel - the kickstart profile label
  • string key - the activation key
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.keys.getActivationKeys(sw, kslabel)

Description: Lookup the activation keys associated with the kickstart profile.

Parameters:
  • string sessionKey
  • string ksLabel - the kickstart profile label
Returns:
  • array:
    • struct - activation key
      • string “key”

      • string “description”

      • int “usage_limit”

      • string “base_channel_label”

      • array “child_channel_labels”
        • string childChannelLabel
      • array “entitlements”
        • string entitlementLabel
      • array “server_group_ids”
        • string serverGroupId
      • array “package_names”
        • string packageName - (deprecated by packages)
      • array “packages”
        • struct - package
          • string “name” - packageName
          • string “arch” - archLabel - optional
      • boolean “universal_default”

      • boolean “disabled”

space.lib.kickstart.profile.keys.removeActivationKey(sw, kslabel, keyname)

Description: Remove an activation key association from the kickstart profile

Parameters:
  • string sessionKey
  • string ksLabel - the kickstart profile label
  • string keyname - the activation key
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: kickstart.profile.software

Provides methods to access and modify the list of activation keys associated with a kickstart profile.

Available methods:

space.lib.kickstart.profile.software.appendToSoftwareList(sw, kslabel)

Description: Append the list of software packages to a kickstart profile. Duplicate packages will be ignored.

Parameters:
  • string sessionKey

  • string ksLabel - The label of a kickstart profile.

  • string[] packageList - A list of package names to be added

    to the profile.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.software.getSoftwareList(sw, kslabel)

Description: Get a list of a kickstart profile’s software packages.

Parameters:
  • string sessionKey
  • string ksLabel - The label of a kickstart profile.

Returns:

  • string[] - Get a list of a kickstart profile’s software packages.
space.lib.kickstart.profile.software.setSoftwareList(sw, kslabel, packagelist)

Description: Set the list of software packages for a kickstart profile.

Parameters:
  • string sessionKey

  • string ksLabel - The label of a kickstart profile.

  • string[] packageList - A list of package names to be set on the

    profile.

Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: kickstart.profile.system

Provides methods to set various properties of a kickstart profile.

Available methods:

space.lib.kickstart.profile.system.addFilePreservations(sw, kslabel, filepreservations)

Description: Adds the given list of file preservations to the specified kickstart profile.

Parameters:
  • string sessionKey

  • string kickstartLabel

  • array:
    • string - filePreservations

Returns: int - 1 on success, exception thrown otherwise.

space.lib.kickstart.profile.system.addKeys(sw, kslabel, keydescription)

Description: Adds the given list of keys to the specified kickstart profile.

Parameters:
  • string sessionKey

  • string kickstartLabel

  • array:
    • string - keyDescription
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.system.checkConfigManagement(sw, kslabel)

Description: Check the configuration management status for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel - the kickstart profile label
Returns:
  • boolean enabled - true if configuration management is enabled;

    otherwise, false

space.lib.kickstart.profile.system.checkRemoteCommands(sw, kslabel)

Description: Check the remote commands status flag for a kickstart profile.

Parameters:
  • string sessionKey
  • string ksLabel - the kickstart profile label
Returns:
  • boolean enabled - true if remote commands support is enabled;

    otherwise, false

space.lib.kickstart.profile.system.disableConfigManagement(sw, kslabel)

Description: Disables the configuration management flag in a kickstart profile so that a system created using this profile will be NOT be configuration capable.

Parameters:
  • string sessionKey
  • string ksLabel - the kickstart profile label
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.system.disableRemoteCommands(sw, kslabel)

Description: Disables the remote command flag in a kickstart profile so that a system created using this profile will be capable of running remote commands

Parameters:
  • string sessionKey
  • string ksLabel - the kickstart profile label
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.system.enableConfigManagement(sw, kslabel)

Description: Enables the configuration management flag in a kickstart profile so that a system created using this profile will be configuration capable.

Parameters:
  • string sessionKey
  • string kslabel - the kickstart profile label

Returns: int - 1 on success, exception thrown otherwise.

space.lib.kickstart.profile.system.enableRemoteCommands(sw, kslabel)

Description: Enables the remote command flag in a kickstart profile so that a system created using this profile will be capable of running remote commands

Parameters:
  • string sessionKey
  • string ksLabel - the kickstart profile label
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.system.getLocale(sw, kslabel)

Description: Retrieves the locale for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel - the kickstart profile label
Returns:
  • struct - locale info
    • string “locale”

    • boolean “useUtc”
      • true - the hardware clock uses UTC
      • false - the hardware clock does not use UTC
space.lib.kickstart.profile.system.getPartitioningScheme(sw, kslabel)

Description: Get the partitioning scheme for a kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel - The label of a kickstart profile.
Returns:
  • string[] - A list of partitioning commands used to setup the

    partitions, logical volumes and volume groups.

space.lib.kickstart.profile.system.getRegistrationType(sw, kslabel)

Description: returns the registration type of a given kickstart profile. Registration Type can be one of reactivation/deletion/none These types determine the behaviour of the registration when using this profile for reprovisioning.

Parameters:
  • string sessionKey
  • string kslabel
Returns:
  • string registrationType
    • reactivation
    • deletion

none

space.lib.kickstart.profile.system.getSELinux(sw, kslabel)

Description: Retrieves the SELinux enforcing mode property of a kickstart profile.

Parameters: string sessionKey string kslabel - the kickstart profile label

Returns:
  • string enforcingMode
    • enforcing
    • permissive
    • disabled
space.lib.kickstart.profile.system.listFilePreservations(sw, kslabel)

Description: Returns the set of all file preservations associated with the given kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel
Returns:
  • array:
    • struct - file list
      • string “name”

      • array “file_names”
        • string name
space.lib.kickstart.profile.system.listKeys(sw, kslabel)

Description: Returns the set of all keys associated with the given kickstart profile.

Parameters:
  • string sessionKey
  • string kslabel
Returns:
  • array:
    • struct - key
      • string “description”
      • string “type”
      • string “content”
space.lib.kickstart.profile.system.removeFilePreservations(sw, kslabel, filepreservations)

Description: Removes the given list of file preservations from the specified kickstart profile.

Parameters:
  • string sessionKey

  • string kslabel

  • array:
    • string - filePreservations
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.system.removeKeys(sw, kslabel, keydescription)

Description: Removes the given list of keys from the specified kickstart profile.

Parameters:
  • string sessionKey

  • string kslabel

  • array:
    • string - keyDescription
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.system.setLocale(sw, kslabel, locale, useutc)

Description: Sets the locale for a kickstart profile.

Parameters:
  • string sessionKey

  • string kslabel - the kickstart profile label

  • string locale - the locale

  • boolean useUtc

    true - the hardware clock uses UTC false - the hardware clock does not use UTC

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.system.setPartitioningScheme(sw, kslabel, scheme)

Description: Set the partitioning scheme for a kickstart profile.

Parameters:
  • string sessionKey

  • string kslabel - The label of the kickstart profile to update.

  • string[] scheme - The partitioning scheme is a list of partitioning

    command strings used to setup the partitions, volume groups and logical volumes.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.profile.system.setRegistrationType(sw, kslabel, registrationtype)

Description: Sets the registration type of a given kickstart profile. Registration Type can be one of reactivation/deletion/none These types determine the behaviour of the re registration when using this profile.

Parameters:
  • string sessionKey

  • string kslabel

  • string registrationType
    • reactivation - to try and generate a reactivation key and use

      that to register the system when reprovisioning a system.

    • deletion - to try and delete the existing system profile and

      reregister the system being reprovisioned as new

    • none - to preserve the status quo and leave the current system as

      a duplicate on a reprovision.

Returns: int - 1 on success, exception thrown otherwise.

space.lib.kickstart.profile.system.setSELinux(sw, kslabel, enforcingmode)

Description: Sets the SELinux enforcing mode property of a kickstart profile so that a system created using this profile will be have the appropriate SELinux enforcing mode.

Parameters:
  • string sessionKey

  • string kslabel - the kickstart profile label

  • string enforcingMode - the selinux enforcing mode
    • enforcing
    • permissive
    • disabled
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: kickstart.snippet

Provides methods to create kickstart files

Available methods:

space.lib.kickstart.snippet.createOrUpdate(sw, name, contents)

Description: Will create a snippet with the given name and contents if it doesn’t exist. If it does exist, the existing snippet will be updated.

Parameters:
  • string sessionKey
  • string name
  • string contents
Returns:
  • struct - snippet
    • string “name”

    • string “contents”

    • string “fragment” - The string to include in a kickstart file

      that will generate this snippet.

    • string “file” - The local path to the file containing this

      snippet.

space.lib.kickstart.snippet.delete(sw, name)

Description: Delete the specified snippet. If the snippet is not found, 0 is returned.

Parameters:
  • string sessionKey
  • string name
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.snippet.listAll(sw)

Parameters: string sessionKey

Returns:
  • array:
    • struct - snippet
      • string “name”

      • string “contents”

      • string “fragment” - The string to include in a kickstart file

        that will generate this snippet.

      • string “file” - The local path to the file containing this

        snippet.

space.lib.kickstart.snippet.listCustom(sw)

Description: List only custom snippets for the logged in user. These snipppets are editable.

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - snippet
      • string “name”

      • string “contents”

      • string “fragment” - The string to include in a kickstart file

        that will generate this snippet.

      • string “file” - The local path to the file containing this

        snippet.

space.lib.kickstart.snippet.listDefault(sw)

Description: List only pre-made default snippets for the logged in user. These snipppets are not editable.

Parameters: - string sessionKey

Returns:
  • array:
    • struct - snippet
      • string “name”

      • string “contents”

      • string “fragment” - The string to include in a kickstart

        file that will generate this snippet.

      • string “file” - The local path to the file containing this

        snippet.

Namespace: kickstart.tree

Provides methods to access and modify the kickstart trees.

Available methods:

space.lib.kickstart.tree.create(sw, treelabel, basepath, channellabel, installtype)

Description: Create a Kickstart Tree (Distribution) in Satellite.

Parameters:
  • string sessionKey

  • string treeLabel - The new kickstart tree label.

  • string basePath - Path to the base or root of the kickstart tree.

  • string channelLabel - Label of channel to associate with the

    kickstart tree.

  • string installType - Label for KickstartInstallType

    (rhel_2.1, rhel_3, rhel_4, rhel_5, fedora_9).

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.tree.delete(sw, treelabel)

Description: Delete a Kickstart Tree (Distribution) in Satellite.

Parameters:
  • string sessionKey
  • string treelabel - Label for the kickstart tree to delete.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.tree.deleteTreeAndProfiles(sw, treelabel)

Description: Delete a kickstarttree and any profiles associated with this kickstart tree. WARNING: This will delete all profiles associated with this kickstart tree!

Parameters:
  • string sessionKey
  • string treeLabel - Label for the kickstart tree to delete.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.tree.getDetails(sw, treelabel)

Description: The detailed information about a kickstartable tree given the tree name.

Parameters:
  • string sessionKey
  • string treeLabel - Label of kickstartable tree to search.
Returns:
  • struct - kickstartable tree
    • int “id”

    • string “label”

    • string “abs_path”

    • int “channel_id”

    • struct - kickstart install type
      • int “id”
      • string “label”
      • string “name”
space.lib.kickstart.tree.list(sw, channellabel)

Description: List the available kickstartable trees for the given channel.

Parameters:
  • string sessionKey
  • string channellabel - Label of channel to search.
Returns:
  • array:
    • struct - kickstartable tree
      • int “id”
      • string “label”
      • string “base_path”
      • int “channel_id”
space.lib.kickstart.tree.listInstallTypes(sw)

Description: List the available kickstartable install types (rhel2,3,4,5 and fedora9+).

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - kickstart install type
      • int “id”
      • string “label”
      • string “name”
space.lib.kickstart.tree.rename(sw, originallabel, newlabel)

Description: Rename a Kickstart Tree (Distribution) in Satellite.

Parameters:
  • string sessionKey
  • string originalLabel - Label for the kickstart tree to rename.
  • string newLabel - The kickstart tree’s new label.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.kickstart.tree.update(sw, treelabel, basepath, channellabel, installtype)

Description: Edit a Kickstart Tree (Distribution) in Satellite.

Parameters:
  • string sessionKey

  • string treelabel - Label for the kickstart tree.

  • string basepath - Path to the base or root of the kickstart tree.

  • string channellabel - Label of channel to associate with kickstart

    tree.

  • string installtype - Label for KickstartInstallType

    (rhel_2.1, rhel_3, rhel_4, rhel_5, fedora_9).

Returns: int - 1 on success, exception thrown otherwise.

Namespace: org

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

space.lib.org.create(sw, orgname, adminlogin, adminpassword, prefix, firstname, lastname, email, usepamauth)

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)

space.lib.org.delete(sw, orgid)

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.
space.lib.org.getDetails(sw, orgid)

Description: The detailed information about an organization given the organization ID.

Parameters:
  • string sessionkey
  • int orgId or 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)

space.lib.org.listOrgs(sw)

Description: Returns the list of organizations.

Parameters:
  • string sessionkey
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)

space.lib.org.listSoftwareEntitlements(sw, label=None, includeunentitled=None)

Description: List software entitlement allocation information across all organizations. Caller must be a satellite administrator.

Parameters:
  • string sessionkey
Returns:
  • array:
    • struct - entitlement usage
      • string “label”
      • string “name”
      • int “free”
      • int “used”
      • int “allocated”
      • int “unallocated”
      • int “free_flex”
      • int “used_flex”
      • int “allocated_flex”
      • int “unallocated_flex”
space.lib.org.listSoftwareEntitlementsForOrg(sw, orgid)

Description: List an organization’s allocation of each software entitlement. A value of -1 indicates unlimited entitlements.

Parameters:
  • string sw
  • int orgid
Returns:
  • array:
    • struct - entitlement usage
      • string “label”
      • string “name”
      • int “allocated”
      • int “unallocated”
      • int “free”
      • int “used”
      • int “allocated_flex”
      • int “unallocated_flex”
      • int “free_flex”
      • int “used_flex”
space.lib.org.listSystemEntitlements(sw, label=None, includeunentitled=None)

Description: Lists system entitlement allocation information across all organizations. Caller must be a satellite administrator.

Parameters:
  • string sessionkey
Returns:
  • array:
    • struct - entitlement usage
      • string “label”
      • string “name”
      • int “free”
      • int “used”
      • int “allocated”
      • int “unallocated”
      • int “free_flex”
      • int “used_flex”
      • int “allocated_flex”
      • int “unallocated_flex”
space.lib.org.listSystemEntitlementsForOrg(sw, orgid)

Description: List an organization’s allocation of each system entitlement.

Parameters:
  • string sw
  • int orgid
Returns:
  • array:
    • struct - entitlement usage
      • string “label”
      • string “name”
      • int “free”
      • int “used”
      • int “allocated”
      • int “unallocated”
space.lib.org.listUsers(sw, orgid)

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”
space.lib.org.migrateSystems(sw, orgid, system_ids)

Description: Migrate systems from one organization to another. If executed by a Satellite 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 orgid - ID of the organization where the system(s) will be

    migrated to.

  • array:
    • int - systeids
Returns:
  • array:
    • int - serverIdMigrated
space.lib.org.setSoftwareEntitlements(sw, orgid, label, allocation)

Description: Set an organization’s entitlement allocation for the given software entitlement. If increasing the entitlement allocation, the default organization (i.e. orgId=1) must have a sufficient number of free entitlements.

Parameters:
  • string sessionkey
  • int orgid
  • string label - Software entitlement label.
  • int allocation
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.org.setSoftwareFlexEntitlements(sw, orgid, label, allocation)

Description: Set an organization’s flex entitlement allocation for the given software entitlement. If increasing the flex entitlement allocation, the default organization (i.e. orgId=1) must have a sufficient number of free flex entitlements.

Parameters:
  • string sessionkey
  • int orgid
  • string label - Software entitlement label.
  • int allocation
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.org.setSystemEntitlements(sw, orgid, label, allocation)

Description: Set an organization’s entitlement allocation for the given software entitlement. If increasing the entitlement allocation, the default organization (i.e. orgId=1) must have a sufficient number of free entitlements.

Parameters:
  • string sessionKey

  • int orgid

  • string label - System entitlement label. Valid values include:
    • enterprise_entitled
    • monitoring_entitled
    • provisioning_entitled
    • virtualization_host
    • virtualization_host_platform
  • int allocation

Returns: int - 1 on success, exception thrown otherwise.

space.lib.org.updateName(sw, orgid, name)

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)

Namespace: org.trusts

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

space.lib.org.trusts.addTrust(sw, orgid, trust_org_id)

Description: Add an organization to the list of trusted organizations.

Parameters:
  • string sessionKey
  • int orgid
  • int trust_org_id
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.org.trusts.getDetails(sw, trust_org_id)

Description: The trust details about an organization given the organization’s ID.

Parameters:
  • string sessionKey
  • int trust_org_id - Id of the trusted organization
Returns:
  • struct - org trust details
    • dateTime.iso8601 “created” - Date the organization was created

    • dateTime.iso8601 “trusted_since” - Date the organization was

      defined as trusted

    • int “channels_provided” - Number of channels provided by the

      organization.

    • int “channels_consumed” - Number of channels consumed by the

      organization.

    • int “systems_migrated_to” - Number of systems migrated to the

      organization.

    • int “systems_migrated_from” - Number of systems migrated from the

      organization.

space.lib.org.trusts.listChannelsConsumed(sw, trust_org_id)

Description: Lists all software channels that the organization given may consume from the user’s organization.

Parameters:
  • string sessionKey
  • int trust_org_id - Id of the trusted organization
Returns:
  • array:
    • struct - channel info
      • int “channel_id”
      • string “channel_name”
      • int “packages”
      • int “systems”
space.lib.org.trusts.listChannelsProvided(sw, trust_org_id)

Description: Lists all software channels that the organization given is providing to the user’s organization.

Parameters:
  • string sessionkey
  • int trust_org_id - Id of the trusted organization
Returns:
  • array:
    • struct - channel info
      • int “channel_id”
      • string “channel_name”
      • int “packages”
      • int “systems”
space.lib.org.trusts.listOrgs(sw)

Description: List all organanizations trusted by the user’s organization.

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - trusted organizations
      • int “org_id”
      • string “org_name”
      • int “shared_channels”
space.lib.org.trusts.listSystemsAffected(sw, orgid, trust_org_id)

Description: Get a list of systems within the trusted organization that would be affected if the trust relationship was removed. This basically lists systems that are sharing at least (1) package.

Parameters:
  • string sessionKey
  • int orgId
  • string trustOrgId
Returns:
  • array:
    • struct - affected systems
      • int “systemId”
space.lib.org.trusts.listTrusts(sw, orgid)

Description: Returns the list of trusted organizations.

Parameters:
  • string sessionKey
  • int orgid
Returns:
  • array:
    • struct - trusted organizations
      • int “orgId”
      • string “orgName”
      • bool “trustEnabled”
space.lib.org.trusts.removeTrust(sw, orgid, trust_org_id)

Description: Remove an organization to the list of trusted organizations.

Parameters:
  • string sessionKey
  • int orgId
  • int trustOrgId
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: packages

Methods to retrieve information about the Packages contained within this server.

space.lib.packages.findByNvrea(sw, name, version, release, epoch, arch_label)

Description: Lookup the details for packages with the given name, version, release, architecture label, and (optionally) epoch.

Parameters:
  • string sw

  • string name

  • string version

  • string release

  • string epoch - If set to something other than empty string, strict

    matching will be used and the epoch string must be correct. If set to an empty string, if the epoch is null or there is only one NVRA combination, it will be returned. (Empty string is recommended.)

  • string arch_label

Returns:
  • array:
    • struct - package
      • string “name”

      • string “version”

      • string “release”

      • string “epoch”

      • int “id”

      • string “arch_label”

      • string “path” - The path on that file system that the

        package resides

      • string “provider” - The provider of the package,

        determined by the gpg key it was signed with.

      • dateTime.iso8601 “last_modified”

space.lib.packages.getDetails(sw, package_id)

Description: Retrieve details for the package with the ID.

Parameters:
  • string sessionKey
  • int package_id
Returns:
  • struct - package
    • int “id”

    • string “name”

    • string “epoch”

    • string “version”

    • string “release”

    • string “arch_label”

    • array “providing_channels”
      • string Channel label providing this package.
    • string “build_host”

    • string “description”

    • string “checksum”

    • string “checksum_type”

    • string “vendor”

    • string “summary”

    • string “cookie”

    • string “license”

    • string “file”

    • string “build_date”

    • string “last_modified_date”

    • string “size”

    • string “path” - The path on the Satellite’s file system that the

      package resides.

    • string “payload_size”

space.lib.packages.getPackage(sw, package_id)

Description: Retrieve the package file associated with a package.

Parameters:
  • string sessionKey
  • int package_id
Returns:
  • base64 - base64 encoded package
space.lib.packages.getPackageUrl(sw, package_id)
Description:
  • Retrieve the url that can be used to download a package. This will expire after a certain time period.
Parameters:
  • string sessionKey
  • int package_id
Returns:
  • string - the download url
space.lib.packages.listChangelog(sw, package_id)

Description: List the change log for a package.

Parameters:
  • string sessionKey
  • int package_id
Returns:
  • string
space.lib.packages.listDependencies(sw, package_id)

Description: List the dependencies for a package.

Parameters:
  • string sessionKey
  • int package_id
Returns:
  • array:
    • struct - dependency
      • string “dependency”
      • string “dependency_type” - One of the following:
      • requires
      • conflicts
      • obsoletes
      • provides
      • string “dependency_modifier”
space.lib.packages.listFiles(sw, package_id)

Description: List the files associated with a package.

Parameters:
  • string sessionKey
  • int package_id
Returns:
  • array:
    • struct - file info
      • string “path”
      • string “type”
      • string “last_modified_date”
      • string “checksum”
      • string “checksum_type”
      • int “size”
      • string “linkto”
space.lib.packages.listProvidingChannels(sw, package_id)

Description: List the channels that provide the a package.

Parameters:
  • string sessionKey
  • int package_id
Returns:
  • array:
    • struct - channel
      • string “label”
      • string “parent_label”
      • string “name”
space.lib.packages.listProvidingErrata(sw, package_id)

Description: List the errata providing the a package.

Parameters:
  • string sessionKey
  • int package_id
Returns:
  • array:
    • struct - errata
      • string “advisory”
      • string “issue_date”
      • string “last_modified_date”
      • string “update_date”
      • string “synopsis”
      • string “type”
space.lib.packages.removePackage(sw, package_id)

Description: Remove a package from the satellite.

Parameters:
  • string sessionKey
  • int package_id
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: packages.provider

Methods to interface to package search capabilities in search server.

space.lib.packages.provider.associateKey(sw, provider_name, key, keytype)

Description: Associate a package security key and with the package provider. If the provider or key doesn’t exist, it is created. User executing the request must be a Satellite administrator.

Parameters:
  • string sessionKey
  • string providerName - The provider name
  • string key - The actual key
  • string type - The type of the key. Currently, only ‘gpg’ is supported
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.packages.provider.list(sw)

Description: List all Package Providers. User executing the request must be a Satellite administrator.

Parameters:
  • string sessionKey
Returns:
  • array:
    • struct - package provider
      • string “name”

      • array “keys”
        • struct - package security key
          • string “key”
          • string “type”
space.lib.packages.provider.listKeys(sw, provider_name)

Description: List all security keys associated with a package provider. User executing the request must be a Satellite administrator.

Parameters:
  • string sessionKey
  • string provider_name - The provider name
Returns:
  • array:
    • struct - package security key
      • string “key”
      • string “type”

Namespace: preferences.locale

Provides methods to access and modify user locale information

space.lib.preferences.locale.listLocales(sw)

Description: Returns a list of all understood locales. Can be used as input to setLocale.

Parameters:

Returns: array: string - Locale code.

space.lib.preferences.locale.listTimeZones(sw)

Description: Returns a list of all understood timezones. Results can be used as input to setTimeZone.

Parameters:

Returns:
  • array:
    • struct - timezone
      • int “time_zone_id” - Unique identifier for timezone.

      • string “olson_name” - Name as identified by the Olson

        database.

space.lib.preferences.locale.setLocale(sw, login, locale)

Description: Set a user’s locale.

Parameters:
  • string sessionKey
  • string login - User’s login name.
  • string locale - Locale to set. (from listLocales)
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.preferences.locale.setTimeZone(sw, login, tzid)

Description: Set a user’s timezone.

Parameters:
  • string sessionKey
  • string login - User’s login name.
  • int tzid - Timezone ID. (from listTimeZones)
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: proxy

Provides methods to activate/deactivate a proxy server.

space.lib.proxy.activateProxy(sw, systemid, version)

Description: Activates the proxy identified by the given client certificate i.e. systemid file.

Parameters:
  • session
  • string systemid - systemid file
  • string version - Version of proxy to be registered.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.proxy.createMonitoringScout(sw, systemid)

Description: Create Monitoring Scout for proxy.

Parameters:
  • session
  • string systemid - systemid file
Returns:
  • string

Available since: 10.7

space.lib.proxy.deactivateProxy(sw, systemid)

Description: Deactivates the proxy identified by the given client certificate i.e. systemid file.

Parameters: string systemid - systemid file

Returns: int - 1 on success, exception thrown otherwise.

space.lib.proxy.isProxy(sw, systemid)

Description: Test, if the system identified by the given client certificate i.e. systemid file, is proxy.

Parameters:
  • string systemid - systemid file
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.proxy.listAvailableProxyChannels(sw, systemid)

Description: List available version of proxy channel for system identified by the given client certificate i.e. systemid file.

Parameters:
  • string systemid - systemid file
Returns:
  • array:
    • string - version

Available since: 10.5

Namespace: satellite

Provides methods to obtain details on the Satellite.

space.lib.satellite.getCertificateExpirationDate(sw)

Description: Retrieves the certificate expiration date of the activated certificate.

Parameters:
  • session
Returns:
  • dateTime.iso8601
space.lib.satellite.isMonitoringEnabled(sw)

Description: Indicates if monitoring is enabled on the satellite

Parameters:
  • session
Returns:
  • boolean True if monitoring is enabled
space.lib.satellite.isMonitoringEnabledBySystemId(sw, systemid)

Description: Indicates if monitoring is enabled on the satellite

Parameters:
  • session
  • string systemid - systemid file
Returns:
  • boolean True if monitoring is enabled
space.lib.satellite.listEntitlements(sw)

Description: Lists all channel and system entitlements for the organization associated with the user executing the request.

Parameters:
  • session
Returns:
  • struct - channel/system entitlements
    • array “system”
      • struct - system entitlement
        • string “label”
        • string “name”
        • int “used_slots”
        • int “free_slots”
        • int “total_slots”
    • array “channel”
      • struct - channel entitlement
        • string “label”
        • string “name”
        • int “used_slots”
        • int “free_slots”
        • int “total_slots”
        • int “used_flex”
        • int “free_flex”
        • int “total_flex”
space.lib.satellite.listProxies(sw)

Description: List the proxies within the user’s organization.

Parameters:
  • session
Returns:
  • array:
    • struct - system
      • int “id”

      • string “name”

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in

Namespace: schedule

Methods to retrieve information about scheduled actions.

space.lib.schedule.archiveActions(sw, action_ids)

Description: Archive all actions in the given list.

Parameters:
  • session object

  • array:
    • int - action id
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.schedule.cancelActions(sw, action_ids)

Description: Cancel all actions in given list. If an invalid action is provided, none of the actions given will canceled.

Parameters:
  • session object

  • array:
    • int - action id
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.schedule.deleteActions(sw, action_ids)

Description: Delete all archived actions in the given list.

Parameters:
  • session object

  • array:
    • int - action id
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.schedule.listAllActions(sw)

Description: Returns a list of all actions. This includes completed, in progress, failed and archived actions.

Parameters: session object

Returns:
array:
struct - action

int “id” - Action Id. string “name” - Action name. string “type” - Action type. string “scheduler” - The user that scheduled the action.

(optional)
dateTime.iso8601 “earliest” - The earliest date and time the
action will be performed
int “completedSystems” - Number of systems that completed the
action.

int “failedSystems” - Number of systems that failed the action. int “inProgressSystems” - Number of systems that are in

progress.
space.lib.schedule.listArchivedActions(sw)

Description: Returns a list of actions that have been archived.

Parameters:
  • session object
Returns:
  • array:
    • struct - action

      int “id” - Action Id. string “name” - Action name. string “type” - Action type. string “scheduler” - The user that scheduled the action.

      (optional)

      dateTime.iso8601 “earliest” - The earliest date and time the

      action will be performed

      int “completedSystems” - Number of systems that completed the

      action.

      int “failedSystems” - Number of systems that failed the action. int “inProgressSystems” - Number of systems that are in

      progress.

space.lib.schedule.listCompletedActions(sw)

Description: Returns a list of actions that have completed successfully.

Parameters:
  • session object
Returns:
  • array:
    • struct - action
      • int “id” - Action Id.

      • string “name” - Action name.

      • string “type” - Action type.

      • string “scheduler” - The user that scheduled the action.

        (optional)

      • dateTime.iso8601 “earliest” - The earliest date and time the

        action will be performed

      • int “completedSystems” - Number of systems that completed

        the action.

      • int “failedSystems” - Number of systems that failed the

        action.

      • int “inProgressSystems” - Number of systems that are in

        progress.

space.lib.schedule.listCompletedSystems(sw, action_id)

Description: Returns a list of systems that have completed a specific action.

Parameters:
  • session object
  • string action_id
Returns:
  • array:
    • struct - system
      • int “server_id”

      • string “server_name” - Server name.

      • string “base_channel” - Base channel used by the server.

      • dateTime.iso8601 “timestamp” - The time the action was

        completed

      • string “message” - Optional message containing details on the

        execution of the action. For example, if the action failed, this will contain the failure text.

space.lib.schedule.listFailedActions(sw)

Description: Returns a list of actions that have failed.

Parameters:
  • session object
Returns:
  • array:
    • struct - action
      • int “id” - Action Id.

      • string “name” - Action name.

      • string “type” - Action type.

      • string “scheduler” - The user that scheduled the action.

        (optional)

      • dateTime.iso8601 “earliest” - The earliest date and time

        the action will be performed

      • int “completedSystems” - Number of systems that completed

        the action.

      • int “failedSystems” - Number of systems that failed the

        action.

      • int “inProgressSystems” - Number of systems that are in

        progress.

space.lib.schedule.listFailedSystems(sw, action_id)

Description: Returns a list of systems that have failed a specific action.

Parameters:
  • session object
  • string action_id
Returns:
  • array:
    • struct - system
      • int “server_id”

      • string “server_name” - Server name.

      • string “base_channel” - Base channel used by the server.

      • dateTime.iso8601 “timestamp” - The time the action was

        completed

      • string “message” - Optional message containing details on the

        execution of the action. For example, if the action failed, this will contain the failure text.

space.lib.schedule.listInProgressActions(sw)

Description: Returns a list of actions that are in progress.

Parameters:
  • session object
Returns:
  • array:
    • struct - action
      • int “id” - Action Id.

      • string “name” - Action name.

      • string “type” - Action type.

      • string “scheduler” - The user that scheduled the action.

        (optional)

      • dateTime.iso8601 “earliest” - The earliest date and time the

        action will be performed

      • int “completedSystems” - Number of systems that completed the

        action.

      • int “failedSystems” - Number of systems that failed the

        action.

      • int “inProgressSystems” - Number of systems that are in

        progress.

space.lib.schedule.listInProgressSystems(sw, action_id)

Description: Returns a list of systems that have a specific action in progress.

Parameters:
  • session object
  • string action_id
Returns:
  • array:
    • struct - system
      • int “server_id”

      • string “server_name” - Server name.

      • string “base_channel” - Base channel used by the server.

      • dateTime.iso8601 “timestamp” - The time the action was

        completed

      • string “message” - Optional message containing details on the

        execution of the action. For example, if the action failed, this will contain the failure text.

space.lib.schedule.rescheduleActions(sw, action_ids, only_failed)

Description: Reschedule all actions in the given list.

Parameters:
  • session object

  • array:
    • int - action id
  • boolean onlyFailed - True to only reschedule failed actions, False to

    reschedule all

Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: system

Provides methods to access and modify registered system.

space.lib.system.addEntitlements(sw, server_id, entitlement_label)

Description: Add addon entitlements to a server. Entitlements a server already has are quietly ignored.

Parameters:
  • session object

  • int serverId

  • array:
    • string - entitlement_label
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.addNote(sw, server_id, subject, body)

Description: Add a new note to the given server.

Parameters:
  • session object
  • int server_id
  • string subject - What the note is about.
  • string body - Content of the note.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.comparePackageProfile(sw, server_id, profile_label)

Description: Compare a system’s packages against a package profile. In the result returned, ‘this_system’ represents the server provided as an input and ‘other_system’ represents the profile provided as an input.

Parameters:
  • session object
  • int server_id
  • string profile_label
Returns:
  • array:
    • struct - Package Metadata
      • int “package_name_id”

      • string “package_name”

      • string “package_arch”

      • string “this_system” - Version of package on this system.

      • string “other_system” - Version of package on the other

        system.

      • int “comparison”
        • 0 - No difference.
        • 1 - Package on this system only.
        • 2 - Newer package version on this system.
        • 3 - Package on other system only.
        • 4 - Newer package version on other system.
space.lib.system.comparePackages(sw, this_server_id, other_server_id)

Description: Compares the packages installed on two systems.

Parameters:
  • session object
  • int this_server_id
  • int other_server_id
Returns:
  • array:
    • struct - Package Metadata
      • int “package_name_id”

      • string “package_name”

      • string “package_arch”

      • string “this_system” - Version of package on this system.

      • string “other_system” - Version of package on the other

        system.

      • int “comparison”
        • 0 - No difference.
        • 1 - Package on this system only.
        • 2 - Newer package version on this system.
        • 3 - Package on other system only.
        • 4 - Newer package version on other system.
space.lib.system.convertToFlexEntitlement(sw, server_id, channel_family_label)

Description: Converts the given list of systems for a given channel family to use the flex entitlement.

Parameters:
  • object session
    • array:
      • int - serverId
    • string channel_family_label

Returns:
  • int - the total the number of systems that were converted to use

    flex entitlement

space.lib.system.createPackageProfile(sw, server_id, profile_label, description)

Description: Create a new stored Package Profile from a systems installed package list.

Parameters:
  • object session
  • int server_id
  • string profile_label
  • string description
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.createSystemRecord(sw, server_id, kslabel)

Description: Creates a cobbler system record with the specified kickstart label

Parameters:
  • object session
  • int server_id
  • string kslabel
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.deleteCustomValues(sw, server_id, custominfolabel)

Description: Delete the custom values defined for the custom system information keys provided from the given system.

Parameters:
  • object session

  • int server_id

  • array:
    • string - custominfolabel

Returns: int - 1 on success, exception thrown otherwise.

space.lib.system.deleteGuestProfiles(sw, hostid, guestnames)

Description: Delete the specified list of guest profiles for a given host

Parameters:
  • object session

  • int hostid

  • array:
    • string - guestnames

Returns: int - 1 on success, exception thrown otherwise.

space.lib.system.deleteNote(sw, server_id, note_id)

Description: Deletes the given note from the server.

Parameters:
  • object session
  • int server_id
  • int note_id

Returns: int - 1 on success, exception thrown otherwise.

space.lib.system.deleteNotes(sw, server_id)

Description: Deletes all notes from the server.

Parameters:
  • object session
  • int server_id
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.deletePackageProfile(sw, profile_id)

Description: Delete a package profile

Parameters:
  • object session
  • int profile_id

Returns: int - 1 on success, exception thrown otherwise.

space.lib.system.deleteSystem(sw, system_id)

Description: Delete a system given its cilent certificate.

Parameters:
  • object session
  • string system_id - systemid file
Returns:
  • int - 1 on success, exception thrown otherwise.

Available since: 10.10

space.lib.system.deleteSystems(sw, server_ids)

Description: Delete systems given a list of system ids.

Parameters:
  • object session

  • array:
    • int - serverId
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.deleteTagFromSnapshot(sw, server_id, tagname)

Description: Deletes tag from system snapshot

Parameters:
  • object session
  • int server_id
  • string tagname
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.downloadSystemId(sw, server_id)

Description: Get the system ID file for a given server.

Parameters:
  • object session
  • int server_id
Returns:
  • string systemID
space.lib.system.getConnectionPath(sw, server_id)

Description: Get the list of proxies that the given system connects through in order to reach the server.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - proxy connection path details
      • int “position” - Position of proxy in chain.The proxy that

        the system connects directly to is listed in position 1.

      • int “id” - Proxy system id

      • string “hostname” - Proxy host name

space.lib.system.getCpu(sw, server_id)

Description: Gets the CPU information of a system.

Parameters:
  • object session
  • int server_id
Returns:
  • struct - CPU
    • string “cache”
    • string “family”
    • string “mhz”
    • string “flags”
    • string “model”
    • string “vendor”
    • string “arch”
    • string “stepping”
    • string “count”
space.lib.system.getCustomValues(sw, server_id)

Description: Get the custom data values defined for the server.

Parameters:
  • object session
  • int server_id
Returns:
  • struct - custom value
    • string “custom info label”
space.lib.system.getDetails(sw, server_id)

Description: Get system details.

Parameters:
  • object session
  • int server_id
Returns:
  • struct - server details
    • int “id” - System id

    • string “profile_name”

    • string “base_entitlement” - System’s base entitlement label.

      (enterprise_entitled or sw_mgr_entitled

    • array “string”
      • addon_entitlements System’s addon entitlements labels, including: - monitoring_entitled - provisioning_entitled - virtualization_host - virtualization_host_platform
    • 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

space.lib.system.getDevices(sw, server_id)

Description: Gets a list of devices for a system.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - device
      • string “device” - optional

      • string “device_class” - Includes CDROM, FIREWIRE, HD, USB,

        VIDEO, OTHER, etc.

      • string “driver”

      • string “description”

      • string “bus”

      • string “pcitype”

space.lib.system.getDmi(sw, server_id)

Description: Gets the DMI information of a system.

Parameters:
  • object session
  • int server_id
Returns:
  • struct - DMI
    • string “vendor”
    • string “system”
    • string “product”
    • string “asset”
    • string “board”
    • string “bios_release” - (optional)
    • string “bios_vendor” - (optional)
    • string “bios_version” - (optional)
space.lib.system.getEntitlements(sw, server_id)

Description: Gets the entitlements for a given server.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • string - entitlement_label
space.lib.system.getEventHistory(sw, server_id)

Description: Returns a list history items associated with the system, ordered from newest to oldest. Note that the details may be empty for events that were scheduled against the system (as compared to instant). For more information on such events, see the system.listSystemEvents operation.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - History Event
      • dateTime.iso8601 “completed” - Date that the event occurred (optional)
      • string “summary” - Summary of the event
      • string “details” - Details of the event
space.lib.system.getId(sw, servername)

Description: Get system IDs and last check in information for the given system name.

Parameters:

  • sw session
  • string systemName

Returns:

  • array:
    • struct - system
      • int “id”

      • string “name”

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in

space.lib.system.getMemory(sw, server_id)

Description: Gets the memory information for a system.

Parameters:
  • object session
  • int server_id
Returns:
  • struct - memory
    • int “ram” - The amount of physical memory in MB.
    • int “swap” - The amount of swap space in MB.
space.lib.system.getName(sw, server_id)

Description: Get system name and last check in information for the given system ID.

Parameters:
  • object session
  • string server_id *(should this be int? docs say string...)
Returns:
  • struct - name info
    • int “id” - Server id

    • string “name” - Server name

    • dateTime.iso8601 “last_checkin” - Last time server successfully

      checked in

space.lib.system.getNetwork(sw, server_id)

Description: Get the addresses and hostname for a given server.

Parameters:
  • object session
  • int server_id
Returns:
  • struct - network info
    • string “ip” - IPv4 address of server
    • string “ip6” - IPv6 address of server
    • string “hostname” - Hostname of server
space.lib.system.getNetworkDevices(sw, server_id)

Description: Returns the network devices for the given server.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - network device
      • string “ip” - IP address assigned to this network device

      • string “interface” - Network interface assigned to device

        e.g. eth0

      • string “netmask” - Network mask assigned to device

      • string “hardware_address” - Hardware Address of device.

      • string “module” - Network driver used for this device.

      • string “broadcast” - Broadcast address for device.

      • array “ipv6” - List of IPv6 addresses

      • array:
        • struct - ipv6 address
          • string “address” - IPv6 address of this network dev
          • string “netmask” - IPv6 netmask of this network dev
          • string “scope” - IPv6 address scope
space.lib.system.getRegistrationDate(sw, server_id)

Description: Returns the date the system was registered.

Parameters:
  • object session
  • int server_id
Returns:
  • dateTime.iso8601 - The date the system was registered, in local time.
space.lib.system.getRelevantErrata(sw, server_id)

Description: Returns a list of all errata that are relevant to the system.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - errata
      • int “id” - Errata ID.
      • string “date” - Date erratum was created.
      • string “update_date” - Date erratum was updated.
      • string “advisory_synopsis” - Summary of the erratum.
      • string “advisory_type” - Type label such as Security, Bug Fix
      • string “advisory_name” - Name such as RHSA, etc
space.lib.system.getRelevantErrataByType(sw, server_id, advisory_type)

Description: Returns a list of all errata of the specified type that are relevant to the system.

Parameters:
  • object session

  • int server_id

  • string advisory_type - type of advisory (one of of the following:

    ‘Security Advisory’, ‘Product Enhancement Advisory’, ‘Bug Fix Advisory’

Returns:
  • array:
    • struct - errata
      • int “id” - Errata ID.
      • string “date” - Date erratum was created.
      • string “update_date” - Date erratum was updated.

; string “advisory_synopsis” - Summary of the erratum. string “advisory_type” - Type label such as Security, Bug Fix string “advisory_name” - Name such as RHSA, etc

space.lib.system.getRunningKernel(sw, server_id)

Description: Returns the running kernel of the given system.

Parameters:
  • object session
  • int server_id

Returns: string

space.lib.system.getScriptActionDetails(sw, action_id)

Description: Returns script details for script run actions

Parameters:

  • session object
  • int actionId - ID of the script run action.

Returns:

  • struct - Script details
    • int “id” - action id

    • string “content” - script content

    • string “run_as_user” - Run as user

    • string “run_as_group” - Run as group

    • int “timeout” - Timeout in seconds

    • array:
      • struct - script result
        • int “serverId” - ID of the server the script runs on.

        • dateTime.iso8601 “startDate” - Time script began

          execution.

        • dateTime.iso8601 “stopDate” - Time script stopped

          execution.

        • int “returnCode” - Script execution return code.

        • string “output” - Output of the script

      • result

space.lib.system.getScriptResults(sw, action_id)

Description: Fetch results from a script execution. Returns an empty array if no results are yet available.

Parameters:

  • session object
  • int actionId - ID of the script run action.

Returns:

  • array:
    • struct - script result
      • int “serverId” - ID of the server the script runs on.
      • dateTime.iso8601 “startDate” - Time script began execution.
      • dateTime.iso8601 “stopDate” - Time script stopped execution.
      • int “returnCode” - Script execution return code.
      • string “output” - Output of the script
space.lib.system.getSubscribedBaseChannel(sw, server_id)

Description: Provides the base channel of a given system

Parameters:
  • object session
  • int server_id
Returns:
  • struct - channel
    • int “id”

    • string “name”

    • string “label”

    • string “arch_name”

    • string “summary”

    • string “description”

    • string “checksum_label”

    • dateTime.iso8601 “last_modified”

    • string “maintainer_name”

    • string “maintainer_email”

    • string “maintainer_phone”

    • string “support_policy”

    • string “gpg_key_url”

    • string “gpg_key_id”

    • string “gpg_key_fp”

    • dateTime.iso8601 “yumrepo_last_sync” - (optional)

    • string “end_of_life”

    • string “parent_channel_label”

    • string “clone_original”

    • array:
      • struct - contentSources
        • int “id”
        • string “label”
        • string “sourceUrl”
        • string “type”
space.lib.system.getSystemCurrencyMultipliers(sw)

Description: Get the System Currency score multipliers

Parameters:
  • object session
Returns:
  • Map of score multipliers
space.lib.system.getSystemCurrencyScores(sw)

Description: Get the System Currency scores for all servers the user has access to

Parameters:
  • object session
Returns:
  • array:
    • struct - system currency
      • int “sid”
      • int “critical security errata count”
      • int “important security errata count”
      • int “moderate security errata count”
      • int “low security errata count”
      • int “bug fix errata count”
      • int “enhancement errata count”
      • int “system currency score”
space.lib.system.getUnscheduledErrata(sw, server_id)

Description: Provides an array of errata that are applicable to a given system.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - errata
      • int “id” - Errata Id
      • string “date” - Date erratum was created.
      • string “advisory_type” - Type of the advisory.
      • string “advisory_name” - Name of the advisory.
      • string “advisory_synopsis” - Summary of the erratum.
space.lib.system.getUuid(sw, server_id)

Description: Get the UUID from the given system ID.

Parameters:
  • object session
  • int serverId
Returns:
  • string
space.lib.system.getVariables(sw, server_id)

Description: Lists kickstart variables set in the system record for the specified server. Note: This call assumes that a system record exists in cobbler for the given system and will raise an XMLRPC fault if that is not the case. To create a system record over xmlrpc use system.createSystemRecord To create a system record in the Web UI please go to System -> <Specified System> -> Provisioning -> Select a Kickstart profile -> Create Cobbler System Record.

Parameters:
  • object session
  • int server_id
Returns:
  • struct - System kickstart variables
    • boolean “netboot” - netboot enabled

    • array “kickstart variables”
      • struct - kickstart variable
        • string “key”
        • string or int “value”
space.lib.system.isNvreInstalled(sw, server_id, name, version, release, epoch=None)

Description: Check if the package with the given NVRE is installed on given system.

Parameters:
  • object session
  • int server_id
  • string name - Package name.
  • string version - Package version.
  • string release - Package release.
  • string epoch - Package epoch. (optional)
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.listActivationKeys(sw, server_id)

Description: List the activation keys the system was registered with. An empty list will be returned if an activation key was not used during registration.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • string - key
space.lib.system.listActiveSystems(sw)

Description: Returns a list of active servers visible to the user.

Parameters: object session

Returns:
  • array:
    • struct - system
      • int “id”

      • string “name”

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in

space.lib.system.listActiveSystemsDetails(sw, server_ids)

Description: Given a list of server ids, returns a list of active servers’ details visible to the user.

Parameters:
  • object session

  • array:
    • int - server_ids
Returns:
  • array:
    • struct - server details
      • int “id” - The server’s id

      • string “name” - The server’s name

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in (in UTC)

      • int “ram” - The amount of physical memory in MB.

      • int “swap” - The amount of swap space in MB.

      • struct “network_devices” - The server’s network devices

      • struct - network device
        • string “ip” - IP address assigned to this network device

        • string “interface” - Network interface assigned to device

          e.g. eth0

        • string “netmask” - Network mask assigned to device

        • string “hardware_address” - Hardware Address of device.

        • string “module” - Network driver used for this device.

        • string “broadcast” - Broadcast address for device.

        • array “ipv6” - List of IPv6 addresses

        • array:
          • struct - ipv6 address
            • string “address” - IPv6 address of network device
            • string “netmask” - IPv6 netmask of network device
            • string “scope” - IPv6 address scope
      • struct “dmi_info” - The server’s dmi info

      • struct - DMI
        • string “vendor”
        • string “system”
        • string “product”
        • string “asset”
        • string “board”
        • string “bios_release” - (optional)
        • string “bios_vendor” - (optional)
        • string “bios_version” - (optional)
      • struct “cpu_info” - The server’s cpu info

      • struct - CPU
        • string “cache”
        • string “family”
        • string “mhz”
        • string “flags”
        • string “model”
        • string “vendor”
        • string “arch”
        • string “stepping”
        • string “count”
      • array “subscribed_channels” - List of subscribed channels

      • array:
        • struct - channel
          • int “channel_id” - The channel id.
          • string “channel_label” - The channel label.
      • array “active_guest_system_ids” - List of virtual guest

        system ids for active guests

      • array:
        • int “guest_id” - The guest’s system id.
space.lib.system.listAdministrators(sw, server_id)

Description: Returns a list of users which can administer the system.

Parameters:
  • object session
  • int server_id
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

space.lib.system.listDuplicatesByHostname(sw)

Description: List duplicate systems by Hostname.

Parameters:
  • object session
Returns:
  • array:
    • struct - Duplicate Group
      • string “hostname”

      • array “systems”
        • struct - system

        • int “systemId”

        • string “systemName”

        • dateTime.iso8601 “last_checkin” - Last time server

          successfully checked in

space.lib.system.listDuplicatesByIp(sw)

Description: List duplicate systems by IP Address.

Parameters: object session

Returns:
  • array:
    • struct - Duplicate Group
      • string “ip”

      • array “systems”
        • struct - system
          • int “systemId”

          • string “systemName”

          • dateTime.iso8601 “last_checkin” - Last time server

            successfully checked in

space.lib.system.listDuplicatesByMac(sw)

Description: List duplicate systems by Mac Address.

Parameters:
  • object session
Returns:
  • array:
    • struct - Duplicate Group
      • string “mac”

      • array “systems”
        • struct - system
          • int “systemId”

          • string “systemName”

          • dateTime.iso8601 “last_checkin” - Last time server

            successfully checked in

space.lib.system.listEligibleFlexGuests(sw)

Description: List eligible flex guests accessible to the user

Parameters:
  • object session
Returns:
  • array:
    • struct - channel family system group
      • int “id”

      • string “label”

      • string “name”

      • array:
        • int - systems
space.lib.system.listExtraPackages(sw, server_id)

Description: List extra packages for a system

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - package
      • string “name”
      • string “version”
      • string “release”
      • string “epoch” - returned only if non-zero
      • string “arch”
      • date “installtime” - returned only if known
space.lib.system.listFlexGuests(sw)

Description: List flex guests accessible to the user

Parameters:
  • object session
Returns:
  • array:
    • struct - channel family system group
      • int “id”

      • string “label”

      • string “name”

      • array:
        • int - systems
space.lib.system.listGroups(sw, server_id)

Description: List the available groups for a given system.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - system group
      • int “id” - server group id

      • int “subscribed” - 1 if the given server is subscribed to

        this server group, 0 otherwise

      • string “system_group_name” - Name of the server group

      • string “sgid” - server group id (Deprecated)

space.lib.system.listInactiveSystems(sw, days=None)

Description: Lists systems that have been inactive for the default period of inactivity

Parameters:
  • object session
  • int days (optional)
Returns:
  • array:
    • struct - system
      • int “id”

      • string “name”

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in

space.lib.system.listLatestAvailablePackage(sw, server_id, package_name)

Description: Get the latest available version of a package for each system

Parameters:
  • object session

  • array:
    • int - server_id
    • string package_name
Returns:
  • array:
    • struct - system
      • int “id” - server ID

      • string “name” - server name

      • struct “package” - package structure

      • struct - package
        • int “id”
        • string “name”
        • string “version”
        • string “release”
        • string “epoch”
        • string “arch”
space.lib.system.listLatestInstallablePackages(sw, server_id)

Description: Get the list of latest installable packages for a given system.

Parameters:
  • object session
  • int server_id
Returns:
  • struct - package
    • string “name”
    • string “version”
    • string “release”
    • string “epoch”
    • int “id”
    • string “arch_label”
space.lib.system.listLatestUpgradablePackages(sw, system_id)
Description:
  • Get the list of latest upgradable packages for a given system.

  • Parameters:
    • session object
    • int serverId
  • Returns:
    • struct - package
      • string “name”
      • string “arch”
      • string “from_version”
      • string “from_release”
      • string “from_epoch”
      • string “to_version”
      • string “to_release”
      • string “to_epoch”
      • string “to_package_id”
space.lib.system.listNewerInstalledPackages(sw, server_id, package_name, package_version, package_release, package_epoch)

Description: Given a package name, version, release, and epoch, returns the list of packages installed on the system w/ the same name that are newer.

  • Parameters:
    • session object
    • int serverId
    • string name - Package name.
    • string version - Package version.
    • string release - Package release.
    • string epoch - Package epoch.
  • Returns:
    • array:
      • struct - package
        • string “name”
        • string “version”
        • string “release”
        • string “epoch”
space.lib.system.listNotes(sw, server_id)

Description: Provides a list of notes associated with a system.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - note details
      • int “id”

      • string “subject” - Subject of the note

      • string “note” - Contents of the note

      • int “system_id” - The id of the system associated with the

        note

      • string “creator” - Creator of the note

      • date “updated” - Date of the last note update

space.lib.system.listOlderInstalledPackages(sw, server_id, name, version, release, epoch)

Description: Given a package name, version, release, and epoch, returns the list of packages installed on the system with the same name that are older.

Parameters:
  • object session
  • int server_id
  • string name - Package name.
  • string version - Package version.
  • string release - Package release.
  • string epoch - Package epoch.
Returns:
  • array:
    • struct - package
      • string “name”
      • string “version”
      • string “release”
      • string “epoch”
space.lib.system.listOutOfDateSystems(sw)

Description: Returns list of systems needing package updates.

Parameters:
  • object session
Returns:
  • array:
    • struct - system
      • int “id”

      • string “name”

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in

space.lib.system.listPackageProfiles(sw)

Description: List the package profiles in this organization

Parameters:
  • object session
Returns:
  • array:
    • struct - package profile
      • int “id”
      • string “name”
      • string “channel”
space.lib.system.listPackages(sw, server_id)

Description: List the installed packages for a given system. The attribute installtime is returned since API version 10.10.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - package
      • int “id”
      • string “name”
      • string “version”
      • string “release”
      • string “epoch”
      • string “arch”
      • date “installtime” - returned only if known
space.lib.system.listPackagesFromChannel(sw, server_id, channel_label)

Description: Provides a list of packages installed on a system that are also contained in the given channel. The installed package list did not include arch information before RHEL 5, so it is arch unaware. RHEL 5 systems do upload the arch information, and thus are arch aware.

Parameters:
  • object session
  • int server_id
  • string channel_label
Returns:
  • array:
    • struct - package
      • string “name”

      • string “version”

      • string “release”

      • string “epoch”

      • int “id”

      • string “arch_label”

      • string “path” - The path on that file system that the package

        resides

      • string “provider” - The provider of the package, determined

        by the gpg key it was signed with.

      • dateTime.iso8601 “last_modified”

space.lib.system.listSubscribableBaseChannels(sw, server_id)

Description: Returns a list of subscribable base channels.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - channel
      • int “id” - Base Channel ID.

      • string “name” - Name of channel.

      • string “label” - Label of Channel

      • int “current_base” - 1 indicates it is the current base

        channel

space.lib.system.listSubscribableChildChannels(sw, server_id)

Description: Returns a list of subscribable child channels. This only shows channels the system is not currently subscribed to.

Parameters:
  • object session
  • int server_id
Returns:
  • array:
    • struct - child channel
      • int “id”
      • string “name”
      • string “label”
      • string “summary”
      • string “has_license”
      • string “gpg_key_url”
space.lib.system.listSubscribedChildChannels(sw, server_id)

Description: Returns a list of subscribed child channels.

Parameters:
  • session object
  • int serverId
Returns:
  • array:
    • struct - channel
      • int “id”
      • string “name”
      • string “label”
      • string “arch_name”
      • string “summary”
      • string “description”
      • string “checksum_label”
      • dateTime.iso8601 “last_modified”
      • string “maintainer_name”
      • string “maintainer_email”
      • string “maintainer_phone”
      • string “support_policy”
      • string “gpg_key_url”
      • string “gpg_key_id”
      • string “gpg_key_fp”
      • string “yumrepo_source_url”
      • string “yumrepo_label”
      • dateTime.iso8601 “yumrepo_last_sync”
      • string “end_of_life”
      • string “parent_channel_label”
    • string “clone_original”

space.lib.system.listSystemEvents(sw, server_id)

Description: List all system events for given server. This includes all events for the server since it was registered. This may require the caller to filter the results to fetch the specific events they are looking for.

Parameters:
  • object session
  • int server_id - ID of system.
Returns:
  • array:
    • struct - action
      • int “failed_count” - Number of times action failed.

      • string “modified” - Date modified.

        (Deprecated by modified_date)

      • dateTime.iso8601 “modified_date” - Date modified.

      • string “created” - Date created.

        (Deprecated by created_date)

      • dateTime.iso8601 “created_date” - Date created.

      • string “action_type”

      • int “successful_count” - Number of times action was

        successful.

      • string “earliest_action” - Earliest date this action will

        occur.

      • int “archived” - If this action is archived. (1 or 0)

      • string “scheduler_user” - available only if concrete user has

        scheduled the action

      • string “prerequisite” - Pre-requisite action. (optional)

      • string “name” - Name of this action.

      • int “id” - Id of this action.

      • string “version” - Version of action.

      • string “completion_time” - The date/time the event was

        completed. Format ->YYYY-MM-dd hh:mm:ss.ms Eg ->2007-06-04 13:58:13.0.(optional) (Deprecated by completed_date)

      • dateTime.iso8601 “completed_date” - The date/time the event

        was completed. (optional)

      • string “pickup_time” - The date/time the action was picked

        up. Format ->YYYY-MM-dd hh:mm:ss.ms Eg ->2007-06-04 13:58:13.0. (optional) (Deprecated by pickup_date)

      • dateTime.iso8601 “pickup_date” - The date/time the action was

        picked up. (optional)

      • string “result_msg” - The result string after the action

        executes at the client machine. (optional)

      • array “additional_info” - This array contains additional

        information for the event, if available

        • struct - info
          • string “detail” - The detail provided depends on the

            specific event. For example, for a package event, this will be the package name, for an errata event, this will be the advisory name and synopsis, for a config file event, this will be path and optional revision information...etc.

          • string “result” - The result (if included) depends on

            the specific event. For example, for a package or errata event, no result is included, for a config file event, the result might include an error (if one occurred, such as the file was missing) or in the case of a config file comparison it might include the differenes found.

      Available since: 10.8

space.lib.system.listSystems(sw)
Description:
  • Returns a list of all servers visible to the user.

  • Parameters:
    • session object
  • Returns:
    • array:
      • struct - system
        • int “id”

        • string “name”

        • dateTime.iso8601 “last_checkin” - Last time server

          successfully checked in

space.lib.system.listSystemsWithExtraPackages(sw)

Description: List systems with extra packages

Parameters:
  • object session
Returns:
  • array:
    • int “id” - System ID
    • string “name” - System profile name
    • int “extra_pkg_count” - Extra packages count
space.lib.system.listSystemsWithPackage(sw, package_id=None, name=None, version=None, release=None)

Description: Lists the systems that have the given installed package

Parameters:
  • object session AND
  • int package_id OR
  • string name
  • string version
  • string release

So either package_id here, or the NVR

Returns:
  • array:
    • struct - system
      • int “id”

      • string “name”

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in

space.lib.system.listUngroupedSystems(sw)

Description: List systems that are not associated with any system groups.

Parameters:
  • object session
Returns:
  • array:
    • struct - system
      • int “id” - server id
      • string “name”
space.lib.system.listUserSystems(sw, login=None)

Description: List systems for a given user.

Parameters:
  • object session
  • string login - User’s login name.
Returns:
  • array:
    • struct - system
      • int “id”

      • string “name”

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in

space.lib.system.listVirtualGuests(sw, server_id)

Description: Lists the virtual guests for agiven virtual host

Parameters:
  • object session
  • int server_id - the virtual host’s id
Returns:
  • array:
    • struct - virtual system
      • int “id”

      • string “name”

      • string “guest_name” - The virtual guest name as provided by

        the virtual host

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in.

space.lib.system.listVirtualHosts(sw)

Description: Lists the virtual hosts visible to the user

Parameters:
  • object session
Returns:
  • array:
    • struct - system
      • int “id”

      • string “name”

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in

space.lib.system.obtainReactivationKey(sw, server_id)

Description: Obtains a reactivation key for this server.

Parameters:
  • object session
  • int server_id
Returns:
  • string
space.lib.system.provisionSystem(sw, server_id, profile_name, date_time=None)

Description: Provision a system using the specified kickstart profile.

Parameters:
  • object session
  • int server_id - ID of the system to be provisioned.
  • string profile_name - Kickstart profile to use.
Returns:
  • int - ID of the action scheduled, otherwise exception thrown on error
space.lib.system.provisionVirtualGuest(sw, server_id, guest_name, profile_name, memorymb=None, vcpus=None, storagegb=None, macaddress=None)

Description: Provision a guest on the host specified. This schedules the guest for creation and will begin the provisioning process when the host checks in or if OSAD is enabled will begin immediately.

Parameters:
  • object session

  • int serverId - ID of host to provision guest on.

  • string guest_name

  • string profile_name - Kickstart Profile to use.

  • int memorymb - Memory to allocate to the guest (optional)

  • int vcpus - Number of virtual CPUs to allocate to the guest(optional)

  • int storagegb - Size of the guests disk image. (optional)

  • string macaddress - macAddress to give the guest’s virtual networking

    hardware. (optional)

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.removeEntitlements(sw, server_id, entitlement_labels)

Description: Remove addon entitlements from a server. Entitlements a server does not have are quietly ignored.

Parameters:
  • object session

  • int server_id

  • array:
    • string - entitlement_label
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.scheduleApplyErrata(sw, server_ids, errata_ids, date_time=None)

Description: Schedules an action to apply errata updates to multiple systems.

Parameters:
  • object session

  • array:
    • int - server_id OR
  • int - server_id

  • array:
    • int - errataId (optional)
  • dateTime.iso8601 earliestOccurrence (optional)

Returns:

int - 1 on success, exception thrown otherwise.

space.lib.system.scheduleGuestAction(sw, server_id, state, date_time=None)

Description: Schedules a guest action for the specified virtual guest for a given date/time.

Parameters:
  • object session

  • int server_id - the system Id of the guest

  • string state - One of the following actions ‘start’, ‘suspend’,

    ‘resume’, ‘restart’, ‘shutdown’.

  • date_time - dateTime.iso8601 date - the time/date to schedule the

    action

Returns:
  • int actionId - The action id of the scheduled action
space.lib.system.scheduleHardwareRefresh(sw, server_id, date_time)

Description: Schedule a hardware refresh for a system.

Parameters:
  • object session
  • int server_id
  • dateTime.iso8601 earliestOccurrence
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.schedulePackageInstall(sw, server_id, packagelist, date_time)

Description: Schedule package installation for a system.

Parameters:

  • session object

  • int serverId

  • array:
    • int - packageId
  • dateTime.iso8601 earliestOccurrence

Returns:

  • int - 1 on success, exception thrown otherwise.
space.lib.system.schedulePackageRefresh(sw, server_id, date_time)
Description:
  • Schedule a package list refresh for a system.
Parameters:
  • session object
  • int serverId
  • dateTime.iso8601 earliestOccurrence
Returns:
  • int - ID of the action scheduled, o

    therwise exception thrown on error

space.lib.system.schedulePackageRemove(sw, server_id, package_info, date_time)

Description: Schedule package removal for a system.

Parameters:
  • object session

  • int server_id

  • package_info - array:
    • int - packageId
  • dateTime.iso8601 earliestOccurrence

Returns:
  • int - ID of the action scheduled, otherwise exception thrown on error
space.lib.system.scheduleReboot(sw, server_id, date_time)

Description: Schedule a reboot for a system.

Parameters:

  • session object
  • int serverId
  • dateTime.iso860 earliestOccurrence

Returns:

  • int - 1 on success, exception thrown otherwise.
space.lib.system.scheduleScriptRun(sw, servers, user, group, timeout, script, date_time)

Description: Schedule a script to run.

Parameters:
  • session object

  • [array: int | int ] - System ID(s) of the servers to run the script

    on.

  • string username - User to run script as.

  • string groupname - Group to run script as.

  • int timeout - Seconds to allow the script to run before timing out.

  • string script - Contents of the script to run.

  • dateTime.iso8601 earliestOccurrence - Earliest the script can run.

Returns:
  • int - ID of the script run action created. Can be used to fetch

    results with system.getScriptResults.

space.lib.system.scheduleSyncPackagesWithSystem(sw, target_server_id, source_server_id, package_info, date_time)

Description: Sync packages from a source system to a target.

Parameters:
  • object session

  • int target_server_id - Target system to apply package changes to.

  • int source_server_id - Source system to retrieve package state from.

  • package_info - array:
    • int - packageId - Package IDs to be synced.
  • dateTime.iso8601 date - Date to schedule action for

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.searchByName(sw, name)

Description: Returns a list of system IDs whose name matches the supplied regular expression.

Parameters:

  • session object
  • string regexp - A regular expression.

Returns:

  • array:
    • struct - system
      • int “id”

      • string “name”

      • dateTime.iso8601 “last_checkin” - Last time server

        successfully checked in

http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html

space.lib.system.setBaseChannel(sw, server_id, channel_label)

Description: Assigns the server to a new base channel. If the user provides an empty string for the channelLabel, the current base channel and all child channels will be removed from the system.

Parameters:
  • object session
  • int server_id
  • string channel_label

Returns: int - 1 on success, exception thrown otherwise.

space.lib.system.setChildChannels(sw, server_id, channel_label)

Description: Subscribe the given server to the child channels provided. This method will unsubscribe the server from any child channels that the server is currently subscribed to, but that are not included in the list. The user may provide either a list of channel ids (int) or a list of channel labels (string) as input.

Parameters:
  • object session

  • int server_id

  • array:
    • string channel_label

Returns: int - 1 on success, exception thrown otherwise.

space.lib.system.setCustomValues(sw, server_id, custom_labels)

Description: Set custom values for the specified server.

Parameters:
  • object session

  • int server_id

  • struct - Map of custom labels to custom values
    • string “custom info label”
    • string “value”
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.setDetails(sw, server_id, server_details)

Description: Set server details. All arguments are optional and will only be modified if included in the struct.

Parameters:
  • object session

  • int server_id - ID of server to lookup details for.

  • struct - server details
    • string “profile_name” - System’s profile name

    • string “base_entitlement” - System’s base entitlement label.

      (enterprise_entitled or sw_mgr_entitled)

    • boolean “auto_errata_update” - True if system has auto errata

      updates enabled

    • string “description” - System description

    • string “address1” - System’s address line 1.

    • string “address2” - System’s address line 2.

    • string “city”

    • string “state”

    • string “country”

    • string “building”

    • string “room”

    • string “rack”

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.setGroupMembership(sw, server_id, server_group_id, member)

Description: Set a servers membership in a given group.

Parameters:
  • object session

  • int server_id

  • int server_group_id

  • boolean member - ‘1’ to assign the given server to the given server

    group, ‘0’ to remove the given server from the given server group.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.setGuestCpus(sw, server_id, numofcpus)

Description: Schedule an action of a guest’s host, to set that guest’s CPU allocation

Parameters:
  • object session
  • int server_id - The guest’s system id
  • int numofcpus - The number of virtual cpus to allocate to the guest

Returns: int actionID - the action Id for the schedule action on the host system

space.lib.system.setGuestMemory(sw, server_id, memory)

Description: Schedule an action of a guest’s host, to set that guest’s memory allocation

Parameters:
  • object session
  • int server_id - The guest’s system id
  • int memory - The amount of memory to allocate to the guest
Returns:
  • int actionID - the action Id for the schedule action on the host

    system.

space.lib.system.setLockStatus(sw, server_id, lockstatus)

Description: Set server lock status.

Parameters:
  • object session

  • int server_id

  • boolean lockstatus - true to lock the system, false to unlock the

    system.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.setProfileName(sw, server_id, name)

Description: Set the profile name for the server.

Parameters:
  • object session
  • int server_id
  • string name - Name of the profile.

Returns: int - 1 on success, exception thrown otherwise.

space.lib.system.setVariables(sw, server_id, netboot, kickstart_var)

Description: Sets a list of kickstart variables in the cobbler system record for the specified server. Note: This call assumes that a system record exists in cobbler for the given system and will raise an XMLRPC fault if that is not the case. To create a system record over xmlrpc use system.createSystemRecord To create a system record in the Web UI please go to System -> <Specified System> -> Provisioning -> Select a Kickstart profile -> Create Cobbler System Record.

Parameters:
  • object session

  • int server_id

  • boolean netboot

  • array:
    • struct - kickstart variable
      • string “key”
      • string or int “value”
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.tagLatestSnapshot(sw, server_id, tagname)

Description: Tags latest system snapshot

Parameters:
  • object session
  • int server_id
  • string tagname
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.upgradeEntitlement(sw, server_id, entitlementname)

Description: Adds an entitlement to a given server.

Parameters:
  • object session

  • int server_id

  • string entitlementname - ONE OF:
    • ‘enterprise_entitled’,
    • ‘provisioning_entitled’,
    • ‘monitoring_entitled’,
    • ‘nonlinux_entitled’,
    • ‘virtualization_host’,
    • ‘virtualization_host_platform’.

Returns: int - 1 on success, exception thrown otherwise.

space.lib.system.whoRegistered(sw, server_id)

Description: Returns information about the user who registered the system

Parameters:
  • object session
  • int server_id - Id of the system in question
Returns:
  • 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

Namespace: system.config

Provides methods to access and modify many aspects of configuration channels and server association. basically system.config name space

space.lib.system.config.addChannels(sw, system_ids, configuration_channels, addtotop)

Description: Given a list of servers and configuration channels, this method appends the configuration channels to either the top or the bottom (whichever you specify) of a system’s subscribed configuration channels list. The ordering of the configuration channels provided in the add list is maintained while adding. If one of the configuration channels in the ‘add’ list has been previously subscribed by a server, the subscribed channel will be re-ranked to the appropriate place.

Parameters:
  • object session

  • array:
    • int - IDs of the systems to add the channels to.
  • array:
    • string - List of configuration channel labels in the ranked order
  • boolean addToTop
    • true - to prepend the given channels list to the top of the

      configuration channels list of a server

    • false - to append the given channels list to the bottom of the

      configuration channels list of a server

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.config.createOrUpdatePath(sw, server_id, path, isdir, path_info, committolocal)

Description: Create a new file (text or binary) or directory with the given path, or update an existing path on a server.

Parameters:
  • object session

  • int server_id

  • string path - the configuration file/directory path

  • boolean isDir
    • True - if the path is a directory
    • False - if the path is a file
  • struct - path info
    • string “contents” - Contents of the file (text or base64 encoded

      if binary) ((only for non-directories)

    • boolean “contents_enc64” - Identifies base64 encoded content

      (default: disabled, only for non-directories).

    • string “owner” - Owner of the file/directory.

    • string “group” - Group name of the file/directory.

    • string “permissions” - Octal file/directory permissions (eg: 644)

    • string “macro-start-delimiter” - Config file macro end delimiter.

      Use null or empty string to accept the default. (only for non-directories)

    • string “macro-end-delimiter” - Config file macro end delimiter.

      Use null or empty string to accept the default (only for non-directories)

    • string “selinux_ctx” - SeLinux context (optional)

    • int “revision” - next revision number, auto increment for null

    • boolean “binary” - mark the binary content, if True, base64

      encoded content is expected (only for non-directories)

  • int commitToLocal
    • 1 - to commit configuration files to the system’s local

      override configuration channel

    • 0 - to commit configuration files to the system’s sandbox

      configuration channel

Returns:
  • struct - Configuration Revision information
    • string “type”
      • file
      • directory
      • symlink
    • string “path” - File Path

    • string “target_path” - Symbolic link Target File Path. Present

      for Symbolic links only.

    • string “channel” - Channel Name

    • string “contents” - File contents (base64 encoded according to

      the contents_enc64 attribute)

    • boolean “contents_enc64” - Identifies base64 encoded content

    • int “revision” - File Revision

    • dateTime.iso8601 “creation” - Creation Date

    • dateTime.iso8601 “modified” - Last Modified Date

    • string “owner” - File Owner. Present for files or directories

      only.

    • string “group” - File Group. Present for files or directories

      only.

    • int “permissions” - File Permissions (Deprecated). Present for

      files or directories only.

    • string “permissions_mode” - File Permissions. Present for files

      or directories only.

    • string “selinux_ctx” - SELinux Context (optional).

    • boolean “binary” - true/false , Present for files only.

    • string “md5” - File’s md5 signature. Present for files only.

    • string “macro-start-delimiter” - Macro start delimiter for a

      config file. Present for text files only.

    • string “macro-end-delimiter” - Macro end delimiter for a config

      file. Present for text files only.

Available since: 10.2

Description: Create a new symbolic link with the given path, or update an existing path.

Parameters:
  • object session

  • int server_id

  • string path - the configuration file/directory path

  • struct - path info
    • string “target_path” - The target path for the symbolic link
    • string “selinux_ctx” - SELinux Security context (optional)
    • int “revision” - next revision number, auto increment for null
  • int commitToLocal
    • 1 - to commit configuration files to the system’s local override

      configuration channel

    • 0 - to commit configuration files to the system’s sandbox

      configuration channel

Returns:
  • struct - Configuration Revision information
    • string “type”
      • file
      • directory
      • symlink
    • string “path” - File Path

    • string “target_path” - Symbolic link Target File Path. Present

      for Symbolic links only.

    • string “channel” - Channel Name

    • string “contents” - File contents (base64 encoded according to

      the contents_enc64 attribute)

    • boolean “contents_enc64” - Identifies base64 encoded content

    • int “revision” - File Revision

    • dateTime.iso8601 “creation” - Creation Date

    • dateTime.iso8601 “modified” - Last Modified Date

    • string “owner” - File Owner. Present for files or directories

      only.

    • string “group” - File Group. Present for files or directories

      only.

    • int “permissions” - File Permissions (Deprecated). Present for

      files or directories only.

    • string “permissions_mode” - File Permissions. Present for files

      or directories only.

    • string “selinux_ctx” - SELinux Context (optional).

    • boolean “binary” - true/false , Present for files only.

    • string “md5” - File’s md5 signature. Present for files only.

    • string “macro-start-delimiter” - Macro start delimiter for a

      config file. Present for text files only.

    • string “macro-end-delimiter” - Macro end delimiter for a

      config file. Present for text files only.

Available since: 10.2

space.lib.system.config.deleteFiles(sw, server_id, paths, deletefromlocal)

Description: Removes file paths from a local or sandbox channel of a server.

Parameters:
  • object session

  • int server_id

  • array:
    • string - paths to remove.
  • boolean deletefromlocal
    • True - to delete configuration file paths from the system’s

      local override configuration channel

    • False - to delete configuration file paths from the system’s

      sandbox configuration channel

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.config.deployAll(sw, system_ids)

Description: Schedules a deploy action for all the configuration files on the given list of systems.

Parameters:
  • object session

  • array system_ids:
    • int - id of the systems to schedule configuration files

      deployment

    • dateTime.iso8601 date - Earliest date for the deploy action.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.config.listChannels(sw, system_id)

Description: List all global configuration channels associated to a system in the order of their ranking.

Parameters:
  • object session
  • int system_id
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”
space.lib.system.config.listFiles(sw, server_id, listlocal)

Description: Return the list of files in a given channel.

Parameters:
  • object session

  • int server_id

  • int listlocal
    • 1 - to return configuration files in the system’s local override

      configuration channel

    • 0 - to return configuration files in the system’s sandbox

      configuration channel

Returns:
  • array:
    • struct - Configuration File information
      • string “type”
        • file
        • directory
        • symlink
      • string “path” - File Path

      • string “channel_label” - the label of the central

        configuration channel that has this file. Note this entry only shows up if the file has not been overridden by a central channel.

      • struct “channel_type”

      • struct - Configuration Channel Type information
        • int “id”
        • string “label”
        • string “name”
        • int “priority”
      • dateTime.iso8601 “last_modified” - Last Modified Date

space.lib.system.config.lookupFileInfo(sw, server_id, paths, searchlocal)

Description: Given a list of paths and a server, returns details about the latest revisions of the paths.

Parameters:
  • object session

  • int server_id

  • array:
    • string - paths to lookup on.
  • int searchlocal
    • 1 to search configuration file paths in the system’s local

      override configuration or systems subscribed central channels

    • 0 to search configuration file paths in the system’s sandbox

      configuration channel

Returns:
  • array:
    • struct - Configuration Revision information
      • string “type”
        • file
        • directory
        • symlink
      • string “path” - File Path

      • string “target_path” - Symbolic link Target File Path.

        Present for Symbolic links only.

      • string “channel” - Channel Name

      • string “contents” - File contents (base64 encoded according

        to the contents_enc64 attribute)

      • boolean “contents_enc64” - Identifies base64 encoded content

      • int “revision” - File Revision

      • dateTime.iso8601 “creation” - Creation Date

      • dateTime.iso8601 “modified” - Last Modified Date

      • string “owner” - File Owner. Present for files or directories

        only.

      • string “group” - File Group. Present for files or directories

        only.

      • int “permissions” - File Permissions (Deprecated). Present

        for files or directories only.

      • string “permissions_mode” - File Permissions. Present for

        files or directories only.

      • string “selinux_ctx” - SELinux Context (optional).

      • boolean “binary” - true/false , Present for files only.

      • string “md5” - File’s md5 signature. Present for files only.

      • string “macro-start-delimiter” - Macro start delimiter for a

        config file. Present for text files only.

      • string “macro-end-delimiter” - Macro end delimiter for a

        config file. Present for text files only.

Available since: 10.2

space.lib.system.config.removeChannels(sw, system_ids, channel_labels)

Description: Remove config channels from the given servers.

Parameters:
  • object session

  • system_ids - array:
    • int - the IDs of the systems from which you would like to remove

      configuration channels..

  • channel_labels - array:
    • string - List of configuration channel labels to remove.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.config.setChannels(sw, system_ids, channel_labels)

Description: Replace the existing set of config channels on the given servers. Channels are ranked according to their order in the configChannelLabels array.

Parameters:
  • object session

  • system_ids - array:
    • int - IDs of the systems to set the channels on.
  • channel_labels - array:
    • string - List of configuration channel labels in the ranked order
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: system.custominfo

Provides methods to access and modify custom system information.

space.lib.system.custominfo.createKey(sw, keylabel, keydescription)

Description: Create a new custom key

Parameters:
  • object session
  • string keylabel - new key’s label
  • string keydescription - new key’s description
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.custominfo.deleteKey(sw, keylabel)

Description: Delete an existing custom key and all systems’ values for the key.

Parameters:
  • object session
  • string keylabel - new key’s label
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.system.custominfo.listAllKeys(sw)

Description: List the custom information keys defined for the user’s organization.

Parameters:
  • object session
Returns:
  • array:
    • struct - custom info
      • int “id”
      • string “label”
      • string “description”
      • int “system_count”
      • dateTime.iso8601 “last_modified”
space.lib.system.custominfo.updateKey(sw, keylabel, keydescription)

Description: Update description of a custom key

Parameters:
  • object session
  • string keylabel - key to change
  • string keydescription - new key’s description
Returns:
  • int - 1 on success, exception thrown otherwise.

Namespace: system.scap

Provides methods to schedule SCAP scans and access the results.

space.lib.system.scap.getXccdfScanDetails(sw, scan_id)

Description: Get details of given OpenSCAP XCCDF scan.

Parameters:
  • object - session
  • int scan_id of XCCDF scan (xid).
Returns:
  • struct - OpenSCAP XCCDF Scan
    • int “xid” - XCCDF TestResult id

    • int “sid” - serverId

    • int “action_id” - Id of the parent action.

    • string “path” - Path to XCCDF document

    • string “oscap_parameters” - oscap command-line arguments.

    • string “test_result” - Identifier of XCCDF TestResult.

    • string “benchmark” - Identifier of XCCDF Benchmark.

    • string “benchmark_version” - Version of the Benchmark.

    • string “profile” - Identifier of XCCDF Profile.

    • string “profile_title” - Title of XCCDF Profile.

    • dateTime.iso8601 “start_time” - Client machine time of scan start

    • dateTime.iso8601 “end_time” - Client machine time of scan

      completion.

    • string “errors” - Stderr output of scan.

space.lib.system.scap.getXccdfScanRuleResults(sw, scan_id)

Description: Return a full list of RuleResults for given OpenSCAP XCCDF scan.

Parameters:
  • object - session
  • int scan_id of XCCDF scan (xid).
Returns:
  • array:
    • struct - OpenSCAP XCCDF RuleResult
      • string “idref” - idref from XCCDF document.
      • string “result” - Result of evaluation.
      • string “idents” - Comma separated list of XCCDF idents.
space.lib.system.scap.listXccdfScans(sw, server_id)

Description: Return a list of finished OpenSCAP scans for a given system.

Parameters:
  • object - session
  • int server_id
Returns:
  • array:
    • struct - OpenSCAP XCCDF Scan
      • int “xid” - XCCDF TestResult ID
      • string “profile” - XCCDF Profile
      • string “path” - Path to XCCDF document
      • dateTime.iso8601 “completed” - Scan completion time
space.lib.system.scap.scheduleXccdfScan(sw, server_id, path, additional_params, date_time=None)

Description: Schedule OpenSCAP scan.

Parameters:
  • object - session
  • array: int - server_id || int - server_id
  • string Path to xccdf content on targeted systems.
  • string Additional parameters for oscap tool.
  • dateTime.iso8601 date - Date to schedule action (Optional)

Returns:

int - ID if SCAP action created.

Namespace: systemgroup

Provides methods to access and modify system groups.

space.lib.systemgroup.addOrRemoveAdmins(sw, system_group, login, add)

Description: Add or remove administrators to/from the given group. Satellite 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 system_group

  • array:
    • string - login - User’s loginName
  • int add - 1 to add administrators, 0 to remove.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.systemgroup.addOrRemoveSystems(sw, system_group, server_id, add)

Description: Add/remove the given servers to a system group.

Parameters:
  • string sessionKey

  • string system_group

  • array:
    • int - server_id
  • boolean add - True to add to the group, False to remove.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.systemgroup.create(sw, name, description)

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”
space.lib.systemgroup.delete(sw, system_group)

Description: Delete a system group.

Parameters:
  • string sessionKey
  • string system_group
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.systemgroup.getDetails(sw, system_group)

Description: Retrieve details of a ServerGroup based on it’s id

Parameters:
  • string sessionKey
  • int system_group || string system_group
Returns:
  • struct - Server Group
    • int “id”
    • string “name”
    • string “description”
    • int “org_id”
    • int “system_count”
space.lib.systemgroup.listActiveSystemsInGroup(sw, system_group)

Description: Lists active systems within a server group

Parameters:
  • string sessionKey
  • string system_group
Returns:
  • array:
    • int - server_id
space.lib.systemgroup.listAdministrators(sw, system_group)

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 system_group
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

space.lib.systemgroup.listAllGroups(sw)

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”
space.lib.systemgroup.listGroupsWithNoAssociatedAdmins(sw)

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”
space.lib.systemgroup.listInactiveSystemsInGroup(sw, system_group, days_inactive=None)

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

Parameters:
  • string sessionKey

  • string system_group

  • int days_inactive - Number of days a system must not check in

    to be considered inactive.

Returns:
  • array:
    • int - server_id
space.lib.systemgroup.listSystems(sw, system_group)

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

Parameters:
  • string sessionKey
  • string system_group
Returns:
  • array:
    • struct - server details
      • int “id” - System id

      • string “profile_name”

      • string “base_entitlement” - System’s base entitlement label.

        (enterprise_entitled or sw_mgr_entitled)

      • array “string”
        • addon_entitlements System’s addon entitlements labels,

          including monitoring_entitled, provisioning_entitled, virtualization_host, virtualization_host_platform

      • 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.

space.lib.systemgroup.scheduleApplyErrataToActive(sw, system_group, errata_id, date_time=None)

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

Parameters:
  • string sessionKey

  • string system_group

  • array:
    • int - errataId
  • dateTime.iso8601 earliestOccurrence (Optional)

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.systemgroup.update(sw, system_group, description)

Description: Update an existing system group.

Parameters:
  • string sessionKey
  • string system_group
  • string description
Returns:
  • struct - Server Group
    • int “id”
    • string “name”
    • string “description”
    • int “org_id”
    • int “system_count”

Namespace: user

User namespace contains methods to access common user functions available from the web user interface..

space.lib.user.addAssignedSystemGroup(sw, login, server_group_name, set_default)

Description: Add system group to user’s list of assigned system groups.

Parameters:
  • string sessionKey

  • string login - User’s login name.

  • string server_group_name

  • boolean set_default - Should system group also be added to user’s

    list of default system groups.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.addAssignedSystemGroups(sw, login, server_group_name, set_default)

Description: Add system groups to user’s list of assigned system groups.

Parameters:
  • string sessionKey

  • string login - User’s login name.

  • array:
    • string - server_group_name
  • boolean set_default - Should system groups also be added to user’s

    list of default system groups.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.addDefaultSystemGroup(sw, login, server_group_name)

Description: Add system group to user’s list of default system groups.

Parameters:
  • string sessionKey
  • string login - User’s login name.
  • string server_group_name
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.addDefaultSystemGroups(sw, login, server_group_name)

Description: Add system groups to user’s list of default system groups.

Parameters:
  • string sessionKey

  • string login - User’s login name.

  • array:
    • string - serverGroupName
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.addRole(sw, login, role)

Description: Adds a role to a user.

Parameters:
  • string sessionKey

  • string login - User login name to update.

  • string role - Role label to add. Can be any of: satellite_admin,

    org_admin, channel_admin, config_admin, system_group_admin, activation_key_admin, or monitoring_admin.

Returns: int - 1 on success, exception thrown otherwise.

space.lib.user.create(sw, login, password, first_name, last_name, email, use_pamauth=None)

Description: Create a new user.

Parameters:
  • string sessionKey

  • string login - Desired login name, will fail if already in use.

  • string password

  • string first_name

  • string last_name

  • string email - User’s e-mail address.

  • int use_pamauth - 1 if you wish to use PAM authentication for

    this user, 0 otherwise. (OPTIONAL)

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.delete(sw, login)

Description: Delete a user.

Parameters:
  • string sessionKey
  • string login - User login name to delete.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.disable(sw, login)

Description: Disable a user.

Parameters:
  • string sessionKey
  • string login - User login name to disable.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.enable(sw, login)

Description: Enable a user.

Parameters:
  • string sessionKey
  • string login - User login name to enable.
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.getDetails(sw, login)

Description: Returns the details about a given user.

Parameters:
  • string sessionKey
  • string login - User’s login name.
Returns:
  • struct - user details
    • string “first_names” - deprecated, use first_name

    • string “first_name”

    • string “last_name”

    • string “email”

    • int “org_id”

    • string “prefix”

    • string “last_login_date”

    • string “created_date”

    • boolean “enabled” - true if user is enabled, false if the user

      is disabled

    • boolean “use_pam” - true if user is configured to use PAM

      authentication

space.lib.user.getLoggedInTime(sw, login)

Description: Returns the time user last logged in.

Parameters:
  • string sessionKey
  • string login - User’s login name.
Returns:
  • dateTime.iso8601
space.lib.user.listAssignableRoles(sw)

Description: Returns a list of user roles that this user can assign to others.

Parameters:
  • string sessionKey
Returns:
  • array:
    • string - (role label)
space.lib.user.listAssignedSystemGroups(sw, login)

Description: Returns the system groups that a user can administer.

Parameters:
  • string sessionKey
  • string login - User’s login name.
Returns:
  • array:
    • struct - system group
      • int “id”
      • string “name”
      • string “description”
      • int “system_count”
      • int “org_id” - Organization ID for this system group.
space.lib.user.listDefaultSystemGroups(sw, login)

Description: Returns a user’s list of default system groups.

Parameters:
  • string sessionKey
  • string login - User’s login name.
Returns:
  • array:
    • struct - system group
      • int “id”
      • string “name”
      • string “description”
      • int “system_count”
      • int “org_id” - Organization ID for this system group.
space.lib.user.listRoles(sw, login)

Description: Returns a list of the user’s roles.

Parameters:
  • string sessionKey
  • string login - User’s login name.
Returns:
  • array:
  • string - (role label)
space.lib.user.listUsers(sw)

Description: Returns a list of users in your organization.

Parameters:
  • string sessionKey
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

space.lib.user.removeAssignedSystemGroup(sw, login, server_group_name, set_default)

Description: Remove system group from the user’s list of assigned system groups.

Parameters:
  • string sessionKey

  • string login - User’s login name.

  • string serverGroupName

  • boolean setDefault - Should system group also be removed from the

    user’s list of default system groups.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.removeAssignedSystemGroups(sw, login, server_group_name, set_default)

Description: Remove system groups from a user’s list of assigned system groups.

Parameters:
  • string sessionKey

  • string login - User’s login name.

  • array:
    • string - serverGroupName
  • boolean setDefault - Should system groups also be removed from the

    user’s list of default system groups.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.removeDefaultSystemGroup(sw, login, server_group_name)

Description: Remove a system group from user’s list of default system groups.

Parameters:
  • string sessionKey
  • string login - User’s login name.
  • string server_group_name

Returns: int - 1 on success, exception thrown otherwise.

space.lib.user.removeDefaultSystemGroups(sw, login, server_group_name)

Description: Remove system groups from a user’s list of default system groups.

Parameters:
  • string sessionKey

  • string login - User’s login name.

  • array:
    • string - server_group_name
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.removeRole(sw, login, role)

Description: Remove a role from a user.

Parameters:
  • string sessionKey

  • string login - User login name to update.

  • string role - Role label to remove. Can be any of: satellite_admin,

    org_admin, channel_admin, config_admin, system_group_admin, activation_key_admin, or monitoring_admin.

Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.setDetails(sw, login, user_details)

Description: Updates the details of a user.

Parameters:
  • string sessionKey

  • string login - User’s login name.

  • struct - user details
    • string “first_names” - deprecated, use first_name
    • string “first_name”
    • string “last_name”
    • string “email”
    • string “prefix”
    • string “password”
Returns:
  • int - 1 on success, exception thrown otherwise.
space.lib.user.usePamAuthentication(sw, login, pam_value)

Description: Toggles whether or not a user uses PAM authentication or basic RHN authentication.

Parameters:
  • string sessionKey

  • string login - User’s login name.

  • int pam_value
    • 1 to enable PAM authentication
    • 0 to disable.
Returns:
  • int - 1 on success, exception thrown otherwise.