コード例 #1
0
ファイル: file.py プロジェクト: bopopescu/nova-35
 def _verify_config(self):
     for fs_key in self.filesystems:
         for r in self.desc_required_keys:
             fs_ent = self.filesystems[fs_key]
             if fs_ent[r] is None:
                 msg = _('The key %s is required in all file system '
                         'descriptions.')
                 LOG.error(msg)
                 raise exception.ImageDownloadModuleConfigurationError(
                     module=str(self), reason=msg)
コード例 #2
0
ファイル: file.py プロジェクト: bopopescu/nova-35
 def _get_options(self):
     fs_dict = {}
     for fs in CONF.image_file_url.filesystems:
         group_name = 'image_file_url:' + fs
         conf_group = CONF[group_name]
         if conf_group.id is None:
             msg = _('The group %s(group_name) must be configured with '
                     'an id.')
             raise exception.ImageDownloadModuleConfigurationError(
                 module=str(self), reason=msg)
         fs_dict[CONF[group_name].id] = CONF[group_name]
     return fs_dict