]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
PDU::ipmi: Better username/password configuration
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 2 Jul 2018 15:46:20 +0000 (15:46 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 4 Jul 2018 15:42:46 +0000 (16:42 +0100)
This can now come from host properties, or failing that we use
ADMIN/ADMIN which seems common.

No functional change with working existing configs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Osstest/PDU/ipmi.pm

index 0cbc5b90a80b8d32792e169efb579edd01831c26..dbf211f7d7b6bb5d8fa36dfa14da7bacbb907da7 100644 (file)
@@ -36,6 +36,8 @@ BEGIN {
 
 sub new {
     my ($class, $ho, $methname, $mgmt, $user, $pass, @opts) = @_;
+    $user ||= get_host_property($ho, 'IpmiUser') || 'ADMIN';
+    $pass ||= get_host_property($ho, 'IpmiPassword') || 'ADMIN';
     return bless { Host => $ho,
                   Mgmt => $mgmt,
                   User => $user,