def execute(self, parameter_pool): location = EbLocalDir.Path + os.path.sep + EbConfigFile.Name config_file.load_eb_config_file(location, parameter_pool, True) ret_result = OperationResult(self, None, None, None) return ret_result
def execute(self, parameter_pool): location = EbLocalDir.Path + os.path.sep + EbConfigFile.Name try: config_file.load_eb_config_file(location, parameter_pool, False) if config_file.check_access_permission(location) is False: message = ConfigFileErrorMessage.PermissionError.format(EbConfigFile.Name) log.info(message) prompt.error(message) #Post processing if not parameter_pool.has(ParameterName.RdsSnippetUrl)\ and parameter_pool.has(ParameterName.Region): region = parameter_pool.get_value(ParameterName.Region) parameter_pool.put(Parameter(ParameterName.RdsSnippetUrl, RdsDefault.get_snippet_url(region), ParameterSource.ConfigFile)) except EBConfigFileNotExistError: log.error('Configuration file "{0}" not exist.'.format(EbConfigFile.Name)) prompt.error(ConfigFileMessage.CannotFind.format\ (EbConfigFile.Name, CommandType.INIT.lower())) raise EBSCliException() except BaseException as ex: log.error('Encountered error when load configuration file "{0}", becuase "{1}".'.\ format(EbConfigFile.Name, ex)) prompt.error(ConfigFileMessage.CorrectionSuggestion. format(location,CommandType.INIT.lower())) raise ret_result = OperationResult(self, None, None, None) return ret_result
def execute(self, parameter_pool): location = EbLocalDir.Path + os.path.sep + EbConfigFile.Name try: config_file.load_eb_config_file(location, parameter_pool, False) if config_file.check_access_permission(location) is False: message = ConfigFileErrorMessage.PermissionError.format(EbConfigFile.Name) log.info(message) prompt.error(message) #Post processing if not parameter_pool.has(ParameterName.RdsSnippetUrl)\ and parameter_pool.has(ParameterName.Region): region = parameter_pool.get_value(ParameterName.Region, False) parameter_pool.put(Parameter(ParameterName.RdsSnippetUrl, RdsDefault.get_snippet_url(region), ParameterSource.ConfigFile)) except EBConfigFileNotExistError: log.error(u'Configuration file "{0}" not exist.'.format(EbConfigFile.Name)) prompt.error(ConfigFileMessage.CannotFind.format\ (EbConfigFile.Name, CommandType.INIT.lower())) raise EBSCliException() except BaseException as ex: log.error(u'Encountered error when load configuration file "{0}", becuase "{1}".'.\ format(EbConfigFile.Name, ex)) prompt.error(ConfigFileMessage.CorrectionSuggestion. format(location,CommandType.INIT.lower())) raise ret_result = OperationResult(self, None, None, None) return ret_result