10 |
|
|
11 |
use lib 'lib'; |
use lib 'lib'; |
12 |
|
|
13 |
my $amt_host = $ENV{'AMT_HOST'}; |
sub soap_url { |
14 |
my $amt_port = "16992"; |
my $amt_host = $ENV{'AMT_HOST'}; |
15 |
$main::amt_user = "admin"; |
my $amt_port = "16992"; |
16 |
$main::amt_pass = $ENV{'AMT_PASSWORD'}; |
"http://$amt_host:$amt_port"; |
17 |
|
} |
18 |
|
|
19 |
my $amt_debug = 0; |
my $amt_debug = 0; |
20 |
$amt_debug = $ENV{'AMT_DEBUG'} if defined($ENV{'AMT_DEBUG'}); |
$amt_debug = $ENV{'AMT_DEBUG'} if defined($ENV{'AMT_DEBUG'}); |
21 |
|
|
78 |
my ($nas, $sas, $rcs); |
my ($nas, $sas, $rcs); |
79 |
|
|
80 |
sub SOAP::Transport::HTTP::Client::get_basic_credentials { |
sub SOAP::Transport::HTTP::Client::get_basic_credentials { |
81 |
return $main::amt_user => $main::amt_pass; |
return 'admin' => $ENV{AMT_PASSWORD}; |
82 |
} |
} |
83 |
|
|
84 |
sub init() { |
sub init() { |
85 |
my $proxybase = "http://$amt_host:$amt_port"; |
my $proxybase = soap_url; |
86 |
my $schemabase = "http://schemas.intel.com/platform/client"; |
my $schemabase = "http://schemas.intel.com/platform/client"; |
87 |
|
|
88 |
$nas = SOAP::Lite->new( |
$nas = SOAP::Lite->new( |
107 |
sub _soap { |
sub _soap { |
108 |
my $name = shift; |
my $name = shift; |
109 |
|
|
110 |
my $proxybase = "http://$amt_host:$amt_port"; |
my $proxybase = soap_url; |
111 |
my $schemabase = "http://schemas.intel.com/platform/client"; |
my $schemabase = "http://schemas.intel.com/platform/client"; |
112 |
|
|
113 |
warn "call_soap $proxybase $name ",dump( @_ ); |
warn "call_soap $proxybase $name ",dump( @_ ); |
235 |
} |
} |
236 |
|
|
237 |
sub print_general_info() { |
sub print_general_info() { |
|
printf "### AMT info on machine '%s' ###\n", $amt_host; |
|
238 |
|
|
239 |
printf "AMT version: %s\n", $amt_version; |
printf "AMT version: %s\n", $amt_version; |
240 |
|
|