novajoin/join.py
def _get_allowed_hostclass(self, project_name):
        """Get the allowed list of hostclass from configuration."""
        try:
            group = CONF[project_name]
        except cfg.NoSuchOptError:
            # dynamically add the group into the configuration
            group = cfg.OptGroup(project_name, 'project options')
            CONF.register_group(group)
            CONF.register_opt(cfg.ListOpt('allowed_classes'),
                              group=project_name)
        try:
            allowed_classes = CONF[project_name].allowed_classes
        except cfg.NoSuchOptError:
            LOG.error('No allowed_classes config option in [%s]', project_name)
            return []
        else:
            if allowed_classes:
                return allowed_classes
            else:
                return []
Get the allowed list of hostclass from configuration.
Get the allowed list of hostclass from configuration.
Get the allowed list of hostclass from configuration .
def _get_allowed_hostclass(self, project_name):
        try:
            group = CONF[project_name]
        except cfg.NoSuchOptError:
            group = cfg.OptGroup(project_name, 'project options')
            CONF.register_group(group)
            CONF.register_opt(cfg.ListOpt('allowed_classes'),
                              group=project_name)
        try:
            allowed_classes = CONF[project_name].allowed_classes
        except cfg.NoSuchOptError:
            LOG.error('No allowed_classes config option in [%s]', project_name)
            return []
        else:
            if allowed_classes:
                return allowed_classes
            else:
                return []
def _get_allowed_hostclass ( self , project_name ) : try : group = CONF [ project_name ] except cfg . NoSuchOptError : group = cfg . OptGroup ( project_name , 'project options' ) CONF . register_group ( group ) CONF . register_opt ( cfg . ListOpt ( 'allowed_classes' ) , group = project_name ) try : allowed_classes = CONF [ project_name ] . allowed_classes except cfg . NoSuchOptError : LOG . error ( 'No allowed_classes config option in [%s]' , project_name ) return [ ] else : if allowed_classes : return allowed_classes else : return [ ]
Get the allowed list of hostclass from configuration.
Get the allowed list of hostclass from configuration .
"""Get the allowed list of hostclass from configuration.""" # dynamically add the group into the configuration
self
project_name