Looks up the application endpoint from dotcloud
421830
def lookup_endpoint(cli):
    """"""
    url = '/applications/{0}/environment'.format(APPNAME)
    environ = cli.user.get(url).item
    port = environ['DOTCLOUD_SATELLITE_ZMQ_PORT']
    host = socket.gethostbyname(environ['DOTCLOUD_SATELLITE_ZMQ_HOST'])
    return "tcp://{0}:{1}".format(host, port)
1207936
def get_endpoint(endpoint_id)
      endpoint = EndPoint.new(@client.make_request(:get, @client.concat_user_path("#{DOMAIN_PATH}/#{id}/endpoints/#{endpoint_id}"))[0],
                           @client)
      endpoint.domain_id = id
      endpoint
    end
635717
@GET
    @Timed
    @Produces(MediaType.APPLICATION_JSON)
    @Path("about")
    @ApiOperation("Get SeaClouds Components endpoints")
    public Response getSeaCloudsInformation(){
        JsonObject jsonResponse = new JsonObject();

        JsonObject deployerObject = new JsonObject();
        JsonObject monitorObject = new JsonObject();
        JsonObject plannerObject = new JsonObject();
        JsonObject slaObject = new JsonObject();

        deployerObject.addProperty("url", deployerProxy.getEndpoint());
        jsonResponse.add("deployer", deployerObject);

        plannerObject.addProperty("url", plannerProxy.getEndpoint());
        jsonResponse.add("planner", plannerObject);

        slaObject.addProperty("url", slaProxy.getEndpoint());
        jsonResponse.add("sla", slaObject);

        JsonObject grafanaObject = new JsonObject();
        grafanaObject.addProperty("url", grafanaProxy.getEndpoint());

        monitorObject.add("grafana", grafanaObject);
        jsonResponse.add("monitor", monitorObject);

        return Response.ok(jsonResponse.toString()).build();
    }
914769
def get_endpoint_by_address(self, endpoint_addr):
        
        url = "/notification/v1/endpoint?endpoint_address={}".format(
            endpoint_addr)

        response = NWS_DAO().getURL(url, self._read_headers)

        if response.status != 200:
            raise DataFailureException(url, response.status, response.data)

        data = json.loads(response.data)
        try:
            return self._endpoint_from_json(data.get("Endpoints")[0])
        except IndexError:
            raise DataFailureException(url, 404, "No SMS endpoint found")
1367545
def list_endpoints(self):
        """"""
        _filter = {
            'hubNetworkStorage': {'vendorName': {'operation': 'Swift'}},
        }
        endpoints = []
        network_storage = self.client.call('Account',
                                           'getHubNetworkStorage',
                                           mask=ENDPOINT_MASK,
                                           limit=1,
                                           filter=_filter)
        if network_storage:
            for node in network_storage['storageNodes']:
                endpoints.append({
                    'datacenter': node['datacenter'],
                    'public': node['frontendIpAddress'],
                    'private': node['backendIpAddress'],
                })

        return endpoints
