Return the location that is configured for this provider
326082
def get_location(call=None, kwargs=None):  # pylint: disable=unused-argument
    '''
    
    '''
    if not kwargs:
        kwargs = {}
    vm_dict = get_configured_provider()
    vm_dict.update(kwargs)
    return config.get_cloud_config_value(
        'location',
        vm_dict, __opts__, search_global=False
    )
690398
def location(self):
        
        if self._location.lower() == 'n':
            return NEUTRAL
        if self._location.lower() == '@':
            return AWAY
        return HOME
11260
def location(ip=None, key=None, field=None):
    '''  
    '''

    if field and (field not in field_list):
        return 'Invalid field'

    if field:
        if ip:
            url = 'https://ipapi.co/{}/{}/'.format(ip, field)
        else:
            url = 'https://ipapi.co/{}/'.format(field)
    else:
        if ip:
            url = 'https://ipapi.co/{}/json/'.format(ip)
        else:
            url = 'https://ipapi.co/json/'

    if key or API_KEY:
        url = '{}?key={}'.format(url, (key or API_KEY))

    response = get(url, headers=headers)

    if field:
        return response.text
    else:
        return response.json()
786442
def get_redirect_location(self):
        
        if self.status in self.REDIRECT_STATUSES:
            return self.headers.get('location')

        return False
615265
private function loadLocation(): ?Location
    {
        if (!$this->context->has('ez_location_id')) {
            return null;
        }

        return $this->locationService->loadLocation(
            (int) $this->context->get('ez_location_id')
        );
    }
690036
def _location(self, obj):
        
        field_name = self.clean_id_name
        return self.request.route_url(
            self._resource.uid,
            **{self._resource.id_name: getattr(obj, field_name)})
1137970
def get_location(self, locations=None):
        # type: (Optional[List[str]]) -> List[str]
        
        countries = self.data.get('groups', None)
        if not countries:
            return list()
        return [Locations.get_location_from_HDX_code(x['name'], locations=locations,
                                                     configuration=self.configuration) for x in countries]
1031709
def avail_locations(call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudException(
            'The avail_locations function must be called with -f or --function.'
        )

    vm_ = get_configured_provider()
    manager = packet.Manager(auth_token=vm_['token'])

    ret = {}

    for facility in manager.list_facilities():
        ret[facility.name] = facility.__dict__

    return ret
33476
public function getLocationUsingProvider()
    {
        $providerId = Common::getRequestVar('id');
        $provider = LocationProvider::getProviderById($providerId);
        if (empty($provider)) {
            throw new Exception("Invalid provider ID: '$providerId'.");
        }

        $location = $provider->getLocation(array('ip'                => IP::getIpFromHeader(),
                                                 'lang'              => Common::getBrowserLanguage(),
                                                 'disable_fallbacks' => true));
        $location = LocationProvider::prettyFormatLocation(
            $location, $newline = '<br/>', $includeExtra = true);

        return $location;
    }
1152450
private String getOrcDataLocation() {
    String orcDataLocation = getConversionConfig().getDestinationDataPath();

    return orcDataLocation + Path.SEPARATOR + PUBLISHED_TABLE_SUBDIRECTORY;
  }
931248
public function getLocation() : ?string 
    {
        if ( ! $this->hasLocation()) {
            $this->setLocation($this->getDefaultLocation());
        }
        return $this->location;
    }
430617
def _get_location(cli_ctx, namespace):
    
    location = None
    if getattr(namespace, 'location', None):
        location = namespace.location
    elif getattr(namespace, 'resource_group_name', None):
        location = _get_location_from_resource_group(cli_ctx, namespace.resource_group_name)
    if not location:
        location = get_one_of_subscription_locations(cli_ctx)
    return location
955256
def get_config(self):
        
        config = {
            'location': self.location,
            'language': self.language,
            'topic': self.topic,
        }
        return config
1294914
def __getLocation(self, web):
        
        try:
            self.location = web.find("span", {"class": "p-label"}).text
        except AttributeError as error:
            print("There was an error with the user " + self.name)
            print(error)
637817
def get(self, location_name):
        
        location_ref = location_helper(location_name, search_only=True)
        if location_ref:
            for location in self:
                if location.location_ref == location_ref:
                    return location
142255
def get_cache_location(self):
        
        filename = self.cache_path if \
            self.cache_path[-1:] == '/' else \
            self.cache_path + '/'
        filename += self.cache_file
        return filename
238466
def __get_default_location():
        
        if not FileCache.__default_location:
            tmp = tempfile.mkdtemp("suds-default-cache")
            FileCache.__default_location = tmp
            import atexit
            atexit.register(FileCache.__remove_default_location)
        return FileCache.__default_location