Exemplo n.º 1
0
        /// <inheritdoc cref="ComputeApi.SnapshotVolumeAsync{T}" />
        public Task <VolumeSnapshot> SnapshotAsync(VolumeSnapshotDefinition snapshot = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (snapshot == null)
            {
                snapshot = new VolumeSnapshotDefinition();
            }

            snapshot.VolumeId = Id;

            var owner = this.GetOwnerOrThrow <ComputeApi>();

            return(owner.SnapshotVolumeAsync <VolumeSnapshot>(snapshot, cancellationToken));
        }
Exemplo n.º 2
0
        /// <inheritdoc cref="ComputeApi.SnapshotVolumeAsync{T}" />
        public Task<VolumeSnapshot> SnapshotAsync(VolumeSnapshotDefinition snapshot = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            if(snapshot == null)
                snapshot = new VolumeSnapshotDefinition();

            snapshot.VolumeId = Id;

            var owner = this.GetOwnerOrThrow<ComputeApi>();
            return owner.SnapshotVolumeAsync<VolumeSnapshot>(snapshot, cancellationToken);
        }
Exemplo n.º 3
0
 /// <inheritdoc cref="Volume.SnapshotAsync"/>
 public static VolumeSnapshot Snapshot(this Volume volume, VolumeSnapshotDefinition snapshot = null)
 {
     return volume.SnapshotAsync(snapshot).ForceSynchronous();
 }
Exemplo n.º 4
0
 /// <inheritdoc cref="ComputeApi.SnapshotVolumeAsync{T}" />
 public Task <VolumeSnapshot> SnapshotVolumeAsync(VolumeSnapshotDefinition snapshot, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(_computeApi.SnapshotVolumeAsync <VolumeSnapshot>(snapshot, cancellationToken));
 }
 /// <inheritdoc cref="ComputeService.SnapshotVolumeAsync" />
 public static VolumeSnapshot SnapshotVolume(this ComputeService service, VolumeSnapshotDefinition snapshot)
 {
     return service.SnapshotVolumeAsync(snapshot).ForceSynchronous();
 }