Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def send_to_daac_internal(self, uds_cnm_json: dict):
},
"identifier": uds_cnm_json['identifier'],
"submissionTime": f'{TimeUtils.get_current_time()}Z',
"provider": granule_identifier.tenant,
"provider": daac_config['daac_provider'] if 'daac_provider' in daac_config else granule_identifier.tenant,
"version": "1.6.0", # TODO this is hardcoded?
"product": {
"name": granule_identifier.granule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ class GranulesIndexMapping:
"daac_data_version": {
"type": "keyword"
},
"daac_provider": {
"type": "keyword"
},
"daac_role_arn": {
"type": "keyword"
},
Expand Down
2 changes: 2 additions & 0 deletions cumulus_lambda_functions/lib/uds_db/archive_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class UdsArchiveConfigIndex:
'collection', 'ss_username', 'archiving_types'],
'properties': {
'daac_collection_id': {'type': 'string'},
'daac_provider': {'type': 'string'},
'daac_sns_topic_arn': {'type': 'string'},
'daac_data_version': {'type': 'string'},
'daac_role_arn': {'type': 'string'},
Expand All @@ -36,6 +37,7 @@ class UdsArchiveConfigIndex:
'collection', 'ss_username', 'archiving_types'],
'properties': {
'daac_collection_name': {'type': 'string'},
'daac_provider': {'type': 'string'},
'daac_sns_topic_arn': {'type': 'string'},
'daac_data_version': {'type': 'string'},
'daac_role_arn': {'type': 'string'},
Expand Down
4 changes: 3 additions & 1 deletion cumulus_lambda_functions/uds_api/dapa/daac_archive_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class ArchivingTypesModel(BaseModel):

class DaacUpdateModel(BaseModel):
daac_collection_id: str
daac_provider: Optional[str] = None
daac_data_version: Optional[str] = None
daac_sns_topic_arn: Optional[str] = None
daac_role_arn: Optional[str] = None
Expand All @@ -26,6 +27,7 @@ class DaacUpdateModel(BaseModel):

class DaacAddModel(BaseModel):
daac_collection_id: str
daac_provider: Optional[str] = None
daac_data_version: str
daac_sns_topic_arn: str
daac_role_arn: str
Expand Down Expand Up @@ -104,7 +106,7 @@ def add_new_config(self):
}

ingesting_dict = {
**self.__request_body,
**{k: v for k, v in self.__request_body.items() if v is not None},
'ss_username': self.__authorization_info['username'],
'collection': self.__collection_id,
}
Expand Down
Loading