config

package
v0.0.0-...-8e9553d Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizedKeys

type AuthorizedKeys struct {
	Cpi  string `json:"cpi"`
	User string `json:"user, omitempty"`
}

AuthorizedKeys is the set of public ssh-rsa keys to be installed on the default initial account provisioned on a new vm

type CPIProperties

type CPIProperties struct {
	OAO      OAOProperties
	Agent    registry.AgentOptions
	Registry registry.ClientOptions
}

CPIProperties element in Cloud.Config

type Cloud

type Cloud struct {
	Plugin     string
	Properties CPIProperties
}

Cloud element in the Config

type Config

type Config struct {
	Cloud Cloud
}

Config represents the full CPI configuration

It is passed to CPI by its invoker (BOSH cli or Director) via by the --configFile=<configfile> startup option.

func NewConfigFromPath

func NewConfigFromPath(configFile string, fs boshsys.FileSystem) (Config, error)

NewConfigFromPath unmarshals(builds) a Config from CPI configuration json persisted in a file on the file system.

func NewConfigFromString

func NewConfigFromString(configString string) (Config, error)

func (Config) Validate

func (c Config) Validate() error

Validate performs a deep validation of a Config

type OAOProperties

type OAOProperties struct {
	// APIToken is the token used to connect to 1&1
	APIToken string `json:"token"`

	SSHTunnel SSHTunnel `json:"sshTunnel,omitempty"`
}

OAOProperties contains the properties for configuring BOSH CPI for 1&1 Cloud Infrastructure

func (OAOProperties) Validate

func (b OAOProperties) Validate() error

Validate raises an error if any of the mandatory properties are missing

type SSHConfig

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

SSHConfig contains configuration used by the CPI for establishing SSH connection for configuring new vm instances

func (SSHConfig) LocalIdentityKeyPath

func (c SSHConfig) LocalIdentityKeyPath() string

LocalIdentityKeyPath returns the path to the identity file containing the key for establishing the connection

func (SSHConfig) RemoteUser

func (c SSHConfig) RemoteUser() string

RemoteUser returns the name of the user on the target instance

func (SSHConfig) UsePublicIP

func (c SSHConfig) UsePublicIP() bool

UsePublicIP returns true if the SSH connection should be tried on the public IP of the target instance

type SSHTunnel

type SSHTunnel struct {
	LocalPort   int    `json:"localPort"`
	UsePublicIP bool   `json:"usePublicIP,omitempty"`
	User        string `json:"user"`
	Duration    string `json:"duration"`
}

SSHTunnel holds the CPI configuration for creating a forward SSH tunnel to a newly created vm

func (SSHTunnel) IsConfigured

func (c SSHTunnel) IsConfigured() bool

IsConfigured determines if an SSHTunnel has been configured or not

Jump to

Keyboard shortcuts

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