Get a list of docker services.

        Only the manager nodes can retrieve all the services

        Returns:
            list, all the ids of the services in swarm
4089
def get_service_list(self) -> list:
        
        # Initialising empty list
        services = []

        # 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.')

        service_list = self._client.services.list()
        for s_list in service_list:
            services.append(s_list.short_id)
        return services
501907
def inspect_swarm(self):
        
        url = self._url('/swarm')
        return self._result(self._get(url), True)
1168424
def get_broker_list(cluster_config):
    
    with ZK(cluster_config) as zk:
        brokers = sorted(list(zk.get_brokers().items()), key=itemgetter(0))
        return [(id, data['host']) for id, data in brokers]
890987
def list_service_providers(self, retrieve_all=True, **_params):
        """"""
        # Pass filters in "params" argument to do_request
        return self.list('service_providers', self.service_providers_path,
                         retrieve_all, **_params)
852991
def get_containers():
        
        LOGGER.debug("ContainerService.get_containers")
        params = SessionService.complete_transactional_req(None)
        if params is None:
            if MappingService.driver_type != DriverFactory.DRIVER_REST:
                params = {'OPERATION': 'getContainers'}
                args = {'properties': params}
            else:
                args = {'http_operation': 'GET', 'operation_path': ''}
        else:
            if MappingService.driver_type != DriverFactory.DRIVER_REST:
                params["OPERATION"] = "getContainers"
                args = {'properties': params}
            else:
                args = {'http_operation': 'GET', 'operation_path': '', 'parameters': params}

        response = ContainerService.requester.call(args)

        if MappingService.driver_type != DriverFactory.DRIVER_REST:
            response = response.get()

        ret = None
        if response.rc == 0:
            ret = []
            for container in response.response_content['containers']:
                ret.append(Container.json_2_container(container))
        elif response.rc != 404:
            err_msg = 'ContainerService.get_containers - Problem while getting containers. ' \
                      'Reason: ' + str(response.response_content) + ' - ' + str(response.error_message) + \
                      " (" + str(response.rc) + ")"
            LOGGER.warning(err_msg)
            if response.rc == 500 and ArianeMappingOverloadError.ERROR_MSG in response.error_message:
                raise ArianeMappingOverloadError("ContainerService.get_containers",
                                                 ArianeMappingOverloadError.ERROR_MSG)
            # traceback.print_stack()
        return ret
295009
def getServiceDependenciesUIDs(self):
        
        deps = self.getServiceDependencies()
        deps_uids = [service.UID() for service in deps]
        return deps_uids
817289
async def list(self) -> List[str]:
        

        LOGGER.debug('NodePoolManager.list >>>')

        rv = [p['pool'] for p in await pool.list_pools()]

        LOGGER.debug('NodePoolManager.list <<< %s', rv)
        return rv
1080229
def get_container_list(self) -> list:
        
        # Initialising empty list
        containers = []

        containers_list = self._client.containers.list()
        for c_list in containers_list:
            containers.append(c_list.short_id)
        return containers
1217775
def list_services(self, limit=None, marker=None):
        """"""
        return self._services_manager.list(limit=limit, marker=marker)
588561
def get_managers(self):
        
        if self._single_env:
            return None
        if not hasattr(self, '_managers'):
            self._managers = self.env.get_slave_managers()
        return self._managers
270175
def get_service_keys(self, service_name):
        
        keys = []
        for key in self._get_service_keys(service_name)['resources']:
            keys.append(key['entity']['name'])

        return keys
305033
def get_services(root, hosts_map, view=None):
  ''' 
  '''
  services_list = []
  mgmt_service = root.get_cloudera_manager().get_service()
  services_list.append({"hostname": CM_DUMMY_HOST,
                        "name": mgmt_service.name,
                        "display_name": "CM Managed Service: %s" % (mgmt_service.name,),
                        "status": get_status(mgmt_service),
                        "url": mgmt_service.serviceUrl,
                        "health_summary": mgmt_service.healthSummary})
  for cm_role in root.get_cloudera_manager().get_service().get_all_roles(view):
    services_list.append({"hostname": hosts_map[cm_role.hostRef.hostId]["hostname"],
                          "name": cm_role.name,
                          "display_name": "CM Management Service: %s" % (cm_role.name,),
                          "status": get_status(cm_role),
                          "url": cm_role.roleUrl,
                          "health_summary": cm_role.healthSummary})
  for cm_host in root.get_all_hosts(view):
    services_list.append({"hostname": hosts_map[cm_host.hostId]["hostname"],
                          "name": "cm-host-%s" % (cm_host.hostname,),
                          "display_name": "CM Managed Host: %s" % (cm_host.hostname,),
                          "status": get_status(cm_host),
                          "url": cm_host.hostUrl,
                          "health_summary": cm_host.healthSummary})
  for cluster in root.get_all_clusters(view):
    for service in cluster.get_all_services(view):
      services_list.append({"hostname": cluster.name,
                            "name": service.name,
                            "display_name": "CM Managed Service: %s" % (service.name,),
                            "status": get_status(service),
                            "url": service.serviceUrl,
                            "health_summary": service.healthSummary})
      for role in service.get_all_roles(view):
        services_list.append({"hostname": hosts_map[role.hostRef.hostId]["hostname"],
                              "name": role.name,
                              "display_name": "%s:%s" % (cluster.name, role.name,),
                              "status": get_status(role),
                              "url": role.roleUrl,
                              "health_summary": role.healthSummary})
  return services_list
479617
def get_instances(self):
        
        services = []
        for resource in self._get_instances():
            services.append(resource['entity']['name'])

        return services
579416
def get_all_services(self, view = None):
    
    return services.get_all_services(self._get_resource_root(), self.name, view)
170820
def _list_locators(self):
        
        with _handle_oss_error():
            response = _oss.Service(
                self.client, endpoint=self._endpoint).list_buckets()

        for bucket in response.buckets:
            yield bucket.name, self._model_to_dict(bucket, ('name',))
907393
def services(self):
        
        if self._services is None:
            self._services = ServiceList(self)
        return self._services
391120
def get_lists(client):
    '''  '''
    response = client.authenticated_request(client.api.Endpoints.LISTS)
    return response.json()