{"modulePath":"github.com/iwebhosting/packer","version":"v0.6.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package openstack\n\n## Constants\n\n```go\nconst BuilderId = \"mitchellh.openstack\"\n```\nThe unique ID for this builder\n\n## Functions\n\n```go\nfunc SSHAddress(csp gophercloud.CloudServersProvider, port int) func(multistep.StateBag) (string, error)\n```\nSSHAddress returns a function that can be given to the SSH communicator for determining the SSH address based on the server AccessIPv4 setting..\n\n```go\nfunc SSHConfig(username string) func(multistep.StateBag) (*ssh.ClientConfig, error)\n```\nSSHConfig returns a function that can be used for the SSH communicator config for connecting to the instance created over SSH using the generated private key.\n\n```go\nfunc WaitForImage(csp gophercloud.CloudServersProvider, imageId string) error\n```\nWaitForImage waits for the given Image ID to become ready.\n\n```go\nfunc WaitForState(conf *StateChangeConf) (i interface{}, err error)\n```\nWaitForState watches an object and waits for it to achieve a certain state.\n\n## Types\n\n```go\ntype AccessConfig struct {\n\tUsername  string `mapstructure:\"username\"`\n\tPassword  string `mapstructure:\"password\"`\n\tApiKey    string `mapstructure:\"api_key\"`\n\tProject   string `mapstructure:\"project\"`\n\tProvider  string `mapstructure:\"provider\"`\n\tRawRegion string `mapstructure:\"region\"`\n\tProxyUrl  string `mapstructure:\"proxy_url\"`\n\tTenantId  string `mapstructure:\"tenant_id\"`\n}\n```\nAccessConfig is for common configuration related to openstack access\n\n```go\nfunc (c *AccessConfig) Auth() (gophercloud.AccessProvider, error)\n```\nAuth returns a valid Auth object for access to openstack services, or an error if the authentication couldn't be resolved.\n\n```go\nfunc (c *AccessConfig) Prepare(t *packer.ConfigTemplate) []error\n```\n\n```go\nfunc (c *AccessConfig) Region() string\n```\n\n```go\ntype Artifact struct {\n\t// ImageId of built image\n\tImageId string\n\n\t// BuilderId is the unique ID for the builder that created this image\n\tBuilderIdValue string\n\n\t// OpenStack connection for performing API stuff.\n\tConn gophercloud.CloudServersProvider\n}\n```\nArtifact is an artifact implementation that contains built images.\n\n```go\nfunc (a *Artifact) BuilderId() string\n```\n\n```go\nfunc (a *Artifact) Destroy() error\n```\n\n```go\nfunc (*Artifact) Files() []string\n```\n\n```go\nfunc (a *Artifact) Id() string\n```\n\n```go\nfunc (a *Artifact) String() string\n```\n\n```go\ntype Builder struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (b *Builder) Cancel()\n```\n\n```go\nfunc (b *Builder) Prepare(raws ...interface{}) ([]string, error)\n```\n\n```go\nfunc (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error)\n```\n\n```go\ntype ImageConfig struct {\n\tImageName string `mapstructure:\"image_name\"`\n}\n```\nImageConfig is for common configuration related to creating Images.\n\n```go\nfunc (c *ImageConfig) Prepare(t *packer.ConfigTemplate) []error\n```\n\n```go\ntype RunConfig struct {\n\tSourceImage       string   `mapstructure:\"source_image\"`\n\tFlavor            string   `mapstructure:\"flavor\"`\n\tRawSSHTimeout     string   `mapstructure:\"ssh_timeout\"`\n\tSSHUsername       string   `mapstructure:\"ssh_username\"`\n\tSSHPort           int      `mapstructure:\"ssh_port\"`\n\tOpenstackProvider string   `mapstructure:\"openstack_provider\"`\n\tUseFloatingIp     bool     `mapstructure:\"use_floating_ip\"`\n\tFloatingIpPool    string   `mapstructure:\"floating_ip_pool\"`\n\tFloatingIp        string   `mapstructure:\"floating_ip\"`\n\tSecurityGroups    []string `mapstructure:\"security_groups\"`\n\t// contains filtered or unexported fields\n}\n```\nRunConfig contains configuration for running an instance from a source image and details on how to access that launched image.\n\n```go\nfunc (c *RunConfig) Prepare(t *packer.ConfigTemplate) []error\n```\n\n```go\nfunc (c *RunConfig) SSHTimeout() time.Duration\n```\n\n```go\ntype StateChangeConf struct {\n\tPending   []string\n\tRefresh   StateRefreshFunc\n\tStepState multistep.StateBag\n\tTarget    string\n}\n```\nStateChangeConf is the configuration struct used for \\`WaitForState\\`.\n\n```go\ntype StateRefreshFunc func() (result interface{}, state string, progress int, err error)\n```\nStateRefreshFunc is a function type used for StateChangeConf that is responsible for refreshing the item being watched for a state change.\n\nIt returns three results. \\`result\\` is any object that will be returned as the final object after waiting for state change. This allows you to return the final updated object, for example an openstack instance after refreshing it.\n\n\\`state\\` is the latest state of that object. And \\`err\\` is any error that may have happened while refreshing the state.\n\n```go\nfunc ServerStateRefreshFunc(csp gophercloud.CloudServersProvider, s *gophercloud.Server) StateRefreshFunc\n```\nServerStateRefreshFunc returns a StateRefreshFunc that is used to watch an openstacn server.\n\n```go\ntype StepAllocateIp struct {\n\tFloatingIpPool string\n\tFloatingIp     string\n}\n```\n\n```go\nfunc (s *StepAllocateIp) Cleanup(state multistep.StateBag)\n```\n\n```go\nfunc (s *StepAllocateIp) Run(state multistep.StateBag) multistep.StepAction\n```\n\n```go\ntype StepKeyPair struct {\n\tDebug        bool\n\tDebugKeyPath string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (s *StepKeyPair) Cleanup(state multistep.StateBag)\n```\n\n```go\nfunc (s *StepKeyPair) Run(state multistep.StateBag) multistep.StepAction\n```\n\n```go\ntype StepRunSourceServer struct {\n\tFlavor         string\n\tName           string\n\tSourceImage    string\n\tSecurityGroups []string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (s *StepRunSourceServer) Cleanup(state multistep.StateBag)\n```\n\n```go\nfunc (s *StepRunSourceServer) Run(state multistep.StateBag) multistep.StepAction\n```\n\n","path":"github.com/iwebhosting/packer/builder/openstack","name":"openstack","synopsis":"","isRedistributable":true}
