| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package IBM::V7000Unified; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 20644 | use strict; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 24 |  | 
| 4 | 1 |  |  | 1 |  | 5 | use warnings; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 109 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 1 |  |  | 1 |  | 1051 | use IBM::StorageSystem; | 
|  | 1 |  |  |  |  | 102827 |  | 
|  | 1 |  |  |  |  | 83 |  | 
| 7 | 1 |  |  | 1 |  | 9 | use Carp qw(croak); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 163 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | our $VERSION = '0.20'; | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | our @METHODS=qw(array disk drive enclosure export fabric filesystem health | 
| 12 |  |  |  |  |  |  | host interface iogroup mount node quota service snapshot task vdisk); | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | our @ATTRS = qw(auth_service_cert_set auth_service_configured | 
| 15 |  |  |  |  |  |  | auth_service_enabled auth_service_pwd_set auth_service_type auth_service_url | 
| 16 |  |  |  |  |  |  | auth_service_user_name bandwidth cluster_isns_IP_address cluster_locale | 
| 17 |  |  |  |  |  |  | cluster_ntp_IP_address code_level console_IP email_contact email_contact2 | 
| 18 |  |  |  |  |  |  | email_contact2_alternate email_contact2_primary email_contact_alternate | 
| 19 |  |  |  |  |  |  | email_contact_location email_contact_primary email_reply email_state | 
| 20 |  |  |  |  |  |  | gm_inter_cluster_delay_simulation gm_intra_cluster_delay_simulation | 
| 21 |  |  |  |  |  |  | gm_link_tolerance gm_max_host_delay has_nas_key id id_alias | 
| 22 |  |  |  |  |  |  | inventory_mail_interval iscsi_auth_method iscsi_chap_secret layer location | 
| 23 |  |  |  |  |  |  | name partnership rc_buffer_size relationship_bandwidth_limit | 
| 24 |  |  |  |  |  |  | space_allocated_to_vdisks space_in_mdisk_grps statistics_frequency | 
| 25 |  |  |  |  |  |  | statistics_status stats_threshold tier tier_capacity tier_free_capacity | 
| 26 |  |  |  |  |  |  | time_zone total_allocated_extent_capacity total_free_space total_mdisk_capacity | 
| 27 |  |  |  |  |  |  | total_overallocation total_used_capacity total_vdisk_capacity | 
| 28 |  |  |  |  |  |  | total_vdiskcopy_capacity compression_cpu_pc cpu_pc drive_r_io drive_r_mb | 
| 29 |  |  |  |  |  |  | drive_r_ms drive_w_io drive_w_mb drive_w_ms fc_io fc_mb iscsi_io iscsi_mb | 
| 30 |  |  |  |  |  |  | mdisk_r_io mdisk_r_mb mdisk_r_ms mdisk_w_io mdisk_w_mb mdisk_w_ms sas_io sas_mb | 
| 31 |  |  |  |  |  |  | total_cache_pc vdisk_r_io vdisk_r_mb vdisk_r_ms vdisk_w_io vdisk_w_mb | 
| 32 |  |  |  |  |  |  | vdisk_w_ms write_cache_pc cluster_throughput cluster_client_throughput | 
| 33 |  |  |  |  |  |  | cluster_create_delete_latency cluster_create_delete_operations | 
| 34 |  |  |  |  |  |  | cluster_open_close_latency cluster_open_close_operations | 
| 35 |  |  |  |  |  |  | cluster_read_write_operations cluster_read_write_latency); | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | foreach my $method ( @METHODS ) { | 
| 38 |  |  |  |  |  |  | { | 
| 39 | 1 |  |  | 1 |  | 5 | no strict 'refs'; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 197 |  | 
| 40 |  |  |  |  |  |  | my $get_method	= "get_$method"; | 
| 41 |  |  |  |  |  |  | my $get_methods	= "get_${method}s"; | 
| 42 |  |  |  |  |  |  |  | 
| 43 |  |  |  |  |  |  | *{ __PACKAGE__ ."::$method" } = sub { | 
| 44 | 0 |  |  | 0 |  |  | my $self = shift; | 
| 45 | 0 |  |  |  |  |  | $self->{ss}->$method(@_) | 
| 46 |  |  |  |  |  |  | }; | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | *{ __PACKAGE__ ."::$get_method" } = sub { | 
| 49 | 0 |  |  | 0 |  |  | my $self = shift; | 
| 50 | 0 |  |  |  |  |  | $self->{ss}->$get_method(@_) | 
| 51 |  |  |  |  |  |  | }; | 
| 52 |  |  |  |  |  |  |  | 
| 53 |  |  |  |  |  |  | *{ __PACKAGE__ ."::$get_methods" } = sub { | 
| 54 | 0 |  |  | 0 |  |  | my $self = shift; | 
| 55 | 0 |  |  |  |  |  | $self->{ss}->$get_methods(@_) | 
| 56 |  |  |  |  |  |  | } | 
| 57 |  |  |  |  |  |  | } | 
| 58 |  |  |  |  |  |  | } | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | foreach my $attr ( @ATTRS ) { | 
| 61 |  |  |  |  |  |  | { | 
| 62 | 1 |  |  | 1 |  | 6 | no strict 'refs'; | 
|  | 1 |  |  |  |  | 1 |  | 
|  | 1 |  |  |  |  | 203 |  | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | *{ __PACKAGE__ ."::$attr" } = sub { | 
| 65 | 0 |  |  | 0 |  |  | my $self = shift; | 
| 66 | 0 |  |  |  |  |  | $self->{ss}->$attr(@_) | 
| 67 |  |  |  |  |  |  | }; | 
| 68 |  |  |  |  |  |  | } | 
| 69 |  |  |  |  |  |  | } | 
| 70 |  |  |  |  |  |  |  | 
| 71 |  |  |  |  |  |  | sub new { | 
| 72 | 0 |  |  | 0 | 1 |  | my ( $class, %args ) = @_; | 
| 73 |  |  |  |  |  |  |  | 
| 74 | 0 |  |  |  |  |  | my $self = bless {} , $class; | 
| 75 |  |  |  |  |  |  | my %opts = (	user        => $self->{user}, | 
| 76 |  |  |  |  |  |  | key_path    => $self->{key_path}, | 
| 77 | 0 |  |  |  |  |  | batch_mode  => 1, | 
| 78 |  |  |  |  |  |  | master_opts => '-q' | 
| 79 |  |  |  |  |  |  | ); | 
| 80 |  |  |  |  |  |  |  | 
| 81 | 0 |  |  |  |  |  | $self->{ss} = IBM::StorageSystem->new( %args ); | 
| 82 |  |  |  |  |  |  |  | 
| 83 | 0 |  |  |  |  |  | return $self | 
| 84 |  |  |  |  |  |  | } | 
| 85 |  |  |  |  |  |  |  | 
| 86 |  |  |  |  |  |  |  | 
| 87 |  |  |  |  |  |  | 1; | 
| 88 |  |  |  |  |  |  |  | 
| 89 |  |  |  |  |  |  | __END__ |