From 267f59ccddfda2eb374c4982d812ce8c8b6346f3 Mon Sep 17 00:00:00 2001 From: Victoria McDonald Date: Tue, 4 Jun 2024 17:28:03 -0700 Subject: [PATCH] revert shortname and change collection ref to save cnm & cnm-r in same location --- bignbit/handle_gitc_response.py | 2 +- bignbit/save_cnm_message.py | 2 +- bignbit/send_to_gitc.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bignbit/handle_gitc_response.py b/bignbit/handle_gitc_response.py index f9b85c5..ce9a79c 100644 --- a/bignbit/handle_gitc_response.py +++ b/bignbit/handle_gitc_response.py @@ -33,7 +33,7 @@ def handler(event, _): for message in event["Records"]: message_body = loads(message["body"]) gitc_id = message_body["identifier"] - collection_name = message_body["shortname"] + collection_name = message_body["collection"] cmr_env = os.environ['CMR_ENVIRONMENT'] granule_concept_id = gitc_id[-19:] diff --git a/bignbit/save_cnm_message.py b/bignbit/save_cnm_message.py index 9e4f8f4..c926992 100644 --- a/bignbit/save_cnm_message.py +++ b/bignbit/save_cnm_message.py @@ -32,10 +32,10 @@ def process(self): pobit_audit_bucket = self.config['pobit_audit_bucket'] pobit_audit_path = self.config['pobit_audit_path'] - collection_name = self.config['collection'] granule_ur = self.config['granule_ur'] cnm_content = self.config['cnm'] + collection_name = cnm_content['collection'] cnm_key_name = pobit_audit_path + "/" + collection_name + "/" + granule_ur + "." + cnm_content['submissionTime'] + "." + "cnm.json" diff --git a/bignbit/send_to_gitc.py b/bignbit/send_to_gitc.py index cc47749..4e3f42e 100644 --- a/bignbit/send_to_gitc.py +++ b/bignbit/send_to_gitc.py @@ -129,7 +129,6 @@ def construct_cnm(image_set: ImageSet, cmr_provider: str, gitc_id: str, collecti "version": "1.5.1", "duplicationid": image_set.name, "collection": new_collection, - "shortname": collection_name, "submissionTime": submission_time, "identifier": gitc_id, "product": product,