def make_config(self, text): """ Create a temporary file instance and returns a Configuration with it. """ self._testfile = makeTempFile(text) conf = Configuration.create_from_model(self._testfile.name) return conf
def test_accessors(self): """Configuration get_* accessors.""" self._conf = Configuration.create_from_model( "../conf/models/example.lmf") self.assertEqual(self._conf.get_stripecount(), 1) self.assertEqual(self._conf.get_stripesize(), 1048576) self.assertTrue(self._conf.get_cfg_filename())
def create_lustrefs(fs_model_file, event_handler=None, nodes=None, excluded=None, update_mode=False): """Create a FileSystem instance from configuration file and save in on disk.""" fs_conf = Configuration.create_from_model(fs_model_file, update_mode) fs = instantiate_lustrefs(fs_conf, event_handler=event_handler, \ nodes=nodes, excluded=excluded) return fs_conf, fs
def make_temp_fs(self, txt): self._fsfile = makeTempFile(txt) self._conf = Configuration.create_from_model(self._fsfile.name) self._model = self._conf._fs.model
def test_accessors(self): """Configuration get_* accessors.""" self._conf = Configuration.create_from_model("../conf/models/example.lmf") self.assertEqual(self._conf.get_stripecount(), 1) self.assertEqual(self._conf.get_stripesize(), 1048576) self.assertTrue(self._conf.get_cfg_filename())