def _statserver(self, attrib_list=None):
		"""Get the server config from the pbs server"""
		if attrib_list:
			self._list_2_attrib(attrib_list)
		else:
			self.attribs = 'NULL' 
			
		self._connect()
		serverinfo = pbs.pbs_statserver(self.con, self.attribs, 'NULL')
		self._disconnect() 
		
		self._list_2_dict(serverinfo, server)
示例#2
0
    def _statserver(self, attrib_list=None):
        """Get the server config from the pbs server"""
        if attrib_list:
            self._list_2_attrib(attrib_list)
        else:
            self.attribs = 'NULL'

        self._connect()
        serverinfo = pbs.pbs_statserver(self.con, self.attribs, 'NULL')
        self._disconnect()

        self._list_2_dict(serverinfo, server)
示例#3
0
def main():

    pbs_server = pbs.pbs_default()
    if not pbs_server:
        print 'No default server'
        sys.exit(1)

    con = pbs.pbs_connect(pbs_server)

    attr_l = pbs.new_attrl(1)
    attr_l[0].name = 'pbs_version'

    server_info = pbs.pbs_statserver(con, attr_l, 'NULL')
    for entry in server_info:
        print entry.name
        for attrib in entry.attribs:
            print '\t', attrib.name, ' = ', attrib.value
示例#4
0
文件: pbs_version.py 项目: hocks/TSCC
def main():

  pbs_server = pbs.pbs_default()
  if not pbs_server:
    print 'No default server'
    sys.exit(1)

  con = pbs.pbs_connect(pbs_server)

  attr_l = pbs.new_attrl(1)
  attr_l[0].name = 'pbs_version'

  server_info = pbs.pbs_statserver(con, attr_l, 'NULL')
  for entry in server_info:
    print entry.name
    for attrib in entry.attribs:
       print '\t', attrib.name, ' = ', attrib.value