'Ensure the options in the config are valid.
This method is called to validate the request config in create and
update manager calls.
:param config: config structure being created or updated'

def _assert_valid_config(self, config):

    if (not config):
        raise exception.InvalidDomainConfig(reason=_('No    options    specified'))
    for group in config:
        if ((not config[group]) or (not isinstance(config[group], dict))):
            msg = (_('The    value    of    group    %(group)s    specified    in    the    config    should    be    a    dictionary    of    options') % {'group': group})
            raise exception.InvalidDomainConfig(reason=msg)
        for option in config[group]:
            self._assert_valid_group_and_option(group, option)
