Commit e51c232c authored by Diego Molteni's avatar Diego Molteni
Browse files

fixed code structure

parent 1862df87
Pipeline #37188 passed with stage
in 1 minute and 3 seconds
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "os-seimic-store-cpp-lib-container",
// Sets the run context
"context": ".",
// Use pre-created image
// "image": "gcr.io/cds-dev-155819/carrot/brick-server",
"image": "local/sdapi-osdu-centos7-static-deps",
//
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
// Publish ports.
"appPort": [
8050
],
// Uncomment the next line if you want to add in default container specific settings.json values
// "settings": { "workbench.colorTheme": "Quiet Light" },
// Run commands after the container is created.
// "postCreateCommand": "gcc -v",
// "postCreateCommand": "bash automation/vscode-install-dev-tools.sh",
"extensions": [
"ms-vscode.cpptools",
"davidschuldenfrei.gtest-adapter",
"ms-vscode.cmake-tools",
"VisualStudioExptTeam.vscodeintellicode",
"ms-azuretools.vscode-docker"
],
// Add in default container specific settings.json valuesQ
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
}
}
\ No newline at end of file
......@@ -188,11 +188,12 @@ RUN make -j $(nproc) && make install
WORKDIR /tmp
RUN rm -rf azure-storage-cpp
# [azure-sdk-for-cpp]
# new hand-crafted C++ client library for various Azure APIs
# based on libCURL on linux.
# DUO CHECK START
WORKDIR /tmp
RUN git clone https://github.com/Azure/azure-sdk-for-cpp.git azure-sdk-for-cpp && \
cd azure-sdk-for-cpp && \
......@@ -206,8 +207,23 @@ RUN git clone https://github.com/Azure/azure-sdk-for-cpp.git azure-sdk-for-cpp &
cmake --build cmake-out --target install -- -j $(nproc )
WORKDIR /tmp
RUN rm -rf /tmp/azure-sdk-for-cpp
# AZURE_STORAGE_FOR_CPP_VERSION=12.0.0-beta.9
# wget https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-storage-blobs_${AZURE_STORAGE_FOR_CPP_VERSION}.tar.gz \
# && tar -zxvf azure-storage-blobs_${AZURE_STORAGE_FOR_CPP_VERSION}.tar.gz \
# && cd azure-sdk-for-cpp-azure-storage-blobs_${AZURE_STORAGE_FOR_CPP_VERSION} \
# && mkdir build \
# && cd build \
# && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=NO -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON -DBUILD_TRANSPORT_CURL:BOOL=ON .. \
# && make -j $(nproc) \
# && sudo make install \
# && rm -rf azure-sdk-for-cpp-azure-storage-blobs_${AZURE_STORAGE_FOR_CPP_VERSION} \
# && rm -rf azure-storage-blobs_${AZURE_STORAGE_FOR_CPP_VERSION}.tar.gz \
# DUO CHECK END
FROM azure-storage-dev AS aws-dev
ARG AWS_SDK_CPP_RELEASE_TAG=1.8.123
......
......@@ -68,12 +68,12 @@ for i in "$@"; do
cloud_providers="${cloud_providers};azure"
fi
;;
--azure-new-provider)
--azure-curl-provider)
shift
if [ -z "${cloud_providers}"]; then
cloud_providers="azure-new"
cloud_providers="azure-curl"
else
cloud_providers="${cloud_providers};azure-new"
cloud_providers="${cloud_providers};azure-curl"
fi
;;
--aws-provider)
......@@ -134,7 +134,7 @@ options:
--azure-provider
Also build the Azure optional cloud provider code. ( functional, based on Azure Storage C++ SDK, cpprest based )
--azure-new-provider
--azure-curl-provider
Also build the Azure optional cloud provider code. ( functional, based on Azure Storage C++ SDK, libcurl based )
--aws-provider
......
......@@ -85,7 +85,7 @@ if(NOT WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Coverage" )
endif()
option( AZURE_PROVIDER_ENABLED OFF )
option( AZURE_NEW_PROVIDER_ENABLED OFF)
option( AZURE_CURL_PROVIDER_ENABLED OFF)
option( AWS_PROVIDER_ENABLED OFF )
option( GCP_PROVIDER_ENABLED OFF )
......@@ -99,11 +99,11 @@ else()
message( STATUS "NOT BUILDING AZURE PROVIDER")
endif()
if ( "azure-new" IN_LIST OPTIONAL_STORAGE_PROVIDERS_ENABLED )
set( AZURE_NEW_PROVIDER_ENABLED ON)
add_definitions( -DHAS_AZURE_NEW_BLOB_STORAGE_PROVIDER )
if ( "azure-curl" IN_LIST OPTIONAL_STORAGE_PROVIDERS_ENABLED )
set( AZURE_CURL_PROVIDER_ENABLED ON)
add_definitions( -DHAS_AZURE_BLOB_STORAGE_PROVIDER_CURL )
else()
message( STATUS "NOT BUILDING AZURE NEW PROVIDER")
message( STATUS "NOT BUILDING AZURE PROVIDER CURL")
endif()
......@@ -122,7 +122,7 @@ else ()
endif()
message( STATUS "AZURE_PROVIDER_ENABLED=${AZURE_PROVIDER_ENABLED}" )
message( STATUS "AZURE_NEW_PROVIDER_ENABLED=${AZURE_NEW_PROVIDER_ENABLED}" )
message( STATUS "AZURE_CURL_PROVIDER_ENABLED=${AZURE_CURL_PROVIDER_ENABLED}" )
message( STATUS "AWS_PROVIDER_ENABLED=${AWS_PROVIDER_ENABLED}" )
message( STATUS "GCP_PROVIDER_ENABLED=${GCP_PROVIDER_ENABLED}" )
......@@ -162,10 +162,10 @@ file(GLOB SRC_LIB_ACCESSORS ${sdapi_SOURCE_DIR}/src/lib/accessors/*.cc)
file(GLOB SRC_LIB_PROVIDERS ${sdapi_SOURCE_DIR}/src/lib/cloud/providers/*.cc)
if(AZURE_PROVIDER_ENABLED)
file(GLOB SRC_LIB_PROVIDERS_AZURE ${sdapi_SOURCE_DIR}/src/lib/cloud/providers/azure/*.cc)
file(GLOB SRC_LIB_PROVIDERS_AZURE ${sdapi_SOURCE_DIR}/src/lib/cloud/providers/azure/cpprest/*.cc)
endif()
if(AZURE_NEW_PROVIDER_ENABLED)
file(GLOB SRC_LIB_PROVIDERS_AZURE_NEW ${sdapi_SOURCE_DIR}/src/lib/cloud/providers/azure_new/*.cc)
if(AZURE_CURL_PROVIDER_ENABLED)
file(GLOB SRC_LIB_PROVIDERS_AZURE_NEW ${sdapi_SOURCE_DIR}/src/lib/cloud/providers/azure/curl/*.cc)
endif()
if (AWS_PROVIDER_ENABLED)
file(GLOB SRC_LIB_PROVIDERS_AWS ${sdapi_SOURCE_DIR}/src/lib/cloud/providers/aws/*.cc)
......@@ -184,7 +184,7 @@ if(AZURE_PROVIDER_ENABLED)
set(SOURCES ${SOURCES} ${SRC_LIB_PROVIDERS_AZURE} )
endif()
if(AZURE_NEW_PROVIDER_ENABLED)
if(AZURE_CURL_PROVIDER_ENABLED)
set(SOURCES ${SOURCES} ${SRC_LIB_PROVIDERS_AZURE_NEW} )
endif()
......@@ -203,7 +203,7 @@ else()
set (OPENSSL_LIBRARY "")
endif()
if(AZURE_NEW_PROVIDER_ENABLED)
if(AZURE_CURL_PROVIDER_ENABLED)
if(NOT WIN32)
......@@ -335,9 +335,9 @@ if(NOT WIN32)
${CRC32C_LIBRARY}
)
if(AZURE_NEW_PROVIDER_ENABLED)
if(AZURE_CURL_PROVIDER_ENABLED)
target_link_libraries(sdapi PRIVATE Azure::azure-storage-blobs LibXml2::LibXml2 )
endif(AZURE_NEW_PROVIDER_ENABLED)
endif(AZURE_CURL_PROVIDER_ENABLED)
if(AZURE_PROVIDER_ENABLED)
#stuff with no proper targets defined in CMake module or package?
......@@ -380,7 +380,7 @@ else()
${CRC32C_LIBRARY}
)
if(AZURE_NEW_PROVIDER_ENABLED)
if(AZURE_CURL_PROVIDER_ENABLED)
target_link_libraries(sdapi PRIVATE Azure::azure-storage-blobs)
endif()
......@@ -456,7 +456,7 @@ if(NOT WIN32)
${CRC32C_LIBRARY}
)
if(AZURE_NEW_PROVIDER_ENABLED)
if(AZURE_CURL_PROVIDER_ENABLED)
target_link_libraries(sdapi_static PRIVATE Azure::azure-storage-blobs LibXml2::LibXml2)
endif()
......@@ -500,7 +500,7 @@ else()
${CRC32C_LIBRARY}
)
if(AZURE_NEW_PROVIDER_ENABLED)
if(AZURE_CURL_PROVIDER_ENABLED)
target_link_libraries(sdapi_static PRIVATE Azure::azure-storage-blobs)
endif()
......
......@@ -23,11 +23,11 @@
#include "accessors/GcsAccessor.h"
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER
#include "cloud/providers/azure/AzureStorage.h"
#include "cloud/providers/azure/cpprest/AzureStorage.h"
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#include "cloud/providers/azure_new/AzureStorageNew.h"
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
#include "cloud/providers/azure/curl/AzureStorage.h"
#endif
#ifdef HAS_AWS_S3_STORAGE_PROVIDER
......@@ -53,7 +53,7 @@ class StorageObjectInfoIteratorImpl {
public:
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER
StorageObjectInfoIteratorImpl(std::shared_ptr<AzureStorage> accessor, const std::string& storagePath, const GcsContext* pContext, bool recursive):
StorageObjectInfoIteratorImpl(std::shared_ptr<cpprest::AzureStorage> accessor, const std::string& storagePath, const GcsContext* pContext, bool recursive):
_storagePath(storagePath),
_http_context(pContext),
_azaccessor(accessor),
......@@ -64,8 +64,8 @@ public:
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
StorageObjectInfoIteratorImpl(std::shared_ptr<AzureStorageNew> accessor, const std::string& storagePath, const GcsContext* pContext, bool recursive):
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
StorageObjectInfoIteratorImpl(std::shared_ptr<curl::AzureStorage> accessor, const std::string& storagePath, const GcsContext* pContext, bool recursive):
_storagePath(storagePath),
_http_context(pContext),
_azaccessornew(accessor),
......@@ -134,7 +134,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if(_azaccessornew) {
_azaccessornew->getChildren(_storagePath, _recursive, &_nextPageToken, &_items, _http_context);
return;
......@@ -164,10 +164,10 @@ private:
const GcsContext* _http_context;
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER
std::shared_ptr<AzureStorage> _azaccessor;
std::shared_ptr<cpprest::AzureStorage> _azaccessor;
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
std::shared_ptr<AzureStorageNew> _azaccessornew;
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
std::shared_ptr<curl::AzureStorage> _azaccessornew;
#endif
#ifdef HAS_AWS_S3_STORAGE_PROVIDER
std::shared_ptr<AwsStorage> _awsaccessor;
......@@ -212,9 +212,9 @@ private:
if (_provider == kAzureCloudProvider) {
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER
_azstorage = std::make_shared<AzureStorage>(auth_provider, sdresource, readonly);
#elif HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
_azstoragenew = std::make_shared<AzureStorageNew>(auth_provider, sdresource, readonly);
_azstorage = std::make_shared<cpprest::AzureStorage>(auth_provider, sdresource, readonly);
#elif HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
_azstoragenew = std::make_shared<curl::AzureStorage>(auth_provider, sdresource, readonly);
#else
throw std::logic_error( "azure / blob: not supported : no client library code compiled" );
#endif
......@@ -250,7 +250,7 @@ private:
return _azstorage->objectExists(storage_path, pContext);
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
return _azstoragenew->objectExists(storage_path, pContext);
}
......@@ -278,7 +278,7 @@ private:
_azstorage, storage_path, pContext, false));
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
return StorageObjectInfoIterator(
new StorageObjectInfoIteratorImpl(
......@@ -305,7 +305,7 @@ private:
_azstorage, storage_path, pContext, recursive));
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
return StorageObjectInfoIterator(
new StorageObjectInfoIteratorImpl(
......@@ -330,7 +330,7 @@ private:
return _azstorage->objectSize(storage_path, pContext);
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
return _azstoragenew->objectSize(storage_path, pContext);
}
......@@ -349,7 +349,7 @@ private:
return _azstorage->objectsSize(storage_paths, pContext);
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
return _azstoragenew->objectsSize(storage_paths, pContext);
}
......@@ -369,7 +369,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->uploadObject(storage_path, data, len, pContext);
return;
......@@ -391,7 +391,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->uploadObject(storage_path, file_name, pContext);
return;
......@@ -413,7 +413,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->downloadObject(storage_path, data, offset, len, pContext);
return;
......@@ -435,7 +435,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->downloadObject(storage_path, data, len, pContext);
return;
......@@ -457,7 +457,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->downloadObject(storage_path, data, len, pContext);
return;
......@@ -479,7 +479,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->deleteObject(storage_path, pContext);
return;
......@@ -501,7 +501,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->lockObject(storage_path, pContext);
return;
......@@ -523,7 +523,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->waitLockObject(storage_path, pContext);
return;
......@@ -545,7 +545,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->unlockObject(storage_path, pContext);
return;
......@@ -567,7 +567,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->setHttpContext(pContext);
return;
......@@ -589,7 +589,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->setExponentialRetryBackoffPolicy(policy);
return;
......@@ -607,7 +607,7 @@ private:
return _azstorage->getCachedStorageAccessToken(resourceRef);
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
return _azstoragenew->getCachedStorageAccessToken(resourceRef);
}
......@@ -627,7 +627,7 @@ private:
return;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
_azstoragenew->setCachedStorageAccessToken(resourceRef, credentials);
return;
......@@ -648,7 +648,7 @@ private:
return _azstorage->ls(storage_path, pContext);
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
if (_provider == kAzureCloudProvider) {
return _azstoragenew->ls(storage_path, pContext);
}
......
......@@ -25,10 +25,14 @@
namespace seismicdrive {
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER
class AzureStorage;
namespace cpprest {
class AzureStorage;
}
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
class AzureStorageNew;
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
namespace curl {
class AzureStorage;
}
#endif
#ifdef HAS_AWS_S3_STORAGE_PROVIDER
class AwsStorage;
......@@ -404,11 +408,11 @@ class Storage: public StorageIF {
std::shared_ptr<GcsAccessor> _gcsaccessor;
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER
std::shared_ptr<AzureStorage> _azstorage;
std::shared_ptr<cpprest::AzureStorage> _azstorage;
#endif
#ifdef HAS_AZURE_NEW_BLOB_STORAGE_PROVIDER
std::shared_ptr<AzureStorageNew> _azstoragenew;
#ifdef HAS_AZURE_BLOB_STORAGE_PROVIDER_CURL
std::shared_ptr<curl::AzureStorage> _azstoragenew;
#endif
......
......@@ -17,7 +17,7 @@
#define BUILDING_DLL
#include "auth/auth_provider.h"
#include "cloud/providers/azure/AzureStorage.h"
#include "cloud/providers/azure/cpprest/AzureStorage.h"
#include "accessors/GcsAccessor.h"
#include "shared/config.h"
#include "shared/mex.h"
......@@ -41,7 +41,7 @@
#include <codecvt>
#include <regex>
namespace seismicdrive {
namespace seismicdrive { namespace cpprest {
template<class Catch, class Throw>
......@@ -813,4 +813,5 @@ namespace seismicdrive {
std::vector<std::pair<std::string, uint64_t>> AzureStorage::ls(const std::string &objPath, const GcsContext* pContext) {
return _impl->ls(objPath, pContext);
}
}
} } // namespace seismicdrive::cpprest
......@@ -23,7 +23,7 @@
#include <was/blob.h>
namespace seismicdrive {
namespace seismicdrive { namespace cpprest {
class AzureStorageImpl;
......@@ -343,6 +343,6 @@ private:
};
} // namespace seismicdrive
} } // namespace seismicdrive::cpprest
#endif // SDAPI_AZURESTORAGE_H
......@@ -14,25 +14,24 @@
// limitations under the License.
// ============================================================================
#ifndef SDAPI_AZURESTORAGE_NEW_H
#define SDAPI_AZURESTORAGE_NEW_H
#pragma once
#include "DLL_EXPORT.h"
#include "cloud/providers/Storage.h"
namespace seismicdrive
{
namespace seismicdrive { namespace curl {
// For the only purpose of mocking
class AzureStorageNewImpl;
class AzureStorageImpl;
// --------------------------------
// Azure Cloud Blob Client Interface
// --------------------------------
struct CloudBlobClientNewIF
struct CloudBlobClientIF
{
virtual ~CloudBlobClientNewIF() = default;
virtual ~CloudBlobClientIF() = default;
virtual bool exists(const std::string &container_name, const std::string &blob_name, const GcsContext *pContext) = 0;
virtual void upload_from_file(const std::string &container_name, const std::string &blob_name, const std::string &file_name, const GcsContext *pContext) = 0;
virtual void upload_from(const std::string &container_name, const std::string &blob_name, const char *source, std::uint64_t length, const GcsContext *pContext) = 0;
......@@ -43,14 +42,14 @@ namespace seismicdrive
virtual void list_blobs_segmented(const std::string &container_name, const std::string &prefix, bool recursiveList, std::string *nextPageToken, std::vector<StorageObjectInfo> *result, const GcsContext *pContext) = 0;
virtual void list_blobs_segmented(const std::string &container_name, const std::string &prefix, bool recursiveList, std::string *nextPageToken, std::vector<std::pair<std::string, std::uint64_t>> *result, const GcsContext *pContext) = 0;
};
struct CloudBlobClientNewFactoryIF
struct CloudBlobClientFactoryIF
{
virtual ~CloudBlobClientNewFactoryIF() = default;
virtual std::shared_ptr<CloudBlobClientNewIF> create(const std::string &account_name, const std::string &sas_token) = 0;
virtual ~CloudBlobClientFactoryIF() = default;
virtual std::shared_ptr<CloudBlobClientIF> create(const std::string &account_name, const std::string &sas_token) = 0;
};
/*******************************************************************************/ /**
* @class AzureStorageNew AzureStorageNew.h
* @class AzureStorage AzureStorage.h
*
* @brief This class is an accessor for the Azure blob storage objects.
*
......@@ -58,18 +57,18 @@ namespace seismicdrive
*
******************************************************************************/
class AzureStorageNew : public StorageIF
class AzureStorage : public StorageIF
{
public:
/*******************************************************************************/ /**
* @brief Default constructor.
*
* This contructor creates a AzureStorageNew object and
* This contructor creates a AzureStorage object and
* initialize the dataset info.
*
******************************************************************************/
AzureStorageNew();
AzureStorage();
/*******************************************************************************/ /**
* @brief Parameterized contructor
......@@ -80,40 +79,40 @@ namespace seismicdrive
* @param sdresource is the seismic drive subproject resource (optional if the auth provider is a google default one)
* @param readonly define the access policy (read or readwrite)
******************************************************************************/
AzureStorageNew(void *auth_provider, const std::string &sdresource = "", const bool readonly = false);
AzureStorage(void *auth_provider, const std::string &sdresource = "", const bool readonly = false);
/*******************************************************************************/ /**
* @brief Copy Constructor.
*
******************************************************************************/
AzureStorageNew(const AzureStorageNew &rhs) = delete;
AzureStorage(const AzureStorage &rhs) = delete;
/*******************************************************************************/ /**
* @brief Copy Assignment Operator.
*
******************************************************************************/
AzureStorageNew &operator=(const AzureStorageNew &) = delete;
AzureStorage &operator=(const AzureStorage &) = delete;
/*******************************************************************************/ /**
* @brief Move Constructor.
*
******************************************************************************/
AzureStorageNew(AzureStorageNew &&op) noexcept;
AzureStorage(AzureStorage &&op) noexcept;