Skip to content

Commit

Permalink
'address_id' now defaults to 'public', to reduce number of cases in r…
Browse files Browse the repository at this point in the history
…ead_ssh_info.
  • Loading branch information
jkburges committed May 6, 2013
1 parent 92ba812 commit 1e03d16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/vagrant-openstack-plugin/action/read_ssh_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ def read_ssh_info(openstack, machine)

if config.network
host = server.addresses[config.network].last['addr'] rescue nil
elsif config.address_id
host = server.addresses[config.address_id].last['addr'] rescue nil
else
host = server.addresses['public'].last['addr'] rescue nil
host = server.addresses[config.address_id].last['addr'] rescue nil
end
# Read the DNS info
return {
Expand Down
2 changes: 1 addition & 1 deletion lib/vagrant-openstack-plugin/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def finalize!
@metadata = nil if @metadata == UNSET_VALUE
@username = nil if @username == UNSET_VALUE
@network = nil if @network == UNSET_VALUE
@address_id = nil if @address_id == UNSET_VALUE
@address_id = 'public' if @address_id == UNSET_VALUE

# Keypair defaults to nil
@keypair_name = nil if @keypair_name == UNSET_VALUE
Expand Down

0 comments on commit 1e03d16

Please sign in to comment.