kickstart.profile

Description

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

Namespace:

kickstart.profile

Method: addIpRange

HTTP POST

Description:

Add an ip range to a kickstart profile.

Parameters:

  • string sessionKey

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

Method: addScript

HTTP POST

Description:

Add a pre/post script to a kickstart profile.

Parameters:

  • string sessionKey

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

  • string name - The kickstart script name.

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

Returns:

  • int id - the id of the added script

Method: addScript

HTTP POST

Description:

Add a pre/post script to a kickstart profile.

Parameters:

  • string sessionKey

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

  • string name - The kickstart script name.

  • 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

Method: addScript

HTTP POST

Description:

Add a pre/post script to a kickstart profile.

Parameters:

  • string sessionKey

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

  • string name - The kickstart script name.

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

  • boolean erroronfail - Whether to throw an error if the script fails or not

Returns:

  • int id - the id of the added script

Method: compareActivationKeys

HTTP POST

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

    • array :

  • struct activation key

    • string "key"

    • string "description"

    • int "usage_limit"

    • string "base_channel_label"

    • string array "child_channel_labels" - childChannelLabel

    • string array "entitlements" - entitlementLabel

    • string array "server_group_ids" - serverGroupId

    • string array "package_names" - packageName - (deprecated by packages)

    • array "packages"

      • struct package

        • string "name" - packageName

        • string "arch" - archLabel - optional

    • boolean "universal_default"

    • boolean "disabled"

    • string "contact_method" - One of the following:

      • default

      • ssh-push

      • ssh-push-tunnel

    • array "kickstartLabel2" - Actual label of the second kickstart profile is the key into the struct

    • array :

  • struct activation key

    • string "key"

    • string "description"

    • int "usage_limit"

    • string "base_channel_label"

    • string array "child_channel_labels" - childChannelLabel

    • string array "entitlements" - entitlementLabel

    • string array "server_group_ids" - serverGroupId

    • string array "package_names" - packageName - (deprecated by packages)

    • array "packages"

      • struct package

        • string "name" - packageName

        • string "arch" - archLabel - optional

    • boolean "universal_default"

    • boolean "disabled"

    • string "contact_method" - One of the following:

      • default

      • ssh-push

      • ssh-push-tunnel

Method: compareAdvancedOptions

HTTP POST

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

    • array :

  • struct value

    • string "name"

    • string "value"

    • boolean "enabled"

    • array "kickstartLabel2" - Actual label of the second kickstart profile is the key into the struct

    • array :

  • struct value

    • string "name"

    • string "value"

    • boolean "enabled"

Method: comparePackages

HTTP POST

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 array package name

    • array "kickstartLabel2" - Actual label of the second kickstart profile is the key into the struct

    • string array package name

Method: downloadKickstart

HTTP POST

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 Uyuni server. Usually this should be the FQDN, but could be the ip address or shortname as well.

Returns:

  • string ks - The contents of the kickstart file. Note: if an activation key is not associated with the kickstart file, registration will not occur in the generated %post section. If one is associated, it will be used for registration

Method: downloadRenderedKickstart

HTTP POST

Description:

Downloads the Cobbler-rendered Kickstart file.

Parameters:

  • string sessionKey

  • string ksLabel - The label of the kickstart to download.

Returns:

  • string ks - The contents of the kickstart file

Method: getAdvancedOptions

HTTP GET

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"

Method: getAvailableRepositories

HTTP GET

Description:

Lists available OS repositories to associate with the provided kickstart profile.

Parameters:

  • string sessionKey

  • string ksLabel

Returns:

  • string array repositoryLabel

Method: getCfgPreservation

HTTP GET

Description:

Get ks.cfg preservation option for a kickstart profile.

Parameters:

  • string sessionKey

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

Returns:

  • boolean preserve - The value of the option. True means that ks.cfg will be copied to /root, false means that it will not

Method: getChildChannels

HTTP GET

Description:

Get the child channels for a kickstart profile.

Parameters:

  • string sessionKey

  • string ksLabel - Label of kickstart profile.

Returns:

  • string array channelLabel

Method: getCustomOptions

HTTP GET

Description:

Get custom options for a kickstart profile.

Parameters:

  • string sessionKey

  • string ksLabel

Returns:

  • array :

  • struct option

    • int "id"

    • string "arguments"

Method: getKickstartTree

HTTP GET

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.

Method: getRepositories

HTTP GET

Description:

Lists all OS repositories associated with provided kickstart profile.

