#NEWLINE# def run( self , vms ) : #NEWLINE# #INDENT# meta_url_template = 'https://{host}:{port}/vsphere-client/vmrc/vmrc.jsp?vm=urn:vmomi:VirtualMachine:{{vm}}:{si_uuid}' #NEWLINE# si_content = self . si . RetrieveContent ( ) #NEWLINE# si_uuid = si_content . about . instanceUuid #NEWLINE# host = self . config [ 'host' ] #NEWLINE# port = self . config [ 'port' ] #NEWLINE# vm_url_template = meta_url_template . format ( host = host , port = port , si_uuid = si_uuid ) #NEWLINE# vm_moids = vms #NEWLINE# vms_console_urls = [ { #NEWLINE# #INDENT# moid : { #NEWLINE# #INDENT# 'url' : vm_url_template . format ( vm = moid ) , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } for moid in vm_moids ] #NEWLINE# return vms_console_urls