annotated_manifest = gemini_util.addNodeLocation(my_manager["manifest_dom"],my_manager["manifest_version"],my_manager["urn"],my_manager["node_location_array"],LOGFILE,debug) gemini_util.copy_manifest_to_MC(annotated_manifest,my_manager["GN_sliver_urn"],username,LOGFILE,keyfile,debug ) gemini_util.send_to_instools_portal(my_manager["GN_sliver_urn"],username,crypt_passwd,password,email_id,my_manager["urn"],my_manager["hrn"],SLICENAME,CERT_ISSUER,LOGFILE,keyfile,debug) gemini_util.update_Drupaladmin_acctinfo(my_manager["GN_sliver_urn"],username,dp_username,dp_passwd,LOGFILE,keyfile,debug) rval = gemini_util.setupkeys (my_manager["nodes_sliver_urn"],username,my_manager["GN_sliver_urn"],my_manager["GN_isVirtual"], debug, LOGFILE,keyfile) gemini_util.startStatscollection(my_manager["urn"],my_manager["hrn"],SLICEURN,USERURN,my_manager["GN_sliver_urn"],username,LOGFILE,keyfile,debug ) gemini_util.do_netflow_stuff(my_manager["GN_sliver_urn"],'init',username,LOGFILE,keyfile,debug) # gemini_util.do_netflow_stuff(my_manager["GN_sliver_urn"],'start',username,LOGFILE,keyfile,debug) # gemini_util.check_netflow_data_generated(my_manager["GN_sliver_urn"],username,LOGFILE,keyfile,debug) gemini_util.send_polldata_file(my_manager["GN_sliver_urn"],username,crypt_passwd,LOGFILE,keyfile,debug) gemini_util.vnc_passwd_create(my_manager["nodes_sliver_urn"],my_manager["GN_sliver_urn"],username,LOGFILE,keyfile,debug) gemini_util.drupal_account_create(my_manager["GN_sliver_urn"],username,password,email_id,dp_username,dp_passwd,LOGFILE,keyfile,debug) #Do all active measurement stuff gemini_util.install_Active_measurements(my_manager["nodes_sliver_urn"],my_manager["GN_sliver_urn"],username,USERURN,SLICEURN,my_manager["LAMPCERT"],LOGFILE,keyfile,debug) gemini_util.initialize_Drupal_menu(my_manager["GN_sliver_urn"],username,SLICENAME,dp_username,dp_passwd,LOGFILE,keyfile,debug) # Unlock the GN (status,msg) = gemini_util.lock_unlock_MC(my_manager["GN_sliver_urn"],"unlock",username,LOGFILE,keyfile,debug) gemini_util.write_to_log(LOGFILE,msg,gemini_util.printtoscreen,debug) pass if(len(managers_to_monitor) > 0): msg = "Drupal passwd for admin is "+dp_passwd gemini_util.write_to_log(LOGFILE,msg,gemini_util.dontprinttoscreen,debug) # Provide user information needed to login to GEMINI PORTAL
msg = "Installing and configuring MP Nodes for Passive Measurements" gemini_util.write_to_log(LOGFILE,msg,gemini_util.printtoscreen,debug) gemini_util.InstallMP_Passive (pruned_MP_Nodes,pruned_GN_Nodes[0],debug,LOGFILE,keyfile) msg = "Starting Passive Measurements Data Collection for MP Nodes" gemini_util.write_to_log(LOGFILE,msg,gemini_util.printtoscreen,debug) (status,msg) = gemini_util.startStatscollection(pruned_GN_Nodes[0],LOGFILE,keyfile,debug ) if(not status): msg = msg + "\nERROR @ {"+my_manager+"} :: Problem starting Passive measurement data collection\nYour Gemini configuration will not work\nPlease abort and contact GEMINI Dev Team for help\n" gemini_util.write_to_log(LOGFILE,msg,gemini_util.printtoscreen,debug) sys.exit(1) gemini_util.do_netflow_stuff(pruned_GN_Nodes[0],'init',LOGFILE,keyfile,debug) gemini_util.do_netflow_stuff(pruned_GN_Nodes[0],'start',LOGFILE,keyfile,debug) gemini_util.vnc_passwd_create(pruned_MP_Nodes,pruned_GN_Nodes[0],LOGFILE,keyfile,debug) gemini_util.drupal_account_create(pruned_GN_Nodes[0],LOGFILE,keyfile,debug) # msg = "Installing and configuring MP Nodes for Active Measurements" # gemini_util.write_to_log(LOGFILE,msg,gemini_util.printtoscreen,debug) # gemini_util.install_Active_measurements(pruned_MP_Nodes,pruned_GN_Nodes[0],USERURN,SLICEURN,LAMPCERT,LOGFILE,keyfile,debug) gemini_util.initialize_Drupal_menu(pruned_GN_Nodes[0],LOGFILE,keyfile,debug) # Unlock the GN (status,msg) = gemini_util.lock_unlock_MC(pruned_GN_Nodes[0],"instrument_unlock",LOGFILE,keyfile,debug) if(not status): msg = msg + "\nERROR @ {"+my_manager+"} :: Problem unlocking\nYour Gemini configuration will not work\nPlease abort and contact GEMINI Dev Team for help\n" gemini_util.write_to_log(LOGFILE,msg,gemini_util.printtoscreen,debug) sys.exit(1)
def InstrumentizeProcess(my_manager,pruned_GN_Nodes,pruned_MP_Nodes,pKey,gn_ms_proxycert_file,gn_ms_proxykey_file,mp_blipp_proxycert_file,mp_blipp_proxykey_file,USERURN,email_id,SLICEURN,slice_uuid,unis_topo,q): # This lock will also install sftware needed for Passive measurements on GN which cannot be done in parallel # with any other operations (status,msg) = gemini_util.lock_unlock_MC(pruned_GN_Nodes[0],"install_lock",pKey) if(not status): msg = msg + "\nConfiguring next AM if available" gemini_util.write_to_log(msg,gemini_util.printtoscreen) q.put("done_flag") return else: gemini_util.write_to_log(msg,gemini_util.printtoscreen) # This lock will just set a flag on the GN to indicate the beginning of the configuration process (status,msg) = gemini_util.lock_unlock_MC(pruned_GN_Nodes[0],"instrument_lock",pKey) if(not status): msg = msg + "\nConfiguring next AM if available" gemini_util.write_to_log(msg,gemini_util.printtoscreen) q.put("done_flag") else: gemini_util.write_to_log(msg,gemini_util.printtoscreen) (status,msg) = gemini_util.update_Drupaladmin_acctinfo(pruned_GN_Nodes[0],pKey) if(not status): msg = msg + "\nERROR @ {"+my_manager+"} :: Problem updating Drupal Admin AccInfo\nYour Gemini configuration will not work\nPlease abort and contact GEMINI Dev Team for help\n" gemini_util.write_to_log(msg,gemini_util.printtoscreen) sys.exit(1) msg = "Installing and configuring MP Nodes for Passive Measurements at "+my_manager gemini_util.write_to_log(msg,gemini_util.printtoscreen) gemini_util.InstallMP_Passive (pruned_MP_Nodes,pruned_GN_Nodes[0],pKey) msg = "Starting Passive Measurements Data Collection for MP Nodes at "+my_manager gemini_util.write_to_log(msg,gemini_util.printtoscreen) (status,msg) = gemini_util.startStatscollection(pruned_GN_Nodes[0],pKey) if(not status): msg = msg + "\nERROR @ {"+my_manager+"} :: Problem starting Passive measurement data collection\nYour Gemini configuration will not work\nPlease abort and contact GEMINI Dev Team for help\n" gemini_util.write_to_log(msg,gemini_util.printtoscreen) sys.exit(1) gemini_util.do_netflow_stuff(pruned_GN_Nodes[0],'init',pKey) # gemini_util.do_netflow_stuff(pruned_GN_Nodes[0],'start',keyfile) gemini_util.vnc_passwd_create(pruned_MP_Nodes,pruned_GN_Nodes[0],pKey) gemini_util.drupal_account_create(pruned_GN_Nodes[0],pKey) if(not gemini_util.DISABLE_ACTIVE): msg = "Installing Proxy Certificates for nodes at "+my_manager gemini_util.write_to_log(msg,gemini_util.printtoscreen) gemini_util.install_GN_Certs(pruned_GN_Nodes,pKey,gn_ms_proxycert_file,gn_ms_proxykey_file) gemini_util.install_MP_Certs(pruned_MP_Nodes,pKey,mp_blipp_proxycert_file,mp_blipp_proxykey_file) if(not gemini_util.DISABLE_ACTIVE): msg = "Creating BLiPP service configurations, sending to UNIS for nodes at "+my_manager gemini_util.write_to_log(msg,gemini_util.printtoscreen) gemini_util.createBlippServiceEntries(pruned_MP_Nodes,pruned_GN_Nodes[0],unis_topo[my_manager],slice_uuid) msg = "Installing and configuring MP Nodes for Active Measurements at "+my_manager gemini_util.write_to_log(msg,gemini_util.printtoscreen) #gemini_util.install_Active_measurements(pruned_MP_Nodes,pruned_GN_Nodes[0],USERURN,SLICEURN,slice_uuid,unis_topo[my_manager],LAMPCERT,pKey) gemini_util.install_Active_measurements(pruned_MP_Nodes,pruned_GN_Nodes[0],USERURN,SLICEURN,slice_uuid,unis_topo[my_manager],pKey) gemini_util.initialize_Drupal_menu(pruned_GN_Nodes[0],pKey) # This is just to make sure we have the right user info who instrumented the slice # A scenario here is in case of a shared slice where one user initializes the slice and another instruments it. (result,msg) = gemini_util.dump_Expinfo_on_GN(pruned_GN_Nodes[0],USERURN,email_id,'','','','','','',pKey) # Unlock the GN (status,msg) = gemini_util.lock_unlock_MC(pruned_GN_Nodes[0],"instrument_unlock",pKey) if(not status): msg = msg + "\nERROR @ {"+my_manager+"} :: Problem unlocking\nYour Gemini configuration will not work\nPlease abort and contact GEMINI Dev Team for help\n" gemini_util.write_to_log(msg,gemini_util.printtoscreen) sys.exit(1) return
def InstrumentizeProcess(my_manager, pruned_GN_Nodes, pruned_MP_Nodes, pKey, gn_ms_proxycert_file, gn_ms_proxykey_file, mp_blipp_proxycert_file, mp_blipp_proxykey_file, USERURN, email_id, SLICEURN, slice_uuid, unis_topo, q): # This lock will also install sftware needed for Passive measurements on GN which cannot be done in parallel # with any other operations (status, msg) = gemini_util.lock_unlock_MC(pruned_GN_Nodes[0], "install_lock", pKey) if (not status): msg = msg + "\nConfiguring next AM if available" gemini_util.write_to_log(msg, gemini_util.printtoscreen) q.put("done_flag") return else: gemini_util.write_to_log(msg, gemini_util.printtoscreen) # This lock will just set a flag on the GN to indicate the beginning of the configuration process (status, msg) = gemini_util.lock_unlock_MC(pruned_GN_Nodes[0], "instrument_lock", pKey) if (not status): msg = msg + "\nConfiguring next AM if available" gemini_util.write_to_log(msg, gemini_util.printtoscreen) q.put("done_flag") else: gemini_util.write_to_log(msg, gemini_util.printtoscreen) (status, msg) = gemini_util.update_Drupaladmin_acctinfo(pruned_GN_Nodes[0], pKey) if (not status): msg = msg + "\nERROR @ {" + my_manager + "} :: Problem updating Drupal Admin AccInfo\nYour Gemini configuration will not work\nPlease abort and contact GEMINI Dev Team for help\n" gemini_util.write_to_log(msg, gemini_util.printtoscreen) sys.exit(1) msg = "Installing and configuring MP Nodes for Passive Measurements at " + my_manager gemini_util.write_to_log(msg, gemini_util.printtoscreen) gemini_util.InstallMP_Passive(pruned_MP_Nodes, pruned_GN_Nodes[0], pKey) msg = "Starting Passive Measurements Data Collection for MP Nodes at " + my_manager gemini_util.write_to_log(msg, gemini_util.printtoscreen) (status, msg) = gemini_util.startStatscollection(pruned_GN_Nodes[0], pKey) if (not status): msg = msg + "\nERROR @ {" + my_manager + "} :: Problem starting Passive measurement data collection\nYour Gemini configuration will not work\nPlease abort and contact GEMINI Dev Team for help\n" gemini_util.write_to_log(msg, gemini_util.printtoscreen) sys.exit(1) gemini_util.do_netflow_stuff(pruned_GN_Nodes[0], 'init', pKey) # gemini_util.do_netflow_stuff(pruned_GN_Nodes[0],'start',keyfile) gemini_util.vnc_passwd_create(pruned_MP_Nodes, pruned_GN_Nodes[0], pKey) gemini_util.drupal_account_create(pruned_GN_Nodes[0], pKey) if (not gemini_util.DISABLE_ACTIVE): msg = "Installing Proxy Certificates for nodes at " + my_manager gemini_util.write_to_log(msg, gemini_util.printtoscreen) gemini_util.install_GN_Certs(pruned_GN_Nodes, pKey, gn_ms_proxycert_file, gn_ms_proxykey_file) gemini_util.install_MP_Certs(pruned_MP_Nodes, pKey, mp_blipp_proxycert_file, mp_blipp_proxykey_file) if (not gemini_util.DISABLE_ACTIVE): msg = "Creating BLiPP service configurations, sending to UNIS for nodes at " + my_manager gemini_util.write_to_log(msg, gemini_util.printtoscreen) gemini_util.createBlippServiceEntries(pruned_MP_Nodes, pruned_GN_Nodes[0], unis_topo[my_manager], slice_uuid) msg = "Installing and configuring MP Nodes for Active Measurements at " + my_manager gemini_util.write_to_log(msg, gemini_util.printtoscreen) #gemini_util.install_Active_measurements(pruned_MP_Nodes,pruned_GN_Nodes[0],USERURN,SLICEURN,slice_uuid,unis_topo[my_manager],LAMPCERT,pKey) gemini_util.install_Active_measurements(pruned_MP_Nodes, pruned_GN_Nodes[0], USERURN, SLICEURN, slice_uuid, unis_topo[my_manager], pKey) gemini_util.initialize_Drupal_menu(pruned_GN_Nodes[0], pKey) # This is just to make sure we have the right user info who instrumented the slice # A scenario here is in case of a shared slice where one user initializes the slice and another instruments it. (result, msg) = gemini_util.dump_Expinfo_on_GN(pruned_GN_Nodes[0], USERURN, email_id, '', '', '', '', '', '', pKey) # Unlock the GN (status, msg) = gemini_util.lock_unlock_MC(pruned_GN_Nodes[0], "instrument_unlock", pKey) if (not status): msg = msg + "\nERROR @ {" + my_manager + "} :: Problem unlocking\nYour Gemini configuration will not work\nPlease abort and contact GEMINI Dev Team for help\n" gemini_util.write_to_log(msg, gemini_util.printtoscreen) sys.exit(1) return
SLICEURN, USERURN, my_manager["GN_sliver_urn"], username, LOGFILE, keyfile, debug) gemini_util.do_netflow_stuff(my_manager["GN_sliver_urn"], 'init', username, LOGFILE, keyfile, debug) # gemini_util.do_netflow_stuff(my_manager["GN_sliver_urn"],'start',username,LOGFILE,keyfile,debug) # gemini_util.check_netflow_data_generated(my_manager["GN_sliver_urn"],username,LOGFILE,keyfile,debug) gemini_util.send_polldata_file(my_manager["GN_sliver_urn"], username, crypt_passwd, LOGFILE, keyfile, debug) gemini_util.vnc_passwd_create(my_manager["nodes_sliver_urn"], my_manager["GN_sliver_urn"], username, LOGFILE, keyfile, debug) gemini_util.drupal_account_create(my_manager["GN_sliver_urn"], username, password, email_id, dp_username, dp_passwd, LOGFILE, keyfile, debug) #Do all active measurement stuff gemini_util.install_Active_measurements(my_manager["nodes_sliver_urn"], my_manager["GN_sliver_urn"], username, USERURN, SLICEURN, my_manager["LAMPCERT"], LOGFILE, keyfile, debug) gemini_util.initialize_Drupal_menu(my_manager["GN_sliver_urn"], username, SLICENAME, dp_username, dp_passwd, LOGFILE, keyfile, debug) # Unlock the GN (status, msg) = gemini_util.lock_unlock_MC(my_manager["GN_sliver_urn"], "unlock", username, LOGFILE,