From 614908d23a6512fb4437020a2d85562cd3f334a6 Mon Sep 17 00:00:00 2001 From: Daniele Corsini Date: Wed, 23 Oct 2019 09:14:19 +0200 Subject: [PATCH] Change licensing --- .../.gitignore => .gitignore | 0 .vscode/launch.json | 10 +++--- 3rd-party-licenses.md | 19 ++++++++++ Corsinvest.ProxmoxVE.AutoSnap.sln | 15 ++++---- LICENSE.md | 25 +++++++++++++ README.md | 35 +++++++++---------- LICENSE => gpl-3.0.txt | 0 script-hook.bat | 9 +++++ script-hook.sh | 9 +++++ src/Corsinvest.ProxmoxVE.AutoSnap/Commands.cs | 18 ++++------ .../Corsinvest.ProxmoxVE.AutoSnap.csproj | 6 ++-- .../OutputType.cs | 20 ++++------- src/Corsinvest.ProxmoxVE.AutoSnap/Program.cs | 20 ++++------- .../ShellCommands.cs | 22 +++++------- src/Corsinvest.ProxmoxVE.AutoSnap/build.ps1 | 18 ++++------ 15 files changed, 129 insertions(+), 97 deletions(-) rename src/Corsinvest.ProxmoxVE.AutoSnap/.gitignore => .gitignore (100%) create mode 100644 3rd-party-licenses.md create mode 100644 LICENSE.md rename LICENSE => gpl-3.0.txt (100%) diff --git a/src/Corsinvest.ProxmoxVE.AutoSnap/.gitignore b/.gitignore similarity index 100% rename from src/Corsinvest.ProxmoxVE.AutoSnap/.gitignore rename to .gitignore diff --git a/.vscode/launch.json b/.vscode/launch.json index ca27743..23137f2 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,9 +1,9 @@ { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md - "version": "0.2.0", - "configurations": [ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ { "name": ".NET Core Launch (console)", "type": "coreclr", diff --git a/3rd-party-licenses.md b/3rd-party-licenses.md new file mode 100644 index 0000000..a6e7c80 --- /dev/null +++ b/3rd-party-licenses.md @@ -0,0 +1,19 @@ +# License overview of included 3rd party libraries + +The project is licensed under the terms of the [LICENSE.md](LICENSE.md) + +However, includes several third-party Open-Source libraries, which are licensed under their own respective Open-Source licenses. + +## Libraries directly included + +[Corsinvest ProxmoxVE Api](https://github.com/Corsinvest/cv4pve-api-dotnet) +License: GPLv3 + +[Corsinvest ProxmoxVE Api Extension](https://github.com/Corsinvest/cv4pve-api-dotnet) +License: GPLv3 + +[Dotnet Core](https://github.com/dotnet/core) +License: MIT + +[ReadLine](https://github.com/tonerdo/readline) +License: MIT diff --git a/Corsinvest.ProxmoxVE.AutoSnap.sln b/Corsinvest.ProxmoxVE.AutoSnap.sln index 6c84828..c6a474e 100644 --- a/Corsinvest.ProxmoxVE.AutoSnap.sln +++ b/Corsinvest.ProxmoxVE.AutoSnap.sln @@ -1,11 +1,11 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29403.142 MinimumVisualStudioVersion = 15.0.26124.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C6B0694C-362C-4BEE-8EBA-28ECF5780D57}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Corsinvest.ProxmoxVE.AutoSnap", "src\Corsinvest.ProxmoxVE.AutoSnap\Corsinvest.ProxmoxVE.AutoSnap.csproj", "{6D4D450B-25C7-4CC8-AFB5-3EFCBD32EC37}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Corsinvest.ProxmoxVE.AutoSnap", "src\Corsinvest.ProxmoxVE.AutoSnap\Corsinvest.ProxmoxVE.AutoSnap.csproj", "{6D4D450B-25C7-4CC8-AFB5-3EFCBD32EC37}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -16,9 +16,6 @@ Global Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6D4D450B-25C7-4CC8-AFB5-3EFCBD32EC37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6D4D450B-25C7-4CC8-AFB5-3EFCBD32EC37}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -33,7 +30,13 @@ Global {6D4D450B-25C7-4CC8-AFB5-3EFCBD32EC37}.Release|x86.ActiveCfg = Release|Any CPU {6D4D450B-25C7-4CC8-AFB5-3EFCBD32EC37}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection GlobalSection(NestedProjects) = preSolution {6D4D450B-25C7-4CC8-AFB5-3EFCBD32EC37} = {C6B0694C-362C-4BEE-8EBA-28ECF5780D57} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FF0CE8AE-82AF-4E55-B4CF-21752D47280F} + EndGlobalSection EndGlobal diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..60e758e --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,25 @@ +# License + +Copyright (C) Corsinvest Srl + +This software is available under two different licenses: + +* GNU General Public License version 3 (GPLv3) +* Corsinvest Enterprise License (CEL) + +The default license, without a valid Corsinvest Enterprise License (CEL) agreement, is the Open-Source GPLv3 license. + +## GNU General Public License version 3 (GPLv3) + +If you decide to choose the GPLv3 license, you must comply with the following terms: +[GPLv3](gpl-3.0.txt) + +## Corsinvest Enterprise License (CEL) + +Alternatively, commercial and supported versions of the program - also known as Enterprise Distributions - must be used in accordance with the terms and conditions contained in a separate written agreement between you and Corsinvest Srl. For more information about the Corsinvest Enterprise License (CEL) please visit [site](https://www.corsinvest.it/open-source#license) + +Please see also (files in this directory): + +[GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](gpl-3.0.txt) + +[Libraries used including their own licenses - 3rd-party-licenses.md](3rd-party-licenses.md) diff --git a/README.md b/README.md index 565202a..c3a2130 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,6 @@ # cv4pve-autosnap -[![License](https://img.shields.io/github/license/Corsinvest/cv4pve-autosnap.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html) -[![Gitter](https://badges.gitter.im/Corsinvest/cv4pve-autosnap.svg)](https://gitter.im/Corsinvest/cv4pve-autosnap) -[![Release](https://img.shields.io/github/release/Corsinvest/cv4pve-autosnap.svg)](https://github.com/Corsinvest/cv4pve-autosnap/releases/latest) -![GitHub All Releases](https://img.shields.io/github/downloads/Corsinvest/cv4pve-autosnap/total.svg) [![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=PPM9JHLQLRV2S&item_name=Open+Source+Project¤cy_code=EUR&source=url) +[![License](https://img.shields.io/github/license/Corsinvest/cv4pve-autosnap.svg)](LICENSE.md) [![Release](https://img.shields.io/github/release/Corsinvest/cv4pve-autosnap.svg)](https://github.com/Corsinvest/cv4pve-autosnap/releases/latest) ![GitHub All Releases](https://img.shields.io/github/downloads/Corsinvest/cv4pve-autosnap/total.svg) Proxmox VE automatic snapshot tool @@ -13,12 +10,6 @@ Proxmox VE automatic snapshot tool ## The old bash version inside Proxmox VE is no longer supported because the Proxmox VE developers continue to change output. The risk of incompatibility is high. With the new version that uses native APIs, the problem no longer exists -# **Donations** - -If you like my work and want to support it, then please consider to deposit a donation through **Paypal** by clicking on the next button: - -[![paypal](https://www.paypalobjects.com/en_US/IT/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=PPM9JHLQLRV2S&item_name=Open+Source+Project¤cy_code=EUR&source=url) - ```text ______ _ __ / ____/___ __________(_)___ _ _____ _____/ /_ @@ -28,8 +19,6 @@ If you like my work and want to support it, then please consider to deposit a do Corsinvest for Proxmox VE Auto Snapshot (Made in Italy) -Automatic snapshot with retention - Usage: cv4pve-autosnap [options] [command] Options: @@ -37,6 +26,7 @@ Options: --host The host name host[:port] --username User name @ --password The password. Specify 'file:path_file' to store password in file. + --version Show version information --vmid The id or name VM/CT comma separated (eg. 100,101,102,TestDebian) -vmid or -name exclude (e.g. -200, -TestUbuntu), 'all-???' for all VM/CT in specific host (e.g. all-pve1, all-\$(hostname)), @@ -48,10 +38,17 @@ Commands: status Get list of all auto snapshots Run 'cv4pve-autosnap [command] --help' for more information about a command. - -Report bugs to ``` +## Copyright and License + +Copyright: Corsinvest Srl +For licensing details please visit [LICENSE.md](LICENSE.md) + +## Commercial Support + +This software is part of a suite of tools called cv4pve-tools. If you want commercial support, visit the [site](https://www.corsinvest.it/cv4pve-tools) + ## Introduction Automatic snapshot for Proxmox VE with retention. @@ -71,10 +68,10 @@ For the planning process using an external machine: ## Main features -* Completely rewritten in C# -* Use native api REST Proxmox VE (library C#) +* Completely written in C# +* Use native Api REST Proxmox VE (library C#) * Independent os (Windows, Linux, Macosx) -* Installation unzip file extract binary +* Installation rapid, unzip file extract binary * Not require installation in Proxmox VE * Execute out side Proxmox VE * For KVM and LXC @@ -84,11 +81,12 @@ For the planning process using an external machine: * Clean all snapshots * Multiple schedule VM/CT using --label (es. daily,monthly) * Hook script -* Multiple VM/CT (100,102,ubuvm,debvm,pipperovm,fagianovm or all) in a single execution +* Multiple VM/CT (100,102,ubuVm,debVm,pipperoVm,fagianoVm or all) in a single execution * Exclusion specific VM/CT using minus e.g --vmid=all,-100 * Exclusion template from snapshot * Waiting for the snapshot process to finish * Alerting in QEMU, agent not enabled. +* Save memory VM Qemu in snap using parameter --state. ## Configuration and use @@ -117,6 +115,7 @@ root@debian:~# cv4pve-autosnap --host=192.168.0.100 --username=root@pam --passwo This command snap all VMs except 111. The --keep tells that it should be kept 2 snapshots, if there are more than 2 snapshots, the 3 one will be erased (sorted by creation time). +The --state save memory VM. ## Clean a VM/CT one time diff --git a/LICENSE b/gpl-3.0.txt similarity index 100% rename from LICENSE rename to gpl-3.0.txt diff --git a/script-hook.bat b/script-hook.bat index 5341e44..fa516cb 100644 --- a/script-hook.bat +++ b/script-hook.bat @@ -1,4 +1,13 @@ @ECHO OFF +REM This file is part of the cv4pve-autosnap https://github.com/Corsinvest/cv4pve-autosnap, +REm +REM This source file is available under two different licenses: +REM - GNU General Public License version 3 (GPLv3) +REM - Corsinvest Enterprise License (CEL) +REM Full copyright and license information is available in +REM LICENSE.md which is distributed with this source code. +REM +REM Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL REM Corsinvest automatic snapshot for Proxmox VE cv4pve-autosnap hook script. REM Process environment variables as received from and set by cv4pve-autosnap. diff --git a/script-hook.sh b/script-hook.sh index 6479fef..fd06ebb 100644 --- a/script-hook.sh +++ b/script-hook.sh @@ -1,4 +1,13 @@ #!/bin/bash +# This file is part of the cv4pve-autosnap https://github.com/Corsinvest/cv4pve-autosnap, +# +# This source file is available under two different licenses: +# - GNU General Public License version 3 (GPLv3) +# - Corsinvest Enterprise License (CEL) +# Full copyright and license information is available in +# LICENSE.md which is distributed with this source code. +# +# Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL # Corsinvest automatic snapshot for Proxmox VE cv4pve-autosnap hook script. # Process environment variables as received from and set by cv4pve-autosnap. diff --git a/src/Corsinvest.ProxmoxVE.AutoSnap/Commands.cs b/src/Corsinvest.ProxmoxVE.AutoSnap/Commands.cs index 90a5fc0..4ae0425 100644 --- a/src/Corsinvest.ProxmoxVE.AutoSnap/Commands.cs +++ b/src/Corsinvest.ProxmoxVE.AutoSnap/Commands.cs @@ -1,19 +1,13 @@ /* * This file is part of the cv4pve-autosnap https://github.com/Corsinvest/cv4pve-autosnap, - * Copyright (C) 2016 Corsinvest Srl * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - Corsinvest Enterprise License (CEL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL */ using System; diff --git a/src/Corsinvest.ProxmoxVE.AutoSnap/Corsinvest.ProxmoxVE.AutoSnap.csproj b/src/Corsinvest.ProxmoxVE.AutoSnap/Corsinvest.ProxmoxVE.AutoSnap.csproj index 6384d6b..5a38801 100644 --- a/src/Corsinvest.ProxmoxVE.AutoSnap/Corsinvest.ProxmoxVE.AutoSnap.csproj +++ b/src/Corsinvest.ProxmoxVE.AutoSnap/Corsinvest.ProxmoxVE.AutoSnap.csproj @@ -1,7 +1,7 @@ Exe - 1.3.0 + 1.4.0 netcoreapp3.0 cv4pve-autosnap Corsinvest Srl @@ -16,9 +16,7 @@ - + \ No newline at end of file diff --git a/src/Corsinvest.ProxmoxVE.AutoSnap/OutputType.cs b/src/Corsinvest.ProxmoxVE.AutoSnap/OutputType.cs index 1d7ccfe..3ee0979 100644 --- a/src/Corsinvest.ProxmoxVE.AutoSnap/OutputType.cs +++ b/src/Corsinvest.ProxmoxVE.AutoSnap/OutputType.cs @@ -1,21 +1,15 @@ /* * This file is part of the cv4pve-autosnap https://github.com/Corsinvest/cv4pve-autosnap, - * Copyright (C) 2016 Corsinvest Srl * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - Corsinvest Enterprise License (CEL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL */ - + namespace Corsinvest.ProxmoxVE.AutoSnap { /// diff --git a/src/Corsinvest.ProxmoxVE.AutoSnap/Program.cs b/src/Corsinvest.ProxmoxVE.AutoSnap/Program.cs index 81b6841..48ea543 100644 --- a/src/Corsinvest.ProxmoxVE.AutoSnap/Program.cs +++ b/src/Corsinvest.ProxmoxVE.AutoSnap/Program.cs @@ -1,19 +1,13 @@ /* * This file is part of the cv4pve-autosnap https://github.com/Corsinvest/cv4pve-autosnap, - * Copyright (C) 2016 Corsinvest Srl * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - Corsinvest Enterprise License (CEL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL */ using System; @@ -23,7 +17,7 @@ namespace Corsinvest.ProxmoxVE.AutoSnap { class Program { - public static int Main(string[] args) + static int Main(string[] args) { var app = ShellHelper.CreateConsoleApp(Commands.APPLICATION_NAME, "Automatic snapshot VM/CT with retention"); new ShellCommands(app); diff --git a/src/Corsinvest.ProxmoxVE.AutoSnap/ShellCommands.cs b/src/Corsinvest.ProxmoxVE.AutoSnap/ShellCommands.cs index a50ec6f..5f82c5d 100644 --- a/src/Corsinvest.ProxmoxVE.AutoSnap/ShellCommands.cs +++ b/src/Corsinvest.ProxmoxVE.AutoSnap/ShellCommands.cs @@ -1,19 +1,13 @@ /* * This file is part of the cv4pve-autosnap https://github.com/Corsinvest/cv4pve-autosnap, - * Copyright (C) 2016 Corsinvest Srl * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - Corsinvest Enterprise License (CEL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL */ using System; @@ -70,7 +64,7 @@ private void App_PhaseEvent(object sender, var ret = ShellHelper.Execute(_scriptHook, true, - new Dictionary() + new Dictionary { {"CV4PVE_AUTOSNAP_PHASE", e.phase}, {"CV4PVE_AUTOSNAP_VMID", e.vm?.Id + ""}, @@ -88,7 +82,7 @@ private void App_PhaseEvent(object sender, if (ret.ExitCode != 0) { - e.stdOut.WriteLine($"Script resturn code: {ret.ExitCode}"); + e.stdOut.WriteLine($"Script return code: {ret.ExitCode}"); } if (!string.IsNullOrWhiteSpace(ret.StandardOutput)) diff --git a/src/Corsinvest.ProxmoxVE.AutoSnap/build.ps1 b/src/Corsinvest.ProxmoxVE.AutoSnap/build.ps1 index 8a8e691..e861f6d 100644 --- a/src/Corsinvest.ProxmoxVE.AutoSnap/build.ps1 +++ b/src/Corsinvest.ProxmoxVE.AutoSnap/build.ps1 @@ -1,18 +1,12 @@ # This file is part of the cv4pve-autosnap https://github.com/Corsinvest/cv4pve-autosnap, -# Copyright (C) 2016 Corsinvest Srl # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# This source file is available under two different licenses: +# - GNU General Public License version 3 (GPLv3) +# - Corsinvest Enterprise License (CEL) +# Full copyright and license information is available in +# LICENSE.md which is distributed with this source code. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# Copyright (C) 2016 Corsinvest Srl GPLv3 and CEL [System.Console]::Clear();