'Delete indexes from the server.
Args:
definitions: Index definitions to delete from datastore.
app_id: The application id.
Returns:
A single datstore_index.IndexDefinitions containing indexes that were
not deleted, probably because they were already removed.  This may
be normal behavior as there is a potential race condition between fetching
the index-diff and sending deletion confirmation through.'

def DoDelete(self, definitions, app_id):

    StatusUpdate('Deleting    selected    index    definitions.', self.error_fh)
    response = self.rpcserver.Send('/api/datastore/index/delete', app_id=app_id, payload=definitions.ToYAML())
    return datastore_index.ParseIndexDefinitions(response)
