ncloud

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const BuilderID = "ncloud.server.image"

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	ServerImage *ncloud.ServerImage
}

func (*Artifact) BuilderId

func (*Artifact) BuilderId() string

func (*Artifact) Destroy

func (a *Artifact) Destroy() error

func (*Artifact) Files

func (a *Artifact) Files() []string

func (*Artifact) Id

func (a *Artifact) Id() string

func (*Artifact) State

func (a *Artifact) State(name string) interface{}

func (*Artifact) String

func (a *Artifact) String() string

type Builder

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

Builder assume this implements packer.Builder

func (*Builder) Cancel

func (b *Builder) Cancel()

func (*Builder) Prepare

func (b *Builder) Prepare(raws ...interface{}) ([]string, error)

func (*Builder) Run

func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error)

type Config

type Config struct {
	common.PackerConfig `mapstructure:",squash"`

	AccessKey                         string `mapstructure:"access_key"`
	SecretKey                         string `mapstructure:"secret_key"`
	ServerImageProductCode            string `mapstructure:"server_image_product_code"`
	ServerProductCode                 string `mapstructure:"server_product_code"`
	MemberServerImageNo               string `mapstructure:"member_server_image_no"`
	ServerImageName                   string `mapstructure:"server_image_name"`
	ServerImageDescription            string `mapstructure:"server_image_description"`
	UserData                          string `mapstructure:"user_data"`
	UserDataFile                      string `mapstructure:"user_data_file"`
	BlockStorageSize                  int    `mapstructure:"block_storage_size"`
	Region                            string `mapstructure:"region"`
	AccessControlGroupConfigurationNo string `mapstructure:"access_control_group_configuration_no"`

	Comm communicator.Config `mapstructure:",squash"`
	// contains filtered or unexported fields
}

Config is structure to use packer builder plugin for Naver Cloud Platform

func NewConfig

func NewConfig(raws ...interface{}) (*Config, []string, error)

NewConfig checks parameters

type LoginKey

type LoginKey struct {
	KeyName    string
	PrivateKey string
}

type StepCreateBlockStorageInstance

type StepCreateBlockStorageInstance struct {
	Conn                       *ncloud.Conn
	CreateBlockStorageInstance func(serverInstanceNo string) (string, error)
	Say                        func(message string)
	Error                      func(e error)
	Config                     *Config
}

StepCreateBlockStorageInstance struct is for making extra block storage

func NewStepCreateBlockStorageInstance

func NewStepCreateBlockStorageInstance(conn *ncloud.Conn, ui packer.Ui, config *Config) *StepCreateBlockStorageInstance

NewStepCreateBlockStorageInstance make StepCreateBlockStorage struct to make extra block storage

func (*StepCreateBlockStorageInstance) Cleanup

func (*StepCreateBlockStorageInstance) Run

type StepCreateLoginKey

type StepCreateLoginKey struct {
	Conn           *ncloud.Conn
	CreateLoginKey func() (*LoginKey, error)
	Say            func(message string)
	Error          func(e error)
}

func NewStepCreateLoginKey

func NewStepCreateLoginKey(conn *ncloud.Conn, ui packer.Ui) *StepCreateLoginKey

func (*StepCreateLoginKey) Cleanup

func (s *StepCreateLoginKey) Cleanup(state multistep.StateBag)

func (*StepCreateLoginKey) Run

type StepCreatePublicIPInstance

type StepCreatePublicIPInstance struct {
	Conn                                    *ncloud.Conn
	CreatePublicIPInstance                  func(serverInstanceNo string) (*ncloud.PublicIPInstance, error)
	WaiterAssociatePublicIPToServerInstance func(serverInstanceNo string, publicIP string) error
	Say                                     func(message string)
	Error                                   func(e error)
	Config                                  *Config
}

func NewStepCreatePublicIPInstance

func NewStepCreatePublicIPInstance(conn *ncloud.Conn, ui packer.Ui, config *Config) *StepCreatePublicIPInstance

func (*StepCreatePublicIPInstance) Cleanup

func (s *StepCreatePublicIPInstance) Cleanup(state multistep.StateBag)

