#NEWLINE# def get_os_by_image_meta( self , os_release ) : #NEWLINE# #INDENT# LOG . debug ( '--- Getting operating system data by image metadata ---' ) #NEWLINE# if os_release : #NEWLINE# #INDENT# LOG . debug ( 'Looks like {0} is going to be provisioned' . format ( OS ) ) #NEWLINE# try : #NEWLINE# #INDENT# OS = getattr ( objects , os_release [ 'name' ] ) #NEWLINE# os = OS ( repos = None , packages = None , major = os_release [ 'major' ] , minor = os_release [ 'minor' ] ) #NEWLINE# return os #NEWLINE# #UNINDENT# except ( AttributeError , KeyError ) : #NEWLINE# #INDENT# LOG . warning ( 'Cannot guess operating system release from image metadata' )