# Path: zoe_lib/configargparse.py
# ACTION_TYPES_THAT_DONT_NEED_A_VALUE = {argparse._StoreTrueAction, argparse._StoreFalseAction, argparse._CountAction, argparse._StoreConstAction, argparse._AppendConstAction}
# _COMMAND_LINE_SOURCE_KEY = "command_line"
# _ENV_VAR_SOURCE_KEY = "environment_variables"
# _CONFIG_FILE_SOURCE_KEY = "config_file"
# _DEFAULTS_SOURCE_KEY = "defaults"
# ONE_OR_MORE = argparse.ONE_OR_MORE
# OPTIONAL = argparse.OPTIONAL
# REMAINDER = argparse.REMAINDER
# SUPPRESS = argparse.SUPPRESS
# ZERO_OR_MORE = argparse.ZERO_OR_MORE
# def init_argument_parser(name=None, **kwargs):
# def get_argument_parser(name=None, **kwargs):
#     def get_syntax_description(self):
#     def parse(self, stream):
#     def serialize(self, items):
#     def get_syntax_description(cls):
#     def parse(cls, stream):
#     def serialize(cls, items):
#     def __init__(self,
#                  prog=None,
#                  usage=None,
#                  description=None,
#                  epilog=None,
#                  version=None,
#                  parents=[],
#                  formatter_class=argparse.HelpFormatter,
#                  prefix_chars='-',
#                  fromfile_prefix_chars=None,
#                  argument_default=None,
#                  conflict_handler='error',
#                  add_help=True,
# 
#                  add_config_file_help=True,
#                  add_env_var_help=True,
# 
#                  auto_env_var_prefix=None,
# 
#                  default_config_files=[],
#                  ignore_unknown_config_file_keys=False,
#                  config_file_parser_class=DefaultConfigFileParser,
# 
#                  args_for_setting_config_path=[],
#                  config_arg_is_required=False,
#                  config_arg_help_message="config file path",
# 
#                  args_for_writing_out_config_file=[],
#                  write_out_config_file_arg_help_message="takes the current command line "
#                                                         "args and writes them out to a config file at the given path, then "
#                                                         "exits",
#                  allow_abbrev=True,  # new in python 3.5
#                  ):
#     def parse_args(self, args=None, namespace=None,
#                    config_file_contents=None, env_vars=os.environ):
#     def parse_known_args(self, args=None, namespace=None,
#                          config_file_contents=None, env_vars=os.environ):
#     def get_command_line_key_for_unknown_config_file_setting(self, key):
#     def get_items_for_config_file_output(self, source_to_settings,
#                                          parsed_namespace):
#     def convert_item_to_command_line_arg(self, action, key, value):
#     def get_possible_config_keys(self, action):
#     def _open_config_files(self, command_line_args):
#             def error_method(self, message):
#     def format_values(self):
#     def print_values(self, file=sys.stdout):
#     def format_help(self):
# def add_argument(self, *args, **kwargs):
# def already_on_command_line(existing_args_list, potential_command_line_args):
# class ArgumentDefaultsRawHelpFormatter(
#     argparse.ArgumentDefaultsHelpFormatter,
#     argparse.RawTextHelpFormatter,
#     argparse.RawDescriptionHelpFormatter):
# class ConfigFileParser(object):
# class ConfigFileParserException(Exception):
# class DefaultConfigFileParser(ConfigFileParser):
# class ArgumentParser(argparse.ArgumentParser):


import logging
from zoe_lib.configargparse import ArgumentParser, Namespace
# See the License for the specific language governing permissions and
# limitations under the License.

"""Configuration parsing."""



logging.getLogger('requests').setLevel(logging.WARNING)
logging.getLogger('urllib3').setLevel(logging.WARNING)
logging.getLogger('docker').setLevel(logging.INFO)

log = logging.getLogger(__name__)

_CONFIG_PATHS = [
    'zoe.conf',
    '/etc/zoe/zoe.conf'
]

_CONF = None


def get_conf() -> Namespace:
    """Returns the conf singleton."""
    return _CONF


def load_configuration(test_conf=None):
    """Parses command line arguments."""
    global _CONF
    if test_conf is None:

