stacks

package
v19.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const AlphanumericWithDashesAndUnderscores string = "^[-a-zA-Z0-9-_]+$"

AlphanumericWithDashesAndUnderscores is the regexp pattern to identify bucket names

View Source
const DefaultSecurityGroupName = "sg-safescale"

DefaultSecurityGroupName is the name of the default security group used by SafeScale

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationOptions

type AuthenticationOptions struct {
	// IdentityEndpoint specifies the HTTP endpoint that is required to work with
	// the Identity API of the appropriate version. While it's ultimately needed by
	// all of the identity services, it will often be populated by a provider-level
	// function.
	IdentityEndpoint string

	// Username is required if using Identity V2 API. Consult with your provider's
	// control panel to discover your account's username. In Identity V3, either
	// UserID or a combination of Username and DomainID or DomainName are needed.
	Username, UserID, AccessKeyID string

	// Exactly one of Password or APIKey is required for the Identity V2 and V3
	// APIs. Consult with your provider's control panel to discover your account's
	// preferred method of authentication.
	Password, APIKey, SecretAccessKey string

	// At most one of DomainID and DomainName must be provided if using Username
	// with Identity V3. Otherwise, either are optional.
	DomainID, DomainName string

	// The TenantID and TenantName fields are optional for the Identity V2 API.
	// Some providers allow you to specify a TenantName instead of the TenantId.
	// Some require both. Your provider's authentication policies will determine
	// how these fields influence authentication.
	TenantID, TenantName string

	// ProjectName ...
	ProjectName, ProjectID string

	// AllowReauth should be set to true if you grant permission for Gophercloud to
	// cache your credentials in memory, and to allow Gophercloud to attempt to
	// re-authenticate automatically if/when your token expires.  If you set it to
	// false, it will not cache these settings, but re-authentication will not be
	// possible. This setting defaults to false.
	//
	// NOTE: The reauth function will try to re-authenticate endlessly if left unchecked.
	// The way to limit the number of attempts is to provide a custom HTTP client to the provider client
	// and provide a transport that implements the RoundTripper interface and stores the number of failed retries.
	// For an example of this, see here: https://github.com/gophercloud/rack/blob/1.0.0/auth/clients.go#L311
	AllowReauth bool

	// TokenID allows users to authenticate (possibly as another user) with an
	// authentication token ID.
	TokenID string

	//Openstack region (data center) where the infrastructure will be created
	Region string `valid:"alphanumwithdashesandunderscores,required"`

	AvailabilityZone string `valid:"alphanumwithdashesandunderscores,required"`

	//FloatingIPPool name of the floating IP pool
	//Necessary only if UseFloatingIP is true
	FloatingIPPool string

	// Name of the VPC (Virtual Private Cloud)
	VPCName string
	// CIDR if the VPC
	VPCCIDR string
}

AuthenticationOptions fields are the union of those recognized by each identity implementation and provider to be able to carry different but necessary information to stack implementations

type ConfigurationOptions

type ConfigurationOptions struct {
	// Name of the provider (external) network
	ProviderNetwork string

	// DNSList list of DNS
	DNSList []string

	// UseFloatingIP indicates if floating IP are used (optional)
	UseFloatingIP bool

	// UseLayer3Networking indicates if layer 3 networking features (router) can be used
	// if UseFloatingIP is true UseLayer3Networking must be true
	UseLayer3Networking bool

	UseNATService bool

	// AutoHostNetworkInterfaces indicates if network interfaces are configured automatically by the provider or needs a post configuration
	AutoHostNetworkInterfaces bool

	// VolumeSpeeds map volume types with volume speeds
	VolumeSpeeds map[string]VolumeSpeed.Enum

	// DefaultImage names the image to use when not specified by the user
	DefaultImage string

	// MetadataBucket contains the name of the Object Storage bucket that will store metadata
	MetadataBucket string

	//OperatorUsername contain the name of the safescale created user
	OperatorUsername string

	// WhitelistTemplateRegexp contains the regexp string to white list host templates
	WhitelistTemplateRegexp *regexp.Regexp
	// BlacklistTemplateRegexp contains the regexp string to black list host templates
	BlacklistTemplateRegexp *regexp.Regexp
	// WhitelistImageRegexp contains the regexp string to white list images
	WhitelistImageRegexp *regexp.Regexp
	// BlacklistImageRegexp contains the regexp string to black list images
	BlacklistImageRegexp *regexp.Regexp
}

ConfigurationOptions are the stack configuration options

type GCPConfiguration

type GCPConfiguration struct {
	Type         string `json:"type" validate:"required"`
	ProjectID    string `json:"project_id"`
	PrivateKeyID string `json:"private_key_id"`
	PrivateKey   string `json:"private_key"`
	ClientEmail  string `json:"client_email"`
	ClientID     string `json:"client_id"`
	AuthURI      string `json:"auth_uri"`
	TokenURI     string `json:"token_uri"`
	AuthProvider string `json:"auth_provider_x509_cert_url"`
	ClientCert   string `json:"client_x509_cert_url"`
	Region       string `json:"-"`
	Zone         string `json:"-"`
	NetworkName  string `json:"-"`
}

GCPConfiguration stores Google cloud platform configuration

type LocalConfiguration

type LocalConfiguration struct {
	ImagesJSONPath string
	// Local Path of the json file defining the templates
	TemplatesJSONPath string
	// Local Path of the libvirt pool where all disks created by libvirt come from and are stored
	LibvirtStorage string
	// Connection identifier to the visualization device
	URI string
}

LocalConfiguration configuration options

type VCloudConfigurationOptions

type VCloudConfigurationOptions struct {
	Insecure bool
}

VCloudConfigurationOptions stores VCloud configuration options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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