X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=modules%2Fopnfv%2Futils%2FCredentials.py;h=193a10aaccc029113b34cf8d314bb42eb726c960;hb=e1704d550903d4a4e71cf74c578569ae0202de04;hp=1882692b36435a1224e77305587cbdaf8a3048d7;hpb=6beb8135335fed75dac72bb691fa0725a6226280;p=releng.git diff --git a/modules/opnfv/utils/Credentials.py b/modules/opnfv/utils/Credentials.py index 1882692b3..193a10aac 100644 --- a/modules/opnfv/utils/Credentials.py +++ b/modules/opnfv/utils/Credentials.py @@ -7,9 +7,9 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 # -# Usage example: +# Usage example (note: Fuel actually uses key-based auth, not user/pass): # from opnfv.utils.Credentials import Credentials as credentials -# credentials("fuel", "10.20.0.2", "root", "r00tme").fetch('./openrc') +# credentials("fuel", "10.20.0.2", "user", "password").fetch('./openrc') # import os @@ -47,7 +47,7 @@ class Credentials(object): password) def __check_installer_name(self, installer): - if installer not in ("apex", "compass", "fuel", "joid"): + if installer not in ("apex", "compass", "daisy", "fuel", "joid"): return os.EX_CONFIG else: return os.EX_OK @@ -69,13 +69,12 @@ class Credentials(object): # TODO pass + def __fetch_creds_daisy(self, target_path): + # TODO + pass + def __fetch_creds_fuel(self, target_path): - creds_file = '/root/openrc' - try: - self.handler.get_file_from_controller(creds_file, target_path) - except Exception, e: - self.logger.error( - "Cannot get %s from controller. %e" % (creds_file, e)) + # TODO pass def __fetch_creds_joid(self, target_path): @@ -95,6 +94,8 @@ class Credentials(object): self.__fetch_creds_apex(target_path) elif self.installer == "compass": self.__fetch_creds_compass(target_path) + elif self.installer == "daisy": + self.__fetch_creds_daisy(target_path) elif self.installer == "fuel": self.__fetch_creds_fuel(target_path) elif self.installer == "joid":