summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-10-16 15:36:11 +0200
committerBjörn Hagemeister2014-10-16 15:36:11 +0200
commit85547f845caad8715a4c3418af11c96c352c643a (patch)
tree5d29ecbd8384bf97dec306a9d26708b2f7b33245 /src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
parentAdded failure information. (diff)
downloadsatellite-daemon-85547f845caad8715a4c3418af11c96c352c643a.tar.gz
satellite-daemon-85547f845caad8715a4c3418af11c96c352c643a.tar.xz
satellite-daemon-85547f845caad8715a4c3418af11c96c352c643a.zip
Implemented --submitkey command line option.
Diffstat (limited to 'src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java')
-rw-r--r--src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
index f716077..723da9b 100644
--- a/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
+++ b/src/main/java/org/openslx/satellitedaemon/filetransfer/ThriftConnection.java
@@ -272,4 +272,17 @@ public class ThriftConnection
}
return false;
}
+
+ public static boolean registerSatellite( String organizationId, String ipAddress, String modulus, String exponent )
+ {
+ ImageServer.Client theClient = null;
+ theClient = getConnection();
+ // No check for valid connection. --> not needed, because this satellite is not known yet by master.
+ try {
+ return theClient.registerSatellite( organizationId, ipAddress, modulus, exponent );
+ } catch ( TException e ) {
+ log.error( "TException", e );
+ return false;
+ }
+ }
}