It get the url for a concrete service
    :param url_base: keystone url
    :param tenand_id: the id of the tenant
    :param user: the user
    :param paassword: the password
    :param type: the type of service
    :param region: the region
760652
def get_url(url_base, tenant_id, user, password, type, region):
    
    url = 'http://' + url_base + '/v2.0/tokens'
    headers = {'Accept': 'application/json'}
    payload = {'auth': {'tenantName': '' + 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)

    for service in services:
        if service['type'] == type and service['region'] == region:
            for endpoint in service['endpoints']:
                return endpoint['publicURL']
1350665
def get_tenant(self, tenant_id):
        
        route_values = {}
        if tenant_id is not None:
            route_values['tenantId'] = self._serialize.url('tenant_id', tenant_id, 'str')
        response = self._send(http_method='GET',
                              location_id='5f0a1723-2e2c-4c31-8cae-002d01bdd592',
                              version='5.0-preview.1',
                              route_values=route_values)
        return self._deserialize('TenantInfo', response)
518207
def base_url(klass, space_id, resource_id=None, public=False, environment_id=None, **kwargs):
        

        if public:
            environment_slug = ""
            if environment_id is not None:
                environment_slug = "/environments/{0}".format(environment_id)
            return "spaces/{0}{1}/public/content_types".format(space_id, environment_slug)
        return super(ContentType, klass).base_url(
            space_id,
            resource_id=resource_id,
            environment_id=environment_id,
            **kwargs
        )
1143057
def get_user_xrds_url(xrds, claimed_id)
      types_to_match = ['http://www.iana.org/assignments/relation/describedby']
      services = OpenID::Yadis::apply_filter(claimed_id, xrds)
      services.each do | service |
        if service.match_types(types_to_match)
          template = REXML::XPath.first(service.service_element, '//openid:URITemplate', NAMESPACES)
          authority = REXML::XPath.first(service.service_element, '//openid:NextAuthority', NAMESPACES)
          url = template.text.gsub('{%uri}', CGI::escape(claimed_id))
          return [url, authority.text]
        end
      end
    end
700265
def get_oauth_url
      params = {}
      url = @url

      if url.include?("?")
        parsed_url = URI::parse(url)
        CGI::parse(parsed_url.query).each do |key, value|
          params[key] = value[0]
        end
        params = Hash[params.sort]

        url = parsed_url.to_s.gsub(/\?.*/, "")
      end

      nonce_lifetime = 15 * 60 # Woocommerce keeps nonces for 15 minutes

      params["oauth_consumer_key"] = @consumer_key
      params["oauth_nonce"] = Digest::SHA1.hexdigest((Time.new.to_f % nonce_lifetime + (Process.pid * nonce_lifetime)).to_s)
      params["oauth_signature_method"] = @signature_method
      params["oauth_timestamp"] = Time.new.to_i
      params["oauth_signature"] = CGI::escape(generate_oauth_signature(params, url))

      query_string = URI::encode(params.map{|key, value| "#{key}=#{value}"}.join("&"))

      "#{url}?#{query_string}"
    end
921086
def _get_url(cls, administration_id: int, resource_path: str):
        
        url = urljoin(cls.base_url, '%s/' % cls.version)

        if administration_id is not None:
            url = urljoin(url, '%s/' % administration_id)

        url = urljoin(url, '%s.json' % resource_path)

        return url
8723
def base_url(self):
        
        return get_current_url(
            self.environ, strip_querystring=True, trusted_hosts=self.trusted_hosts
        )
542107
def get_base_url(use_ssl, instance=None, host=None):
        

        if instance is not None:
            host = ("%s.service-now.com" % instance).rstrip('/')

        if use_ssl is True:
            return "https://%s" % host

        return "http://%s" % host
560510
def get_resource_url(self):
        

        name = self.__class__.resource_name
        url = self.__class__.rest_base_url()

        return "%s/%s" % (url, name)
96679
def get_domain_id_for_operation(request):
    

    domain_context = request.session.get('domain_context')
    if domain_context:
        return domain_context
    return api.keystone.get_effective_domain_id(request)
1267311
def get(self, uri, params={}):
        ''''''
        logging.debug("Requesting URL: "+str(urlparse.urljoin(self.BASE_URL, uri)))
        return requests.get(urlparse.urljoin(self.BASE_URL, uri),
            params=params, verify=False,
            auth=self.auth)
1151556
def get_resource_url(self):
        

        name = self.__class__.resource_name
        url = self.__class__.rest_base_url()

        if self.id is not None:
            return "%s/%s/%s" % (url, name, self.id)

        return "%s/%s" % (url, name)
714050
def get_conn():
    '''
    
    '''
    vm_ = get_configured_provider()

    kwargs = vm_.copy()  # pylint: disable=E1103

    kwargs['username'] = vm_['user']
    kwargs['project_id'] = vm_['tenant']
    kwargs['auth_url'] = vm_['identity_url']
    kwargs['region_name'] = vm_['compute_region']
    kwargs['use_keystoneauth'] = vm_.get('use_keystoneauth', False)

    if 'password' in vm_:
        kwargs['password'] = vm_['password']

    if 'verify' in vm_ and vm_['use_keystoneauth'] is True:
        kwargs['verify'] = vm_['verify']
    elif 'verify' in vm_ and vm_['use_keystoneauth'] is False:
        log.warning('SSL Certificate verification option is specified but use_keystoneauth is False or not present')
    conn = nova.SaltNova(**kwargs)

    return conn
896360
def get(self, uri, params={}):
        '''
        '''
        return self._session.get(urljoin(Investigate.BASE_URL, uri),
            params=params, headers=self._auth_header, proxies=self.proxies
        )
1042180
def get_url(self, resource, params=None):
        

        # replace placeholders

        pattern = r'\{(.+?)\}'

        resource = re.sub(pattern, lambda t: str(params.get(t.group(1), '')), resource)

        # build url

        parts = (self.endpoint, '/api/', resource)
        return '/'.join(map(lambda x: str(x).strip('/'), parts))
542760
def url(self, service):
		''''''
		if service not in TILE_SERVICES:
			raise TileException('unknown tile service %s' % service)
		url = string.Template(TILE_SERVICES[service])
		(x,y) = self.tile
		tile_info = TileServiceInfo(x, y, self.zoom)
		return url.substitute(tile_info)
1252813
def __get_base_bundle_url(self):
        
        return self.__serviceAccount.get_url() + '/' + \
            self.__serviceAccount.get_instance_id() + self.__BUNDLES_PATH