@@ -331,7 +331,7 @@ def is_scheduler_logging_enabled():
331331 >>> print(slurmctld.is_scheduler_logging_enabled())
332332 False
333333 """
334- return Config.load().scheduler_logging
334+ return Config.load().scheduler_logging_enabled
335335
336336
337337def set_fair_share_dampening_factor (factor ):
@@ -577,10 +577,6 @@ cdef class Config:
577577 out[" mpi_config" ] = self .mpi_config.to_dict()
578578 return out
579579
580- @property
581- def accounting_storage_tres (self ):
582- return cstr.to_list(self .ptr.accounting_storage_tres)
583-
584580 @property
585581 def accounting_storage_enforce (self ):
586582 cdef char tmp[128 ]
@@ -608,14 +604,14 @@ cdef class Config:
608604 def accounting_storage_parameters (self ):
609605 return cstr.to_dict(self .ptr.accounting_storage_params)
610606
611- @property
612- def accounting_storage_password (self ):
613- return cstr.to_unicode(self .ptr.accounting_storage_pass)
614-
615607 @property
616608 def accounting_storage_port (self ):
617609 return u16_parse(self .ptr.accounting_storage_port)
618610
611+ @property
612+ def accounting_storage_tres (self ):
613+ return cstr.to_list(self .ptr.accounting_storage_tres)
614+
619615 @property
620616 def accounting_storage_type (self ):
621617 return cstr.to_unicode(self .ptr.accounting_storage_type)
@@ -664,9 +660,9 @@ cdef class Config:
664660 return cstr.to_list(self .ptr.authinfo)
665661
666662 @property
667- def auth_alt_params (self ):
668- # TODO: maybe dict?
669- return cstr.to_list( self .ptr.authalt_params )
663+ def auth_alt_parameters (self ):
664+ return cstr.to_dict( self .ptr.authalt_params, delim1 = " , " ,
665+ delim2 = " = " , def_value = True )
670666
671667 @property
672668 def auth_type (self ):
@@ -683,14 +679,15 @@ cdef class Config:
683679
684680 @property
685681 def bcast_parameters (self ):
686- return cstr.to_list(self .ptr.bcast_parameters)
682+ return cstr.to_dict(self .ptr.authalt_params, delim1 = " ," ,
683+ delim2 = " =" , def_value = True )
687684
688685 @property
689686 def burst_buffer_type (self ):
690687 return cstr.to_unicode(self .ptr.bb_type)
691688
692689 @property
693- def boot_time (self ):
690+ def slurmctld_boot_time (self ):
694691 return _raw_time(self .ptr.boot_time)
695692
696693 @property
@@ -711,21 +708,17 @@ cdef class Config:
711708
712709 @property
713710 def communication_parameters (self ):
714- return cstr.to_list(self .ptr.comm_params)
711+ # TODO: check again
712+ return cstr.to_dict(self .ptr.comm_params, delim1 = " ," ,
713+ delim2 = " =" , def_value = True )
715714
716715 @property
717716 def complete_wait_time (self ):
718717 # seconds
719718 return u16_parse(self .ptr.complete_wait)
720719
721720 @property
722- def disable_root_jobs (self ):
723- if self .ptr.conf_flags & slurm.CONF_FLAG_DRJ:
724- return True
725- return False
726-
727- @property
728- def default_cpu_frequency (self ):
721+ def default_cpu_frequency_governor (self ):
729722 return cpu_freq_int_to_str(self .ptr.cpu_freq_def)
730723
731724 @property
@@ -752,10 +745,20 @@ cdef class Config:
752745 def default_memory_per_node (self ):
753746 return _get_memory(self .ptr.def_mem_per_cpu, per_cpu = False )
754747
748+ # TODO: DefCpuPerGPU
749+ # TODO: DefMemPerGPU
750+
755751 @property
756752 def dependency_parameters (self ):
753+ # TODO: check format again
757754 return cstr.to_list(self .ptr.dependency_params)
758755
756+ @property
757+ def disable_root_jobs (self ):
758+ if self .ptr.conf_flags & slurm.CONF_FLAG_DRJ:
759+ return True
760+ return False
761+
759762 @property
760763 def eio_timeout (self ):
761764 # seconds
@@ -780,6 +783,10 @@ cdef class Config:
780783 return cstr.to_list_with_count(self .ptr.epilog_slurmctld,
781784 self .ptr.epilog_slurmctld_cnt)
782785
786+ @property
787+ def fair_share_dampening_factor (self ):
788+ return u16_parse(self .ptr.fs_dampening_factor)
789+
783790 @property
784791 def federation_parameters (self ):
785792 return cstr.to_list(self .ptr.fed_params)
@@ -788,12 +795,6 @@ cdef class Config:
788795 def first_job_id (self ):
789796 return u32_parse(self .ptr.first_job_id)
790797
791- @property
792- def fair_share_dampening_factor (self ):
793- return u16_parse(self .ptr.fs_dampening_factor)
794-
795- # getnameinfo_cache_timeout
796-
797798 @property
798799 def get_environment_timeout (self ):
799800 return u16_parse(self .ptr.get_env_timeout)
@@ -802,14 +803,14 @@ cdef class Config:
802803 def gres_types (self ):
803804 return cstr.to_list(self .ptr.gres_plugins)
804805
805- @property
806- def group_update_time (self ):
807- return u16_parse(self .ptr.group_time)
808-
809806 @property
810807 def group_update_force (self ):
811808 return u16_parse_bool(self .ptr.group_force)
812809
810+ @property
811+ def group_update_time (self ):
812+ return u16_parse(self .ptr.group_time)
813+
813814 @property
814815 def default_gpu_frequency (self ):
815816 return cstr.to_unicode(self .ptr.gpu_freq_def)
@@ -847,14 +848,14 @@ cdef class Config:
847848 def interactive_step_options (self ):
848849 return cstr.to_unicode(self .ptr.interactive_step_opts)
849850
850- @property
851- def job_accounting_gather_frequency (self ):
852- return cstr.to_dict(self .ptr.job_acct_gather_freq)
853-
854851 @property
855852 def job_accounting_gather_type (self ):
856853 return cstr.to_unicode(self .ptr.job_acct_gather_type)
857854
855+ @property
856+ def job_accounting_gather_frequency (self ):
857+ return cstr.to_dict(self .ptr.job_acct_gather_freq)
858+
858859 @property
859860 def job_accounting_gather_parameters (self ):
860861 return cstr.to_list(self .ptr.job_acct_gather_params)
@@ -869,6 +870,7 @@ cdef class Config:
869870
870871 @property
871872 def job_completion_parameters (self ):
873+ # TODO: maybe dict?
872874 return cstr.to_list(self .ptr.job_comp_params)
873875
874876 @property
@@ -906,16 +908,12 @@ cdef class Config:
906908 def job_submit_plugins (self ):
907909 return cstr.to_list(self .ptr.job_submit_plugins)
908910
909- @property
910- def keepalive_interval (self ):
911- return u32_parse(self .ptr.keepalive_interval)
912-
913911 @property
914912 def kill_on_bad_exit (self ):
915913 return u16_parse_bool(self .ptr.kill_on_bad_exit)
916914
917915 @property
918- def kill_wait (self ):
916+ def kill_wait_time (self ):
919917 # seconds
920918 return u16_parse(self .ptr.kill_wait)
921919
@@ -998,6 +996,7 @@ cdef class Config:
998996
999997 @property
1000998 def mpi_parameters (self ):
999+ # TODO: check format again
10011000 return cstr.to_list(self .ptr.mpi_params)
10021001
10031002 @property
@@ -1036,6 +1035,7 @@ cdef class Config:
10361035
10371036 @property
10381037 def preempt_parameters (self ):
1038+ # TODO: check format again
10391039 return cstr.to_list(self .ptr.preempt_params)
10401040
10411041 @property
@@ -1057,7 +1057,7 @@ cdef class Config:
10571057
10581058 @property
10591059 def priority_calc_period (self ):
1060- # seconds
1060+ # TODO: seconds or minutes?
10611061 return u32_parse(self .ptr.priority_calc_period)
10621062
10631063 @property
@@ -1070,7 +1070,7 @@ cdef class Config:
10701070
10711071 @property
10721072 def priortiy_max_age (self ):
1073- # seconds?
1073+ # TODO: seconds or minutes ?
10741074 return u32_parse(self .ptr.priority_max_age)
10751075
10761076 @property
@@ -1087,27 +1087,27 @@ cdef class Config:
10871087
10881088 @property
10891089 def priority_weight_age (self ):
1090- return u32_parse(self .ptr.priority_weight_age)
1090+ return u32_parse(self .ptr.priority_weight_age, zero_is_noval = False )
10911091
10921092 @property
10931093 def priority_weight_assoc (self ):
1094- return u32_parse(self .ptr.priority_weight_assoc)
1094+ return u32_parse(self .ptr.priority_weight_assoc, zero_is_noval = False )
10951095
10961096 @property
10971097 def priority_weight_fair_share (self ):
1098- return u32_parse(self .ptr.priority_weight_fs)
1098+ return u32_parse(self .ptr.priority_weight_fs, zero_is_noval = False )
10991099
11001100 @property
11011101 def priority_weight_job_size (self ):
1102- return u32_parse(self .ptr.priority_weight_js)
1102+ return u32_parse(self .ptr.priority_weight_js, zero_is_noval = False )
11031103
11041104 @property
11051105 def priority_weight_partition (self ):
1106- return u32_parse(self .ptr.priority_weight_part)
1106+ return u32_parse(self .ptr.priority_weight_part, zero_is_noval = False )
11071107
11081108 @property
11091109 def priority_weight_qos (self ):
1110- return u32_parse(self .ptr.priority_weight_qos)
1110+ return u32_parse(self .ptr.priority_weight_qos, zero_is_noval = False )
11111111
11121112 @property
11131113 def priority_weight_tres (self ):
@@ -1178,12 +1178,10 @@ cdef class Config:
11781178
11791179 @property
11801180 def resume_rate (self ):
1181- # minutes?
11821181 return u16_parse(self .ptr.resume_rate)
11831182
11841183 @property
11851184 def resume_timeout (self ):
1186- # seconds
11871185 return u16_parse(self .ptr.resume_timeout)
11881186
11891187 @property
@@ -1192,8 +1190,7 @@ cdef class Config:
11921190
11931191 @property
11941192 def reservation_over_run (self ):
1195- # minutes
1196- return u16_parse(self .ptr.resv_over_run)
1193+ return u16_parse(self .ptr.resv_over_run, zero_is_noval = False )
11971194
11981195 @property
11991196 def reservation_prolog (self ):
@@ -1208,11 +1205,13 @@ cdef class Config:
12081205 return cstr.to_unicode(self .ptr.sched_logfile)
12091206
12101207 @property
1211- def scheduler_logging (self ):
1208+ def scheduler_logging_enabled (self ):
1209+ # TODO: check again
12121210 return u16_parse_bool(self .ptr.sched_log_level)
12131211
12141212 @property
12151213 def scheduler_parameters (self ):
1214+ # TODO: check format again
12161215 return cstr.to_list(self .ptr.sched_params)
12171216
12181217 @property
@@ -1265,8 +1264,6 @@ cdef class Config:
12651264 def slurmd_user_name (self ):
12661265 return cstr.to_unicode(self .ptr.slurmd_user_name)
12671266
1268- # TODO: char *slurmctld_addr
1269-
12701267 @property
12711268 def slurmctld_log_level (self ):
12721269 return _log_level_int_to_str(self .ptr.slurmctld_debug)
@@ -1309,6 +1306,7 @@ cdef class Config:
13091306
13101307 @property
13111308 def slurmctld_parameters (self ):
1309+ # TODO: check format again
13121310 return cstr.to_list(self .ptr.slurmctld_params)
13131311
13141312 @property
@@ -1321,6 +1319,7 @@ cdef class Config:
13211319
13221320 @property
13231321 def slurmd_parameters (self ):
1322+ # TODO: Check again
13241323 return cstr.to_list(self .ptr.slurmd_params)
13251324
13261325 @property
@@ -1336,7 +1335,7 @@ cdef class Config:
13361335 return cstr.to_unicode(self .ptr.slurmd_spooldir)
13371336
13381337 @property
1339- def slurmd_syslog_debug_level (self ):
1338+ def slurmd_syslog_level (self ):
13401339 return _log_level_int_to_str(self .ptr.slurmd_syslog_debug)
13411340
13421341 @property
@@ -1398,6 +1397,7 @@ cdef class Config:
13981397
13991398 @property
14001399 def switch_parameters (self ):
1400+ # TODO: Check format again
14011401 return cstr.to_list(self .ptr.switch_param)
14021402
14031403 @property
@@ -1440,6 +1440,7 @@ cdef class Config:
14401440
14411441 @property
14421442 def topology_parameters (self ):
1443+ # TODO: check format again
14431444 return cstr.to_list(self .ptr.topology_param)
14441445
14451446 @property
@@ -1480,11 +1481,12 @@ cdef class Config:
14801481
14811482 @property
14821483 def default_job_wait_time (self ):
1484+ # TODO: reconsider name
14831485 return u16_parse(self .ptr.wait_time)
14841486
14851487 @property
14861488 def x11_parameters (self ):
1487- return cstr.to_unicode (self .ptr.x11_params)
1489+ return cstr.to_list (self .ptr.x11_params)
14881490
14891491
14901492def _str_to_bool (val , true_str , false_str ):
0 commit comments