From: Thierry Parmentelat Date: Thu, 2 Jul 2009 09:22:58 +0000 (+0000) Subject: cleanup gui/ and dummy/ X-Git-Tag: sfa-0.9-0@14641~218 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=db513903ce5d33663691fe0ad949ee59ef18afc9;p=sfa.git cleanup gui/ and dummy/ --- diff --git a/dummy/dummyClient.py b/dummy/dummyClient.py deleted file mode 100644 index c7add958..00000000 --- a/dummy/dummyClient.py +++ /dev/null @@ -1,35 +0,0 @@ -import os - -from geniclient import * -from cert import * -from gid import * - -key_file = "dummyclient.key" -cert_file = "dummyclient.cert" - -if (not os.path.exists(key_file)) or (not os.path.exists(cert_file)): - key = Keypair(create=True) - key.save_to_file(key_file) - - cert = Certificate(subject="dummyclient") - cert.set_pubkey(key) - cert.set_issuer(key=key, subject="dummyclient") - cert.sign() - cert.save_to_file(cert_file) - -c = GeniClient("https://localhost:12345/", key_file, cert_file) - -gid = c.get_gid("planetlab.smbaker.dummy.client")[0] -gid.save_to_file("dummyclient.gid") - -print "gid: ", gid.get_subject(), "saved to dummyclient.gid" - -cred = c.get_self_credential("user", "planetlab.smbaker.dummy.client") -cred.save_to_file("dummyclient.cred") - -print "cred: ", cred.get_subject(), "saved to dummyclient.cred" - -object_cred = c.get_credential(cred, "slice", "planetlab.smbaker.dummy.slice") -object_cred.save_to_file("dummyslice.cred") - -print "cred: ", object_cred.get_subject(), "saved to dummyslice.cred" diff --git a/dummy/dummyServer.py b/dummy/dummyServer.py deleted file mode 100644 index c64c73dc..00000000 --- a/dummy/dummyServer.py +++ /dev/null @@ -1,93 +0,0 @@ -import tempfile -import os - -from cert import * -from gid import * -from geniserver import * - -# DummyRegistry implements the security layer for a registry. It creates GIDs -# by using the public key contained in client's certificate. - - -class DummyRegistry(GeniServer): - gid_dict = {} - - def __init__(self, ip, port, key_file, cert_file): - GeniServer.__init__(self, ip, port, key_file, cert_file) - - def register_functions(self): - GeniServer.register_functions(self) - self.server.register_function(self.get_self_credential) - self.server.register_function(self.get_credential) - self.server.register_function(self.get_gid) - - def resolve_gid(self, name): - gid = self.gid_dict.get(name, None) - if gid: - return [gid] - - # assume the user is who he says he is, and create a GID for him - peer_cert = self.server.peer_cert - gid = GID(subject=name, uuid=create_uuid(), hrn=name) - gid.set_pubkey(peer_cert.get_pubkey()) - gid.set_issuer(key=self.key, cert=self.cert) - gid.encode() - gid.sign() - - self.gid_dict[name] = gid - - return [gid] - - def get_gid(self, name): - gid_list = self.resolve_gid(name) - gid_string_list = [] - for gid in gid_list: - gid_string_list.append(gid.save_to_string()) - return gid_string_list - - def get_self_credential(self, type, name): - client_gid = self.resolve_gid(name)[0] - cred = Credential(subject = client_gid.get_subject()) - cred.set_gid_caller(client_gid) - cred.set_issuer(key=self.key, cert=self.cert) - cred.set_pubkey(client_gid.get_pubkey()) - cred.encode() - cred.sign() - return cred.save_to_string() - - def get_credential(self, cred, type, name): - if not cred: - return get_self_credential(self, type, name) - - self.decode_authentication(cred) - - object_gid = self.resolve_gid(name)[0] - new_cred = Credential(subject = object_gid.get_subject()) - new_cred.set_gid_caller(self.client_gid) - new_cred.set_gid_object(object_gid) - new_cred.set_issuer(key=self.key, cert=self.cert) - new_cred.set_pubkey(object_gid.get_pubkey()) - new_cred.encode() - new_cred.sign() - - return new_cred.save_to_string() - -if __name__ == "__main__": - key_file = "dummyserver.key" - cert_file = "dummyserver.cert" - - # if no key is specified, then make one up - if (not os.path.exists(key_file)) or (not os.path.exists(cert_file)): - key = Keypair(create=True) - key_file = "dummyserver.key" - key.save_to_file(key_file) - - cert = Certificate(subject="dummy") - cert.set_issuer(key=key, subject="dummy") - cert.set_pubkey(key) - cert.sign() - cert.save_to_file(cert_file) - - s = DummyRegistry("localhost", 12345, key_file, cert_file) - s.run() - diff --git a/gui/JavaApplication1/build.xml b/gui/JavaApplication1/build.xml deleted file mode 100644 index 716370b6..00000000 --- a/gui/JavaApplication1/build.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - Builds, tests, and runs the project JavaApplication1. - - - diff --git a/gui/JavaApplication1/build/classes/javaapplication1/DisplayHandle$1$1.class b/gui/JavaApplication1/build/classes/javaapplication1/DisplayHandle$1$1.class deleted file mode 100644 index 523cbd17..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/DisplayHandle$1$1.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/DisplayHandle$1.class b/gui/JavaApplication1/build/classes/javaapplication1/DisplayHandle$1.class deleted file mode 100644 index 6cb79d02..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/DisplayHandle$1.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/DisplayHandle.class b/gui/JavaApplication1/build/classes/javaapplication1/DisplayHandle.class deleted file mode 100644 index 3e0bee3e..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/DisplayHandle.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$1.class b/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$1.class deleted file mode 100644 index 75abe61f..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$1.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$2.class b/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$2.class deleted file mode 100644 index db7e2fea..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$2.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$3.class b/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$3.class deleted file mode 100644 index 03672666..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$3.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$4.class b/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$4.class deleted file mode 100644 index 9421b52d..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$4.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$5.class b/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$5.class deleted file mode 100644 index 142c03f8..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$5.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$6.class b/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$6.class deleted file mode 100644 index ce0035b7..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$6.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$7.class b/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$7.class deleted file mode 100644 index 5e4ce4b0..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI$7.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI.class b/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI.class deleted file mode 100644 index 669c519d..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/GeniGUI.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/GuiComponent.class b/gui/JavaApplication1/build/classes/javaapplication1/GuiComponent.class deleted file mode 100644 index a93c11db..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/GuiComponent.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/PanelFiller.class b/gui/JavaApplication1/build/classes/javaapplication1/PanelFiller.class deleted file mode 100644 index 3e8e5a2d..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/PanelFiller.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/RecordInfo.class b/gui/JavaApplication1/build/classes/javaapplication1/RecordInfo.class deleted file mode 100644 index aa54ab1f..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/RecordInfo.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/SpringUtilities.class b/gui/JavaApplication1/build/classes/javaapplication1/SpringUtilities.class deleted file mode 100644 index 4b026d92..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/SpringUtilities.class and /dev/null differ diff --git a/gui/JavaApplication1/build/classes/javaapplication1/User.class b/gui/JavaApplication1/build/classes/javaapplication1/User.class deleted file mode 100644 index d8e6322d..00000000 Binary files a/gui/JavaApplication1/build/classes/javaapplication1/User.class and /dev/null differ diff --git a/gui/JavaApplication1/certutil.py b/gui/JavaApplication1/certutil.py deleted file mode 100755 index 73a534f6..00000000 --- a/gui/JavaApplication1/certutil.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/python -from M2Crypto import X509 -import sys - -id_file = "" -try: - if len(sys.argv)>1: - id_file = sys.argv[len(sys.argv)-1] - else: - print 'File '+id_file+' does not exist.\n' - sys.exit(0) - pubkey = X509.load_cert(id_file).get_pubkey().as_pem(cipher=None) - print pubkey - - print "Character map:\n" - prev = '' - cur = '' - for ch in pubkey: - prev = cur - cur = ch - if cur == '\n': - 1==1 - print ch, -except: - print "Error in input file.\n" diff --git a/gui/JavaApplication1/client_keiko/acc_file b/gui/JavaApplication1/client_keiko/acc_file deleted file mode 100644 index 88158341..00000000 --- a/gui/JavaApplication1/client_keiko/acc_file +++ /dev/null @@ -1,52 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIB+zCCAWQCAQAwDQYJKoZIhvcNAQEEBQAwDzENMAsGA1UEAxMEa2VpbzAeFw0w -ODAzMjgwNDI2NDRaFw0wODA3MjEyMjEzMjRaMBoxGDAWBgNVBAMTD0dFTkkgQWNj -b3VudGluZzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAlxyzi9dVIDmyUuaW -/H7YM+5LLZbQg/lGtQ0hyn/DNWp0b3FZ0tazmdK/yD3bq1sUa8txCq2gSsBzv6gA -3E1YI71wYmv8xTOOo5hZlBT3apdh2UKlu4vuUBVaSIm3whiVEd7sGkJJIJoWC3tx -R+/d9u6GYgORP/sb8q2Xk2y9CB8CAwEAAaNhMF8wXQYDVR0RAQH/BFMwUYZPaHR0 -cDovLyNocm46cGxhbmV0bGFiLmpwLmtlaW8ua2Vpa28jdXVpZDo1MzU4NDk4NDQ3 -NTM3MDMzNTI5ODU5MjQ1MTI2MjQwODAwMDc5MjANBgkqhkiG9w0BAQQFAAOBgQCW -zG0R4AkzONNWSEYccFcI0yDJIcojse8CGVhI0N8ykmph1MEcUHAdT8x1Ssl593+o -K6vmwJpak8qLjD9Fbry/byVj3d8CzrokO8LkjVz4daye0SQIFp7TbfeoK9mg/GE1 -shI6rxnUg15cfR9L9lkso6p8O/KQpWX9zUtgRIuTbw== ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIB8zCCAVwCAQAwDQYJKoZIhvcNAQEEBQAwDTELMAkGA1UEAxMCanAwHhcNMDgw -MzI4MDQyNjQ0WhcNMDgwNzIxMjIxMzI0WjAaMRgwFgYDVQQDEw9HRU5JIEFjY291 -bnRpbmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOVoqTRxh/259AB1p3+G -HcUxSKpdVkKgJJGXvsCtav2Rxu9jlEq1AHt6Ff08YlqjVLPbSLTxVDDYUva+fmWl -SzWRRZdVkPrT5PipoQ38HM/RlgsMaSsB1otJd+sbVP2Opwbqcc3DZ4+NbRAV051Z -mzR4C10QIOkYBaa+D48ocjC9AgMBAAGjWzBZMFcGA1UdEQEB/wRNMEuGSWh0dHA6 -Ly8jaHJuOnBsYW5ldGxhYi5qcC5rZWlvI3V1aWQ6NjU5MTQzMzc2OTc1MDYxNDM3 -ODc5MDUwMjkzMDIyOTMxMDY2MzAwDQYJKoZIhvcNAQEEBQADgYEA0NDOfUAk1Puw -ghgHzdXzTBZLJkhj9B80D678aSGX/dSOIIJGUo/AXRNfwtVRVUfQ+PQs/LgygGJ6 -u1NUTuhVDJrJROd+bguDp5DSqR/om9uupSvGxGjcGGLpcrGES7hWuTU1VIRgdC8Z -1BK3qYToeIsiaDzIjrkZplq5brgBHoE= ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIB9TCCAV4CAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODA0MDAyMloXDTA4MDcyMTIxNDcwMlowGjEYMBYGA1UEAxMPR0VO -SSBBY2NvdW50aW5nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDgD+Z79eOf -iurH0dBuwTFgTfWafbVQXcsY6IQs3o+lV9n7uNAIy2+puX30TZPVja6AsYbLXJsK -2xMUYWuqcyErA9DCD1Ln+PLEJnskx5KQnVm5Gw/xbVOxDSOWQOXUKMxRbRCtlFtZ -Ar/iM40lSpgUTHzHBGOlH7lNeY3UZvLEZQIDAQABo1YwVDBSBgNVHREBAf8ESDBG -hkRodHRwOi8vI2hybjpwbGFuZXRsYWIuanAjdXVpZDoxOTUzNTQ1Nzg5NjI5MDI3 -NTY4NTk3NzE3OTI3NzU0NzI4MTY0MTANBgkqhkiG9w0BAQQFAAOBgQBFnESK6zc+ -GxI/XET7boZ8GSMbKwSQoGf33Sz1qwRp31nf4HvoHXl6j6DmpFtcEqeK8rTP+AiX -n6b14cfXdQ0Px+00/zDNcDyVzh01V6KMrDeVhZrpiejIqW+vPSjMMoO1/nYrY5r4 -gf8HYww8uY1RciEeLPZkcJtR0Gq2jnkT4Q== ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIB8zCCAVwCAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODAzNDQ0OFoXDTA4MDcyMTIxMzEyOFowGjEYMBYGA1UEAxMPR0VO -SSBBY2NvdW50aW5nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC1NiZzJyIz -8uZVHahZQqcmhsxROY8YjjRF/WGow9t8hvaimScO0yH3VUEPolblSM1Juke6M3vG -O7aT7bJCapb7kuoHlrS35k0K/vcOOMXS80gpT8oltKbfJrlt8kmtEXm7F4fh8UiL -m6n/GEY9OPFuvUtQqIFqG8DdBd3SEhi6UQIDAQABo1QwUjBQBgNVHREBAf8ERjBE -hkJodHRwOi8vI2hybjpwbGFuZXRsYWIjdXVpZDoxNjQyMTQ0ODk4NTIwNjUyMzY3 -MjM5NzIxNzQ2MjkyMjIyNjk3MTgwDQYJKoZIhvcNAQEEBQADgYEAUrjefqbA5c69 -KfNh/ENOp0xFnvWn3UReOo2mhYZI2LWyX41g/q/InVogh8aJ7LXHI6wjHL+PGz3n -fU+Bl2fL7GAL0i6Wr1JRbT2YHMJd97C11hWPLg+1Tt3MHwMRf0X8v7I3pRSJOIq3 -si0AZRHgngrWmhf85bKAqS210OWHWOM= ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_keiko/clientstub.py b/gui/JavaApplication1/client_keiko/clientstub.py deleted file mode 100755 index 147ecaaf..00000000 --- a/gui/JavaApplication1/client_keiko/clientstub.py +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/python - -import os, sys -from M2Crypto import SSL -sys.path.append('/home/soners/work/geni/rpc/util') -sys.path.append('/home/soners/work/geni/rpc/util/sec') -from sec import * - -SERVER_HOST = '127.0.0.1' -SERVER_PORT = 8002 -AUTH_HOST = '127.0.0.1' -AUTH_PORT = 8002 - -renew_res1 = 0 -renew_res2 = 0 - -def verify_callback(preverify_ok, ctx): - return 1 - -class GENIClient(): - def __init__(self, hrn, type, id_file, id_key_file, acc_file, cred_file): - self.hrn = hrn - self.type = type - #check if the certificate and the private key exists, terminate if not - if not os.path.exists(id_file) or not os.path.exists(id_key_file) : - print 'The certificate or the private key does not exist.\n' - os.exit(1) - #check the acc and cred files - if not os.path.exists(acc_file) or not is_valid_chain(acc_file): - open(acc_file, 'w').write('ANONYM') - if not os.path.exists(cred_file) or not is_valid_chain(cred_file): - open(cred_file, 'w').write('NO_CRED') - #initialize the security system - self.sec = Sec('client', id_file, id_key_file, acc_file, cred_file) - #ssl parameters - self.ctx = SSL.Context() - self.ctx.load_cert(self.sec.id_file,self.sec.id_key_file) - self.ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, depth=9, callback=verify_callback) - - def connect(self, host, port): - #if the acc and cred needs renewal then do call to authority - if self.type == 'user' or self.type == 'slice' or self.type == 'SA': - reg_type = 'slice' - else: - reg_type ='component' - renew_res1 = renew_cert('accounting', '.', reg_type, self.hrn, None, None, (AUTH_HOST, AUTH_PORT), self.sec) - renew_res2 = renew_cert('credential', '.', reg_type, self.hrn, None, None, (AUTH_HOST, AUTH_PORT), self.sec) - if renew_res1 == None: - print "There is no certificate in the directory "+"./\n" - os.exit(0) - #connect to server - server = SSL.Connection(self.ctx) - server.connect((host,port)) - peer = self.sec.auth_protocol(server) - if peer: - return server - else: - return None - -def main(): - try: - #read the input file - fp = open('tmp_input.txt', 'r') - user_data = fp.readline() - call_data = fp.readline() - print 'Read file.\n' - - #client related info - HRN = user_data.split(' ')[0] - TYPE = user_data.split(' ')[1].split('\n')[0] - name = get_leaf(HRN) - ID_FILE = name+'.cert' - ID_KEY_FILE = name+'.pkey' - ACC_FILE = 'acc_file' - CRED_FILE = 'cred_file' - my_client = GENIClient(HRN, TYPE, ID_FILE, ID_KEY_FILE, ACC_FILE, CRED_FILE) - print 'Constructed client.\n' - - #operation call - message = eval(call_data) - server = my_client.connect(SERVER_HOST, SERVER_PORT) - if server: - server.write(str(message)) - result = server.read() - server.close() - print 'Performed the call.\n' - else: - result = "Error in client data structures.\n" - - if renew_res2 == 1: - result = "Cred renewed. "+result - if renew_res1 == 1: - result = "Acc renewed. "+result - #write result to output file - open('tmp_output.txt','w').write(result) - print 'Written to file.\n' - except: - #write result to output file - open('tmp_output.txt','w').write("An error occurred in client stub.\n") - print 'Exception occurred.\n' - -if __name__=="__main__": - print 'Client started.\n' - main() diff --git a/gui/JavaApplication1/client_keiko/cred_file b/gui/JavaApplication1/client_keiko/cred_file deleted file mode 100644 index 98c0d2d7..00000000 --- a/gui/JavaApplication1/client_keiko/cred_file +++ /dev/null @@ -1,59 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICazCCAdQCAQAwDQYJKoZIhvcNAQEEBQAwDzENMAsGA1UEAxMEa2VpbzAeFw0w -ODAzMjgxNDI1MTZaFw0wODA1MDkwNjI1MTZaMB8xHTAbBgNVBAMTFFJlZ2lzdHJ5 -IGNyZWRlbnRpYWxzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXHLOL11Ug -ObJS5pb8ftgz7kstltCD+Ua1DSHKf8M1anRvcVnS1rOZ0r/IPdurWxRry3EKraBK -wHO/qADcTVgjvXBia/zFM46jmFmUFPdql2HZQqW7i+5QFVpIibfCGJUR3uwaQkkg -mhYLe3FH79327oZiA5E/+xvyrZeTbL0IHwIDAQABo4HLMIHIMIHFBgNVHREBAf8E -gbowgbeGgbRodHRwOi8vI2NyZWRlbnRpYWxfc2V0OigwLTApKDEtMCkoMi0wKSgz -LTApKDQtMCkoNS0wKSg2LTApKDctMCkoOC0wKSg5LTApKDAtMSkoMS0xKSgyLTEp -KDMtMSkoNC0xKSg1LTEpKDYtMSkoNy0xKSg4LTEpKDktMSkjMDpyZWc6c2xjOnBs -YW5ldGxhYi5qcC5rZWlvIzE6cmVnOmNvbXA6cGxhbmV0bGFiLmpwLmtlaW8wDQYJ -KoZIhvcNAQEEBQADgYEAy72/MrNh6ZcAFgTl908nPl0KZGViSIQZG/Ks+QxR2MaD -SV0fPHrzv+RprLJw0frTjwIpPFDhDSvjbZB3+HWNhgKd88mIzwUSMOZjGmLGijRC -VNE5Pf1H2O76yXCc98Tm8ymkeMxps1gH1hfem6N4aToA4tTNma3poQnn3SaHpig= ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIICTzCCAbgCAQAwDQYJKoZIhvcNAQEEBQAwDTELMAkGA1UEAxMCanAwHhcNMDgw -MzI4MDQyNjQ2WhcNMDgwNTA4MjAyNjQ2WjAfMR0wGwYDVQQDExRSZWdpc3RyeSBj -cmVkZW50aWFsczCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5WipNHGH/bn0 -AHWnf4YdxTFIql1WQqAkkZe+wK1q/ZHG72OUSrUAe3oV/TxiWqNUs9tItPFUMNhS -9r5+ZaVLNZFFl1WQ+tPk+KmhDfwcz9GWCwxpKwHWi0l36xtU/Y6nBupxzcNnj41t -EBXTnVmbNHgLXRAg6RgFpr4PjyhyML0CAwEAAaOBsTCBrjCBqwYDVR0RAQH/BIGg -MIGdhoGaaHR0cDovLyNjcmVkZW50aWFsX3NldDooMi0wKSg0LTApKDYtMCkoNy0w -KSg4LTApKDktMCkoMC0xKSgxLTEpKDItMSkoMy0xKSg0LTEpKDUtMSkoNi0xKSg3 -LTEpKDgtMSkoOS0xKSMwOnJlZzpzbGM6cGxhbmV0bGFiLmpwIzE6cmVnOnNsYzpw -bGFuZXRsYWIuanAua2VpbzANBgkqhkiG9w0BAQQFAAOBgQCQ9r5c/zYcsPuBV4iY -s1KD1E6B1xTu+TtvQw8GMK4JwTLaiBCdX6tiUkOHw40mej3huXD0KSDiBTt34Bg9 -9/E5XwqE0L604WATE4zVzz3s/lP1MroMzjoSphFzXdyHHQRYAOMLWr8e6JLH8qvA -CKI2ZD423aSCNB3FVxqlMyChwg== ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIICTjCCAbcCAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODA0MjY0NVoXDTA4MDUwODIwMjY0NVowHzEdMBsGA1UEAxMUUmVn -aXN0cnkgY3JlZGVudGlhbHMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOAP -5nv145+K6sfR0G7BMWBN9Zp9tVBdyxjohCzej6VX2fu40AjLb6m5ffRNk9WNroCx -hstcmwrbExRha6pzISsD0MIPUuf48sQmeyTHkpCdWbkbD/FtU7ENI5ZA5dQozFFt -EK2UW1kCv+IzjSVKmBRMfMcEY6UfuU15jdRm8sRlAgMBAAGjgakwgaYwgaMGA1Ud -EQEB/wSBmDCBlYaBkmh0dHA6Ly8jY3JlZGVudGlhbF9zZXQ6KDItMCkoNC0wKSg2 -LTApKDctMCkoOC0wKSg5LTApKDAtMSkoMS0xKSgyLTEpKDMtMSkoNC0xKSg1LTEp -KDYtMSkoNy0xKSg4LTEpKDktMSkjMDpyZWc6c2xjOnBsYW5ldGxhYiMxOnJlZzpz -bGM6cGxhbmV0bGFiLmpwMA0GCSqGSIb3DQEBBAUAA4GBAGR3d1rIelq++rJjlerk -+Xlbg+siLcDfNrOE4BgPWqZz9G6QDg+oxpmyP7SkqtO/u/D0PLyndcdKqpXsEisw -28KZtudxBTS5cRpTBCZnoUAGBKLJ3pwRqozwKxxCG8rmsUeGl0xdAjLVw9tzLppO -7LyVz7tZQkIyNF23gv+z9IQU ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIICEzCCAXwCAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODAzNDQ0OFoXDTA4MDUwODE5NDQ0OFowHzEdMBsGA1UEAxMUUmVn -aXN0cnkgY3JlZGVudGlhbHMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALU2 -JnMnIjPy5lUdqFlCpyaGzFE5jxiONEX9YajD23yG9qKZJw7TIfdVQQ+iVuVIzUm6 -R7oze8Y7tpPtskJqlvuS6geWtLfmTQr+9w44xdLzSClPyiW0pt8muW3ySa0RebsX -h+HxSIubqf8YRj048W69S1CogWobwN0F3dISGLpRAgMBAAGjbzBtMGsGA1UdEQEB -/wRhMF+GXWh0dHA6Ly8jY3JlZGVudGlhbF9zZXQ6KDAtMCkoMS0wKSgyLTApKDMt -MCkoNC0wKSg1LTApKDYtMCkoNy0wKSg4LTApKDktMCkjMDpyZWc6c2xjOnBsYW5l -dGxhYjANBgkqhkiG9w0BAQQFAAOBgQBCYwXvYXbMiAi8hiZNFboYE812F0CT1T7U -PRQemorQcU/7SNZh8wOqGSsHSdA9XW5sC01skkxdOrkxTjGA+Nb1BL+vIFLe7wdp -26lQIA3239E9TUSXQlU9TqdALAC1OsmKgN+kbVfqIQ8U2eqAcUawm4h9/8TEV9xG -teVEYDdXpA== ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_keiko/keiko.cert b/gui/JavaApplication1/client_keiko/keiko.cert deleted file mode 100644 index 82fbfc7a..00000000 --- a/gui/JavaApplication1/client_keiko/keiko.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBjjCB+AIBADANBgkqhkiG9w0BAQQFADAQMQ4wDAYDVQQDEwVrZWlrbzAeFw0w -ODAzMjgwNDE5MzdaFw0xMzAzMjcwNDE5MzdaMBAxDjAMBgNVBAMTBWtlaWtvMIGf -MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXHLOL11UgObJS5pb8ftgz7kstltCD -+Ua1DSHKf8M1anRvcVnS1rOZ0r/IPdurWxRry3EKraBKwHO/qADcTVgjvXBia/zF -M46jmFmUFPdql2HZQqW7i+5QFVpIibfCGJUR3uwaQkkgmhYLe3FH79327oZiA5E/ -+xvyrZeTbL0IHwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAIGDtblGdZBm9C1irOwj -vcKM39SDb1MCb5zdBeuidVMPRazIHwMV3QYrrkQVnN9xffjGGyS77pKARYvDdFWm -Lm5LYP7fbRNndR7Y5VZT1uWJtIJn7LEA6fLoqMPftXwDpKYiLP6c/p11FgRYVlAC -WvE0MGOUIOsYSgBmvdcfEPzg ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_keiko/keiko.pkey b/gui/JavaApplication1/client_keiko/keiko.pkey deleted file mode 100644 index 03984b8b..00000000 --- a/gui/JavaApplication1/client_keiko/keiko.pkey +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXgIBAAKBgQCXHLOL11UgObJS5pb8ftgz7kstltCD+Ua1DSHKf8M1anRvcVnS -1rOZ0r/IPdurWxRry3EKraBKwHO/qADcTVgjvXBia/zFM46jmFmUFPdql2HZQqW7 -i+5QFVpIibfCGJUR3uwaQkkgmhYLe3FH79327oZiA5E/+xvyrZeTbL0IHwIDAQAB -AoGAPVG2Qg7VSkhfZmiP6FIIpboS46MJZiRnXty/U47Yxfo22Wojyvy40LjGfhkr -5LMG7F8Xtf+SxgKmdaVVBBCWrPp4OqkU/mal7mFEkc69rtJUigmsUsFv1SldgBq2 -qUYE337+dgP8+crziOEIA846Yrz69EnHSMKcEPAclxXCAPECQQDE35Em7pFKKRXx -d35pjh6UX0nWUEvxzGnNFazRMaal8R9wz4NKsbo/K46MbG+udbF0Qd6rcG4mCe+5 -1sFCsLx7AkEAxH7TJNSHAj+YyZr+g/fJ4l0tlIKZHNnZ30cnm20PVNr+lGe92lFw -QGlr0BJVKcNxFy2cE5zgmZdvegFTDl8rrQJBAIcQHcPIzZJEJ5K1+Nqvrpj52m0W -P1POehNBuIL3/i1AA+Lf6mG3FmA6IJyD1AarJaftfLa+9kJQdM9Y3tNC7rsCQQCk -FmSsNO4paoJkmRJBkgL9DWKqygSimynd0sW4fXJ4IgjGVXutfKSIpYBq2WRU4+jk -uinEFxVYLaXh9IkvTzphAkEAqyutr5X7XLe6E8km3MVgXgPjH3bn9Au4t/JWH7gV -Tc352qD5VFoByxpv57ZIhWF4dlqikFZYCIbuSgbKfUEsTg== ------END RSA PRIVATE KEY----- diff --git a/gui/JavaApplication1/client_keiko/trusted_certs/geni_mng.cert b/gui/JavaApplication1/client_keiko/trusted_certs/geni_mng.cert deleted file mode 100644 index 9f9b5c30..00000000 --- a/gui/JavaApplication1/client_keiko/trusted_certs/geni_mng.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBjDCB9gIBADANBgkqhkiG9w0BAQQFADAPMQ0wCwYDVQQDEwRnZW5pMB4XDTA4 -MDMwMjA4MDMzN1oXDTEzMDMwMTA4MDMzN1owDzENMAsGA1UEAxMEZ2VuaTCBnzAN -BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA+WJeTXaRH+mnoOa7FWdq2mZAMMFvO/o4 -cvG1ALMt1YuPFotCtyYwSgB1njbJasIUqpDaj9dPUBuJv03EjLA3N+g/QVJg+26c -LW85VA5tWNWuT6a59kWXlXI2uhjbTzjMOluN5cdmxTOFpaQ9+mnN3j58mHfIC8eS -4Q8FkcNWAR0CAwEAATANBgkqhkiG9w0BAQQFAAOBgQA7qB8a1Pkbve0r8Fmknicc -6gxWhAmMUTSFtAhS1HFMZU+pmKEbTudh2L6DrAUVV5JCbQQg0XuTbFZfDGBSgx3x -k+NgAqOlNVGixGDH7Gg164jVt4Lh+tu+FO3AaP8qk1LYqzVhofeXPcVxNwlTGD9q -rBwyf1+Su4n1IPiqGi9yyA== ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_keiko/trusted_certs/geni_slc.cert b/gui/JavaApplication1/client_keiko/trusted_certs/geni_slc.cert deleted file mode 100644 index 9f9b5c30..00000000 --- a/gui/JavaApplication1/client_keiko/trusted_certs/geni_slc.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBjDCB9gIBADANBgkqhkiG9w0BAQQFADAPMQ0wCwYDVQQDEwRnZW5pMB4XDTA4 -MDMwMjA4MDMzN1oXDTEzMDMwMTA4MDMzN1owDzENMAsGA1UEAxMEZ2VuaTCBnzAN -BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA+WJeTXaRH+mnoOa7FWdq2mZAMMFvO/o4 -cvG1ALMt1YuPFotCtyYwSgB1njbJasIUqpDaj9dPUBuJv03EjLA3N+g/QVJg+26c -LW85VA5tWNWuT6a59kWXlXI2uhjbTzjMOluN5cdmxTOFpaQ9+mnN3j58mHfIC8eS -4Q8FkcNWAR0CAwEAATANBgkqhkiG9w0BAQQFAAOBgQA7qB8a1Pkbve0r8Fmknicc -6gxWhAmMUTSFtAhS1HFMZU+pmKEbTudh2L6DrAUVV5JCbQQg0XuTbFZfDGBSgx3x -k+NgAqOlNVGixGDH7Gg164jVt4Lh+tu+FO3AaP8qk1LYqzVhofeXPcVxNwlTGD9q -rBwyf1+Su4n1IPiqGi9yyA== ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_keiko/trusted_certs/planetlab_mng.cert b/gui/JavaApplication1/client_keiko/trusted_certs/planetlab_mng.cert deleted file mode 100644 index c1b42112..00000000 --- a/gui/JavaApplication1/client_keiko/trusted_certs/planetlab_mng.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBlzCCAQACAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODAzNDUwNVoXDTEzMDMyNzAzNDUwNVowFDESMBAGA1UEAxMJcGxh -bmV0bGFiMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC1li/h52QbJtucIQUE -YZMZkA8tWcS9f0VkAPNS5/OeRhaQ/iLERQI2EV/rmPCuARQhlZLhm5Y5vxvHG/ba -6Rb9vYKEMDujZwdc3QjhAbYS72V28rbdIeHysJ7JeGz9J1ODLSzbcCt5amLZcMPm -u/G64ieWI8QMUxYgCE1ut3bI1QIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAJH5KqIU -2lrA9calI3oklbWpduiZspbwCUkhr8PNVDnkXSI1K+egDqFTaANVp1DxXU8qaDS6 -X5+s9Qf9FQ5+9mfSaocma6YW4Qfb3Zm/mYmpt+nknTlnVuEaTENyBIPfr0pDqzld -GGcYPul25KknFmdPOrqAUzma9n568u2KYlfz ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_keiko/trusted_certs/planetlab_slc.cert b/gui/JavaApplication1/client_keiko/trusted_certs/planetlab_slc.cert deleted file mode 100644 index 9f5b851d..00000000 --- a/gui/JavaApplication1/client_keiko/trusted_certs/planetlab_slc.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBlzCCAQACAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODAzNDQ0OFoXDTEzMDMyNzAzNDQ0OFowFDESMBAGA1UEAxMJcGxh -bmV0bGFiMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC1NiZzJyIz8uZVHahZ -QqcmhsxROY8YjjRF/WGow9t8hvaimScO0yH3VUEPolblSM1Juke6M3vGO7aT7bJC -apb7kuoHlrS35k0K/vcOOMXS80gpT8oltKbfJrlt8kmtEXm7F4fh8UiLm6n/GEY9 -OPFuvUtQqIFqG8DdBd3SEhi6UQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABRIUVzW -JbwQKnqM3rVHJoSgtYWpgDvJosLCrLZhsXrukOsC8Gs8V6vPTPO7kofdUbHQKRnL -xp1nI5hlWIlq/XOnh+NEPZaB2SAKwfl3FZwUqjaEVd/VYOfsRryZtiUz4sL3CtXN -C8i/I4HwCnrl/pmzbprqpGq+RJTa5yLmBw6r ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_osaka/acc_file b/gui/JavaApplication1/client_osaka/acc_file deleted file mode 100644 index a7c9fedb..00000000 --- a/gui/JavaApplication1/client_osaka/acc_file +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIB9TCCAV4CAQAwDQYJKoZIhvcNAQEEBQAwDTELMAkGA1UEAxMCanAwHhcNMDgw -MzI4MjExMDUxWhcNMDgwNzIyMTQ1NzMxWjAaMRgwFgYDVQQDEw9HRU5JIEFjY291 -bnRpbmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANAGdic1KHHvvlTE7id6 -fmQU4HZ5iZwp9RqFiflTlvc/fJelxS8cV51rE878eZymgbVYwLIcO/Tyvfkg+axM -nBzzWgzSX4wk/zuuNPV0ZwzG0Vf9EN/hzqzu1KWRMxT0/vz6Kri33eTgbyURWp4D -OGYRqR7E573fDd8SWGfWW7AXAgMBAAGjXTBbMFkGA1UdEQEB/wRPME2GS2h0dHA6 -Ly8jaHJuOnBsYW5ldGxhYi5qcC5vc2FrYSN1dWlkOjE1MTI4NTYzNzgzNjk1MTc5 -NTEyOTg5MzAyMTMzNDQ0OTQyMjMyOTANBgkqhkiG9w0BAQQFAAOBgQAfdUPl4pLy -ILFiIvr7a4cH+hfgTvJOwr2U07RZfjiu5qxugOwPJJT0S/RLRRBdaL1VOM/f3ZLl -tRM7JBtaHw5iNQlVAJIWV9rhEKuDywc7Yw6sfsnmNCLie7M2QX9WpQ3G/l21y33G -q6wKxV8TVAj04juCHdJ16FQnx/612VtDOA== ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIB9TCCAV4CAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODA0MDAyMloXDTA4MDcyMTIxNDcwMlowGjEYMBYGA1UEAxMPR0VO -SSBBY2NvdW50aW5nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDgD+Z79eOf -iurH0dBuwTFgTfWafbVQXcsY6IQs3o+lV9n7uNAIy2+puX30TZPVja6AsYbLXJsK -2xMUYWuqcyErA9DCD1Ln+PLEJnskx5KQnVm5Gw/xbVOxDSOWQOXUKMxRbRCtlFtZ -Ar/iM40lSpgUTHzHBGOlH7lNeY3UZvLEZQIDAQABo1YwVDBSBgNVHREBAf8ESDBG -hkRodHRwOi8vI2hybjpwbGFuZXRsYWIuanAjdXVpZDoxOTUzNTQ1Nzg5NjI5MDI3 -NTY4NTk3NzE3OTI3NzU0NzI4MTY0MTANBgkqhkiG9w0BAQQFAAOBgQBFnESK6zc+ -GxI/XET7boZ8GSMbKwSQoGf33Sz1qwRp31nf4HvoHXl6j6DmpFtcEqeK8rTP+AiX -n6b14cfXdQ0Px+00/zDNcDyVzh01V6KMrDeVhZrpiejIqW+vPSjMMoO1/nYrY5r4 -gf8HYww8uY1RciEeLPZkcJtR0Gq2jnkT4Q== ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIB8zCCAVwCAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODAzNDQ0OFoXDTA4MDcyMTIxMzEyOFowGjEYMBYGA1UEAxMPR0VO -SSBBY2NvdW50aW5nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC1NiZzJyIz -8uZVHahZQqcmhsxROY8YjjRF/WGow9t8hvaimScO0yH3VUEPolblSM1Juke6M3vG -O7aT7bJCapb7kuoHlrS35k0K/vcOOMXS80gpT8oltKbfJrlt8kmtEXm7F4fh8UiL -m6n/GEY9OPFuvUtQqIFqG8DdBd3SEhi6UQIDAQABo1QwUjBQBgNVHREBAf8ERjBE -hkJodHRwOi8vI2hybjpwbGFuZXRsYWIjdXVpZDoxNjQyMTQ0ODk4NTIwNjUyMzY3 -MjM5NzIxNzQ2MjkyMjIyNjk3MTgwDQYJKoZIhvcNAQEEBQADgYEAUrjefqbA5c69 -KfNh/ENOp0xFnvWn3UReOo2mhYZI2LWyX41g/q/InVogh8aJ7LXHI6wjHL+PGz3n -fU+Bl2fL7GAL0i6Wr1JRbT2YHMJd97C11hWPLg+1Tt3MHwMRf0X8v7I3pRSJOIq3 -si0AZRHgngrWmhf85bKAqS210OWHWOM= ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_osaka/clientstub.py b/gui/JavaApplication1/client_osaka/clientstub.py deleted file mode 100755 index 1a263317..00000000 --- a/gui/JavaApplication1/client_osaka/clientstub.py +++ /dev/null @@ -1,154 +0,0 @@ -#!/usr/bin/python - -import os, sys -from M2Crypto import SSL -sys.path.append('/home/soners/work/geni/rpc/util') -sys.path.append('/home/soners/work/geni/rpc/util/sec') -from sec import * - -SERVER_HOST = '127.0.0.1' -SERVER_PORT = 8002 -AUTH_HOST = '127.0.0.1' -AUTH_PORT = 8002 -MAX_RESULT = 3000 - -renew_res1 = 0 -renew_res2 = 0 - -def verify_callback(preverify_ok, ctx): - return 1 - -class GENIClient(): - def __init__(self, hrn, type, id_file, id_key_file, acc_file, cred_file): - self.hrn = hrn - self.type = type - #check if the certificate and the private key exists, terminate if not - if not os.path.exists(id_file) or not os.path.exists(id_key_file) : - print 'The certificate or the private key does not exist.\n' - os.exit(1) - #check the acc and cred files - if not os.path.exists(acc_file) or not is_valid_chain(acc_file): - open(acc_file, 'w').write('ANONYM') - if not os.path.exists(cred_file) or not is_valid_chain(cred_file): - open(cred_file, 'w').write('NO_CRED') - #initialize the security system - self.sec = Sec('client', id_file, id_key_file, acc_file, cred_file) - #ssl parameters - self.ctx = SSL.Context() - self.ctx.load_cert(self.sec.id_file,self.sec.id_key_file) - self.ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, depth=9, callback=verify_callback) - - def connect(self, host, port): - #if the acc and cred needs renewal then do call to authority - if self.type == 'user' or self.type == 'slice' or self.type == 'SA': - reg_type = 'slice' - else: - reg_type ='component' - renew_res1 = renew_cert('accounting', '.', reg_type, self.hrn, None, None, (AUTH_HOST, AUTH_PORT), self.sec) - renew_res2 = renew_cert('credential', '.', reg_type, self.hrn, None, None, (AUTH_HOST, AUTH_PORT), self.sec) - if renew_res1 == None: - print "There is no certificate in the directory "+"./\n" - os.exit(0) - #connect to server - server = SSL.Connection(self.ctx) - server.connect((host,port)) - peer = self.sec.auth_protocol(server) - if peer: - return server - else: - return None - -def toFileFormat(res_str): - out_str = "" - try: - res_dict = eval(res_str) - if res_dict['geni'].has_key('pubkey'): # in public key, replace '\n' with ' ' - pubkey = res_dict['geni']['pubkey'] - pubkey = pubkey.split('-----BEGIN RSA PRIVATE KEY-----')[1].split('-----END RSA PRIVATE KEY-----')[0].replace('\n',' ') - pubkey = '-----BEGIN RSA PRIVATE KEY-----'+pubkey+'-----END RSA PRIVATE KEY-----' - res_dict['geni']['pubkey'] = pubkey - - if res_dict.has_key('message'): - out_str = res_dict['message']+'\n' - else: - out_str = "{'geni':{\n" - for key in res_dict['geni']: - val = '' - if res_dict['geni'][key] == None: - val = '' - elif isinstance(res_dict['geni'][key], str): - val = res_dict['geni'][key] - else: - val = str(res_dict['geni'][key]) - out_str = out_str+"'"+key+"':"+val+"\n" - out_str = out_str + "}\n" - out_str = out_str + "'pl':{\n" - for key in res_dict['pl']: - val = '' - if res_dict['pl'][key] == None: - val = '' - if isinstance(res_dict['pl'][key], str): - val = res_dict['pl'][key] - else: - val = str(res_dict['pl'][key]) - out_str = out_str+"'"+key+"':"+val+"\n" - out_str = out_str + "}}" - except: - out_str = res_str - return out_str - -def evaluate(call_data): - call_data = eval(call_data) - #adjust the key format to obey server's storage format - if call_data['g_params'].has_key('pubkey'): #replace the ' ' with '\n' - pubkey = call_data['g_params']['pubkey'] - pubkey = pubkey.split('-----BEGIN RSA PRIVATE KEY-----')[1].split('-----END RSA PRIVATE KEY-----')[0].replace(' ','\n') - pubkey = '-----BEGIN RSA PRIVATE KEY-----'+pubkey+'-----END RSA PRIVATE KEY-----' - call_data['g_params']['pubkey'] = pubkey - return call_data - -def main(): - try: - #read the input file - fp = open('tmp_input.txt', 'r') - user_data = fp.readline() - call_data = fp.read() - print 'Read file.\n' - - #client related info - HRN = user_data.split(' ')[0] - TYPE = user_data.split(' ')[1].split('\n')[0] - name = get_leaf(HRN) - ID_FILE = name+'.cert' - ID_KEY_FILE = name+'.pkey' - ACC_FILE = 'acc_file' - CRED_FILE = 'cred_file' - my_client = GENIClient(HRN, TYPE, ID_FILE, ID_KEY_FILE, ACC_FILE, CRED_FILE) - print 'Constructed client.\n' - - #operation call - message = evaluate(call_data) - server = my_client.connect(SERVER_HOST, SERVER_PORT) - if server: - server.write(str(message)) - result = toFileFormat(server.read(MAX_RESULT)) - server.close() - print 'Performed the call.\n' - else: - result = "Error in client data structures.\n" - - if renew_res2 == 1: - result = "Cred renewed.\n"+result - if renew_res1 == 1: - result = "Acc renewed.\n"+result - #write result to output file - open('tmp_output.txt','w').write(result) - print 'Written to file.\n' - except: - #write result to output file - open('tmp_output.txt','w').write("An error occurred in client stub.\n") - print 'Exception occurred.\n' - -if __name__=="__main__": - print 'Client started.\n' - main() diff --git a/gui/JavaApplication1/client_osaka/cred_file b/gui/JavaApplication1/client_osaka/cred_file deleted file mode 100644 index 2dc4a361..00000000 --- a/gui/JavaApplication1/client_osaka/cred_file +++ /dev/null @@ -1,44 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICUDCCAbkCAQAwDQYJKoZIhvcNAQEEBQAwDTELMAkGA1UEAxMCanAwHhcNMDgw -MzI4MjExMDUxWhcNMDgwNTA5MTMxMDUxWjAfMR0wGwYDVQQDExRSZWdpc3RyeSBj -cmVkZW50aWFsczCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0AZ2JzUoce++ -VMTuJ3p+ZBTgdnmJnCn1GoWJ+VOW9z98l6XFLxxXnWsTzvx5nKaBtVjAshw79PK9 -+SD5rEycHPNaDNJfjCT/O6409XRnDMbRV/0Q3+HOrO7UpZEzFPT+/PoquLfd5OBv -JRFangM4ZhGpHsTnvd8N3xJYZ9ZbsBcCAwEAAaOBsjCBrzCBrAYDVR0RAQH/BIGh -MIGehoGbaHR0cDovLyNjcmVkZW50aWFsX3NldDooMi0wKSg0LTApKDYtMCkoNy0w -KSg4LTApKDktMCkoMC0xKSgxLTEpKDItMSkoMy0xKSg0LTEpKDUtMSkoNi0xKSg3 -LTEpKDgtMSkoOS0xKSMwOnJlZzpzbGM6cGxhbmV0bGFiLmpwIzE6cmVnOnNsYzpw -bGFuZXRsYWIuanAub3Nha2EwDQYJKoZIhvcNAQEEBQADgYEAOjGYfQry2jLhVTCx -7aygF13tq8+h7l8AzEOjTldzFF9h+OQscT74FP6e7hneDgI3EqBwWrW6E8yplJkS -flpKKuShlfSDoY3iLalSqZLhQHGX6fZ3oNlKGHJmJtL/QPhzs4tMwm5Jf0IXNadV -KVTpeZ1/xmfEJ8+E9HxYEvrKeEI= ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIICTjCCAbcCAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODA0MjY0NVoXDTA4MDUwODIwMjY0NVowHzEdMBsGA1UEAxMUUmVn -aXN0cnkgY3JlZGVudGlhbHMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOAP -5nv145+K6sfR0G7BMWBN9Zp9tVBdyxjohCzej6VX2fu40AjLb6m5ffRNk9WNroCx -hstcmwrbExRha6pzISsD0MIPUuf48sQmeyTHkpCdWbkbD/FtU7ENI5ZA5dQozFFt -EK2UW1kCv+IzjSVKmBRMfMcEY6UfuU15jdRm8sRlAgMBAAGjgakwgaYwgaMGA1Ud -EQEB/wSBmDCBlYaBkmh0dHA6Ly8jY3JlZGVudGlhbF9zZXQ6KDItMCkoNC0wKSg2 -LTApKDctMCkoOC0wKSg5LTApKDAtMSkoMS0xKSgyLTEpKDMtMSkoNC0xKSg1LTEp -KDYtMSkoNy0xKSg4LTEpKDktMSkjMDpyZWc6c2xjOnBsYW5ldGxhYiMxOnJlZzpz -bGM6cGxhbmV0bGFiLmpwMA0GCSqGSIb3DQEBBAUAA4GBAGR3d1rIelq++rJjlerk -+Xlbg+siLcDfNrOE4BgPWqZz9G6QDg+oxpmyP7SkqtO/u/D0PLyndcdKqpXsEisw -28KZtudxBTS5cRpTBCZnoUAGBKLJ3pwRqozwKxxCG8rmsUeGl0xdAjLVw9tzLppO -7LyVz7tZQkIyNF23gv+z9IQU ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIICEzCCAXwCAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODAzNDQ0OFoXDTA4MDUwODE5NDQ0OFowHzEdMBsGA1UEAxMUUmVn -aXN0cnkgY3JlZGVudGlhbHMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALU2 -JnMnIjPy5lUdqFlCpyaGzFE5jxiONEX9YajD23yG9qKZJw7TIfdVQQ+iVuVIzUm6 -R7oze8Y7tpPtskJqlvuS6geWtLfmTQr+9w44xdLzSClPyiW0pt8muW3ySa0RebsX -h+HxSIubqf8YRj048W69S1CogWobwN0F3dISGLpRAgMBAAGjbzBtMGsGA1UdEQEB -/wRhMF+GXWh0dHA6Ly8jY3JlZGVudGlhbF9zZXQ6KDAtMCkoMS0wKSgyLTApKDMt -MCkoNC0wKSg1LTApKDYtMCkoNy0wKSg4LTApKDktMCkjMDpyZWc6c2xjOnBsYW5l -dGxhYjANBgkqhkiG9w0BAQQFAAOBgQBCYwXvYXbMiAi8hiZNFboYE812F0CT1T7U -PRQemorQcU/7SNZh8wOqGSsHSdA9XW5sC01skkxdOrkxTjGA+Nb1BL+vIFLe7wdp -26lQIA3239E9TUSXQlU9TqdALAC1OsmKgN+kbVfqIQ8U2eqAcUawm4h9/8TEV9xG -teVEYDdXpA== ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_osaka/osaka.cert b/gui/JavaApplication1/client_osaka/osaka.cert deleted file mode 100644 index ce4da44a..00000000 --- a/gui/JavaApplication1/client_osaka/osaka.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBjjCB+AIBADANBgkqhkiG9w0BAQQFADAQMQ4wDAYDVQQDEwVvc2FrYTAeFw0w -ODAzMjgwMzQ0NTBaFw0xMzAzMjcwMzQ0NTBaMBAxDjAMBgNVBAMTBW9zYWthMIGf -MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDQBnYnNShx775UxO4nen5kFOB2eYmc -KfUahYn5U5b3P3yXpcUvHFedaxPO/HmcpoG1WMCyHDv08r35IPmsTJwc81oM0l+M -JP87rjT1dGcMxtFX/RDf4c6s7tSlkTMU9P78+iq4t93k4G8lEVqeAzhmEakexOe9 -3w3fElhn1luwFwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABOBGbnYsv2xjOXidUtp -e1woERQGJRe7HJrbo9NyI5ozjSLt9yphY11ZmNex2IhKIrmbRSPfDnKNYaMHFOpz -qbJMCmC4uUIUd9HY8bg4mQ4wjwdWkLA9uWlmpAFRoIY3eNEvv5tpUnD3sV1dEDsQ -uQQcjxVTSgQQgjpE1KJ/KQ6q ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_osaka/osaka.pkey b/gui/JavaApplication1/client_osaka/osaka.pkey deleted file mode 100644 index 25155f25..00000000 --- a/gui/JavaApplication1/client_osaka/osaka.pkey +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQDQBnYnNShx775UxO4nen5kFOB2eYmcKfUahYn5U5b3P3yXpcUv -HFedaxPO/HmcpoG1WMCyHDv08r35IPmsTJwc81oM0l+MJP87rjT1dGcMxtFX/RDf -4c6s7tSlkTMU9P78+iq4t93k4G8lEVqeAzhmEakexOe93w3fElhn1luwFwIDAQAB -AoGAflTuPDFUNp1aATD3UJJbX3wuNMTqhSQV7d1bRUc2T0EG8TGC5nFX5Am7JeC+ -GhwkeXVE0OXEo6UnKbyU48ZCp1lL70bjiPvhS/wceTbjuxJq2wS2hjIwf9NKyZ1j -ppO0gpvxOVNbIgyS3Yj2T98sYkJCVBnBN2huUsfzmHSeKIECQQD3SOiKRGfla+Du -dfBY7tKNxxXYTZwV2eYKhMZFW6rMcGboqoAXFMVUTEdHB2Ozk2wHsKcDb3WFpqQI -0QFqdNefAkEA11tW5cDIjiLeppSi57knZr9aYfysJcHslez9wgFGgK72s8XB8CfS -QqzPTmQm4F3NVM+5Y5PbMp55ntEiwPg0iQJAMnGsBjCoJRPZoatraSjmyMc4/JPw -aEC3/aNSMundMLEpPQMy+AJjsquQyruGKibDndn6Z+f/yFDTG31PVaEaLwJAV8AQ -GG4FSmVK8/V8q472TxeJbIPYYUozbKO0gmiioaypOXdLHuAa/LANiJOmg6W1FOnP -UJPerTGFvQDaeGaqgQJBAItAXexGSQEA1AKVzP31zorlb6zBh6dTxxrMhfeROwZx -drr47bhcwuiJ011xXzea9iy1dWJOtC8JrQ/YVw14Sjc= ------END RSA PRIVATE KEY----- diff --git a/gui/JavaApplication1/client_osaka/trusted_certs/geni_mng.cert b/gui/JavaApplication1/client_osaka/trusted_certs/geni_mng.cert deleted file mode 100644 index 9f9b5c30..00000000 --- a/gui/JavaApplication1/client_osaka/trusted_certs/geni_mng.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBjDCB9gIBADANBgkqhkiG9w0BAQQFADAPMQ0wCwYDVQQDEwRnZW5pMB4XDTA4 -MDMwMjA4MDMzN1oXDTEzMDMwMTA4MDMzN1owDzENMAsGA1UEAxMEZ2VuaTCBnzAN -BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA+WJeTXaRH+mnoOa7FWdq2mZAMMFvO/o4 -cvG1ALMt1YuPFotCtyYwSgB1njbJasIUqpDaj9dPUBuJv03EjLA3N+g/QVJg+26c -LW85VA5tWNWuT6a59kWXlXI2uhjbTzjMOluN5cdmxTOFpaQ9+mnN3j58mHfIC8eS -4Q8FkcNWAR0CAwEAATANBgkqhkiG9w0BAQQFAAOBgQA7qB8a1Pkbve0r8Fmknicc -6gxWhAmMUTSFtAhS1HFMZU+pmKEbTudh2L6DrAUVV5JCbQQg0XuTbFZfDGBSgx3x -k+NgAqOlNVGixGDH7Gg164jVt4Lh+tu+FO3AaP8qk1LYqzVhofeXPcVxNwlTGD9q -rBwyf1+Su4n1IPiqGi9yyA== ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_osaka/trusted_certs/geni_slc.cert b/gui/JavaApplication1/client_osaka/trusted_certs/geni_slc.cert deleted file mode 100644 index 9f9b5c30..00000000 --- a/gui/JavaApplication1/client_osaka/trusted_certs/geni_slc.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBjDCB9gIBADANBgkqhkiG9w0BAQQFADAPMQ0wCwYDVQQDEwRnZW5pMB4XDTA4 -MDMwMjA4MDMzN1oXDTEzMDMwMTA4MDMzN1owDzENMAsGA1UEAxMEZ2VuaTCBnzAN -BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA+WJeTXaRH+mnoOa7FWdq2mZAMMFvO/o4 -cvG1ALMt1YuPFotCtyYwSgB1njbJasIUqpDaj9dPUBuJv03EjLA3N+g/QVJg+26c -LW85VA5tWNWuT6a59kWXlXI2uhjbTzjMOluN5cdmxTOFpaQ9+mnN3j58mHfIC8eS -4Q8FkcNWAR0CAwEAATANBgkqhkiG9w0BAQQFAAOBgQA7qB8a1Pkbve0r8Fmknicc -6gxWhAmMUTSFtAhS1HFMZU+pmKEbTudh2L6DrAUVV5JCbQQg0XuTbFZfDGBSgx3x -k+NgAqOlNVGixGDH7Gg164jVt4Lh+tu+FO3AaP8qk1LYqzVhofeXPcVxNwlTGD9q -rBwyf1+Su4n1IPiqGi9yyA== ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_osaka/trusted_certs/planetlab_mng.cert b/gui/JavaApplication1/client_osaka/trusted_certs/planetlab_mng.cert deleted file mode 100644 index c1b42112..00000000 --- a/gui/JavaApplication1/client_osaka/trusted_certs/planetlab_mng.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBlzCCAQACAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODAzNDUwNVoXDTEzMDMyNzAzNDUwNVowFDESMBAGA1UEAxMJcGxh -bmV0bGFiMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC1li/h52QbJtucIQUE -YZMZkA8tWcS9f0VkAPNS5/OeRhaQ/iLERQI2EV/rmPCuARQhlZLhm5Y5vxvHG/ba -6Rb9vYKEMDujZwdc3QjhAbYS72V28rbdIeHysJ7JeGz9J1ODLSzbcCt5amLZcMPm -u/G64ieWI8QMUxYgCE1ut3bI1QIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAJH5KqIU -2lrA9calI3oklbWpduiZspbwCUkhr8PNVDnkXSI1K+egDqFTaANVp1DxXU8qaDS6 -X5+s9Qf9FQ5+9mfSaocma6YW4Qfb3Zm/mYmpt+nknTlnVuEaTENyBIPfr0pDqzld -GGcYPul25KknFmdPOrqAUzma9n568u2KYlfz ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/client_osaka/trusted_certs/planetlab_slc.cert b/gui/JavaApplication1/client_osaka/trusted_certs/planetlab_slc.cert deleted file mode 100644 index 9f5b851d..00000000 --- a/gui/JavaApplication1/client_osaka/trusted_certs/planetlab_slc.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBlzCCAQACAQAwDQYJKoZIhvcNAQEEBQAwFDESMBAGA1UEAxMJcGxhbmV0bGFi -MB4XDTA4MDMyODAzNDQ0OFoXDTEzMDMyNzAzNDQ0OFowFDESMBAGA1UEAxMJcGxh -bmV0bGFiMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC1NiZzJyIz8uZVHahZ -QqcmhsxROY8YjjRF/WGow9t8hvaimScO0yH3VUEPolblSM1Juke6M3vGO7aT7bJC -apb7kuoHlrS35k0K/vcOOMXS80gpT8oltKbfJrlt8kmtEXm7F4fh8UiLm6n/GEY9 -OPFuvUtQqIFqG8DdBd3SEhi6UQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABRIUVzW -JbwQKnqM3rVHJoSgtYWpgDvJosLCrLZhsXrukOsC8Gs8V6vPTPO7kofdUbHQKRnL -xp1nI5hlWIlq/XOnh+NEPZaB2SAKwfl3FZwUqjaEVd/VYOfsRryZtiUz4sL3CtXN -C8i/I4HwCnrl/pmzbprqpGq+RJTa5yLmBw6r ------END CERTIFICATE----- diff --git a/gui/JavaApplication1/dist/JavaApplication1.jar b/gui/JavaApplication1/dist/JavaApplication1.jar deleted file mode 100644 index f346822d..00000000 Binary files a/gui/JavaApplication1/dist/JavaApplication1.jar and /dev/null differ diff --git a/gui/JavaApplication1/dist/README.TXT b/gui/JavaApplication1/dist/README.TXT deleted file mode 100644 index 5fc38c7b..00000000 --- a/gui/JavaApplication1/dist/README.TXT +++ /dev/null @@ -1,31 +0,0 @@ -======================== -BUILD OUTPUT DESCRIPTION -======================== - -When you build an Java application project that has a main class, the IDE -automatically copies all of the JAR -files on the projects classpath to your projects dist/lib folder. The IDE -also adds each of the JAR files to the Class-Path element in the application -JAR files manifest file (MANIFEST.MF). - -To run the project from the command line, go to the dist folder and -type the following: - -java -jar "JavaApplication1.jar" - -To distribute this project, zip up the dist folder (including the lib folder) -and distribute the ZIP file. - -Notes: - -* If two JAR files on the project classpath have the same name, only the first -JAR file is copied to the lib folder. -* If the classpath contains a folder of classes or resources, none of the -classpath elements are copied to the dist folder. -* If a library on the projects classpath also has a Class-Path element -specified in the manifest,the content of the Class-Path element has to be on -the projects runtime path. -* To set a main class in a standard Java project, right-click the project node -in the Projects window and choose Properties. Then click Run and enter the -class name in the Main Class field. Alternatively, you can manually type the -class name in the manifest Main-Class element. diff --git a/gui/JavaApplication1/dist/lib/swing-layout-1.0.jar b/gui/JavaApplication1/dist/lib/swing-layout-1.0.jar deleted file mode 100644 index 50f15901..00000000 Binary files a/gui/JavaApplication1/dist/lib/swing-layout-1.0.jar and /dev/null differ diff --git a/gui/JavaApplication1/manifest.mf b/gui/JavaApplication1/manifest.mf deleted file mode 100644 index 328e8e5b..00000000 --- a/gui/JavaApplication1/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/gui/JavaApplication1/nbproject/build-impl.xml b/gui/JavaApplication1/nbproject/build-impl.xml deleted file mode 100644 index d21a5a0a..00000000 --- a/gui/JavaApplication1/nbproject/build-impl.xml +++ /dev/null @@ -1,541 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - - - - - - java -cp "${run.classpath.with.dist.jar}" ${main.class} - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - diff --git a/gui/JavaApplication1/nbproject/genfiles.properties b/gui/JavaApplication1/nbproject/genfiles.properties deleted file mode 100644 index d7c8159a..00000000 --- a/gui/JavaApplication1/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=6777d69e -build.xml.script.CRC32=09de7c06 -build.xml.stylesheet.CRC32=240b97a2 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=6777d69e -nbproject/build-impl.xml.script.CRC32=b93da968 -nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21 diff --git a/gui/JavaApplication1/nbproject/private/private.properties b/gui/JavaApplication1/nbproject/private/private.properties deleted file mode 100644 index c36df805..00000000 --- a/gui/JavaApplication1/nbproject/private/private.properties +++ /dev/null @@ -1,4 +0,0 @@ -application.args= -javac.debug=true -javadoc.preview=true -user.properties.file=/home/soners/.netbeans/5.5.1/build.properties diff --git a/gui/JavaApplication1/nbproject/private/private.xml b/gui/JavaApplication1/nbproject/private/private.xml deleted file mode 100644 index c1f155a7..00000000 --- a/gui/JavaApplication1/nbproject/private/private.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/gui/JavaApplication1/nbproject/project.properties b/gui/JavaApplication1/nbproject/project.properties deleted file mode 100644 index 58e400c2..00000000 --- a/gui/JavaApplication1/nbproject/project.properties +++ /dev/null @@ -1,57 +0,0 @@ -application.args= -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/JavaApplication1.jar -dist.javadoc.dir=${dist.dir}/javadoc -jar.compress=false -javac.classpath=\ - ${libs.swing-layout.classpath} -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.source=1.5 -javac.target=1.5 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${libs.junit.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding= -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -main.class=javaapplication1.GeniGUI -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value -# or test-sys-prop.name=value to set system properties for unit tests): -run.jvmargs= -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -src.dir=src -test.src.dir=test diff --git a/gui/JavaApplication1/nbproject/project.xml b/gui/JavaApplication1/nbproject/project.xml deleted file mode 100644 index f3875b64..00000000 --- a/gui/JavaApplication1/nbproject/project.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - org.netbeans.modules.java.j2seproject - - - JavaApplication1 - 1.6.5 - - - - - - - - - diff --git a/gui/JavaApplication1/src/javaapplication1/DisplayHandle.java b/gui/JavaApplication1/src/javaapplication1/DisplayHandle.java deleted file mode 100644 index e755de91..00000000 --- a/gui/JavaApplication1/src/javaapplication1/DisplayHandle.java +++ /dev/null @@ -1,570 +0,0 @@ -/* - * DisplayHandle.java - * - * Created on March 29, 2008, 2:42 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package javaapplication1; - -import java.io.*; -import javax.swing.JPanel; -import java.awt.*; -import javax.swing.*; - -/** - * - * @author soners - */ -public class DisplayHandle { - - /** Creates a new instance of DisplayHandle */ - public DisplayHandle(BufferedWriter outCommand) { - this.outCommand = outCommand; - createCompListUser(); - createCompListSlice(); - createCompListNode(); - createCompListSite(); - } - - private void createCompListNode(){ - compList_node = new GuiComponent[33]; - GuiComponent[] compList = compList_node; - String[] tmplist1 = {"readable","pl"}; - String[] tmplist2 = {"writable","pl"}; - String[] tmplist3 = {"readable","geni"}; - String[] tmplist4 = {"writable","geni"}; - compList[0] = new GuiComponent("node_id", tmplist1, "text", "Node Id", ""); - compList[1] = new GuiComponent("last_updated", tmplist1, "text", "Last Updated", ""); - compList[2] = new GuiComponent("boot_state", tmplist2, "combo", "Boot state", "boot, dbg, inst, new, rcnf, rins"); - compList[3] = new GuiComponent("site_id", tmplist1, "num", "Site Id", ""); - compList[4] = new GuiComponent("pcu_ids", tmplist2, "num", "PCU Ids", ""); - compList[5] = new GuiComponent("session", tmplist1, "text", "Session", ""); - compList[6] = new GuiComponent("key", tmplist2, "key", "Key", ""); - compList[7] = new GuiComponent("conf_file_ids", tmplist2, "text", "Conf file Ids", ""); - compList[8] = new GuiComponent("ssh_rsa_key", tmplist1, "text", "SSH RSA Key", ""); - compList[9] = new GuiComponent("ssh_rsa_key_write", tmplist2, "key", "SSH RSA Key", ""); - compList[10] = new GuiComponent("uuid", tmplist1, "text", "UUID", ""); - compList[11] = new GuiComponent("nodegroup_ids", tmplist2, "num", "Node Group Ids", ""); - compList[12] = new GuiComponent("slice_ids_whitelist", tmplist2, "text", "Slice Ids Whitelist", ""); - compList[13] = new GuiComponent("last_contact", tmplist2, "text", "Last Contact", ""); - compList[14] = new GuiComponent("nodenetwork_ids", tmplist2, "text", "Node Network Ids", ""); - compList[15] = new GuiComponent("peer_node_id", tmplist2, "num", "Peer Node Id", ""); - compList[16] = new GuiComponent("hostname", tmplist2, "text", "Hostname", "randomsite.edu"); - compList[17] = new GuiComponent("slice_ids", tmplist1, "num", "Slice Ids", ""); - compList[18] = new GuiComponent("boot_nonce", tmplist2, "text", "Boot Nonce", ""); - compList[19] = new GuiComponent("version", tmplist2, "text", "Version", "PlanetLab BootCD 3.1"); - compList[20] = new GuiComponent("date_created", tmplist1, "text", "Date Created", ""); - compList[21] = new GuiComponent("model", tmplist2, "text", "Model", "Dell OptiPlex GX280"); - compList[22] = new GuiComponent("peer_id", tmplist1, "num", "Peer Id", ""); - compList[23] = new GuiComponent("ports", tmplist2, "text", "Ports", ""); - compList[24] = new GuiComponent("description", tmplist4, "text", "Description", "New node for testing purposes"); - compList[25] = new GuiComponent("rights", tmplist4, "text", "Rights", ""); - compList[26] = new GuiComponent("pubkey", tmplist3, "text", "GENI Public key", ""); - compList[27] = new GuiComponent("pubkey_write", tmplist4, "key", "GENI Public key", ""); - compList[28] = new GuiComponent("wrapperurl", tmplist4, "text", "Wrapper URL", "local"); - compList[29] = new GuiComponent("disabled", tmplist3, "bool", "Disabled", "Yes, No"); - compList[30] = new GuiComponent("userlist", tmplist4, "text", "User List", ""); - compList[31] = new GuiComponent("pointer", tmplist3, "num", "PL Pointer", ""); - compList[32] = new GuiComponent("g_uuid", tmplist3, "text", "GENI UUID", ""); - - } - - private void createCompListUser(){ - compList_user = new GuiComponent[28]; - GuiComponent[] compList = compList_user; - String[] tmplist1 = {"readable","pl"}; - String[] tmplist2 = {"writable","pl"}; - String[] tmplist3 = {"readable","geni"}; - String[] tmplist4 = {"writable","geni"}; - compList[0] = new GuiComponent("person_id", tmplist1, "num", "Person Id", ""); - compList[1] = new GuiComponent("bio", tmplist2, "text", "Bio", ""); - compList[2] = new GuiComponent("first_name", tmplist2, "text", "First Name", ""); - compList[3] = new GuiComponent("last_name", tmplist2, "text", "Last Name", ""); - compList[4] = new GuiComponent("last_updated", tmplist1, "text", "Last Updated", ""); - compList[5] = new GuiComponent("key_ids", tmplist2, "num", "Key Ids", ""); - compList[6] = new GuiComponent("phone", tmplist2, "text", "Phone", ""); - compList[7] = new GuiComponent("peer_person_id", tmplist2, "num", "Peer Person Id", ""); - compList[8] = new GuiComponent("role_ids", tmplist2, "num", "Role Ids", ""); - compList[9] = new GuiComponent("site_ids", tmplist1, "num", "Site Ids", ""); - compList[10] = new GuiComponent("uuid", tmplist1, "text", "UUID", ""); - compList[11] = new GuiComponent("roles", tmplist2, "num", "Roles", ""); - compList[12] = new GuiComponent("title", tmplist2, "text", "Title", ""); - compList[13] = new GuiComponent("url", tmplist2, "text", "Url", "someuser.dom.edu"); - compList[14] = new GuiComponent("enabled", tmplist2, "bool", "Enabled", "Yes, No"); - compList[15] = new GuiComponent("slice_ids", tmplist2, "num", "Slice Ids", ""); - compList[16] = new GuiComponent("date_created", tmplist1, "text", "Date Created", ""); - compList[17] = new GuiComponent("peer_id", tmplist2, "num", "Peer Id", ""); - compList[18] = new GuiComponent("email", tmplist2, "text", "Email", "someuser@domain.edu"); - compList[19] = new GuiComponent("description", tmplist4, "text", "Description", "test user"); - compList[20] = new GuiComponent("rights", tmplist2, "text", "Rights", ""); - compList[21] = new GuiComponent("pubkey", tmplist3, "text", "GENI Public key", ""); - compList[22] = new GuiComponent("pubkey_write", tmplist4, "key", "GENI Public key", ""); - compList[23] = new GuiComponent("wrapperurl", tmplist4, "text", "Wrapper URL", "local"); - compList[24] = new GuiComponent("disabled", tmplist3, "bool", "Disabled", "Yes, No"); - compList[25] = new GuiComponent("userlist", tmplist4, "text", "User List", ""); - compList[26] = new GuiComponent("pointer", tmplist3, "text", "PL Pointer", ""); - compList[27] = new GuiComponent("g_uuid", tmplist3, "text", "GENI UUID", ""); - - } - - private void createCompListSlice(){ - compList_slice = new GuiComponent[24]; - GuiComponent[] compList = compList_slice; - String[] tmplist1 = {"readable","pl"}; - String[] tmplist2 = {"writable","pl"}; - String[] tmplist3 = {"readable","geni"}; - String[] tmplist4 = {"writable","geni"}; - compList[0] = new GuiComponent("slice_id", tmplist1, "num", "Slice Id", ""); - compList[1] = new GuiComponent("description", tmplist2, "text", "Description", ""); - compList[2] = new GuiComponent("node_ids", tmplist1, "num", "Node Ids", ""); - compList[3] = new GuiComponent("expires", tmplist2, "text", "Expires", ""); - compList[4] = new GuiComponent("site_id", tmplist1, "num", "Site Id", ""); - compList[5] = new GuiComponent("uuid", tmplist1, "text", "UUID", ""); - compList[6] = new GuiComponent("creator_person_id", tmplist2, "text", "Creator Person Id", ""); - compList[7] = new GuiComponent("instantiation", tmplist2, "combo", "Instantiation", "delegated, not-instantiated, plc-instantiated"); - compList[8] = new GuiComponent("name", tmplist2, "text", "Name", ""); - compList[9] = new GuiComponent("created", tmplist1, "text", "Created", ""); - compList[10] = new GuiComponent("url", tmplist2, "text", "Url", ""); - compList[11] = new GuiComponent("max_nodes", tmplist2, "num", "Max Nodes", "10"); - compList[12] = new GuiComponent("person_ids", tmplist2, "num", "Person Ids", ""); - compList[13] = new GuiComponent("slice_attribute_ids", tmplist2, "text", "Slice Attribute Ids", ""); - compList[14] = new GuiComponent("peer_id", tmplist1, "num", "Peer Id", ""); - compList[15] = new GuiComponent("description", tmplist4, "text", "Description", "test slice"); - compList[16] = new GuiComponent("rights", tmplist2, "text", "Rights", ""); - compList[17] = new GuiComponent("pubkey", tmplist3, "text", "GENI Public key", ""); - compList[18] = new GuiComponent("pubkey_write", tmplist4, "key", "GENI Public key", ""); - compList[19] = new GuiComponent("wrapperurl", tmplist4, "text", "Wrapper URL", "local"); - compList[20] = new GuiComponent("disabled", tmplist3, "bool", "Disabled", "Yes, No"); - compList[21] = new GuiComponent("userlist", tmplist4, "text", "User List", ""); - compList[22] = new GuiComponent("pointer", tmplist3, "num", "PL Pointer", ""); - compList[23] = new GuiComponent("g_uuid", tmplist3, "text", "GENI UUID", ""); - - } - - private void createCompListSite(){ - compList_site = new GuiComponent[31]; - GuiComponent[] compList = compList_site; - String[] tmplist1 = {"readable","pl"}; - String[] tmplist2 = {"writable","pl"}; - String[] tmplist3 = {"readable","geni"}; - String[] tmplist4 = {"writable","geni"}; - - compList[0] = new GuiComponent("last_updated", tmplist1, "text", "Last Updated", ""); - compList[1] = new GuiComponent("node_ids", tmplist2, "num", "Node Ids", ""); - compList[2] = new GuiComponent("site_id", tmplist1, "num", "Site Id", ""); - compList[3] = new GuiComponent("pcu_ids", tmplist2, "num", "PCU Ids", ""); - compList[4] = new GuiComponent("max_slices", tmplist2, "num", "Max Slices", ""); - compList[5] = new GuiComponent("ext_consortium_id", tmplist2, "text", "Ext Consortium Id", ""); - compList[6] = new GuiComponent("max_slivers", tmplist2, "num", "Max Slivers", "5"); - compList[7] = new GuiComponent("is_public", tmplist2, "bool", "Public", "Yes, No"); - compList[8] = new GuiComponent("peer_site_id", tmplist1, "num", "Peer Site Id", ""); - compList[9] = new GuiComponent("abbreviated_name", tmplist2, "text", "Abbreviated Name", ""); - compList[10] = new GuiComponent("name", tmplist2, "text", "Name", ""); - compList[11] = new GuiComponent("address_ids", tmplist2, "num", "Address Ids", ""); - compList[12] = new GuiComponent("uuid", tmplist1, "text", "UUID", ""); - compList[13] = new GuiComponent("url", tmplist2, "text", "Url", ""); - compList[14] = new GuiComponent("person_ids", tmplist2, "num", "Person Ids", ""); - compList[15] = new GuiComponent("enabled", tmplist2, "bool", "Enabled", "Yes, No"); - compList[16] = new GuiComponent("longitude", tmplist2, "num", "Longitude", "34.3"); - compList[17] = new GuiComponent("latitude", tmplist2, "num", "Latitude", "45.4"); - compList[18] = new GuiComponent("slice_ids", tmplist2, "num", "Slice Ids", ""); - compList[19] = new GuiComponent("login_base", tmplist2, "text", "Login Base", ""); - compList[20] = new GuiComponent("date_created", tmplist1, "text", "Date Created", ""); - compList[21] = new GuiComponent("peer_id", tmplist1, "num", "Peer Id", ""); - compList[22] = new GuiComponent("description", tmplist4, "text", "Description", "test slice"); - compList[23] = new GuiComponent("rights", tmplist2, "text", "Rights", ""); - compList[24] = new GuiComponent("pubkey", tmplist3, "text", "GENI Public key", ""); - compList[25] = new GuiComponent("pubkey_write", tmplist4, "key", "GENI Public key", ""); - compList[26] = new GuiComponent("wrapperurl", tmplist4, "text", "Wrapper URL", "local"); - compList[27] = new GuiComponent("disabled", tmplist3, "bool", "Disabled", "Yes, No"); - compList[28] = new GuiComponent("userlist", tmplist4, "text", "User List", ""); - compList[29] = new GuiComponent("pointer", tmplist3, "num", "PL Pointer", ""); - compList[30] = new GuiComponent("g_uuid", tmplist3, "text", "GENI UUID", ""); - } - - //input is in format: {"'field1_name':value1", "'field2_name':value2", ...} - public void FillComponentList(String recordType, String[] dict){ - GuiComponent[] complist = null; - if (recordType.equals("user")){ - complist = compList_user; - } - else if (recordType.equals("slice")){ - complist = compList_slice; - } - else if (recordType.equals("node")){ - complist = compList_node; - } - else if (recordType.equals("SA/MA")){ - complist = compList_site; - } - - for (int i=0; i 1) - comp_value = line[1]; - if (comp_value.equals("None")) - comp_value = ""; - int j; - for(j = 0; j tmp_key_file.txt\n"); - outCommand.flush(); - - //get key from temp file - String result = ""; - File file = new File("tmp_key_file.txt"); - int i = 0; - while(!file.exists() && i<5){ - i++; - try { - Thread.currentThread().sleep(200); - } catch (InterruptedException ex) { - ex.printStackTrace(); - } - } - try { - Thread.currentThread().sleep(100); - } catch (InterruptedException ex) { - ex.printStackTrace(); - } - if (file.exists()){ - BufferedReader in = new BufferedReader(new FileReader("tmp_key_file.txt")); - String tmp = in.readLine(); - while(tmp!=null && tmp.length() > 0){ - result += tmp+"\n"; - tmp = in.readLine(); - } - in.close(); - - outCommand.write("rm tmp_key_file.txt\n"); - outCommand.flush(); - } - //write the result in the textfield - t.setText(result); - }catch (Exception ex) { - ex.printStackTrace(); - } - } - - } - - public void displayComponentList(String recordType, JPanel panel1, JPanel panel2){ - - GuiComponent[] complist = null; - if (recordType.equals("user")){ - complist = compList_user; - } - else if (recordType.equals("slice")){ - complist = compList_slice; - } - else if (recordType.equals("node")){ - complist = compList_node; - } - else if (recordType.equals("SA/MA")){ - complist = compList_site; - } - - panel1.removeAll(); - panel1.setLayout(new SpringLayout()); - - int count1 = 0; - for (int i=0;i - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/gui/JavaApplication1/src/javaapplication1/GeniGUI.java b/gui/JavaApplication1/src/javaapplication1/GeniGUI.java deleted file mode 100644 index ad93a59c..00000000 --- a/gui/JavaApplication1/src/javaapplication1/GeniGUI.java +++ /dev/null @@ -1,452 +0,0 @@ -/* - * GeniGUI.java - * - * Created on March 29, 2008, 3:46 PM - */ - -package javaapplication1; - -import javax.swing.SpringLayout; -import org.jdesktop.layout.GroupLayout; - -/** - * - * @author soners - */ -public class GeniGUI extends javax.swing.JFrame { - - /** - * Creates new form GeniGUI - */ - public GeniGUI() { - initComponents(); - - jPanel4.setVisible(false); - jPanel5.setVisible(false); - jPanel6.setVisible(false); - jPanel7.setVisible(false); - - javax.swing.JPanel[] panelList = {jPanel3, jPanel4, jPanel5, jPanel6, jPanel7}; - panelfiller = new PanelFiller(panelList, statusLabel); - panelfiller.initializePanels(); - - } - - private void passCallToHandler(String opname){ - User user = new User(); - user.setCurrentUser(hrnTextField.getText(), (String)typeCombo.getSelectedItem(), dirTextField.getText()); - RecordInfo record = new RecordInfo(); - record.setCurrentRecord(rechrnTextField.getText(), (String)rectypeCombo.getSelectedItem()); - - panelfiller.setUser(user); - panelfiller.setRecord(record); - panelfiller.handleOperation(opname); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - // //GEN-BEGIN:initComponents - private void initComponents() { - jPanel1 = new javax.swing.JPanel(); - hrnLabel = new javax.swing.JLabel(); - hrnTextField = new javax.swing.JTextField(); - typeCombo = new javax.swing.JComboBox(); - dirTextField = new javax.swing.JTextField(); - typeLabel = new javax.swing.JLabel(); - dirLabel = new javax.swing.JLabel(); - jInternalFrame1 = new javax.swing.JInternalFrame(); - jPanel3 = new javax.swing.JPanel(); - jPanel4 = new javax.swing.JPanel(); - jPanel5 = new javax.swing.JPanel(); - jPanel6 = new javax.swing.JPanel(); - jPanel7 = new javax.swing.JPanel(); - jPanel2 = new javax.swing.JPanel(); - rechrnLabel = new javax.swing.JLabel(); - rechrnTextField = new javax.swing.JTextField(); - rectypeCombo = new javax.swing.JComboBox(); - rectypeLabel = new javax.swing.JLabel(); - jButton1 = new javax.swing.JButton(); - jButton2 = new javax.swing.JButton(); - jButton3 = new javax.swing.JButton(); - jButton4 = new javax.swing.JButton(); - statusLabel = new javax.swing.JLabel(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - formMouseReleased(evt); - } - }); - - jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("User Info")); - hrnLabel.setText("Enter your HRN:"); - - hrnTextField.setText("planetlab.jp.osaka"); - - typeCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "user", "SA", "MA" })); - - dirTextField.setText("./client_osaka"); - - typeLabel.setText("Type:"); - - dirLabel.setText("User GENI directory:"); - - org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); - jPanel1.setLayout(jPanel1Layout); - jPanel1Layout.setHorizontalGroup( - jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel1Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(jPanel1Layout.createSequentialGroup() - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(typeLabel) - .add(hrnLabel)) - .add(26, 26, 26)) - .add(jPanel1Layout.createSequentialGroup() - .add(dirLabel) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))) - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(dirTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE) - .add(hrnTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE) - .add(typeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) - ); - jPanel1Layout.setVerticalGroup( - jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel1Layout.createSequentialGroup() - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(hrnLabel) - .add(hrnTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(13, 13, 13) - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(typeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(typeLabel)) - .add(14, 14, 14) - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(dirTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(dirLabel)) - .addContainerGap(46, Short.MAX_VALUE)) - ); - - jInternalFrame1.setTitle("Record Data"); - jInternalFrame1.setVisible(true); - jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Non-editable Information")); - org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); - jPanel3.setLayout(jPanel3Layout); - jPanel3Layout.setHorizontalGroup( - jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 825, Short.MAX_VALUE) - ); - jPanel3Layout.setVerticalGroup( - jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 199, Short.MAX_VALUE) - ); - - jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Set User Fields")); - org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4); - jPanel4.setLayout(jPanel4Layout); - jPanel4Layout.setHorizontalGroup( - jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 825, Short.MAX_VALUE) - ); - jPanel4Layout.setVerticalGroup( - jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 180, Short.MAX_VALUE) - ); - - jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Set Slice fields")); - org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5); - jPanel5.setLayout(jPanel5Layout); - jPanel5Layout.setHorizontalGroup( - jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 825, Short.MAX_VALUE) - ); - jPanel5Layout.setVerticalGroup( - jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 192, Short.MAX_VALUE) - ); - - jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Set Node fields")); - org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6); - jPanel6.setLayout(jPanel6Layout); - jPanel6Layout.setHorizontalGroup( - jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 825, Short.MAX_VALUE) - ); - jPanel6Layout.setVerticalGroup( - jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 182, Short.MAX_VALUE) - ); - - jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Set SA/MA fields")); - org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7); - jPanel7.setLayout(jPanel7Layout); - jPanel7Layout.setHorizontalGroup( - jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 837, Short.MAX_VALUE) - ); - jPanel7Layout.setVerticalGroup( - jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(0, 221, Short.MAX_VALUE) - ); - - org.jdesktop.layout.GroupLayout jInternalFrame1Layout = new org.jdesktop.layout.GroupLayout(jInternalFrame1.getContentPane()); - jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout); - jInternalFrame1Layout.setHorizontalGroup( - jInternalFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jInternalFrame1Layout.createSequentialGroup() - .addContainerGap() - .add(jInternalFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jInternalFrame1Layout.createSequentialGroup() - .add(jInternalFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap()))) - ); - jInternalFrame1Layout.setVerticalGroup( - jInternalFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(org.jdesktop.layout.GroupLayout.TRAILING, jInternalFrame1Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) - ); - - jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Record Select")); - rechrnLabel.setText("HRN:"); - - rechrnTextField.setText("planetlab.jp.osaka.tokyobranch"); - - rectypeCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "-", "user", "slice", "node", "SA", "MA" })); - rectypeCombo.addItemListener(new java.awt.event.ItemListener() { - public void itemStateChanged(java.awt.event.ItemEvent evt) { - rectypeComboItemStateChanged(evt); - } - }); - - rectypeLabel.setText("Type:"); - - jButton1.setText("register"); - jButton1.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - jButton1MouseReleased(evt); - } - }); - - jButton2.setText("remove"); - jButton2.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - jButton2MouseReleased(evt); - } - }); - - jButton3.setText("update"); - jButton3.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - jButton3MouseReleased(evt); - } - }); - - jButton4.setText("lookup"); - jButton4.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - jButton4MouseReleased(evt); - } - }); - - org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); - jPanel2.setLayout(jPanel2Layout); - jPanel2Layout.setHorizontalGroup( - jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel2Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel2Layout.createSequentialGroup() - .add(rechrnLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 38, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(rechrnTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 271, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(jPanel2Layout.createSequentialGroup() - .add(rectypeLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 38, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel2Layout.createSequentialGroup() - .add(jButton1) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jButton2) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jButton3) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jButton4)) - .add(rectypeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) - .addContainerGap(30, Short.MAX_VALUE)) - ); - jPanel2Layout.setVerticalGroup( - jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel2Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(rechrnLabel) - .add(rechrnTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(rectypeCombo, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(rectypeLabel)) - .add(27, 27, 27) - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jButton1) - .add(jButton2) - .add(jButton3) - .add(jButton4)) - .addContainerGap(22, Short.MAX_VALUE)) - ); - - statusLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP); - statusLabel.setAutoscrolls(true); - - org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(layout.createSequentialGroup() - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() - .addContainerGap() - .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .add(org.jdesktop.layout.GroupLayout.LEADING, jInternalFrame1) - .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() - .addContainerGap() - .add(statusLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 857, Short.MAX_VALUE))) - .add(28, 28, 28)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(layout.createSequentialGroup() - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) - .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(statusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jInternalFrame1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(153, 153, 153)) - ); - pack(); - }// //GEN-END:initComponents - - private void jButton4MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton4MouseReleased -// TODO add your handling code here: - passCallToHandler("lookup"); - }//GEN-LAST:event_jButton4MouseReleased - - private void jButton3MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton3MouseReleased -// TODO add your handling code here: - passCallToHandler("update"); - }//GEN-LAST:event_jButton3MouseReleased - - private void jButton2MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseReleased -// TODO add your handling code here: - passCallToHandler("remove"); - - }//GEN-LAST:event_jButton2MouseReleased - - private void jButton1MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseReleased -// TODO add your handling code here: - passCallToHandler("register"); - - }//GEN-LAST:event_jButton1MouseReleased - - private void formMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseReleased -// TODO add your handling code here: - - }//GEN-LAST:event_formMouseReleased - - private void rectypeComboItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rectypeComboItemStateChanged -// TODO add your handling code here: - - jInternalFrame1.setSize(500,800); - jInternalFrame1.revalidate(); - jInternalFrame1.repaint(); - - int selected = rectypeCombo.getSelectedIndex(); - if (selected == 1){ - jPanel4.setVisible(true); - jPanel5.setVisible(false); - jPanel6.setVisible(false); - jPanel7.setVisible(false); - } - else if (selected == 2){ - jPanel5.setVisible(true); - jPanel4.setVisible(false); - jPanel6.setVisible(false); - jPanel7.setVisible(false); - } - else if (selected == 3){ - jPanel6.setVisible(true); - jPanel4.setVisible(false); - jPanel5.setVisible(false); - jPanel7.setVisible(false); - } - else if (selected == 4 || selected == 5){ - jPanel7.setVisible(true); - jPanel4.setVisible(false); - jPanel5.setVisible(false); - jPanel6.setVisible(false); - } - }//GEN-LAST:event_rectypeComboItemStateChanged - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new GeniGUI().setVisible(true); - } - }); - } - - private PanelFiller panelfiller; - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JLabel dirLabel; - private javax.swing.JTextField dirTextField; - private javax.swing.JLabel hrnLabel; - private javax.swing.JTextField hrnTextField; - private javax.swing.JButton jButton1; - private javax.swing.JButton jButton2; - private javax.swing.JButton jButton3; - private javax.swing.JButton jButton4; - private javax.swing.JInternalFrame jInternalFrame1; - private javax.swing.JPanel jPanel1; - private javax.swing.JPanel jPanel2; - private javax.swing.JPanel jPanel3; - private javax.swing.JPanel jPanel4; - private javax.swing.JPanel jPanel5; - private javax.swing.JPanel jPanel6; - private javax.swing.JPanel jPanel7; - private javax.swing.JLabel rechrnLabel; - private javax.swing.JTextField rechrnTextField; - private javax.swing.JComboBox rectypeCombo; - private javax.swing.JLabel rectypeLabel; - private javax.swing.JLabel statusLabel; - private javax.swing.JComboBox typeCombo; - private javax.swing.JLabel typeLabel; - // End of variables declaration//GEN-END:variables - -} diff --git a/gui/JavaApplication1/src/javaapplication1/GuiComponent.java b/gui/JavaApplication1/src/javaapplication1/GuiComponent.java deleted file mode 100644 index 40e9b7cc..00000000 --- a/gui/JavaApplication1/src/javaapplication1/GuiComponent.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * GuiComponent.java - * - * Created on March 29, 2008, 2:45 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package javaapplication1; - -/** - * - * @author soners - */ -public class GuiComponent { - - /** Creates a new instance of GuiComponent */ - public GuiComponent(String name, String[] property, String type, String label, String defaultVal) { - this.name = name; - this.property = property; - this.type = type; - this.label = label; - this.value = defaultVal; - - } - private String[] property; - private String type; - private String label; - private String value; - - /** - * Holds value of property name. - */ - private String name; - - /** - * Getter for property name. - * @return Value of property name. - */ - public String getName() { - return this.name; - } - - /** - * Setter for property name. - * @param name New value of property name. - */ - public void setName(String name) { - this.name = name; - } - - /** - * Getter for property property. - * @return Value of property property. - */ - public String[] getProperty() { - return this.property; - } - - /** - * Setter for property property. - * @param property New value of property property. - */ - public void setProperty(String[] property) { - this.property = property; - } - - /** - * Getter for property type. - * @return Value of property type. - */ - public String getType() { - return this.type; - } - - /** - * Setter for property type. - * @param type New value of property type. - */ - public void setType(String type) { - this.type = type; - } - - /** - * Getter for property label. - * @return Value of property label. - */ - public String getLabel() { - return this.label; - } - - /** - * Setter for property label. - * @param label New value of property label. - */ - public void setLabel(String label) { - this.label = label; - } - - /** - * Getter for property value. - * - * @return Value of property value. - */ - public String getValue() { - return this.value; - } - - /** - * Setter for property value. - * - * @param value New value of property value. - */ - public void setValue(String defaultVal) { - this.value = defaultVal; - } - -} diff --git a/gui/JavaApplication1/src/javaapplication1/PanelFiller.java b/gui/JavaApplication1/src/javaapplication1/PanelFiller.java deleted file mode 100644 index 17d5d11d..00000000 --- a/gui/JavaApplication1/src/javaapplication1/PanelFiller.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * PanelFiller.java - * - * Created on March 29, 2008, 10:45 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package javaapplication1; - -import java.io.*; -import javax.swing.*; -import javax.swing.JOptionPane; - -/** - * - * @author soners - */ -public class PanelFiller { - - /** Creates a new instance of PanelFiller */ - public PanelFiller(JPanel[] panelList, JLabel statusLabel) { - panel1 = panelList[0]; - panel2 = panelList[1]; - panel3 = panelList[2]; - panel4 = panelList[3]; - panel5 = panelList[4]; - this.statusLabel = statusLabel; - - try{ - rtime = Runtime.getRuntime(); - child = rtime.exec("/bin/bash"); - outCommand = new BufferedWriter(new OutputStreamWriter(child.getOutputStream())); - }catch (Exception e){ - JOptionPane.showMessageDialog(null, "The program cannot start bash.\n"); - return; - } - - displayHandle = new DisplayHandle(outCommand); - } - - public void handleOperation(String opname){ - - JPanel curpanel = null; - String type = record.getType(); - if (type.equals("user")) - curpanel = panel2; - else if (type.equals("slice")) - curpanel = panel3; - else if (type.equals("node")) - curpanel = panel4; - else if (type.equals("SA")){ - curpanel = panel5; - type = "SA/MA"; - } - else if (type.equals("MA")){ - curpanel = panel5; - type = "SA/MA"; - } - - if (opname.equals("register")){ - String params = displayHandle.PanelToString(type, curpanel); - String rest = params.substring(12); - if (rest.charAt(0)=='}') - params = "'g_params':{'hrn':'"+record.getHrn()+"', 'type':'"+record.getType()+"'"+rest; - else - params = "'g_params':{'hrn':'"+record.getHrn()+"', 'type':'"+record.getType()+"', "+rest; - String message = "{'opname':'"+opname+"', "+params+"}"; - String result = SendToClientStub(message); - String[] res_arr = result.split("\n"); - String send_str = ""; - for (int i=0; i 0){ - - String status_str = ""; - for (int i=0; i 0){ - result += tmp+"\n"; - tmp = in.readLine(); - } - in.close(); - - outCommand.write("rm tmp_input.txt tmp_output.txt\n"); - outCommand.write("cd "+curdir+"\n"); - outCommand.flush(); - }catch (Exception e){//Catch exception if any - System.err.println("Error: " + e.getMessage()); - result = "Problem occured in client stub.\n"; - return result; - } - return result; - } - - public void initializePanels(){ - displayHandle.displayComponentList("user",panel1, panel2); - displayHandle.displayComponentList("slice",panel1, panel3); - displayHandle.displayComponentList("node",panel1, panel4); - displayHandle.displayComponentList("SA/MA",panel1, panel5); - } - - public void setUser(User user){ - this.user = user; - } - public void setRecord(RecordInfo record){ - this.record = record; - } - - private User user; - private RecordInfo record; - private javax.swing.JPanel panel1; - private javax.swing.JPanel panel2; - private javax.swing.JPanel panel3; - private javax.swing.JPanel panel4; - private javax.swing.JPanel panel5; - private javax.swing.JLabel statusLabel; - - private BufferedWriter outCommand; - private Runtime rtime; - private Process child; - - private DisplayHandle displayHandle; - -} - - diff --git a/gui/JavaApplication1/src/javaapplication1/RecordInfo.java b/gui/JavaApplication1/src/javaapplication1/RecordInfo.java deleted file mode 100644 index 6af39f30..00000000 --- a/gui/JavaApplication1/src/javaapplication1/RecordInfo.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * RecordInfo.java - * - * Created on March 30, 2008, 12:07 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package javaapplication1; -import javax.swing.*; - -/** - * - * @author soners - */ -public class RecordInfo { - - /** Creates a new instance of RecordInfo */ - public RecordInfo() { - } - - public void setCurrentRecord(String hrn, String type){ - this.hrn = hrn; - this.type = type; - } - - - /** - * Holds value of property hrn. - */ - private String hrn; - - /** - * Getter for property hrn. - * @return Value of property hrn. - */ - public String getHrn() { - return this.hrn; - } - - /** - * Setter for property hrn. - * @param hrn New value of property hrn. - */ - public void setHrn(String hrn) { - this.hrn = hrn; - } - - /** - * Holds value of property type. - */ - private String type; - - /** - * Getter for property type. - * @return Value of property type. - */ - public String getType() { - return this.type; - } - - /** - * Setter for property type. - * @param type New value of property type. - */ - public void setType(String type) { - this.type = type; - } - -} diff --git a/gui/JavaApplication1/src/javaapplication1/SpringUtilities.java b/gui/JavaApplication1/src/javaapplication1/SpringUtilities.java deleted file mode 100644 index f2eb8ccb..00000000 --- a/gui/JavaApplication1/src/javaapplication1/SpringUtilities.java +++ /dev/null @@ -1,224 +0,0 @@ -package javaapplication1; -/* - * Copyright (c) 1995 - 2008 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Sun Microsystems nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import javax.swing.*; -import javax.swing.SpringLayout; -import java.awt.*; - -/** - * A 1.4 file that provides utility methods for - * creating form- or grid-style layouts with SpringLayout. - * These utilities are used by several programs, such as - * SpringBox and SpringCompactGrid. - */ -public class SpringUtilities { - /** - * A debugging utility that prints to stdout the component's - * minimum, preferred, and maximum sizes. - */ - public static void printSizes(Component c) { - System.out.println("minimumSize = " + c.getMinimumSize()); - System.out.println("preferredSize = " + c.getPreferredSize()); - System.out.println("maximumSize = " + c.getMaximumSize()); - } - - /** - * Aligns the first rows * cols - * components of parent in - * a grid. Each component is as big as the maximum - * preferred width and height of the components. - * The parent is made just big enough to fit them all. - * - * @param rows number of rows - * @param cols number of columns - * @param initialX x location to start the grid at - * @param initialY y location to start the grid at - * @param xPad x padding between cells - * @param yPad y padding between cells - */ - public static void makeGrid(Container parent, - int rows, int cols, - int initialX, int initialY, - int xPad, int yPad) { - SpringLayout layout; - try { - layout = (SpringLayout)parent.getLayout(); - } catch (ClassCastException exc) { - System.err.println("The first argument to makeGrid must use SpringLayout."); - return; - } - - Spring xPadSpring = Spring.constant(xPad); - Spring yPadSpring = Spring.constant(yPad); - Spring initialXSpring = Spring.constant(initialX); - Spring initialYSpring = Spring.constant(initialY); - int max = rows * cols; - - //Calculate Springs that are the max of the width/height so that all - //cells have the same size. - Spring maxWidthSpring = layout.getConstraints(parent.getComponent(0)). - getWidth(); - Spring maxHeightSpring = layout.getConstraints(parent.getComponent(0)). - getWidth(); - for (int i = 1; i < max; i++) { - SpringLayout.Constraints cons = layout.getConstraints( - parent.getComponent(i)); - - maxWidthSpring = Spring.max(maxWidthSpring, cons.getWidth()); - maxHeightSpring = Spring.max(maxHeightSpring, cons.getHeight()); - } - - //Apply the new width/height Spring. This forces all the - //components to have the same size. - for (int i = 0; i < max; i++) { - SpringLayout.Constraints cons = layout.getConstraints( - parent.getComponent(i)); - - cons.setWidth(maxWidthSpring); - cons.setHeight(maxHeightSpring); - } - - //Then adjust the x/y constraints of all the cells so that they - //are aligned in a grid. - SpringLayout.Constraints lastCons = null; - SpringLayout.Constraints lastRowCons = null; - for (int i = 0; i < max; i++) { - SpringLayout.Constraints cons = layout.getConstraints( - parent.getComponent(i)); - if (i % cols == 0) { //start of new row - lastRowCons = lastCons; - cons.setX(initialXSpring); - } else { //x position depends on previous component - cons.setX(Spring.sum(lastCons.getConstraint(SpringLayout.EAST), - xPadSpring)); - } - - if (i / cols == 0) { //first row - cons.setY(initialYSpring); - } else { //y position depends on previous row - cons.setY(Spring.sum(lastRowCons.getConstraint(SpringLayout.SOUTH), - yPadSpring)); - } - lastCons = cons; - } - - //Set the parent's size. - SpringLayout.Constraints pCons = layout.getConstraints(parent); - pCons.setConstraint(SpringLayout.SOUTH, - Spring.sum( - Spring.constant(yPad), - lastCons.getConstraint(SpringLayout.SOUTH))); - pCons.setConstraint(SpringLayout.EAST, - Spring.sum( - Spring.constant(xPad), - lastCons.getConstraint(SpringLayout.EAST))); - } - - /* Used by makeCompactGrid. */ - private static SpringLayout.Constraints getConstraintsForCell( - int row, int col, - Container parent, - int cols) { - SpringLayout layout = (SpringLayout) parent.getLayout(); - Component c = parent.getComponent(row * cols + col); - return layout.getConstraints(c); - } - - /** - * Aligns the first rows * cols - * components of parent in - * a grid. Each component in a column is as wide as the maximum - * preferred width of the components in that column; - * height is similarly determined for each row. - * The parent is made just big enough to fit them all. - * - * @param rows number of rows - * @param cols number of columns - * @param initialX x location to start the grid at - * @param initialY y location to start the grid at - * @param xPad x padding between cells - * @param yPad y padding between cells - */ - public static void makeCompactGrid(Container parent, - int rows, int cols, - int initialX, int initialY, - int xPad, int yPad) { - SpringLayout layout; - try { - layout = (SpringLayout)parent.getLayout(); - } catch (ClassCastException exc) { - System.err.println("The first argument to makeCompactGrid must use SpringLayout."); - return; - } - - //Align all cells in each column and make them the same width. - Spring x = Spring.constant(initialX); - for (int c = 0; c < cols; c++) { - Spring width = Spring.constant(0); - for (int r = 0; r < rows; r++) { - width = Spring.max(width, - getConstraintsForCell(r, c, parent, cols). - getWidth()); - } - for (int r = 0; r < rows; r++) { - SpringLayout.Constraints constraints = - getConstraintsForCell(r, c, parent, cols); - constraints.setX(x); - constraints.setWidth(width); - } - x = Spring.sum(x, Spring.sum(width, Spring.constant(xPad))); - } - - //Align all cells in each row and make them the same height. - Spring y = Spring.constant(initialY); - for (int r = 0; r < rows; r++) { - Spring height = Spring.constant(0); - for (int c = 0; c < cols; c++) { - height = Spring.max(height, - getConstraintsForCell(r, c, parent, cols). - getHeight()); - } - for (int c = 0; c < cols; c++) { - SpringLayout.Constraints constraints = - getConstraintsForCell(r, c, parent, cols); - constraints.setY(y); - constraints.setHeight(height); - } - y = Spring.sum(y, Spring.sum(height, Spring.constant(yPad))); - } - - //Set the parent's size. - SpringLayout.Constraints pCons = layout.getConstraints(parent); - pCons.setConstraint(SpringLayout.SOUTH, y); - pCons.setConstraint(SpringLayout.EAST, x); - } -} diff --git a/gui/JavaApplication1/src/javaapplication1/User.java b/gui/JavaApplication1/src/javaapplication1/User.java deleted file mode 100644 index 336749f2..00000000 --- a/gui/JavaApplication1/src/javaapplication1/User.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * User.java - * - * Created on March 29, 2008, 11:36 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package javaapplication1; -import javax.swing.*; -/** - * - * @author soners - */ -public class User { - - /** Creates a new instance of User */ - public User() { - } - - public void setCurrentUser(String hrn, String type, String directory){ - this.hrn = hrn; - this.type = type; - this.directory = directory; - } - - /** - * Holds value of property hrn. - */ - private String hrn; - - /** - * Getter for property hrn. - * @return Value of property hrn. - */ - public String getHrn() { - return this.hrn; - } - - /** - * Setter for property hrn. - * @param hrn New value of property hrn. - */ - public void setHrn(String hrn) { - this.hrn = hrn; - } - - - /** - * Holds value of property type. - */ - private String type; - - /** - * Getter for property type. - * @return Value of property type. - */ - public String getType() { - return this.type; - } - - /** - * Setter for property type. - * @param type New value of property type. - */ - public void setType(String type) { - this.type = type; - } - - /** - * Holds value of property directory. - */ - private String directory; - - /** - * Getter for property directory. - * @return Value of property directory. - */ - public String getDirectory() { - return this.directory; - } - - /** - * Setter for property directory. - * @param directory New value of property directory. - */ - public void setDirectory(String directory) { - this.directory = directory; - } - -} diff --git a/gui/JavaApplication1/test/NewJFrame.form b/gui/JavaApplication1/test/NewJFrame.form deleted file mode 100644 index bc1510ba..00000000 --- a/gui/JavaApplication1/test/NewJFrame.form +++ /dev/null @@ -1,1037 +0,0 @@ - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/gui/JavaApplication1/test/NewJFrame.java b/gui/JavaApplication1/test/NewJFrame.java deleted file mode 100644 index ba492038..00000000 --- a/gui/JavaApplication1/test/NewJFrame.java +++ /dev/null @@ -1,1221 +0,0 @@ -/* - * NewJFrame.java - * - * Created on March 24, 2008, 8:22 PM - */ - -import java.io.*; -import javax.swing.JOptionPane; - -/** - * - * @author soners - */ -public class NewJFrame extends javax.swing.JFrame { - - /** Creates new form NewJFrame */ - public NewJFrame() { - initComponents(); - - jPanel6.setVisible(false); - jPanel7.setVisible(false); - jPanel2.setVisible(false); - - //public key prompt will be visible for only register and update - jLabel31.setVisible(false); - jTextField20.setVisible(false); - - try{ - rtime = Runtime.getRuntime(); - child = rtime.exec("/bin/bash"); - outCommand = new BufferedWriter(new OutputStreamWriter(child.getOutputStream())); - }catch (Exception e){ - JOptionPane.showMessageDialog(null, "The program cannot start bash.\n"); - return; - } - - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - // //GEN-BEGIN:initComponents - private void initComponents() { - jPanel1 = new javax.swing.JPanel(); - jLabel1 = new javax.swing.JLabel(); - jTextField1 = new javax.swing.JTextField(); - jComboBox1 = new javax.swing.JComboBox(); - jTextField24 = new javax.swing.JTextField(); - jLabel29 = new javax.swing.JLabel(); - jLabel30 = new javax.swing.JLabel(); - jPanel4 = new javax.swing.JPanel(); - jLabel2 = new javax.swing.JLabel(); - jTextField2 = new javax.swing.JTextField(); - jComboBox2 = new javax.swing.JComboBox(); - jPanel3 = new javax.swing.JPanel(); - jToggleButton6 = new javax.swing.JToggleButton(); - jToggleButton7 = new javax.swing.JToggleButton(); - jToggleButton8 = new javax.swing.JToggleButton(); - jToggleButton9 = new javax.swing.JToggleButton(); - jLabel28 = new javax.swing.JLabel(); - jLabel31 = new javax.swing.JLabel(); - jTextField20 = new javax.swing.JTextField(); - jButton1 = new javax.swing.JButton(); - jInternalFrame1 = new javax.swing.JInternalFrame(); - jPanel6 = new javax.swing.JPanel(); - jLabel7 = new javax.swing.JLabel(); - jLabel8 = new javax.swing.JLabel(); - jLabel9 = new javax.swing.JLabel(); - jLabel10 = new javax.swing.JLabel(); - jLabel11 = new javax.swing.JLabel(); - jLabel12 = new javax.swing.JLabel(); - jLabel13 = new javax.swing.JLabel(); - jLabel14 = new javax.swing.JLabel(); - jLabel15 = new javax.swing.JLabel(); - jLabel16 = new javax.swing.JLabel(); - jTextField6 = new javax.swing.JTextField(); - jTextField7 = new javax.swing.JTextField(); - jTextField8 = new javax.swing.JTextField(); - jTextField9 = new javax.swing.JTextField(); - jTextField10 = new javax.swing.JTextField(); - jTextField11 = new javax.swing.JTextField(); - jTextField12 = new javax.swing.JTextField(); - jComboBox4 = new javax.swing.JComboBox(); - jTextField21 = new javax.swing.JTextField(); - jComboBox5 = new javax.swing.JComboBox(); - jPanel7 = new javax.swing.JPanel(); - jLabel6 = new javax.swing.JLabel(); - jLabel25 = new javax.swing.JLabel(); - jLabel26 = new javax.swing.JLabel(); - jLabel27 = new javax.swing.JLabel(); - jComboBox3 = new javax.swing.JComboBox(); - jTextField22 = new javax.swing.JTextField(); - jScrollPane1 = new javax.swing.JScrollPane(); - jTextArea1 = new javax.swing.JTextArea(); - jTextField23 = new javax.swing.JTextField(); - jPanel2 = new javax.swing.JPanel(); - jTextField3 = new javax.swing.JTextField(); - jLabel3 = new javax.swing.JLabel(); - jLabel4 = new javax.swing.JLabel(); - jLabel5 = new javax.swing.JLabel(); - jTextField4 = new javax.swing.JTextField(); - jTextField5 = new javax.swing.JTextField(); - jLabel32 = new javax.swing.JLabel(); - jTextField25 = new javax.swing.JTextField(); - jPanel5 = new javax.swing.JPanel(); - jLabel17 = new javax.swing.JLabel(); - jLabel18 = new javax.swing.JLabel(); - jLabel19 = new javax.swing.JLabel(); - jLabel20 = new javax.swing.JLabel(); - jLabel21 = new javax.swing.JLabel(); - jLabel22 = new javax.swing.JLabel(); - jLabel23 = new javax.swing.JLabel(); - jLabel24 = new javax.swing.JLabel(); - jTextField13 = new javax.swing.JTextField(); - jTextField14 = new javax.swing.JTextField(); - jTextField15 = new javax.swing.JTextField(); - jTextField16 = new javax.swing.JTextField(); - jTextField17 = new javax.swing.JTextField(); - jTextField18 = new javax.swing.JTextField(); - jTextField19 = new javax.swing.JTextField(); - jScrollPane2 = new javax.swing.JScrollPane(); - jTextArea2 = new javax.swing.JTextArea(); - jLabel33 = new javax.swing.JLabel(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("User Info")); - jPanel1.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - jPanel1MouseReleased(evt); - } - }); - - jLabel1.setText("Enter your HRN:"); - - jTextField1.setText("planetlab.jp.osaka"); - - jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "user", "SA", "MA" })); - - jTextField24.setText("./client_osaka"); - - jLabel29.setText("Type:"); - - jLabel30.setText("User GENI directory:"); - - org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); - jPanel1.setLayout(jPanel1Layout); - jPanel1Layout.setHorizontalGroup( - jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel1Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(jLabel29) - .add(jLabel1)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 212, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(61, 61, 61) - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jLabel30) - .add(jTextField24, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 173, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(39, 39, 39)) - ); - jPanel1Layout.setVerticalGroup( - jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel1Layout.createSequentialGroup() - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel1) - .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jLabel30)) - .add(8, 8, 8) - .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField24, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jLabel29)) - .addContainerGap()) - ); - - jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("GENI Parameters")); - jLabel2.setText("HRN:"); - - jTextField2.setText("planetlab.jp.osaka.tokyobranch"); - - jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "-", "user", "slice", "node", "SA", "MA" })); - jComboBox2.addItemListener(new java.awt.event.ItemListener() { - public void itemStateChanged(java.awt.event.ItemEvent evt) { - jComboBox2ItemStateChanged(evt); - } - }); - - jToggleButton6.setText("register"); - jToggleButton6.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - jToggleButton6MouseReleased(evt); - } - }); - - jToggleButton7.setText("remove"); - jToggleButton7.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - jToggleButton7MouseReleased(evt); - } - }); - - jToggleButton8.setText("update"); - jToggleButton8.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - jToggleButton8MouseReleased(evt); - } - }); - - jToggleButton9.setText("lookup"); - jToggleButton9.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - jToggleButton9MouseReleased(evt); - } - }); - - org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); - jPanel3.setLayout(jPanel3Layout); - jPanel3Layout.setHorizontalGroup( - jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel3Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel3Layout.createSequentialGroup() - .add(jToggleButton6) - .addContainerGap()) - .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel3Layout.createSequentialGroup() - .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(org.jdesktop.layout.GroupLayout.LEADING, jToggleButton9, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 82, Short.MAX_VALUE) - .add(org.jdesktop.layout.GroupLayout.LEADING, jToggleButton7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 82, Short.MAX_VALUE)) - .add(106, 106, 106)) - .add(jPanel3Layout.createSequentialGroup() - .add(jToggleButton8, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 82, Short.MAX_VALUE) - .add(106, 106, 106)))) - ); - jPanel3Layout.setVerticalGroup( - jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel3Layout.createSequentialGroup() - .add(jToggleButton6) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jToggleButton7) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jToggleButton8) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jToggleButton9) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); - - jLabel28.setText("Type:"); - - jLabel31.setText("Public Key:"); - - org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4); - jPanel4.setLayout(jPanel4Layout); - jPanel4Layout.setHorizontalGroup( - jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel4Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) - .add(jPanel4Layout.createSequentialGroup() - .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 38, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jLabel28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 38, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 271, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jComboBox2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) - .add(jPanel4Layout.createSequentialGroup() - .add(jLabel31) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jTextField20))) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(106, 106, 106)) - ); - jPanel4Layout.setVerticalGroup( - jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel4Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel2) - .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jComboBox2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jLabel28)) - .add(17, 17, 17) - .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel31) - .add(jTextField20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) - .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - ); - - jButton1.setText("Send"); - jButton1.addMouseListener(new java.awt.event.MouseAdapter() { - public void mouseReleased(java.awt.event.MouseEvent evt) { - jButton1MouseReleased(evt); - } - }); - - jInternalFrame1.setVisible(true); - jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("PL parameters for SA/MA")); - jLabel7.setText("Name:"); - - jLabel8.setText("Abbreviated Name:"); - - jLabel9.setText("URL:"); - - jLabel10.setText("Login Base:"); - - jLabel11.setText("Longitude:"); - - jLabel12.setText("Latitude:"); - - jLabel13.setText("Public:"); - - jLabel14.setText("Max Slices:"); - - jLabel15.setText("Max Slivers:"); - - jLabel16.setText("Enabled:"); - - jTextField6.setText("newname"); - - jTextField7.setText("abbname2"); - - jTextField8.setText("rand.com"); - - jTextField9.setText("my_loginbase4"); - - jTextField10.setText("44.4"); - - jTextField11.setText("66.6"); - - jTextField12.setText("10"); - - jComboBox4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Yes", "No" })); - - jTextField21.setText("300"); - - jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Yes", "No" })); - - org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6); - jPanel6.setLayout(jPanel6Layout); - jPanel6Layout.setHorizontalGroup( - jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel6Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel6Layout.createSequentialGroup() - .add(jLabel11) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 63, Short.MAX_VALUE) - .add(jTextField10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel6Layout.createSequentialGroup() - .add(jLabel10) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 58, Short.MAX_VALUE) - .add(jTextField9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel6Layout.createSequentialGroup() - .add(jLabel9) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 102, Short.MAX_VALUE) - .add(jTextField8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel6Layout.createSequentialGroup() - .add(jLabel8) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jTextField7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel6Layout.createSequentialGroup() - .add(jLabel7) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 91, Short.MAX_VALUE) - .add(jTextField6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(jPanel6Layout.createSequentialGroup() - .add(jLabel12) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 75, Short.MAX_VALUE) - .add(jTextField11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(jPanel6Layout.createSequentialGroup() - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jLabel15) - .add(jLabel16)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 56, Short.MAX_VALUE) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jComboBox5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) - .add(jPanel6Layout.createSequentialGroup() - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jLabel14) - .add(jLabel13)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 62, Short.MAX_VALUE) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jComboBox4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 133, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) - .addContainerGap(36, Short.MAX_VALUE)) - ); - jPanel6Layout.setVerticalGroup( - jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel6Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel6Layout.createSequentialGroup() - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel7) - .add(jTextField6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel8) - .add(jTextField7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel9) - .add(jTextField8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel10) - .add(jTextField9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel11) - .add(jTextField10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel12) - .add(jTextField11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) - .add(jPanel6Layout.createSequentialGroup() - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel13) - .add(jComboBox4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel14) - .add(jTextField12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel15) - .add(jTextField21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel16) - .add(jComboBox5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(150, 150, 150)))) - ); - - jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("PL Parameters for slice")); - jLabel6.setText("Instantiation:"); - - jLabel25.setText("URL:"); - - jLabel26.setText("Description:"); - - jLabel27.setText("Max Nodes:"); - - jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "plc-instantiated", "delegated" })); - - jTextArea1.setColumns(20); - jTextArea1.setRows(5); - jScrollPane1.setViewportView(jTextArea1); - - jTextField23.setText("10"); - - org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7); - jPanel7.setLayout(jPanel7Layout); - jPanel7Layout.setHorizontalGroup( - jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel7Layout.createSequentialGroup() - .add(25, 25, 25) - .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jLabel25) - .add(jLabel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 90, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jLabel26) - .add(jLabel27)) - .add(43, 43, 43) - .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jComboBox3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) - .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField22) - .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE)) - .add(jTextField23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 56, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(191, Short.MAX_VALUE)) - ); - jPanel7Layout.setVerticalGroup( - jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel7Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel6) - .add(jComboBox3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel25) - .add(jTextField22, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel7Layout.createSequentialGroup() - .add(7, 7, 7) - .add(jLabel26)) - .add(jPanel7Layout.createSequentialGroup() - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 58, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) - .add(16, 16, 16) - .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel27) - .add(jTextField23, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(18, Short.MAX_VALUE)) - ); - - jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("PL Parameters for node")); - jTextField3.setText("boot"); - - jLabel3.setText("Bootstate:"); - - jLabel4.setText("Version:"); - - jLabel5.setText("Model:"); - - jTextField4.setText("PlanetLab BootCD 3.1"); - - jTextField5.setText("Dell OptiPlex GX280"); - - jLabel32.setText("Hostname:"); - - org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); - jPanel2.setLayout(jPanel2Layout); - jPanel2Layout.setHorizontalGroup( - jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel2Layout.createSequentialGroup() - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) - .add(jPanel2Layout.createSequentialGroup() - .add(jLabel3) - .add(23, 23, 23) - .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 161, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(jPanel2Layout.createSequentialGroup() - .add(jLabel32) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jTextField25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 161, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jLabel5) - .add(jLabel4)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 161, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 161, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(102, Short.MAX_VALUE)) - ); - jPanel2Layout.setVerticalGroup( - jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel2Layout.createSequentialGroup() - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel2Layout.createSequentialGroup() - .add(30, 30, 30) - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel4) - .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jLabel32) - .add(jTextField25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jLabel3)) - .add(jPanel2Layout.createSequentialGroup() - .add(55, 55, 55) - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel5) - .add(jTextField5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) - .addContainerGap(24, Short.MAX_VALUE)) - ); - - jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("PL Parameters for user")); - jLabel17.setText("First name:"); - - jLabel18.setText("Last name:"); - - jLabel19.setText("Title:"); - - jLabel20.setText("Email:"); - - jLabel21.setText("Password:"); - - jLabel22.setText("Phone:"); - - jLabel23.setText("URL:"); - - jLabel24.setText("Bio:"); - - jTextArea2.setColumns(20); - jTextArea2.setRows(5); - jScrollPane2.setViewportView(jTextArea2); - - org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5); - jPanel5.setLayout(jPanel5Layout); - jPanel5Layout.setHorizontalGroup( - jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel5Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jLabel17) - .add(jLabel18) - .add(jLabel19) - .add(jLabel20)) - .add(28, 28, 28) - .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jTextField16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField13, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(22, 22, 22) - .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jLabel24) - .add(jLabel23) - .add(jLabel22) - .add(jLabel21)) - .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(jPanel5Layout.createSequentialGroup() - .add(21, 21, 21) - .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jTextField18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jTextField19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(59, Short.MAX_VALUE)) - .add(jPanel5Layout.createSequentialGroup() - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 202, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap()))) - ); - jPanel5Layout.setVerticalGroup( - jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel5Layout.createSequentialGroup() - .add(19, 19, 19) - .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel17) - .add(jTextField13, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jLabel21) - .add(jTextField17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel18) - .add(jTextField14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jLabel22) - .add(jTextField18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel19) - .add(jTextField15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jLabel23) - .add(jTextField19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) - .add(jLabel20) - .add(jTextField16, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(jLabel24)) - .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 47, Short.MAX_VALUE)) - .addContainerGap()) - ); - - org.jdesktop.layout.GroupLayout jInternalFrame1Layout = new org.jdesktop.layout.GroupLayout(jInternalFrame1.getContentPane()); - jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout); - jInternalFrame1Layout.setHorizontalGroup( - jInternalFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jInternalFrame1Layout.createSequentialGroup() - .add(jInternalFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jPanel7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap()) - ); - jInternalFrame1Layout.setVerticalGroup( - jInternalFrame1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jInternalFrame1Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 207, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(19, 19, 19) - .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(22, 22, 22) - .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap(55, Short.MAX_VALUE)) - ); - - jLabel33.setFocusTraversalPolicyProvider(true); - jLabel33.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - - org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(layout.createSequentialGroup() - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(layout.createSequentialGroup() - .addContainerGap() - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 604, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) - .add(layout.createSequentialGroup() - .add(153, 153, 153) - .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 277, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(198, 198, 198)) - .add(layout.createSequentialGroup() - .addContainerGap() - .add(jInternalFrame1)) - .add(layout.createSequentialGroup() - .add(53, 53, 53) - .add(jLabel33, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 501, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) - .addContainerGap()) - ); - layout.setVerticalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(layout.createSequentialGroup() - .add(22, 22, 22) - .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 92, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jButton1) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jLabel33, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jInternalFrame1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .add(794, 794, 794)) - ); - pack(); - }// //GEN-END:initComponents - - private void jButton1MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseReleased -// TODO add your handling code here: - String operation = ""; - if (jToggleButton6.isSelected()) - operation = "register"; - else if (jToggleButton7.isSelected()) - operation = "remove"; - else if (jToggleButton8.isSelected()) - operation = "update"; - else - operation = "lookup"; - - //user data - String user_hrn = jTextField1.getText(); - String user_type = (String) jComboBox1.getSelectedItem(); - - //call data - String hrn = jTextField2.getText(); - String type = (String) jComboBox2.getSelectedItem(); - String pubkey = jTextField20.getText(); - - String gparams = ""; - String pparams = ""; - - if (type == "SA" || type == "MA"){ - String name = jTextField6.getText(); - String abbreviated_name = jTextField7.getText(); - String url = jTextField8.getText(); - String login_base = jTextField9.getText(); - String longitude = jTextField10.getText(); - String latitude = jTextField11.getText(); - String max_slices = jTextField12.getText(); - String max_slivers = jTextField21.getText(); - String is_public = ""; - String enabled = ""; - - - if ((String) jComboBox4.getSelectedItem() == "Yes") - is_public = "True"; - else - is_public = "False"; - if ((String) jComboBox5.getSelectedItem() == "Yes") - enabled = "True"; - else - enabled = "False"; - - if (pubkey == "") - gparams = "{'hrn':'"+hrn+"', 'type':'"+type+"'}"; - else - gparams = "{'hrn':'"+hrn+"', 'type':'"+type+"', 'pubkey':'"+pubkey+"'}"; - pparams = "{'name':'"+name+"', 'url':'"+url+"', 'login_base':'"+login_base+ - "', 'longitude':"+longitude+", 'latitude':"+latitude+", 'is_public':"+ - is_public+", 'abbreviated_name':'"+abbreviated_name+"', 'max_slices':"+max_slices+", 'max_slivers':"+ - max_slivers+", 'enabled':"+enabled+"}"; - } - else if (type == "slice"){ - String instantiation = (String) jComboBox3.getSelectedItem(); - String url = jTextField22.getText(); - String description = jTextArea1.getText(); - String max_nodes = jTextField23.getText(); - - if (pubkey == "") - gparams = "{'hrn':'"+hrn+"', 'type':'"+type+"'}"; - else - gparams = "{'hrn':'"+hrn+"', 'type':'"+type+"', 'pubkey':'"+pubkey+"'}"; - pparams = "{'instantiation':'"+instantiation+"', 'url':'"+url+"', 'description':'"+description+ - "', 'max_nodes':"+max_nodes+"}"; - - } - else if (type == "user"){ - String first_name = jTextField13.getText(); - String last_name = jTextField14.getText(); - String title = jTextField15.getText(); - String email = jTextField16.getText(); - String password = jTextField17.getText(); - String phone = jTextField18.getText(); - String url = jTextField19.getText(); - String bio = jTextArea2.getText(); - - if (pubkey.length() == 0) - gparams = "{'hrn':'"+hrn+"', 'type':'"+type+"'}"; - else - gparams = "{'hrn':'"+hrn+"', 'type':'"+type+"', 'pubkey':'"+pubkey+"'}"; - - pparams = "{'first_name':'"+first_name+"', 'last_name':'"+last_name+"', 'title':'"+title+ - "', 'email':'"+email+"', 'password':'"+password+"', 'phone':'"+phone+"', 'url':'"+url+ - "', 'bio':'"+bio+"'}"; - - } - else if (type == "node"){ - String hostname = jTextField25.getText(); - String boot_state = jTextField3.getText(); - String version = jTextField4.getText(); - String model = jTextField5.getText(); - - if (pubkey == "") - gparams = "{'hrn':'"+hrn+"', 'type':'"+type+"'}"; - else - gparams = "{'hrn':'"+hrn+"', 'type':'"+type+"', 'pubkey':'"+pubkey+"'}"; - - pparams = "{'hostname':'"+hostname+"', 'boot_state':'"+boot_state+"', 'version':'"+version+ - "', 'model':'"+model+"'}"; - } - - String message = "{'opname':'"+operation+"', 'g_params':"+gparams+", 'p_params':"+pparams+"}"; - - //do the call to the python client - String curdir = System.getProperty("user.dir"); - String client_folder = jTextField24.getText(); - String result = ""; - - try{ - //cd to the client folder - outCommand.write("cd "+client_folder+"\n"); - outCommand.flush(); - - FileWriter fstream = new FileWriter(client_folder+"/tmp_input.txt"); - BufferedWriter out = new BufferedWriter(fstream); - out.write(user_hrn+" "+user_type+"\n"); - out.write(message); - //Close the output stream - out.close(); - outCommand.write("./clientstub.py\n"); - outCommand.flush(); - - //get the result of the call from the python client - File file = new File(client_folder+"/tmp_output.txt"); - int i = 0; - while(!file.exists() && i<5){ - i++; - try { - Thread.currentThread().sleep(200); - } catch (InterruptedException ex) { - ex.printStackTrace(); - result = "Problem occured in client stub.\n"; - jLabel33.setText(result); - return; - } - } - - try { - Thread.currentThread().sleep(200); - } catch (InterruptedException ex) { - ex.printStackTrace(); - result = "Problem occured in client stub.\n"; - jLabel33.setText(result); - return; - } - - BufferedReader in = new BufferedReader(new FileReader(client_folder+"/tmp_output.txt")); - result = in.readLine(); - in.close(); - - outCommand.write("rm tmp_input.txt tmp_output.txt\n"); - outCommand.write("cd "+curdir+"\n"); - outCommand.flush(); - }catch (Exception e){//Catch exception if any - System.err.println("Error: " + e.getMessage()); - result = "Problem occured in client stub.\n"; - jLabel33.setText(result); - return; - } - - if (operation == "lookup"){ - - - - //node fields -// {'pl': {'node_id': 10756, -// 'last_updated': 1206716001L, -// 'boot_state': u'boot', -// 'site_id': 10145, -// 'pcu_ids': [], -// 'session': None, -// 'key': None, -// 'conf_file_ids': [], -// 'ssh_rsa_key': None, -// 'uuid': u'154709652654203573378094948211939942919', -// 'nodegroup_ids': [], -// 'slice_ids_whitelist': [], -// 'last_contact': None, -// 'nodenetwork_ids': [], -// 'peer_node_id': None, -// 'hostname': u'tttyeni.com', -// 'slice_ids': [], -// 'boot_nonce': None, -// 'version': u'PlanetLab BootCD 3.1', -// 'date_created': 1206716001L, -// 'model': u'Dell OptiPlex GX280', -// 'peer_id': None, -// 'ports': []}, -// -// 'geni': {'description': None, -// 'rights': None, -// 'pubkey': None, -// 'wrapperurl': None, -// 'disabled': None, -// 'userlist': None, -// 'hrn': 'mynewnode', -// 'type': 'node', -// 'pointer': 10756, -// 'uuid': None}} - -//user fields -// {'pl': {'bio': None, -// 'last_name': u'Okawa', -// 'last_updated': 1170811781L, -// 'key_ids': [], -// 'phone': u'+81-466-49-3529', -// 'peer_person_id': None, -// 'role_ids': [20], -// 'site_ids': [10145], -// 'first_name': u'Keiko', -// 'uuid': u'53584984475370335298592451262408000792', -// 'roles': [u'pi'], -// 'title': u'Professor', -// 'url': None, -// 'enabled': True, -// 'slice_ids': [], -// 'person_id': 12397, -// 'date_created': 1170811781L, -// 'peer_id': None, -// 'email': u'keiko@sfc.wide.ad.jp'}, -// -// 'geni': {'description': None, -// 'rights': None, -// 'pubkey': '-----BEGIN RSA PRIVATE KEY-----\nMIGMAgEAAoGBAJccs4vXVSA5slLmlvx+2DPuSy2W0IP5RrUNIcp/wzVqdG9xWdLW\ns5nSv8g926tbFGvLcQqtoErAc7+oANxNWCO9cGJr/MUzjqOYWZQU92qXYdlCpbuL\n7lAVWkiJt8IYlRHe7BpCSSCaFgt7cUfv3fbuhmIDkT/7G/Ktl5NsvQgfAgMBAAE=\n-----END RSA PRIVATE KEY-----\n', -// 'wrapperurl': 'local', -// 'disabled': None, -// 'userlist': None, -// 'hrn': 'keiko', -// 'type': 'user', -// 'pointer': 12397, -// 'uuid': None}} -// - - -//slice fields -// {'pl': {'description': u'', -// 'node_ids': [], -// 'expires': 1207943671L, -// 'site_id': 10145, -// 'uuid': u'166270525633143177647274842267687147563', -// 'creator_person_id': 12974, -// 'instantiation': u'plc-instantiated', -// 'name': u'keio_keikoslc', -// 'slice_id': 15390, -// 'created': 1206734071L, -// 'url': u'', -// 'max_nodes': 10, -// 'person_ids': [], -// 'slice_attribute_ids': [], -// 'peer_slice_id': None, -// 'peer_id': None}, -// 'geni': {'description': None, -// 'rights': None, -// 'pubkey': None, -// 'wrapperurl': None, -// 'disabled': None, -// 'userlist': None, -// 'hrn': 'keikoslc', -// 'type': 'slice', -// 'pointer': 15390, -// 'uuid': None}} - -//site fields -// {'pl': {'last_updated': 1206743152L, -// 'node_ids': [], -// 'site_id': 10240, -// 'pcu_ids': [], -// 'max_slices': 10, -// 'ext_consortium_id': None, -// 'max_slivers': 300, -// 'is_public': True, -// 'peer_site_id': None, -// 'abbreviated_name': u'abbname2my', -// 'name': u'newnamere', -// 'address_ids': [], -// 'uuid': u'215768548793207591574508192043308034894', -// 'url': u'rand.com', -// 'person_ids': [], -// 'enabled': True, -// 'longitude': 44.399999999999999, -// 'slice_ids': [], -// 'login_base': u'tokyologinb', -// 'latitude': 66.599999999999994, -// 'date_created': 1206743152L, -// 'peer_id': None}, -// 'geni': {'description': None, -// 'rights': '(2-0)(4-0)(6-0)(7-0)(8-0)(9-0)(0-1)(1-1)(2-1)(3-1)(4-1)(5-1)(6-1)(7-1)(8-1)(9-1)#0:reg:slc:planetlab.jp.osaka#1:reg:slc:planetlab.jp.osaka.tokyobranch2', -// 'pubkey': '-----BEGIN RSA PRIVATE KEY-----\nMIGMAgEAAoGBANsAFcsPHdx1cEyChNljSHDp16vp9GjJBhOhD5/1jiaD8qfQgbcx\nIlMDGOROKJqeNCIk5yuuv46O4obai6MXCfGPnLCvBL7IeI95tImJt0NFg19wHe+I\nwDOabHRJCfSXYViuBDBJUuuMITLmK2cBIlY/lkPKYROXq9FMtht9dekzAgMBAAE=\n-----END RSA PRIVATE KEY-----\n', -// 'wrapperurl': 'local', -// 'disabled': None, -// 'userlist': None, -// 'hrn': 'tokyobranchty', -// 'type': 'SA', -// 'pointer': 10242, -// 'uuid': None}} -// - - - - } - - jLabel33.setText(result); - - }//GEN-LAST:event_jButton1MouseReleased - - private void jComboBox2ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jComboBox2ItemStateChanged -// TODO add your handling code here: - - int selected = jComboBox2.getSelectedIndex(); - if (selected == 1){ - jPanel5.setVisible(true); - jPanel6.setVisible(false); - jPanel7.setVisible(false); - jPanel2.setVisible(false); - } - else if (selected == 2){ - jPanel7.setVisible(true); - jPanel5.setVisible(false); - jPanel6.setVisible(false); - jPanel2.setVisible(false); - } - else if (selected == 3){ - jPanel2.setVisible(true); - jPanel5.setVisible(false); - jPanel6.setVisible(false); - jPanel7.setVisible(false); - } - else if (selected == 4 || selected == 5){ - jPanel6.setVisible(true); - jPanel5.setVisible(false); - jPanel7.setVisible(false); - jPanel2.setVisible(false); - } - }//GEN-LAST:event_jComboBox2ItemStateChanged - - private void jToggleButton9MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jToggleButton9MouseReleased -// TODO add your handling code here: - jToggleButton6.setSelected(false); - jToggleButton7.setSelected(false); - jToggleButton8.setSelected(false); - if (!jToggleButton9.isSelected()) - jToggleButton9.setSelected(true); - - jLabel31.setVisible(false); - jTextField20.setVisible(false); - }//GEN-LAST:event_jToggleButton9MouseReleased - - private void jToggleButton8MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jToggleButton8MouseReleased -// TODO add your handling code here: - jToggleButton6.setSelected(false); - jToggleButton7.setSelected(false); - jToggleButton9.setSelected(false); - if (!jToggleButton8.isSelected()) - jToggleButton8.setSelected(true); - - jLabel31.setVisible(true); - jTextField20.setVisible(true); - - }//GEN-LAST:event_jToggleButton8MouseReleased - - private void jToggleButton7MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jToggleButton7MouseReleased -// TODO add your handling code here: - jToggleButton6.setSelected(false); - jToggleButton8.setSelected(false); - jToggleButton9.setSelected(false); - if (!jToggleButton7.isSelected()) - jToggleButton7.setSelected(true); - - jLabel31.setVisible(false); - jTextField20.setVisible(false); - }//GEN-LAST:event_jToggleButton7MouseReleased - - private void jToggleButton6MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jToggleButton6MouseReleased -// TODO add your handling code here: - jToggleButton7.setSelected(false); - jToggleButton8.setSelected(false); - jToggleButton9.setSelected(false); - if (!jToggleButton6.isSelected()) - jToggleButton6.setSelected(true); - - jLabel31.setVisible(true); - jTextField20.setVisible(true); - - }//GEN-LAST:event_jToggleButton6MouseReleased - - private void jPanel1MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel1MouseReleased -// TODO add your handling code here: - - }//GEN-LAST:event_jPanel1MouseReleased - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new NewJFrame().setVisible(true); - } - }); - } - - //global for communicating the shell - private BufferedWriter outCommand = null; - private Runtime rtime = null; - private Process child = null; - - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton jButton1; - private javax.swing.JComboBox jComboBox1; - private javax.swing.JComboBox jComboBox2; - private javax.swing.JComboBox jComboBox3; - private javax.swing.JComboBox jComboBox4; - private javax.swing.JComboBox jComboBox5; - private javax.swing.JInternalFrame jInternalFrame1; - private javax.swing.JLabel jLabel1; - private javax.swing.JLabel jLabel10; - private javax.swing.JLabel jLabel11; - private javax.swing.JLabel jLabel12; - private javax.swing.JLabel jLabel13; - private javax.swing.JLabel jLabel14; - private javax.swing.JLabel jLabel15; - private javax.swing.JLabel jLabel16; - private javax.swing.JLabel jLabel17; - private javax.swing.JLabel jLabel18; - private javax.swing.JLabel jLabel19; - private javax.swing.JLabel jLabel2; - private javax.swing.JLabel jLabel20; - private javax.swing.JLabel jLabel21; - private javax.swing.JLabel jLabel22; - private javax.swing.JLabel jLabel23; - private javax.swing.JLabel jLabel24; - private javax.swing.JLabel jLabel25; - private javax.swing.JLabel jLabel26; - private javax.swing.JLabel jLabel27; - private javax.swing.JLabel jLabel28; - private javax.swing.JLabel jLabel29; - private javax.swing.JLabel jLabel3; - private javax.swing.JLabel jLabel30; - private javax.swing.JLabel jLabel31; - private javax.swing.JLabel jLabel32; - private javax.swing.JLabel jLabel33; - private javax.swing.JLabel jLabel4; - private javax.swing.JLabel jLabel5; - private javax.swing.JLabel jLabel6; - private javax.swing.JLabel jLabel7; - private javax.swing.JLabel jLabel8; - private javax.swing.JLabel jLabel9; - private javax.swing.JPanel jPanel1; - private javax.swing.JPanel jPanel2; - private javax.swing.JPanel jPanel3; - private javax.swing.JPanel jPanel4; - private javax.swing.JPanel jPanel5; - private javax.swing.JPanel jPanel6; - private javax.swing.JPanel jPanel7; - private javax.swing.JScrollPane jScrollPane1; - private javax.swing.JScrollPane jScrollPane2; - private javax.swing.JTextArea jTextArea1; - private javax.swing.JTextArea jTextArea2; - private javax.swing.JTextField jTextField1; - private javax.swing.JTextField jTextField10; - private javax.swing.JTextField jTextField11; - private javax.swing.JTextField jTextField12; - private javax.swing.JTextField jTextField13; - private javax.swing.JTextField jTextField14; - private javax.swing.JTextField jTextField15; - private javax.swing.JTextField jTextField16; - private javax.swing.JTextField jTextField17; - private javax.swing.JTextField jTextField18; - private javax.swing.JTextField jTextField19; - private javax.swing.JTextField jTextField2; - private javax.swing.JTextField jTextField20; - private javax.swing.JTextField jTextField21; - private javax.swing.JTextField jTextField22; - private javax.swing.JTextField jTextField23; - private javax.swing.JTextField jTextField24; - private javax.swing.JTextField jTextField25; - private javax.swing.JTextField jTextField3; - private javax.swing.JTextField jTextField4; - private javax.swing.JTextField jTextField5; - private javax.swing.JTextField jTextField6; - private javax.swing.JTextField jTextField7; - private javax.swing.JTextField jTextField8; - private javax.swing.JTextField jTextField9; - private javax.swing.JToggleButton jToggleButton6; - private javax.swing.JToggleButton jToggleButton7; - private javax.swing.JToggleButton jToggleButton8; - private javax.swing.JToggleButton jToggleButton9; - // End of variables declaration//GEN-END:variables - -}