#NEWLINE# def main( ) : #NEWLINE# #INDENT# global content , hosts , hostPgDict #NEWLINE# ( host , user , password ) = GetArgs ( ) #NEWLINE# serviceInstance = SmartConnect ( host = host , user = user , pwd = password , port = 443 ) #NEWLINE# atexit . register ( Disconnect , serviceInstance ) #NEWLINE# content = serviceInstance . RetrieveContent ( ) #NEWLINE# hosts = GetVMHosts ( content ) #NEWLINE# hostPgDict = GetHostsPortgroups ( hosts ) #NEWLINE# vms = GetVMs ( content ) #NEWLINE# for vm in vms : #NEWLINE# #INDENT# PrintVmInfo ( vm )