Beispiel #1
0
 def pbs_service(self, rack_name=None):
     config = cm_config()
     username = config.get("cloudmesh.hpc.username")
     pbs = PBS(username, "india.futuregrid.org")
     dict_pbs_info = pbs.pbsnodes()
     dict_data = {}
     inventory = Inventory()
     racks = inventory.get_clusters()
     for rack in racks:
         rack_name = rack["cm_cluster"]
         dict_data[rack_name] = {}
         hosts = rack["cm_value"]
         for host in hosts:
             (hid, hlabel) = inventory.get_host_id_label(host, "public")
             utype = "unknown"
             if hlabel in dict_pbs_info:
                 server = dict_pbs_info[hlabel]
                 if "note" in server.keys():
                     note_value = server["note"]
                     # to compatible with the future change
                     if type(note_value) is dict:
                         utype = note_value["service"]
                     else:   # currently is a literal string for note
                         utype = note_value
             dict_data[rack_name][hid] = utype
     return dict_data
Beispiel #2
0
 def fetch_pbs_nodes_info(self):
     pbs = PBS(self.username, self.hostname)
     self.pbs_nodes_info = pbs.pbsnodes()
Beispiel #3
0
 def fetch_pbs_nodes_info(self):
     pbs = PBS(self.username, self.hostname)
     self.pbs_nodes_info = pbs.pbsnodes()
Beispiel #4
0
 def fetch_pbs_nodes_info(self):
     '''
     fetches the pbs_nodes information from the remote computer
     '''
     pbs = PBS(self.username, self.hostname)
     self.pbs_nodes_info = pbs.pbsnodes()