/usr/share/perl5/NetApp/Aggregate/Plex.pm is in libnetapp-perl 500.002-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | package NetApp::Aggregate::Plex;
our $VERSION = '500.002';
$VERSION = eval $VERSION; ## no critic: StringyEval
use strict;
use warnings;
use English;
use Carp;
use Class::Std;
use Params::Validate qw( :all );
use Regexp::Common;
{
my %name_of :ATTR( get => 'name' );
my %state_of :ATTR;
my %raidgroups_of :ATTR;
sub BUILD {
my ($self,$ident,$args_ref) = @_;
my @args = %$args_ref;
my (%args) = validate( @args, {
name => { type => SCALAR },
state => { type => HASHREF },
raidgroups => { type => ARRAYREF },
});
$name_of{$ident} = $args{name};
$state_of{$ident} = $args{state};
$raidgroups_of{$ident} = [];
foreach my $raidgroup ( @{ $args{raidgroups} } ) {
push @{ $raidgroups_of{$ident} },
NetApp::Aggregate::RAIDGroup->new( $raidgroup );
}
}
sub get_raidgroups {
my $self = shift;
my $ident = ident $self;
return @{ $raidgroups_of{$ident} };
}
sub get_states {
return keys %{ $state_of{ident shift} };
}
sub get_state {
my $self = shift;
my $ident = ident $self;
my $state = shift;
return $state_of{$ident}->{$state};
}
}
1;
|