#NEWLINE# def _upload_object_manifest( self , container , object_name , extra = None , verify_hash = True ) : #NEWLINE# #INDENT# extra = ( extra or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# meta_data = extra . get ( 'meta_data' ) #NEWLINE# container_name_encoded = self . _encode_container_name ( container . name ) #NEWLINE# object_name_encoded = self . _encode_object_name ( object_name ) #NEWLINE# request_path = ( '/%s/%s' % ( container_name_encoded , object_name_encoded ) ) #NEWLINE# headers = { #NEWLINE# #INDENT# 'X-Auth-Token' : self . connection . auth_token , #NEWLINE# 'X-Object-Manifest' : ( '%s/%s/' % ( container_name_encoded , object_name_encoded ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# data = '' #NEWLINE# response = self . connection . request ( request_path , method = 'PUT' , data = data , headers = headers , raw = True ) #NEWLINE# object_hash = None #NEWLINE# if verify_hash : #NEWLINE# #INDENT# hash_function = self . _get_hash_function ( ) #NEWLINE# hash_function . update ( b ( data ) ) #NEWLINE# data_hash = hash_function . hexdigest ( ) #NEWLINE# object_hash = response . headers . get ( 'etag' ) #NEWLINE# if ( object_hash != data_hash ) : #NEWLINE# #INDENT# raise ObjectHashMismatchError ( value = ( ( 'MD5 hash checksum does not match (expected=%s, ' + 'actual=%s)' ) % ( data_hash , response ) ) , object_name = object_name , driver = self ) #NEWLINE# #UNINDENT# #UNINDENT# obj = Object ( name = object_name , size = 0 , hash = object_hash , extra = None , meta_data = meta_data , container = container , driver = self ) #NEWLINE# return obj