Esempio n. 1
0
 def __init__(self, user_config_file_path=USER_CONFIG_FILE_PATH, **kwargs):
     self._user_config_file_path = os.path.expanduser(user_config_file_path)
     BaseConfiguration.__init__(self, **kwargs)
     self._verbosity = self.OUTPUT_WARNING
     self._trace = False
     self._verify_server_cert = None
     self._cim_namespace = None
     self._human_friendly = None
     self._lister_format = None
     self._no_headings = None
Esempio n. 2
0
 def __init__(self, user_config_file_path=USER_CONFIG_FILE_PATH, **kwargs):
     self._user_config_file_path = os.path.expanduser(user_config_file_path)
     BaseConfiguration.__init__(self, **kwargs)
     self._verbosity = self.OUTPUT_WARNING
     self._trace = False
     self._verify_server_cert = None
     self._cim_namespace = None
     self._human_friendly = None
     self._lister_format = None
     self._no_headings = None
Esempio n. 3
0
 def default_options(cls):
     """
     :returns: Dictionary of default values.
     :rtype: dictionary
     """
     defaults = BaseConfiguration.default_options().copy()
     # [Main] options
     defaults["CommandNamespace"] = 'lmi.scripts.cmd'
     defaults["Trace"] = "False"
     defaults["Verbosity"] = "0"
     defaults["HistoryMaxLength"] = "4000"
     # [Log] options
     defaults['ConsoleFormat'] = DEFAULT_FORMAT_STRING
     defaults['ConsoleInfoFormat'] = '%(message)s'
     defaults['FileFormat'] = \
             "%(asctime)s:%(levelname)-8s:%(name)s:%(lineno)d - %(message)s"
     defaults['LogToConsole'] = 'True'
     defaults['OutputFile'] = ''
     # [SSL] options
     defaults['VerifyServerCertificate'] = 'True'
     # [Format] options
     defaults['HumanFriendly'] = 'False' # be ugly by default
     defaults['ListerFormat'] = 'table'
     defaults['NoHeadings'] = 'False'
     return defaults
Esempio n. 4
0
 def default_options(cls):
     """
     :returns: Dictionary of default values.
     :rtype: dictionary
     """
     defaults = BaseConfiguration.default_options().copy()
     # [Main] options
     defaults["CommandNamespace"] = 'lmi.scripts.cmd'
     defaults["Trace"] = "False"
     defaults["Verbosity"] = "0"
     # [Log] options
     defaults['ConsoleFormat'] = "%(levelname)s: %(message)s"
     defaults['FileFormat'] = \
             "%(asctime)s:%(levelname)-8s:%(name)s:%(lineno)d - %(message)s"
     # [SSL] options
     defaults['VerifyServerCertificate'] = 'True'
     # [Format] options
     defaults['HumanFriendly'] = 'False'  # be ugly by default
     defaults['ListerFormat'] = 'table'
     defaults['NoHeadings'] = 'False'
     return defaults
Esempio n. 5
0
 def mandatory_sections(cls):
     sects = set(BaseConfiguration.mandatory_sections())
     sects.add('Main')
     sects.add('SSL')
     sects.add('Format')
     return list(sects)
Esempio n. 6
0
 def load(self):
     """ Read additional user configuration file if it exists. """
     BaseConfiguration.load(self)
     self.config.read(self._user_config_file_path)
Esempio n. 7
0
 def load(self):
     """ Read additional user configuration file if it exists. """
     BaseConfiguration.load(self)
     self.config.read(self._user_config_file_path)
Esempio n. 8
0
 def mandatory_sections(cls):
     sects = set(BaseConfiguration.mandatory_sections())
     sects.add('Main')
     sects.add('SSL')
     sects.add('Format')
     return list(sects)