2020-03-09 17:15:03 -04:00
|
|
|
/***********************************************************************************************************************************
|
|
|
|
Repository Create Command
|
|
|
|
***********************************************************************************************************************************/
|
|
|
|
#include "build.auto.h"
|
|
|
|
|
|
|
|
#include "common/debug.h"
|
|
|
|
#include "common/log.h"
|
|
|
|
#include "common/memContext.h"
|
|
|
|
#include "config/config.h"
|
|
|
|
#include "storage/helper.h"
|
2020-07-02 16:24:34 -04:00
|
|
|
#include "storage/azure/storage.intern.h"
|
2020-03-09 17:15:03 -04:00
|
|
|
#include "storage/s3/storage.intern.h"
|
|
|
|
|
|
|
|
/**********************************************************************************************************************************/
|
|
|
|
void
|
|
|
|
cmdRepoCreate(void)
|
|
|
|
{
|
|
|
|
FUNCTION_LOG_VOID(logLevelDebug);
|
|
|
|
|
|
|
|
MEM_CONTEXT_TEMP_BEGIN()
|
|
|
|
{
|
|
|
|
if (strEq(storageType(storageRepo()), STORAGE_S3_TYPE_STR))
|
2020-07-02 16:24:34 -04:00
|
|
|
{
|
2020-06-24 13:44:00 -04:00
|
|
|
storageS3RequestP((StorageS3 *)storageDriver(storageRepoWrite()), HTTP_VERB_PUT_STR, FSLASH_STR);
|
2020-07-02 16:24:34 -04:00
|
|
|
}
|
|
|
|
else if (strEq(storageType(storageRepo()), STORAGE_AZURE_TYPE_STR))
|
|
|
|
{
|
|
|
|
storageAzureRequestP(
|
|
|
|
(StorageAzure *)storageDriver(storageRepoWrite()), HTTP_VERB_PUT_STR,
|
|
|
|
.query = httpQueryAdd(httpQueryNew(), AZURE_QUERY_RESTYPE_STR, AZURE_QUERY_VALUE_CONTAINER_STR));
|
|
|
|
}
|
2020-03-09 17:15:03 -04:00
|
|
|
}
|
|
|
|
MEM_CONTEXT_TEMP_END();
|
|
|
|
|
|
|
|
FUNCTION_LOG_RETURN_VOID();
|
|
|
|
}
|