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
6aef1143
Commit
6aef1143
authored
Dec 11, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go fmt
parent
ccbb109d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
12 deletions
+11
-12
builder/vmware/driver_esx5.go
builder/vmware/driver_esx5.go
+1
-1
packer/rpc/build.go
packer/rpc/build.go
+1
-1
packer/rpc/builder.go
packer/rpc/builder.go
+2
-2
packer/rpc/command.go
packer/rpc/command.go
+5
-5
packer/rpc/communicator.go
packer/rpc/communicator.go
+1
-2
packer/rpc/server.go
packer/rpc/server.go
+1
-1
No files found.
builder/vmware/driver_esx5.go
View file @
6aef1143
...
@@ -316,7 +316,7 @@ func (d *ESX5Driver) checkGuestIPHackEnabled() error {
...
@@ -316,7 +316,7 @@ func (d *ESX5Driver) checkGuestIPHackEnabled() error {
if
record
[
"IntValue"
]
!=
"1"
{
if
record
[
"IntValue"
]
!=
"1"
{
return
errors
.
New
(
return
errors
.
New
(
"GuestIPHack is required, enable by running this on the ESX machine:
\n
"
+
"GuestIPHack is required, enable by running this on the ESX machine:
\n
"
+
"esxcli system settings advanced set -o /Net/GuestIPHack -i 1"
)
"esxcli system settings advanced set -o /Net/GuestIPHack -i 1"
)
}
}
return
nil
return
nil
...
...
packer/rpc/build.go
View file @
6aef1143
...
@@ -9,7 +9,7 @@ import (
...
@@ -9,7 +9,7 @@ import (
// over an RPC connection.
// over an RPC connection.
type
build
struct
{
type
build
struct
{
client
*
rpc
.
Client
client
*
rpc
.
Client
mux
*
MuxConn
mux
*
MuxConn
}
}
// BuildServer wraps a packer.Build implementation and makes it exportable
// BuildServer wraps a packer.Build implementation and makes it exportable
...
...
packer/rpc/builder.go
View file @
6aef1143
...
@@ -10,14 +10,14 @@ import (
...
@@ -10,14 +10,14 @@ import (
// over an RPC connection.
// over an RPC connection.
type
builder
struct
{
type
builder
struct
{
client
*
rpc
.
Client
client
*
rpc
.
Client
mux
*
MuxConn
mux
*
MuxConn
}
}
// BuilderServer wraps a packer.Builder implementation and makes it exportable
// BuilderServer wraps a packer.Builder implementation and makes it exportable
// as part of a Golang RPC server.
// as part of a Golang RPC server.
type
BuilderServer
struct
{
type
BuilderServer
struct
{
builder
packer
.
Builder
builder
packer
.
Builder
mux
*
MuxConn
mux
*
MuxConn
}
}
type
BuilderPrepareArgs
struct
{
type
BuilderPrepareArgs
struct
{
...
...
packer/rpc/command.go
View file @
6aef1143
...
@@ -9,19 +9,19 @@ import (
...
@@ -9,19 +9,19 @@ import (
// command is actually executed over an RPC connection.
// command is actually executed over an RPC connection.
type
command
struct
{
type
command
struct
{
client
*
rpc
.
Client
client
*
rpc
.
Client
mux
*
MuxConn
mux
*
MuxConn
}
}
// A CommandServer wraps a packer.Command and makes it exportable as part
// A CommandServer wraps a packer.Command and makes it exportable as part
// of a Golang RPC server.
// of a Golang RPC server.
type
CommandServer
struct
{
type
CommandServer
struct
{
command
packer
.
Command
command
packer
.
Command
mux
*
MuxConn
mux
*
MuxConn
}
}
type
CommandRunArgs
struct
{
type
CommandRunArgs
struct
{
Args
[]
string
Args
[]
string
StreamId
uint32
StreamId
uint32
}
}
type
CommandSynopsisArgs
byte
type
CommandSynopsisArgs
byte
...
@@ -42,7 +42,7 @@ func (c *command) Run(env packer.Environment, args []string) (result int) {
...
@@ -42,7 +42,7 @@ func (c *command) Run(env packer.Environment, args []string) (result int) {
go
server
.
Serve
()
go
server
.
Serve
()
rpcArgs
:=
&
CommandRunArgs
{
rpcArgs
:=
&
CommandRunArgs
{
Args
:
args
,
Args
:
args
,
StreamId
:
nextId
,
StreamId
:
nextId
,
}
}
err
:=
c
.
client
.
Call
(
"Command.Run"
,
rpcArgs
,
&
result
)
err
:=
c
.
client
.
Call
(
"Command.Run"
,
rpcArgs
,
&
result
)
...
...
packer/rpc/communicator.go
View file @
6aef1143
...
@@ -147,7 +147,7 @@ func (c *communicator) Download(path string, w io.Writer) (err error) {
...
@@ -147,7 +147,7 @@ func (c *communicator) Download(path string, w io.Writer) (err error) {
return
return
}
}
func
(
c
*
CommunicatorServer
)
Start
(
args
*
CommunicatorStartArgs
,
reply
*
interface
{})
(
error
)
{
func
(
c
*
CommunicatorServer
)
Start
(
args
*
CommunicatorStartArgs
,
reply
*
interface
{})
error
{
// Build the RemoteCmd on this side so that it all pipes over
// Build the RemoteCmd on this side so that it all pipes over
// to the remote side.
// to the remote side.
var
cmd
packer
.
RemoteCmd
var
cmd
packer
.
RemoteCmd
...
@@ -197,7 +197,6 @@ func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface
...
@@ -197,7 +197,6 @@ func (c *CommunicatorServer) Start(args *CommunicatorStartArgs, reply *interface
cmd
.
Stderr
=
conn
cmd
.
Stderr
=
conn
}
}
// Connect to the response address so we can write our result to it
// Connect to the response address so we can write our result to it
// when ready.
// when ready.
responseC
,
err
:=
c
.
mux
.
Dial
(
args
.
ResponseStreamId
)
responseC
,
err
:=
c
.
mux
.
Dial
(
args
.
ResponseStreamId
)
...
...
packer/rpc/server.go
View file @
6aef1143
...
@@ -13,7 +13,7 @@ var endpointId uint64
...
@@ -13,7 +13,7 @@ var endpointId uint64
const
(
const
(
DefaultArtifactEndpoint
string
=
"Artifact"
DefaultArtifactEndpoint
string
=
"Artifact"
DefaultBuildEndpoint
=
"Build"
DefaultBuildEndpoint
=
"Build"
DefaultBuilderEndpoint
=
"Builder"
DefaultBuilderEndpoint
=
"Builder"
DefaultCacheEndpoint
=
"Cache"
DefaultCacheEndpoint
=
"Cache"
DefaultCommandEndpoint
=
"Command"
DefaultCommandEndpoint
=
"Command"
...
...
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