Exemplo n.º 1
0
    def __init__(self):
        threading.Thread.__init__(self)

        if hasattr(panda_config, 'AGIS_URL_SITES'):
            self.AGIS_URL_SITES = panda_config.AGIS_URL_SITES
        else:
            self.AGIS_URL_SITES = 'http://atlas-agis-api.cern.ch/request/site/query/?json&vo_name=atlas&state=ACTIVE'
        _logger.debug('Getting site dump...')
        self.site_dump = aux.get_dump(self.AGIS_URL_SITES)
        _logger.debug('Done')
        self.site_endpoint_dict = self.get_site_endpoint_dictionary()

        if hasattr(panda_config, 'AGIS_URL_DDMENDPOINTS'):
            self.AGIS_URL_DDMENDPOINTS = panda_config.AGIS_URL_DDMENDPOINTS
        else:
            self.AGIS_URL_DDMENDPOINTS = 'http://atlas-agis-api.cern.ch/request/ddmendpoint/query/list/?json&state=ACTIVE'
        _logger.debug('Getting DDM endpoints dump...')
        self.endpoint_dump = aux.get_dump(self.AGIS_URL_DDMENDPOINTS)
        _logger.debug('Done')
        _logger.debug('Parsing endpoints...')
        self.endpoint_token_dict = self.parse_endpoints()
        _logger.debug('Done')

        if hasattr(panda_config, 'AGIS_URL_SCHEDCONFIG'):
            self.AGIS_URL_SCHEDCONFIG = panda_config.AGIS_URL_SCHEDCONFIG
        else:
            self.AGIS_URL_SCHEDCONFIG = 'http://atlas-agis-api.cern.ch/request/pandaqueue/query/list/?json&preset=schedconf.all&vo_name=atlas&state=ACTIVE'
        _logger.debug('Getting schedconfig dump...')
        self.schedconfig_dump = aux.get_dump(self.AGIS_URL_SCHEDCONFIG)
        _logger.debug('Done')

        if hasattr(panda_config, 'AGIS_URL_DDMBLACKLIST'):
            self.AGIS_URL_DDMBLACKLIST = panda_config.AGIS_URL_DDMBLACKLIST
        else:
            self.AGIS_URL_DDMBLACKLIST = 'http://atlas-agis-api.cern.ch/request/ddmendpointstatus/query/list/?json&fstate=OFF&activity=w'
        _logger.debug('Getting schedconfig dump...')
        self.blacklisted_endpoints = list(aux.get_dump(self.AGIS_URL_DDMBLACKLIST))
        _logger.debug('Blacklisted endpoints {0}'.format(self.blacklisted_endpoints))
        _logger.debug('Done')
        
        if hasattr(panda_config, 'RUCIO_RSE_USAGE'):
            self.RUCIO_RSE_USAGE = panda_config.RUCIO_RSE_USAGE
        else:
            self.RUCIO_RSE_USAGE = 'https://rucio-hadoop.cern.ch/dumps/rse_usage/current.json'
        _logger.debug('Getting Rucio RSE usage dump...')
        self.rse_usage = aux.get_dump(self.RUCIO_RSE_USAGE)
        _logger.debug('Done')
Exemplo n.º 2
0
    def __init__(self):
        threading.Thread.__init__(self)

        taskBuffer.init(panda_config.dbhost, panda_config.dbpasswd, nDBConnection=1)

        if hasattr(panda_config, 'NWS_URL'):
            self.NWS_URL = panda_config.NWS_URL
        else:
            self.NWS_URL = 'http://atlas-adc-netmetrics-lb.cern.ch/metrics/latest.json'
        _logger.debug('Getting NWS dump...')
        self.nws_dump = aux.get_dump(self.NWS_URL)
        _logger.debug('Done')

        if hasattr(panda_config, 'AGIS_URL_CM'):
            self.AGIS_URL_CM = panda_config.AGIS_URL_CM
        else:
            self.AGIS_URL_CM = 'http://atlas-agis-api.cern.ch/request/site/query/list_links/?json'
        _logger.debug('Getting AGIS cost matrix dump...')
        self.agis_cm_dump = aux.get_dump(self.AGIS_URL_CM)
        _logger.debug('Done')
Exemplo n.º 3
0
    def __init__(self, taskBuffer, session):
        threading.Thread.__init__(self)

        # taskBuffer.init(panda_config.dbhost, panda_config.dbpasswd, nDBConnection=1)
        self.taskBuffer = taskBuffer
        self.session = session

        if hasattr(panda_config, 'NWS_URL'):
            self.NWS_URL = panda_config.NWS_URL
        else:
            self.NWS_URL = 'http://atlas-adc-netmetrics-lb.cern.ch/metrics/latest.json'
        _logger.debug('Getting NWS dump...')
        self.nws_dump = aux.get_dump(self.NWS_URL)
        _logger.debug('Done')

        if hasattr(panda_config, 'CRIC_URL_CM'):
            self.CRIC_URL_CM = panda_config.CRIC_URL_CM
        else:
            self.CRIC_URL_CM = 'https://atlas-cric.cern.ch/api/core/sitematrix/query/?json&json_pretty=0'
        _logger.debug('Getting CRIC cost matrix dump...')
        self.CRIC_cm_dump = aux.get_dump(self.CRIC_URL_CM)
        _logger.debug('Done')
