'Create config for a domain.
:param domain_id: the domain in question
:param config: the dict of config groups/options to assign to the
domain
Creates a new config, overwriting any previous config (no Conflict
error will be generated).
:returns: a dict of group dicts containing the options, with any that
are sensitive removed
:raises keystone.exception.InvalidDomainConfig: when the config
contains options we do not support'

def create_config(self, domain_id, config):

    self._assert_valid_config(config)
    option_list = self._config_to_list(config)
    self.create_config_options(domain_id, option_list)
    self.get_config_with_sensitive_info.invalidate(self, domain_id)
    return self._list_to_config(self.list_config_options(domain_id))
