finalize all the bits for 0.1.0

This commit is contained in:
Zane C. B-H 2023-01-15 19:43:54 -06:00
parent ff8347c148
commit 226a04f2c4
3 changed files with 61 additions and 9 deletions

View File

@ -1,7 +1,9 @@
Revision history for VM-Libvirt-CloneHelper
0.1.0 2023-01-??/??:??
-Audo fix perl path.
0.1.0 2023-01-15/19:45
-Auto fix perl path.
-Add recreate action.
-Add -n switch.
0.0.1 2022-6-24/13:45
-Initial release.

View File

@ -12,11 +12,11 @@ VM::Libvirt::CloneHelper - Create a bunch of cloned VMs in via libvirt.
=head1 VERSION
Version 0.0.1
Version 0.1.0
=cut
our $VERSION = '0.0.1';
our $VERSION = '0.1.0';
=head1 SYNOPSIS
@ -183,6 +183,9 @@ sub new {
Create the clones.
One optional argument is taken and that is the VM to operate on.
Otherwise all is ran for them all.
$clone_helper->clone;
=cut
@ -221,6 +224,9 @@ sub clone {
Delete all the clones
One optional argument is taken and that is the VM to operate on.
Otherwise all is ran for them all.
$clone_helper->delete_clones;
=cut
@ -368,8 +374,13 @@ sub net_redefine {
=head2 recreate
Recreate the specified VM. One argument is required and that is the name
of the VM to recreate.
Recreate the specified VM.
One optional argument is taken and that is the VM to operate on.
Otherwise all is ran for them all.
If you wish to recreate all, you should likely use recreate_all, to avoid
any issues caused by starting them all at the same time.
$clone_helper->recreate('foo100');
@ -403,6 +414,8 @@ sub recreate {
Recreate all VMs.
Does one at a time.
$clone_helper->recreate_all;
=cut
@ -429,6 +442,9 @@ sub recreate_all {
Snapshot all the clones
One optional argument is taken and that is the VM to operate on.
Otherwise all is ran for them all.
$clone_helper->snapshot_clones;
=cut
@ -460,6 +476,9 @@ sub snapshot_clones {
Start all the clones
One optional argument is taken and that is the VM to operate on.
Otherwise all is ran for them all.
$clone_helper->start_clones;
=cut
@ -492,6 +511,9 @@ sub start_clones {
Stop all the clones. This does not stop them gracefully as we don't
need to as they are being started via snapshot.
One optional argument is taken and that is the VM to operate on.
Otherwise all is ran for them all.
$clone_helper->stop_clones;
=cut

View File

@ -6,7 +6,7 @@ clonehelper - Create a bunch of cloned VMs in via libvirt.
=head1 SYNOPSIS
clonehelper [B<-f> <config>] B<-b> <action>
clonehelper [B<-f> <config>] [B<-n> <name>] B<-a> <action>
=head1 DESCRIPTION
@ -19,6 +19,26 @@ The basic work flow for this is like below.
snapshot
shutdown
This can automatically be done via using the
action recreate. If you wish to do it for all, you likely
want to use recreate_all.
A single VM may be acted upon via using the -n switch.
=head1 SWITCHES
=head2 -a <action>
The action to perform.
=head2 -f <config>
The config to use.
=head2 -n <name>
Act specifically on this VM instead of them all.
=head1 ACTIONS
=head2 list
@ -49,6 +69,14 @@ Generate the XML config and print it.
Remove and re-add the network using the generated config.
=head2 recreate
Recreate the VMs.
=head2 recreate_all
Recreate the VMs, doing them one at a time.
=head2 snapshot
Snapshot all the VM clones.
@ -117,7 +145,7 @@ use JSON;
use VM::Libvirt::CloneHelper;
sub version {
print "clonehelper v. 0.0.1\n";
print "clonehelper v. 0.1.0\n";
}
sub help {
@ -135,7 +163,7 @@ sub help {
--version Print version.
Actions...
"Actions...
list Print a JSON dump of VMs, maps, and IPs.
start Start all the VM clones.
stop Stop all the VM clones.