Ilo objects¶
The Ilo
class encapsulates all functionality. It autodetects which iLO
version is in use and will send the correct messages for that version. Its
methods are divided into several categories below: getting information,
changing settings and upgrading firmware.
There are quite a few methods to get information about your server, its enclosing chassis or the iLO board itself. To see what they return, please refer to the example output.
Methods that manipulate the iLO, such as setting the servers name, or changing a users password do not have a return value.
The exception IloError
is raised in case of errors that occur when
communicating with the IlO. The subclass IloLoginFailed
is raised for
login failures.
-
class
hpilo.
Ilo
(hostname, login=None, password=None, timeout=60, port=443, protocol=None, delayed=False)¶ Represents an iLO/iLO2/iLO3/RILOE II management interface on a specific host. A new connection using the specified login, password and timeout will be made for each API call. The library will detect which protocol to use, but you can override this by setting protocol to ILO_RAW or ILO_HTTP. Use ILO_LOCAL to avoid using a network connection and use hponcfg instead. Username and password are ignored for ILO_LOCAL connections. Set delayed to True to make python-hpilo not send requests immediately, but group them together. See
call_delayed()
-
activate_license
(key)¶ Activate an iLO advanced license
-
add_federation_group
(group_name, group_key, admin_priv=False, remote_cons_priv=True, reset_server_priv=False, virtual_media_priv=False, config_ilo_priv=True, login_priv=False)¶ Add a new federation group
-
add_user
(user_login, user_name, password, admin_priv=False, remote_cons_priv=True, reset_server_priv=False, virtual_media_priv=False, config_ilo_priv=True)¶ Add a new user to the iLO interface with the specified name, password and permissions. Permission attributes should be boolean values.
-
ahs_clear_data
()¶ Clears Active Health System information log
-
call_delayed
()¶ In delayed mode, calling a method on an iLO object will not cause an immediate callout to the iLO. Instead, the method and parameters are stored for future calls of this method. This method makes one connection to the iLO and sends all commands as one XML document. This speeds up applications that make many calls to the iLO by removing seconds of overhead per call.
The return value of call_delayed is a list of return values for individual methods that don’t return None. This means that there may be fewer items returned than methods called as only get_* methods return data
Delayed calls only work on iLO 2 or newer
-
cert_fqdn
(use_fqdn)¶ Configure whether to use the fqdn or the short hostname for certificate requests
-
certificate_signing_request
(country=None, state=None, locality=None, organization=None, organizational_unit=None, common_name=None)¶ Get a certificate signing request from the iLO
-
clear_ilo_event_log
()¶ Clears the iLO event log
-
clear_server_event_log
()¶ Clears the server event log
-
clear_server_power_on_time
()¶ Clears the server power on time
-
cold_boot_server
()¶ Force a cold boot of the server
-
computer_lock_config
(computer_lock=None, computer_lock_key=None)¶ Configure the computer lock settings
-
delete_federation_group
(group_name)¶ Delete the specified federation group membership
-
delete_ssh_key
(user_login)¶ Delete a users SSH key
-
delete_user
(user_login)¶ Delete the specified user from the ilo
-
disable_ers
()¶ Disable Insight Remote Support functionality and unregister the server
-
eject_virtual_floppy
()¶ Eject the virtual floppy
-
eject_virtual_media
(device='cdrom')¶ Eject the virtual media attached to the specified device
-
ers_ahs_submit
(message_id, bb_days)¶ Submity AHS data to the insight remote support server
-
factory_defaults
()¶ Reset the iLO to factory default settings
-
fips_enable
()¶ Enable FIPS standard to enforce AES/3DES encryption, can only be reset with a call to factory_defaults. Resets Administrator password and license key
-
get_ahs_status
()¶ Get active health system logging status
-
get_all_languages
()¶ Get the list of installed languages - broken because iLO returns invalid XML
-
get_all_licenses
()¶ Get a list of all license types and licenses
-
get_all_user_info
()¶ Get basic and authorization info of all users
-
get_all_users
()¶ Get a list of all loginnames
-
get_asset_tag
()¶ Gets the server asset tag
-
get_cert_subject_info
()¶ Get ssl certificate subject information
-
get_current_boot_mode
()¶ Get the current boot mode (legaci or uefi)
-
get_dir_config
()¶ Get directory authentication configuration
-
get_embedded_health
()¶ Get server health information
-
get_encrypt_settings
()¶ Get the iLO encryption settings
-
get_ers_settings
()¶ Get the ERS Insight Remote Support settings
-
get_federation_all_groups
()¶ Get all federation group names
-
get_federation_all_groups_info
()¶ Get all federation group names and associated privileges
-
get_federation_group
(group_name)¶ Get privileges for a specific federation group
-
get_federation_multicast
()¶ Get the iLO federation mulicast settings
-
get_fips_status
()¶ Is the FIPS-mandated AES/3DESencryption enforcement in place
-
get_fw_version
()¶ Get the iLO type and firmware version, use get_product_name to get the server model
-
get_global_settings
()¶ Get global iLO settings
-
get_host_data
(decoded_only=True)¶ Get SMBIOS records that describe the host. By default only the ones where human readable information is available are returned. To get all records pass
decoded_only=False
-
get_host_power_saver_status
()¶ Get the configuration of the ProLiant power regulator
-
get_host_power_status
()¶ Whether the server is powered on or not
-
get_host_pwr_micro_ver
()¶ Get the version of the power micro firmware
-
get_ilo_event_log
()¶ Get the full iLO event log
-
get_language
()¶ Get the default language set
-
get_network_settings
()¶ Get the iLO network settings
-
get_oa_info
()¶ Get information about the OA of the enclosing chassis
-
get_one_time_boot
()¶ Get the one time boot state of the host
-
get_pending_boot_mode
()¶ Get the pending boot mode (legaci or uefi)
-
get_pers_mouse_keyboard_enabled
()¶ Returns whether persistent mouse and keyboard are enabled
-
get_persistent_boot
()¶ Get the boot order of the host
-
get_power_cap
()¶ Get the power cap setting
-
get_power_readings
()¶ Get current, min, max and average power readings
-
get_product_name
()¶ Get the model name of the server, use get_fw_version to get the iLO model
-
get_pwreg
()¶ Get the power and power alert threshold settings
-
get_rack_settings
()¶ Get the rack settings for an iLO
-
get_security_msg
()¶ Retrieve the security message that is displayed on the login screen
-
get_server_auto_pwr
()¶ Get the automatic power on delay setting
-
get_server_event_log
()¶ Get the IML log of the server
-
get_server_fqdn
()¶ Get the fqdn of the server this iLO is managing
-
get_server_name
()¶ Get the name of the server this iLO is managing
-
get_server_power_on_time
()¶ How many minutes ago has the server been powered on
-
get_smh_fqdn
()¶ Get the fqdn of the HP System Management Homepage
-
get_snmp_im_settings
()¶ Where does the iLO send SNMP traps to and which traps does it send
-
get_spatial
()¶ Get location information
-
get_sso_settings
()¶ Get the HP SIM Single Sign-On settings
-
get_tpm_status
()¶ Get the status of the Trusted Platform Module
-
get_twofactor_settings
()¶ Get two-factor authentication settings
-
get_uid_status
()¶ Get the status of the UID light
-
get_user
(user_login)¶ Get user info about a specific user
-
get_vm_status
(device='CDROM')¶ Get the status of virtual media devices. Valid devices are FLOPPY and CDROM
-
hold_pwr_btn
()¶ Press and hold the power button
-
hotkey_config
(ctrl_t=None, ctrl_u=None, ctrl_v=None, ctrl_w=None, ctrl_x=None, ctrl_y=None)¶ Change a set of shortcuts
-
import_certificate
(certificate)¶ Import a signed SSL certificate
-
import_ssh_key
(user_login, ssh_key)¶ Imports an SSH key for the specified user. The value of ssh_key should be the content of an id_dsa.pub file
-
insert_virtual_media
(device, image_url)¶ Insert a virtual floppy or CDROM. Note that you will also need to use
set_vm_status()
to connect the media
-
mod_dir_config
(dir_authentication_enabled=None, dir_local_user_acct=None, dir_server_address=None, dir_server_port=None, dir_object_dn=None, dir_object_password=None, dir_user_context_1=None, dir_user_context_2=None, dir_user_context_3=None, dir_user_context_4=None, dir_user_context_5=None, dir_user_context_6=None, dir_user_context_7=None, dir_user_context_8=None, dir_user_context_9=None, dir_user_context_10=None, dir_user_context_11=None, dir_user_context_12=None, dir_user_context_13=None, dir_user_context_14=None, dir_user_context_15=None, dir_enable_grp_acct=None, dir_kerberos_enabled=None, dir_kerberos_realm=None, dir_kerberos_kdc_address=None, dir_kerberos_kdc_port=None, dir_kerberos_keytab=None, dir_grpacct1_name=None, dir_grpacct1_sid=None, dir_grpacct1_priv=None, dir_grpacct2_name=None, dir_grpacct2_sid=None, dir_grpacct2_priv=None, dir_grpacct3_name=None, dir_grpacct3_sid=None, dir_grpacct3_priv=None, dir_grpacct4_name=None, dir_grpacct4_sid=None, dir_grpacct4_priv=None, dir_grpacct5_name=None, dir_grpacct5_sid=None, dir_grpacct5_priv=None, dir_grpacct6_name=None, dir_grpacct6_sid=None, dir_grpacct6_priv=None)¶ Modify iLO directory configuration, only values that are specified will be changed.
-
mod_federation_group
(group_name, new_group_name=None, group_key=None, admin_priv=None, remote_cons_priv=None, reset_server_priv=None, virtual_media_priv=None, config_ilo_priv=None, login_priv=None)¶ Set attributes for a federation group, only specified arguments will be changed. All arguments except group_name, new_group_name and group_key should be boolean
-
mod_global_settings
(session_timeout=None, f8_prompt_enabled=None, f8_login_required=None, lock_configuration=None, ilo_funct_enabled=None, serial_cli_status=None, serial_cli_speed=None, http_port=None, https_port=None, ssh_port=None, ssh_status=None, vmedia_disable=None, virtual_media_port=None, remote_console_port=None, snmp_access_enabled=None, snmp_port=None, snmp_trap_port=None, remote_syslog_enable=None, remote_syslog_server_address=None, remote_syslog_port=None, alertmail_enable=None, alertmail_email_address=None, alertmail_sender_domain=None, alertmail_smtp_server=None, alertmail_smtp_port=None, min_password=None, enforce_aes=None, authentication_failure_logging=None, rbsu_post_ip=None, remote_console_encryption=None, remote_keyboard_model=None, terminal_services_port=None, high_performance_mouse=None, shared_console_enable=None, shared_console_port=None, remote_console_acquire=None, brownout_recovery=None, ipmi_dcmi_over_lan_enabled=None, vsp_log_enable=None, vsp_software_flow_control=None, propagate_time_to_host=None)¶ Modify iLO global settings, only values that are specified will be changed.
-
mod_network_settings
(enable_nic=None, reg_ddns_server=None, ping_gateway=None, dhcp_domain_name=None, speed_autoselect=None, nic_speed=None, full_duplex=None, dhcp_enable=None, ip_address=None, subnet_mask=None, gateway_ip_address=None, dns_name=None, domain_name=None, dhcp_gateway=None, dhcp_dns_server=None, dhcp_wins_server=None, dhcp_static_route=None, reg_wins_server=None, prim_dns_server=None, sec_dns_server=None, ter_dns_server=None, prim_wins_server=None, sec_wins_server=None, static_route_1=None, static_route_2=None, static_route_3=None, dhcp_sntp_settings=None, sntp_server1=None, sntp_server2=None, timezone=None, enclosure_ip_enable=None, web_agent_ip_address=None, shared_network_port=None, vlan_enabled=None, vlan_id=None, shared_network_port_vlan=None, shared_network_port_vlan_id=None, ipv6_address=None, ipv6_static_route_1=None, ipv6_static_route2=None, ipv6_static_route_3=None, ipv6_prim_dns_server=None, ipv6_sec_dns_server=None, ipv6_ter_dns_server=None, ipv6_default_gateway=None, ipv6_preferred_protocol=None, ipv6_addr_autocfg=None, ipv6_reg_ddns_server=None, dhcpv6_dns_server=None, dhcpv6_rapid_commit=None, dhcpv6_stateful_enable=None, dhcpv6_stateless_enable=None, dhcpv6_sntp_settings=None)¶ Configure the network settings for the iLO card. The static route arguments require hashes with the keys specified in the HP documentation.
-
mod_snmp_im_settings
(snmp_access=None, web_agent_ip_address=None, snmp_address_1=None, snmp_address_1_rocommunity=None, snmp_address_1_trapcommunity=None, snmp_address_2=None, snmp_address_2_rocommunity=None, snmp_address_2_trapcommunity=None, snmp_address_3=None, snmp_address_3_rocommunity=None, snmp_address_3_trapcommunity=None, snmp_port=None, snmp_trap_port=None, snmp_v3_engine_id=None, snmp_passthrough_status=None, trap_source_identifier=None, os_traps=None, rib_traps=None, cold_start_trap_broadcast=None, snmp_v1_traps=None, cim_security_mask=None, snmp_sys_location=None, snmp_sys_contact=None, agentless_management_enable=None, snmp_system_role=None, snmp_system_role_detail=None, snmp_user_profile_1=None, snmp_user_profile_2=None, snmp_user_profile_3=None)¶ Configure the SNMP and Insight Manager integration settings.
-
mod_user
(user_login, user_name=None, password=None, admin_priv=None, remote_cons_priv=None, reset_server_priv=None, virtual_media_priv=None, config_ilo_priv=None)¶ Set attributes for a user, only specified arguments will be changed. All arguments except user_name and password should be boolean
-
press_pwr_btn
()¶ Press the power button
-
profile_apply
(desc_name, action)¶ Apply a deployment profile
-
profile_apply_get_results
()¶ Retrieve the results of the last profile_apply
-
profile_delete
(desc_name)¶ Delet the specified deployment profile
-
profile_desc_download
(desc_name, name, description, blob_namespace=None, blob_name=None, url=None)¶ Make the iLO download a blob and create a deployment profile
-
profile_list
()¶ List all profile descriptors
-
reset_rib
()¶ Reset the iLO/RILOE board
-
reset_server
()¶ Power cycle the server
-
set_ahs_status
(status)¶ Enable or disable AHS logging
-
set_asset_tag
(asset_tag)¶ Set the server asset tag
-
set_ers_direct_connect
(user_id, password, proxy_host=None, proxy_port=None, proxy_username=None, proxy_password=None)¶ Register your iLO with HP Insigt Online using Direct Connect. Note that you must also call dc_registration_complete
-
set_ers_irs_connect
(ers_destination_url, ers_destination_port)¶ Connect to an Insight Remote Support server
-
set_ers_web_proxy
(proxy_host, proxy_port, proxy_username=None, proxy_password=None)¶ Register your iLO with HP Insigt Online using Direct Connect. Note that you must also call dc_registration_complete
-
set_federation_multicast
(multicast_discovery_enabled=True, multicast_announcement_interval=600, ipv6_multicast_scope='Site', multicast_ttl=5)¶ Set the Federation multicast configuration
-
set_host_power
(host_power=True)¶ Turn host power on or off
-
set_host_power_saver
(host_power_saver)¶ Set the configuration of the ProLiant power regulator
-
set_language
(lang_id)¶ Set the default language. Only EN, JA and ZH are supported
-
set_one_time_boot
(device)¶ Set one time boot device, device should be one of normal, floppy, cdrom, hdd, usb, rbsu or network. Ilo 4 also supports EMB-MENU (Displays the default boot menu), EMB-ACU (Boots into ACU), EMB-HPSUM-AUTO (Boots HPSUM in automatic update mode), EMB-DIAGS (Launches Insight Diagnostics for Linux in interactive mode) and RBSU (Boots into the system RBSU)
-
set_pending_boot_mode
(boot_mode)¶ Set the boot mode for the next boot to UEFI or legacy
-
set_pers_mouse_keyboard_enabled
(enabled)¶ Enable/disable persistent mouse and keyboard
-
set_persistent_boot
(devices)¶ Set persistent boot order, devices should be comma-separated
-
set_power_cap
(power_cap)¶ Set the power cap feature to a specific value
-
set_pwreg
(type, threshold=None, duration=None)¶ Set the power alert threshold
-
set_security_msg
(security_msg, security_msg_text='')¶ Enables/disables the security message on the iLO login screen and sets its value
-
set_server_auto_pwr
(setting)¶ Set the automatic power on delay setting. Valid settings are False, True (for minumum delay), 15, 30, 45 60 (for that amount of delay or random (for a random delay of up to 60 seconds.)
-
set_server_fqdn
(fqdn)¶ Set the fqdn of the server
-
set_server_name
(name)¶ Set the name of the server
-
set_vf_status
(boot_option='boot_once', write_protect=True)¶ Set the parameters of the RILOE virtual floppy specified virtual media. Valid boot options are boot_once, boot_always, no_boot, connect and disconnect.
-
set_vm_status
(device='cdrom', boot_option='boot_once', write_protect=True)¶ Set the parameters of the specified virtual media. Valid boot options are boot_once, boot_always, no_boot, connect and disconnect. Valid devices are floppy and cdrom
-
trigger_l2_collection
(message_id)¶ Initiate an L2 data collection submission to the Insight Remote Support server.
-
trigger_test_event
(message_id)¶ Trigger a test service event submission to the Insight Remote Support server.
-
uid_control
(uid='No')¶ Turn the UID light on (“Yes”) or off (“No”)
-
update_rib_firmware
(filename=None, version=None, progress=None)¶ Upload new RIB firmware, either specified by filename (.bin or .scexe) or version number. Use “latest” as version number to download and use the latest available firmware.
API note:
As this function may take a while, you can choose to receive progress messages by passing a callable in the progress parameter. This callable will be called many times to inform you about upload and flash progress.
-
warm_boot_server
()¶ Force a warm boot of the server
-
xmldata
()¶ Get basic discovery data which all iLO versions expose over unauthenticated URL
-