Get the settings for a particular service and version.
184892
def get_settings(self, service_id, version_number):
		""""""
		content = self._fetch("/service/%s/version/%d/settings" % (service_id, version_number))
		return FastlySettings(self, content)
265312
def settings(cls):
        

        from bernard.platforms.management import get_platform_settings

        for platform in get_platform_settings():
            candidate = import_class(platform['class'])
            if candidate == cls:
                return platform.get('settings', {})
102177
def _get_application_settings(self, application_id, settings_key, error_message):
		""""""

		if not application_id:
			value = SETTINGS.get(settings_key, empty)
			if value is empty:
				raise ImproperlyConfigured(error_message)
			return value
		else:
			msg = (
				"LegacySettings does not support application_id. To enable "
				"multiple application support, use push_notifications.conf.AppSettings."
			)
			raise ImproperlyConfigured(msg)
1100022
def version(self):
        """"""
        url: str = get_url("/service/version.json")
        params = {"service": "remote"}
        r = self._request(url=url, params=params)
        return r.json()
662179
def c(self):
        """"""
        if self._client is None:
            self._parse_settings()
            self._client = Rumetr(**self.settings)
        return self._client
607347
def get_setting(self, name):
        notfound = object()
        " "
        value = getattr(config, name, notfound)
        if name.endswith('_WHITELISTED_DOMAINS'):
            if value:
                return value.split(',')
            else:
                return []

        if value is notfound:
            value = getattr(settings, name)
        # Force text on URL named settings that are instance of Promise
        if name.endswith('_URL'):
            if isinstance(value, Promise):
                value = force_text(value)
            value = resolve_url(value)
        return value
4437
def get_setting(key, *default):
    """"""
    if default:
        return get_settings().get(key, default[0])
    else:
        return get_settings()[key]
127536
def get_version(*args):
    """"""
    contents = get_contents(*args)
    metadata = dict(re.findall('__([a-z]+)__ = [\'"]([^\'"]+)', contents))
    return metadata['version']
201502
def match(self, version):
        """"""
        return all(spec.match(version) for spec in self.specs)
896442
def get_version(self):
        """"""
        _, version = misc.get_version(self.confdir)
        if version is None:
            return "Can't get the version."
        else:
            return "cslbot - %s" % version
213333
def _get_service_state(service_id: str):
        """"""
        LOG.debug('Getting state of service %s', service_id)
        services = get_service_id_list()
        service_ids = [s for s in services if service_id in s]
        if len(service_ids) != 1:
            return 'Service not found! services = {}'.format(str(services))
        subsystem, name, version = service_ids[0].split(':')
        return ServiceState(subsystem, name, version)
425639
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return CompositionSettingsInstance(self._version, payload, )
1015473
def get_settings(self):
    '''
    '''
    config = self._load_config_user()
    if self.name in config:
        return config[self.name]
897430
def _get_version_properties(self):
        
        # Parse out version info
        output = self.enable('show version')
        self._version = str(output[0]['result']['version'])
        match = re.match('[\d.\d]+', output[0]['result']['version'])
        if match:
            self._version_number = str(match.group(0))
        else:
            self._version_number = str(output[0]['result']['version'])
        # Parse out model number
        match = re.search('\d\d\d\d', output[0]['result']['modelName'])
        if match:
            self._model = str(match.group(0))
        else:
            self._model = str(output[0]['result']['modelName'])
627264
def _get_settings(self):
        """"""
        url = self._global_settings_url
        payload = {}
        res = self._send_request('GET', url, payload, 'settings')
        if res and res.status_code in self._resp_ok:
            return res.json()
504133
def get_version_by_value(context, value):
  
  versions = get_versions(context)
  for version in versions:
    if version.value == value:
      return version
  fail("Didn't find a matching version for: "
       "{}:{} in env/service: {}/{}".format(
          context.key, value,
          context.env, context.service_name))
622650
def version(self):
        """"""
        return self.get_json(URL_VERSION.format(self._url), astext=True)