<s> """<STR_LIT>""" <EOL> import re <EOL> import sys <EOL> from psphere . client import Client <EOL> from psphere . managedobjects import ComputeResource <EOL> client = Client ( ) <EOL> vm_regex = sys . argv [ <NUM_LIT:1> ] <EOL> p = re . compile ( vm_regex ) <EOL> compute_resource = sys . argv [ <NUM_LIT:2> ] <EOL> cr = ComputeResource . get ( client , name = compute_resource ) <EOL> cr . resourcePool . preload ( "<STR_LIT>" , properties = [ "<STR_LIT:name>" ] ) <EOL> for vm in sorted ( cr . resourcePool . vm ) : <EOL> if p . match ( vm . name ) is None : <EOL> continue <EOL> print ( vm . name ) <EOL> client . logout ( ) </s>
