blib/lib/IBM/V7000Unified.pm

filter: Statementstmt 73.4% 36 / 49 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 54.5% 6 / 11 Podpod 100% 1 / 1 totaltotal 70.4% 43 / 61 SCAR 0.2
CC
1
Cov
73%
__ANON__
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.0
↑ Summary
1 package IBM::V7000Unified;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use IBM::StorageSystem;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 our $VERSION = '0.022';
10  
11 2 our @METHODS=qw(array disk drive enclosure export fabric filesystem health host
12 interface iogroup mount node quota service snapshot task vdisk);
13  
14 2 our @ATTRS = qw(auth_service_cert_set auth_service_configured auth_service_enabled
15 auth_service_pwd_set auth_service_type auth_service_url auth_service_user_name
16 bandwidth cluster_isns_IP_address cluster_locale cluster_ntp_IP_address code_level
17 console_IP email_contact email_contact2 email_contact2_alternate email_contact2_primary
18 email_contact_alternate email_contact_location email_contact_primary email_reply
19 email_state gm_inter_cluster_delay_simulation gm_intra_cluster_delay_simulation
20 gm_link_tolerance gm_max_host_delay has_nas_key id id_alias inventory_mail_interval
21 iscsi_auth_method iscsi_chap_secret layer location name partnership rc_buffer_size
22 relationship_bandwidth_limit space_allocated_to_vdisks space_in_mdisk_grps
23 statistics_frequency statistics_status stats_threshold tier tier_capacity tier_free_capacity
24 time_zone total_allocated_extent_capacity total_free_space total_mdisk_capacity
25 total_overallocation total_used_capacity total_vdisk_capacity total_vdiskcopy_capacity
26 compression_cpu_pc cpu_pc drive_r_io drive_r_mb drive_r_ms drive_w_io
27 drive_w_mb drive_w_ms fc_io fc_mb iscsi_io iscsi_mb mdisk_r_io mdisk_r_mb mdisk_r_ms
28 mdisk_w_io mdisk_w_mb mdisk_w_ms sas_io sas_mb total_cache_pc vdisk_r_io vdisk_r_mb
29 vdisk_r_ms vdisk_w_io vdisk_w_mb vdisk_w_ms write_cache_pc);
30  
31 2 foreach my $method ( @METHODS ) {
32 {
33 2 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
34 36 my $get_method = "get_$method";
35 36 my $get_methods = "get_${method}s";
36
37 36 *{ __PACKAGE__ ."::$method" } = sub {
38 0 ▶ my $self = shift;
Subroutine __ANON__: not called CC=1 SCAR=6.9
39 0 $self->{ss}->$method(@_)
40 36 };
41  
42 36 *{ __PACKAGE__ ."::$get_method" } = sub {
43 0 ▶ my $self = shift;
Subroutine __ANON__: not called CC=1 SCAR=6.9
44 0 $self->{ss}->$get_method(@_)
45 36 };
46  
47 36 *{ __PACKAGE__ ."::$get_methods" } = sub {
48 0 ▶ my $self = shift;
Subroutine __ANON__: not called CC=1 SCAR=6.9
49 0 $self->{ss}->$get_methods(@_)
50 }
51 36 }
52 }
53  
54 2 foreach my $attr ( @ATTRS ) {
55 {
56 2 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
57
58 164 *{ __PACKAGE__ ."::$attr" } = sub {
59 0 ▶ my $self = shift;
Subroutine __ANON__: not called CC=1 SCAR=6.9
60 0 $self->{ss}->$attr(@_)
61 164 };
62 }
63 }
64  
65 sub new {
66 0 ▶ my ($class, %args) = @_;
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
67 0 my $self = bless {} , $class;
68 0 my %opts = ( user => $self->{user}, key_path => $self->{key_path}, batch_mode => 1, master_opts => '-q' );
69  
70 0 $self->{ss} = IBM::StorageSystem->new( %args );
71  
72 0 return $self
73 }
74  
75  
76 2 1;
77  
78 __END__
↑ Summary