2 from ipmi_adapter import IpmiAdapter
3 from ssh_client import SSHClient
7 DEV = {'pxe': 'bootsource5',
11 ROOT = '/system1/bootconfig1'
13 class HpAdapter(IpmiAdapter):
15 def __init__(self, yaml_path):
16 super(HpAdapter, self).__init__(yaml_path)
18 def node_set_boot_order(self, node_id, boot_order_list):
19 log('Set boot order %s on Node %s' % (boot_order_list, node_id))
20 ip, username, password = self.get_access_info(node_id)
21 ssh = SSHClient(ip, username, password)
22 for order, dev in enumerate(boot_order_list):
24 s.exec_cmd('set %s/%s bootorder=%s'
25 % (ROOT, DEV[dev], order+1))