X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fremote-installer.git;a=blobdiff_plain;f=src%2Fremoteinstaller%2Finstaller%2Finstall.py;h=a5c099ae508d75b5cab363c4f0a67f5d68172c11;hp=eaa645b80e8fdbc562c53e53c4eba2a957090e95;hb=3b665c4c4524f586c291935265a8613c8fe9c982;hpb=5529dff990973f223eeff6601da4f466fead6a32 diff --git a/src/remoteinstaller/installer/install.py b/src/remoteinstaller/installer/install.py index eaa645b..a5c099a 100644 --- a/src/remoteinstaller/installer/install.py +++ b/src/remoteinstaller/installer/install.py @@ -136,11 +136,12 @@ class Installer(object): host = self._uc['hosts'][hw]['hwmgmt']['address'] user = self._uc['hosts'][hw]['hwmgmt']['user'] passwd = self._uc['hosts'][hw]['hwmgmt']['password'] + priv_level = self._uc['hosts'][hw]['hwmgmt'].get('priv_level', 'ADMINISTRATOR') try: - hw_data = hw_detect.get_hw_data(host, user, passwd, False) + hw_data = hw_detect.get_hw_data(host, user, passwd, priv_level, False) except HWException as e: - error = "Harware not detected for {}: {}".format(hw, str(e)) + error = "Hardware not detected for {}: {}".format(hw, str(e)) logging.error(error) raise BMCException(error) @@ -153,7 +154,7 @@ class Installer(object): 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 @@ -312,15 +313,16 @@ class Installer(object): 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):