vagrant-openstack-provider 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a64da5586525e17d86ae10c08fc2a625cfa51ca8
4
- data.tar.gz: 7f647f6214f8dca01a8bf58775f6fbad62869b2d
3
+ metadata.gz: 06f76da66e9d69d7b3750c87355a2b0cd494d82e
4
+ data.tar.gz: 94b6f3cfae8334fecf64e9fc69d1e8e2da651659
5
5
  SHA512:
6
- metadata.gz: 51f9e2d83ce25ff4f697251dbe3367644244e8efa8e69ce7bcece24f0cf655d7bd88e2a00153d2129b4044de583beb82a1a1ca35f35fa3f8ee5f2b2a0f72b7c7
7
- data.tar.gz: 6c4a90142c6cffd6b5e14b31565f7916f4a451fc35df648c52d5705c7ddaa10188e4b98f6c33a610c9d268a1e1389892b138780b35693a0f7f73fd26b5bebfcc
6
+ metadata.gz: afa0415d10ee018a52bb356c3bb3a387ae9035c84d44696d16f38f87e854cc72a85ed73c002203775f83b5fb7ed5814fc25406ac854e98dbb66f7062509b218f
7
+ data.tar.gz: 33d2530168597883a587064f92571ca8a8291efe617b1f38d4ba154eafa90d7b16b7ff08b4d27adf820755b155f2718a8699a7db417d5ad3f70df6d3a3b15aaa
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # 0.5.2 (November 6, 2014)
2
+
3
+ BUG FIXES:
4
+
5
+ - When multiple IPs are available, return the first one instead of failing [#155](https://github.com/ggiamarchi/vagrant-openstack-provider/pull/155)
6
+
7
+
1
8
  # 0.5.1 (November 6, 2014)
2
9
 
3
10
  BUG FIXES:
@@ -13,7 +13,7 @@ module VagrantPlugins
13
13
  return network_detail['addr'] if network_detail['OS-EXT-IPS:type'] == 'floating'
14
14
  end
15
15
  end
16
- return details['addresses'].first[1][0]['addr'] if details['addresses'].size == 1 && details['addresses'].first[1].size == 1
16
+ return details['addresses'].first[1][0]['addr'] if details['addresses'].size >= 1 && details['addresses'].first[1].size >= 1
17
17
  fail Errors::UnableToResolveIP
18
18
  end
19
19
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Openstack
3
- VERSION = '0.5.1'
3
+ VERSION = '0.5.2'
4
4
  end
5
5
  end
@@ -87,6 +87,32 @@ describe VagrantPlugins::Openstack::Utils do
87
87
  }
88
88
  }
89
89
  end
90
+ expect(@action.get_ip_address(env)).to eq('13.13.13.13')
91
+ end
92
+ end
93
+
94
+ context 'with networks but no ips' do
95
+ it 'fails' do
96
+ config.stub(:floating_ip) { nil }
97
+ nova.stub(:get_server_details).with(env, '1234id') do
98
+ {
99
+ 'addresses' => {
100
+ 'toto' => []
101
+ }
102
+ }
103
+ end
104
+ expect { @action.get_ip_address(env) }.to raise_error(Errors::UnableToResolveIP)
105
+ end
106
+ end
107
+
108
+ context 'with no networks ' do
109
+ it 'fails' do
110
+ config.stub(:floating_ip) { nil }
111
+ nova.stub(:get_server_details).with(env, '1234id') do
112
+ {
113
+ 'addresses' => {}
114
+ }
115
+ end
90
116
  expect { @action.get_ip_address(env) }.to raise_error(Errors::UnableToResolveIP)
91
117
  end
92
118
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-openstack-provider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Giamarchi