Ignore:
Timestamp:
04/20/17 18:30:00 (7 years ago)
Author:
nanardon
Message:

Add tools to create multiple object from csv file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/OCHelper.pm

    r1023 r1985  
    112112} 
    113113 
     114=head2 $ochelper->Automate($info) 
     115 
     116Try to create object from C<$info> w/o interacting with user. 
     117If given infomation does not allow to create object, it failed. 
     118 
     119Return 1 on success. 
     120 
     121=cut 
     122 
     123sub Automate { 
     124    my ($self, $info) = @_; 
     125 
     126    for (my $count = 0; $count < 3; $count++) { 
     127        my $status; 
     128        ($status, $info) = $self->step($info); 
     129        if ($status eq 'CREATED') { 
     130            return 1; 
     131        } elsif ($status eq 'ERROR') { 
     132            return; 
     133        } 
     134    } 
     135} 
     136 
    1141371; 
    115138 
Note: See TracChangeset for help on using the changeset viewer.