The ironic.drivers.modules.msftocs.msftocsclient Module

MSFT OCS ChassisManager v2.0 REST API client https://github.com/MSOpenTech/ChassisManager

class ironic.drivers.modules.msftocs.msftocsclient.MSFTOCSClientApi(base_url, username, password)[source]

Bases: object

get_blade_state(blade_id)[source]

Returns whether a blade’s chipset is receiving power (soft-power).

Parameters:blade_id – the blade id
Returns:one of: POWER_STATUS_ON, POWER_STATUS_OFF
Raises:MSFTOCSClientApiException
get_next_boot(blade_id)[source]

Returns the next boot device configured for a given blade.

Parameters:blade_id – the blade id
Returns:one of: BOOT_TYPE_UNKNOWN, BOOT_TYPE_NO_OVERRIDE, BOOT_TYPE_FORCE_PXE, BOOT_TYPE_FORCE_DEFAULT_HDD, BOOT_TYPE_FORCE_INTO_BIOS_SETUP, BOOT_TYPE_FORCE_FLOPPY_OR_REMOVABLE
Raises:MSFTOCSClientApiException
set_blade_off(blade_id)[source]

Shuts down a given blade (soft-power state).

Parameters:blade_id – the blade id
Raises:MSFTOCSClientApiException
set_blade_on(blade_id)[source]

Supplies power to a blade chipset (soft-power state).

Parameters:blade_id – the blade id
Raises:MSFTOCSClientApiException
set_blade_power_cycle(blade_id, off_time=0)[source]

Performs a soft reboot of a given blade.

Parameters:
  • blade_id – the blade id
  • off_time – seconds to wait between shutdown and boot
Raises:

MSFTOCSClientApiException

set_next_boot(blade_id, boot_type, persistent=True, uefi=True)[source]

Sets the next boot device for a given blade.

Parameters:
  • blade_id – the blade id
  • boot_type – possible values: BOOT_TYPE_UNKNOWN, BOOT_TYPE_NO_OVERRIDE, BOOT_TYPE_FORCE_PXE, BOOT_TYPE_FORCE_DEFAULT_HDD, BOOT_TYPE_FORCE_INTO_BIOS_SETUP, BOOT_TYPE_FORCE_FLOPPY_OR_REMOVABLE
  • persistent – whether this setting affects the next boot only or every subsequent boot
  • uefi – True if UEFI, False otherwise
Raises:

MSFTOCSClientApiException

Project Source

This Page