blib/lib/VMware/API/LabManager.pm

filter: Statementstmt 6.0% 40 / 659 Branchbran 1.1% 3 / 254 Conditioncond 0.0% 0 / 79 MC/DCmcdc 0.0% 0 / 51 Subroutinesub 8.8% 6 / 68 Podpod 98.3% 58 / 59 totaltotal 9.1% 107 / 1170 CC 162 SCAR 37.8
CC
162
Cov
4%
_fault
132.0
ListConfigurations
132.0
priv_ConfigurationMove
110.0
CRAP 43.6
↑ Summary
1 package VMware::API::LabManager;
2  
3 # Workaround for self-signed certs
4 2 $ENV{PERL_NET_HTTPS_SSL_SOCKET_CLASS} = "Net::SSL";
5 2 $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
6  
7 2 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use SOAP::Lite; # +trace => 'debug';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 $VMware::API::LabManager::VERSION = '2.11';
13  
14 ### External methods
15  
16 sub new {
17 2 ▶ my $class = shift @_;
Subroutine new: called CC=4 SCAR=14.5
Pod documented
18 2 my $self = {};
19  
20 2 $self->{username} = shift @_;
21 2 $self->{password} = shift @_;
22 2 $self->{hostname} = shift @_;
23 2 $self->{orgname} = shift @_;
24 2 $self->{workspace} = shift @_;
25  
26 2 $self->{debug} = 0; # Defaults to no debug info
27 2 $self->{die_on_fault} = 1; # Defaults to die'ing on an error
28 2 $self->{ssl_timeout} = 3600; # Defaults to 1h
29  
30 2 bless($self,$class);
31  
32 2 my $old_debug = shift @_;
33  
34 2 ▶ if ( defined $old_debug ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $old_debug) 0 2 2
35 0 warn "Old method for setting 'debug' used. You should use config() for this.";
36 0 $self->config('debug',$old_debug);
37 }
38  
39 2 my $old_die_on_fault = shift @_;
40  
41 2 ▶ if ( defined $old_die_on_fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $old_die_on_fault) 0 2 2
42 0 warn "Old method for setting 'die_on_fault' used. You should use config() for this.";
43 0 $self->config('die_on_fault',$old_die_on_fault);
44 }
45  
46 2 $self->_regenerate();
47  
48 2 ▶ $self->_debug("Loaded VMware::API::LabManager v" . our $VERSION . "\n") if $self->{debug};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"debug"} 0 2 2
49 2 return $self;
50 }
51  
52 sub config {
53 0 ▶ my $self = shift @_;
Subroutine config: not called CC=4 SCAR=30.0
Pod documented
54  
55 0 my %input = @_;
56 0 my @config_vals = qw/debug die_on_fault hostname orgname password ssl_timeout username workspace/;
57 0 my %config_vals = map { $_,1; } @config_vals;
58  
59 0 for my $key ( keys %input ) {
60 0 ▶ if ( $config_vals{$key} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($config_vals{$key}) { } 0 0 0
61 0 $self->{$key} = $input{$key};
62 } else {
63 0 warn 'Config key "$key" is being ignored. Only the following options may be configured: '
64 . join(", ", @config_vals ) . "\n";
65 }
66 }
67  
68 0 $self->_regenerate();
69  
70 0 my %out;
71 0 map { $out{$_} = $self->{$_} } @config_vals;
72  
73 0 ▶ return wantarray ? %out : \%out;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
74 }
75  
76 sub getLastSOAPError {
77 0 ▶ my $self = shift @_;
Subroutine getLastSOAPError: not called CC=5 SCAR=34.0
Pod documented
78 0 my $error_summary;
79 0 ▶ if ( $self->{LASTERROR} and $self->{LASTERROR}->{data} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"LASTERROR"} and $self->{"LASTERROR"}{"data"}) 0 0 0
Condition0%0/3
$self->{"LASTERROR"} and $self->{"LASTERROR"}{"data"}
!ll&&!rl&&r
000
MC/DC0%0/2
$self->{"LASTERROR"} and $self->{"LASTERROR"}{"data"}
$self->{"LASTERROR"} $self->{"LASTERROR"}{"data"}
Truth table0%0/3
A and B
A= $self->{"LASTERROR"}B= $self->{"LASTERROR"}{"data"}
ABresult
0X0
100
111
80 0 $error_summary = "\n\nERROR: $self->{LASTERROR}->{text}\n";
81 0 ▶ $error_summary .= "\n\nSUBMITTED XML: $self->{LASTERROR}->{xml} \n" if $self->{LASTERROR}->{xml};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"LASTERROR"}{"xml"} 0 0 0
82 0 ▶ $error_summary .= "\n\nERROR DEBUG: " . Dumper($self->{LASTERROR}->{data}) if $self->{debug};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"debug"} 0 0 0
83 0 $self->{LASTERROR} = {};
84 }
85 0 return $error_summary;
86 }
87  
88 ### Internal methods
89  
90 sub _debug {
91 0 ▶ my $self = shift @_;
Subroutine _debug: not called CC=2 SCAR=17.9
92 0 ▶ while ( my $debug = shift @_ ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $debug = shift @_) 0 0 0
93 0 chomp $debug;
94 0 print STDERR "DEBUG: $debug\n";
95 }
96 }
97  
98 sub _fault {
99 0 ▶ my $self = shift @_;
Subroutine _fault: not called CC=11 SCAR=48.8
100 0 my $data = shift @_;
101 0 my $soapobj;
102 my $text;
103  
104 0 ▶ if ( ref $data ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $data) 0 0 0
105 0 $soapobj = $data;
106 0 $data = $soapobj->fault;
107 }
108  
109 0 ▶ if ( ref $data and defined $data->{faultstring} ) {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $data and defined $data->{'faultstring'}) { } 0 0 0
elsif (ref $data and ref $data->{'detail'} and defined $data->{'detail'}{'message'}{'format'}) { } 0 0 0
Condition0%0/3
ref $data and defined $data->{"faultstring"}
!ll&&!rl&&r
000
MC/DC0%0/2
ref $data and defined $data->{"faultstring"}
ref $data defined $data->{"faultstring"}
Truth table0%0/3
A and B
A= ref $dataB= defined $data->{"faultstring"}
ABresult
0X0
100
111
110 0 $text = $data->{faultstring};
111 ▶ } elsif ( ref $data and ref $data->{detail} and defined $data->{detail}->{message}->{format} ) {
Condition0%0/6
ref $data and ref $data->{"detail"} and defined $data->{"detail"}{"message"}{"format"}
!ll&&!rl&&r
000
ref $data and ref $data->{"detail"}
!ll&&!rl&&r
000
MC/DC0%0/3
ref $data and ref $data->{"detail"} and defined $data->{"detail"}{"message"}{"format"}
ref $data ref $data->{"detail"} defined $data->{"detail"}{"message"}{"format"}
Truth table0%0/4
A and B and C
A= ref $dataB= ref $data->{"detail"}C= defined $data->{"detail"}{"message"}{"format"}
ABCresult
0XX0
10X0
1100
1111
112 0 $text = $data->{detail}->{message}->{format};
113 } else {
114 0 $text = $data;
115 0 $data = '';
116 }
117  
118 0 my $xml;
119 $xml = $soapobj->{_context}->{_transport}->{_proxy}->{_http_response}->{_request}->{_content}
120 0 ▶ if ref $soapobj;
Branch: 1 branch
BranchTrueFalseTotal
if ref $soapobj 0 0 0
121  
122 0 ▶ warn "\n\nERROR DETAILS:\n" . Dumper($data) if $self->{debug};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"debug"} 0 0 0
123 0 ▶ warn "\n\nSUBMITTED XML:\n" . $xml if $xml; #if $self->{debug} and $xml;
Branch: 1 branch
BranchTrueFalseTotal
if $xml 0 0 0
124  
125 0 ▶ if ( $self->{die_on_fault} ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'die_on_fault'}) { } 0 0 0
126 0 die "\n\nERROR: $text\n";
127 } else {
128 0 $self->{LASTERROR}->{data} = $data;
129 0 $self->{LASTERROR}->{text} = $text;
130 0 $self->{LASTERROR}->{xml} = $xml;
131 0 warn "\n\nERROR: $text\n";
132 }
133 }
134  
135 sub _regenerate {
136 2 ▶ my $self = shift @_;
Subroutine _regenerate: called CC=1 SCAR=0.2
137  
138 $self->{soap} = SOAP::Lite
139 0 ▶ -> on_action(sub { return "http://vmware.com/labmanager/" . $_[1]; } )
Subroutine __ANON__: not called CC=1 SCAR=6.9
140 -> default_ns('http://vmware.com/labmanager')
141 2 -> proxy('https://' . $self->{hostname} . '/LabManager/SOAP/LabManager.asmx', timeout => $self->{ssl_timeout} );
142  
143 $self->{soap_priv} = SOAP::Lite
144 0 ▶ -> on_action(sub { return "http://vmware.com/labmanager/" . $_[1]; } )
Subroutine __ANON__: not called CC=1 SCAR=6.9
145 -> default_ns('http://vmware.com/labmanager')
146 2 -> proxy('https://' . $self->{hostname} . '/LabManager/SOAP/LabManagerInternal.asmx', timeout => $self->{ssl_timeout} );
147  
148 2 $self->{soap}->readable(1);
149 2 $self->{soap_priv}->readable(1);
150  
151 $self->{auth_header} = SOAP::Header->new(
152 name => 'AuthenticationHeader',
153 attr => { xmlns => "http://vmware.com/labmanager" },
154 value => { username => $self->{username}, password => $self->{password}, organizationname => $self->{orgname}, workspacename => $self->{workspace} },
155 2 );
156 }
157  
158 ### Public API methods
159  
160 sub ConfigurationCapture {
161 0 ▶ my $self = shift @_;
Subroutine ConfigurationCapture: not called CC=2 SCAR=17.9
Pod documented
162 0 my $configID = shift @_;
163 0 my $newLibName = shift @_;
164  
165 $self->{ConfigurationCapture} =
166 $self->{soap}->ConfigurationCapture(
167 $self->{auth_header},
168 0 SOAP::Data->name('configurationId' => $configID )->type('s:int'),
169 SOAP::Data->name('newLibraryName' => $newLibName )->type('s:string')
170 );
171  
172 0 ▶ if ( $self->{ConfigurationCapture}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationCapture'}->fault) { } 0 0 0
173 0 $self->_fault( $self->{ConfigurationCapture} );
174 0 return $self->{ConfigurationCapture}->fault;
175 } else {
176 0 return $self->{ConfigurationCapture}->result;
177 }
178 }
179  
180 sub ConfigurationCheckout {
181 0 ▶ my $self = shift @_;
Subroutine ConfigurationCheckout: not called CC=2 SCAR=17.9
Pod documented
182 0 my $configID = shift @_;
183 0 my $configName = shift @_;
184  
185 $self->{ConfigurationCheckout} =
186 $self->{soap}->ConfigurationCheckout(
187 $self->{auth_header},
188 0 SOAP::Data->name('configurationId' => $configID )->type('s:int'), # Config to check out
189 SOAP::Data->name('workspaceName' => $configName )->type('s:string') # New name it shall be
190 );
191  
192 0 ▶ if ( $self->{ConfigurationCheckout}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationCheckout'}->fault) { } 0 0 0
193 0 $self->_fault( $self->{ConfigurationCheckout} );
194 0 return $self->{ConfigurationCheckout}->fault;
195 } else {
196 0 return $self->{ConfigurationCheckout}->result;
197 }
198 }
199  
200 sub ConfigurationClone {
201 0 ▶ my $self = shift @_;
Subroutine ConfigurationClone: not called CC=2 SCAR=17.9
Pod documented
202 0 my $configID = shift @_;
203 0 my $newWSName = shift @_;
204  
205 $self->{ConfigurationClone} =
206 $self->{soap}->ConfigurationClone($self->{auth_header},
207 0 SOAP::Data->name('configurationId' => $configID )->type('s:int'),
208 SOAP::Data->name('newWorkspaceName' => $newWSName )->type('s:string') );
209  
210 0 ▶ if ( $self->{ConfigurationClone}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationClone'}->fault) { } 0 0 0
211 0 $self->_fault( $self->{ConfigurationClone} );
212 0 return $self->{ConfigurationClone}->fault;
213 } else {
214 0 return $self->{ConfigurationClone}->result;
215 }
216 }
217  
218 sub ConfigurationDelete {
219 0 ▶ my $self = shift @_;
Subroutine ConfigurationDelete: not called CC=2 SCAR=17.9
Pod documented
220 0 my $configID = shift @_;
221  
222 $self->{ConfigurationDelete} =
223 $self->{soap}->ConfigurationDelete( $self->{auth_header},
224 0 SOAP::Data->name('configurationId' => $configID)->type('s:int')
225 );
226  
227 0 ▶ if ( $self->{ConfigurationDelete}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationDelete'}->fault) { } 0 0 0
228 0 $self->_fault( $self->{ConfigurationDelete} );
229 0 return $self->{ConfigurationDelete}->fault;
230 } else {
231 0 return $self->{ConfigurationDelete}->result;
232 }
233 }
234  
235 sub ConfigurationDeploy {
236 0 ▶ my $self = shift @_;
Subroutine ConfigurationDeploy: not called CC=2 SCAR=17.9
Pod documented
237 0 my $configID = shift @_;
238 0 my $fencemode = shift @_; # 1 = not fenced; 2 = block traffic in and out; 3 = allow out ; 4 allow in and out
239  
240 $self->{ConfigurationDeploy} =
241 $self->{soap}->ConfigurationDeploy( $self->{auth_header},
242 0 SOAP::Data->name('configurationId' => $configID )->type('s:int'),
243 SOAP::Data->name('isCached' => "false")->type('s:boolean'),
244 SOAP::Data->name('fenceMode' => $fencemode)->type('s:int') );
245
246 0 ▶ if ( $self->{ConfigurationDeploy}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationDeploy'}->fault) { } 0 0 0
247 0 $self->_fault( $self->{ConfigurationDeploy} );
248 0 return $self->{ConfigurationDeploy}->fault;
249 } else {
250 0 return $self->{ConfigurationDeploy}->result;
251 }
252 }
253  
254 sub ConfigurationPerformAction {
255 0 ▶ my $self = shift @_;
Subroutine ConfigurationPerformAction: not called CC=2 SCAR=17.9
Pod documented
256 0 my $configID = shift @_;
257 0 my $action = shift @_; # 1-Pwr On, 2-Pwr off, 3-Suspend, 4-Resume, 5-Reset, 6-Snapshot
258  
259 $self->{ConfigurationPerformAction} =
260 $self->{soap}->ConfigurationPerformAction( $self->{auth_header},
261 0 SOAP::Data->name('configurationId' => $configID )->type('s:int'),
262 SOAP::Data->name('action' => $action )->type('s:int') );
263  
264 0 ▶ if ( $self->{ConfigurationPerformAction}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationPerformAction'}->fault) { } 0 0 0
265 0 $self->_fault( $self->{ConfigurationPerformAction} );
266 0 return $self->{ConfigurationPerformAction}->fault;
267 } else {
268 0 return $self->{ConfigurationPerformAction}->result;
269 }
270 }
271  
272 sub ConfigurationSetPublicPrivate {
273 0 ▶ my $self = shift @_;
Subroutine ConfigurationSetPublicPrivate: not called CC=2 SCAR=17.9
Pod documented
274 0 my $conf = shift @_;
275 0 my $bool = shift @_;
276  
277 $self->{ConfigurationSetPublicPrivate} =
278 $self->{soap}->ConfigurationSetPublicPrivate( $self->{auth_header},
279 0 SOAP::Data->name('configurationId' => $conf )->type('s:int'),
280 SOAP::Data->name('isPublic' => $bool )->type('s:boolean')
281 );
282  
283 0 ▶ if ( $self->{ConfigurationSetPublicPrivate}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationSetPublicPrivate'}->fault) { } 0 0 0
284 0 $self->_fault( $self->{ConfigurationSetPublicPrivate} );
285 0 return $self->{ConfigurationSetPublicPrivate}->fault;
286 } else {
287 0 return $self->{ConfigurationSetPublicPrivate}->result;
288 }
289 }
290  
291 sub ConfigurationUndeploy {
292 0 ▶ my $self = shift @_;
Subroutine ConfigurationUndeploy: not called CC=2 SCAR=17.9
Pod documented
293 0 my $configID = shift @_;
294  
295 $self->{ConfigurationUndeploy} =
296 $self->{soap}->ConfigurationUndeploy( $self->{auth_header},
297 0 SOAP::Data->name('configurationId' => $configID )->type('s:int'));
298  
299 0 ▶ if ( $self->{ConfigurationUndeploy}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationUndeploy'}->fault) { } 0 0 0
300 0 $self->_fault( $self->{ConfigurationUndeploy} );
301 0 return $self->{ConfigurationUndeploy}->fault;
302 } else {
303 0 return $self->{ConfigurationUndeploy}->result;
304 }
305 }
306  
307 sub GetConfiguration {
308 0 ▶ my $self = shift @_;
Subroutine GetConfiguration: not called CC=2 SCAR=17.9
Pod documented
309 0 my $conf = shift @_;
310
311 $self->{GetConfiguration} =
312 $self->{soap}->GetConfiguration(
313 $self->{auth_header},
314 0 SOAP::Data->name('id' => $conf )->type('s:int')
315 );
316  
317 0 ▶ if ( $self->{GetConfiguration}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetConfiguration'}->fault) { } 0 0 0
318 0 $self->_fault( $self->{GetConfiguration} );
319 0 return $self->{GetConfiguration}->fault;
320 } else {
321 0 return $self->{GetConfiguration}->result;
322 }
323 }
324  
325 sub GetConfigurationByName {
326 0 ▶ my $self = shift @_;
Subroutine GetConfigurationByName: not called CC=8 SCAR=42.8
Pod documented
327 0 my $name = shift @_;
328
329 $self->{GetConfigurationByName} =
330 $self->{soap}->GetConfigurationByName(
331 $self->{auth_header},
332 0 SOAP::Data->name( name => $name )->type('s:string')
333 );
334  
335 0 ▶ if ( $self->{GetConfigurationByName}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"GetConfigurationByName"}->fault) 0 0 0
336 0 $self->_fault( $self->{GetConfigurationByName} );
337 0 return $self->{GetConfigurationByName}->fault;
338 }
339  
340 0 my $ret = $self->{GetConfigurationByName}->result;
341  
342 0 ▶ my $array = $ret ? [ $ret ] : [ ];
Branch: 1 branch
BranchTrueFalseTotal
$ret ? : 0 0 0
343 0 ▶ $array = [ $ret->{Configuration} ] if ref $ret and ref $ret->{Configuration} eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Configuration"} eq "HASH" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Configuration"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Configuration"} eq "HASH"
ref $ret ref $ret->{"Configuration"} eq "HASH"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Configuration"} eq "HASH"
ABresult
0X0
100
111
344 0 ▶ $array = $ret->{Configuration} if ref $ret and ref $ret->{Configuration} eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Configuration"} eq "ARRAY" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Configuration"} eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Configuration"} eq "ARRAY"
ref $ret ref $ret->{"Configuration"} eq "ARRAY"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Configuration"} eq "ARRAY"
ABresult
0X0
100
111
345  
346 0 ▶ return wantarray ? @$array : $array;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
347 }
348  
349 sub GetMachine {
350 0 ▶ my $self = shift @_;
Subroutine GetMachine: not called CC=2 SCAR=17.9
Pod documented
351 0 my $id = shift @_;
352  
353 $self->{GetMachine} =
354 $self->{soap}->GetMachine(
355 $self->{auth_header},
356 0 SOAP::Data->name('machineId' => $id)->type('s:int') # mislabeled "machineID" by PUB API docs
357 );
358  
359 0 ▶ if ( $self->{GetMachine}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetMachine'}->fault) { } 0 0 0
360 0 $self->_fault( $self->{GetMachine} );
361 0 return $self->{GetMachine}->fault;
362 } else {
363 0 return $self->{GetMachine}->result;
364 }
365 }
366  
367 sub GetMachineByName {
368 0 ▶ my $self = shift @_;
Subroutine GetMachineByName: not called CC=2 SCAR=17.9
Pod documented
369 0 my $config = shift @_;
370 0 my $name = shift @_;
371
372 $self->{GetMachineByName} =
373 $self->{soap}->GetMachineByName( $self->{auth_header},
374 0 SOAP::Data->name('configurationId' => $config)->type('s:int'),
375 SOAP::Data->name('name' => $name)->type('s:string'));
376  
377 0 ▶ if ( $self->{GetMachineByName}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetMachineByName'}->fault) { } 0 0 0
378 0 $self->_fault( $self->{GetMachineByName} );
379 0 return $self->{GetMachineByName}->fault;
380 } else {
381 0 return $self->{GetMachineByName}->result;
382 }
383 }
384  
385 sub GetSingleConfigurationByName {
386 0 ▶ my $self = shift @_;
Subroutine GetSingleConfigurationByName: not called CC=2 SCAR=17.9
Pod documented
387 0 my $config = shift @_;
388
389 $self->{GetSingleConfigurationByName} =
390 $self->{soap}->GetSingleConfigurationByName( $self->{auth_header},
391 0 SOAP::Data->name('name' => $config)->type('s:string'));
392  
393 0 ▶ if ( $self->{GetSingleConfigurationByName}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetSingleConfigurationByName'}->fault) { } 0 0 0
394 0 $self->_fault( $self->{GetSingleConfigurationByName} );
395 0 return $self->{GetSingleConfigurationByName}->fault;
396 } else {
397 0 return $self->{GetSingleConfigurationByName}->result;
398 }
399 }
400  
401 sub ListConfigurations {
402 0 ▶ my $self = shift @_;
Subroutine ListConfigurations: not called CC=11 SCAR=48.8
Pod documented
403 0 my $type = shift @_; #1 =WorkSpace, 2=Library
404  
405 0 ▶ $self->_debug("LISTING CONFIGURATIONS") if $self->{debug};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"debug"} 0 0 0
406  
407 0 ▶ unless ($type == 1 || $type == 2 ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($type == 1 or $type == 2) 0 0 0
Condition0%0/3
$type == 1 or $type == 2
l!l&&r!l&&!r
000
MC/DC0%0/2
$type == 1 or $type == 2
$type == 1 $type == 2
Truth table0%0/3
A or B
A= $type == 1B= $type == 2
ABresult
1X1
011
000
408 0 $self->{LASTERROR} = "Configuration Type must be either 1 for Workspace or 2 for Library";
409 0 $self->_fault( $self->{LASTERROR} );
410 }
411  
412 0 $self->{ListConfigurations} = $self->{soap}->ListConfigurations( $self->{auth_header}, SOAP::Data->name('configurationType' => $type)->type('s:int'));
413  
414 0 ▶ if ( $self->{ListConfigurations}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"ListConfigurations"}->fault) 0 0 0
415 0 $self->_fault( $self->{ListConfigurations} );
416 0 return $self->{ListConfigurations}->fault;
417 }
418  
419 0 my $ret = $self->{ListConfigurations}->result;
420  
421 0 ▶ my $array = $ret ? [ $ret ] : [ ];
Branch: 1 branch
BranchTrueFalseTotal
$ret ? : 0 0 0
422 0 ▶ $array = [ $ret->{Configuration} ] if ref $ret and ref $ret->{Configuration} eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Configuration"} eq "HASH" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Configuration"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Configuration"} eq "HASH"
ref $ret ref $ret->{"Configuration"} eq "HASH"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Configuration"} eq "HASH"
ABresult
0X0
100
111
423 0 ▶ $array = $ret->{Configuration} if ref $ret and ref $ret->{Configuration} eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Configuration"} eq "ARRAY" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Configuration"} eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Configuration"} eq "ARRAY"
ref $ret ref $ret->{"Configuration"} eq "ARRAY"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Configuration"} eq "ARRAY"
ABresult
0X0
100
111
424  
425 0 ▶ return wantarray ? @$array : $array;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
426 }
427  
428 sub ListMachines {
429 0 ▶ my $self = shift @_;
Subroutine ListMachines: not called CC=7 SCAR=40.3
Pod documented
430 0 my $config = shift @_;
431  
432 $self->{ListMachines} =
433 $self->{soap}->ListMachines( $self->{auth_header},
434 0 SOAP::Data->name('configurationId' => $config)->type('s:int'));
435  
436 0 ▶ if ( $self->{ListMachines}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"ListMachines"}->fault) 0 0 0
437 0 $self->_fault( $self->{ListMachines} );
438 0 return $self->{ListMachines}->fault;
439 }
440  
441 0 my $ret = $self->{ListMachines}->result;
442  
443 0 my $array = [];
444 0 ▶ $array = [ $ret->{Machine} ] if ref $ret and ref $ret->{Machine} eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Machine"} eq "HASH" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Machine"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Machine"} eq "HASH"
ref $ret ref $ret->{"Machine"} eq "HASH"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Machine"} eq "HASH"
ABresult
0X0
100
111
445 0 ▶ $array = $ret->{Machine} if ref $ret and ref $ret->{Machine} eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Machine"} eq "ARRAY" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Machine"} eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Machine"} eq "ARRAY"
ref $ret ref $ret->{"Machine"} eq "ARRAY"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Machine"} eq "ARRAY"
ABresult
0X0
100
111
446  
447 0 ▶ return wantarray ? @$array : $array;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
448 }
449  
450 ###### CHECK THIS
451 # Not Supported, but works (I believe)
452 sub GetConsoleAccessInfo {
453 # Attribs: ServerAddress, ServerPort,VmxLocation,Ticket
454 0 ▶ my($self) = shift @_;
Subroutine GetConsoleAccessInfo: not called CC=2 SCAR=17.9
Pod undocumented
455 0 my($machineId) = shift @_;
456 0 push(my(@attribs), @_);
457 0 my @myattribs;
458  
459 $self->{GetConsoleAccessInfo} =
460 $self->{soap}->GetConsoleAccessInfo( $self->{auth_header},
461 0 SOAP::Data->name('machineId' => $machineId)->type('s:int'));
462  
463 0 ▶ if ( $self->{GetConsoleAccessInfo}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetConsoleAccessInfo'}->fault) { } 0 0 0
464 0 $self->_fault( $self->{GetConsoleAccessInfo} );
465 0 return $self->{GetConsoleAccessInfo}->fault;
466 } else {
467 0 return $self->{GetConsoleAccessInfo}->result;
468 }
469 }
470  
471 sub LiveLink {
472 0 ▶ my $self = shift @_;
Subroutine LiveLink: not called CC=2 SCAR=17.9
Pod documented
473 0 my $configName = shift @_;
474  
475 $self->{LiveLink} =
476 $self->{soap}->LiveLink( $self->{auth_header},
477 0 SOAP::Data->name('configName' => $configName)->type('s:string'));
478  
479 0 ▶ if ( $self->{LiveLink}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'LiveLink'}->fault) { } 0 0 0
480 0 $self->_fault( $self->{LiveLink} );
481 0 return $self->{LiveLink}->fault;
482 } else {
483 0 return $self->{LiveLink}->result;
484 }
485 }
486  
487 sub MachinePerformAction {
488 0 ▶ my $self = shift @_;
Subroutine MachinePerformAction: not called CC=2 SCAR=17.9
Pod documented
489 0 my $configID = shift @_;
490 0 my $action = shift @_; # Actions: 1-Pwr On, 2-Pwr off, 3-Suspend, 4-Resume, 5-Reset, 6-Snapshot , 7-Revert, 8-Shutdown
491  
492 $self->{MachinePerformAction} =
493 $self->{soap}->MachinePerformAction( $self->{auth_header},
494 0 SOAP::Data->name('machineId' => $configID )->type('s:int'),
495 SOAP::Data->name('action' => $action )->type('s:int') );
496  
497 0 ▶ if ( $self->{MachinePerformAction}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'MachinePerformAction'}->fault) { } 0 0 0
498 0 $self->_fault( $self->{MachinePerformAction} );
499 0 return $self->{MachinePerformAction}->fault;
500 } else {
501 0 return $self->{MachinePerformAction}->result;
502 }
503 }
504  
505 ### Internal API methods
506  
507 sub priv_ConfigurationAddMachineEx {
508 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationAddMachineEx: not called CC=4 SCAR=30.0
Pod documented
509  
510 0 my $ipaddress = '10.10.220.10';
511 0 my $macAddress = '00:50:DE:AD:BE:EF';
512  
513 0 ▶ $_[4] = 0 unless $_[4];
Branch: 1 branch
BranchTrueFalseTotal
unless $_[4] 0 0 0
514 0 ▶ $_[5] = 0 unless $_[5];
Branch: 1 branch
BranchTrueFalseTotal
unless $_[5] 0 0 0
515  
516 0 my $eth0 = SOAP::Data->name('NetInfo' => \SOAP::Data->value(
517 SOAP::Data->name('networkId' => 1 )->type('s:int'),
518 SOAP::Data->name('nicId' => 0 )->type('s:int'),
519 #SOAP::Data->name('vmxSlot' => 1 )->type('s:int'),
520 SOAP::Data->name('macAddress' => $macAddress )->type('s:string'),
521 SOAP::Data->name('resetMac' => 'true' )->type('s:boolean'),
522 SOAP::Data->name('ipAddress' => $ipaddress )->type('s:string'),
523 SOAP::Data->name('ipAddressingMode' => 'STATIC_MANUAL')->type('s:string'),
524 SOAP::Data->name('netmask' => '255.255.255.0')->type('s:string'),
525 SOAP::Data->name('gateway' => '10.10.220.1')->type('s:string'),
526 SOAP::Data->name('dns1' => '4.2.2.1')->type('s:string'),
527 SOAP::Data->name('dns2' => '4.2.2.2')->type('s:string'),
528 SOAP::Data->name('isConnected' => 1 )->type('s:int'),
529 ));
530  
531 $self->{ConfigurationAddMachineEx} =
532 $self->{soap_priv}->ConfigurationAddMachineEx(
533 $self->{auth_header},
534 0 SOAP::Data->name('id' =>$_[0])->type('s:int'),
535 SOAP::Data->name('template_id'=>$_[1])->type('s:int'),
536 SOAP::Data->name('name' =>$_[2])->type('s:string'),
537 SOAP::Data->name('desc' =>$_[3])->type('s:string'),
538 SOAP::Data->name('boot_seq' =>$_[4])->type('s:int'),
539 SOAP::Data->name('boot_delay' =>$_[5])->type('s:int'),
540 SOAP::Data->name('netInfo' => \SOAP::Data->value(
541 #$eth0,
542 )
543 )
544 );
545  
546 0 ▶ if ( $self->{ConfigurationAddMachineEx}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationAddMachineEx'}->fault) { } 0 0 0
547 0 $self->_fault( $self->{ConfigurationAddMachineEx} );
548 0 return $self->{ConfigurationAddMachineEx}->fault;
549 } else {
550 0 return $self->{ConfigurationAddMachineEx}->result;
551 }
552 }
553  
554 sub priv_ConfigurationArchiveEx {
555 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationArchiveEx: not called CC=4 SCAR=30.0
Pod documented
556 0 my $configurationId = shift @_;
557 0 my $archiveName = shift @_;
558 0 my $archiveDescription = shift @_;
559 0 my $isFullClone = shift @_;
560 0 my $storageName = shift @_;
561 0 ▶ my $storageLeaseInMilliseconds = shift @_ || 0;
Condition0%0/2
shift @_ || 0
l!l
00
MC/DC0%0/1
shift @_ || 0
shift @_
Truth table0%0/2
A
A= shift @_
Aresult
11
00
562  
563 0 ▶ $isFullClone = 'false' unless $isFullClone =~ /^true$/i;
Branch: 1 branch
BranchTrueFalseTotal
unless $isFullClone =~ /^true$/i 0 0 0
564  
565 $self->{ConfigurationArchiveEx} =
566 $self->{soap_priv}->ConfigurationArchiveEx(
567 $self->{auth_header},
568 0 SOAP::Data->name('configurationID' => $configurationId )->type('s:int'),
569 SOAP::Data->name('archiveName' => $archiveName )->type('s:string'),
570 SOAP::Data->name('archiveDescription' => $archiveDescription )->type('s:string'),
571 SOAP::Data->name('isFullClone' => $isFullClone )->type('s:boolean'),
572 SOAP::Data->name('storageName' => $storageName )->type('s:string'),
573 SOAP::Data->name('storageLeaseInMilliseconds' => $storageLeaseInMilliseconds )->type('s:long')
574 );
575  
576 0 ▶ if ( $self->{ConfigurationArchiveEx}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationArchiveEx'}->fault) { } 0 0 0
577 0 $self->_fault( $self->{ConfigurationArchiveEx} );
578 0 return $self->{ConfigurationArchiveEx}->fault;
579 } else {
580 0 return $self->{ConfigurationArchiveEx}->result;
581 }
582 }
583  
584 sub priv_ConfigurationCaptureEx {
585 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationCaptureEx: not called CC=4 SCAR=30.0
Pod documented
586 0 my $configurationId = shift @_;
587 0 my $newLibraryName = shift @_;
588 0 my $libraryDescription = shift @_;
589 0 my $isGoldMaster = shift @_;
590 0 my $storageName = shift @_;
591 0 ▶ my $storageLeaseInMilliseconds = shift @_ || 0;
Condition0%0/2
shift @_ || 0
l!l
00
MC/DC0%0/1
shift @_ || 0
shift @_
Truth table0%0/2
A
A= shift @_
Aresult
11
00
592  
593 0 ▶ $isGoldMaster = 'false' unless $isGoldMaster =~ /^true$/i;
Branch: 1 branch
BranchTrueFalseTotal
unless $isGoldMaster =~ /^true$/i 0 0 0
594  
595 $self->{ConfigurationCaptureEx} =
596 $self->{soap_priv}->ConfigurationCaptureEx(
597 $self->{auth_header},
598 0 SOAP::Data->name('configurationId' => $configurationId )->type('s:int'),
599 SOAP::Data->name('newLibraryName' => $newLibraryName )->type('s:string'),
600 SOAP::Data->name('libraryDescription' => $libraryDescription )->type('s:string'),
601 SOAP::Data->name('isGoldMaster' => $isGoldMaster )->type('s:boolean'),
602 SOAP::Data->name('storageName' => $storageName )->type('s:string'),
603 SOAP::Data->name('storageLeaseInMilliseconds' => $storageLeaseInMilliseconds )->type('s:long')
604 );
605  
606 0 ▶ if ( $self->{ConfigurationCaptureEx}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationCaptureEx'}->fault) { } 0 0 0
607 0 $self->_fault( $self->{ConfigurationCaptureEx} );
608 0 return $self->{ConfigurationCaptureEx}->fault;
609 } else {
610 0 return $self->{ConfigurationCaptureEx}->result;
611 }
612 }
613  
614 sub priv_ConfigurationChangeOwner {
615 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationChangeOwner: not called CC=2 SCAR=17.9
Pod documented
616 0 my $conf = shift @_;
617 0 my $own = shift @_;
618  
619 $self->{ConfigurationChangeOwner} =
620 $self->{soap_priv}->ConfigurationChangeOwner(
621 $self->{auth_header},
622 0 SOAP::Data->name('configurationId' => $conf )->type('s:int'),
623 SOAP::Data->name('newOwnerId' => $own )->type('s:int'),
624 );
625  
626 0 ▶ if ( $self->{ConfigurationChangeOwner}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationChangeOwner'}->fault) { } 0 0 0
627 0 $self->_fault( $self->{ConfigurationChangeOwner} );
628 0 return $self->{ConfigurationChangeOwner}->fault;
629 } else {
630 0 return $self->{ConfigurationChangeOwner}->result;
631 }
632 }
633  
634 sub priv_ConfigurationCopy {
635 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationCopy: not called CC=4 SCAR=30.0
Pod documented
636 0 my $sg_id = shift @_;
637 0 my $name = shift @_;
638 0 my $description = shift @_;
639  
640 0 my $machines = shift @_;
641 0 my $storage = shift @_;
642  
643 0 my @machine_data;
644  
645 0 for my $machine (@$machines) {
646 0 my @elements;
647 0 for my $element ( keys %$machine ) {
648 0 push @elements, SOAP::Data->name( $element, $machine->{$element} );
649 }
650 0 push @machine_data, SOAP::Data->name('machine' => \SOAP::Data->value(@elements));
651 }
652  
653 $self->{ConfigurationCopy} =
654 $self->{soap_priv}->ConfigurationCopy(
655 $self->{auth_header},
656 0 SOAP::Data->name('sg_id' => $sg_id )->type('s:int'),
657 SOAP::Data->name('name' => $name )->type('s:string'),
658 SOAP::Data->name('description' => $description )->type('s:string'),
659 SOAP::Data->name('configurationCopyData' => \SOAP::Data->value(
660 SOAP::Data->name('VMCopyData' => \SOAP::Data->value(
661 @machine_data,
662 SOAP::Data->name('storageServerName' => $storage )->type('s:string')
663 ))
664 ))
665 );
666  
667 0 ▶ if ( $self->{ConfigurationCopy}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationCopy'}->fault) { } 0 0 0
668 0 $self->_fault( $self->{ConfigurationCopy} );
669 0 return $self->{ConfigurationCopy}->fault;
670 } else {
671 0 return $self->{ConfigurationCopy}->result;
672 }
673 }
674  
675 sub priv_ConfigurationCloneToWorkspace {
676 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationCloneToWorkspace: not called CC=6 SCAR=37.4
Pod documented
677 0 my $destWorkspaceId = shift @_;
678 0 my $isNewConfiguration = shift @_;
679 0 my $newConfigName = shift @_;
680 0 my $description = shift @_;
681  
682 0 my $machines = shift @_;
683 0 my $storage = shift @_;
684  
685 0 my $existingConfigId = shift @_;
686 0 my $isFullClone = shift @_;
687 0 my $storageLeaseInMilliseconds = shift @_;
688  
689 0 ▶ $isNewConfiguration = 'false' unless $isNewConfiguration =~ /^true$/i;
Branch: 1 branch
BranchTrueFalseTotal
unless $isNewConfiguration =~ /^true$/i 0 0 0
690 0 ▶ $isFullClone = 'false' unless $isFullClone =~ /^true$/i;
Branch: 1 branch
BranchTrueFalseTotal
unless $isFullClone =~ /^true$/i 0 0 0
691  
692 0 my @machine_data;
693  
694 0 for my $machine (@$machines) {
695 0 my @elements;
696 0 for my $element ( keys %$machine ) {
697 0 push @elements, SOAP::Data->name( $element, $machine->{$element} );
698 }
699 0 push @machine_data, SOAP::Data->name('machine' => \SOAP::Data->value(@elements));
700 }
701  
702 $self->{ConfigurationCloneToWorkspace} =
703 $self->{soap_priv}->ConfigurationCloneToWorkspace(
704 $self->{auth_header},
705 0 SOAP::Data->name('destWorkspaceId' => $destWorkspaceId )->type('s:int'),
706 SOAP::Data->name('isNewConfiguration' => $isNewConfiguration )->type('s:bool'),
707 SOAP::Data->name('newConfigName' => $newConfigName )->type('s:string'),
708 SOAP::Data->name('description' => $description )->type('s:string'),
709 SOAP::Data->name('configurationCopyData' => \SOAP::Data->value(
710 SOAP::Data->name('VMCopyData' => \SOAP::Data->value(
711 @machine_data,
712 SOAP::Data->name('storageServerName' => $storage )->type('s:string')
713 ))
714 )),
715 SOAP::Data->name('isFullClone' => $newConfigName )->type('s:bool'),
716 SOAP::Data->name('storageLeaseInMilliseconds' => $description )->type('s:long'),
717 );
718  
719 0 ▶ if ( $self->{ConfigurationCloneToWorkspace}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationCloneToWorkspace'}->fault) { } 0 0 0
720 0 $self->_fault( $self->{ConfigurationCloneToWorkspace} );
721 0 return $self->{ConfigurationCloneToWorkspace}->fault;
722 } else {
723 0 return $self->{ConfigurationCloneToWorkspace}->result;
724 }
725 }
726  
727 sub priv_ConfigurationCreateEx {
728 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationCreateEx: not called CC=2 SCAR=17.9
Pod documented
729 0 my $name = shift @_;
730 0 my $desc = shift @_;
731  
732 $self->{ConfigurationCreateEx} =
733 $self->{soap_priv}->ConfigurationCreateEx(
734 $self->{auth_header},
735 0 SOAP::Data->name('name'=>$name)->type('s:string'),
736 SOAP::Data->name('desc'=>$desc)->type('s:string')
737 );
738  
739 0 ▶ if ( $self->{ConfigurationCreateEx}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationCreateEx'}->fault) { } 0 0 0
740 0 $self->_fault( $self->{ConfigurationCreateEx} );
741 0 return $self->{ConfigurationCreateEx}->fault;
742 } else {
743 0 return $self->{ConfigurationCreateEx}->result;
744 }
745 }
746  
747 sub priv_ConfigurationDeployEx2 {
748 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationDeployEx2: not called CC=2 SCAR=17.9
Pod documented
749 0 my $configID = shift @_;
750 0 my $networkId = shift @_;
751 0 my $fenceMode = 'FenceAllowInAndOut';
752  
753 0 my $net_elem = SOAP::Data->name( 'FenceNetworkOption' => \SOAP::Data->value(
754 SOAP::Data->name('configuredNetID' => $networkId)->type('s:int'),
755 SOAP::Data->name('DeployFenceMode'=> $fenceMode)->type('tns:SOAPFenceMode')
756 )
757 );
758  
759 0 my $bridge_elem = SOAP::Data->name( 'BridgeNetworkOption' => \SOAP::Data->value(
760 SOAP::Data->name('externalNetId' => $networkId)->type('s:int')
761 )
762 );
763  
764 0 my @net_array;
765 my @bridge_array;
766 0 push(@net_array,$net_elem);
767 0 push(@bridge_array,$bridge_elem);
768  
769 $self->{ConfigurationDeployEx2} =
770 $self->{soap_priv}->ConfigurationDeployEx2( $self->{auth_header},
771 0 SOAP::Data->name('configurationId' => $configID )->type('s:int'),
772 SOAP::Data->name('honorBootOrders' => 1)->type('s:boolean'),
773 SOAP::Data->name('startAfterDeploy' => 1)->type('s:boolean'),
774 SOAP::Data->name('fenceNetworkOptions' => \SOAP::Data->value( @net_array )->type('tns:ArrayOfFenceNetworkOption')),
775 #Do not uncomment unless you know how to make it work:
776 #SOAP::Data->name('bridgeNetworkOptions' =>\SOAP::Data->value( @bridge_array )->type('tns:ArrayOfBridgeNetworkOption')),
777 SOAP::Data->name('isCrossHost' => 1)->type('s:boolean')
778 );
779  
780 0 ▶ if ( $self->{ConfigurationDeployEx2}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationDeployEx2'}->fault) { } 0 0 0
781 0 $self->_fault( $self->{ConfigurationDeployEx2} );
782 0 return $self->{ConfigurationDeployEx2}->fault;
783 } else {
784 0 return $self->{ConfigurationDeployEx2}->result;
785 }
786 }
787  
788 sub priv_ConfigurationExport {
789 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationExport: not called CC=2 SCAR=17.9
Pod documented
790 0 my $conf = shift @_;
791 0 my $unc = shift @_;
792 0 my $user = shift @_;
793 0 my $pass = shift @_;
794  
795 $self->{ConfigurationExport} =
796 $self->{soap_priv}->ConfigurationExport(
797 $self->{auth_header},
798 0 SOAP::Data->name('configId' =>$conf)->type('s:int'),
799 SOAP::Data->name('uncPath' =>$unc )->type('s:string'),
800 SOAP::Data->name('username' =>$user)->type('s:string'),
801 SOAP::Data->name('password' =>$pass)->type('s:string'),
802 );
803  
804 0 ▶ if ( $self->{ConfigurationExport}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationExport'}->fault) { } 0 0 0
805 0 $self->_fault( $self->{ConfigurationExport} );
806 0 return $self->{ConfigurationExport}->fault;
807 } else {
808 0 return $self->{ConfigurationExport}->result;
809 }
810 }
811  
812 sub priv_ConfigurationGetNetworks {
813 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationGetNetworks: not called CC=3 SCAR=24.8
Pod documented
814 0 my $conf = shift @_;
815 0 my $phys = shift @_;
816  
817 0 ▶ $phys = 'false' unless $phys =~ /^true$/i;
Branch: 1 branch
BranchTrueFalseTotal
unless $phys =~ /^true$/i 0 0 0
818  
819 $self->{ConfigurationGetNetworks} =
820 $self->{soap_priv}->ConfigurationGetNetworks(
821 $self->{auth_header},
822 0 SOAP::Data->name('configID'=>$conf)->type('s:int'),
823 SOAP::Data->name('physical'=>$phys)->type('s:boolean'),
824 );
825  
826 0 ▶ if ( $self->{ConfigurationGetNetworks}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"ConfigurationGetNetworks"}->fault) 0 0 0
827 0 $self->_fault( $self->{ConfigurationGetNetworks} );
828 0 return $self->{ConfigurationGetNetworks}->fault;
829 }
830  
831 0 my $ret = $self->{ConfigurationGetNetworks}->result;
832  
833 0 return $ret;
834  
835 #my $array = $ret ? [ $ret ] : [ ];
836 #$array = [ $ret->{Network} ] if ref $ret and ref $ret->{Network} eq 'HASH';
837 #$array = $ret->{Network} if ref $ret and ref $ret->{Network} eq 'ARRAY';
838  
839 #return wantarray ? @$array : $array;
840 }
841  
842 sub priv_ConfigurationImport {
843 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationImport: not called CC=2 SCAR=17.9
Pod documented
844 0 my $unc = shift @_;
845 0 my $user = shift @_;
846 0 my $pass = shift @_;
847 0 my $name = shift @_;
848 0 my $desc = shift @_;
849 0 my $stor = shift @_;
850  
851 $self->{ConfigurationImport} =
852 $self->{soap_priv}->ConfigurationImport(
853 $self->{auth_header},
854 0 SOAP::Data->name('UNCPath' =>$unc )->type('s:string'),
855 SOAP::Data->name('dirUsername' =>$user)->type('s:string'),
856 SOAP::Data->name('dirPassword' =>$pass)->type('s:string'),
857 SOAP::Data->name('name' =>$name)->type('s:string'),
858 SOAP::Data->name('description' =>$desc)->type('s:string'),
859 SOAP::Data->name('storageName' =>$stor)->type('s:string'),
860 );
861  
862 0 ▶ if ( $self->{ConfigurationImport}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationImport'}->fault) { } 0 0 0
863 0 $self->_fault( $self->{ConfigurationImport} );
864 0 return $self->{ConfigurationImport}->fault;
865 } else {
866 0 return $self->{ConfigurationImport}->result;
867 }
868 }
869  
870 sub priv_ConfigurationMove {
871 0 ▶ my $self = shift @_;
Subroutine priv_ConfigurationMove: not called CC=10 SCAR=47.0
Pod documented
872 0 my $conf = shift @_;
873 0 my $dest = shift @_;
874 0 my $isnew = shift @_;
875 0 my $name = shift @_;
876 0 my $desc = shift @_;
877 0 my $lease = shift @_;
878 0 my $exist = shift @_;
879 0 my $vmids = shift @_;
880 0 my $del = shift @_;
881  
882 0 ▶ $isnew = 'false' unless $isnew =~ /^true$/i;
Branch: 1 branch
BranchTrueFalseTotal
unless $isnew =~ /^true$/i 0 0 0
883 0 ▶ $del = 'false' unless $del =~ /^true$/i;
Branch: 1 branch
BranchTrueFalseTotal
unless $del =~ /^true$/i 0 0 0
884  
885 0 my $vmids_xml = SOAP::Data->name('vmIds');
886 0 ▶ $vmids_xml = SOAP::Data->name( vmIds => \SOAP::Data->name('int', @$vmids ))
Branch: 1 branch
BranchTrueFalseTotal
if ref $vmids 0 0 0
887 if ref $vmids;
888  
889 0 my @optional;
890 0 ▶ push @optional, SOAP::Data->name('existingConfigId' =>$exist)->type('s:int') if $exist;
Branch: 1 branch
BranchTrueFalseTotal
if $exist 0 0 0
891 0 ▶ push @optional, SOAP::Data->name('newConfigName' =>$name )->type('s:string') if $name;
Branch: 1 branch
BranchTrueFalseTotal
if $name 0 0 0
892 0 ▶ push @optional, SOAP::Data->name('newConfigDescription' =>$desc )->type('s:string') if $desc;
Branch: 1 branch
BranchTrueFalseTotal
if $desc 0 0 0
893 0 ▶ push @optional, SOAP::Data->name('storageLeaseInMilliseconds' =>$lease)->type('s:long') if $lease;
Branch: 1 branch
BranchTrueFalseTotal
if $lease 0 0 0
894 0 ▶ push @optional, SOAP::Data->name('deleteOriginalConfig' =>$del )->type('s:boolean') if $del;
Branch: 1 branch
BranchTrueFalseTotal
if $del 0 0 0
895  
896 $self->{ConfigurationMove} =
897 $self->{soap_priv}->ConfigurationMove(
898 $self->{auth_header},
899 0 SOAP::Data->name('configIdToMove' =>$conf )->type('s:int'),
900 SOAP::Data->name('destinationWorkspaceId' =>$dest )->type('s:int'),
901 SOAP::Data->name('isNewConfiguration' =>$isnew)->type('s:boolean'),
902 @optional, $vmids_xml
903 );
904
905 0 ▶ if ( $self->{ConfigurationMove}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'ConfigurationMove'}->fault) { } 0 0 0
906 0 $self->_fault( $self->{ConfigurationMove} );
907 0 return $self->{ConfigurationMove}->fault;
908 } else {
909 0 return $self->{ConfigurationMove}->result;
910 }
911 }
912  
913 sub priv_GetAllWorkspaces {
914 0 ▶ my $self = shift @_;
Subroutine priv_GetAllWorkspaces: not called CC=7 SCAR=40.3
Pod documented
915 0 $self->{GetAllWorkspaces} = $self->{soap_priv}->GetAllWorkspaces( $self->{auth_header} );
916  
917 0 ▶ if ( $self->{GetAllWorkspaces}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"GetAllWorkspaces"}->fault) 0 0 0
918 0 $self->_fault( $self->{GetAllWorkspaces} );
919 0 return $self->{GetAllWorkspaces}->fault;
920 }
921  
922 0 my $ret = $self->{GetAllWorkspaces}->result;
923  
924 0 my $array = [ $ret ];
925 0 ▶ $array = [ $ret->{Workspace} ] if ref $ret and ref $ret->{Workspace} eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Workspace"} eq "HASH" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Workspace"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Workspace"} eq "HASH"
ref $ret ref $ret->{"Workspace"} eq "HASH"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Workspace"} eq "HASH"
ABresult
0X0
100
111
926 0 ▶ $array = $ret->{Workspace} if ref $ret and ref $ret->{Workspace} eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Workspace"} eq "ARRAY" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Workspace"} eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Workspace"} eq "ARRAY"
ref $ret ref $ret->{"Workspace"} eq "ARRAY"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Workspace"} eq "ARRAY"
ABresult
0X0
100
111
927  
928 0 ▶ return wantarray ? @$array : $array;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
929 }
930  
931 sub priv_GetNetworkInfo {
932 0 ▶ my $self = shift @_;
Subroutine priv_GetNetworkInfo: not called CC=7 SCAR=40.3
Pod documented
933 0 my $vmid = shift @_;
934  
935 $self->{GetNetworkInfo} =
936 $self->{soap_priv}->GetNetworkInfo(
937 $self->{auth_header},
938 0 SOAP::Data->name('vmID'=>$vmid)->type('s:int')
939 );
940  
941 0 ▶ if ( $self->{GetNetworkInfo}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"GetNetworkInfo"}->fault) 0 0 0
942 0 $self->_fault( $self->{GetNetworkInfo} );
943 0 return $self->{GetNetworkInfo}->fault;
944 }
945  
946 0 my $ret = $self->{GetNetworkInfo}->result;
947  
948 0 my $array = [];
949 0 ▶ $array = [ $ret->{NetInfo} ] if ref $ret and ref $ret->{NetInfo} eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"NetInfo"} eq "HASH" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"NetInfo"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"NetInfo"} eq "HASH"
ref $ret ref $ret->{"NetInfo"} eq "HASH"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"NetInfo"} eq "HASH"
ABresult
0X0
100
111
950 0 ▶ $array = $ret->{NetInfo} if ref $ret and ref $ret->{NetInfo} eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"NetInfo"} eq "ARRAY" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"NetInfo"} eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"NetInfo"} eq "ARRAY"
ref $ret ref $ret->{"NetInfo"} eq "ARRAY"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"NetInfo"} eq "ARRAY"
ABresult
0X0
100
111
951  
952 0 ▶ return wantarray ? @$array : $array;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
953 }
954  
955 sub priv_GetObjectConditions {
956 0 ▶ my $self = shift @_;
Subroutine priv_GetObjectConditions: not called CC=2 SCAR=17.9
Pod documented
957 0 my $objectType = shift @_;
958 0 my $objectID = shift @_;
959  
960 $self->{GetObjectConditions} =
961 $self->{soap_priv}->GetObjectConditions(
962 $self->{auth_header},
963 0 SOAP::Data->name('objectType'=>$objectType)->type('s:int'),
964 SOAP::Data->name('objectID'=>$objectID)->type('s:int'),
965 );
966  
967 0 ▶ if ( $self->{GetObjectConditions}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetObjectConditions'}->fault) { } 0 0 0
968 0 $self->_fault( $self->{GetObjectConditions} );
969 0 return $self->{GetObjectConditions}->fault;
970 } else {
971 0 return $self->{GetObjectConditions}->result;
972 }
973 }
974  
975 sub priv_GetOrganization {
976 0 ▶ my $self = shift @_;
Subroutine priv_GetOrganization: not called CC=2 SCAR=17.9
Pod documented
977 0 my $oid = shift @_;
978  
979 $self->{GetOrganization} =
980 $self->{soap_priv}->GetOrganization(
981 $self->{auth_header},
982 0 SOAP::Data->name('organizationId'=>$oid)->type('s:int')
983 );
984  
985 0 ▶ if ( $self->{GetOrganization}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetOrganization'}->fault) { } 0 0 0
986 0 $self->_fault( $self->{GetOrganization} );
987 0 return $self->{GetOrganization}->fault;
988 } else {
989 0 return $self->{GetOrganization}->result;
990 }
991 }
992  
993 sub priv_GetOrganizations {
994 0 ▶ my $self = shift @_;
Subroutine priv_GetOrganizations: not called CC=7 SCAR=40.3
Pod documented
995 0 $self->{GetOrganizations} = $self->{soap_priv}->GetOrganizations( $self->{auth_header} );
996  
997 0 ▶ if ( $self->{GetOrganizations}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"GetOrganizations"}->fault) 0 0 0
998 0 $self->_fault( $self->{GetOrganizations} );
999 0 return $self->{GetOrganizations}->fault;
1000 }
1001  
1002 0 my $ret = $self->{GetOrganizations}->result;
1003  
1004 0 my $array = [ $ret ];
1005 0 ▶ $array = [ $ret->{Organization} ] if ref $ret and ref $ret->{Organization} eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Organization"} eq "HASH" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Organization"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Organization"} eq "HASH"
ref $ret ref $ret->{"Organization"} eq "HASH"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Organization"} eq "HASH"
ABresult
0X0
100
111
1006 0 ▶ $array = $ret->{Organization} if ref $ret and ref $ret->{Organization} eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Organization"} eq "ARRAY" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Organization"} eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Organization"} eq "ARRAY"
ref $ret ref $ret->{"Organization"} eq "ARRAY"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Organization"} eq "ARRAY"
ABresult
0X0
100
111
1007  
1008 0 ▶ return wantarray ? @$array : $array;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
1009 }
1010  
1011 sub priv_GetOrganizationByName {
1012 0 ▶ my $self = shift @_;
Subroutine priv_GetOrganizationByName: not called CC=2 SCAR=17.9
Pod documented
1013 0 my $name = shift @_;
1014  
1015 $self->{GetOrganizationByName} =
1016 $self->{soap_priv}->GetOrganizationByName(
1017 $self->{auth_header},
1018 0 SOAP::Data->name('organizationName'=>$name)->type('s:string')
1019 );
1020  
1021 0 ▶ if ( $self->{GetOrganizationByName}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetOrganizationByName'}->fault) { } 0 0 0
1022 0 $self->_fault( $self->{GetOrganizationByName} );
1023 0 return $self->{GetOrganizationByName}->fault;
1024 } else {
1025 0 return $self->{GetOrganizationByName}->result;
1026 }
1027 }
1028  
1029 sub priv_GetOrganizationWorkspaces {
1030 0 ▶ my $self = shift @_;
Subroutine priv_GetOrganizationWorkspaces: not called CC=7 SCAR=40.3
Pod documented
1031 0 my $oid = shift @_;
1032  
1033 $self->{GetOrganizationWorkspaces} =
1034 $self->{soap_priv}->GetOrganizationWorkspaces(
1035 $self->{auth_header},
1036 0 SOAP::Data->name('organizationId'=>$oid)->type('s:int')
1037 );
1038  
1039 0 ▶ if ( $self->{GetOrganizationWorkspaces}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"GetOrganizationWorkspaces"}->fault) 0 0 0
1040 0 $self->_fault( $self->{GetOrganizationWorkspaces} );
1041 0 return $self->{GetOrganizationWorkspaces}->fault;
1042 }
1043  
1044 0 my $ret = $self->{GetOrganizationWorkspaces}->result;
1045  
1046 0 my $array = [ $ret ];
1047 0 ▶ $array = [ $ret->{Workspace} ] if ref $ret and ref $ret->{Workspace} eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Workspace"} eq "HASH" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Workspace"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Workspace"} eq "HASH"
ref $ret ref $ret->{"Workspace"} eq "HASH"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Workspace"} eq "HASH"
ABresult
0X0
100
111
1048 0 ▶ $array = $ret->{Workspace} if ref $ret and ref $ret->{Workspace} eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Workspace"} eq "ARRAY" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Workspace"} eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Workspace"} eq "ARRAY"
ref $ret ref $ret->{"Workspace"} eq "ARRAY"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Workspace"} eq "ARRAY"
ABresult
0X0
100
111
1049  
1050 0 ▶ return wantarray ? @$array : $array;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
1051 }
1052  
1053 sub priv_GetTemplate {
1054 0 ▶ my $self = shift @_;
Subroutine priv_GetTemplate: not called CC=2 SCAR=17.9
Pod documented
1055 0 my $id = shift @_;
1056  
1057 $self->{GetTemplate} =
1058 $self->{soap_priv}->GetTemplate(
1059 $self->{auth_header},
1060 0 SOAP::Data->name('id'=>$id)->type('s:int')
1061 );
1062  
1063 0 ▶ if ( $self->{GetTemplate}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetTemplate'}->fault) { } 0 0 0
1064 0 $self->_fault( $self->{GetTemplate} );
1065 0 return $self->{GetTemplate}->fault;
1066 } else {
1067 0 return $self->{GetTemplate}->result;
1068 }
1069 }
1070  
1071 sub priv_GetUser {
1072 0 ▶ my $self = shift @_;
Subroutine priv_GetUser: not called CC=2 SCAR=17.9
Pod documented
1073 0 my $name = shift @_;
1074  
1075 $self->{GetUser} =
1076 $self->{soap_priv}->GetUser(
1077 $self->{auth_header},
1078 0 SOAP::Data->name('userName'=>$name)->type('s:string')
1079 );
1080  
1081 0 ▶ if ( $self->{GetUser}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetUser'}->fault) { } 0 0 0
1082 0 $self->_fault( $self->{GetUser} );
1083 0 return $self->{GetUser}->fault;
1084 } else {
1085 0 return $self->{GetUser}->result;
1086 }
1087 }
1088  
1089 sub priv_GetWorkspaceByName {
1090 0 ▶ my $self = shift @_;
Subroutine priv_GetWorkspaceByName: not called CC=2 SCAR=17.9
Pod documented
1091 0 my $name = shift @_;
1092  
1093 $self->{GetWorkspaceByName} =
1094 $self->{soap_priv}->GetWorkspaceByName(
1095 $self->{auth_header},
1096 0 SOAP::Data->name('workspaceName'=>$name)->type('s:string')
1097 );
1098  
1099 0 ▶ if ( $self->{GetWorkspaceByName}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'GetWorkspaceByName'}->fault) { } 0 0 0
1100 0 $self->_fault( $self->{GetWorkspaceByName} );
1101 0 return $self->{GetWorkspaceByName}->fault;
1102 } else {
1103 0 return $self->{GetWorkspaceByName}->result;
1104 }
1105 }
1106  
1107 sub priv_LibraryCloneToWorkspace {
1108 0 ▶ my $self = shift @_;
Subroutine priv_LibraryCloneToWorkspace: not called CC=7 SCAR=40.3
Pod documented
1109 0 my $libraryid = shift @_;
1110 0 my $destworkspaceid = shift @_;
1111 0 my $isnew = shift @_;
1112 0 my $newname = shift @_;
1113 0 my $description = shift @_;
1114  
1115 0 my $machines = shift @_;
1116 0 my $storage = shift @_;
1117  
1118 0 my $existingconfid = shift @_;
1119 0 my $isfullclone = shift @_;
1120 0 my $storagelease = shift @_;
1121  
1122 0 ▶ $isnew = 'false' unless $isnew =~ /^true$/i;
Branch: 1 branch
BranchTrueFalseTotal
unless $isnew =~ /^true$/i 0 0 0
1123 0 ▶ $isfullclone = 'false' unless $isfullclone =~ /^true$/i;
Branch: 1 branch
BranchTrueFalseTotal
unless $isfullclone =~ /^true$/i 0 0 0
1124  
1125 0 my @machine_data;
1126  
1127 0 for my $machine (@$machines) {
1128 0 my @elements;
1129 0 for my $element ( keys %$machine ) {
1130 0 push @elements, SOAP::Data->name( $element, $machine->{$element} );
1131 }
1132 0 push @machine_data, SOAP::Data->name('machine' => \SOAP::Data->value(@elements));
1133 }
1134  
1135 $self->{LibraryCloneToWorkspace} =
1136 $self->{soap_priv}->LibraryCloneToWorkspace(
1137 $self->{auth_header},
1138 0 ▶ SOAP::Data->name('libraryId' => $libraryid )->type('s:int'),
Branch: 1 branch
BranchTrueFalseTotal
$existingconfid ? : 0 0 0
1139 SOAP::Data->name('destWorkspaceId' => $destworkspaceid )->type('s:int'),
1140 SOAP::Data->name('isNewConfiguration' => $isnew )->type('s:boolean'),
1141 SOAP::Data->name('newConfigName' => $newname )->type('s:string'),
1142 SOAP::Data->name('description' => $description )->type('s:string'),
1143 SOAP::Data->name('copyData' => \SOAP::Data->value(
1144 SOAP::Data->name('VMCopyData' => \SOAP::Data->value(
1145 @machine_data,
1146 SOAP::Data->name('storageServerName' => $storage )->type('s:string')
1147 ))
1148 )),
1149 ( $existingconfid ? SOAP::Data->name('existingConfigId' => $existingconfid )->type('s:int') : '' ),
1150 SOAP::Data->name('isFullClone' => $isfullclone )->type('s:boolean'),
1151 SOAP::Data->name('storageLeaseInMilliseconds' => $storagelease )->type('s:long')
1152 );
1153  
1154 0 ▶ if ( $self->{LibraryCloneToWorkspace}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'LibraryCloneToWorkspace'}->fault) { } 0 0 0
1155 0 $self->_fault( $self->{LibraryCloneToWorkspace} );
1156 0 return $self->{LibraryCloneToWorkspace}->fault;
1157 } else {
1158 0 return $self->{LibraryCloneToWorkspace}->result;
1159 }
1160 }
1161  
1162 sub priv_ListNetworks {
1163 0 ▶ my $self = shift @_;
Subroutine priv_ListNetworks: not called CC=8 SCAR=42.8
Pod documented
1164 0 $self->{ListNetworks} = $self->{soap_priv}->ListNetworks( $self->{auth_header} );
1165  
1166 0 ▶ if ( $self->{ListNetworks}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"ListNetworks"}->fault) 0 0 0
1167 0 $self->_fault( $self->{ListNetworks} );
1168 0 return $self->{ListNetworks}->fault;
1169 }
1170  
1171 0 my $ret = $self->{ListNetworks}->result;
1172  
1173 0 ▶ my $array = $ret ? [ $ret ] : [ ];
Branch: 1 branch
BranchTrueFalseTotal
$ret ? : 0 0 0
1174 0 ▶ $array = [ $ret->{Network} ] if ref $ret and ref $ret->{Network} eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Network"} eq "HASH" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Network"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Network"} eq "HASH"
ref $ret ref $ret->{"Network"} eq "HASH"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Network"} eq "HASH"
ABresult
0X0
100
111
1175 0 ▶ $array = $ret->{Network} if ref $ret and ref $ret->{Network} eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Network"} eq "ARRAY" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Network"} eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Network"} eq "ARRAY"
ref $ret ref $ret->{"Network"} eq "ARRAY"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Network"} eq "ARRAY"
ABresult
0X0
100
111
1176  
1177 0 ▶ return wantarray ? @$array : $array;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
1178 }
1179  
1180 sub priv_ListTemplates {
1181 0 ▶ my $self = shift @_;
Subroutine priv_ListTemplates: not called CC=8 SCAR=42.8
Pod documented
1182 0 $self->{ListTemplates} = $self->{soap_priv}->ListTemplates( $self->{auth_header} );
1183  
1184 0 ▶ if ( $self->{ListTemplates}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"ListTemplates"}->fault) 0 0 0
1185 0 $self->_fault( $self->{ListTemplates} );
1186 0 return $self->{ListTemplates}->fault;
1187 }
1188  
1189 0 my $ret = $self->{ListTemplates}->result;
1190  
1191 0 ▶ my $array = $ret ? [ $ret ] : [ ];
Branch: 1 branch
BranchTrueFalseTotal
$ret ? : 0 0 0
1192 0 ▶ $array = [ $ret->{Template} ] if ref $ret and ref $ret->{Template} eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Template"} eq "HASH" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Template"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Template"} eq "HASH"
ref $ret ref $ret->{"Template"} eq "HASH"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Template"} eq "HASH"
ABresult
0X0
100
111
1193 0 ▶ $array = $ret->{Template} if ref $ret and ref $ret->{Template} eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"Template"} eq "ARRAY" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"Template"} eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"Template"} eq "ARRAY"
ref $ret ref $ret->{"Template"} eq "ARRAY"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"Template"} eq "ARRAY"
ABresult
0X0
100
111
1194  
1195 0 ▶ return wantarray ? @$array : $array;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
1196 }
1197  
1198 sub priv_ListTransportNetworksInCurrentOrg {
1199 0 ▶ my $self = shift @_;
Subroutine priv_ListTransportNetworksInCurrentOrg: not called CC=2 SCAR=17.9
Pod documented
1200 0 $self->{ListTransportNetworksInCurrentOrg} = $self->{soap_priv}->ListTransportNetworksInCurrentOrg( $self->{auth_header} );
1201  
1202 0 ▶ if ( $self->{ListTransportNetworksInCurrentOrg}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"ListTransportNetworksInCurrentOrg"}->fault) 0 0 0
1203 0 $self->_fault( $self->{ListTransportNetworksInCurrentOrg} );
1204 0 return $self->{ListTransportNetworksInCurrentOrg}->fault;
1205 }
1206  
1207 0 return $self->{ListTransportNetworksInCurrentOrg}->result;
1208  
1209 #my $ret = $self->{ListTransportNetworksInCurrentOrg}->result;
1210  
1211 #my $array = $ret ? [ $ret ] : [ ];
1212 #$array = [ $ret->{Network} ] if ref $ret and ref $ret->{Network} eq 'HASH';
1213 #$array = $ret->{Network} if ref $ret and ref $ret->{Network} eq 'ARRAY';
1214  
1215 #return wantarray ? @$array : $array;
1216 }
1217  
1218 sub priv_ListUsers {
1219 0 ▶ my $self = shift @_;
Subroutine priv_ListUsers: not called CC=8 SCAR=42.8
Pod documented
1220 0 $self->{ListUsers} = $self->{soap_priv}->ListUsers( $self->{auth_header} );
1221  
1222 0 ▶ if ( $self->{ListUsers}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"ListUsers"}->fault) 0 0 0
1223 0 $self->_fault( $self->{ListUsers} );
1224 0 return $self->{ListUsers}->fault;
1225 }
1226  
1227 0 my $ret = $self->{ListUsers}->result;
1228  
1229 0 ▶ my $array = $ret ? [ $ret ] : [ ];
Branch: 1 branch
BranchTrueFalseTotal
$ret ? : 0 0 0
1230 0 ▶ $array = [ $ret->{User} ] if ref $ret and ref $ret->{User} eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"User"} eq "HASH" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"User"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"User"} eq "HASH"
ref $ret ref $ret->{"User"} eq "HASH"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"User"} eq "HASH"
ABresult
0X0
100
111
1231 0 ▶ $array = $ret->{User} if ref $ret and ref $ret->{User} eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
if ref $ret and ref $ret->{"User"} eq "ARRAY" 0 0 0
Condition0%0/3
ref $ret and ref $ret->{"User"} eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $ret and ref $ret->{"User"} eq "ARRAY"
ref $ret ref $ret->{"User"} eq "ARRAY"
Truth table0%0/3
A and B
A= ref $retB= ref $ret->{"User"} eq "ARRAY"
ABresult
0X0
100
111
1232  
1233 0 ▶ return wantarray ? @$array : $array;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
1234 }
1235  
1236 sub priv_MachineUpgradeVirtualHardware {
1237 0 ▶ my $self = shift @_;
Subroutine priv_MachineUpgradeVirtualHardware: not called CC=2 SCAR=17.9
Pod documented
1238 0 my $id = shift @_;
1239 $self->{MachineUpgradeVirtualHardware} =
1240 $self->{soap_priv}->MachineUpgradeVirtualHardware(
1241 $self->{auth_header},
1242 0 SOAP::Data->name('machineId'=>$id)->type('s:int'),
1243 );
1244  
1245 0 ▶ if ( $self->{MachineUpgradeVirtualHardware}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'MachineUpgradeVirtualHardware'}->fault) { } 0 0 0
1246 0 $self->_fault( $self->{MachineUpgradeVirtualHardware} );
1247 0 return $self->{MachineUpgradeVirtualHardware}->fault;
1248 } else {
1249 0 return $self->{MachineUpgradeVirtualHardware}->result;
1250 }
1251 }
1252  
1253 sub priv_NetworkInterfaceCreate {
1254 0 ▶ my $self = shift @_;
Subroutine priv_NetworkInterfaceCreate: not called CC=2 SCAR=17.9
Pod documented
1255 0 my $vmid = shift @_;
1256 0 my $netid = shift @_;
1257 0 my $iptype = shift @_;
1258 0 my $ipaddr = shift @_;
1259  
1260 $self->{NetworkInterfaceCreate} =
1261 $self->{soap_priv}->NetworkInterfaceCreate(
1262 $self->{auth_header},
1263 0 SOAP::Data->name('vmID' =>$vmid )->type('s:int'),
1264 SOAP::Data->name('networkID' =>$netid )->type('s:int'),
1265 SOAP::Data->name('IPAssignmentType' =>$iptype )->type('s:string'),
1266 SOAP::Data->name('IPAddress' =>$ipaddr )->type('s:string'),
1267 );
1268  
1269 0 ▶ if ( $self->{NetworkInterfaceCreate}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'NetworkInterfaceCreate'}->fault) { } 0 0 0
1270 0 $self->_fault( $self->{NetworkInterfaceCreate} );
1271 0 return $self->{NetworkInterfaceCreate}->fault;
1272 } else {
1273 0 return $self->{NetworkInterfaceCreate}->result;
1274 }
1275 }
1276  
1277 sub priv_NetworkInterfaceDelete {
1278 0 ▶ my $self = shift @_;
Subroutine priv_NetworkInterfaceDelete: not called CC=2 SCAR=17.9
Pod documented
1279 0 my $vmid = shift @_;
1280 0 my $nicid = shift @_;
1281  
1282 $self->{NetworkInterfaceDelete} =
1283 $self->{soap_priv}->NetworkInterfaceDelete(
1284 $self->{auth_header},
1285 0 SOAP::Data->name('vmID' => $vmid )->type('s:int'),
1286 SOAP::Data->name('nicID' => $nicid )->type('s:int'),
1287 );
1288  
1289 0 ▶ if ( $self->{NetworkInterfaceDelete}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'NetworkInterfaceDelete'}->fault) { } 0 0 0
1290 0 $self->_fault( $self->{NetworkInterfaceDelete} );
1291 0 return $self->{NetworkInterfaceDelete}->fault;
1292 } else {
1293 0 return $self->{NetworkInterfaceDelete}->result;
1294 }
1295 }
1296  
1297 sub priv_NetworkInterfaceModify { ### INCOMPLETE
1298 0 ▶ my $self = shift @_;
Subroutine priv_NetworkInterfaceModify: not called CC=2 SCAR=17.9
Pod documented
1299 0 my $vmid = shift @_;
1300 0 my $netid = shift @_;
1301 0 my $info = shift @_;
1302  
1303 $self->{NetworkInterfaceModify} =
1304 $self->{soap_priv}->NetworkInterfaceModify(
1305 $self->{auth_header},
1306 #SOAP::Data->name('vmID' =>$vmid )->type('s:int'),
1307 #SOAP::Data->name('networkID' =>$netid )->type('s:int'),
1308 #SOAP::Data->name('IPAssignmentType' =>$iptype )->type('s:string'),
1309 #SOAP::Data->name('IPAddress' =>$ipaddr )->type('s:string'),
1310 0 );
1311  
1312 0 ▶ if ( $self->{NetworkInterfaceModify}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'NetworkInterfaceModify'}->fault) { } 0 0 0
1313 0 $self->_fault( $self->{NetworkInterfaceModify} );
1314 0 return $self->{NetworkInterfaceModify}->fault;
1315 } else {
1316 0 return $self->{NetworkInterfaceModify}->result;
1317 }
1318 }
1319  
1320 sub priv_StorageServerVMFSFindByName {
1321 0 ▶ my $self = shift @_;
Subroutine priv_StorageServerVMFSFindByName: not called CC=2 SCAR=17.9
Pod documented
1322 0 my $storeName = shift @_;
1323  
1324 $self->{StorageServerVMFSFindByName} =
1325 $self->{soap_priv}->StorageServerVMFSFindByName(
1326 $self->{auth_header},
1327 0 SOAP::Data->name('name' => $storeName)->type(''));
1328  
1329 0 ▶ if ( $self->{StorageServerVMFSFindByName}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'StorageServerVMFSFindByName'}->fault) { } 0 0 0
1330 0 $self->_fault( $self->{StorageServerVMFSFindByName} );
1331 0 return $self->{StorageServerVMFSFindByName}->fault;
1332 } else {
1333 #return $self->{StorageServerVMFSFindByName}->result;
1334 0 my $result = $self->{StorageServerVMFSFindByName}->result;
1335 0 my $datastore = $$result{"label"}; # Need to be fixed. Currently in use?
1336 0 return $datastore;
1337 }
1338 }
1339  
1340 sub priv_TemplateChangeOwner {
1341 0 ▶ my $self = shift @_;
Subroutine priv_TemplateChangeOwner: not called CC=2 SCAR=17.9
Pod documented
1342 0 my $temp = shift @_;
1343 0 my $own = shift @_;
1344  
1345 $self->{TemplateChangeOwner} =
1346 $self->{soap_priv}->TemplateChangeOwner(
1347 $self->{auth_header},
1348 0 SOAP::Data->name('templateId' => $temp )->type('s:int'),
1349 SOAP::Data->name('newOwnerId' => $own )->type('s:int'),
1350 );
1351  
1352 0 ▶ if ( $self->{TemplateChangeOwner}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'TemplateChangeOwner'}->fault) { } 0 0 0
1353 0 $self->_fault( $self->{TemplateChangeOwner} );
1354 0 return $self->{TemplateChangeOwner}->fault;
1355 } else {
1356 0 return $self->{TemplateChangeOwner}->result;
1357 }
1358 }
1359  
1360 sub priv_TemplateExport {
1361 0 ▶ my $self = shift @_;
Subroutine priv_TemplateExport: not called CC=2 SCAR=17.9
Pod documented
1362 0 my $temp = shift @_;
1363 0 my $unc = shift @_;
1364 0 my $user = shift @_;
1365 0 my $pass = shift @_;
1366  
1367 $self->{TemplateExport} =
1368 $self->{soap_priv}->TemplateExport(
1369 $self->{auth_header},
1370 0 SOAP::Data->name('template_id' =>$temp)->type('s:int'),
1371 SOAP::Data->name('UNCPath' =>$unc )->type('s:string'),
1372 SOAP::Data->name('username' =>$user)->type('s:string'),
1373 SOAP::Data->name('password' =>$pass)->type('s:string'),
1374 );
1375  
1376 0 ▶ if ( $self->{TemplateExport}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'TemplateExport'}->fault) { } 0 0 0
1377 0 $self->_fault( $self->{TemplateExport} );
1378 0 return $self->{TemplateExport}->fault;
1379 } else {
1380 0 return $self->{TemplateExport}->result;
1381 }
1382 }
1383  
1384 sub priv_TemplateImport {
1385 0 ▶ my $self = shift @_;
Subroutine priv_TemplateImport: not called CC=2 SCAR=17.9
Pod documented
1386 0 my $unc = shift @_;
1387 0 my $user = shift @_;
1388 0 my $pass = shift @_;
1389 0 my $name = shift @_;
1390 0 my $desc = shift @_;
1391 0 my $stor = shift @_;
1392  
1393 0 my $list = shift @_;
1394  
1395 # Virtualization Technology: 6 (VMware ESX Server 3.0)
1396 # This comes from the Private API documentation
1397 0 my $vsid = 6;
1398  
1399 0 my $paramlist = \SOAP::Data->value(
1400  
1401 #SOAP::Data->name('VMParameter' => \SOAP::Data->value(
1402 # SOAP::Data->name('parameter_name' => 'VCPUCOUNT')->type(''),
1403 # SOAP::Data->name('parameter_value' => '4')->type('')
1404 # )),
1405  
1406 #SOAP::Data->name('VMParameter' => \SOAP::Data->value(
1407 # SOAP::Data->name('parameter_name' => 'GUESTOS')->type(''),
1408 # SOAP::Data->name('parameter_value' => 'RHEL4')->type('')
1409 #)),
1410  
1411 SOAP::Data->name('VMParameter' => \SOAP::Data->value(
1412 SOAP::Data->name('parameter_name' => 'HW_VERSION')->type(''),
1413 SOAP::Data->name('parameter_value' => $7)->type('')
1414 )),
1415  
1416 );
1417  
1418 $self->{TemplateImport} =
1419 $self->{soap_priv}->TemplateImport(
1420 $self->{auth_header},
1421 0 SOAP::Data->name('UNCPath' =>$unc )->type('s:string'),
1422 SOAP::Data->name('dirUsername' =>$user)->type('s:string'),
1423 SOAP::Data->name('dirPassword' =>$pass)->type('s:string'),
1424 SOAP::Data->name('name' =>$name)->type('s:string'),
1425 SOAP::Data->name('description' =>$desc)->type('s:string'),
1426 SOAP::Data->name('VSTypeID' =>$vsid)->type('s:int'),
1427 SOAP::Data->name('storageServerName' => $stor)->type('s:string'),
1428 SOAP::Data->name('parameterList' => $paramlist )
1429 );
1430  
1431 0 ▶ if ( $self->{TemplateImport}->fault ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'TemplateImport'}->fault) { } 0 0 0
1432 0 $self->_fault( $self->{TemplateImport} );
1433 0 return $self->{TemplateImport}->fault;
1434 } else {
1435 0 return $self->{TemplateImport}->result;
1436 }
1437 }
1438  
1439 sub priv_TemplateImportFromSMB {
1440 0 ▶ my $self = shift @_;
Subroutine priv_TemplateImportFromSMB: not called CC=2 SCAR=17.9
Pod documented
1441 0 my $UNCPath = shift @_;
1442 0 my $username = shift @_;
1443 0 my $password = shift @_;
1444 0 my $delete = shift @_;
1445 0 my $description = shift @_;
1446 0 my $destStore = shift @_;
1447 0 my $destName = shift @_;
1448 0 my $destDesc = shift @_;
1449  
1450 $self->{TemplateImportFromSMB} =
1451 $self->{soap_priv}->TemplateImportFromSMB(
1452 $self->{auth_header},
1453  
1454 0 SOAP::Data->name('name' => $destName)->type(''),
1455 SOAP::Data->name('VSTypeID' => $delete)->type(''),
1456 SOAP::Data->name('description' => $description)->type(''),
1457 SOAP::Data->name('storageServerName' => $destStore)->type(''),
1458  
1459 SOAP::Data->name('UNCPath' => $UNCPath)->type(''),
1460 SOAP::Data->name('dirUsername' => $username)->type(''),
1461 SOAP::Data->name('dirPassword' => $password)->type(''),
1462  
1463 SOAP::Data->name('performGuestCustomization' => "1")->type(''),
1464  
1465 SOAP::Data->name('parameterList' =>
1466 \SOAP::Data->value(
1467  
1468 SOAP::Data->name('VMParameter' =>
1469 \SOAP::Data->value(
1470 SOAP::Data->name('parameter_name' => 'VCPUCOUNT')->type(''),
1471 SOAP::Data->name('parameter_value' => '4')->type(''))),
1472  
1473 SOAP::Data->name('VMParameter' =>
1474 \SOAP::Data->value(
1475 SOAP::Data->name('parameter_name' => 'GUESTOS')->type(''),
1476 SOAP::Data->name('parameter_value' => 'RHEL4')->type(''))),
1477  
1478 SOAP::Data->name('VMParameter' =>
1479 \SOAP::Data->value(
1480 SOAP::Data->name('parameter_name' => 'HW_VERSION')->type(''),
1481 SOAP::Data->name('parameter_value' => $7)->type(''))),
1482  
1483  
1484 ))
1485 );
1486  
1487 0 ▶ $self->_fault( $self->{TemplateImportFromSMB} ) if $self->{TemplateImportFromSMB}->fault;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"TemplateImportFromSMB"}->fault 0 0 0
1488 0 return $self->{TemplateImportFromSMB}->result;
1489 }
1490  
1491 sub priv_TemplatePerformAction {
1492 0 ▶ my $self = shift @_;
Subroutine priv_TemplatePerformAction: not called CC=2 SCAR=17.9
Pod documented
1493 0 my $template_id = shift @_;
1494 0 my $action = shift @_;
1495  
1496 $self->{TemplatePerformAction} =
1497 $self->{soap_priv}->TemplatePerformAction( $self->{auth_header},
1498 0 SOAP::Data->name('template_id' => $template_id )->type('s:int'),
1499 SOAP::Data->name('action' => $action )->type('s:int') );
1500  
1501 0 ▶ if ($self->{TemplatePerformAction}->fault) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"TemplatePerformAction"}->fault) 0 0 0
1502 0 $self->_fault( $self->{TemplatePerformAction} );
1503 0 return $self->{TemplatePerformAction}->fault;
1504 }
1505  
1506 0 return $self->{TemplatePerformAction}->result;
1507 }
1508  
1509 sub priv_WorkspaceCreate {
1510 0 ▶ my $self = shift @_;
Subroutine priv_WorkspaceCreate: not called CC=2 SCAR=17.9
Pod documented
1511 0 my $name = shift @_;
1512 0 my $ismain = shift @_;
1513 0 my $description = shift @_;
1514 0 my $storedquota = shift @_;
1515 0 my $deployquota = shift @_;
1516  
1517 $self->{WorkspaceCreate} =
1518 $self->{soap_priv}->WorkspaceCreate( $self->{auth_header},
1519 0 SOAP::Data->name('name' => $name )->type('s:string'),
1520 SOAP::Data->name('isMain' => $ismain )->type('s:bool'),
1521 SOAP::Data->name('description' => $description )->type('s:string'),
1522 SOAP::Data->name('storedVMQuota' => $storedquota )->type('s:int'),
1523 SOAP::Data->name('deployedVMQuota' => $deployquota )->type('s:int') );
1524  
1525 0 ▶ $self->_fault( $self->{WorkspaceCreate} ) if $self->{WorkspaceCreate}->fault;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"WorkspaceCreate"}->fault 0 0 0
1526 0 return $self->{WorkspaceCreate}->result;
1527 }
1528  
1529 2 1;
1530  
1531 __END__
↑ Summary