Python API

build_nodes_json

deploy

openstackbmc

class openstackbmc.OpenStackBmc(authdata, port, address, instance, cache_status, os_cloud)
get_boot_device()

Return the currently configured boot device

get_power_state()

Returns the current power state of the managed instance

log(*msg)

Helper function that prints msg and flushes stdout

power_off()

Stop the managed instance

power_on()

Start the managed instance

power_reset()

Not implemented

power_shutdown()

Stop the managed instance

set_boot_device(bootdevice)

Set the boot device for the managed instance

Parameters:bootdevice – One of [‘network’, ‘hd] to set the boot device to network or hard disk respectively.

auth

auth._cloud_json()

Return the current cloud’s data in JSON

Retrieves the cloud from os-client-config and serializes it to JSON.

auth._create_auth_parameters()

Read keystone auth parameters from appropriate source

If the environment variable OS_CLOUD is set, read the auth information from os_client_config. Otherwise, read it from environment variables. When reading from the environment, also validate that all of the required values are set.

Returns:A dict containing the following keys: os_user, os_password, os_tenant, os_auth_url, os_project, os_user_domain, os_project_domain.