env

package
v0.5.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CRedisImage    = "redis:8.0.1-alpine"
	CRedisPort     = 6379
	CRedisPassword = "password"

	CKeystoneImage                    = "ghcr.io/aiivashchenko/docker-keystone:27.0.0"
	CKeystoneExternalPort             = 5000
	CKeystoneAdminPort                = 35357
	CKeystoneAdminUsername            = "admin"
	CKeystoneAdminPassword            = "password"
	CKeystoneAdminDomainName          = "Default"
	CKeystoneAdminTenantName          = "admin"
	CkeystoneAdminRoleName            = "admin"
	CKeystoneObjectStoreServiceType   = "object-store"
	CKeystoneServiceProjectName       = "service"
	CKeystoneSwiftServiceName         = "swift"
	CKeystoneSwiftUsername            = "swift"
	CKeystoneSwiftPassword            = "swiftpass"
	CKeystoneSwiftEndpointName        = "swift"
	CKeystoneSwiftEndpointURLTemplate = "http://%s:%d/v1/AUTH_$(tenant_id)s"
	CKeystoneSwiftOperatorRole        = "swift-operator"
	CKeystoneSwiftResellerRole        = "swift-reseller"
	CKeystoneCephUsername             = "ceph"
	CKeystoneCephPassword             = "cephpass"
	CKeystoneCephServiceName          = "ceph"
	CKeystoneCephEndpointName         = "ceph"
	CKeystoneCephEndpointURLTemplate  = "http://%s:%d/swift/v1/AUTH_$(tenant_id)s"
	CKeystoneCephOperatorRole         = "ceph-operator"
	CKeystoneCephResellerRole         = "ceph-reseller"

	CSwiftImage = "ghcr.io/aiivashchenko/docker-swift:2.35.0"
	CSwiftPort  = 8080

	CMinioImage          = "minio/minio:RELEASE.2025-05-24T17-08-30Z-cpuv1"
	CMinioUsername       = "minioadmin"
	CMinioPassword       = "minioadmin"
	CMinioS3Port         = 9000
	CMinioManagementPort = 9001

	CCephX8664Image       = "quay.io/ceph/demo:main-985bb830-main-centos-stream8-x86_64"
	CCephARM64Image       = "quay.io/ceph/demo:main-985bb83-main-centos-arm64-stream8-aarch64"
	CCephPublicNetwork    = "127.0.0.1/32"
	CCephMonIP            = "127.0.0.1"
	CCephDomainName       = "localhost"
	CCephDemoUID          = "cephuid"
	CCephOSDDirectoryMode = "directory"
	CCephAPIPort          = 8080

	CContainerStopDeadline = 10 * time.Second

	CNATPortTemplate = "%d/tcp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CephAccessConfig

type CephAccessConfig struct {
	Port     ContainerPort
	Host     ContainerHost
	Keystone StorageKeystoneAccessConfig
}

type CephRGWTemplateValues

type CephRGWTemplateValues struct {
	AuthHost         string
	ExternalAuthPort int
	AdminProject     string
	AdminDomain      string
	AdminUser        string
	AdminPassword    string
	OperatorRole     string
	ResellerRole     string
}

type ComponentCreationConfig

type ComponentCreationConfig struct {
	Dependencies    []string
	DisabledLogs    []string
	InstantiateFunc func(context.Context, *TestEnvironment, string, *ComponentCreationConfig) error
}

func AsCeph

func AsCeph(keystoneInstance string, opts ...ComponentOption) ComponentCreationConfig

func AsKeystone

func AsKeystone(opts ...ComponentOption) ComponentCreationConfig

func AsMinio

func AsRedis

func AsSwift

func AsSwift(keystoneInstance string, opts ...ComponentOption) ComponentCreationConfig

type ComponentOption

type ComponentOption interface {
	// contains filtered or unexported methods
}

ComponentOption interface to support Functional options for test-containers.

func WithDisabledSTDErrLog

func WithDisabledSTDErrLog() ComponentOption

WithDisabledSTDErrLog disables STDERR logs for the container.

func WithDisabledSTDOutLog

func WithDisabledSTDOutLog() ComponentOption

WithDisabledSTDOutLog disables STDOUT logs for the container.

type ContainerHost

type ContainerHost struct {
	NAT   string
	Local string
}

type ContainerLogConsumer

type ContainerLogConsumer struct {
	// contains filtered or unexported fields
}

func NewContainerLogConsumer

func NewContainerLogConsumer(componenetName string, disabled []string) *ContainerLogConsumer

func (*ContainerLogConsumer) Accept

type ContainerPort

type ContainerPort struct {
	Exposed   int
	Forwarded int
}

type KeystoneAccessConfig

type KeystoneAccessConfig struct {
	ExternalPort   ContainerPort
	AdminPort      ContainerPort
	Host           ContainerHost
	User           string
	Password       string
	TenantName     string
	DefaultDomain  *domains.Domain
	ServiceProject *projects.Project
}

type MinioAccessConfig

type MinioAccessConfig struct {
	S3Port         ContainerPort
	ManagementPort ContainerPort
	Host           ContainerHost
	User           string
	Password       string
}

type RedisAccessConfig

type RedisAccessConfig struct {
	Port     ContainerPort
	Host     ContainerHost
	Password string
}

type StorageKeystoneAccessConfig

type StorageKeystoneAccessConfig struct {
	OperatorRole *roles.Role
	ResellerRole *roles.Role
}

type SwiftAccessConfig

type SwiftAccessConfig struct {
	Port     ContainerPort
	Host     ContainerHost
	Keystone StorageKeystoneAccessConfig
}

type SwiftProxyConfigTemplateValues

type SwiftProxyConfigTemplateValues struct {
	AuthHost         string
	AdminAuthPort    int
	ExternalAuthPort int
	AdminTenant      string
	AdminDomain      string
	AdminUser        string
	AdminPassword    string
	OperatorRole     string
	ResellerRole     string
}

type TestEnvironment

type TestEnvironment struct {
	// contains filtered or unexported fields
}

func NewTestEnvironment

func NewTestEnvironment(ctx context.Context, envConfig map[string]ComponentCreationConfig) (*TestEnvironment, error)

func (*TestEnvironment) GetCephAccessConfig

func (r *TestEnvironment) GetCephAccessConfig(instanceName string) (*CephAccessConfig, error)

func (*TestEnvironment) GetKeystoneAccessConfig

func (r *TestEnvironment) GetKeystoneAccessConfig(instanceName string) (*KeystoneAccessConfig, error)

func (*TestEnvironment) GetMinioAccessConfig

func (r *TestEnvironment) GetMinioAccessConfig(instanceName string) (*MinioAccessConfig, error)

func (*TestEnvironment) GetRedisAccessConfig

func (r *TestEnvironment) GetRedisAccessConfig(instanceName string) (*RedisAccessConfig, error)

func (*TestEnvironment) GetSwiftAccessConfig

func (r *TestEnvironment) GetSwiftAccessConfig(instanceName string) (*SwiftAccessConfig, error)

func (*TestEnvironment) Terminate

func (r *TestEnvironment) Terminate(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL