Iterate over all the bridges in the system.
775060
def iterbridges():
    '''  '''
    net_files = os.listdir(SYSFS_NET_PATH)
    for d in net_files:
        path = os.path.join(SYSFS_NET_PATH, d)
        if not os.path.isdir(path):
            continue
        if os.path.exists(os.path.join(path, b"bridge")):
            yield Bridge(d)
116576
def iterlists(self):
        """"""
        for key, values in dict.iteritems(self):
            yield key, list(values)
1194576
def search_lxc_bridges():
    '''
    

    '''
    bridges = __context__.get('lxc.bridges', None)
    # either match not yet called or no bridges were found
    # to handle the case where lxc was not installed on the first
    # call
    if not bridges:
        bridges = set()
        running_bridges = set()
        bridges.add(DEFAULT_BR)
        try:
            output = __salt__['cmd.run_all']('brctl show')
            for line in output['stdout'].splitlines()[1:]:
                if not line.startswith(' '):
                    running_bridges.add(line.split()[0].strip())
        except (SaltInvocationError, CommandExecutionError):
            pass
        for ifc, ip in six.iteritems(
            __grains__.get('ip_interfaces', {})
        ):
            if ifc in running_bridges:
                bridges.add(ifc)
            elif os.path.exists(
                '/sys/devices/virtual/net/{0}/bridge'.format(ifc)
            ):
                bridges.add(ifc)
        bridges = list(bridges)
        # if we found interfaces that have lxc in their names
        # we filter them as being the potential lxc bridges
        # we also try to default on br0 on other cases

        def sort_bridges(a):
            pref = 'z'
            if 'lxc' in a:
                pref = 'a'
            elif 'br0' == a:
                pref = 'c'
            return '{0}_{1}'.format(pref, a)
        bridges.sort(key=sort_bridges)
        __context__['lxc.bridges'] = bridges
    return bridges
930432
def get_all(self):
        # type: () -> typing.Iterable[typing.Tuple[str, str]]
        
        for name, values in six.iteritems(self._as_list):
            for value in values:
                yield (name, value)
634244
def atoms_iter(self):
        """"""
        for n, atom in self.graph.nodes.data("atom"):
            yield n, atom
468065
def all(self):
        
        result = self.invoke()
        if self.resolve_links:
            result.resolve_links()

        return result
1236726
public function all()
    {
        $this->forAuthorization();
        $this->forAccessTokens();
        $this->forTransientTokens();
        $this->forClients();
        $this->forPersonalAccessTokens();
    }
50241
def _iter(self):
        
        keys = self.keys()
        while keys:
            key = keys[0]
            yield key
            keys = keys[1:]
1151708
def all(self, res):
        ""
        B = get_backend()
        return B.get_objects(B.get_concrete(res))
590797
public function getBridges()
    {
        $uri = 'bridges';
        $response = $this->client->getEndpoint()->get($uri);

        $bridges = [];
        foreach (\GuzzleHttp\json_decode($response->getBody()) as $bridge) {
            $bridges[] = new Bridge($this->client, $bridge);
        }

        return $bridges;
    }
156087
function all(iterable){
    var C          = this
      , capability = newPromiseCapability(C)
      , resolve    = capability.resolve
      , reject     = capability.reject;
    var abrupt = perform(function(){
      var values    = []
        , index     = 0
        , remaining = 1;
      _forOf(iterable, false, function(promise){
        var $index        = index++
          , alreadyCalled = false;
        values.push(undefined);
        remaining++;
        C.resolve(promise).then(function(value){
          if(alreadyCalled)return;
          alreadyCalled  = true;
          values[$index] = value;
          --remaining || resolve(values);
        }, reject);
      });
      --remaining || resolve(values);
    });
    if(abrupt)reject(abrupt.error);
    return capability.promise;
  }
192538
def all(self):
        
        project_list = self.fetch('projects.json').get("projects")
        obj_list = []
        for proj in project_list:
            proj['_connection'] = self._connection
            proj = Project(proj)
            obj_list.append(proj)
        return obj_list
659519
def iteritems(self):
        ''''''
        for x in range(len(self.keys)):
            yield (self.keys[x], self.values[x])
766650
def find_interfaces(*args):
    '''
    
    '''
    brs = _os_dispatch('brshow')
    if not brs:
        return None

    iflist = {}

    for iface in args:
        for br in brs:
            try:  # a bridge may not contain interfaces
                if iface in brs[br]['interfaces']:
                    iflist[iface] = br
            except Exception:
                pass

    return iflist
187406
def recursive_iter(enumerables):
    '''
    
    '''
    if not is_collection(enumerables) or isinstance(enumerables, (basestring, dict)):
        yield enumerables
    else:
        for elem in enumerables:
            for sub_elem in recursive_iter(elem):
                yield sub_elem
728212
def iter_related(self):
        '''
        
        '''
        for tpl in self.provider_run.templates:
            yield tpl.providers[self.index]
907094
def all(self, paths, access=None):
        """"""
        self.failures = [path for path in paths if not
                         isvalid(path, access, filetype='all')]

        return not self.failures