Converts the given endpoint description beans into a string

        :param endpoints: A list of EndpointDescription beans
        :return: A string containing an XML document
482203
def to_string(self, endpoints):
        
        # Make the ElementTree
        root = self._make_xml(endpoints)
        tree = ElementTree.ElementTree(root)

        # Force the default name space
        ElementTree.register_namespace("", EDEF_NAMESPACE)

        # Make the XML
        for encoding in "unicode", "UTF-8":
            # Prepare a StringIO output
            output = StringIO()

            try:
                # Try to write with a correct encoding
                tree.write(
                    output,
                    encoding=encoding,
                    xml_declaration=True,
                    method="xml",
                )
                break

            except LookupError:
                # 'unicode' is needed in Python 3, but unknown in Python 2...
                continue

        else:
            raise LookupError("Couldn't find a valid encoding")

        return output.getvalue()
1013695
def get_endpoints(query = nil)
      @client.make_request(:get, @client.concat_user_path("#{DOMAIN_PATH}/#{id}/endpoints"), query)[0].map do |i|
        endpoint = EndPoint.new(i, @client)
        endpoint.domain_id = id
        endpoint
      end
    end
251351
def toxml(self):
        

        return '<Tunnel name="{0}"'.format(self.name) + \
               ' endA="{0}"'.format(self.end_a) + \
               ' endB="{0}"'.format(self.end_b) + \
               ' componentA="{0}"'.format(self.component_a) + \
               ' componentB="{0}"'.format(self.component_b) + '/>'
465201
def role_list(endpoint_id):
    
    client = get_client()
    roles = client.endpoint_role_list(endpoint_id)

    resolved_ids = LazyIdentityMap(
        x["principal"] for x in roles if x["principal_type"] == "identity"
    )

    def principal_str(role):
        principal = role["principal"]
        if role["principal_type"] == "identity":
            username = resolved_ids.get(principal)
            return username or principal
        elif role["principal_type"] == "group":
            return (u"https://app.globus.org/groups/{}").format(principal)
        else:
            return principal

    formatted_print(
        roles,
        fields=[
            ("Principal Type", "principal_type"),
            ("Role ID", "id"),
            ("Principal", principal_str),
            ("Role", "role"),
        ],
    )
153500
def get_website_endpoint(self):
        
        l = [self.name]
        l.append(S3WebsiteEndpointTranslate.translate_region(self.get_location()))
        l.append('.'.join(self.connection.host.split('.')[-2:]))
        return '.'.join(l)
854223
def _expand_endpoint_name(endpoint_name, flags):
    
    return tuple(flag.format(endpoint_name=endpoint_name) for flag in flags)
209057
public String[] getEndpointInfo(InetAddress endpoint)
    {
        String[] rawEndpointInfo = getRawEndpointInfo(endpoint);
        if (rawEndpointInfo == null)
            throw new RuntimeException("Unknown host " + endpoint + " with no default configured");
        return rawEndpointInfo;
    }
182693
def renderXRDS(request, type_uris, endpoint_urls):
    
    response = render_to_response(
        'xrds.xml', {'type_uris': type_uris,
                     'endpoint_urls': endpoint_urls},
        context_instance=RequestContext(request))
    response['Content-Type'] = YADIS_CONTENT_TYPE
    return response
585440
def format_endpoint_returns_doc(endpoint):
    """"""
    description = clean_description(py_doc_trim(endpoint._returns._description))
    return {
        'description': description,
        'resource_name': endpoint._returns._value_type,
        'resource_type': endpoint._returns.__class__.__name__
    }
637850
protected void obtainProducerEndpoints(List<Node> nodes, List<EndpointInfo> endpoints,
                                Map<String, EndpointInfo> map) {
        for (int i = 0; i < nodes.size(); i++) {
            Node node = nodes.get(i);

            if (node instanceof Producer) {
                String endpoint = EndpointUtil.encodeEndpoint(node.getUri(), node.getOperation());

                if (!map.containsKey(endpoint)) {
                    EndpointInfo info = new EndpointInfo();
                    info.setEndpoint(endpoint);
                    info.setType(((Producer) node).getEndpointType());
                    endpoints.add(info);
                    map.put(endpoint, info);
                }
            }

            if (node instanceof ContainerNode) {
                obtainProducerEndpoints(((ContainerNode) node).getNodes(), endpoints, map);
            }
        }
    }
948600
protected List<String> getEndpointUris() throws AdapterException {
        List<String> urlmap = new ArrayList<String>();
        try {
            String map = getAttributeValue(ENDPOINT_URI);
            List<String[]> urlmaparray;
            if (map==null)
                urlmaparray = new ArrayList<String[]>();
                else
                    urlmaparray = StringHelper.parseTable(map, ',', ';', 1);

            for (String[] entry : urlmaparray)
                urlmap.add(getValueSmart(entry[0], ""));
        }
        catch (Exception ex) {
            throw new AdapterException(-1, ex.getMessage(), ex);
        }
        return urlmap;
    }
382325
private static function makeEndpoints($endpoints)
    {
        if (is_string($endpoints)) {
            return self::makeEndpointsFromString($endpoints, self::ROUTE_METHODS);
        }

        return $endpoints;
    }
462417
def get(cls, object_id):
        
        return fields.ObjectField(name=cls.ENDPOINT, init_class=cls).decode(
            cls.element_from_string(
                cls._get_request(endpoint=cls.ENDPOINT + '/' + str(object_id)).text
            )
        )
384474
def get_endpoint(cls):
        
        if cls.endpoint is not None:
            return cls.endpoint
        s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', cls.__name__)
        return cls.sanitize_ep(
            re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower(),
            plural=True
        )
1309526
def getEndpoint(self):
        
        port = ''
        endpoint = ''
        keyConfig = self.getKeyConfig()
        if 'port' in keyConfig:
            port = ':' + keyConfig['port']
        elif self._data['port'] != self.PORT:
            port = ':' + self._data['port']
        if 'endpoint' in keyConfig:
            endpoint = keyConfig['endpoint']
        else:
            endpoint = self._data['endpoint']
        return 'https://%s%s/%s/' % (endpoint,
                                     port,
                                     self._data['api_version'])
366052
def get_endpoints(self):
        
        def process_result(result):
            return [line.split(';')[0][2:-1] for line in result.split(',')]

        return Command('get', ['.well-known', 'core'], parse_json=False,
                       process_result=process_result)
1353246
def hosts_to_endpoints(hosts, port=2181):
    
    endpoints = []
    for host in hosts.split(","):
        endpoints.append(tuple(host.rsplit(":", 1)) if ":" in host else (host, port))
    return endpoints