bmc_mod_name = 'remoteinstaller.installer.bmc_management.{}'.format(hw_data['product_family'].lower())
bmc_mod = importlib.import_module(bmc_mod_name)
bmc_class = getattr(bmc_mod, hw_data['product_family'])
- bmc = bmc_class(host, user, passwd, bmc_log_path)
+ bmc = bmc_class(host, user, passwd, priv_level, bmc_log_path)
bmc.set_host_name(hw)
return bmc
pre_allocated_ips = self._uc['hosts'][self._first_controller].get('pre_allocated_ips', None)
if pre_allocated_ips:
pre_allocated_infra_external_ip = pre_allocated_ips.get('infra_external', None)
- self._first_controller_ip = str(IPAddress(pre_allocated_infra_external_ip))
+ if pre_allocated_infra_external_ip:
+ self._first_controller_ip = str(IPAddress(pre_allocated_infra_external_ip))
if not self._first_controller_ip:
self._first_controller_ip = str(IPAddress(first_ip)+1)
bmc_host = bmc.get_host()
bmc_user = bmc.get_user()
bmc_passwd = bmc.get_passwd()
-
+ bmc_priv_level = bmc.get_priv_level()
+
log_file = '{}/cat_bootstrap.log'.format(self._logdir)
try:
- cat_file = CatFile(bmc_host, bmc_user, bmc_passwd, admin_user, admin_passwd)
+ cat_file = CatFile(bmc_host, bmc_user, bmc_passwd, bmc_priv_level, admin_user, admin_passwd)
cat_file.cat('/srv/deployment/log/bootstrap.log', log_file)
except CatFileException as ex:
logging.info('Could not cat file from console: %s', str(ex))
- cat_file = CatFile(bmc_host, bmc_user, bmc_passwd, 'root', 'root')
+ cat_file = CatFile(bmc_host, bmc_user, bmc_passwd, bmc_priv_level, 'root', 'root')
cat_file.cat('/srv/deployment/log/bootstrap.log', log_file)
def get_logs(self, admin_passwd):