Exemplo n.º 1
0
def get_endpoints(uri):
    client = Client(uri, timeout=2)
    endpoints = client.connect_and_get_server_endpoints()
    for i, endpoint in enumerate(endpoints, start=1):
        print('[INFO]', 'Endpoint %s:' % i)
        for record in endpoint_to_strings(endpoint):  # name, value
            print('  >>>   %s: %s' % record)
    return endpoints
Exemplo n.º 2
0
 def get_endpoints(uri):
     client = Client(uri, timeout=2)
     edps = client.connect_and_get_server_endpoints()
     for i, ep in enumerate(edps, start=1):
         logger.info('Endpoint %s:', i)
         for (n, v) in endpoint_to_strings(ep):
             logger.info('  %s: %s', n, v)
         logger.info('')
     return edps
Exemplo n.º 3
0
 def get_endpoints(uri):
     client = Client(uri, timeout=2)
     client.connect_and_get_server_endpoints()
     edps = client.connect_and_get_server_endpoints()
     for i, ep in enumerate(edps, start=1):
         logger.info('Endpoint %s:', i)
         for (n, v) in endpoint_to_strings(ep):
             logger.info('  %s: %s', n, v)
         logger.info('')
     return edps
Exemplo n.º 4
0
 def get_endpoints(uri):
     # Create client object and associate url of the server
     client = Client(uri)
     # Connect, ask server for endpoints, and disconnect
     edps = client.connect_and_get_server_endpoints()
     for i, ep in enumerate(edps, start=1):
         logger.info('Endpoint %s:', i)
         for n, v in endpoint_to_strings(ep):
             logger.info('  %s: %s', n, v)
         logger.info('')
     return edps
    def get_endpoints(self):

        uri = self.ui.addressComboBox.currentText()
        client = Client(uri, timeout=2)
        try:
            edps = client.connect_and_get_server_endpoints()
            for i, ep in enumerate(edps, start=1):
                self.log_window.ui.logTextEdit.append('Endpoint %s:' % i)
                for (n, v) in endpoint_to_strings(ep):
                    self.log_window.ui.logTextEdit.append('  %s: %s' % (n, v))
                self.log_window.ui.logTextEdit.append('')
        except Exception as ex:
            self.log_window.ui.logTextEdit.append(str(ex))
            raise
        return edps