This property prepares the list of volumes

        :return a list of volumes.
188433
def volumes(self):
        
        return sys_volumes.VolumeCollection(
            self._conn, utils.get_subresource_path_by(self, 'Volumes'),
            redfish_version=self.redfish_version)
411691
def isos
      volumes = @compute_resource.images_by_storage('iso',params[:storage])
      respond_to do |format|
        format.json { render :json => volumes }
      end
    end
37094
def folders(self):
        ''''''
        if self._folders is None :
            self.__init()
        if self._folders is not None and isinstance(self._folders, list):
            if len(self._folders) == 0:
                self._loadFolders()
        return self._folders
196313
def _prepare_results(self, results):
        
        if self._instances:
            results = self._to_instances(results)
        else:
            results = list(results)

        # cache the len for future use
        self._len = len(results)

        return results
901363
def _convert_volume(self, volume):
        
        data = {
            'host': volume.get('hostPath'),
            'container': volume.get('containerPath'),
            'readonly': volume.get('mode') == 'RO',
        }
        return data
43559
def os_volumes(self):
        
        if not self.__os_volumes:
            self.__os_volumes = OsVolumes(self.__connection)
        return self.__os_volumes
1187885
def get_volume_list(self) -> list:
        
        # Initialising empty list
        volumes = []

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

        volume_list = self._client.volumes.list()
        for v_list in volume_list:
            volumes.append(v_list.name)
        return volumes
652215
public function doVolumePacking(): PackedBoxList
    {
        $packedBoxes = new PackedBoxList();

        //Keep going until everything packed
        while ($this->items->count()) {
            $packedBoxesIteration = [];

            //Loop through boxes starting with smallest, see what happens
            foreach ($this->boxes as $box) {
                $volumePacker = new VolumePacker($box, clone $this->items);
                $volumePacker->setLogger($this->logger);
                $packedBox = $volumePacker->pack();
                if ($packedBox->getItems()->count()) {
                    $packedBoxesIteration[] = $packedBox;

                    //Have we found a single box that contains everything?
                    if ($packedBox->getItems()->count() === $this->items->count()) {
                        break;
                    }
                }
            }

            //Find best box of iteration, and remove packed items from unpacked list
            $bestBox = $this->findBestBoxFromIteration($packedBoxesIteration);

            /** @var PackedItem $packedItem */
            foreach ($bestBox->getItems() as $packedItem) {
                $this->items->remove($packedItem->getItem());
            }

            $packedBoxes->insert($bestBox);
        }

        return $packedBoxes;
    }
486149
public void setVolumes(java.util.Collection<Volume> volumes) {
        if (volumes == null) {
            this.volumes = null;
            return;
        }

        this.volumes = new java.util.ArrayList<Volume>(volumes);
    }
382304
def get_volumes_for_container(self, container_id, skip_empty_source=True):
        
        logger.info("listing volumes for container '%s'", container_id)
        inspect_output = self.d.inspect_container(container_id)
        volumes = inspect_output['Mounts'] or []
        volume_names = [x['Name'] for x in volumes]

        if skip_empty_source:
            # Don't show volumes which are not on the filesystem
            volume_names = [x['Name'] for x in volumes if x['Source'] != ""]

        logger.debug("volumes = %s", volume_names)
        return volume_names
203942
def ingest_volumes_param(self, volumes):
        
        data = {}
        for volume in volumes:
            if volume.get('hostPath', {}).get('path'):
                data[volume.get('name')] = {
                    'path': volume.get('hostPath', {}).get('path'),
                }
            elif volume.get('emptyDir'):
                data[volume.get('name')] = {}
            else:
                data[volume.get('name')] = {}
            # TODO Support other k8s volume types?
        return data
345483
def append_volume(runtime, source, target, writable=False):
        # type: (List[Text], Text, Text, bool) -> None
        """"""
        runtime.append(u"--volume={}:{}:{}".format(
            docker_windows_path_adjust(source), target,
            "rw" if writable else "ro"))
516942
private Map<Integer, DiskScanInfo[]> getDiskReportPerNamespace() {
    if (dataset.volumes == null) {
      LOG.warn("Dataset volumes are not initialized yet");
      return new HashMap<Integer, DiskScanInfo[]>();
    }
    // First get list of data directories
    FSVolume[] volumes = dataset.volumes.getVolumes();
    ScanInfoListPerNamespace[] volumeReports = 
        new ScanInfoListPerNamespace[volumes.length];
    
    Map<Integer, Future<ScanInfoListPerNamespace>> volumeCompilers =
      new HashMap<Integer, Future<ScanInfoListPerNamespace>>();
    for (int i = 0; i < volumes.length; i++) {
      // check volume is valid
      if (dataset.volumes.isValid(volumes[i])) {
        // and run compiler for it
        ReportCompiler reportCompiler =
          new ReportCompiler(volumes[i], datanode);
        Future<ScanInfoListPerNamespace> result = 
          reportCompileThreadPool.submit(reportCompiler);
        volumeCompilers.put(i, result);
      }
    }
    
    for(Entry<Integer, Future<ScanInfoListPerNamespace>> e : volumeCompilers.entrySet()) {
      try {
        int volume = e.getKey();
        volumeReports[volume] = e.getValue().get();
      } catch (Exception ex) {
        LOG.error("Error compiling report", ex);
        // Propagate ex to DataBlockScanner to deal with
        throw new RuntimeException(ex);
      }
    }

    // Compile consolidated report for all the volumes
    ScanInfoListPerNamespace list = new ScanInfoListPerNamespace();
    for (int i = 0; i < volumes.length; i++) {
      if (dataset.volumes.isValid(volumes[i])) { // volume is still valid
        list.addAll(volumeReports[i]);
      }
    }

    return list.toSortedArrays();
  }
1193058
def list():
    ''''''
    fields = [
        ('Name', 'name'),
        ('ID', 'id'),
        ('Owner', 'is_owner'),
        ('Permission', 'permission'),
    ]
    with Session() as session:
        try:
            resp = session.VFolder.list()
            if not resp:
                print('There is no virtual folders created yet.')
                return
            rows = (tuple(vf[key] for _, key in fields) for vf in resp)
            hdrs = (display_name for display_name, _ in fields)
            print(tabulate(rows, hdrs))
        except Exception as e:
            print_error(e)
            sys.exit(1)
192154
def _parse_volumes(volume_values: dict) -> str:
        
        for v_values in volume_values:
            for v_key, v_value in v_values.items():
                if v_key == 'source':
                    if v_value == '.':
                        source = os.path.dirname(
                            os.path.abspath(__file__))
                    else:
                        source = v_value
                if v_key == 'target':
                    target = v_value
            volume_spec = [source + ':' + target]
            return volume_spec
1327978
def get_volume(name)
      params = {
          'command' => 'listVolumes',
          'name' => name
      }
      json = send_request(params)
      volumes = json['volume']

      if !volumes || volumes.empty? then
        return nil
      end
      volume = volumes.select { |item| name == item['name'] }
      volume.first
    end
1005458
def get_volumes(self):
        
        vols = [self.find_volume(name) for name in self.virsp.listVolumes()]
        return vols