line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Cisco::UCS::ServiceProfile; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
15
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
3
|
use Carp qw(croak); |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
40
|
|
7
|
1
|
|
|
1
|
|
3
|
use Scalar::Util qw(weaken); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
263
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.51'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @ATTRIBUTES = qw(dn name owner pnDn type uuid); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our %ATTRIBUTES = ( |
14
|
|
|
|
|
|
|
agent_policy_name => 'agentPolicyName', |
15
|
|
|
|
|
|
|
assign_state => 'assignState', |
16
|
|
|
|
|
|
|
assoc_state => 'assocState', |
17
|
|
|
|
|
|
|
bios_profile_name => 'biosProfileName', |
18
|
|
|
|
|
|
|
boot_policy_name => 'bootPolicyName', |
19
|
|
|
|
|
|
|
config_state => 'configState', |
20
|
|
|
|
|
|
|
desc => 'descr', |
21
|
|
|
|
|
|
|
dynamic_conn_policy_name => 'dynamicConPolicyName', |
22
|
|
|
|
|
|
|
ext_ip_state => 'extIPState', |
23
|
|
|
|
|
|
|
fsm_remote_inv_err_code => 'fsmRmtInvErrCode', |
24
|
|
|
|
|
|
|
fsm_timestamp => 'fsmStamp', |
25
|
|
|
|
|
|
|
fsm_desc => 'fsmDescr', |
26
|
|
|
|
|
|
|
fsm_flags => 'fsmFlags', |
27
|
|
|
|
|
|
|
fsm_previous_state => 'fsmPrev', |
28
|
|
|
|
|
|
|
fsm_progress => 'fsmProgr', |
29
|
|
|
|
|
|
|
fsm_remote_inv_err_desc => 'fsmRmtInvErrDescr', |
30
|
|
|
|
|
|
|
fsm_stage_desc => 'fsmStageDescr', |
31
|
|
|
|
|
|
|
fsm_status => 'fsmStatus', |
32
|
|
|
|
|
|
|
fsm_try => 'fsmTry', |
33
|
|
|
|
|
|
|
host_fw_policy_name => 'hostFwPolicyName', |
34
|
|
|
|
|
|
|
ident_pool_name => 'identPoolName', |
35
|
|
|
|
|
|
|
local_disk_policy_name => 'localDiskPolicyName', |
36
|
|
|
|
|
|
|
maint_policy_name => 'maintPolicyName', |
37
|
|
|
|
|
|
|
mgmt_access_policy_name => 'mgmtAccessPolicyName', |
38
|
|
|
|
|
|
|
mgmt_firmware_policy_name => 'mgmtFwPolicyName', |
39
|
|
|
|
|
|
|
oper_bios_profile_name => 'operBiosProfileName', |
40
|
|
|
|
|
|
|
oper_boot_policy_name => 'operBootPolicyName', |
41
|
|
|
|
|
|
|
oper_dynamic_conn_policy_name => 'operDynamicConPolicyName', |
42
|
|
|
|
|
|
|
oper_host_fw_policy_name => 'operHostFwPolicyName', |
43
|
|
|
|
|
|
|
oper_ident_pool_name => 'operIdentPoolName', |
44
|
|
|
|
|
|
|
oper_local_disk_policy_name => 'operLocalDiskPolicyName', |
45
|
|
|
|
|
|
|
oper_maint_policy_name => 'operMaintPolicyName', |
46
|
|
|
|
|
|
|
oper_mgmt_access_policy_name => 'operMgmtAccessPolicyName', |
47
|
|
|
|
|
|
|
oper_mgmt_fw_policy_name => 'operMgmtFwPolicyName', |
48
|
|
|
|
|
|
|
oper_power_policy_name => 'operPowerPolicyName', |
49
|
|
|
|
|
|
|
oper_scrub_policy_name => 'operScrubPolicyName', |
50
|
|
|
|
|
|
|
oper_sol_policy_name => 'operSolPolicyName', |
51
|
|
|
|
|
|
|
oper_src_template_name => 'operSrcTemplName', |
52
|
|
|
|
|
|
|
oper_state => 'operState', |
53
|
|
|
|
|
|
|
oper_stats_policy_name => 'operStatsPolicyName', |
54
|
|
|
|
|
|
|
oper_vcon_profile_name => 'operVconProfileName', |
55
|
|
|
|
|
|
|
power_policy_name => 'powerPolicyName', |
56
|
|
|
|
|
|
|
scrub_policy_name => 'scrubPolicyName', |
57
|
|
|
|
|
|
|
sol_policy_name => 'solPolicyName', |
58
|
|
|
|
|
|
|
source_template_name => 'srcTemplName', |
59
|
|
|
|
|
|
|
stats_policy_name => 'statsPolicyName', |
60
|
|
|
|
|
|
|
user_label => 'usrLbl', |
61
|
|
|
|
|
|
|
uuid_suffix => 'uuidSuffix', |
62
|
|
|
|
|
|
|
vcon_profile_name => 'vconProfileName' |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub new { |
66
|
0
|
|
|
0
|
0
|
|
my ( $class, %args ) = @_; |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
my $self = {}; |
69
|
0
|
|
|
|
|
|
bless $self, $class; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
defined $args{dn} |
72
|
|
|
|
|
|
|
? $self->{dn} = $args{dn} |
73
|
0
|
0
|
|
|
|
|
: croak 'dn not defined'; |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
defined $args{ucs} |
76
|
|
|
|
|
|
|
? weaken( $self->{ucs} = $args{ucs} ) |
77
|
0
|
0
|
|
|
|
|
: croak 'dn not defined'; |
78
|
|
|
|
|
|
|
|
79
|
0
|
|
|
|
|
|
my %attr = %{ $self->{ucs}->resolve_dn( |
80
|
|
|
|
|
|
|
dn => $self->{dn} |
81
|
0
|
|
|
|
|
|
)->{outConfig}->{lsServer} }; |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
|
while ( my ($k, $v) = each %attr ) { $self->{$k} = $v } |
|
0
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
return $self |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
{ |
89
|
1
|
|
|
1
|
|
4
|
no strict 'refs'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
105
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
while ( my ( $pseudo, $attribute ) = each %ATTRIBUTES ) { |
92
|
|
|
|
|
|
|
*{ __PACKAGE__ . '::' . $pseudo } = sub { |
93
|
0
|
|
|
0
|
|
|
my $self = shift; |
94
|
0
|
|
|
|
|
|
return $self->{$attribute} |
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
foreach my $attribute ( @ATTRIBUTES ) { |
99
|
|
|
|
|
|
|
*{ __PACKAGE__ . '::' . $attribute } = sub { |
100
|
0
|
|
|
0
|
|
|
my $self = shift; |
101
|
0
|
|
|
|
|
|
return $self->{$attribute} |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
1; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
__END__ |