1
# Drop existing bundles as they have not been run through charm-proof.
3
from pyelasticsearch.exceptions import (
4
ElasticHttpNotFoundError,
7
def upgrade(db, index_client):
8
"""Complete this function with work to be done for the migration/update.
10
db is the pymongo db instance for our datastore. Charms are in db.charms
14
# Remove all bundles from elasticsearch.
15
for bundle_data in db.bundles.find():
17
index_client.delete_bundle(bundle_data)
18
except ElasticHttpNotFoundError as e:
21
# Drop all bundles from mongo.