summaryrefslogtreecommitdiffstats
path: root/amttool
diff options
context:
space:
mode:
authorSimon Thompson <S.J.Thompson@cs.bham.ac.uk>2011-05-24 12:17:02 +0100
committerGerd Hoffmann <kraxel@redhat.com>2011-05-25 11:32:05 +0200
commit853d7d850ef838831289c34bd42bb99a01e072b1 (patch)
treeec3856bec2714ff3b5b00a7f1981c03d5b95bcd6 /amttool
parent431a7858f601166ad2a4bd7d6b8eb36dd4461413 (diff)
downloadamtterm-853d7d850ef838831289c34bd42bb99a01e072b1.tar.gz
amttool patch
Hi, Attached is a patch for your amttool code which allows access to machines provisioned in Enterprise mode. In Enterprise mode, machines listen on port 16993 rather than 16992, and only take SSL. Its a pretty basic patch to make the code work... Simon -- Simon Thompson Senior Experimental Computing Specialist School of Computer Science, The University of Birmingham
Diffstat (limited to 'amttool')
-rwxr-xr-xamttool12
1 files changed, 11 insertions, 1 deletions
diff --git a/amttool b/amttool
index 6734ff3..c1adf9e 100755
--- a/amttool
+++ b/amttool
@@ -6,6 +6,16 @@ use SOAP::Lite;
my $amt_host = shift;
my $amt_port = "16992";
+my $amt_proto = 'http';
+
+if ($amt_host =~ /([^:]+):(\d+)/) {
+ $amt_host = $1;
+ $amt_port = $2;
+ if ($amt_port == 16993) {
+ $amt_proto = 'https';
+ }
+}
+
$main::amt_user = "admin";
$main::amt_pass = $ENV{'AMT_PASSWORD'};
my $amt_debug = 0;
@@ -96,7 +106,7 @@ sub SOAP::Transport::HTTP::Client::get_basic_credentials {
}
sub soap_init() {
- my $proxybase = "http://$amt_host:$amt_port";
+ my $proxybase = "$amt_proto://$amt_host:$amt_port";
my $schemabase = "http://schemas.intel.com/platform/client";
$nas = SOAP::Lite->new(