Beispiel #1
0
 def secondary_collectors(self):
   option = "number_of_secondary_collectors"
   if not self.has_option(self.ini_section,option):
     return int(0)
   value = self.option_value(self.ini_section,option)
   if common.not_an_integer(value):
     common.logerr("%s option is not a number: %s" % (option,value))
   return int(value)
Beispiel #2
0
 def collector_port(self):
   option = "collector_port"
   if not self.has_option(self.ini_section,option):
     return int(9618)
   value = self.option_value(self.ini_section,option)
   if common.not_an_integer(value):
     common.logerr("%s option is not a number: %s" % (option,value))
   return int(value)
Beispiel #3
0
 def number_of_schedds(self):
   option = "number_of_schedds"
   if self.daemon_list.find("SCHEDD") > 0:
     if not self.has_option(self.ini_section,option):
       return int(1)
   value =  self.option_value(self.ini_section,option)
   if common.not_an_integer(value):
     common.logerr("%s option is not a number: %s" % (option,value))
   return int(value)
Beispiel #4
0
 def schedd_shared_port(self):
   """ Returns the shared port number if specified, else zero."""
   option = "schedd_shared_port"
   if not self.has_option(self.ini_section,option):
     return int(0)
   value =  self.option_value(self.ini_section,option)
   if len(value) == 0:
     return int(0)
   if common.not_an_integer(value):
     common.logerr("%s option is not a number: %s" % (option,value))
   return int(value)