add remove and cleanup version numbers
This commit is contained in:
parent
ba12aa955a
commit
191079c882
|
@ -13,11 +13,11 @@ Rex::Virtualization::CBSD - The great new Rex::Virtualization::CBSD!
|
|||
|
||||
=head1 VERSION
|
||||
|
||||
Version 0.01
|
||||
Version 0.0.1
|
||||
|
||||
=cut
|
||||
|
||||
our $VERSION = '0.01';
|
||||
our $VERSION = '0.0.1';
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
|
|
@ -7,14 +7,14 @@ package Rex::Virtualization::CBSD::list;
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
our $VERSION = '1.9.0'; # VERSION
|
||||
our $VERSION = '0.0.1'; # VERSION
|
||||
|
||||
use Rex::Logger;
|
||||
use Rex::Helper::Run;
|
||||
use Term::ANSIColor qw(colorstrip);
|
||||
|
||||
sub execute {
|
||||
my ( $class, $arg1 ) = @_;
|
||||
my ( $class ) = @_;
|
||||
|
||||
Rex::Logger::debug("Getting CBSD VM list via cbsd bls display=nodename,jname,jid,vm_ram,vm_curmem,vm_cpus,pcpu,vm_os_type,ip4_addr,status,vnc,path header=0");
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
#
|
||||
# (c) Zane C. Bowers-Hadley <vvelox@vvelox.net>
|
||||
#
|
||||
|
||||
package Rex::Virtualization::CBSD::remove;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
our $VERSION = '0.0.1'; # VERSION
|
||||
|
||||
use Rex::Logger;
|
||||
use Rex::Helper::Run;
|
||||
use Term::ANSIColor qw(colorstrip);
|
||||
|
||||
sub execute {
|
||||
my ( $class, $name ) = @_;
|
||||
|
||||
if (!defined( $jname ) ){
|
||||
die('No VM name defined');
|
||||
}
|
||||
|
||||
Rex::Logger::debug("CBSD VM remove via cbsd bremove ".$name);
|
||||
|
||||
my %VMs;
|
||||
|
||||
# note
|
||||
my $returned=i_run ('cbsd bremove '.$name , fail_ok => 1);
|
||||
if ( $? != 0 ) {
|
||||
die("Error running 'cbsd remove ".$name."'");
|
||||
}
|
||||
|
||||
# the output is colorized
|
||||
$returned=colorstrip($found);
|
||||
|
||||
if ( $returned =~ /^No\ such/ ){
|
||||
die('"'.$name.'" does not exist');
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
1;
|
Loading…
Reference in New Issue