#NEWLINE# def _prepare_create_root_device_mocks( self , use_cow_images , vhd_format , vhd_size ) : #NEWLINE# #INDENT# mock_instance = fake_instance . fake_instance_obj ( self . context ) #NEWLINE# mock_instance . root_gb = self . FAKE_SIZE #NEWLINE# self . flags ( use_cow_images = use_cow_images ) #NEWLINE# self . _vmops . _vhdutils . get_vhd_info . return_value = { #NEWLINE# #INDENT# 'VirtualSize' : ( get_size * units . Gi ) , #NEWLINE# #UNINDENT# } #NEWLINE# self . _vmops . _vhdutils . get_vhd_format . return_value = vhd_format #NEWLINE# root_vhd_internal_size = ( mock_instance . root_gb * units . Gi ) #NEWLINE# get_size = self . _vmops . _vhdutils . get_internal_vhd_size_by_file_size #NEWLINE# get_size . return_value = root_vhd_internal_size #NEWLINE# self . _vmops . _pathutils . exists . return_value = True #NEWLINE# return mock_instance