def getServerInfo(pbclient=None, dc_id=None):
if pbclient is None:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if dc_id is None:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>server_info = []<EOL>servers = pbclient.list_servers(dc_id, <NUM_LIT:1>)<EOL>for server in servers['<STR_LIT>']:<EOL><INDENT>props = server['<STR_LIT>']<EOL>info = dict(id=server['<STR_LIT:id>'], name=props['<STR_LIT:name>'],<EOL>state=server['<STR_LIT>']['<STR_LIT:state>'],<EOL>vmstate=props['<STR_LIT>'])<EOL>server_info.append(info)<EOL><DEDENT>return server_info<EOL>
gets info of servers of a data center