Returns a list of all snapshots of this volume.
344654
def list_snapshots(self):
        
        return [snap for snap in self.manager.list_snapshots()
                if snap.volume_id == self.id]
52364
def snapshot(self):
        
        return dict((category, dict((name, metric.value())
                                    for name, metric in list(metrics.items())))
                    for category, metrics in
                    list(self._store.items()))
1015320
public java.util.List<String> getVolumeIds() {
        if (volumeIds == null) {
            volumeIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return volumeIds;
    }
1220246
def all(self):
        
        partitions = []

        query = text("""
            SELECT dataset_vid, vid
            FROM partition_index;""")

        for result in self.execute(query):
            dataset_vid, vid = result
            partitions.append(PartitionSearchResult(dataset_vid=dataset_vid, vid=vid, score=1))
        return partitions
313736
def snapshots(self):
        
        j, _ = self.datacenter.request('GET', self.path + '/snapshots')
        return [Snapshot(machine=self, data=s) for s in j]
935943
def _get_source_snapshots(self, snapshot, fallback_self=False):
        
        if not snapshot:
            return []

        source_snapshots = re.findall(r"'([\w\d\.-]+)'", snapshot['Description'])
        if not source_snapshots and fallback_self:
            source_snapshots = [snapshot['Name']]

        source_snapshots.sort()
        return source_snapshots
294343
public java.util.List<Snapshot> getSnapshots() {
        if (snapshots == null) {
            snapshots = new com.amazonaws.internal.SdkInternalList<Snapshot>();
        }
        return snapshots;
    }
1167659
def _remove_old_snapshots(connection, volume):
    
    if 'AutomatedEBSSnapshotsRetention' not in volume.tags:
        logger.warning(
            'Missing tag AutomatedEBSSnapshotsRetention for volume {}'.format(
                volume.id))
        return
    retention = int(volume.tags['AutomatedEBSSnapshotsRetention'])

    snapshots = connection.get_all_snapshots(filters={'volume-id': volume.id})

    # Sort the list based on the start time
    snapshots.sort(key=lambda x: x.start_time)

    # Remove snapshots we want to keep
    snapshots = snapshots[:-int(retention)]

    if not snapshots:
        logger.info('No old snapshots to remove')
        return

    for snapshot in snapshots:
        logger.info('Deleting snapshot {}'.format(snapshot.id))
        try:
            snapshot.delete()
        except EC2ResponseError as error:
            logger.warning('Could not remove snapshot: {}'.format(
                error.message))

    logger.info('Done deleting snapshots')
1172646
public java.util.List<String> getSnapshotIds() {
        if (snapshotIds == null) {
            snapshotIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return snapshotIds;
    }
815378
def get_snapshots(self,**kwargs):
        
        commits = self.repository.get_commits(**kwargs)
        snapshots = []
        for commit in commits:
            for key in ('committer_date','author_date'):
                commit[key] = datetime.datetime.fromtimestamp(commit[key+'_ts'])
            snapshot = GitSnapshot(commit)
            hasher = Hasher()
            hasher.add(snapshot.sha)
            snapshot.hash = hasher.digest.hexdigest()
            snapshot.project = self.project
            snapshot.pk = uuid.uuid4().hex
            snapshots.append(snapshot)
        return snapshots
1045071
def get_volume_snapshots(name)
      begin
        @volume.get_volume_snapshots(name)
      rescue => ex
        Util.log_exception(ex, caller_locations(1, 1)[0].label)
        raise ex
      end
    end
134306
def get_snapshots(self):
        
        ec2 = self.get_ec2_connection()
        rs = ec2.get_all_snapshots()
        all_vols = [self.volume_id] + self.past_volume_ids
        snaps = []
        for snapshot in rs:
            if snapshot.volume_id in all_vols:
                if snapshot.progress == '100%':
                    snapshot.date = boto.utils.parse_ts(snapshot.start_time)
                    snapshot.keep = True
                    snaps.append(snapshot)
        snaps.sort(cmp=lambda x,y: cmp(x.date, y.date))
        return snaps
429566
def volume_list(self, search_opts=None):
        '''
        
        '''
        if self.volume_conn is None:
            raise SaltCloudSystemExit('No cinder endpoint available')
        nt_ks = self.volume_conn
        volumes = nt_ks.volumes.list(search_opts=search_opts)
        response = {}
        for volume in volumes:
            response[volume.display_name] = {
                'name': volume.display_name,
                'size': volume.size,
                'id': volume.id,
                'description': volume.display_description,
                'attachments': volume.attachments,
                'status': volume.status
            }
        return response
729822
def restore_from_snapshot(self, volume_id, snapshot_id):
        

        return self.client.call('Network_Storage', 'restoreFromSnapshot',
                                snapshot_id, id=volume_id)
210859
def get_snapshots(self, si, logger, vm_uuid):
        
        vm = self.pyvmomi_service.find_by_uuid(si, vm_uuid)
        logger.info("Get snapshots")
        snapshots = SnapshotRetriever.get_vm_snapshots(vm)

        return snapshots.keys()
730247
def volumes(self):
        
        if not self.__volumes:
            self.__volumes = Volumes(self.__connection)
        return self.__volumes
76256
def volumes(self):
        
        return [
            EBSVolume(res) for res in db.Resource.join(
                ResourceProperty, Resource.resource_id == ResourceProperty.resource_id
            ).filter(
                Resource.resource_type_id == ResourceType.get('aws_ebs_volume').resource_type_id,
                ResourceProperty.name == 'attachments',
                func.JSON_CONTAINS(ResourceProperty.value, func.JSON_QUOTE(self.id))
            ).all()
        ]