system.provisioning.powermanagement

Description

Provides methods to access and modify power management for systems. Some functions exist in 2 variants. Either with server id or with a name. The function with server id is useful when a system exists with a full profile. Everybody allowed to manage that system can execute these functions. The variant with name expects a cobbler system name prefix. These functions enhance the name by adding the org id of the user to limit access to systems from the own organization. Additionally Org Admin permissions are required to call these functions.

Namespace:

system.provisioning.powermanagement

Method: getDetails

Description:

Get current power management settings of the given system

Parameters:

  • string sessionKey

  • int serverId

Returns:

  • struct - powerManagementParameters

    • string "powerType" - Power management type

    • string "powerAddress" - IP address for power management

    • string "powerUsername" - The Username

    • string "powerPassword" - The Password

    • string "powerId" - Identifier

Method: getDetails

Description:

Get current power management settings of the given system

Parameters:

  • string sessionKey

  • string name

Returns:

  • struct - powerManagementParameters

    • string "powerType" - Power management type

    • string "powerAddress" - IP address for power management

    • string "powerUsername" - The Username

    • string "powerPassword" - The Password

    • string "powerId" - Identifier

Method: getStatus

Description:

Execute powermanagement actions

Parameters:

  • string sessionKey

  • int serverId

  • string action

Returns:

  • boolean status - True when power is on, otherwise False

Method: getStatus

Description:

Execute powermanagement actions

Parameters:

  • string sessionKey

  • string name

  • string action

Returns:

  • boolean status - True when power is on, otherwise False

Method: listTypes

Description:

Return a list of available power management types

Parameters:

  • string sessionKey

Returns:

  • array :

    • string - power management types

Method: powerOff

Description:

Execute power management action 'powerOff'

Parameters:

  • string sessionKey

  • int serverId

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: powerOff

Description:

Execute power management action 'powerOff'

Parameters:

  • string sessionKey

  • string name

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: powerOn

Description:

Execute power management action 'powerOn'

Parameters:

  • string sessionKey

  • int serverId

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: powerOn

Description:

Execute power management action 'powerOn'

Parameters:

  • string sessionKey

  • string name

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: reboot

Description:

Execute power management action 'Reboot'

Parameters:

  • string sessionKey

  • int serverId

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: reboot

Description:

Execute power management action 'Reboot'

Parameters:

  • string sessionKey

  • string name

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setDetails

Description:

Get current power management settings of the given system

Parameters:

  • string sessionKey

  • int serverId

  • struct - data

    • string "powerType" - Power management type

    • string "powerAddress" - IP address for power management

    • string "powerUsername" - The Username

    • string "powerPassword" - The Password

    • string "powerId" - Identifier

Returns:

  • int - 1 on success, exception thrown otherwise.

Method: setDetails

Description:

Get current power management settings of the given system

Parameters:

  • string sessionKey

  • string name

  • struct - data

    • string "powerType" - Power management type

    • string "powerAddress" - IP address for power management

    • string "powerUsername" - The Username

    • string "powerPassword" - The Password

    • string "powerId" - Identifier

Returns:

  • int - 1 on success, exception thrown otherwise.