mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-03 09:20:50 -05:00
home creation is a config option for storage drivers, not for storage providers
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -93,8 +93,7 @@ func StorageEOS(cfg *config.Config) *cli.Command {
|
||||
"mount_id": cfg.Reva.StorageEOS.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageEOS.ExposeDataServer,
|
||||
// TODO use cfg.Reva.SStorageEOSData.URL, ?
|
||||
"data_server_url": cfg.Reva.StorageEOS.DataServerURL,
|
||||
"enable_home_creation": cfg.Reva.StorageEOS.EnableHomeCreation,
|
||||
"data_server_url": cfg.Reva.StorageEOS.DataServerURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -93,8 +93,7 @@ func StorageHome(cfg *config.Config) *cli.Command {
|
||||
"mount_id": cfg.Reva.StorageHome.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageHome.ExposeDataServer,
|
||||
// TODO use cfg.Reva.StorageHomeData.URL, ?
|
||||
"data_server_url": cfg.Reva.StorageHome.DataServerURL,
|
||||
"enable_home_creation": cfg.Reva.StorageHome.EnableHomeCreation,
|
||||
"data_server_url": cfg.Reva.StorageHome.DataServerURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -93,8 +93,7 @@ func StorageOC(cfg *config.Config) *cli.Command {
|
||||
"mount_id": cfg.Reva.StorageOC.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageOC.ExposeDataServer,
|
||||
// TODO use cfg.Reva.SStorageOCData.URL, ?
|
||||
"data_server_url": cfg.Reva.StorageOC.DataServerURL,
|
||||
"enable_home_creation": cfg.Reva.StorageOC.EnableHomeCreation,
|
||||
"data_server_url": cfg.Reva.StorageOC.DataServerURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -87,13 +87,12 @@ func StorageRoot(cfg *config.Config) *cli.Command {
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"storageprovider": map[string]interface{}{
|
||||
"driver": cfg.Reva.StorageRoot.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"mount_path": cfg.Reva.StorageRoot.MountPath,
|
||||
"mount_id": cfg.Reva.StorageRoot.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageRoot.ExposeDataServer,
|
||||
"data_server_url": cfg.Reva.StorageRoot.DataServerURL,
|
||||
"enable_home_creation": cfg.Reva.StorageRoot.EnableHomeCreation,
|
||||
"driver": cfg.Reva.StorageRoot.Driver,
|
||||
"drivers": drivers(cfg),
|
||||
"mount_path": cfg.Reva.StorageRoot.MountPath,
|
||||
"mount_id": cfg.Reva.StorageRoot.MountID,
|
||||
"expose_data_server": cfg.Reva.StorageRoot.ExposeDataServer,
|
||||
"data_server_url": cfg.Reva.StorageRoot.DataServerURL,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -82,12 +82,11 @@ type FrontendPort struct {
|
||||
// StoragePort defines the available storage configuration.
|
||||
type StoragePort struct {
|
||||
Port
|
||||
Driver string
|
||||
MountPath string
|
||||
MountID string
|
||||
ExposeDataServer bool
|
||||
DataServerURL string
|
||||
EnableHomeCreation bool
|
||||
Driver string
|
||||
MountPath string
|
||||
MountID string
|
||||
ExposeDataServer bool
|
||||
DataServerURL string
|
||||
|
||||
// for HTTP ports with only one http service
|
||||
Prefix string
|
||||
|
||||
@@ -90,13 +90,6 @@ func StorageEOSWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_DATA_SERVER_URL"},
|
||||
Destination: &cfg.Reva.StorageEOS.DataServerURL,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-home-creation",
|
||||
Value: false,
|
||||
Usage: "if enabled home dirs will be automatically created",
|
||||
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME_CREATION"},
|
||||
Destination: &cfg.Reva.StorageEOS.EnableHomeCreation,
|
||||
},
|
||||
}
|
||||
|
||||
flags = append(flags, TracingWithConfig(cfg)...)
|
||||
|
||||
@@ -73,11 +73,11 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mount-id",
|
||||
// This is tho mount id of the /oc storage
|
||||
// set it to 1284d238-aa92-42ce-bdc4-0b0000009158 for /eos
|
||||
// Value: "1284d238-aa92-42ce-bdc4-0b0000009162", /os
|
||||
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009154", // /home
|
||||
// This is the mount id of the storage provider using the same storage driver
|
||||
// as /home but withoud home enabled. Set it to
|
||||
// 1284d238-aa92-42ce-bdc4-0b0000009158 for /eos
|
||||
// 1284d238-aa92-42ce-bdc4-0b0000009162 for /oc
|
||||
Value: "1284d238-aa92-42ce-bdc4-0b0000009162", // /oc
|
||||
Usage: "mount id",
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_MOUNT_ID"},
|
||||
Destination: &cfg.Reva.StorageHome.MountID,
|
||||
@@ -96,13 +96,6 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_DATA_SERVER_URL"},
|
||||
Destination: &cfg.Reva.StorageHome.DataServerURL,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-home-creation",
|
||||
Value: true,
|
||||
Usage: "if enabled home dirs will be automatically created",
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_ENABLE_HOME_CREATION"},
|
||||
Destination: &cfg.Reva.StorageHome.EnableHomeCreation,
|
||||
},
|
||||
|
||||
// User provider
|
||||
|
||||
|
||||
@@ -92,13 +92,6 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_OC_DATA_SERVER_URL"},
|
||||
Destination: &cfg.Reva.StorageOC.DataServerURL,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-home-creation",
|
||||
Value: false,
|
||||
Usage: "if enabled home dirs will be automatically created",
|
||||
EnvVars: []string{"REVA_STORAGE_OC_ENABLE_HOME_CREATION"},
|
||||
Destination: &cfg.Reva.StorageOC.EnableHomeCreation,
|
||||
},
|
||||
|
||||
// User provider
|
||||
|
||||
|
||||
@@ -91,12 +91,6 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
|
||||
EnvVars: []string{"REVA_STORAGE_ROOT_DATA_SERVER_URL"},
|
||||
Destination: &cfg.Reva.StorageRoot.DataServerURL,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-home-creation",
|
||||
Usage: "if enabled home dirs will be automatically created",
|
||||
EnvVars: []string{"REVA_STORAGE_HOME_ENABLE_HOME_CREATION"},
|
||||
Destination: &cfg.Reva.StorageHome.EnableHomeCreation,
|
||||
},
|
||||
}
|
||||
|
||||
flags = append(flags, TracingWithConfig(cfg)...)
|
||||
|
||||
Reference in New Issue
Block a user