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
d8cc24f8
Commit
d8cc24f8
authored
Jun 15, 2015
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/openstack: no more port
parent
5167c65f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
builder/openstack/ssh.go
builder/openstack/ssh.go
+4
-4
No files found.
builder/openstack/ssh.go
View file @
d8cc24f8
...
...
@@ -22,7 +22,7 @@ func CommHost(
// If we have a specific interface, try that
if
sshinterface
!=
""
{
if
addr
:=
sshAddrFromPool
(
s
,
sshinterface
,
port
);
addr
!=
""
{
if
addr
:=
sshAddrFromPool
(
s
,
sshinterface
);
addr
!=
""
{
return
addr
,
nil
}
}
...
...
@@ -38,7 +38,7 @@ func CommHost(
}
// Try to get it from the requested interface
if
addr
:=
sshAddrFromPool
(
s
,
sshinterface
,
port
);
addr
!=
""
{
if
addr
:=
sshAddrFromPool
(
s
,
sshinterface
);
addr
!=
""
{
return
addr
,
nil
}
...
...
@@ -75,7 +75,7 @@ func SSHConfig(username string) func(multistep.StateBag) (*ssh.ClientConfig, err
}
}
func
sshAddrFromPool
(
s
*
servers
.
Server
,
desired
string
,
port
int
)
string
{
func
sshAddrFromPool
(
s
*
servers
.
Server
,
desired
string
)
string
{
// Get all the addresses associated with this server. This
// was taken directly from Terraform.
for
pool
,
networkAddresses
:=
range
s
.
Addresses
{
...
...
@@ -106,7 +106,7 @@ func sshAddrFromPool(s *servers.Server, desired string, port int) string {
}
}
if
addr
!=
""
{
return
fmt
.
Sprintf
(
"%s:%d"
,
addr
,
port
)
return
addr
}
}
}
...
...
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