aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deploy/dha_adapters/hp_adapter.py2
-rw-r--r--deploy/dha_adapters/ipmi_adapter.py7
-rw-r--r--deploy/reap.py2
3 files changed, 8 insertions, 3 deletions
diff --git a/deploy/dha_adapters/hp_adapter.py b/deploy/dha_adapters/hp_adapter.py
index 13bb3491a..6434da868 100644
--- a/deploy/dha_adapters/hp_adapter.py
+++ b/deploy/dha_adapters/hp_adapter.py
@@ -29,7 +29,7 @@ class HpAdapter(IpmiAdapter):
def node_set_boot_order(self, node_id, boot_order_list):
log('Set boot order %s on Node %s' % (boot_order_list, node_id))
- ip, username, password = self.get_access_info(node_id)
+ ip, username, password, ipmiport = self.get_access_info(node_id)
ssh = SSHClient(ip, username, password)
with ssh as s:
for order, dev in enumerate(boot_order_list):
diff --git a/deploy/dha_adapters/ipmi_adapter.py b/deploy/dha_adapters/ipmi_adapter.py
index 8fda4f9f0..4bd6bd378 100644
--- a/deploy/dha_adapters/ipmi_adapter.py
+++ b/deploy/dha_adapters/ipmi_adapter.py
@@ -27,12 +27,15 @@ class IpmiAdapter(HardwareAdapter):
ip = self.get_node_property(node_id, 'ipmiIp')
username = self.get_node_property(node_id, 'ipmiUser')
password = self.get_node_property(node_id, 'ipmiPass')
- return ip, username, password
+ ipmiport = self.get_node_property(node_id, 'ipmiPort')
+ return ip, username, password, ipmiport
def ipmi_cmd(self, node_id):
- ip, username, password = self.get_access_info(node_id)
+ ip, username, password, ipmiport = self.get_access_info(node_id)
cmd = 'ipmitool -I lanplus -A password'
cmd += ' -H %s -U %s -P %s' % (ip, username, password)
+ if ipmiport:
+ cmd += ' -p %d' % int(ipmiport)
return cmd
def get_node_pxe_mac(self, node_id):
diff --git a/deploy/reap.py b/deploy/reap.py
index c642a4243..7624d6f6d 100644
--- a/deploy/reap.py
+++ b/deploy/reap.py
@@ -57,6 +57,8 @@ adapter:
# ipmiIp
# ipmiUser
# ipmiPass
+# and you *MAY* provide (optional, not added by reap.py):
+# ipmiPort
# - libvirt adapter you need to provide:
# libvirtName: <whatever>
# libvirtTemplate: [libvirt/vms/controller.xml | libvirt/vms/compute.xml]