X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FTaper%2FScan.pm;h=f757b9b8602719b64dc063c2d1859bd899be2dd2;hb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;hp=26c5a6d4c03cf9211f95a72bbd74ee8c6f2c037e;hpb=011a59f5a54864108a16af570a6b287410597cc2;p=debian%2Famanda diff --git a/perl/Amanda/Taper/Scan.pm b/perl/Amanda/Taper/Scan.pm index 26c5a6d..f757b9b 100644 --- a/perl/Amanda/Taper/Scan.pm +++ b/perl/Amanda/Taper/Scan.pm @@ -43,6 +43,9 @@ This is an abstract base class for taperscan algorithms. }; $taperscan->scan(result_cb => $result_cb, user_msg_fn => $user_msg_fn); + # later .. + $taperscan->quit(); # also quit the changer + =head1 OVERVIEW C subclasses represent algorithms used by @@ -54,10 +57,11 @@ algorithm. The constructor takes the following keyword arguments: changer Amanda::Changer object to use (required) algorithm Taperscan algorithm to instantiate - tapelist_filename + tapelist Amanda::Tapelist tapecycle labelstr autolabel + meta_autolabel The changer object must always be provided, but C may be omitted, in which case the class specified by the user in the Amanda configuration file is @@ -90,6 +94,12 @@ The error message can be a simple string or an C object (see L). The C<$label> and C<$access_mode> specify parameters for starting the device contained in C<$reservation>. +To cleanly terminate an Amanda::Taper::Scan object: + + $taperscan->quit() + +It also terminate the changer by caller $chg->quit(). + =head1 SUBCLASS UTILITIES There are a few common tasks for subclasses that are implemented as methods in @@ -115,19 +125,6 @@ C: new_label_ok => $nlo, # count newly labeled vols as reusable? ); -Finally, to devise a new name for a volume, call C, -passing a tapelist, a labelstr, and a template. This will return C -if no label could be created. - - $label = $self->make_new_tape_label( - labelstr => "foo-[0-9]+", - template => "foo-%%%%", - ); - -If no C