<s> from lib . action import PyraxBaseAction <EOL> from lib . formatters import to_server_dict <EOL> __all__ = [ <EOL> '<STR_LIT>' <EOL> ] <EOL> class GetVMInfoAction ( PyraxBaseAction ) : <EOL> def run ( self , vm_id , region = None ) : <EOL> if region : <EOL> cs = self . pyrax . connect_to_cloudservers ( region = region ) <EOL> else : <EOL> cs = self . pyrax . cloudservers <EOL> for server in cs . list ( ) : <EOL> item = to_server_dict ( server = server ) <EOL> if server . id == vm_id : <EOL> return item <EOL> return None </s>
