Example #1
0
 def __getServiceEndpointInfo(self, node):
   #res = Utils.unpack( self.GOCDBClient.getServiceEndpointInfo( 'hostname', node ) )
   res = self.GOCDBClient.getServiceEndpointInfo( 'hostname', node )
   if res['OK']:
     res = res[ 'Value' ]
   else:
     gLogger.warn( 'Error getting hostname info for %s' % node )
     return []
       
   if res == []:
     #res = Utils.unpack( self.GOCDBClient.getServiceEndpointInfo('hostname', Utils.canonicalURL(node)) )
     url = Utils.canonicalURL(node)
     res = self.GOCDBClient.getServiceEndpointInfo('hostname', url )
     if res['OK']:
       res = res[ 'Value' ]
     else:
       gLogger.warn( 'Error getting canonical hostname info for %s' % node )
       res = []
     
   return res
Example #2
0
    def __getServiceEndpointInfo(self, node):
        #res = Utils.unpack( self.GOCDBClient.getServiceEndpointInfo( 'hostname', node ) )
        res = self.GOCDBClient.getServiceEndpointInfo('hostname', node)
        if res['OK']:
            res = res['Value']
        else:
            gLogger.warn('Error getting hostname info for %s' % node)
            return []

        if res == []:
            #res = Utils.unpack( self.GOCDBClient.getServiceEndpointInfo('hostname', Utils.canonicalURL(node)) )
            url = Utils.canonicalURL(node)
            res = self.GOCDBClient.getServiceEndpointInfo('hostname', url)
            if res['OK']:
                res = res['Value']
            else:
                gLogger.warn('Error getting canonical hostname info for %s' %
                             node)
                res = []

        return res