Parameters:

  • string sessionKey

  • string ksLabel

Returns:

  • string array repositoryLabel

Method: getUpdateType

HTTP GET

Description:

Get the update type for a kickstart profile.

Parameters:

  • string sessionKey

  • string ksLabel - Label of kickstart profile.

Returns:

  • string update_type - Update type for this Kickstart Profile.

Method: getVariables

HTTP GET

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"

Method: getVirtualizationType

HTTP GET

Description:

For given kickstart profile label returns label of virtualization type it’s using

Parameters:

  • string sessionKey

  • string ksLabel

Returns:

  • string virtLabel - Label of virtualization type.

Method: listIpRanges

HTTP GET

Description:

List all ip ranges for a kickstart profile.

Parameters:

  • string sessionKey

  • string ksLabel - The label of the kickstart

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

Method: listScripts

HTTP GET

Description:

List the pre and post scripts for a kickstart profile in the order they will run during the kickstart.

Parameters:

  • string sessionKey

  • string ksLabel - The label of the kickstart

Returns:

  • array :

  • struct kickstart script

    • int "id"

    • string "name"

    • string "contents"

    • string "script_type" - the 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 "erroronfail" - true if the script will throw an error if it fails

    • boolean "template" - true if templating using cobbler is enabled

    • boolean "beforeRegistration" - true if script will run before the server registers and performs server actions

Method: orderScripts

HTTP POST

Description:

Change the order that kickstart scripts will run for this kickstart profile. Scripts will run in the order they appear in the array. There are three arrays, one for all pre scripts, one for the post scripts that run before registration and server actions happen, and one for post scripts that run after registration and server actions. All scripts must be included in one of these lists, as appropriate.

Parameters:

  • string sessionKey

  • string ksLabel - The label of the kickstart

  • int array preScripts - IDs of the ordered pre scripts

  • int array postScriptsBeforeRegistration - IDs of the ordered post scripts that will run before registration

  • int array postScriptsAfterRegistration - IDs of the ordered post scripts that will run after registration

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: removeIpRange

HTTP POST

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 ipAddress - 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 status - 1 on successful removal, 0 if range wasn’t found for the specified kickstart, exception otherwise

Method: removeScript

HTTP POST

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.

Method: setAdvancedOptions

HTTP POST

Description:

Set advanced options for a kickstart profile. 'md5_crypt_rootpw' is not supported anymore. If 'sha256_crypt_rootpw' is set to 'True', 'root_pw' is taken as plaintext and will sha256 encrypted on server side, otherwise a hash encoded password (according to the auth option) is expected

Parameters:

  • string sessionKey

  • string ksLabel

  • array options

    • 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, sha256_crypt_rootpw

      • string "arguments" - Arguments of the option

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setCfgPreservation

HTTP POST

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.

Method: setChildChannels

HTTP POST

Description:

Set the child channels for a kickstart profile.

Parameters:

  • string sessionKey

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

  • string array channelLabels - List of labels of child channels

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setCustomOptions

HTTP POST

Description:

Set custom options for a kickstart profile.

Parameters:

  • string sessionKey

  • string ksLabel

  • string array options

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setKickstartTree

HTTP POST

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.

Method: setLogging

HTTP POST

Description:

Set logging options for a kickstart profile.

Parameters:

  • string sessionKey

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

  • boolean pre - whether or not to log the pre section of a kickstart to /root/ks-pre.log

  • boolean post - whether or not to log the post section of a kickstart to /root/ks-post.log

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setRepositories

HTTP POST

Description:

Associates OS repository to a kickstart profile.

Parameters:

  • string sessionKey

  • string ksLabel

  • string array repoLabels

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setUpdateType

HTTP POST

Description:

Set the update typefor a kickstart profile.

Parameters:

  • string sessionKey

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

  • string updateType - The new update type to set. Possible values are 'all' and 'none'.

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setVariables

HTTP POST

Description:

Associates list of kickstart variables with the specified kickstart profile

Parameters:

  • string sessionKey

  • string ksLabel

  • struct variables

    • string "key"

    • string or int "value"

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setVirtualizationType

HTTP POST

Description:

For given kickstart profile label sets its virtualization type.

Parameters:

  • string sessionKey

  • string ksLabel

  • string typeLabel - One of the following: 'none', 'qemu', 'para_host', 'xenpv', 'xenfv'

Returns:

  • int - 1 on success, exception thrown otherwise.