list[VolumeExtent]: volume extents.
439142
def extents(self):
    """"""
    if not self._is_parsed:
      self._Parse()
      self._is_parsed = True

    return self._extents
296980
def lvresize(size=None, lvpath=None, extents=None):
    '''
    

    '''
    if size and extents:
        log.error('Error: Please specify only one of size or extents')
        return {}

    cmd = ['lvresize']

    if size:
        cmd.extend(['-L', '{0}'.format(size)])
    elif extents:
        cmd.extend(['-l', '{0}'.format(extents)])
    else:
        log.error('Error: Either size or extents must be specified')
        return {}

    cmd.append(lvpath)
    cmd_ret = __salt__['cmd.run'](cmd, python_shell=False).splitlines()
    return {'Output from lvresize': cmd_ret[0].strip()}
52078
def list_quota_volume(name):
    '''
    
    '''
    cmd = 'volume quota {0}'.format(name)
    cmd += ' list'

    root = _gluster_xml(cmd)
    if not _gluster_ok(root):
        return None

    ret = {}
    for limit in _iter(root, 'limit'):
        path = limit.find('path').text
        ret[path] = _etree_to_dict(limit)

    return ret
49015
def _volume(shape):
    """"""
    prod = 1
    for start, stop in shape:
        prod *= stop - start
    return prod
912996
def get(self, volume_ids=None, filters=None):
        """"""
        params = {}
        if filters:
            params["filters"] = make_filters(filters)
        if isinstance(volume_ids, str):
            volume_ids = [volume_ids]
        return self.call("DescribeVolumes",
                         VolumeIds=volume_ids,
                         response_data_key="Volumes",
                         **params)
1102078
def get_volumes(self):
        """"""

        volumes = []
        for disk in self.disks:
            volumes.extend(disk.get_volumes())
        return volumes
455446
def dim_lower_extent_dict(self):
        
        return { d.name: d.lower_extent for d in self._dims.itervalues()}
1299010
def list_ebs(region, filter_by_kwargs):
    """"""
    conn = boto.ec2.connect_to_region(region)
    instances = conn.get_all_volumes()
    return lookup(instances, filter_by=filter_by_kwargs)
420233
def get_volume_options(volumes):
        
        if not isinstance(volumes, list):
            volumes = [volumes]
        volumes = [Volume.create_from_tuple(v) for v in volumes]
        result = []
        for v in volumes:
            result += ["-v", str(v)]
        return result
1356233
def extendlist(lst, i, value=''):
    """"""
    if i < len(lst):
        pass
    else:
        lst.extend([value, ] * (i - len(lst) + 1))
592072
def _extents(self):
        
        return (
            self._parent.width - self.margin_left - self.margin_right,
            self._parent.height - self.margin_top - self.margin_bottom
        )
940497
def ListFiles(self, ext_attrs=False):
    """"""
    if not self.IsDirectory():
      raise IOError("%s is not a directory." % self.path)

    for path in self.files:
      try:
        filepath = utils.JoinPath(self.path, path)
        response = self._Stat(filepath, ext_attrs=ext_attrs)
        pathspec = self.pathspec.Copy()
        pathspec.last.path = utils.JoinPath(pathspec.last.path, path)
        response.pathspec = pathspec

        yield response
      except OSError:
        pass
481392
def listContents(self):
        
        vols = list(self.listVolumes())
        vols.sort(key=lambda v: self.getSendPath(v))
        return [vol.display(self, detail="line") for vol in vols]
604364
def describe_volumes(self, *volume_ids):
        """"""
        volumeset = {}
        for pos, volume_id in enumerate(volume_ids):
            volumeset["VolumeId.%d" % (pos + 1)] = volume_id
        query = self.query_factory(
            action="DescribeVolumes", creds=self.creds, endpoint=self.endpoint,
            other_params=volumeset)
        d = query.submit()
        return d.addCallback(self.parser.describe_volumes)
939414
def extents(self):
        
        extents = self.bounds.ptp(axis=0)
        extents.flags.writeable = False
        return extents
112509
def _listdir(pth, extensions):
    """"""
    try:
        return [fname for fname in os.listdir(pth)
                if os.path.splitext(fname)[1] in extensions]
    except OSError:  # pragma: nocover
        pass
817753
def extent_location(self):
        # type: () -> int
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF NSR Volume Structure not yet initialized')

        if self.new_extent_loc < 0:
            return self.orig_extent_loc
        return self.new_extent_loc