Returns whether or not the JIRA instance supports service desk.

        :rtype: bool
356017
def supports_service_desk(self):
        
        url = self._options['server'] + '/rest/servicedeskapi/info'
        headers = {'X-ExperimentalApi': 'opt-in'}
        try:
            r = self._session.get(url, headers=headers)
            return r.status_code == 200
        except JIRAError:
            return False
1058799
def allowed?(to, from)
      to, from = JID.new(to), JID.new(from)
      return false                      if to.empty? || from.empty?
      return true                       if to.domain == from.domain # same domain always allowed
      return cross_domain?(to, from)    if local_jid?(to, from)     # both virtual hosted here
      return check_subdomains(to, from) if subdomain?(to, from)     # component/pubsub to component/pubsub
      return check_subdomain(to, from)  if subdomain?(to)           # to component/pubsub
      return check_subdomain(from, to)  if subdomain?(from)         # from component/pubsub
      return cross_domain?(to)          if local_jid?(to)           # from is remote
      return cross_domain?(from)        if local_jid?(from)         # to is remote
      return false
    end
465058
def cmp(self, other_service):
        
        if not isinstance(other_service, HttpService):
            return None
        for att in dir(self):
            if att == 'cmp' or att.startswith('_'):
                continue
            if not hasattr(other_service, att):
                return None
            if getattr(self, att) != getattr(other_service, att):
                return False
        return True
1005250
def supports(self, config, context):
        
        try:
            from flask import request
        except ImportError:
            return False
        else:
            return bool(request)
515984
def is_enabled():
    '''
    
    '''
    cmd = 'service -e'
    services = __salt__['cmd.run'](cmd, python_shell=False)
    for service in services.split('\\n'):
        if re.search('jail', service):
            return True
    return False
1027505
def has_ref?(json_object)
      if json_object["_ref"].nil?
        return false
      end
      if @wsapi_version =~ /^v2/
        return true if json_object["_ref"] =~ /^https:\/\/\S*(\/slm\/webservice)\S*$/
      else
        return true if json_object["_ref"] =~ /^https:\/\/\S*(\/slm\/webservice)\S*.js$/
      end
      false
    end
762309
public boolean isSupportedByServer()
            throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        return ServiceDiscoveryManager.getInstanceFor(connection()).serverSupportsFeature(NAMESPACE);
    }
239016
def has_fast_mps_support():
    
    lib = _load_tcmps_lib()
    if lib is None:
        return False

    c_bool = _ctypes.c_bool()
    ret = lib.TCMPSHasHighPowerMetalDevice(_ctypes.byref(c_bool))
    return ret == 0 and c_bool.value
999133
def _check_pillar(kwargs, pillar=None):
    '''
    
    '''
    if kwargs.get('force'):
        return True
    pillar_dict = pillar if pillar is not None else __pillar__
    if '_errors' in pillar_dict:
        return False
    return True
682608
def iter_services(self, feature=None):
        
        # Get the list of root services
        items = self["xep_0030"].get_items(
            jid=self.boundjid.domain,
            ifrom=self.boundjid.full,
            block=True,
            timeout=10,
        )

        for item in items["disco_items"]["items"]:
            # Each item is a 3-tuple. The service JID is the first entry
            if not feature:
                # No filter
                yield item[0]
            else:
                # Get service details
                info = self["xep_0030"].get_info(
                    jid=item[0],
                    ifrom=self.boundjid.full,
                    block=True,
                    timeout=10,
                )
                if feature in info["disco_info"]["features"]:
                    # The service provides the required feature
                    yield item[0]
1212704
def is_capable(cls, requested_capability):
        
        for c in requested_capability:
            if not c in cls.capability:
                return False
        return True
565576
def provided(self, spec_name, default_okay=True):
        
        try:
            spec = self.bound_spec(spec_name)
        except ArcanaMissingDataException:
            return False
        if isinstance(spec, BaseInputSpec):
            return spec.default is not None and default_okay
        else:
            return True
900967
def servicegroup_exists(sg_name, sg_type=None, **connection_args):
    '''
    
    '''
    sg = _servicegroup_get(sg_name, **connection_args)
    if sg is None:
        return False
    if sg_type is not None and sg_type.upper() != sg.get_servicetype():
        return False
    return True
1026424
def available(self):
        
        disco_info = yield from self._disco_client.query_info(
            self.client.local_jid.bare()
        )

        for item in disco_info.identities.filter(attrs={"category": "pubsub"}):
            if item.type_ == "pep":
                return True
        return False
50886
def supports_color():
    
    unsupported_platform = (sys.platform in ('win32', 'Pocket PC'))
    # isatty is not always implemented, #6223.
    is_a_tty = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty()
    if unsupported_platform or not is_a_tty:
        return False
    return True
556919
public static boolean isServiceEnabled(XMPPConnection connection) {
        connection.getXMPPServiceDomain();
        return ServiceDiscoveryManager.getInstanceFor(connection).includesFeature(AMPExtension.NAMESPACE);
    }
903162
private boolean supportsConnects(String serviceType) {
        return !serviceType.equals("jms") &&
                !serviceType.equals("echo") &&
                !serviceType.equals("management.jmx") &&
                !serviceType.equals("$management.jmx$") &&
                !serviceType.equals("management.snmp") &&
                !serviceType.equals("$management.snmp$") &&
                !serviceType.equals("directory");
    }