Пример #1
0
func init() {
	r := gofigCore.NewRegistration("EBS")
	r.Key(gofig.String, "", "", "", Name+"."+AccessKey)
	r.Key(gofig.String, "", "", "", Name+"."+SecretKey)
	r.Key(gofig.String, "", "", "", Name+"."+Region)
	r.Key(gofig.String, "", "", "", Name+"."+Endpoint)
	r.Key(gofig.Int, "", DefaultMaxRetries, "", Name+"."+MaxRetries)
	r.Key(gofig.String, "", "", "Tag prefix for EBS naming", Name+"."+Tag)
	r.Key(gofig.String, "", "", "", Name+"."+KmsKeyID)

	r.Key(gofig.String, "", "", "", NameEC2+"."+AccessKey)
	r.Key(gofig.String, "", "", "", NameEC2+"."+SecretKey)
	r.Key(gofig.String, "", "", "", NameEC2+"."+Region)
	r.Key(gofig.String, "", "", "", NameEC2+"."+Endpoint)
	r.Key(gofig.Int, "", DefaultMaxRetries, "", NameEC2+"."+MaxRetries)
	r.Key(gofig.String, "", "", "Tag prefix for EBS naming", NameEC2+"."+Tag)
	r.Key(gofig.String, "", "", "", NameEC2+"."+KmsKeyID)

	r.Key(gofig.String, "", "", "", NameAWS+"."+AccessKey)
	r.Key(gofig.String, "", "", "", NameAWS+"."+SecretKey)
	r.Key(gofig.String, "", "", "", NameAWS+"."+Region)
	r.Key(gofig.String, "", "", "", NameAWS+"."+Endpoint)
	r.Key(gofig.Int, "", DefaultMaxRetries, "", NameAWS+"."+MaxRetries)
	r.Key(gofig.String, "", "", "Tag prefix for EBS naming", NameAWS+"."+Tag)
	r.Key(gofig.String, "", "", "", NameAWS+"."+KmsKeyID)

	gofigCore.Register(r)
}
Пример #2
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Amazon EC2")
	r.Key(gofig.String, "", "", "", "aws.accessKey")
	r.Key(gofig.String, "", "", "", "aws.secretKey")
	r.Key(gofig.String, "", "", "", "aws.region")
	return r
}
Пример #3
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Docker")
	r.Key(gofig.String, "", "", "", "docker.volumeType")
	r.Key(gofig.Int, "", 0, "", "docker.iops")
	r.Key(gofig.Int, "", 0, "", "docker.size")
	r.Key(gofig.String, "", "", "", "docker.availabilityZone")
	r.Key(gofig.String, "", "/data", "", "linux.volume.rootpath")
	return r
}
Пример #4
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Isilon")
	r.Key(gofig.String, "", "", "", "isilon.endpoint")
	r.Key(gofig.Bool, "", false, "", "isilon.insecure")
	r.Key(gofig.String, "", "", "", "isilon.userName")
	r.Key(gofig.String, "", "", "", "isilon.password")
	r.Key(gofig.String, "", "", "", "isilon.volumePath")
	r.Key(gofig.String, "", "", "", "isilon.nfsHost")
	return r
}
Пример #5
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("virtualbox")
	r.Key(gofig.String, "", "", "", "virtualbox.endpoint")
	r.Key(gofig.String, "", "", "", "virtualbox.volumePath")
	r.Key(gofig.String, "", "", "", "virtualbox.localMachineNameOrId")
	r.Key(gofig.String, "", "", "", "virtualbox.username")
	r.Key(gofig.String, "", "", "", "virtualbox.password")
	r.Key(gofig.Bool, "", false, "", "virtualbox.tls")
	r.Key(gofig.String, "", "", "", "virtualbox.controllerName")
	return r
}
Пример #6
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("XtremIO")
	r.Key(gofig.String, "", "", "", "xtremio.endpoint")
	r.Key(gofig.Bool, "", false, "", "xtremio.insecure")
	r.Key(gofig.String, "", "", "", "xtremio.userName")
	r.Key(gofig.String, "", "", "", "xtremio.password")
	r.Key(gofig.Bool, "", false, "", "xtremio.deviceMapper")
	r.Key(gofig.Bool, "", false, "", "xtremio.multipath")
	r.Key(gofig.Bool, "", false, "", "xtremio.remoteManagement")
	return r
}
Пример #7
0
func init() {
	r := gofigCore.NewRegistration("Rackspace")
	r.Key(gofig.String, "", "", "", "rackspace.authURL")
	r.Key(gofig.String, "", "", "", "rackspace.userID")
	r.Key(gofig.String, "", "", "", "rackspace.userName")
	r.Key(gofig.String, "", "", "", "rackspace.password")
	r.Key(gofig.String, "", "", "", "rackspace.tenantID")
	r.Key(gofig.String, "", "", "", "rackspace.tenantName")
	r.Key(gofig.String, "", "", "", "rackspace.domainID")
	r.Key(gofig.String, "", "", "", "rackspace.domainName")
	gofigCore.Register(r)
}
Пример #8
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Rackspace")
	r.Key(gofig.String, "", "", "", "rackspace.authURL")
	r.Key(gofig.String, "", "", "", "rackspace.userID")
	r.Key(gofig.String, "", "", "", "rackspace.userName")
	r.Key(gofig.String, "", "", "", "rackspace.password")
	r.Key(gofig.String, "", "", "", "rackspace.tenantID")
	r.Key(gofig.String, "", "", "", "rackspace.tenantName")
	r.Key(gofig.String, "", "", "", "rackspace.domainID")
	r.Key(gofig.String, "", "", "", "rackspace.domainName")
	return r
}
Пример #9
0
func init() {
	r := gofigCore.NewRegistration("EFS")
	r.Key(gofig.String, "", "", "AWS access key", ConfigEFSAccessKey)
	r.Key(gofig.String, "", "", "AWS secret key", ConfigEFSSecretKey)
	r.Key(gofig.String, "", "", "List of security groups", ConfigEFSSecGroups)
	r.Key(gofig.String, "", "", "AWS region", ConfigEFSRegion)
	r.Key(gofig.String, "", "", "AWS EFS endpoint", ConfigEFSEndpoint)
	r.Key(gofig.String, "", `elasticfilesystem.%s.amazonaws.com`,
		"AWS EFS endpoint format", ConfigEFSEndpointFormat)
	r.Key(gofig.String, "", "", "Tag prefix for EFS naming", ConfigEFSTag)
	r.Key(gofig.Bool, "", false,
		"A flag that disables the session cache", ConfigEFSDisableSessionCache)
	gofigCore.Register(r)
}
Пример #10
0
func init() {
	r := gofigCore.NewRegistration("VirtualBox")
	r.Key(gofig.String, "", "", "", "virtualbox.username")
	r.Key(gofig.String, "", "", "", "virtualbox.password")
	r.Key(gofig.String, "", "http://10.0.2.2:18083", "", "virtualbox.endpoint")
	r.Key(gofig.String, "", "", "", "virtualbox.volumePath")
	r.Key(gofig.String, "", "", "", "virtualbox.localMachineNameOrId")
	r.Key(gofig.Bool, "", false, "", "virtualbox.tls")
	r.Key(gofig.String, "", "SATA", "", "virtualbox.controllerName")
	r.Key(gofig.String, "", "/dev/disk/by-id", "", "virtualbox.diskIDPath")
	r.Key(gofig.String,
		"", "/sys/class/scsi_host/", "", "virtualbox.scsiHostPath")
	gofigCore.Register(r)
}
Пример #11
0
func mockRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Mock Provider")
	r.Yaml(`mockProvider:
    userName: admin
    useCerts: true
    docker:
        minVolSize: 16
`)
	r.Key(gofig.String, "", "admin", "", "mockProvider.userName")
	r.Key(gofig.String, "", "", "", "mockProvider.password")
	r.Key(gofig.Bool, "", false, "", "mockProvider.useCerts")
	r.Key(gofig.Int, "", 16, "", "mockProvider.docker.minVolSize")
	return r
}
Пример #12
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Openstack")
	r.Key(gofig.String, "", "", "", "openstack.authURL")
	r.Key(gofig.String, "", "", "", "openstack.userID")
	r.Key(gofig.String, "", "", "", "openstack.userName")
	r.Key(gofig.String, "", "", "", "openstack.password")
	r.Key(gofig.String, "", "", "", "openstack.tenantID")
	r.Key(gofig.String, "", "", "", "openstack.tenantName")
	r.Key(gofig.String, "", "", "", "openstack.domainID")
	r.Key(gofig.String, "", "", "", "openstack.domainName")
	r.Key(gofig.String, "", "", "", "openstack.regionName")
	r.Key(gofig.String, "", "", "", "openstack.availabilityZoneName")
	return r
}
Пример #13
0
func init() {
	r := gofigCore.NewRegistration("Isilon")
	r.Key(gofig.String, "", "", "", "isilon.endpoint")
	r.Key(gofig.Bool, "", false, "", "isilon.insecure")
	r.Key(gofig.String, "", "", "", "isilon.userName")
	r.Key(gofig.String, "", "", "", "isilon.group")
	r.Key(gofig.String, "", "", "", "isilon.password")
	r.Key(gofig.String, "", "", "", "isilon.volumePath")
	r.Key(gofig.String, "", "", "", "isilon.nfsHost")
	r.Key(gofig.String, "", "", "", "isilon.dataSubnet")
	r.Key(gofig.Bool, "", false, "", "isilon.quotas")
	r.Key(gofig.Bool, "", false, "", "isilon.sharedMounts")
	gofigCore.Register(r)
}
Пример #14
0
func init() {
	cfg := gofigCore.NewRegistration("Module")
	cfg.SetYAML(`
rexray:
    modules:
        default-docker:
            type:     docker
            desc:     The default docker module.
            host:     unix:///run/docker/plugins/rexray.sock
            spec:     /etc/docker/plugins/rexray.spec
            disabled: false
`)
	cfg.Key(gofig.String, "", "10s", "", "rexray.module.startTimeout")
	gofigCore.Register(cfg)
}
Пример #15
0
func globalRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Global")
	r.Yaml(`
rexray:
    host: tcp://:7979
    logLevel: warn
`)
	r.Key(gofig.String, "h", "tcp://:7979",
		"The REX-Ray host", "rexray.host",
		"host")
	r.Key(gofig.String, "l", "warn",
		"The log level (error, warn, info, debug)", "rexray.logLevel",
		"logLevel")
	return r
}
Пример #16
0
func init() {
	r := gofigCore.NewRegistration("Docker")
	r.Key(gofig.String, "", "ext4", "",
		types.ConfigIgVolOpsCreateDefaultFsType)
	r.Key(gofig.String, "", "", "", types.ConfigIgVolOpsCreateDefaultType)
	r.Key(gofig.String, "", "", "", types.ConfigIgVolOpsCreateDefaultIOPS)
	r.Key(gofig.String, "", "16", "", types.ConfigIgVolOpsCreateDefaultSize)
	r.Key(gofig.String, "", "", "", types.ConfigIgVolOpsCreateDefaultAZ)
	r.Key(gofig.String, "", types.Lib.Join("volumes"), "",
		types.ConfigIgVolOpsMountPath)
	r.Key(gofig.String, "", "/data", "", types.ConfigIgVolOpsMountRootPath)
	r.Key(gofig.Bool, "", true, "", types.ConfigIgVolOpsCreateImplicit)
	r.Key(gofig.Bool, "", false, "", types.ConfigIgVolOpsMountPreempt)
	gofigCore.Register(r)
}
Пример #17
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("ScaleIO")
	r.Key(gofig.String, "", "", "", "scaleio.endpoint")
	r.Key(gofig.Bool, "", false, "", "scaleio.insecure")
	r.Key(gofig.Bool, "", false, "", "scaleio.useCerts")
	r.Key(gofig.String, "", "", "", "scaleio.userID")
	r.Key(gofig.String, "", "", "", "scaleio.userName")
	r.Key(gofig.String, "", "", "", "scaleio.password")
	r.Key(gofig.String, "", "", "", "scaleio.systemID")
	r.Key(gofig.String, "", "", "", "scaleio.systemName")
	r.Key(gofig.String, "", "", "", "scaleio.protectionDomainID")
	r.Key(gofig.String, "", "", "", "scaleio.protectionDomainName")
	r.Key(gofig.String, "", "", "", "scaleio.storagePoolID")
	r.Key(gofig.String, "", "", "", "scaleio.storagePoolName")
	return r
}
Пример #18
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("GOVMAX")
	r.Key(gofig.String, "", "", "", "vmax.smishost")
	r.Key(gofig.String, "", "", "", "vmax.smisport")
	r.Key(gofig.Bool, "", false, "", "vmax.insecure")
	r.Key(gofig.String, "", "", "", "vmax.userName")
	r.Key(gofig.String, "", "", "", "vmax.password")
	r.Key(gofig.String, "", "", "", "vmax.sid")
	r.Key(gofig.String, "", "", "", "vmax.volumePrefix")
	r.Key(gofig.String, "", "", "", "vmax.storageGroup")
	r.Key(gofig.Bool, "", false, "", "vmax.vmh.insecure")
	r.Key(gofig.String, "", "", "", "vmax.vmh.userName")
	r.Key(gofig.String, "", "", "", "vmax.vmh.password")
	r.Key(gofig.String, "", "", "", "vmax.vmh.host")

	return r
}
Пример #19
0
func initConfig() {
	cfg := gofig.NewRegistration("Module")
	cfg.Yaml(`
rexray:
    modules:
        default-admin:
            type:     admin
            desc:     The default admin module.
            host:     tcp://127.0.0.1:7979
            disabled: false
        default-docker:
            type:     docker
            desc:     The default docker module.
            host:     unix:///run/docker/plugins/rexray.sock
            spec:     /etc/docker/plugins/rexray.spec
            disabled: false
`)
	gofig.Register(cfg)
}
Пример #20
0
func init() {
	gofigCore.SetGlobalConfigPath(util.EtcDirPath())
	gofigCore.SetUserConfigPath(path.Join(gotil.HomeDir(), util.DotDirName))
	r := gofigCore.NewRegistration("Global")
	r.SetYAML(`
rexray:
    logLevel: warn
`)
	r.Key(gofig.String, "h", "",
		"The libStorage host.", "rexray.host",
		"host")
	r.Key(gofig.String, "s", "",
		"The libStorage service.", "rexray.service",
		"service")
	r.Key(gofig.String, "l", "warn",
		"The log level (error, warn, info, debug)", "rexray.logLevel",
		"logLevel")
	gofigCore.Register(r)
}
Пример #21
0
func driverRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Driver")
	r.Yaml(`
rexray:
    osDrivers:
    - linux
    storageDrivers:
    - libstorage
    volumeDrivers:
    - docker
`)
	r.Key(gofig.String, "", "linux",
		"The OS drivers to consider", "rexray.osDrivers",
		"osDrivers")
	r.Key(gofig.String, "", "",
		"The storage drivers to consider", "rexray.storageDrivers",
		"storageDrivers")
	r.Key(gofig.String, "", "docker",
		"The volume drivers to consider", "rexray.volumeDrivers",
		"volumeDrivers")
	return r
}
Пример #22
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Google GCE")
	r.Key(gofig.String, "", "", "", "gce.keyfile")
	return r
}
Пример #23
0
func init() {
	cfg := gofigCore.NewRegistration("Module")
	cfg.Key(gofig.String, "", "10s", "", "rexray.module.startTimeout")
	gofigCore.Register(cfg)
}
Пример #24
0
func init() {
	defaultRootDir := types.Lib.Join("vfs")
	r := gofigCore.NewRegistration("VFS")
	r.Key(gofig.String, "", defaultRootDir, "", "vfs.root")
	gofigCore.Register(r)
}
Пример #25
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Linux")
	r.Key(gofig.Int, "", 0700, "", "linux.volume.filemode")
	r.Key(gofig.String, "", "/data", "", "linux.volume.rootpath")
	return r
}
Пример #26
0
func configRegistration() *gofig.Registration {
	r := gofig.NewRegistration("Volume")
	r.Key(gofig.Bool, "", false, "", "rexray.volume.mount.preempt", "preempt")
	return r
}
Пример #27
0
func init() {
	gofigCore.LogGetAndSet = false
	gofigCore.LogSecureKey = false
	gofigCore.LogFlattenEnvVars = false

	logLevelSz := os.Getenv("LIBSTORAGE_LOGGING_LEVEL")
	logLevel, err := log.ParseLevel(logLevelSz)
	if err != nil {
		logLevel = log.WarnLevel
	}
	log.SetLevel(logLevel)

	r := gofigCore.NewRegistration("libStorage")

	rk := func(
		keyType gofig.ConfigKeyTypes,
		defaultVal interface{},
		description string,
		keyVal types.ConfigKey,
		args ...interface{}) {

		if args == nil {
			args = []interface{}{keyVal}
		} else {
			args = append([]interface{}{keyVal}, args...)
		}

		r.Key(keyType, "", defaultVal, description, args...)
	}

	defaultAEM := types.UnixEndpoint.String()
	defaultStorageDriver := types.LibStorageDriverName
	defaultLogLevel := logLevel.String()
	defaultClientType := types.IntegrationClient.String()

	rk(gofig.String, "", "", types.ConfigHost)
	rk(gofig.String, "", "", types.ConfigService)
	rk(gofig.String, defaultAEM, "", types.ConfigServerAutoEndpointMode)
	rk(gofig.String, runtime.GOOS, "", types.ConfigOSDriver)
	rk(gofig.String, defaultStorageDriver, "", types.ConfigStorageDriver)
	rk(gofig.String, defaultIntDriver, "", types.ConfigIntegrationDriver)
	rk(gofig.String, defaultClientType, "", types.ConfigClientType)
	rk(gofig.String, defaultLogLevel, "", types.ConfigLogLevel)
	rk(gofig.String, "", logStdoutDesc, types.ConfigLogStderr)
	rk(gofig.String, "", logStderrDesc, types.ConfigLogStdout)
	rk(gofig.Bool, false, "", types.ConfigLogHTTPRequests)
	rk(gofig.Bool, false, "", types.ConfigLogHTTPResponses)
	rk(gofig.Bool, false, "", types.ConfigHTTPDisableKeepAlive)
	rk(gofig.Int, 300, "", types.ConfigHTTPWriteTimeout)
	rk(gofig.Int, 300, "", types.ConfigHTTPReadTimeout)
	rk(gofig.String, types.LSX.String(), "", types.ConfigExecutorPath)
	rk(gofig.Bool, false, "", types.ConfigExecutorNoDownload)
	rk(gofig.Bool, false, "", types.ConfigIgVolOpsMountPreempt)
	rk(gofig.Bool, false, "", types.ConfigIgVolOpsCreateDisable)
	rk(gofig.Bool, false, "", types.ConfigIgVolOpsRemoveDisable)
	rk(gofig.Bool, false, "", types.ConfigIgVolOpsUnmountIgnoreUsed)
	rk(gofig.Bool, true, "", types.ConfigIgVolOpsPathCacheEnabled)
	rk(gofig.Bool, true, "", types.ConfigIgVolOpsPathCacheAsync)
	rk(gofig.String, "30m", "", types.ConfigClientCacheInstanceID)
	rk(gofig.String, "30s", "", types.ConfigDeviceAttachTimeout)
	rk(gofig.Int, 0, "", types.ConfigDeviceScanType)
	rk(gofig.Bool, false, "", types.ConfigEmbedded)
	rk(gofig.String, "1m", "", types.ConfigServerTasksExeTimeout)
	rk(gofig.String, "0s", "", types.ConfigServerTasksLogTimeout)

	gofigCore.Register(r)
}