From 31abc93f50d2389b1237a216af3616db1dc31d7c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 12 Jun 2015 14:22:32 -0400 Subject: [PATCH] builder/openstack: support ssh_interface [GH-2087] --- builder/openstack/ssh.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/builder/openstack/ssh.go b/builder/openstack/ssh.go index 76c2686b1..519ccd406 100644 --- a/builder/openstack/ssh.go +++ b/builder/openstack/ssh.go @@ -33,7 +33,15 @@ func SSHAddress( // Get all the addresses associated with this server. This // was taken directly from Terraform. - for _, networkAddresses := range s.Addresses { + for pool, networkAddresses := range s.Addresses { + // If we have an SSH interface specified, skip it if no match + if sshinterface != "" && pool != sshinterface { + log.Printf( + "[INFO] Skipping pool %s, doesn't match requested %s", + pool, sshinterface) + continue + } + elements, ok := networkAddresses.([]interface{}) if !ok { log.Printf(