Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
988cf2fe
Commit
988cf2fe
authored
Jul 15, 2015
by
Travis Truman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #2434 by adding OpenStack Glance metadata support
parent
f2750562
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
builder/openstack/image_config.go
builder/openstack/image_config.go
+2
-1
builder/openstack/step_create_image.go
builder/openstack/step_create_image.go
+2
-1
website/source/docs/builders/openstack.html.markdown
website/source/docs/builders/openstack.html.markdown
+2
-0
No files found.
builder/openstack/image_config.go
View file @
988cf2fe
...
@@ -8,7 +8,8 @@ import (
...
@@ -8,7 +8,8 @@ import (
// ImageConfig is for common configuration related to creating Images.
// ImageConfig is for common configuration related to creating Images.
type
ImageConfig
struct
{
type
ImageConfig
struct
{
ImageName
string
`mapstructure:"image_name"`
ImageName
string
`mapstructure:"image_name"`
ImageMetadata
map
[
string
]
string
`mapstructure:"metadata"`
}
}
func
(
c
*
ImageConfig
)
Prepare
(
ctx
*
interpolate
.
Context
)
[]
error
{
func
(
c
*
ImageConfig
)
Prepare
(
ctx
*
interpolate
.
Context
)
[]
error
{
...
...
builder/openstack/step_create_image.go
View file @
988cf2fe
...
@@ -30,7 +30,8 @@ func (s *stepCreateImage) Run(state multistep.StateBag) multistep.StepAction {
...
@@ -30,7 +30,8 @@ func (s *stepCreateImage) Run(state multistep.StateBag) multistep.StepAction {
// Create the image
// Create the image
ui
.
Say
(
fmt
.
Sprintf
(
"Creating the image: %s"
,
config
.
ImageName
))
ui
.
Say
(
fmt
.
Sprintf
(
"Creating the image: %s"
,
config
.
ImageName
))
imageId
,
err
:=
servers
.
CreateImage
(
client
,
server
.
ID
,
servers
.
CreateImageOpts
{
imageId
,
err
:=
servers
.
CreateImage
(
client
,
server
.
ID
,
servers
.
CreateImageOpts
{
Name
:
config
.
ImageName
,
Name
:
config
.
ImageName
,
Metadata
:
config
.
ImageMetadata
,
})
.
ExtractImageID
()
})
.
ExtractImageID
()
if
err
!=
nil
{
if
err
!=
nil
{
err
:=
fmt
.
Errorf
(
"Error creating image: %s"
,
err
)
err
:=
fmt
.
Errorf
(
"Error creating image: %s"
,
err
)
...
...
website/source/docs/builders/openstack.html.markdown
View file @
988cf2fe
...
@@ -96,6 +96,8 @@ can be configured for this builder.
...
@@ -96,6 +96,8 @@ can be configured for this builder.
*
`rackconnect_wait`
(boolean) - For rackspace, whether or not to wait for
*
`rackconnect_wait`
(boolean) - For rackspace, whether or not to wait for
Rackconnect to assign the machine an IP address before connecting via SSH.
Rackconnect to assign the machine an IP address before connecting via SSH.
Defaults to false.
Defaults to false.
*
`metadata`
(object of key/value strings) - Glance metadata that will be applied
to the image.
## Basic Example: Rackspace public cloud
## Basic Example: Rackspace public cloud
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment