summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/satellitedaemon/Identity.java
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-10-16 16:21:10 +0200
committerBjörn Hagemeister2014-10-16 16:21:10 +0200
commitf10fb29b9668b2a1063d8c947e166a8db9fd5070 (patch)
treed3ae9c5a58ec54cf9f669c76f79e53fb13e87a33 /src/main/java/org/openslx/satellitedaemon/Identity.java
parentImplemented --submitkey command line option. (diff)
downloadsatellite-daemon-f10fb29b9668b2a1063d8c947e166a8db9fd5070.tar.gz
satellite-daemon-f10fb29b9668b2a1063d8c947e166a8db9fd5070.tar.xz
satellite-daemon-f10fb29b9668b2a1063d8c947e166a8db9fd5070.zip
Implemented --updateAddress command line option.
Diffstat (limited to 'src/main/java/org/openslx/satellitedaemon/Identity.java')
-rw-r--r--src/main/java/org/openslx/satellitedaemon/Identity.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/Identity.java b/src/main/java/org/openslx/satellitedaemon/Identity.java
index e95cf99..947d90a 100644
--- a/src/main/java/org/openslx/satellitedaemon/Identity.java
+++ b/src/main/java/org/openslx/satellitedaemon/Identity.java
@@ -174,6 +174,12 @@ public class Identity
return writeIdToFile( organizationName, modulus, privateExp, publicExp );
}
+ /**
+ * Submit new satellite - ipAddress to master with organizationId, ipAddress
+ * and key - information.
+ * @param ipAddress
+ * @return true, if successful.
+ */
public static boolean submitKey( String ipAddress )
{
RSAPublicKey pubKey = (RSAPublicKey)getPublicKey();
@@ -191,6 +197,16 @@ public class Identity
pubKey.getModulus().toString(),
pubKey.getPublicExponent().toString() );
}
+
+ /**
+ * Update already existing satellite - ipAddress in master - Db.
+ * @param ipAddress
+ * @return true, if successful.
+ */
+ public static boolean updateAddress( String ipAddress )
+ {
+ return ThriftConnection.updateSatelliteAddress( ipAddress );
+ }
/**
* Write given organization name, modulus, public and private exponent to