#NEWLINE# def _image_from_req_data( self , data ) : #NEWLINE# #INDENT# 'Get image data from the request or raise appropriate\n        exceptions\n\n        If no image is supplied - checks to see if there is\n        block devices set and proper extesions loaded.\n        ' #NEWLINE# image_ref = data [ 'server' ] . get ( 'imageRef' ) #NEWLINE# bdm = data [ 'server' ] . get ( 'block_device_mapping' ) #NEWLINE# bdm_v2 = data [ 'server' ] . get ( 'block_device_mapping_v2' ) #NEWLINE# if ( ( not image_ref ) and ( ( bdm and self . ext_mgr . is_loaded ( 'os-volumes' ) ) or ( bdm_v2 and self . ext_mgr . is_loaded ( 'os-block-device-mapping-v2-boot' ) ) ) ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# image_href = self . _image_ref_from_req_data ( data ) #NEWLINE# image_uuid = self . _image_uuid_from_href ( image_href ) #NEWLINE# return image_uuid