From: Norbert Bizet Date: Fri, 27 Aug 2021 17:20:24 +0000 (-0400) Subject: regress: "Amazon" is a new cloud type X-Git-Tag: Beta-15.0.0~789 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb9244143fcab2dace1918d24c35840e0a97bc3f;p=thirdparty%2Fbacula.git regress: "Amazon" is a new cloud type --- diff --git a/bacula/src/stored/cloud_dev.c b/bacula/src/stored/cloud_dev.c index d8b1f1c8c..39fa1a412 100644 --- a/bacula/src/stored/cloud_dev.c +++ b/bacula/src/stored/cloud_dev.c @@ -134,6 +134,7 @@ static cloud_driver_item driver_tab[] = { {"oci", NULL, NULL, false, false}, {"generic", NULL, NULL, false, false}, {"swift", NULL, NULL, false, false}, + {"aws", NULL, NULL, false, false}, {NULL, NULL, NULL, false, false} }; @@ -146,6 +147,7 @@ static const char* cloud_driver_type_name[] = { "Oracle", "Generic", "Swift", + "Amazon", NULL }; @@ -923,6 +925,17 @@ cloud_dev::cloud_dev(JCR *jcr, DEVRES *device) case C_S3_DRIVER: driver = load_driver(jcr, C_S3_DRIVER); break; + case C_AWS_DRIVER: + if (!device->cloud->driver_command) { + POOL_MEM tmp(PM_FNAME); + Mmsg(tmp, "%s/aws_cloud_driver", me->plugin_directory); + device->cloud->driver_command = bstrdup(tmp.c_str()); + } + struct stat mstatp; + if (lstat(device->cloud->driver_command, &mstatp) == 0) { + driver = load_driver(jcr, C_AWS_DRIVER); + } + break; case C_WAS_DRIVER: { if (!device->cloud->driver_command) { diff --git a/bacula/src/stored/cloud_dev.h b/bacula/src/stored/cloud_dev.h index c57cf603f..6c0dba809 100644 --- a/bacula/src/stored/cloud_dev.h +++ b/bacula/src/stored/cloud_dev.h @@ -45,7 +45,8 @@ enum { C_GOOGLE_DRIVER= 4, C_ORACLE_DRIVER= 5, C_GEN_DRIVER = 6, - C_SWIFT_DRIVER = 7 + C_SWIFT_DRIVER = 7, + C_AWS_DRIVER = 8 }; diff --git a/bacula/src/stored/stored_conf.c b/bacula/src/stored/stored_conf.c index 6f74eca6b..82ea02d90 100644 --- a/bacula/src/stored/stored_conf.c +++ b/bacula/src/stored/stored_conf.c @@ -324,6 +324,7 @@ s_kw cloud_drivers[] = { {"Oracle", C_ORACLE_DRIVER}, {"Generic", C_GEN_DRIVER}, {"Swift", C_SWIFT_DRIVER}, + {"Amazon", C_AWS_DRIVER}, #endif {NULL, 0} };