def parse_config(file_name='smarterling.config'):
    """ Parses a smarterling configuration file
    """
    if not os.path.exists(file_name) or not os.path.isfile(file_name):
        raise SmarterlingError('Config file not found: %s' % file_name)
    try:
        contents = read_from_file(file_name)
        contents_with_environment_variables_expanded = os.path.expandvars(contents)
        return AttributeDict(yaml.load(contents_with_environment_variables_expanded))
    except Exception as e:
        raise SmarterlingError("Error paring config file: %s" % str(e))
Parses a smarterling configuration file