List Swift containers
559081
def get_account(self):
        '''
        
        '''
        try:
            listing = self.conn.get_account()
            return listing
        except Exception as exc:
            log.error('There was an error::')
            if hasattr(exc, 'code') and hasattr(exc, 'msg'):
                log.error('    Code: %s: %s', exc.code, exc.msg)
            log.error('    Content: \n%s', getattr(exc, 'read', lambda: six.text_type(exc))())
            return False
127669
function list(appName, callback) {
    if (!appName) {
      return callback(ArgumentError('appName'));
    }

    var uri = format('/%s/apps/%s/config/', deis.version, appName);
    commons.get(uri, function onListResponse(err, result) {
      console.log(result);
      callback(err, result ? extractLimits(result) : null);
    });
  }
177463
def list_containers(self):
        
        data = run_cmd(["machinectl", "list", "--no-legend", "--no-pager"],
                       return_output=True)
        output = []
        reg = re.compile(r"\s+")
        for line in data.split("\n"):
            stripped = line.strip()
            if stripped:
                parts = reg.split(stripped)
                name = parts[0]
                output.append(self.ContainerClass(None, None, name=name))
        return output
14508
def file_items(container, iterable):
    

    # container._value = copy(iterable)

    container.nodes = set()
    container.variables = set()
    container.deterministics = set()
    container.stochastics = set()
    container.potentials = set()
    container.observed_stochastics = set()

    # containers needs to be a list to hold unhashable items.
    container.containers = []

    i = -1

    for item in iterable:

        # If this is a dictionary, switch from key to item.
        if isinstance(iterable, (dict, dict_proxy_type)):
            key = item
            item = iterable[key]
        # Item counter
        else:
            i += 1

        # If the item isn't iterable, file it away.
        if isinstance(item, Variable):
            container.variables.add(item)
            if isinstance(item, StochasticBase):
                if item.observed or not getattr(item, 'mask', None) is None:
                    container.observed_stochastics.add(item)
                if not item.observed:
                    container.stochastics.add(item)
            elif isinstance(item, DeterministicBase):
                container.deterministics.add(item)
        elif isinstance(item, PotentialBase):
            container.potentials.add(item)

        elif isinstance(item, ContainerBase):
            container.assimilate(item)
            container.containers.append(item)

        # Wrap internal containers
        elif hasattr(item, '__iter__'):

            # If this is a non-object-valued ndarray, don't container-ize it.
            if isinstance(item, ndarray):
                if item.dtype != dtype('object'):
                    continue

            # If the item is iterable, wrap it in a container. Replace the item
            # with the wrapped version.
            try:
                new_container = Container(item)
            except:
                continue

            # Update all of container's variables, potentials, etc. with the new wrapped
            # iterable's. This process recursively unpacks nested iterables.
            container.assimilate(new_container)

            if isinstance(container, dict):
                container.replace(key, new_container)
            elif isinstance(container, tuple):
                return container[:i] + (new_container,) + container[i + 1:]
            else:
                container.replace(item, new_container, i)

    container.nodes = container.potentials | container.variables

    # 'Freeze' markov blanket, moral neighbors, coparents of all constituent stochastics
    # for future use
    for attr in ['moral_neighbors', 'markov_blanket', 'coparents']:
        setattr(container, attr, {})
    for s in container.stochastics:
        for attr in ['moral_neighbors', 'markov_blanket', 'coparents']:
            getattr(container, attr)[s] = getattr(s, attr)
490351
function(c) {
    return c.cid || c.id || c.containerName || c.containerID || c.name;
  }
131040
def list_streams(self, types=[], inactive=False):
        '''  '''
        req_hook = 'pod/v1/streams/list'
        json_query = {
                       "streamTypes": types,
                       "includeInactiveStreams": inactive
                     }
        req_args = json.dumps(json_query)
        status_code, response = self.__rest__.POST_query(req_hook, req_args)
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
839954
def _get_containers(self):
        """"""

        def full_fn(path):
            return os.path.join(self.abs_root, path)
        return [self.cont_cls.from_path(self, d)
                for d in os.listdir(self.abs_root) if is_dir(full_fn(d))]
1259481
def getContainers(self):
        
        _containers = []
        for container in self.bika_setup.bika_containers.objectValues():
            containertype = container.getContainerType()
            if containertype and containertype.UID() == self.UID():
                _containers.append(container)
        return _containers
152217
def list(self, argv):
        """"""

        def read(index):
            print(index.name)
            for key in sorted(index.content.keys()): 
                value = index.content[key]
                print("    %s: %s" % (key, value))

        if len(argv) == 0:
            for index in self.service.indexes:
                count = index['totalEventCount']
                print("%s (%s)" % (index.name, count))
        else:
            self.foreach(argv, read)
559566
def get_containers(config,
                   all=True,
                   trunc=False,
                   since=None,
                   before=None,
                   limit=-1,
                   *args,
                   **kwargs):
    '''
    
    '''
    err = "Unknown"
    client = _get_client(config)
    try:
        ret = client.containers(all=all,
                                trunc=trunc,
                                since=since,
                                before=before,
                                limit=limit)
        return ret
    except Exception as e:
        err = e
    utils.error("Unable to list Docker containers: %s"%err)
    return None
936906
function (container, property) {
            var output = [], entry;
            for (var i = 0, len = container.length; i < len; i++) {
                entry = container[i];
                if (entry[property]) {
                    output.push(entry[property]);
                }
            }
            return output;
        }
399743
def as_list(cls, protocol=Protocol.http, *args, **kwargs):
        '''  '''
        return cls.as_view('list', protocol, *args, **kwargs)
1139085
def list_public_containers(self):
        
        resp, resp_body = self.api.cdn_request("", "GET")
        return [cont["name"] for cont in resp_body]
1325101
async def list(self):
        '''
        
        '''
        return [(name, await tank.info()) for (name, tank) in self.tanks.items()]
792297
def containers
      if @containers.nil? && !info[:containers].nil?
        @containers = []
        info[:containers].each do |uri|
          @containers.push(client.containers.get_from_uri(uri))
        end
      end
      @containers
    end
251392
def list_blobs(storage_conn=None, **kwargs):
    '''
    
    '''
    if not storage_conn:
        storage_conn = get_storage_conn(opts=kwargs)

    if 'container' not in kwargs:
        raise SaltSystemExit(
            code=42,
            msg='An storage container name must be specified as "container"'
        )

    data = storage_conn.list_blobs(
        container_name=kwargs['container'],
        prefix=kwargs.get('prefix', None),
        marker=kwargs.get('marker', None),
        maxresults=kwargs.get('maxresults', None),
        include=kwargs.get('include', None),
        delimiter=kwargs.get('delimiter', None),
    )

    ret = {}
    for item in data.blobs:
        ret[item.name] = object_to_dict(item)
    return ret
112294
def list_containers(self):
        
        containers = []
        for container in self._list_podman_containers():
            identifier = container["ID"]
            name = container["Names"]
            image_name = container["Image"]

            try:
                image_name, image_tag = parse_reference(image_name)
            except (IndexError, TypeError):
                image_name, image_tag = None, None

            image = PodmanImage(image_name, tag=image_tag, identifier=None)
            container = PodmanContainer(image, identifier, name=name)
            containers.append(container)

        return containers