def get_tuning(cls, fs_conf): """ Tune class method: get TuningModel for a fs configuration. """ # XXX: If no tuning.conf is defined in configuration # we still create a tuning model which will be used for quota. # Be carefull that this could be very confusing for users, who # can think tuning will be applied but is not. tuning = TuningModel() # Is the tuning configuration file name specified? if Globals().get_tuning_file(): # Load the tuning configuration file tuning.parse(filename=Globals().get_tuning_file()) # Add the quota tuning parameters to the tuning model. if Globals().lustre_version_is_smaller('2.4'): cls._add_quota_tuning(tuning, fs_conf) return tuning
def get_tuning(cls, fs_conf, comps): """ Tune class method: get TuningModel for a fs configuration. """ # XXX: If no tuning.conf is defined in configuration # we still create a tuning model which will be used for quota. # Be carefull that this could be very confusing for users, who # can think tuning will be applied but is not. tuning = TuningModel() # Is the tuning configuration file name specified? if Globals().get_tuning_file(): # Load the tuning configuration file tuning.parse(filename=Globals().get_tuning_file()) # Add the quota tuning parameters to the tuning model. if Globals().lustre_version_is_smaller('2.4'): cls._add_quota_tuning(tuning, fs_conf) cls._add_active_tuning(tuning, comps) return tuning
def testExampleFile(self): """test example tuning""" m = TuningModel(filename="../conf/tuning.conf.example") m.parse()
def testExampleFile(self): """test example tuning""" m = TuningModel(filename="../conf/tuning.conf.example") m.parse()