General server and iLO information¶
Many iLO methods allow you to retrieve information about the iLO and the server it is built into and to manipulate basic configuration settings. This document describes all the ones that do not fit under a more specific subject, such as authentication or power.
- class hpilo.Ilo
- factory_defaults()¶
Reset the iLO to factory default settings
- force_format()¶
Forcefully format the iLO’s internal NAND flash. Only use this when the iLO is having severe problems and its self-test fails
- get_product_name()¶
Get the model name of the server, use get_fw_version to get the iLO model
>>> ilo.get_product_name() ProLiant BL460c Gen8
- get_fw_version()¶
Get the iLO type and firmware version, use get_product_name to get the server model
>>> ilo.get_fw_version() {'firmware_date': 'Jan 15 2015', 'firmware_version': '2.10', 'license_type': 'iLO 4 Advanced', 'management_processor': 'iLO4'}
- 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
>>> ilo.get_host_data() [{'Date': '08/02/2014', 'Family': 'I31', 'b64_data': 'ABgAAAECAPADf4DayX0AAAAAAwf//wEzSFAASTMxADA4LzAyLzIwMTQAAA==', 'type': 0}, {'Product Name': 'ProLiant BL460c Gen8', 'Serial Number': 'CZ3415448C ', 'UUID': '641016CZ3415448C', 'b64_data': 'ARsAAQQFAAE2NDEwMTZDWjM0MTU0NDhDBgIDQ1ozNDE1NDQ4QyAgICAgIAA2NDEwMTYtQjIxICAgICAgAFByb0xpYW50AEhQAFByb0xpYW50IEJMNDYwYyBHZW44ACAgICAgICAgICAgICAASFAAUHJvTGlhbnQgV1M0NjBjIEdlbjggV1MgQmxhZGUAAA==', 'cUUID': '30313436-3631-5A43-3334-313534343843', 'type': 1}, {'Execution Technology': '6 of 6 cores; 12 threads', 'Label': 'Proc 1', 'Memory Technology': '64-bit Capable', 'Speed': '2500 MHz', 'b64_data': 'BCoABAEDswLXBgIA//vrvwOOZADAEsQJQSYQByAHMAcAAAAGBgwEALMAUHJvYyAxAEludGVsACBJbnRlbChSKSBYZW9uKFIpIENQVSBFNS0yNjQwIDAgQCAyLjUwR0h6ICAgICAgIAAA', 'type': 4}, {'Execution Technology': '6 of 6 cores; 12 threads', 'Label': 'Proc 2', 'Memory Technology': '64-bit Capable', 'Speed': '2500 MHz', 'b64_data': 'BCoBBAEDswLXBgIA//vrvwOOZADAEsQJRCYWByYHNgcAAAAGBgwEALMAUHJvYyAyAEludGVsACBJbnRlbChSKSBYZW9uKFIpIENQVSBFNS0yNjQwIDAgQCAyLjUwR0h6ICAgICAgIAAA', 'type': 4}, {'Label': 'PROC 1 DIMM 1 ', 'Size': '16384 MB', 'Speed': '1600 MHz', 'b64_data': 'ESgAEQAQ/v9IAEAAAEAJAAEAGIAgQAYCAAADAgAAAAA1BdwF3AXcBVBST0MgIDEgRElNTSAgMSAASFAgICAgIAA2NzI2MTItMDgxICAgICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 1 DIMM 2 ', 'Size': 'not installed', 'b64_data': 'ESgBEQAQ/v9IAEAAAAAJAQEAGIAAAAACAAADAAAAAAAAAAAAAAAAAFBST0MgIDEgRElNTSAgMiAAVU5LTk9XTgBOT1QgQVZBSUxBQkxFICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 1 DIMM 3 ', 'Size': '16384 MB', 'Speed': '1600 MHz', 'b64_data': 'ESgCEQAQ/v9IAEAAAEAJAgEAGIAgQAYCAAADAgAAAAA1BdwF3AXcBVBST0MgIDEgRElNTSAgMyAASFAgICAgIAA2NzI2MTItMDgxICAgICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 1 DIMM 4 ', 'Size': 'not installed', 'b64_data': 'ESgDEQAQ/v9IAEAAAAAJAwEAGIAAAAACAAADAAAAAAAAAAAAAAAAAFBST0MgIDEgRElNTSAgNCAAVU5LTk9XTgBOT1QgQVZBSUxBQkxFICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 1 DIMM 5 ', 'Size': 'not installed', 'b64_data': 'ESgEEQAQ/v9IAEAAAAAJBAEAGIAAAAACAAADAAAAAAAAAAAAAAAAAFBST0MgIDEgRElNTSAgNSAAVU5LTk9XTgBOT1QgQVZBSUxBQkxFICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 1 DIMM 6 ', 'Size': 'not installed', 'b64_data': 'ESgFEQAQ/v9IAEAAAAAJBQEAGIAAAAACAAADAAAAAAAAAAAAAAAAAFBST0MgIDEgRElNTSAgNiAAVU5LTk9XTgBOT1QgQVZBSUxBQkxFICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 1 DIMM 7 ', 'Size': 'not installed', 'b64_data': 'ESgGEQAQ/v9IAEAAAAAJBgEAGIAAAAACAAADAAAAAAAAAAAAAAAAAFBST0MgIDEgRElNTSAgNyAAVU5LTk9XTgBOT1QgQVZBSUxBQkxFICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 1 DIMM 8 ', 'Size': '16384 MB', 'Speed': '1600 MHz', 'b64_data': 'ESgHEQAQ/v9IAEAAAEAJBwEAGIAgQAYCAAADAgAAAAA1BdwF3AXcBVBST0MgIDEgRElNTSAgOCAASFAgICAgIAA2NzI2MTItMDgxICAgICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 2 DIMM 1 ', 'Size': '16384 MB', 'Speed': '1600 MHz', 'b64_data': 'ESgIEQEQ/v9IAEAAAEAJCAEAGIAgQAYCAAADAgAAAAA1BdwF3AXcBVBST0MgIDIgRElNTSAgMSAASFAgICAgIAA2NzI2MTItMDgxICAgICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 2 DIMM 2 ', 'Size': 'not installed', 'b64_data': 'ESgJEQEQ/v9IAEAAAAAJCQEAGIAAAAACAAADAAAAAAAAAAAAAAAAAFBST0MgIDIgRElNTSAgMiAAVU5LTk9XTgBOT1QgQVZBSUxBQkxFICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 2 DIMM 3 ', 'Size': '16384 MB', 'Speed': '1600 MHz', 'b64_data': 'ESgKEQEQ/v9IAEAAAEAJCgEAGIAgQAYCAAADAgAAAAA1BdwF3AXcBVBST0MgIDIgRElNTSAgMyAASFAgICAgIAA2NzI2MTItMDgxICAgICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 2 DIMM 4 ', 'Size': 'not installed', 'b64_data': 'ESgLEQEQ/v9IAEAAAAAJCwEAGIAAAAACAAADAAAAAAAAAAAAAAAAAFBST0MgIDIgRElNTSAgNCAAVU5LTk9XTgBOT1QgQVZBSUxBQkxFICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 2 DIMM 5 ', 'Size': 'not installed', 'b64_data': 'ESgMEQEQ/v9IAEAAAAAJDAEAGIAAAAACAAADAAAAAAAAAAAAAAAAAFBST0MgIDIgRElNTSAgNSAAVU5LTk9XTgBOT1QgQVZBSUxBQkxFICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 2 DIMM 6 ', 'Size': 'not installed', 'b64_data': 'ESgNEQEQ/v9IAEAAAAAJDQEAGIAAAAACAAADAAAAAAAAAAAAAAAAAFBST0MgIDIgRElNTSAgNiAAVU5LTk9XTgBOT1QgQVZBSUxBQkxFICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 2 DIMM 7 ', 'Size': 'not installed', 'b64_data': 'ESgOEQEQ/v9IAEAAAAAJDgEAGIAAAAACAAADAAAAAAAAAAAAAAAAAFBST0MgIDIgRElNTSAgNyAAVU5LTk9XTgBOT1QgQVZBSUxBQkxFICAgICAgIAAA', 'type': 17}, {'Label': 'PROC 2 DIMM 8 ', 'Size': '16384 MB', 'Speed': '1600 MHz', 'b64_data': 'ESgPEQEQ/v9IAEAAAEAJDwEAGIAgQAYCAAADAgAAAAA1BdwF3AXcBVBST0MgIDIgRElNTSAgOCAASFAgICAgIAA2NzI2MTItMDgxICAgICAgICAgIAAA', 'type': 17}, {'b64_data': '0RQA0QAE/BW0Cp1YAQT8FbQKnVwAAA==', 'fields': [{'name': 'Port', 'value': 1}, {'name': 'MAC', 'value': 'FC-15-B4-0A-9D-58'}, {'name': 'Port', 'value': 2}, {'name': 'MAC', 'value': 'FC-15-B4-0A-9D-5C'}, {'name': 'Port', 'value': 'iLO'}, {'name': 'MAC', 'value': '9C-B6-54-8E-4B-7C'}], 'type': 209}, {'Serial Number': 'CZ3415448C ', 'b64_data': '4hUA4jY0MTAxNkNaMzQxNTQ0OEMBQ1ozNDE1NDQ4QyAgICAgIAAA', 'cUUID': '30313436-3631-5A43-3334-313534343843', 'type': 226}]
- get_global_settings()¶
Get global iLO settings
>>> ilo.get_global_settings() {'alertmail_email_address': '', 'alertmail_enable': False, 'alertmail_sender_domain': '', 'alertmail_smtp_port': 25, 'alertmail_smtp_server': '', 'authentication_failure_logging': 'Enabled-every 3rd failure', 'enforce_aes': False, 'f8_login_required': False, 'f8_prompt_enabled': True, 'http_port': 80, 'https_port': 443, 'ipmi_dcmi_over_lan_enabled': True, 'lock_configuration': False, 'min_password': 8, 'propagate_time_to_host': True, 'rbsu_post_ip': True, 'remote_console_port': 23, 'remote_syslog_enable': True, 'remote_syslog_port': 514, 'remote_syslog_server_address': '10.42.128.3', 'serial_cli_speed': 9600, 'serial_cli_status': 'Enabled-Authentication Required', 'session_timeout': 30, 'snmp_access_enabled': True, 'snmp_port': 161, 'snmp_trap_port': 162, 'ssh_port': 22, 'ssh_status': True, 'virtual_media_port': 17988, 'vsp_log_enable': False}
- mod_global_settings(ilo_funct_enabled=None, rbsu_post_ip=None, f8_prompt_enabled=None, f8_login_required=None, lock_configuration=None, serial_cli_status=None, serial_cli_speed=None, http_port=None, https_port=None, ssh_port=None, ssh_status=None, ipmi_dcmi_over_lan_enabled=None, ipmi_dcmi_over_lan_port=None, remote_console_port_status=None, remote_console_port=None, remote_console_encryption=None, rawvsp_port=None, vsp_software_flow_control=None, terminal_services_port=None, shared_console_enable=None, shared_console_port=None, remote_console_acquire=None, telnet_enable=None, ssl_empty_records_enable=None, remote_console_status=None, ribcl_status=None, virtual_media_status=None, webgui_status=None, webserver_status=None, min_password=None, enforce_aes=None, authentication_failure_logging=None, authentication_failure_delay_secs=None, authentication_failures_before_delay=None, ssl_v3_enable=None, session_timeout=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, alertmail_smtp_auth_enable=None, alertmail_smtp_auth_username=None, alertmail_smtp_secure_enable=None, vsp_log_enable=None, interactive_console_replay_enable=None, console_capture_enable=None, console_capture_boot_buffer_enable=None, console_capture_fault_buffer_enable=None, console_capture_port=None, capture_auto_export_enable=None, capture_auto_export_location=None, capture_auto_export_username=None, capture_auto_export_password=None, remote_keyboard_model=None, virtual_kbmouse_connection=None, vmedia_disable=None, virtual_media_port=None, key_up_key_down_enable=None, high_performance_mouse=None, brownout_recovery=None, enhanced_cli_prompt_enable=None, tcp_keep_alive_enable=None, propagate_time_to_host=None, passthrough_config=None)¶
Modify iLO global settings, only values that are specified will be changed. Note that many settings only work on certain iLO models and firmware versions
- get_server_name()¶
Get the name of the server this iLO is managing
>>> ilo.get_server_name() example-server.int.kaarsemaker.net
- set_server_name(name)¶
Set the name of the server
- get_server_fqdn()¶
Get the fqdn of the server this iLO is managing
>>> ilo.get_server_fqdn() example-server.int.kaarsemaker.net
- set_server_fqdn(fqdn)¶
Set the fqdn of the server
- get_smh_fqdn()¶
Get the fqdn of the HP System Management Homepage
>>> ilo.get_smh_fqdn() example-server.int.kaarsemaker.net
- get_oa_info()¶
Get information about the Onboard Administrator of the enclosing chassis
>>> ilo.get_oa_info() {'encl': 'chassis-25', 'ipaddress': '10.42.128.101', 'location': 1, 'macaddress': '68:b5:99:bb:dc:85', 'rack': 'chassis-25', 'system_health': 0, 'uidstatus': 'Off'}
- get_enclosure_ip_settings()¶
Get the enclosure bay static IP settings
- get_asset_tag()¶
Gets the server asset tag
>>> ilo.get_asset_tag() /home/dennis/code/python-hpilo/hpilo.py:459: IloWarning: No Asset Tag Information. warnings.warn(child.get('MESSAGE'), IloWarning) {'asset_tag': None}
>>> ilo.get_asset_tag() {'asset_tag': 'NL00001'}
- set_asset_tag(asset_tag)¶
Set the server asset tag
- get_uid_status()¶
Get the status of the UID light
>>> ilo.get_uid_status() OFF
- uid_control(uid=False)¶
Turn the UID light on (“Yes”) or off (“No”)
- get_all_languages()¶
Get the list of installed languages - broken because iLO returns invalid XML
>>> ilo.get_all_languages() {'language_selection': {'lang_id': 'en', 'language': 'English'}}
- get_language()¶
Get the default language set
>>> ilo.get_language() {'lang_id': 'en', 'language': 'English'}
- set_language(lang_id)¶
Set the default language. Only EN, JA and ZH are supported
- get_rack_settings()¶
Get the rack settings for an iLO
>>> ilo.get_rack_settings() {'bay': 9, 'enclosure_name': 'CHASSIS-225', 'enclosure_sn': 'CZ1234ABCD', 'enclosure_type': 'BladeSystem c7000 Enclosure G2', 'enclosure_uuid': '09CZ1234ABCD', 'rack_name': 'CHASSIS-225'}
- get_spatial()¶
Get location information
>>> ilo.get_spatial() {'bay': 4, 'cuuid': '30313436-3631-5A43-3334-313534343843', 'discovery_data': 'Unknown data', 'discovery_rack': 'Not Supported', 'enclosure_cuuid': '42473930-3038-3430-4850-523000000000', 'enclosure_sn': 'GB8004HPR0', 'platform': 'BL', 'rack_description': 0, 'rack_id': 0, 'rack_id_pn': 0, 'rack_uheight': 0, 'tag_version': 0, 'uheight': 0, 'ulocation': 0, 'uoffset': 0, 'uposition': 0}
- get_topology()¶
Get rack topology information
- get_diagport_settings()¶
Get the blade diagport settings
- get_sdcard_status()¶
Get whether an SD card is connected to the server
>>> ilo.get_sdcard_status() {'sdcard_status': 'NOT PRESENT'}