# Path: lib/Settings.py
# class Settings:
#     def __init__(self,
#                  override_settings_path='settings.cfg'):
#         self.settingsFilePath = override_settings_path
#         self.parser = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation())
#         self.settings = None
#         self.getSettings()
# 
#     def getSettings(self):
#         self.parser.read('./settings.cfg')
#         self.settings = {section: dict(**self.parser[section]) for section in self.parser.sections()}
# 
#         return self.settings
# 
#     def getServiceIp(self, service):
#         return self.settings['general']['my_ip']


from lib.Settings import Settings


class DefaultProfileProvider:
    def __init__(self, settings=None):
        self.settings = settings or Settings()

    def get_default_profiles(self):
        default_profile = 'all'
        profile = default_profile
        settings = self.settings.getSettings()
        try:
            profile = settings['general']['profiles_to_use'].strip() or default_profile
        except KeyError:
            profile = default_profile


# Path: lib/Settings.py
# class Settings:
#     def __init__(self,
#                  override_settings_path='settings.cfg'):
#         self.settingsFilePath = override_settings_path
#         self.parser = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation())
#         self.settings = None
#         self.getSettings()
# 
#     def getSettings(self):
#         self.parser.read('./settings.cfg')
#         self.settings = {section: dict(**self.parser[section]) for section in self.parser.sections()}
# 
#         return self.settings
# 
#     def getServiceIp(self, service):
#         return self.settings['general']['my_ip']


# Path: lib/Tools/DefaultProfileProvider.py
from lib.Settings import Settings



class DefaultProfileProvider:
    def __init__(self, settings=None):
        self.settings = settings or Settings()

    def get_default_profiles(self):
        default_profile = 'all'
        profile = default_profile
        settings = self.settings.getSettings()
        try:
            profile = settings['general']['profiles_to_use'].strip() or default_profile
        except KeyError:
            profile = default_profile


        return profile.replace(',', ' ').split()