line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SIAM::ServiceComponent; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
155
|
|
4
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
59
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
11
|
use base 'SIAM::Object'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
440
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
SIAM::ServiceComponent - Service Component object class |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 METHODS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head2 get_device_component |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$devc = $svcc->get_device_component(); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
The method returns a SIAM::DeviceComponent object instantiated from |
21
|
|
|
|
|
|
|
C parameter. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub get_device_component |
26
|
|
|
|
|
|
|
{ |
27
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
28
|
|
|
|
|
|
|
|
29
|
0
|
0
|
|
|
|
0
|
if( $self->attr('siam.svcc.devc_id') eq 'NIL' ) { |
30
|
0
|
|
|
|
|
0
|
return undef; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
0
|
return $self->instantiate_object |
34
|
|
|
|
|
|
|
('SIAM::DeviceComponent', $self->attr('siam.svcc.devc_id')); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# mandatory attributes |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $mandatory_attributes = |
41
|
|
|
|
|
|
|
[ 'siam.svcc.name', |
42
|
|
|
|
|
|
|
'siam.svcc.type', |
43
|
|
|
|
|
|
|
'siam.svcc.inventory_id', |
44
|
|
|
|
|
|
|
'siam.svcc.devc_id' ]; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _mandatory_attributes |
47
|
|
|
|
|
|
|
{ |
48
|
8
|
|
|
8
|
|
25
|
return $mandatory_attributes; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub _manifest_attributes |
53
|
|
|
|
|
|
|
{ |
54
|
1
|
|
|
1
|
|
8
|
return $mandatory_attributes; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
# Local Variables: |
61
|
|
|
|
|
|
|
# mode: cperl |
62
|
|
|
|
|
|
|
# indent-tabs-mode: nil |
63
|
|
|
|
|
|
|
# cperl-indent-level: 4 |
64
|
|
|
|
|
|
|
# cperl-continued-statement-offset: 4 |
65
|
|
|
|
|
|
|
# cperl-continued-brace-offset: -4 |
66
|
|
|
|
|
|
|
# cperl-brace-offset: 0 |
67
|
|
|
|
|
|
|
# cperl-label-offset: -2 |
68
|
|
|
|
|
|
|
# End: |