nsidc / granule-metgen

Metadata generator for direct-to-Cumulus era
Other
0 stars 0 forks source link

Create template for CNM message in JSON format #39

Closed lisakaser closed 1 week ago

lisakaser commented 1 month ago

1 story point

Acceptance criteria:

Visual inspection of CNM message and JSON format by Amy

juliacollins commented 2 weeks ago

@afitzgerrell I created two template files: one for the "body" of the CNM message which applies to all CNM content for a given collection, and one that can be repeated for the multiple files associated with a collection (including the UMM-G file).

The body content:

{
    "version": "1.5.1",
    "submissionTime": "$submission_time",
    "identifier": "$uuid",
    "collection": "$auth_id",
    "provider": "$provider",
    "product": {
        "name":  "$producer_granule_id",
        "dataVersion": "$version",
        "files": []
    }
}

The files content (repeated for each file):

{
    "name": "$file_name",
    "type": "$file_type",
    "uri": "$staging_uri",
    "checksumType": "$checksum_type",
    "checksum": "$checksum",
    "size": $file_size
}
juliacollins commented 1 week ago

@afitzgerrell a few notes to guide your review:

To update your copy of the code base:

That should do it, but let me know if you're not seeing the expected updates.

afitzgerrell commented 1 week ago

Everything worked and checks out well!