Skip to content

Instantly share code, notes, and snippets.

@diamondap
Created June 10, 2016 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diamondap/9c5a04f546f8b72b29187b77e17b23e1 to your computer and use it in GitHub Desktop.
Save diamondap/9c5a04f546f8b72b29187b77e17b23e1 to your computer and use it in GitHub Desktop.
After copying a bag (via rsync) from the ingest node, I send this to the node that asked me to replicate:
PUT http://localhost:3003/api-v1/replicate/30000000-0000-4000-a000-000000000001/
{
"from_node": "hathi",
"to_node": "aptrust",
"uuid": "00000000-0000-4000-a000-000000000003",
"replication_id": "30000000-0000-4000-a000-000000000001",
"fixity_algorithm": "sha256",
"fixity_nonce": null,
"fixity_value": "6b0c77595fa6209c6afbf5851cb76160c8b0ae0e3cb06238b1b316c31200c7a6",
"fixity_accept": false,
"bag_valid": true,
"status": "received",
"protocol": "rsync",
"link": "/Users/apd4n/dpn/dpn-server/test/fixtures/integration/testbags/00000000-0000-4000-a000-000000000003.tar",
"created_at": "2015-09-15T19:38:31Z",
"updated_at": "2016-06-10T14:41:55Z"
}
After I have stored the bag, I send this back to the ingest node.
PUT http://localhost:3005/api-v1/replicate/50000000-0000-4000-a000-000000000019/
{
"from_node": "tdr",
"to_node": "aptrust",
"uuid": "00000000-0000-4000-a000-000000000005",
"replication_id": "50000000-0000-4000-a000-000000000019",
"fixity_algorithm": "sha256",
"fixity_nonce": null,
"fixity_value": "d2d13ae37a9d54e5341a7a8c7782228a20af761d5c6ffe7a71680f84ea17f4a7",
"fixity_accept": true,
"bag_valid": true,
"status": "stored",
"protocol": "rsync",
"link": "/Users/apd4n/dpn/dpn-server/test/fixtures/integration/testbags/00000000-0000-4000-a000-000000000005.tar",
"created_at": "2015-09-15T19:38:31Z",
"updated_at": "2016-06-10T14:41:56Z"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment