#NEWLINE# def does_disk_exist( self , parameters , disk ) : #NEWLINE# #INDENT# ' Queries Google Compute Engine to see if the specified persistent disk\n    exists for this user.\n\n    Args:\n      parameters: A dict with keys for each parameter needed to connect to\n        Google Compute Engine.\n      disk: A str containing the name of the disk that we should check for\n        existence.\n    Returns:\n      True if the named persistent disk exists, and False otherwise.\n    ' #NEWLINE# ( gce_service , credentials ) = self . open_connection ( parameters ) #NEWLINE# try : #NEWLINE# #INDENT# http = httplib2 . Http ( ) #NEWLINE# auth_http = credentials . authorize ( http ) #NEWLINE# request = gce_service . disks ( ) . get ( project = parameters [ self . PARAM_PROJECT ] , disk = disk , zone = parameters [ self . PARAM_ZONE ] ) #NEWLINE# response = request . execute ( http = auth_http ) #NEWLINE# AppScaleLogger . verbose ( str ( response ) , parameters [ http . PARAM_VERBOSE ] ) #NEWLINE# return True #NEWLINE# #UNINDENT# except errors . HttpError : #NEWLINE# #INDENT# return False