Exemplo n.º 1
0
 def _write_export_file(self, name, confdict):
     """Write confdict to the export file of name."""
     for k, v in ganesha_utils.walk(confdict):
         # values in the export block template that need to be
         # filled in by Manila are pre-fixed by '@'
         if isinstance(v, six.string_types) and v[0] == '@':
             msg = _("Incomplete export block: value %(val)s of attribute "
                     "%(key)s is a stub.") % {'key': k, 'val': v}
             raise exception.InvalidParameterValue(err=msg)
     return self._write_conf_file(name, mkconf(confdict))
Exemplo n.º 2
0
 def test_walk(self):
     ret = [elem for elem in ganesha_utils.walk(walk_test_dict)]
     self.assertEqual(walk_test_list, ret)