{"modulePath":"github.com/stackpointcloud/packer","version":"v0.10.1","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 CommHost(\n\tclient *gophercloud.ServiceClient,\n\tsshinterface string,\n\tsshipversion string) func(multistep.StateBag) (string, error)\n```\nCommHost looks up the host for the communicator.\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(client *gophercloud.ServiceClient, 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\tUserID           string `mapstructure:\"user_id\"`\n\tPassword         string `mapstructure:\"password\"`\n\tAPIKey           string `mapstructure:\"api_key\"`\n\tIdentityEndpoint string `mapstructure:\"identity_endpoint\"`\n\tTenantID         string `mapstructure:\"tenant_id\"`\n\tTenantName       string `mapstructure:\"tenant_name\"`\n\tDomainID         string `mapstructure:\"domain_id\"`\n\tDomainName       string `mapstructure:\"domain_name\"`\n\tInsecure         bool   `mapstructure:\"insecure\"`\n\tRegion           string `mapstructure:\"region\"`\n\tEndpointType     string `mapstructure:\"endpoint_type\"`\n\t// contains filtered or unexported fields\n}\n```\nAccessConfig is for common configuration related to openstack access\n\n```go\nfunc (c *AccessConfig) Prepare(ctx *interpolate.Context) []error\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\tClient *gophercloud.ServiceClient\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) State(name string) interface{}\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 Config struct {\n\tcommon.PackerConfig `mapstructure:\",squash\"`\n\n\tAccessConfig `mapstructure:\",squash\"`\n\tImageConfig  `mapstructure:\",squash\"`\n\tRunConfig    `mapstructure:\",squash\"`\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype ImageConfig struct {\n\tImageName     string            `mapstructure:\"image_name\"`\n\tImageMetadata map[string]string `mapstructure:\"metadata\"`\n}\n```\nImageConfig is for common configuration related to creating Images.\n\n```go\nfunc (c *ImageConfig) Prepare(ctx *interpolate.Context) []error\n```\n\n```go\ntype RunConfig struct {\n\tComm           communicator.Config `mapstructure:\",squash\"`\n\tSSHKeyPairName string              `mapstructure:\"ssh_keypair_name\"`\n\tSSHInterface   string              `mapstructure:\"ssh_interface\"`\n\tSSHIPVersion   string              `mapstructure:\"ssh_ip_version\"`\n\n\tSourceImage      string   `mapstructure:\"source_image\"`\n\tSourceImageName  string   `mapstructure:\"source_image_name\"`\n\tFlavor           string   `mapstructure:\"flavor\"`\n\tAvailabilityZone string   `mapstructure:\"availability_zone\"`\n\tRackconnectWait  bool     `mapstructure:\"rackconnect_wait\"`\n\tFloatingIpPool   string   `mapstructure:\"floating_ip_pool\"`\n\tFloatingIp       string   `mapstructure:\"floating_ip\"`\n\tSecurityGroups   []string `mapstructure:\"security_groups\"`\n\tNetworks         []string `mapstructure:\"networks\"`\n\tUserData         string   `mapstructure:\"user_data\"`\n\tUserDataFile     string   `mapstructure:\"user_data_file\"`\n\n\tConfigDrive bool `mapstructure:\"config_drive\"`\n\n\t// Not really used, but here for BC\n\tOpenstackProvider string `mapstructure:\"openstack_provider\"`\n\tUseFloatingIp     bool   `mapstructure:\"use_floating_ip\"`\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(ctx *interpolate.Context) []error\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(\n\tclient *gophercloud.ServiceClient, s *servers.Server) StateRefreshFunc\n```\nServerStateRefreshFunc returns a StateRefreshFunc that is used to watch an openstack 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 StepGetPassword struct {\n\tDebug bool\n\tComm  *communicator.Config\n}\n```\nStepGetPassword reads the password from a booted OpenStack server and sets it on the WinRM config.\n\n```go\nfunc (s *StepGetPassword) Cleanup(multistep.StateBag)\n```\n\n```go\nfunc (s *StepGetPassword) Run(state multistep.StateBag) multistep.StepAction\n```\n\n```go\ntype StepKeyPair struct {\n\tDebug          bool\n\tDebugKeyPath   string\n\tKeyPairName    string\n\tPrivateKeyFile 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 StepLoadExtensions struct{}\n```\nStepLoadExtensions gets the FlavorRef from a Flavor. It first assumes that the Flavor is a ref and verifies it. Otherwise, it tries to find the flavor by name.\n\n```go\nfunc (s *StepLoadExtensions) Cleanup(state multistep.StateBag)\n```\n\n```go\nfunc (s *StepLoadExtensions) Run(state multistep.StateBag) multistep.StepAction\n```\n\n```go\ntype StepLoadFlavor struct {\n\tFlavor string\n}\n```\nStepLoadFlavor gets the FlavorRef from a Flavor. It first assumes that the Flavor is a ref and verifies it. Otherwise, it tries to find the flavor by name.\n\n```go\nfunc (s *StepLoadFlavor) Cleanup(state multistep.StateBag)\n```\n\n```go\nfunc (s *StepLoadFlavor) Run(state multistep.StateBag) multistep.StepAction\n```\n\n```go\ntype StepRunSourceServer struct {\n\tName             string\n\tSourceImage      string\n\tSourceImageName  string\n\tSecurityGroups   []string\n\tNetworks         []string\n\tAvailabilityZone string\n\tUserData         string\n\tUserDataFile     string\n\tConfigDrive      bool\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```go\ntype StepStopServer struct{}\n```\n\n```go\nfunc (s *StepStopServer) Cleanup(state multistep.StateBag)\n```\n\n```go\nfunc (s *StepStopServer) Run(state multistep.StateBag) multistep.StepAction\n```\n\n```go\ntype StepWaitForRackConnect struct {\n\tWait bool\n}\n```\n\n```go\nfunc (s *StepWaitForRackConnect) Cleanup(state multistep.StateBag)\n```\n\n```go\nfunc (s *StepWaitForRackConnect) Run(state multistep.StateBag) multistep.StepAction\n```\n\n","path":"github.com/stackpointcloud/packer/builder/openstack","name":"openstack","synopsis":"","isRedistributable":true}