func (*StepCreatePublicIPInstance) Run

type StepCreateServerImage

type StepCreateServerImage struct {
	Conn              *ncloud.Conn
	CreateServerImage func(serverInstanceNo string) (*ncloud.ServerImage, error)
	Say               func(message string)
	Error             func(e error)
	Config            *Config
}

func NewStepCreateServerImage

func NewStepCreateServerImage(conn *ncloud.Conn, ui packer.Ui, config *Config) *StepCreateServerImage

func (*StepCreateServerImage) Cleanup

func (*StepCreateServerImage) Run

type StepCreateServerInstance

type StepCreateServerInstance struct {
	Conn                               *ncloud.Conn
	CreateServerInstance               func(loginKeyName string, zoneNo string, feeSystemTypeCode string) (string, error)
	CheckServerInstanceStatusIsRunning func(serverInstanceNo string) error
	Say                                func(message string)
	Error                              func(e error)
	Config                             *Config
	// contains filtered or unexported fields
}

func NewStepCreateServerInstance

func NewStepCreateServerInstance(conn *ncloud.Conn, ui packer.Ui, config *Config) *StepCreateServerInstance

func (*StepCreateServerInstance) Cleanup

func (s *StepCreateServerInstance) Cleanup(state multistep.StateBag)

func (*StepCreateServerInstance) Run

type StepDeleteBlockStorageInstance

type StepDeleteBlockStorageInstance struct {
	Conn                       *ncloud.Conn
	DeleteBlockStorageInstance func(blockStorageInstanceNo string) error
	Say                        func(message string)
	Error                      func(e error)
	Config                     *Config
}

func NewStepDeleteBlockStorageInstance

func NewStepDeleteBlockStorageInstance(conn *ncloud.Conn, ui packer.Ui, config *Config) *StepDeleteBlockStorageInstance

func (*StepDeleteBlockStorageInstance) Cleanup

func (*StepDeleteBlockStorageInstance) Run

type StepGetRootPassword

type StepGetRootPassword struct {
	Conn            *ncloud.Conn
	GetRootPassword func(serverInstanceNo string, privateKey string) (string, error)
	Say             func(message string)
	Error           func(e error)
}

func NewStepGetRootPassword

func NewStepGetRootPassword(conn *ncloud.Conn, ui packer.Ui) *StepGetRootPassword

func (*StepGetRootPassword) Cleanup

func (*StepGetRootPassword) Run

type StepStopServerInstance

type StepStopServerInstance struct {
	Conn               *ncloud.Conn
	StopServerInstance func(serverInstanceNo string) error
	Say                func(message string)
	Error              func(e error)
}

func NewStepStopServerInstance

func NewStepStopServerInstance(conn *ncloud.Conn, ui packer.Ui) *StepStopServerInstance

func (*StepStopServerInstance) Cleanup

func (*StepStopServerInstance) Run

type StepTerminateServerInstance

type StepTerminateServerInstance struct {
	Conn                    *ncloud.Conn
	TerminateServerInstance func(serverInstanceNo string) error
	Say                     func(message string)
	Error                   func(e error)
}

func NewStepTerminateServerInstance

func NewStepTerminateServerInstance(conn *ncloud.Conn, ui packer.Ui) *StepTerminateServerInstance

func (*StepTerminateServerInstance) Cleanup

func (*StepTerminateServerInstance) Run

type StepValidateTemplate

type StepValidateTemplate struct {
	Conn     *ncloud.Conn
	Validate func() error
	Say      func(message string)
	Error    func(e error)
	Config   *Config

	FeeSystemTypeCode string
	// contains filtered or unexported fields
}

StepValidateTemplate : struct for Validation a template

func NewStepValidateTemplate

func NewStepValidateTemplate(conn *ncloud.Conn, ui packer.Ui, config *Config) *StepValidateTemplate

NewStepValidateTemplate : function for Validation a template

func (*StepValidateTemplate) Cleanup

Cleanup : cleanup on error

func (*StepValidateTemplate) Run

Run : main function for validation a template

Jump to

Keyboard shortcuts

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