Introspects all the operations (& related information) about a service.

        :param service_name: The desired service name
        :type service_name: string

        :returns: A dict of all operation names & information
16675
def introspect_service(self, service_name):
        
        data = {}
        service = self.get_service(service_name)

        for operation in service.operations:
            # These are ``Operation`` objects, not operation strings.
            op_data = self.introspect_operation(operation)
            data[op_data['method_name']] = op_data

        return data
722618
def create_completer_query(self, service_name):
        
        if service_name not in self._describer_cache:
            query = self._create_completer_query(service_name)
            self._describer_cache[service_name] = query
        return self._describer_cache[service_name]
407599
def get_service_info(self, type, name, timeout=3000):
        """"""
        info = ServiceInfo(type, name)
        if info.request(self, timeout):
            return info
        return None
1084134
def _initialize_operation_name_to_id(self):
    
    operation_name_to_id = {}
    for i, operation in enumerate(self._operations):
      operation_name_to_id[operation.name] = i
    return operation_name_to_id
985558
def get_service_status(self, name):
        
        svc = self._query_service(name)
        if svc is not None:
            return {'name': name,
                    'status': self.parse_query(svc['output']),
                    'output': svc['output']
                    }
        else:
            return {'name': name,
                    'status': 'missing',
                    'output': ''
                    }
1244357
def create_service_key(self, service_name, key_name):
        
        if self.has_key(service_name, key_name):
            logging.warning("Reusing existing service key %s" % (key_name))
            return self.get_service_key(service_name, key_name)

        body = {
            'service_instance_guid': self.get_instance_guid(service_name),
            'name': key_name
            }

        return self.api.post('/v2/service_keys', body)
77349
def services_by_name(self):
        
        srvs = defaultdict(list)
        for i in self.services:
            srvs[i.__class__.__name__].append(i)
        return srvs
563348
def _retrieve_info(self, request):
        
        info = _metadata.get_service_account_info(
            request,
            service_account=self._service_account_email)

        self._service_account_email = info['email']
        self._scopes = info['scopes']
791408
def get_action_arguments(self, service_name, action_name):
        
        return self.services[service_name].actions[action_name].info
1362892
def _get_service_bindings(self, service_name):
        
        instance = self.get_instance(service_name)
        return self.api.get(instance['service_bindings_url'])
837749
def getOperationNameForId(i):
    
    for key in operations:
        if int(operations[key]) is int(i):
            return key
    return "Unknown Operation ID %d" % i
1123916
def get_service_state(self, service_id: str) -> str:
        
        # Get service
        service = self._client.services.get(service_id)

        # Get the state of the service
        for service_task in service.tasks():
            service_state = service_task['DesiredState']
        return service_state
348945
def get_service_details(self, service_id: str) -> dict:
        
        # Raise an exception if we are not a manager
        if not self._manager:
            raise RuntimeError('Only the Swarm manager node can retrieve all'
                               ' the services details.')

        service = self._client.services.get(service_id)
        return service.attrs
1215198
def service_endpoints(service_name)
      catalog = extract_value(identity_data, "access", "serviceCatalog") || {}
      service = catalog.detect { |s| s["name"] == service_name } || {}
      service["endpoints"] || []
    end
783156
def asdict(self) -> Dict[str, Union[Dict, Union[str, Dict]]]:
        
        return {
            "service": self.service.name,
            **self.signature.serialize(),
        }
780410
def get_api_services_by_name(self):
        """"""
        if not self.services_by_name:
            self.services_by_name = dict({s.get('name'): s for s in self.conf
                                          .get("api")
                                          .get("services")})
        return self.services_by_name
1203492
def servicenames(self):
        ""
        return set([service['name'].rstrip('/').split('/')[-1] 
                        for service in self._json_struct.get('services', [])])