Closed jreadey closed 5 years ago
Example:
$ curl -X PUT -u test_user1:test --header "Host: /home/test_user1/test_file" http://192.168.99.100:5101/ {"created": 1505328375.5647395, "root": "g-d26ac838-98b3-11e7-be6a-0242ac110009", "lastModified": 1505328375.5647395, "acls": {"test_user1": {"delete": true, "read": true, "update": true, "create": true, "updateACL": true, "readACL": true}, "default": {"delete": false, "read": true, "update": false, "create": false, "updateACL": false, "readACL": false}}, "owner": "test_user1"}(py35)Cardinal:~ jreadey$ (py35)Cardinal:~ jreadey$ (py35)Cardinal:~ jreadey$ curl -X POST -u test_user1:test --header "Host: /home/test_user1/test_file" --header "Content-Type: application/json" --data "{\"shape\": 10, \"type\": \"H5T_IEEE_F32LE\", \"link\": { \"id\": \"g-d26ac838-98b3-11e7-be6a-0242ac110009\", \"name\": \"new_dset\" } }" http://192.168.1.100:5101/datasets curl: (7) Failed to connect to 192.168.1.100 port 5101: Connection refused (py35)Cardinal:~ jreadey$ curl -X POST -u test_user1:test --header "Host: /home/test_user1/test_file" --header "Content-Type: application/json" --data "{\"shape\": 10, \"type\": \"H5T_IEEE_F32LE\", \"link\": { \"id\": \"g-d26ac838-98b3-11e7-be6a-0242ac110009\", \"name\": \"new_dset\" } }" http://192.168.99.100:5101/datasets {"id": "d-1bc23eee-98b4-11e7-be6a-0242ac110009", "lastModified": 1505328498, "type": {"base": "H5T_IEEE_F32LE", "class": "H5T_FLOAT"}, "created": 1505328498, "root": "g-d26ac838-98b3-11e7-be6a-0242ac110009", "attributeCount": 0, "shape": {"dims": [10], "class": "H5S_SIMPLE"}}(py35)Cardinal:~ jreadey$ (py35)Cardinal:~ jreadey$ hsdel -u test_user1 -p test /home/test_user1/test_file (py35)Cardinal:~ jreadey$ curl -X PUT -u test_user1:test --header "Host: /home/test_user1/test_file" http://192.168.99.100:5101/ {"created": 1505328713.8524508, "root": "g-9c0e7ff4-98b4-11e7-be6a-0242ac110009", "lastModified": 1505328713.8524508, "acls": {"test_user1": {"delete": true, "read": true, "update": true, "create": true, "updateACL": true, "readACL": true}, "default": {"delete": false, "read": true, "update": false, "create": false, "updateACL": false, "readACL": false}}, "owner": "test_user1"}(py35)Cardinal:~ jreadey$ (py35)Cardinal:~ jreadey$ (py35)Cardinal:~ jreadey$ curl -X POST -u test_user1:test --header "Host: /home/test_user1/test_file" --header "Content-Type: application/json" --data "{\"shape\": 10, \"type\": \"H5T_IEEE_F32LE\", \"link\": { \"id\": \"g-9c0e7ff4-98b4-11e7-be6a-0242ac110009\", \"name\": \"new_dset\" } }" http://192.168.99.100:5101/datasets {"id": "d-b5244ba4-98b4-11e7-be6a-0242ac110009", "lastModified": 1505328755, "type": {"base": "H5T_IEEE_F32LE", "class": "H5T_FLOAT"}, "created": 1505328755, "root": "g-d26ac838-98b3-11e7-be6a-0242ac110009", "attributeCount": 0, "shape": {"dims": [10], "class": "H5S_SIMPLE"}}
This is no longer an issue.
Tested with the following cmds:
curl -X PUT -u test_user1:test http://hsds.hdf.test/?domain=/home/test_user1/test_file
curl -X POST -u test_user1:test --header "Content-Type: application/json" --data "{\"shape\": 10, \"type\": \"H5T_IEEE_F32LE\", \"link\": { \"id\": \"g-6c313c54-d7a6a1ab-e4b9-b4dc5f-2e2923\", \"name\": \"new_dset\" } }" http://hsds.hdf.test/datasets?domain=/home/test_user1/test_file
hsrm /home/test_user1/test_file
And then re putting the domain followed by reposting the dataset. The dataset has the root id of the new domain.
This sequence:
Results in the response of the last POST having the root id of the original domain.