diff --git a/docs/connection.rst b/docs/connection.rst index 1a5c9288fb05cf289794698fd561952d7f0e1254..71ace16f67efa11c3a9d309812a18a15eba464c4 100644 --- a/docs/connection.rst +++ b/docs/connection.rst @@ -12,7 +12,12 @@ backend to be used. Currently this can be: - s3 - azure - gs + - sd - azureSAS + - file + +If the file protocol scheme is used the rest of the path will be decoded according to url encoding, however +if OpenVDS fails to recognise the protocol of a url it will treat the url as a local file. For ``s3`` and ``gs`` the ``resource`` will be the bucket while for ``azure`` the ``resource`` will be the container. ``azureSAS`` will treat ``resource/sub_path`` as the baseURL @@ -54,6 +59,13 @@ https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connecti - SignedUrl (Possible values: True, Yes, On, False, No, Off. Default value: False, No, Off) The Token is the OAuth2 token. +``sd`` will accept the following keys + + - sdauthorityurl + - sdapikey + - sdtoken + - loglevel + ``azureSAS`` will accept the following keys - Suffix @@ -75,7 +87,12 @@ Azure:: GS:: url = "gs://my_bucket/somepath" - connection = "Token=ya29.c.Ko8B3wcAmfbKdqtd9OeEA4pod000u-KFdpFOiXx3S3wQK2WV-DL7oO3dAdCVTGyldJClv-4JIvUtdgFdzeYzzeNv1tG8aGXn_jjZLZkMAThV_0gYGnO2HBUwaqYeNMPlBa9RX4yEPRe4RZiAHk3Btkb29yfLyEJBkx321ntr00lhmAJksqli7igD1xBPlpeK3F0" + connection = "Token=some_token" + +SD:: + + url = "sd://tenent/subprojet/subfolder" + connection = "sdauthorityurl=https://some_osdu.instance.com/seistore-svc/api/v3;sdapikey=ABC;sdtoken=some_token" AzureSAS:: diff --git a/examples/SliceServer/sliceserver.py b/examples/SliceServer/sliceserver.py index 59cc68aff7e5048f84787e8ffe1a88d3c1e41b05..7cc36838130af0ab83d6e17f17c3a8c66cd61ba2 100644 --- a/examples/SliceServer/sliceserver.py +++ b/examples/SliceServer/sliceserver.py @@ -14,8 +14,8 @@ from PIL import Image VDSs = {} parser = argparse.ArgumentParser(description="Starts a service that creates png images of the slices of a VDS.") -parser.add_argument("--url", help="The AWS bucket of the VDSs to start serving") -parser.add_argument("--connection", help="The Azure Blob Storage connection string."); +parser.add_argument("--url", help="The url of the VDSs to start serving") +parser.add_argument("--connection", help="The connection string for the url.") parser.add_argument("--key", help="The key of the VDSs to start serving") parser.add_argument("--allow-remote", action='store_true', help="Allow remote connections to server.") diff --git a/src/OpenVDS/OpenVDS.cpp b/src/OpenVDS/OpenVDS.cpp index 21013982e3f143ababf3c504400f043532e68969..3f3575185eb7c327ddd96d1836aae8d16d442eba 100644 --- a/src/OpenVDS/OpenVDS.cpp +++ b/src/OpenVDS/OpenVDS.cpp @@ -432,9 +432,7 @@ OpenOptions* CreateOpenOptions(StringWrapper url, StringWrapper connectionString if (!openOptions) { - error.code = -1; - error.string = fmt::format("Unknown url scheme for {}.", std::string(url.data, url.data + url.size)); - return nullptr; + openOptions.reset(new VDSFileOpenOptions(std::string(url.data, url.size))); } return openOptions.release(); diff --git a/tests/python/VolumeDataAccessor.py b/tests/python/VolumeDataAccessor.py index 7cabc0f39865c36acbddd2e0413e1e95b559ec26..3421324973807bb2abe788c7d0f4e699cd624100 100644 --- a/tests/python/VolumeDataAccessor.py +++ b/tests/python/VolumeDataAccessor.py @@ -8,6 +8,9 @@ if not TEST_URL: handle = openvds.open(TEST_URL, TEST_CONNECTION) acc = openvds.VolumeDataAccessManager(handle) r = acc.requestVolumeSubset((0,0,0),(100,100,100)) +r.waitForCompletion() accessor = acc.createVolumeData3DReadAccessorR32(openvds.DimensionsND.Dimensions_012) v = accessor.getValue((100,100,100)) + +openvds.close(handle)