Skip to content

Commit

Permalink
Snapshots are removed with force parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
franklupo committed Jul 12, 2022
1 parent a13ce48 commit 77a5ce7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ In this version the tool works outside the Proxmox VE host using the API. The re
* Support different timestamp format with parameter --timestamp-format
* Check the storage space used by the disks in the VM / CT is available by default (95%) parameter --max-perc-storage
* Execution with file parameter e.g. @FileParameter.parm
* Snapshots are removed with **force** parameter

## Permission

Expand Down
8 changes: 7 additions & 1 deletion src/Corsinvest.ProxmoxVE.AutoSnap.Api/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,13 @@ private async Task<bool> SnapshotsRemove(IClusterResourceVm vm,
var inError = false;
if (!_dryRun)
{
var result = await SnapshotHelper.RemoveSnapshot(_client, vm.Node, vm.VmType, vm.VmId, snapshot.Name, timeout);
var result = await SnapshotHelper.RemoveSnapshot(_client,
vm.Node,
vm.VmType,
vm.VmId,
snapshot.Name,
timeout,
true);
inError = result.InError();
if (inError) { _out.WriteLine(result.GetError()); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net6.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<Version>1.8.11</Version>
<Version>1.8.12</Version>
<Company>Corsinvest Srl</Company>
<Authors>Daniele Corsini</Authors>
<Copyright>Corsinvest Srl</Copyright>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<Version>1.14.4</Version>
<Version>1.14.5</Version>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>cv4pve-autosnap</AssemblyName>
<Company>Corsinvest Srl</Company>
Expand All @@ -19,7 +19,7 @@
<PackageReference Include="Corsinvest.ProxmoxVE.Api.Shell" Version="7.3.2" />

<!-- <ProjectReference Include="..\Corsinvest.ProxmoxVE.AutoSnap.Api\Corsinvest.ProxmoxVE.AutoSnap.Api.csproj" /> -->
<PackageReference Include="Corsinvest.ProxmoxVE.AutoSnap.Api" Version="1.8.11" />
<PackageReference Include="Corsinvest.ProxmoxVE.AutoSnap.Api" Version="1.8.12" />
</ItemGroup>

<Target Name="SpicNSpan" AfterTargets="Clean">
Expand Down

0 comments on commit 77a5ce7

Please sign in to comment.