def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(ManagedForkConfiguration, self).__init__(*args, **kwargs) self.log('ManagedForkConfiguration.__init__ started') # dictionary to hold information about options self.options = { 'condor_location': configfile.Option(name='condor_location', required=configfile.Option.OPTIONAL, value=utilities.get_condor_location(), mapping='OSG_CONDOR_LOCATION'), 'condor_config': configfile.Option(name='condor_config', required=configfile.Option.OPTIONAL, value=utilities.get_condor_config(), mapping='OSG_CONDOR_CONFIG'), 'enabled': configfile.Option(name='enabled', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False, mapping='OSG_MANAGEDFORK'), 'accept_limited': configfile.Option(name='accept_limited', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False) } self.section_present = False self.config_section = "Managed Fork" self.log('ManagedForkConfiguration.__init__ completed')
def parse_configuration(self, configuration): """Try to get configuration information from ConfigParser or SafeConfigParser object given by configuration and write recognized settings to attributes dict """ super(PBSConfiguration, self).parse_configuration(configuration) self.log('PBSConfiguration.parse_configuration started') self.check_config(configuration) if not configuration.has_section(self.config_section): self.log('PBS section not found in config file') self.log('PBSConfiguration.parse_configuration completed') return if not self.set_status(configuration): self.log('PBSConfiguration.parse_configuration completed') return True self.get_options(configuration, ignore_options=['enabled']) # set OSG_JOB_MANAGER and OSG_JOB_MANAGER_HOME self.options['job_manager'] = configfile.Option( name='job_manager', value='PBS', mapping='OSG_JOB_MANAGER') self.options['home'] = configfile.Option( name='job_manager_home', value=self.options['pbs_location'].value, mapping='OSG_JOB_MANAGER_HOME') self.pbs_bin_location = os.path.join( self.options['pbs_location'].value, 'bin') self.log('PBSConfiguration.parse_configuration completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(SquidConfiguration, self).__init__(*args, **kwargs) self.log('SquidConfiguration.__init__ started') self.options = { 'location': configfile.Option(name='location', default_value='None', mapping='OSG_SQUID_LOCATION'), 'policy': configfile.Option(name='policy', required=configfile.Option.OPTIONAL, mapping='OSG_SQUID_POLICY'), 'cache_size': configfile.Option(name='cache_size', required=configfile.Option.OPTIONAL, default_value=0, opt_type=int, mapping='OSG_SQUID_CACHE_SIZE'), 'memory_size': configfile.Option(name='memory_size', required=configfile.Option.OPTIONAL, default_value=0, opt_type=int, mapping='OSG_SQUID_MEM_CACHE') } self.config_section = 'Squid' self.log('SquidConfiguration.__init__ completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(LSFConfiguration, self).__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log('LSFConfiguration.__init__ started') # dictionary to hold information about options self.options = { 'lsf_location': configfile.Option(name='lsf_location', default_value='/usr', mapping='OSG_LSF_LOCATION'), 'lsf_profile': configfile.Option(name='lsf_profile', default_value=''), 'lsf_conf': configfile.Option(name='lsf_conf', required=configfile.Option.OPTIONAL, default_value='/etc'), 'log_directory': configfile.Option(name='log_directory', required=configfile.Option.OPTIONAL, default_value='') } self.config_section = 'LSF' self.lsf_bin_location = None self.log('LSFConfiguration.__init__ completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(PBSConfiguration, self).__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log('PBSConfiguration.__init__ started') # dictionary to hold information about options self.options = { 'pbs_location': configfile.Option(name='pbs_location', default_value='/usr', mapping='OSG_PBS_LOCATION'), 'accounting_log_directory': configfile.Option(name='accounting_log_directory', required=configfile.Option.OPTIONAL, default_value=''), 'pbs_server': configfile.Option(name='pbs_server', required=configfile.Option.OPTIONAL, default_value=''), 'pbs_flavor': configfile.Option(name='pbs_flavor', required=configfile.Option.OPTIONAL, default_value='torque') } self.config_section = "PBS" self.pbs_bin_location = None self.log('PBSConfiguration.__init__ completed')
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log("GratiaConfiguration.__init__ started") self.config_section = 'Gratia' self.options = {'probes': configfile.Option(name='probes', default_value=''), 'resource': configfile.Option(name='resource', default_value='', required=configfile.Option.OPTIONAL)} # Dictionary of which host[:port] to send probe data to, keyed by probe. self.enabled_probe_hosts = {} # defaults for itb and production use self._itb_defaults = {'probes': 'jobmanager:gratia-osg-itb.opensciencegrid.org:80'} self._production_defaults = {'probes': 'jobmanager:gratia-osg-prod.opensciencegrid.org:80'} self._job_managers = ['pbs', 'sge', 'lsf', 'condor', 'slurm', 'htcondor-ce'] self._probe_config = {} self.grid_group = 'OSG' self.log("GratiaConfiguration.__init__ completed")
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(GratiaConfiguration, self).__init__(*args, **kwargs) self.log("GratiaConfiguration.__init__ started") self.config_section = 'Gratia' self.options = { 'probes': configfile.Option(name='probes', default_value=''), 'resource': configfile.Option(name='resource', default_value='', required=configfile.Option.OPTIONAL) } # Dictionary holding probe settings, the probe's name is used as the key and the # server the probe should report to is the value. self.enabled_probe_settings = {} # defaults for itb and production use self._itb_defaults = { 'probes': 'jobmanager:gratia-osg-itb.opensciencegrid.org:80' } self._production_defaults = { 'probes': 'jobmanager:gratia-osg-prod.opensciencegrid.org:80' } self._job_managers = [ 'pbs', 'sge', 'lsf', 'condor', 'slurm', 'htcondor-ce' ] self._probe_config = {} self.grid_group = 'OSG' self.log("GratiaConfiguration.__init__ completed")
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(BoscoConfiguration, self).__init__(*args, **kwargs) self.log('BoscoConfiguration.__init__ started') # dictionary to hold information about options self.options = {'endpoint': configfile.Option(name='endpoint', requred=configfile.Option.MANDATORY), 'batch': configfile.Option(name='batch', requred=configfile.Option.MANDATORY), 'users': configfile.Option(name='users', requred=configfile.Option.MANDATORY), 'ssh_key': configfile.Option(name='ssh_key', requred=configfile.Option.MANDATORY), 'max_jobs': configfile.Option(name='max_jobs', requred=configfile.Option.OPTIONAL, default_value=1000)} self.config_section = "BOSCO" self.log("BoscoConfiguration.__init__ completed")
def parse_configuration(self, configuration): """Try to get configuration information from ConfigParser or SafeConfigParser object given by configuration and write recognized settings to attributes dict """ super(SGEConfiguration, self).parse_configuration(configuration) self.log('SGEConfiguration.parse_configuration started') self.check_config(configuration) if not configuration.has_section(self.config_section): self.log('SGE section not found in config file') self.log('SGEConfiguration.parse_configuration completed') return if not self.set_status(configuration): self.log('SGEConfiguration.parse_configuration completed') return True self.get_options(configuration, ignore_options=['enabled']) # fill in values for sge_location and home self.options['job_manager'] = configfile.Option( name='job_manager', value='SGE', mapping='OSG_JOB_MANAGER') self.options['home'] = configfile.Option( name='job_manager_home', value=self.options['sge_root'].value, mapping='OSG_JOB_MANAGER_HOME') self.options['osg_sge_location'] = configfile.Option( name='sge_location', value=self.options['sge_root'].value, mapping='OSG_SGE_LOCATION') self.log('SGEConfiguration.parse_configuration completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(CondorConfiguration, self).__init__(*args, **kwargs) self.log('CondorConfiguration.__init__ started') self.config_section = "Condor" self.options = { 'condor_location': configfile.Option(name='condor_location', default_value=utilities.get_condor_location(), mapping='OSG_CONDOR_LOCATION'), 'condor_config': configfile.Option(name='condor_config', required=configfile.Option.OPTIONAL, default_value=utilities.get_condor_config(), mapping='OSG_CONDOR_CONFIG'), 'job_contact': configfile.Option(name='job_contact', mapping='OSG_JOB_CONTACT'), 'util_contact': configfile.Option(name='util_contact', mapping='OSG_UTIL_CONTACT'), 'accept_limited': configfile.Option(name='accept_limited', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False) } self._set_default = True self.condor_bin_location = None self.log('CondorConfiguration.__init__ completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super().__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log('MiscConfiguration.__init__ started') self.options = { 'authorization_method': configfile.Option(name='authorization_method', default_value='vomsmap'), 'all_fqans': configfile.Option(name='all_fqans', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False), 'edit_lcmaps_db': configfile.Option(name='edit_lcmaps_db', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=True), 'copy_host_cert_for_service_certs': configfile.Option(name='copy_host_cert_for_service_certs', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False) } self.config_section = "Misc Services" self.htcondor_gateway_enabled = True self.authorization_method = None self.log('MiscConfiguration.__init__ completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(GatewayConfiguration, self).__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log('GatewayConfiguration.__init__ started') self.options = { 'gram_gateway_enabled': configfile.Option(name='gram_gateway_enabled', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False), 'htcondor_gateway_enabled': configfile.Option(name='htcondor_gateway_enabled', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=True), 'job_envvar_path': configfile.Option(name='job_envvar_path', required=configfile.Option.OPTIONAL, opt_type=str, default_value='/bin:/usr/bin:/sbin:/usr/sbin', mapping='PATH') } self.gram_gateway_enabled = False self.htcondor_gateway_enabled = True self.config_section = "Gateway" # Some bits of configuration are skipped if enabled is False (which is the default in BaseConfiguration) self.enabled = True # XXX This needs to be True for mappings to work self.log('GatewayConfiguration.__init__ completed')
def parse_configuration(self, configuration): """Try to get configuration information from ConfigParser or SafeConfigParser object given by configuration and write recognized settings to attributes dict """ super(SGEConfiguration, self).parse_configuration(configuration) self.log('SGEConfiguration.parse_configuration started') self.check_config(configuration) if not configuration.has_section(self.config_section): self.log('SGE section not found in config file') self.log('SGEConfiguration.parse_configuration completed') return if not self.set_status(configuration): self.log('SGEConfiguration.parse_configuration completed') return True self.get_options(configuration, ignore_options=['enabled']) # fill in values for sge_location and home self.options['job_manager'] = configfile.Option( name='job_manager', value='SGE', mapping='OSG_JOB_MANAGER') self.options['home'] = configfile.Option( name='job_manager_home', value=self.options['sge_root'].value, mapping='OSG_JOB_MANAGER_HOME') self.options['osg_sge_location'] = configfile.Option( name='sge_location', value=self.options['sge_root'].value, mapping='OSG_SGE_LOCATION') # if log_directory is set and log_file is not, copy log_directory over to # log_file and warn the admin if (self.options['log_directory'].value != '' and self.options['log_file'].value == ''): self.options['log_file'].value = self.options[ 'log_directory'].value self.log( "log_directory is deprecated, please use log_file instead", option='log_directory', section=self.config_section, level=logging.WARNING) # used to see if we need to enable the default fork manager, if we don't # find the managed fork service enabled, set the default manager to fork # needed since the managed fork section could be removed after managed fork # was enabled if (configuration.has_section('Managed Fork') and configuration.has_option('Managed Fork', 'enabled') and configuration.getboolean('Managed Fork', 'enabled')): self._set_default = False self.log('SGEConfiguration.parse_configuration completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(InfoServicesConfiguration, self).__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log("InfoServicesConfiguration.__init__ started") self.config_section = 'Info Services' self.options = { 'ce_collectors': configfile.Option(name='ce_collectors', default_value='', required=configfile.Option.OPTIONAL) } self._itb_default_ce_collectors = \ 'collector-itb.opensciencegrid.org:%d' % HTCONDOR_CE_COLLECTOR_PORT self._production_default_ce_collectors = \ 'collector1.opensciencegrid.org:%d,collector2.opensciencegrid.org:%d' % ( HTCONDOR_CE_COLLECTOR_PORT, HTCONDOR_CE_COLLECTOR_PORT) self.ce_collectors = [] self.ce_collector_required_rpms_installed = utilities.rpm_installed( 'htcondor-ce') self.osg_resource = "" self.osg_resource_group = "" self.enabled_batch_systems = [] self.htcondor_gateway_enabled = None self.resource_catalog = None self.authorization_method = None self.subcluster_sections = None self.gums_host = None self.misc_module = MiscConfiguration(*args, **kwargs) self.log("InfoServicesConfiguration.__init__ completed")
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(InfoServicesConfiguration, self).__init__(*args, **kwargs) self.log("InfoServicesConfiguration.__init__ started") # file location for xml file with info services subscriptions self.config_section = 'Info Services' self.options = { 'bdii_servers': configfile.Option(name='bdii_servers', default_value=''), 'ce_collectors': configfile.Option(name='ce_collectors', default_value='', required=configfile.Option.OPTIONAL) } self._itb_defaults = { 'bdii_servers': 'http://is1.grid.iu.edu:14001[RAW],http://is2.grid.iu.edu:14001[RAW]', 'ce_collectors': 'collector-itb.opensciencegrid.org:%d' % HTCONDOR_CE_COLLECTOR_PORT } self._production_defaults = { 'bdii_servers': 'http://is1.grid.iu.edu:14001[RAW],http://is2.grid.iu.edu:14001[RAW]', 'ce_collectors': 'collector1.opensciencegrid.org:%d,collector2.opensciencegrid.org:%d' % (HTCONDOR_CE_COLLECTOR_PORT, HTCONDOR_CE_COLLECTOR_PORT) } self.bdii_servers = {} self.copy_host_cert_for_service_cert = False self.ois_required_rpms_installed = utilities.gateway_installed( ) and utilities.rpm_installed('osg-info-services') # for htcondor-ce-info-services: self.ce_collectors = [] self.ce_collector_required_rpms_installed = utilities.rpm_installed( 'htcondor-ce') self.osg_resource = "" self.osg_resource_group = "" self.enabled_batch_systems = [] self.htcondor_gateway_enabled = None self.resource_catalog = None self.authorization_method = None self.subcluster_sections = None self.log("InfoServicesConfiguration.__init__ completed")
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(SGEConfiguration, self).__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log('SGEConfiguration.__init__ started') # option information self.options = { 'sge_root': configfile.Option(name='sge_root', mapping='OSG_SGE_ROOT'), 'sge_cell': configfile.Option(name='sge_cell', default_value='default', mapping='OSG_SGE_CELL'), 'sge_config': configfile.Option(name='sge_config', default_value='/etc/sysconfig/gridengine'), 'sge_bin_location': configfile.Option(name='sge_bin_location', default_value='default'), 'default_queue': configfile.Option(name='default_queue', required=configfile.Option.OPTIONAL, default_value=''), 'validate_queues': configfile.Option(name='validate_queues', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False), 'available_queues': configfile.Option(name='available_queues', required=configfile.Option.OPTIONAL, default_value='') } self.config_section = "SGE" self.log('SGEConfiguration.__init__ completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(SGEConfiguration, self).__init__(*args, **kwargs) self.log('SGEConfiguration.__init__ started') # option information self.options = { 'sge_root': configfile.Option(name='sge_root', mapping='OSG_SGE_ROOT'), 'sge_cell': configfile.Option(name='sge_CELL', mapping='OSG_SGE_CELL'), 'job_contact': configfile.Option(name='job_contact', mapping='OSG_JOB_CONTACT'), 'util_contact': configfile.Option(name='util_contact', mapping='OSG_UTIL_CONTACT'), 'seg_enabled': configfile.Option(name='seg_enabled', required=configfile.Option.OPTIONAL, type=bool, default_value=False), 'log_directory': configfile.Option(name='log_directory', required=configfile.Option.OPTIONAL, default_value=''), 'default_queue': configfile.Option(name='default_queue', required=configfile.Option.OPTIONAL, default_value=''), 'validate_queues': configfile.Option(name='validate_queues', required=configfile.Option.OPTIONAL, type=bool, default_value=False), 'available_queues': configfile.Option(name='available_queues', required=configfile.Option.OPTIONAL, default_value=''), 'accept_limited': configfile.Option(name='accept_limited', required=configfile.Option.OPTIONAL, type=bool, default_value=False) } self.__set_default = True self.config_section = "SGE" self.log('SGEConfiguration.__init__ completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(CondorConfiguration, self).__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log('CondorConfiguration.__init__ started') self.config_section = "Condor" self.options = { 'condor_location': configfile.Option(name='condor_location', default_value=utilities.get_condor_location(), mapping='OSG_CONDOR_LOCATION'), 'condor_config': configfile.Option(name='condor_config', required=configfile.Option.OPTIONAL, default_value=utilities.get_condor_config(), mapping='OSG_CONDOR_CONFIG') } self.condor_bin_location = None self.log('CondorConfiguration.__init__ completed')
def parse_configuration(self, configuration): """Try to get configuration information from ConfigParser or SafeConfigParser object given by configuration and write recognized settings to attributes dict """ super(SlurmConfiguration, self).parse_configuration(configuration) self.log('SlurmConfiguration.parse_configuration started') self.check_config(configuration) if not configuration.has_section(self.config_section): self.log('SLURM section not found in config file') self.log('SlurmConfiguration.parse_configuration completed') return if not self.set_status(configuration): self.log('SlurmConfiguration.parse_configuration completed') return True self.get_options(configuration, ignore_options=['enabled']) # set OSG_JOB_MANAGER and OSG_JOB_MANAGER_HOME self.options['job_manager'] = configfile.Option( name='job_manager', value='SLURM', mapping='OSG_JOB_MANAGER') self.options['home'] = configfile.Option( name='job_manager_home', value=self.options['slurm_location'].value, mapping='OSG_JOB_MANAGER_HOME') # used to see if we need to enable the default fork manager, if we don't # find the managed fork service enabled, set the default manager to fork # needed since the managed fork section could be removed after managed fork # was enabled if (configuration.has_section('Managed Fork') and configuration.has_option('Managed Fork', 'enabled') and configuration.getboolean('Managed Fork', 'enabled')): self._set_default = False self.slurm_bin_location = os.path.join( self.options['slurm_location'].value, 'bin') self.log('SlurmConfiguration.parse_configuration completed')
def get_condor_location(configuration): """ Get the condor location based on the information in a configParser object (configuration argument) and environment variables if possible """ location = configfile.Option( name='condor_location', default_value=utilities.get_condor_location()) configfile.get_option(configuration, 'Condor', location) return location.value
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(MiscConfiguration, self).__init__(*args, **kwargs) self.log('MiscConfiguration.__init__ started') self.options = {'glexec_location': configfile.Option(name='glexec_location', required=configfile.Option.OPTIONAL, mapping='OSG_GLEXEC_LOCATION'), 'gums_host': configfile.Option(name='gums_host', required=configfile.Option.OPTIONAL), 'authorization_method': configfile.Option(name='authorization_method', default_value='xacml'), 'edit_lcmaps_db': configfile.Option(name='edit_lcmaps_db', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=True), 'enable_cleanup': configfile.Option(name='enable_cleanup', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False), 'cleanup_age_in_days': configfile.Option(name='cleanup_age_in_days', required=configfile.Option.OPTIONAL, opt_type=int, default_value=14), 'cleanup_users_list': configfile.Option(name='cleanup_users_list', required=configfile.Option.OPTIONAL, default_value='@vo-file'), 'cleanup_cron_time': configfile.Option(name='cleanup_cron_time', required=configfile.Option.OPTIONAL, default_value='15 1 * * *'), 'copy_host_cert_for_service_certs': configfile.Option(name='copy_host_cert_for_service_certs', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False)} self.config_section = "Misc Services" self.htcondor_gateway_enabled = True self.log('MiscConfiguration.__init__ completed')
def parse_configuration(self, configuration): """ Try to get configuration information from ConfigParser or SafeConfigParser object given by configuration and write recognized settings to attributes dict """ super(CondorConfiguration, self).parse_configuration(configuration) self.log('CondorConfiguration.parse_configuration started') self.check_config(configuration) if not configuration.has_section(self.config_section): self.enabled = False self.log("%s section not in config file" % self.config_section) self.log('CondorConfiguration.parse_configuration completed') return if not self.set_status(configuration): self.log('CondorConfiguration.parse_configuration completed') return True self.get_options(configuration, ignore_options=['enabled']) # set OSG_JOB_MANAGER and OSG_JOB_MANAGER_HOME self.options['job_manager'] = configfile.Option( name='job_manager', value='Condor', mapping='OSG_JOB_MANAGER') self.options['home'] = configfile.Option( name='job_manager_home', value=self.options['condor_location'].value, mapping='OSG_JOB_MANAGER_HOME') if (configuration.has_section('Managed Fork') and configuration.has_option('Managed Fork', 'enabled') and configuration.getboolean('Managed Fork', 'enabled')): self._set_default = False self.condor_bin_location = os.path.join( self.options['condor_location'].value, 'bin') self.log('CondorConfiguration.parse_configuration completed')
def parseConfiguration(self, configuration): """Try to get configuration information from ConfigParser or SafeConfigParser object given by configuration and write recognized settings to attributes dict """ self.log('SGEConfiguration.parseConfiguration started') self.checkConfig(configuration) if not configuration.has_section(self.config_section): self.log('SGE section not found in config file') self.log('SGEConfiguration.parseConfiguration completed') return if not self.setStatus(configuration): self.log('SGEConfiguration.parseConfiguration completed') return True self.getOptions(configuration, ignore_options=['enabled']) # fill in values for sge_location and home self.options['job_manager'] = configfile.Option( name='job_manager', value='SGE', mapping='OSG_JOB_MANAGER') self.options['home'] = configfile.Option( name='job_manager_home', value=self.options['sge_root'].value, mapping='OSG_JOB_MANAGER_HOME') self.options['osg_sge_location'] = configfile.Option( name='sge_location', value=self.options['sge_root'].value, mapping='OSG_SGE_LOCATION') # used to see if we need to enable the default fork manager, if we don't # find the managed fork service enabled, set the default manager to fork # needed since the managed fork section could be removed after managed fork # was enabled if (configuration.has_section('Managed Fork') and configuration.has_option('Managed Fork', 'enabled') and configuration.getboolean('Managed Fork', 'enabled')): self.__set_default = False self.log('SGEConfiguration.parseConfiguration completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(NetworkConfiguration, self).__init__(*args, **kwargs) self.log('NetworkConfiguration.configure started') self.options = {'source_range': configfile.Option(name='source_range', default_value='', required=configfile.Option.OPTIONAL), 'source_state_file': configfile.Option(name='source_state_file', default_value='', required=configfile.Option.OPTIONAL), 'port_range': configfile.Option(name='port_range', default_value='', required=configfile.Option.OPTIONAL), 'port_state_file': configfile.Option(name='port_state_file', default_value='', required=configfile.Option.OPTIONAL)} self.config_section = 'Network' self.log('NetworkConfiguration.configure completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(SquidConfiguration, self).__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log('SquidConfiguration.__init__ started') self.options = { 'location': configfile.Option(name='location', default_value='None', mapping='OSG_SQUID_LOCATION') } self.config_section = 'Squid' self.log('SquidConfiguration.__init__ completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(InstallLocations, self).__init__(*args, **kwargs) self.log('InstallLocations.configure started') self.options = { 'globus': configfile.Option(name='globus', default_value='/usr', required=configfile.Option.OPTIONAL, mapping='GLOBUS_LOCATION'), 'user_vo_map': configfile.Option(name='user_vo_map', default_value='/var/lib/osg/user-vo-map', required=configfile.Option.OPTIONAL, mapping='OSG_USER_VO_MAP'), 'gridftp_log': configfile.Option(name='gridftp_log', default_value='/var/log/gridftp.log', required=configfile.Option.OPTIONAL, mapping='OSG_GRIDFTP_LOG') } self.config_section = 'Install Locations' self._self_configured = False self.log('InstallLocations.configure completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super().__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log('StorageConfiguration.__init__ started') self.options = { 'se_available': configfile.Option(name='se_available', opt_type=bool, default_value=False, mapping='OSG_STORAGE_ELEMENT'), 'default_se': configfile.Option(name='default_se', required=configfile.Option.OPTIONAL, mapping='OSG_DEFAULT_SE'), 'grid_dir': configfile.Option(name='grid_dir', default_value='/etc/osg/wn-client', required=configfile.Option.OPTIONAL, mapping='OSG_GRID'), 'app_dir': configfile.Option(name='app_dir', default_value='UNAVAILABLE', required=configfile.Option.OPTIONAL, mapping='OSG_APP'), 'data_dir': configfile.Option(name='data_dir', default_value='UNAVAILABLE', required=configfile.Option.OPTIONAL, mapping='OSG_DATA'), 'worker_node_temp': configfile.Option(name='worker_node_temp', required=configfile.Option.OPTIONAL, mapping='OSG_WN_TMP'), 'site_read': configfile.Option(name='site_read', required=configfile.Option.OPTIONAL, mapping='OSG_SITE_READ'), 'site_write': configfile.Option(name='site_write', required=configfile.Option.OPTIONAL, mapping='OSG_SITE_WRITE') } self.config_section = "Storage" self.log('StorageConfiguration.__init__ completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(PBSConfiguration, self).__init__(*args, **kwargs) self.log('PBSConfiguration.__init__ started') # dictionary to hold information about options self.options = {'pbs_location': configfile.Option(name='pbs_location', default_value='/usr', mapping='OSG_PBS_LOCATION'), 'job_contact': configfile.Option(name='job_contact', mapping='OSG_JOB_CONTACT'), 'util_contact': configfile.Option(name='util_contact', mapping='OSG_UTIL_CONTACT'), 'seg_enabled': configfile.Option(name='seg_enabled', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False), 'log_directory': configfile.Option(name='log_directory', required=configfile.Option.OPTIONAL, default_value=''), 'accounting_log_directory': configfile.Option(name='accounting_log_directory', required=configfile.Option.OPTIONAL, default_value=''), 'pbs_server': configfile.Option(name='pbs_server', required=configfile.Option.OPTIONAL, default_value=''), 'accept_limited': configfile.Option(name='accept_limited', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=False)} self.config_section = "PBS" self.pbs_bin_location = None self._set_default = True self.log('PBSConfiguration.__init__ completed')
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super().__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log('BoscoConfiguration.__init__ started') # dictionary to hold information about options self.options = { 'endpoint': configfile.Option(name='endpoint', requred=configfile.Option.MANDATORY), 'batch': configfile.Option(name='batch', requred=configfile.Option.MANDATORY), 'users': configfile.Option(name='users', requred=configfile.Option.MANDATORY), 'ssh_key': configfile.Option(name='ssh_key', requred=configfile.Option.MANDATORY), 'install_cluster': configfile.Option(name='install_cluster', required=configfile.Option.OPTIONAL, default_value="if_needed"), 'max_jobs': configfile.Option(name='max_jobs', requred=configfile.Option.OPTIONAL, default_value=1000), 'edit_ssh_config': configfile.Option(name='edit_ssh_config', required=configfile.Option.OPTIONAL, opt_type=bool, default_value=True), 'override_dir': configfile.Option(name='override_dir', required=configfile.Option.OPTIONAL, default_value='') } self.config_section = "BOSCO" self.log("BoscoConfiguration.__init__ completed")
def __init__(self, *args, **kwargs): # pylint: disable-msg=W0142 super(SlurmConfiguration, self).__init__(*args, **kwargs) self.logger = logging.getLogger(__name__) self.log('SlurmConfiguration.__init__ started') # dictionary to hold information about options self.options = { 'slurm_location': configfile.Option(name='slurm_location', default_value='/usr', mapping='OSG_PBS_LOCATION'), 'db_host': configfile.Option(name='db_host', required=configfile.Option.OPTIONAL, default_value=''), 'db_port': configfile.Option(name='db_port', required=configfile.Option.OPTIONAL, opt_type=int, default_value=3306), 'db_user': configfile.Option(name='db_user', required=configfile.Option.OPTIONAL, default_value='slurm'), 'db_name': configfile.Option(name='db_name', required=configfile.Option.OPTIONAL, default_value='slurm_acct_db'), 'db_pass': configfile.Option(name='db_pass', required=configfile.Option.OPTIONAL, default_value=''), 'slurm_cluster': configfile.Option(name='slurm_cluster', required=configfile.Option.OPTIONAL, default_value='') } self.config_section = "SLURM" self.slurm_bin_location = None self.log('SlurmConfiguration.__init__ completed')