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',))
Example #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', ))
Example #3
0
 def __init__(self, **kwargs):
     config_files = cfg.find_config_files(project='glance',
                                          prog='glance-cache')
     super(GlanceCacheConfigOpts, self).__init__(config_files, **kwargs)
Example #4
0
 def __init__(self, **kwargs):
     config_files = cfg.find_config_files(project='glance',
                                          prog='glance-cache')
     super(GlanceCacheConfigOpts, self).__init__(config_files, **kwargs)