update reva to v0.0.2-0.20200212114015-0dbce24f7e8b (#91)

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-03-06 12:17:28 +01:00
committed by GitHub
parent 0b574786e1
commit e70e0c9176
22 changed files with 244 additions and 764 deletions
+24 -3
View File
@@ -136,13 +136,34 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag {
Usage: "--service gateway [--service authregistry]",
EnvVars: []string{"REVA_GATEWAY_SERVICES"},
},
// TODO should defaults to true. reverse logic to 'disable-share-commit'?
&cli.BoolFlag{
Name: "commit-share-to-storage-grant",
Usage: "Commit shares to the share manager as well as as a grant to the storage",
EnvVars: []string{"REVA_GATEWAY_COMMIT_SHARE_TO_STRORAGE_GRANT"},
Value: true,
Usage: "Commit shares to the share manager",
EnvVars: []string{"REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT"},
Destination: &cfg.Reva.Gateway.CommitShareToStorageGrant,
},
&cli.BoolFlag{
Name: "commit-share-to-storage-ref",
Value: true,
// TODO clarify
Usage: "Commit shares to the storage",
EnvVars: []string{"REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_REF"},
Destination: &cfg.Reva.Gateway.CommitShareToStorageRef,
},
&cli.StringFlag{
Name: "share-folder",
Value: "/",
Usage: "mount shares in this folder of the home storage provider",
EnvVars: []string{"REVA_GATEWAY_SHARE_FOLDER"},
Destination: &cfg.Reva.Gateway.ShareFolder,
},
&cli.BoolFlag{
Name: "disable-home-creation-on-login",
Usage: "Disable creation of home folder on login",
EnvVars: []string{"REVA_GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN"},
Destination: &cfg.Reva.Gateway.DisableHomeCreationOnLogin,
},
// other services
-507
View File
@@ -1,507 +0,0 @@
package flagset
/* TODO move this into dedicated flagsets, along with storage commands
import (
"github.com/micro/cli"
"github.com/owncloud/ocis-reva/pkg/config"
)
// ServerWithConfig applies cfg to the root flagset
func ServerWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
// debug ports are the odd ports
&cli.StringFlag{
Name: "storage-eos-debug-addr",
Value: "0.0.0.0:9159",
Usage: "Address to bind storage eos debug server",
EnvVar: "REVA_STORAGE_EOS_DEBUG_ADDR",
Destination: &cfg.Reva.StorageEOS.DebugAddr,
},
&cli.StringFlag{
Name: "storage-eos-data-debug-addr",
Value: "0.0.0.0:9161",
Usage: "Address to bind storage eos data debug server",
EnvVar: "REVA_STORAGE_HOME_DATA_DEBUG_ADDR",
Destination: &cfg.Reva.StorageEOSData.DebugAddr,
},
&cli.StringFlag{
Name: "storage-s3-debug-addr",
Value: "0.0.0.0:9167",
Usage: "Address to bind storage s3 debug server",
EnvVar: "REVA_STORAGE_S3_DEBUG_ADDR",
Destination: &cfg.Reva.StorageS3.DebugAddr,
},
&cli.StringFlag{
Name: "storage-s3-data-debug-addr",
Value: "0.0.0.0:9169",
Usage: "Address to bind storage s3 data debug server",
EnvVar: "REVA_STORAGE_S3_DATA_DEBUG_ADDR",
Destination: &cfg.Reva.StorageS3Data.DebugAddr,
},
&cli.StringFlag{
Name: "storage-custom-debug-addr",
Value: "0.0.0.0:9171",
Usage: "Address to bind storage custom debug server",
EnvVar: "REVA_STORAGE_CUSTOM_DEBUG_ADDR",
Destination: &cfg.Reva.StorageCustom.DebugAddr,
},
&cli.StringFlag{
Name: "storage-custom-data-debug-addr",
Value: "0.0.0.0:9173",
Usage: "Address to bind storage custom data debug server",
EnvVar: "REVA_STORAGE_CUSTOM_DATA_DEBUG_ADDR",
Destination: &cfg.Reva.StorageCustomData.DebugAddr,
},
// Services
// Storage eos
&cli.StringFlag{
Name: "storage-eos-network",
Value: "tcp",
Usage: "Network to use for the reva storage-eos service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_EOS_NETWORK",
Destination: &cfg.Reva.StorageEOS.Network,
},
&cli.StringFlag{
Name: "storage-eos-protocol",
Value: "grpc",
Usage: "protocol for reva storage-eos service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_EOS_PROTOCOL",
Destination: &cfg.Reva.StorageEOS.Protocol,
},
&cli.StringFlag{
Name: "storage-eos-addr",
Value: "0.0.0.0:9158",
Usage: "Address to bind reva storage-eos service",
EnvVar: "REVA_STORAGE_EOS_ADDR",
Destination: &cfg.Reva.StorageEOS.Addr,
},
&cli.StringFlag{
Name: "storage-eos-url",
Value: "localhost:9158",
Usage: "URL to use for the reva storage-eos service",
EnvVar: "REVA_STORAGE_EOS_URL",
Destination: &cfg.Reva.StorageEOS.URL,
},
&cli.StringFlag{
Name: "storage-eos-services",
Value: "storageprovider",
Usage: "comma separated list of services to include in the storage-eos service",
EnvVar: "REVA_STORAGE_EOS_SERVICES",
Destination: &cfg.Reva.StorageEOS.Services,
},
&cli.StringFlag{
Name: "storage-eos-driver",
Value: "local",
Usage: "eos storage driver",
EnvVar: "REVA_STORAGE_EOS_DRIVER",
Destination: &cfg.Reva.StorageEOS.Driver,
},
&cli.StringFlag{
Name: "storage-eos-path-wrapper",
Value: "",
Usage: "eos storage path wrapper",
EnvVar: "REVA_STORAGE_EOS_PATH_WRAPPER",
Destination: &cfg.Reva.StorageEOS.PathWrapper,
},
&cli.StringFlag{
Name: "storage-eos-path-wrapper-context-prefix",
Value: "",
Usage: "eos storage path wrapper context prefix",
EnvVar: "REVA_STORAGE_EOS_PATH_WRAPPER_CONTEXT_PREFIX",
Destination: &cfg.Reva.StorageEOS.PathWrapperContext.Prefix,
},
&cli.StringFlag{
Name: "storage-eos-mount-path",
Value: "/eos",
Usage: "eos storage mount path",
EnvVar: "REVA_STORAGE_EOS_MOUNT_PATH",
Destination: &cfg.Reva.StorageEOS.MountPath,
},
&cli.StringFlag{
Name: "storage-eos-mount-id",
Value: "",
Usage: "eos storage mount id",
EnvVar: "REVA_STORAGE_EOS_MOUNT_ID",
Destination: &cfg.Reva.StorageEOS.MountID,
},
&cli.BoolFlag{
Name: "storage-eos-expose-data-server",
Usage: "eos storage exposes a dedicated data server",
EnvVar: "REVA_STORAGE_EOS_EXPOSE_DATA_SERVER",
Destination: &cfg.Reva.StorageEOS.ExposeDataServer,
},
&cli.StringFlag{
Name: "storage-eos-data-server-url",
Value: "",
Usage: "eos storage data server url",
EnvVar: "REVA_STORAGE_EOS_DATA_SERVER_URL",
Destination: &cfg.Reva.StorageEOS.DataServerURL,
},
// Storage eos data
&cli.StringFlag{
Name: "storage-eos-data-network",
Value: "tcp",
Usage: "Network to use for the reva storage-eos data service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_EOS_DATA_NETWORK",
Destination: &cfg.Reva.StorageEOSData.Network,
},
&cli.StringFlag{
Name: "storage-eos-data-protocol",
Value: "http",
Usage: "protocol for reva storage-eos data service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_EOS_DATA_PROTOCOL",
Destination: &cfg.Reva.StorageEOSData.Protocol,
},
&cli.StringFlag{
Name: "storage-eos-data-addr",
Value: "0.0.0.0:9160",
Usage: "Address to bind reva storage-eos data service",
EnvVar: "REVA_STORAGE_EOS_DATA_ADDR",
Destination: &cfg.Reva.StorageEOSData.Addr,
},
&cli.StringFlag{
Name: "storage-eos-data-url",
Value: "localhost:9160",
Usage: "URL to use for the reva storage-eos data service",
EnvVar: "REVA_STORAGE_EOS_DATA_URL",
Destination: &cfg.Reva.StorageEOSData.URL,
},
&cli.StringFlag{
Name: "storage-eos-data-services",
Value: "dataprovider",
Usage: "comma separated list of services to include in the storage-eos data service",
EnvVar: "REVA_STORAGE_EOS_DATA_SERVICES",
Destination: &cfg.Reva.StorageEOSData.Services,
},
&cli.StringFlag{
Name: "storage-eos-data-driver",
Value: "eos",
Usage: "eos data storage driver",
EnvVar: "REVA_STORAGE_EOS_DATA_DRIVER",
Destination: &cfg.Reva.StorageEOSData.Driver,
},
&cli.StringFlag{
Name: "storage-eos-data-prefix",
Value: "data",
Usage: "prefix for the http endpoint, without leading slash",
EnvVar: "REVA_STORAGE_EOS_DATA_PREFIX",
Destination: &cfg.Reva.StorageEOSData.Prefix,
},
&cli.StringFlag{
Name: "storage-eos-data-temp-folder",
Value: "/var/tmp/",
Usage: "storage eos data temp folder",
EnvVar: "REVA_STORAGE_HOME_DATA_TEMP_FOLDER",
Destination: &cfg.Reva.StorageEOSData.TempFolder,
},
// Storage s3
&cli.StringFlag{
Name: "storage-s3-network",
Value: "tcp",
Usage: "Network to use for the reva storage-oc service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_S3_NETWORK",
Destination: &cfg.Reva.StorageS3.Network,
},
&cli.StringFlag{
Name: "storage-s3-protocol",
Value: "grpc",
Usage: "protocol for reva storage-s3 service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_S3_PROTOCOL",
Destination: &cfg.Reva.StorageS3.Protocol,
},
&cli.StringFlag{
Name: "storage-s3-addr",
Value: "0.0.0.0:9166",
Usage: "Address to bind reva storage-s3 service",
EnvVar: "REVA_STORAGE_S3_ADDR",
Destination: &cfg.Reva.StorageS3.Addr,
},
&cli.StringFlag{
Name: "storage-s3-url",
Value: "localhost:9166",
Usage: "URL to use for the reva storage-s3 service",
EnvVar: "REVA_STORAGE_S3_URL",
Destination: &cfg.Reva.StorageS3.URL,
},
&cli.StringFlag{
Name: "storage-s3-services",
Value: "storageprovider",
Usage: "comma separated list of services to include in the storage-s3 service",
EnvVar: "REVA_STORAGE_S3_SERVICES",
Destination: &cfg.Reva.StorageS3.Services,
},
&cli.StringFlag{
Name: "storage-s3-driver",
Value: "local",
Usage: "s3 storage driver",
EnvVar: "REVA_STORAGE_S3_DRIVER",
Destination: &cfg.Reva.StorageS3.Driver,
},
&cli.StringFlag{
Name: "storage-s3-path-wrapper",
Value: "",
Usage: "s3 storage path wrapper",
EnvVar: "REVA_STORAGE_S3_PATH_WRAPPER",
Destination: &cfg.Reva.StorageS3.PathWrapper,
},
&cli.StringFlag{
Name: "storage-s3-path-wrapper-context-prefix",
Value: "",
Usage: "s3 storage path wrapper context prefix",
EnvVar: "REVA_STORAGE_S3_PATH_WRAPPER_CONTEXT_PREFIX",
Destination: &cfg.Reva.StorageS3.PathWrapperContext.Prefix,
},
&cli.StringFlag{
Name: "storage-s3-mount-path",
Value: "",
Usage: "s3 storage mount path",
EnvVar: "REVA_STORAGE_S3_MOUNT_PATH",
Destination: &cfg.Reva.StorageS3.MountPath,
},
&cli.StringFlag{
Name: "storage-s3-mount-id",
Value: "",
Usage: "s3 storage mount id",
EnvVar: "REVA_STORAGE_S3_MOUNT_ID",
Destination: &cfg.Reva.StorageS3.MountID,
},
&cli.BoolFlag{
Name: "storage-s3-expose-data-server",
Usage: "s3 storage exposes a dedicated data server",
EnvVar: "REVA_STORAGE_S3_EXPOSE_DATA_SERVER",
Destination: &cfg.Reva.StorageS3.ExposeDataServer,
},
&cli.StringFlag{
Name: "storage-s3-data-server-url",
Value: "",
Usage: "s3 storage data server url",
EnvVar: "REVA_STORAGE_S3_DATA_SERVER_URL",
Destination: &cfg.Reva.StorageS3.DataServerURL,
},
// Storage s3 data
&cli.StringFlag{
Name: "storage-s3-data-network",
Value: "tcp",
Usage: "Network to use for the reva storage-s3 data service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_S3_DATA_NETWORK",
Destination: &cfg.Reva.StorageS3Data.Network,
},
&cli.StringFlag{
Name: "storage-s3-data-protocol",
Value: "http",
Usage: "protocol for reva storage-s3 data service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_S3_DATA_PROTOCOL",
Destination: &cfg.Reva.StorageS3Data.Protocol,
},
&cli.StringFlag{
Name: "storage-s3-data-addr",
Value: "0.0.0.0:9168",
Usage: "Address to bind reva storage-s3 data service",
EnvVar: "REVA_STORAGE_S3_DATA_ADDR",
Destination: &cfg.Reva.StorageS3Data.Addr,
},
&cli.StringFlag{
Name: "storage-s3-data-url",
Value: "localhost:9168",
Usage: "URL to use for the reva storage-s3 data service",
EnvVar: "REVA_STORAGE_S3_DATA_URL",
Destination: &cfg.Reva.StorageS3Data.URL,
},
&cli.StringFlag{
Name: "storage-s3-data-services",
Value: "dataprovider",
Usage: "comma separated list of services to include in the storage-s3 data service",
EnvVar: "REVA_STORAGE_S3_DATA_SERVICES",
Destination: &cfg.Reva.StorageS3Data.Services,
},
&cli.StringFlag{
Name: "storage-s3-data-driver",
Value: "s3",
Usage: "s3 data storage driver",
EnvVar: "REVA_STORAGE_S3_DATA_DRIVER",
Destination: &cfg.Reva.StorageS3Data.Driver,
},
&cli.StringFlag{
Name: "storage-s3-data-prefix",
Value: "data",
Usage: "prefix for the http endpoint, without leading slash",
EnvVar: "REVA_STORAGE_S3_DATA_PREFIX",
Destination: &cfg.Reva.StorageS3Data.Prefix,
},
&cli.StringFlag{
Name: "storage-s3-data-temp-folder",
Value: "/var/tmp/",
Usage: "storage s3 data temp folder",
EnvVar: "REVA_STORAGE_S3_DATA_TEMP_FOLDER",
Destination: &cfg.Reva.StorageS3Data.TempFolder,
},
// Storage custom
&cli.StringFlag{
Name: "storage-custom-network",
Value: "tcp",
Usage: "Network to use for the reva storage-custom service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_CUSTOM_NETWORK",
Destination: &cfg.Reva.StorageCustom.Network,
},
&cli.StringFlag{
Name: "storage-custom-protocol",
Value: "grpc",
Usage: "protocol for reva storage-custom service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_CUSTOM_PROTOCOL",
Destination: &cfg.Reva.StorageCustom.Protocol,
},
&cli.StringFlag{
Name: "storage-custom-addr",
Value: "0.0.0.0:9170",
Usage: "Address to bind reva storage-custom service",
EnvVar: "REVA_STORAGE_CUSTOM_ADDR",
Destination: &cfg.Reva.StorageCustom.Addr,
},
&cli.StringFlag{
Name: "storage-custom-url",
Value: "localhost:9170",
Usage: "URL to use for the reva storage-custom service",
EnvVar: "REVA_STORAGE_CUSTOM_URL",
Destination: &cfg.Reva.StorageCustom.URL,
},
&cli.StringFlag{
Name: "storage-custom-services",
Value: "storageprovider",
Usage: "comma separated list of services to include in the storage-custom service",
EnvVar: "REVA_STORAGE_CUSTOM_SERVICES",
Destination: &cfg.Reva.StorageCustom.Services,
},
&cli.StringFlag{
Name: "storage-custom-driver",
Value: "local",
Usage: "custom storage driver",
EnvVar: "REVA_STORAGE_CUSTOM_DRIVER",
Destination: &cfg.Reva.StorageCustom.Driver,
},
&cli.StringFlag{
Name: "storage-custom-path-wrapper",
Value: "",
Usage: "custom storage path wrapper",
EnvVar: "REVA_STORAGE_CUSTOM_PATH_WRAPPER",
Destination: &cfg.Reva.StorageCustom.PathWrapper,
},
&cli.StringFlag{
Name: "storage-custom-path-wrapper-context-prefix",
Value: "",
Usage: "custom storage path wrapper context prefix",
EnvVar: "REVA_STORAGE_CUSTOM_PATH_WRAPPER_CONTEXT_PREFIX",
Destination: &cfg.Reva.StorageCustom.PathWrapperContext.Prefix,
},
&cli.StringFlag{
Name: "storage-custom-mount-path",
Value: "",
Usage: "custom storage mount path",
EnvVar: "REVA_STORAGE_CUSTOM_MOUNT_PATH",
Destination: &cfg.Reva.StorageCustom.MountPath,
},
&cli.StringFlag{
Name: "storage-custom-mount-id",
Value: "",
Usage: "custom storage mount id",
EnvVar: "REVA_STORAGE_CUSTOM_MOUNT_ID",
Destination: &cfg.Reva.StorageCustom.MountID,
},
&cli.BoolFlag{
Name: "storage-custom-expose-data-server",
Usage: "custom storage exposes a dedicated data server",
EnvVar: "REVA_STORAGE_CUSTOM_EXPOSE_DATA_SERVER",
Destination: &cfg.Reva.StorageCustom.ExposeDataServer,
},
&cli.StringFlag{
Name: "storage-custom-data-server-url",
Value: "",
Usage: "custom storage data server url",
EnvVar: "REVA_STORAGE_CUSTOM_DATA_SERVER_URL",
Destination: &cfg.Reva.StorageCustom.DataServerURL,
},
// Storage custom data
&cli.StringFlag{
Name: "storage-custom-data-network",
Value: "tcp",
Usage: "Network to use for the reva storage-custom data service, can be 'tcp', 'udp' or 'unix'",
EnvVar: "REVA_STORAGE_CUSTOM_DATA_NETWORK",
Destination: &cfg.Reva.StorageCustomData.Network,
},
&cli.StringFlag{
Name: "storage-custom-data-protocol",
Value: "http",
Usage: "protocol for reva storage-custom data service, can be 'http' or 'grpc'",
EnvVar: "REVA_STORAGE_CUSTOM_DATA_PROTOCOL",
Destination: &cfg.Reva.StorageCustomData.Protocol,
},
&cli.StringFlag{
Name: "storage-custom-data-addr",
Value: "0.0.0.0:9172",
Usage: "Address to bind reva storage-custom data service",
EnvVar: "REVA_STORAGE_CUSTOM_DATA_ADDR",
Destination: &cfg.Reva.StorageCustomData.Addr,
},
&cli.StringFlag{
Name: "storage-custom-data-url",
Value: "localhost:9172",
Usage: "URL to use for the reva storage-custom data service",
EnvVar: "REVA_STORAGE_CUSTOM_DATA_URL",
Destination: &cfg.Reva.StorageCustomData.URL,
},
&cli.StringFlag{
Name: "storage-custom-data-services",
Value: "dataprovider",
Usage: "comma separated list of services to include in the storage-custom data service",
EnvVar: "REVA_STORAGE_CUSTOM_DATA_SERVICES",
Destination: &cfg.Reva.StorageCustomData.Services,
},
&cli.StringFlag{
Name: "storage-custom-data-driver",
Value: "",
Usage: "custom data storage driver",
EnvVar: "REVA_STORAGE_CUSTOM_DATA_DRIVER",
Destination: &cfg.Reva.StorageCustomData.Driver,
},
&cli.StringFlag{
Name: "storage-custom-data-prefix",
Value: "data",
Usage: "prefix for the http endpoint, without leading slash",
EnvVar: "REVA_STORAGE_S3_DATA_PREFIX",
Destination: &cfg.Reva.StorageCustomData.Prefix,
},
&cli.StringFlag{
Name: "storage-custom-data-temp-folder",
Value: "/var/tmp/",
Usage: "storage custom data temp folder",
EnvVar: "REVA_STORAGE_CUSTOM_DATA_TEMP_FOLDER",
Destination: &cfg.Reva.StorageCustomData.TempFolder,
},
&cli.StringFlag{
Name: "asset-path",
Value: "",
Usage: "Path to custom assets",
EnvVar: "REVA_ASSET_PATH",
Destination: &cfg.Asset.Path,
},
}
}
*/
+27 -7
View File
@@ -172,6 +172,13 @@ 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,
},
// Storage drivers
@@ -243,6 +250,12 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
@@ -264,6 +277,13 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,
},
// local
@@ -291,13 +311,6 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_SCAN"},
Destination: &cfg.Reva.Storages.OwnCloud.Scan,
},
&cli.BoolFlag{
Name: "storage-owncloud-autocreate",
Value: true,
Usage: "autocreate home path for new users",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_AUTOCREATE"},
Destination: &cfg.Reva.Storages.OwnCloud.Autocreate,
},
&cli.StringFlag{
Name: "storage-owncloud-redis",
Value: ":6379",
@@ -305,5 +318,12 @@ func StorageHomeWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
},
&cli.StringFlag{
Name: "storage-owncloud-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_LAYOUT"},
Destination: &cfg.Reva.Storages.OwnCloud.Layout,
},
}
}
+20 -7
View File
@@ -214,6 +214,12 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
@@ -235,6 +241,13 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,
},
// local
@@ -262,13 +275,6 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_SCAN"},
Destination: &cfg.Reva.Storages.OwnCloud.Scan,
},
&cli.BoolFlag{
Name: "storage-owncloud-autocreate",
Value: true,
Usage: "autocreate home path for new users",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_AUTOCREATE"},
Destination: &cfg.Reva.Storages.OwnCloud.Autocreate,
},
&cli.StringFlag{
Name: "storage-owncloud-redis",
Value: ":6379",
@@ -276,6 +282,13 @@ func StorageHomeDataWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
},
&cli.StringFlag{
Name: "storage-owncloud-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_LAYOUT"},
Destination: &cfg.Reva.Storages.OwnCloud.Layout,
},
// Gateway
+27 -7
View File
@@ -172,6 +172,13 @@ 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: true, // TODO jfd we may need to default to true here so the new webdav endpoint will autocreate user homes as well
Usage: "if enabled home dirs will be automatically created",
EnvVars: []string{"REVA_STORAGE_HOME_ENABLE_HOME_CREATION"},
Destination: &cfg.Reva.StorageHome.EnableHomeCreation,
},
// Storage drivers
@@ -243,6 +250,12 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
@@ -264,6 +277,13 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,
},
// local
@@ -291,13 +311,6 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_SCAN"},
Destination: &cfg.Reva.Storages.OwnCloud.Scan,
},
&cli.BoolFlag{
Name: "storage-owncloud-autocreate",
Value: true,
Usage: "autocreate home path for new users",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_AUTOCREATE"},
Destination: &cfg.Reva.Storages.OwnCloud.Autocreate,
},
&cli.StringFlag{
Name: "storage-owncloud-redis",
Value: ":6379",
@@ -305,5 +318,12 @@ func StorageOCWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
},
&cli.StringFlag{
Name: "storage-owncloud-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_LAYOUT"},
Destination: &cfg.Reva.Storages.OwnCloud.Layout,
},
}
}
+20 -7
View File
@@ -214,6 +214,12 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
@@ -235,6 +241,13 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,
},
// local
@@ -262,13 +275,6 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_SCAN"},
Destination: &cfg.Reva.Storages.OwnCloud.Scan,
},
&cli.BoolFlag{
Name: "storage-owncloud-autocreate",
Value: true,
Usage: "autocreate home path for new users",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_AUTOCREATE"},
Destination: &cfg.Reva.Storages.OwnCloud.Autocreate,
},
&cli.StringFlag{
Name: "storage-owncloud-redis",
Value: ":6379",
@@ -276,6 +282,13 @@ func StorageOCDataWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
},
&cli.StringFlag{
Name: "storage-owncloud-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_LAYOUT"},
Destination: &cfg.Reva.Storages.OwnCloud.Layout,
},
// Gateway
+26 -7
View File
@@ -171,6 +171,12 @@ 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,
},
// Storage drivers
@@ -242,6 +248,12 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_USE_KEYTAB"},
Destination: &cfg.Reva.Storages.EOS.UseKeytab,
},
&cli.BoolFlag{
Name: "storage-eos-enable-home",
Usage: "enable the creation of home directories",
EnvVars: []string{"REVA_STORAGE_EOS_ENABLE_HOME"},
Destination: &cfg.Reva.Storages.EOS.EnableHome,
},
&cli.StringFlag{
Name: "storage-eos-sec-protocol",
Value: "",
@@ -263,6 +275,13 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_EOS_SINGLE_USERNAME"},
Destination: &cfg.Reva.Storages.EOS.SingleUsername,
},
&cli.StringFlag{
Name: "storage-eos-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_EOS_LAYOUT"},
Destination: &cfg.Reva.Storages.EOS.Layout,
},
// local
@@ -290,13 +309,6 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_SCAN"},
Destination: &cfg.Reva.Storages.OwnCloud.Scan,
},
&cli.BoolFlag{
Name: "storage-owncloud-autocreate",
Value: true,
Usage: "autocreate home path for new users",
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_AUTOCREATE"},
Destination: &cfg.Reva.Storages.OwnCloud.Autocreate,
},
&cli.StringFlag{
Name: "storage-owncloud-redis",
Value: ":6379",
@@ -304,5 +316,12 @@ func StorageRootWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_REDIS_ADDR"},
Destination: &cfg.Reva.Storages.OwnCloud.Redis,
},
&cli.StringFlag{
Name: "storage-owncloud-layout",
Value: "{{.Username}}",
Usage: `"layout of the users home dir path on disk, in addition to {{.Username}}, {{.UsernameLower}} and {{.Provider}} also supports prefixing dirs: "{{.UsernamePrefixCount.2}}/{{.UsernameLower}}" will turn "Einstein" into "Ei/Einstein" `,
EnvVars: []string{"REVA_STORAGE_OWNCLOUD_LAYOUT"},
Destination: &cfg.Reva.Storages.OwnCloud.Layout,
},
}
}