Get me all the bindings that are registered for a service entity

        :param entity_id:
        :param service:
        :return:
339335
def bindings(self, entity_id, typ, service):
        
        return self.service(entity_id, typ, service)
1222626
def role_entities(self):
        
        return [self.service.roles[name] for name in self.content.roles]
1193071
def get_service_details(self, service_id):
		""""""
		content = self._fetch("/service/%s/details" % service_id)
		return FastlyService(self, content)
380947
private Long fetchServiceId(ServiceReference serviceReference) {
        return (Long) serviceReference.getProperty(org.osgi.framework.Constants.SERVICE_ID);
    }
1150420
def get_specs(self, service):
        
        uid = api.get_uid(service)
        keyword = service.getKeyword()
        specs = ResultsRangeDict(keyword=keyword, uid=uid).copy()
        for key in specs.keys():
            specs_value = self.request.form.get(key, [{}])[0].get(uid, None)
            specs[key] = specs_value or specs.get(key)
        return specs
826381
protected RegisteredService getRegisteredServiceFromRequest(final RequestContext requestContext, final String entityId) {
        val currentService = WebUtils.getService(requestContext);
        val service = this.serviceFactory.createService(entityId);
        var registeredService = this.servicesManager.findServiceBy(service);
        if (registeredService == null) {
            LOGGER.debug("Entity id [{}] not found in the registry. Fallback onto [{}]", entityId, currentService);
            registeredService = this.servicesManager.findServiceBy(currentService);
        }
        LOGGER.debug("Located service definition [{}]", registeredService);
        return registeredService;
    }
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)
121772
def try_binding(self):
        
        with self._lock:
            if self.services:
                # We already are alive (not our first call)
                # => we are updated through service events
                return

            # Get all matching services
            refs = self._context.get_all_service_references(
                self.requirement.specification, self.requirement.filter
            )
            if not refs:
                # No match found
                return

            results = []
            try:
                # Bind all new reference
                for reference in refs:
                    added = self.on_service_arrival(reference)
                    if added:
                        results.append(reference)
            except BundleException as ex:
                # Get the logger for this instance
                logger = logging.getLogger(
                    "-".join((self._ipopo_instance.name, "RequiresMap-Runtime"))
                )
                logger.debug("Error binding multiple references: %s", ex)

                # Undo what has just been done, ignoring errors
                for reference in results:
                    try:
                        self.on_service_departure(reference)

                    except BundleException as ex2:
                        logger.debug("Error cleaning up: %s", ex2)

                del results[:]
                raise
175065
def list(self, request, *args, **kwargs):
        
        return super(ServicesViewSet, self).list(request, *args, **kwargs)
354582
def fetch(self):
        
        params = values.of({})

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

        return UserBindingInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            user_sid=self._solution['user_sid'],
            sid=self._solution['sid'],
        )
753961
def index_service(self, service_id):
    

    from hypermap.aggregator.models import Service
    service = Service.objects.get(id=service_id)

    if not service.is_valid:
        LOGGER.debug('Not indexing service with id %s in search engine as it is not valid' % service.id)
        return

    LOGGER.debug('Indexing service %s' % service.id)
    layer_to_process = service.layer_set.all()

    for layer in layer_to_process:
        if not settings.REGISTRY_SKIP_CELERY:
            index_layer(layer.id, use_cache=True)
        else:
            index_layer(layer.id)
616149
def provider(self, service):
        
        service_provider = default_provider.get_service(str(service.provider.name.name))

        # 1) get the data from the provider service
        module_name = 'th_' + service.provider.name.name.split('Service')[1].lower()
        kwargs = {'trigger_id': str(service.id), 'cache_stack': module_name}
        return getattr(service_provider, 'process_data')(**kwargs)
886516
private void manageService(Entity rawEntity){

        CloudFoundryService cloudFoundryService;
        if (rawEntity instanceof CloudFoundryService){

            cloudFoundryService = (CloudFoundryService) rawEntity;
        
            String serviceName = cloudFoundryService
                    .getConfig(CloudFoundryService.SERVICE_INSTANCE_NAME);


            if (!Strings.isEmpty(serviceName)){

                Entities.waitForServiceUp(cloudFoundryService,
                        cloudFoundryService.getConfig(BrooklynConfigKeys.START_TIMEOUT));

                bindingServiceToEntity(serviceName);
                setCredentialsOnService(cloudFoundryService);
                cloudFoundryService.operation(getEntity());
            } else {
                log.error("Trying to get service instance name from {}, but getting null",
                        cloudFoundryService);
            }
        } else {
            log.error("The service entity {} is not available from the application {}",
                    new Object[]{rawEntity, getEntity()});

            throw new NoSuchElementException("No entity matching id " + rawEntity.getId() +
                    " in Management Context "+getEntity().getManagementContext()+
                    " during entity service binding "+getEntity().getId());
        }
    }
332886
def get_service_key(self, service_name, key_name):
        
        for key in self._get_service_keys(service_name)['resources']:
            if key_name == key['entity']['name']:
                guid = key['metadata']['guid']

                uri = "/v2/service_keys/%s" % (guid)
                return self.api.get(uri)

        return None
196472
def get(self, sid):
        
        return BindingContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
918599
def get_service_id_list() -> List[tuple]:
    """"""
    keys = DB.get_keys('states*')
    services = []
    for key in keys:
        values = key.split(':')
        if len(values) == 4:
            services.append(':'.join(values[1:]))
    return services
452526
def getServices(self):
        
        tool = getToolByName(self, REFERENCE_CATALOG)
        services = []
        for spec in self.getReferenceResults():
            service = tool.lookupObject(spec['uid'])
            services.append(service)
        return services