Exemplo n.º 4
0
    def __init__(self):
        """
        Initialization and configuration
        """
        threading.Thread.__init__(self)
        taskBuffer.init(panda_config.dbhost, panda_config.dbpasswd, nDBConnection=1)

        if hasattr(panda_config, 'AGIS_URL_SCHEDCONFIG'):
            self.AGIS_URL_SCHEDCONFIG = panda_config.AGIS_URL_SCHEDCONFIG
        else:
            self.AGIS_URL_SCHEDCONFIG = 'http://atlas-agis-api.cern.ch/request/pandaqueue/query/list/?json&preset=schedconf.all&vo_name=atlas&state=ACTIVE'

        _logger.debug('Getting schedconfig dump...')
        self.schedconfig_dump = aux.get_dump(self.AGIS_URL_SCHEDCONFIG)
        _logger.debug('Done')
Exemplo n.º 5
0
    def __init__(self, taskBuffer, session):
        """
        Initialization and configuration
        """
        threading.Thread.__init__(self)

        # taskBuffer.init(panda_config.dbhost, panda_config.dbpasswd, nDBConnection=1)
        self.taskBuffer = taskBuffer
        self.session = session

        if hasattr(panda_config, 'CRIC_URL_SCHEDCONFIG'):
            self.CRIC_URL_SCHEDCONFIG = panda_config.CRIC_URL_SCHEDCONFIG
        else:
            self.CRIC_URL_SCHEDCONFIG = 'https://atlas-cric.cern.ch/api/atlas/pandaqueue/query/?json'

        _logger.debug('Getting schedconfig dump...')
        self.schedconfig_dump = aux.get_dump(self.CRIC_URL_SCHEDCONFIG)
        _logger.debug('Done')
Exemplo n.º 6
0
    def __init__(self, session):
        threading.Thread.__init__(self)

        self.session = session

        if hasattr(panda_config, 'CRIC_URL_SITES'):
            self.CRIC_URL_SITES = panda_config.CRIC_URL_SITES
        else:
            self.CRIC_URL_SITES = 'https://atlas-cric.cern.ch/api/atlas/site/query/?json'

        _logger.debug('Getting site dump...')
        self.site_dump = aux.get_dump(self.CRIC_URL_SITES)
        _logger.debug('Done')
        self.site_endpoint_dict = self.get_site_endpoint_dictionary()

        if hasattr(panda_config, 'CRIC_URL_DDMENDPOINTS'):
            self.CRIC_URL_DDMENDPOINTS = panda_config.CRIC_URL_DDMENDPOINTS
        else:
            self.CRIC_URL_DDMENDPOINTS = 'https://atlas-cric.cern.ch/api/atlas/ddmendpoint/query/?json'
        _logger.debug('Getting DDM endpoints dump...')
        self.endpoint_dump = aux.get_dump(self.CRIC_URL_DDMENDPOINTS)
        _logger.debug('Done')
        _logger.debug('Parsing endpoints...')
        self.endpoint_token_dict = self.parse_endpoints()
        _logger.debug('Done')

        if hasattr(panda_config, 'CRIC_URL_SCHEDCONFIG'):
            self.CRIC_URL_SCHEDCONFIG = panda_config.CRIC_URL_SCHEDCONFIG
        else:
            self.CRIC_URL_SCHEDCONFIG = 'https://atlas-cric.cern.ch/api/atlas/pandaqueue/query/?json'
        _logger.debug('Getting schedconfig dump...')
        self.schedconfig_dump = aux.get_dump(self.CRIC_URL_SCHEDCONFIG)
        _logger.debug('Done')

        if hasattr(panda_config, 'CRIC_URL_DDMBLACKLIST'):
            self.CRIC_URL_DDMBLACKLIST = panda_config.CRIC_URL_DDMBLACKLIST
        else:
            self.CRIC_URL_DDMBLACKLIST = 'https://atlas-cric.cern.ch/api/atlas/ddmendpointstatus/query/?json&activity=write_wan&fstate=OFF'
        _logger.debug('Getting ddmblacklist dump...')
        try:
            self.blacklisted_endpoints = list(aux.get_dump(self.CRIC_URL_DDMBLACKLIST))
            self.blacklisted_endpoints_write = self.blacklisted_endpoints
        except TypeError:
            self.blacklisted_endpoints = []
            self.blacklisted_endpoints_write = []
        _logger.debug('Blacklisted endpoints {0}'.format(self.blacklisted_endpoints))
        _logger.debug('Blacklisted endpoints write {0}'.format(self.blacklisted_endpoints_write))
        _logger.debug('Done')

        if hasattr(panda_config, 'CRIC_URL_DDMBLACKLIST_READ'):
            self.CRIC_URL_DDMBLACKLIST_READ = panda_config.CRIC_URL_DDMBLACKLIST_READ
        else:
            self.CRIC_URL_DDMBLACKLIST_READ = 'https://atlas-cric.cern.ch/api/atlas/ddmendpointstatus/query/?json&activity=read_wan&fstate=OFF'
        _logger.debug('Getting ddmblacklist read dump...')
        try:
            self.blacklisted_endpoints_read = list(aux.get_dump(self.CRIC_URL_DDMBLACKLIST_READ))
        except TypeError:
            self.blacklisted_endpoints_read = []
        _logger.debug('Blacklisted endpoints read {0}'.format(self.blacklisted_endpoints_read))
        _logger.debug('Done')

        if hasattr(panda_config, 'RUCIO_RSE_USAGE'):
            self.RUCIO_RSE_USAGE = panda_config.RUCIO_RSE_USAGE
        else:
            self.RUCIO_RSE_USAGE = 'https://rucio-hadoop.cern.ch/dumps/rse_usage/current.json'
        _logger.debug('Getting Rucio RSE usage dump...')
        self.rse_usage = aux.get_dump(self.RUCIO_RSE_USAGE)
        _logger.debug('Done')