def _find_policy_file(conf):
        """Locate the policy json data file"""
        if conf.policy_file:
            return conf.policy_file

        matches = cfg.find_config_files('glance', 'policy', 'json')

        try:
            return matches[0]
        except IndexError:
            raise cfg.ConfigFilesNotFoundError(('policy.json',))
Exemple #2
0
    def _find_policy_file(conf):
        """Locate the policy json data file"""
        if conf.policy_file:
            return conf.policy_file

        matches = cfg.find_config_files('glance', 'policy', 'json')

        try:
            return matches[0]
        except IndexError:
            raise cfg.ConfigFilesNotFoundError(('policy.json', ))
Exemple #3
0
 def __init__(self, **kwargs):
     config_files = cfg.find_config_files(project='glance',
                                          prog='glance-cache')
     super(GlanceCacheConfigOpts, self).__init__(config_files, **kwargs)
Exemple #4
0
 def __init__(self, **kwargs):
     config_files = cfg.find_config_files(project='glance',
                                          prog='glance-cache')
     super(GlanceCacheConfigOpts, self).__init__(config_files, **kwargs)