610329
def endpoint_get(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.get_endpoint(**kwargs)
605169
def get_service_endpoint_types(self, type=None, scheme=None):
        
        query_parameters = {}
        if type is not None:
            query_parameters['type'] = self._serialize.query('type', type, 'str')
        if scheme is not None:
            query_parameters['scheme'] = self._serialize.query('scheme', scheme, 'str')
        response = self._send(http_method='GET',
                              location_id='5a7938a4-655e-486c-b562-b78c54a7e87b',
                              version='5.0-preview.1',
                              query_parameters=query_parameters)
        return self._deserialize('[ServiceEndpointType]', self._unwrap_collection(response))
8873
def get(self):
        
        base_endpoint = self.config.get('endpoint', 'flasgger')
        specs = [
            {
                "url": url_for(".".join((base_endpoint, spec['endpoint']))),
                "title": spec.get('title', 'API Spec 1'),
                "version": spec.get("version", '0.0.1'),
                "endpoint": spec.get('endpoint')
            }
            for spec in self.config.get('specs', [])
        ]
        data = {
            "specs": specs,
            "title": self.config.get('title', 'Flasgger')
        }
        if request.args.get('json'):
            # calling with ?json returns specs
            return jsonify(data)
        else:  # pragma: no cover
            data['flasgger_config'] = self.config
            data['json'] = json
            data['flasgger_version'] = __version__
            data['favicon'] = self.config.get(
                'favicon',
                url_for('flasgger.static', filename='favicon-32x32.png')
            )
            data['swagger_ui_bundle_js'] = self.config.get(
                'swagger_ui_bundle_js',
                url_for('flasgger.static', filename='swagger-ui-bundle.js')
            )
            data['swagger_ui_standalone_preset_js'] = self.config.get(
                'swagger_ui_standalone_preset_js',
                url_for('flasgger.static',
                        filename='swagger-ui-standalone-preset.js')
            )
            data['jquery_js'] = self.config.get(
                'jquery_js',
                url_for('flasgger.static', filename='lib/jquery.min.js')
            )
            data['swagger_ui_css'] = self.config.get(
                'swagger_ui_css',
                url_for('flasgger.static', filename='swagger-ui.css')
            )
            return render_template(
                'flasgger/index.html',
                **data
            )
1118963
def get_data_urls(deployment_name,
                  endpoint_type='juttle',
                  token_manager=None,
                  app_url=defaults.APP_URL):
    
    deployment_details = deployments.get_deployment_details(deployment_name,
                                                            token_manager=token_manager,
                                                            app_url=app_url)

    # use a random juttle endpoint
    data_urls = []
    for endpoint in deployment_details['endpoints']:
        if endpoint_type in endpoint['type']:
            data_urls.append(endpoint['uri'])

    if len(data_urls) == 0:
        raise JutException('No data engine currently configured for '
                           'deployment "%s"' % deployment_name)

    return data_urls
677181
def get_service_url(region, endpoint_list, lookup):
    

    for endpoint in endpoint_list:
        region_get = endpoint.get('region', '')
        if region.lower() == region_get.lower():
            return http.parse_url(url=endpoint.get(lookup))
    else:
        raise exceptions.AuthenticationProblem(
            'Region "%s" was not found in your Service Catalog.',
            region
        )
1133126
def url_for(self, attr=None, filter_value=None,
            service_type=None, endpoint_type="publicURL",
            service_name=None, volume_service_name=None):
        """"""
        matching_endpoints = []
        # We don't always get a service catalog back ...
        if "serviceCatalog" not in self.catalog["access"]:
            return None

        # Full catalog ...
        catalog = self.catalog["access"]["serviceCatalog"]
        for service in catalog:
            if service.get("type") != service_type:
                continue
            endpoints = service["endpoints"]
            for endpoint in endpoints:
                if not filter_value or endpoint.get(attr) == filter_value:
                    endpoint["serviceName"] = service.get("name")
                    matching_endpoints.append(endpoint)

        if not matching_endpoints:
            raise exc.EndpointNotFound()
        elif len(matching_endpoints) > 1:
            raise exc.AmbiguousEndpoints(endpoints=matching_endpoints)
        else:
            return matching_endpoints[0][endpoint_type]
594043
function getAll(appName, callback) {
    var url = format('/%s/apps/%s/domains/', deis.version, appName);
    commons.get(endpoint, callback);
  }
747922
def get_endpoints(url_base, tenant_id, user, password):
    
    url = 'http://' + url_base + '/v2.0/tokens'
    headers = {'Content-Type': 'application/json'}
    payload = {'auth': {'tenantId': '' + tenant_id + '',
                        'passwordCredentials': {'username':
                        '' + user + '', 'password': '' +
                        password + ''}}}
    try:
        response = requests.post(url, headers=headers,
                                 data=json.dumps(payload))
        response_json = response.json()
        services = response_json['access']['serviceCatalog']
    except Exception as e:
        raise Exception('Error to obtain a image ' + e.message)

    endpoints = {}
    for service in services:
        service_endpoints = {}
        for endpoint in service['endpoints']:
            service_endpoints.update({endpoint['region']:
                                      endpoint['publicURL']})
        endpoints.update({service['type']: service_endpoints})
    return endpoints
254643
public static HttpEndpointImpl findEndpoint(String endpointId) {
        for (HttpEndpointImpl i : instance.get()) {
            if (i.getName().equals(endpointId))
                return i;
        }
        return null;
    }
1171608
def get_list_endpoint(self, rel=u"instances"):
        
        schema_loaded = not self.schema is None
        links_present = "links" in self.schema.keys()
        if (schema_loaded and links_present):
             for row in self.schema['links']:
                  if row['rel'] == rel:
                      #print "row %s" % row
                      return row
        raise APIException("ENDPOINT_NOTFOUND","invalid endpoint")
8819
public String getRack(InetAddress endpoint)
    {
        String[] info = getEndpointInfo(endpoint);
        assert info != null : "No location defined for endpoint " + endpoint;
        return info[1];
    }
299198
public String getDatacenter(InetAddress endpoint)
    {
        String[] info = getEndpointInfo(endpoint);
        assert info != null : "No location defined for endpoint " + endpoint;
        return info[0];
    }