From 6b27935752f36a79fe4dab202c80a5e7ed1146bd Mon Sep 17 00:00:00 2001 From: Flavio Torres Date: Wed, 2 May 2018 15:33:31 -0700 Subject: [PATCH 1/2] # Note: Domain Name is currently set through DHCP, if enabled then domain_name is empty and hpilo_ca can't update. Avoiding loop. --- examples/ca/hpilo_ca | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/examples/ca/hpilo_ca b/examples/ca/hpilo_ca index 1234a109..99f846de 100755 --- a/examples/ca/hpilo_ca +++ b/examples/ca/hpilo_ca @@ -133,11 +133,19 @@ def sign_certificates(hosts, openssl, login, password, opts): cn = ilo.get_cert_subject_info()['csr_subject_common_name'] hn, dn = hostname.split('.', 1) - if network_settings['dns_name'] != hn or dn and network_settings['domain_name'] != dn: - print("Hostname misconfigured on the ilo, fixing") - ilo.mod_network_settings(dns_name=hn, domain_name=dn) - todo.append(hostname) - continue + if network_settings["dhcp_domain_name"]: + # Note: Domain Name is currently set through DHCP, if enabled then domain_name is empty and hpilo_ca can't update. Avoiding loop. + if network_settings['dns_name'] != hn: + print("Hostname misconfigured on the ilo - hn:[%s] dn:[%s], fixing") % (network_settings['dns_name'], hn) + ilo.mod_network_settings(dns_name=hn, domain_name=dn) + todo.append(hostname) + continue + else: + if network_settings['dns_name'] != hn or dn and network_settings['domain_name'] != dn: + print("Hostname misconfigured on the ilo - hn:[%s] dn:[%s] vs hn:[%s] dn:[%s], fixing") % (network_settings['dns_name'], network_settings['domain_name'], hn, dn) + ilo.mod_network_settings(dns_name=hn, domain_name=dn) + todo.append(hostname) + continue print("(2/5) Retrieving certificate signing request") if fw_version['management_processor'].lower() == 'ilo2': From 2a7181302906fbfb1df5d242a723902d2158eb3a Mon Sep 17 00:00:00 2001 From: Flavio Torres Date: Tue, 5 Mar 2019 14:50:46 -0800 Subject: [PATCH 2/2] adding missing field to get generic ldap enabled https://github.com/seveas/python-hpilo/issues/205 --- hpilo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hpilo.py b/hpilo.py index a370ccf7..4beec300 100644 --- a/hpilo.py +++ b/hpilo.py @@ -1540,6 +1540,7 @@ def mod_dir_config(self, dir_authentication_enabled=None, dir_kerberos_enabled=None,dir_kerberos_realm=None, dir_kerberos_kdc_address=None,dir_kerberos_kdc_port=None, dir_kerberos_keytab=None, + dir_generic_ldap_enabled=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,