# Path: zoe_lib/configargparse.py
# ACTION_TYPES_THAT_DONT_NEED_A_VALUE = {argparse._StoreTrueAction, argparse._StoreFalseAction, argparse._CountAction, argparse._StoreConstAction, argparse._AppendConstAction}
# _COMMAND_LINE_SOURCE_KEY = "command_line"
# _ENV_VAR_SOURCE_KEY = "environment_variables"
# _CONFIG_FILE_SOURCE_KEY = "config_file"
# _DEFAULTS_SOURCE_KEY = "defaults"
# ONE_OR_MORE = argparse.ONE_OR_MORE
# OPTIONAL = argparse.OPTIONAL
# REMAINDER = argparse.REMAINDER
# SUPPRESS = argparse.SUPPRESS
# ZERO_OR_MORE = argparse.ZERO_OR_MORE
# def init_argument_parser(name=None, **kwargs):
# def get_argument_parser(name=None, **kwargs):
#     def get_syntax_description(self):
#     def parse(self, stream):
#     def serialize(self, items):
#     def get_syntax_description(cls):
#     def parse(cls, stream):
#     def serialize(cls, items):
#     def __init__(self,
#                  prog=None,
#                  usage=None,
#                  description=None,
#                  epilog=None,
#                  version=None,
#                  parents=[],
#                  formatter_class=argparse.HelpFormatter,
#                  prefix_chars='-',
#                  fromfile_prefix_chars=None,
#                  argument_default=None,
#                  conflict_handler='error',
#                  add_help=True,
# 
#                  add_config_file_help=True,
#                  add_env_var_help=True,
# 
#                  auto_env_var_prefix=None,
# 
#                  default_config_files=[],
#                  ignore_unknown_config_file_keys=False,
#                  config_file_parser_class=DefaultConfigFileParser,
# 
#                  args_for_setting_config_path=[],
#                  config_arg_is_required=False,
#                  config_arg_help_message="config file path",
# 
#                  args_for_writing_out_config_file=[],
#                  write_out_config_file_arg_help_message="takes the current command line "
#                                                         "args and writes them out to a config file at the given path, then "
#                                                         "exits",
#                  allow_abbrev=True,  # new in python 3.5
#                  ):
#     def parse_args(self, args=None, namespace=None,
#                    config_file_contents=None, env_vars=os.environ):
#     def parse_known_args(self, args=None, namespace=None,
#                          config_file_contents=None, env_vars=os.environ):
#     def get_command_line_key_for_unknown_config_file_setting(self, key):
#     def get_items_for_config_file_output(self, source_to_settings,
#                                          parsed_namespace):
#     def convert_item_to_command_line_arg(self, action, key, value):
#     def get_possible_config_keys(self, action):
#     def _open_config_files(self, command_line_args):
#             def error_method(self, message):
#     def format_values(self):
#     def print_values(self, file=sys.stdout):
#     def format_help(self):
# def add_argument(self, *args, **kwargs):
# def already_on_command_line(existing_args_list, potential_command_line_args):
# class ArgumentDefaultsRawHelpFormatter(
#     argparse.ArgumentDefaultsHelpFormatter,
#     argparse.RawTextHelpFormatter,
#     argparse.RawDescriptionHelpFormatter):
# class ConfigFileParser(object):
# class ConfigFileParserException(Exception):
# class DefaultConfigFileParser(ConfigFileParser):
# class ArgumentParser(argparse.ArgumentParser):


# Path: zoe_lib/config.py
import logging
from zoe_lib.configargparse import ArgumentParser, Namespace

# See the License for the specific language governing permissions and
# limitations under the License.

"""Configuration parsing."""



logging.getLogger('requests').setLevel(logging.WARNING)
logging.getLogger('urllib3').setLevel(logging.WARNING)
logging.getLogger('docker').setLevel(logging.INFO)

log = logging.getLogger(__name__)

_CONFIG_PATHS = [
    'zoe.conf',
    '/etc/zoe/zoe.conf'
]

_CONF = None


def get_conf() -> Namespace:
    """Returns the conf singleton."""
    return _CONF


def load_configuration(test_conf=None):
    """Parses command line arguments."""
    global _CONF
    if test_conf is None:

        argparser = ArgumentParser(description="Zoe - Container Analytics as a Service",