'Get config, or partial config, for a domain.
:param domain_id: the domain in question
:param group: an optional specific group of options
:param option: an optional specific option within the group
:returns: a dict of group dicts containing the whitelisted options,
filtered by group and option specified
:raises keystone.exception.DomainConfigNotFound: when no config found
that matches domain_id, group and option specified
:raises keystone.exception.InvalidDomainConfig: when the config
and group/option parameters specify an option we do not
support
An example response::
\'ldap\': {
\'url\': \'myurl\'
\'user_tree_dn\': \'OU=myou\'},
\'identity\': {
\'driver\': \'ldap\'}'

def get_config(self, domain_id, group=None, option=None):

    self._assert_valid_group_and_option(group, option)
    whitelisted = self.list_config_options(domain_id, group, option)
    if whitelisted:
        return self._list_to_config(whitelisted, req_option=option)
    if option:
        msg = (_('option    %(option)s    in    group    %(group)s') % {'group': group, 'option': option})
    elif group:
        msg = (_('group    %(group)s') % {'group': group})
    else:
        msg = _('any    options')
    raise exception.DomainConfigNotFound(domain_id=domain_id, group_or_option=msg)
