packages

Description

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

Namespace:

packages

Method: findByNvrea

Description:

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

Parameters:

  • string sessionKey

  • 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 archLabel

Returns:

  • array :

  • struct - package

    • string "name"

    • string "version"

    • string "release"

    • string "epoch"

    • int "id"

    • string "arch_label"

    • dateTime.iso8601 "last_modified"

    • 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.

Method: getDetails

Description:

Retrieve details for the package with the ID.

Parameters:

  • string sessionKey

  • int packageId

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 Uyuni server’s file system that the package resides.

    • string "payload_size"

Method: getPackage

Description:

Retrieve the package file associated with a package. (Consider using packages.getPackageUrl for larger files.)

Parameters:

  • string sessionKey

  • int package_id

Returns:

  • array :

    • byte - binary object - package file

Method: getPackageUrl

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

Method: listChangelog

Description:

List the change log for a package.

Parameters:

  • string sessionKey

  • int packageId

Returns:

  • string

Method: listDependencies

Description:

List the dependencies for a package.

Parameters:

  • string sessionKey

  • int packageId

Returns:

  • array :

    • struct - dependency

      • string "dependency"

      • string "dependency_type" - One of the following:

      • requires

      • conflicts

      • obsoletes

      • provides

      • recommends

      • suggests

      • supplements

      • enhances

      • predepends

      • breaks

      • string "dependency_modifier"

Method: listFiles

Description:

List the files associated with a package.

Parameters:

  • string sessionKey

  • int packageId

Returns:

  • array :

    • struct - file info

      • string "path"

      • string "type"

      • string "last_modified_date"

      • string "checksum"

      • string "checksum_type"

      • int "size"

      • string "linkto"

Method: listProvidingChannels

Description:

List the channels that provide the a package.

Parameters:

  • string sessionKey

  • int packageId

Returns:

  • array :

    • struct - channel

      • string "label"

      • string "parent_label"

      • string "name"

Method: listProvidingErrata

Description:

List the errata providing the a package.

Parameters:

  • string sessionKey

  • int packageId

Returns:

  • array :

    • struct - errata

      • string "advisory"

      • string "issue_date"

      • string "last_modified_date"

      • string "update_date"

      • string "synopsis"

      • string "type"

Method: listSourcePackages

Description:

List all source packages in user’s organization.

Parameters:

  • string sessionKey

Returns:

  • array :

    • struct - source_package

      • int "id"

      • string "name"

Method: removePackage

Description:

Remove a package from Uyuni.

Parameters:

  • string sessionKey

  • int packageId

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: removeSourcePackage

Description:

Remove a source package.

Parameters:

  • string sessionKey

  • int packageSourceId

Returns:

  • int - 1 on success, exception thrown otherwise.