#NEWLINE# def get_size( vm_ ) : #NEWLINE# #INDENT# "\n    Return the VM's size object\n    " #NEWLINE# vm_size = config . get_cloud_config_value ( 'size' , vm_ , __opts__ ) #NEWLINE# sizes = avail_sizes ( ) #NEWLINE# if ( not vm_size ) : #NEWLINE# #INDENT# return sizes [ 0 ] #NEWLINE# #UNINDENT# for size in sizes : #NEWLINE# #INDENT# if ( vm_size and ( str ( vm_size ) in ( str ( sizes [ size ] [ 'id' ] ) , str ( size ) ) ) ) : #NEWLINE# #INDENT# return sizes [ size ] #NEWLINE# #UNINDENT# #UNINDENT# raise SaltCloudNotFound ( "The specified size, '{0}', could not be found." . format ( vm_size ) )