vagrant-openstack-plugin 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -3
- data/Gemfile +1 -1
- data/README.md +22 -0
- data/lib/vagrant-openstack-plugin/action/connect_openstack.rb +7 -3
- data/lib/vagrant-openstack-plugin/action/create_server.rb +1 -3
- data/lib/vagrant-openstack-plugin/action/delete_server.rb +5 -2
- data/lib/vagrant-openstack-plugin/action/read_ssh_info.rb +3 -4
- data/lib/vagrant-openstack-plugin/action/read_state.rb +3 -2
- data/lib/vagrant-openstack-plugin/config.rb +6 -0
- data/lib/vagrant-openstack-plugin/version.rb +1 -1
- data/spec/vagrant-openstack-plugin/config_spec.rb +2 -0
- data/vagrant-openstack-plugin.gemspec +2 -2
- metadata +4 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01d0a86ac145465d408d91c5387d8892c176006c
|
4
|
+
data.tar.gz: 78e8230f1fad0b44aeb1bd695b5215328edfdfe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89a2d4209381bf135c4fa5b6d97888d862bf68a8882fa25a9f85667e494e46216d978eba1a8437a4c202f9ce9c1b13cbcc6d467289eea143813a30b8ae461977
|
7
|
+
data.tar.gz: 0181830fd9f026b958b95afd454e4a28e1026aa65f1dc2c8c235cdbcdf85bf57c6c1730c8b358e91a97bb12a156bfd24652b1cbb6e2318b7204223ce878b8a0e
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,23 @@
|
|
1
1
|
# Changelog for vagrant-openstack-plugin
|
2
2
|
|
3
|
-
## 0.
|
4
|
-
|
5
|
-
-
|
3
|
+
## 0.5.0
|
4
|
+
|
5
|
+
- Merge pull request #45 from detiber/fixNetworksPR [view commit](http://github.com///commit/56b28eff5a1079c6805ec944b1a0c1dde458b10e)
|
6
|
+
- Merge pull request #53 from tjheeta/remote_machine_id [view commit](http://github.com///commit/5873d1b5282fe2d24a0e725ec6289d1ba5e20e9b)
|
7
|
+
- Merge pull request #54 from last-g/patch-1 [view commit](http://github.com///commit/7941573ef8f547a915e31c51ab4d1b85b878eebe)
|
8
|
+
- Merge pull request #56 from nicobrevin/feature-no-verify-peer [view commit](http://github.com///commit/844835811808d256f67ad43e0124ace3f552a18c)
|
9
|
+
- Merge pull request #58 from ohnoimdead/no-network-fix [view commit](http://github.com///commit/4b44a7c80d4a381531266844a5c99de0eea850b5)
|
10
|
+
- Fix for exception when OS endpoint doesn't have neutron installed [view commit](http://github.com///commit/7558bbed3b5ecae8bb3e3ca9c64ffc9512a4c170)
|
11
|
+
- add ssl_verify_peer config option [view commit](http://github.com///commit/cb94f002d790afb5fbec225d17385c8f5b0ebb35)
|
12
|
+
- Missing semicolon [view commit](http://github.com///commit/8f609ee474b548b096e42b08c27fc5f874037204)
|
13
|
+
- Missing region while configuring networks [view commit](http://github.com///commit/ea10bff5cdabea0b9c543a5231500fb7f9fd50ac)
|
14
|
+
- Fix for delete_server [view commit](http://github.com///commit/d4f812eb99d135f7b7c5d210778e92cd8e5a4561)
|
15
|
+
- If the .vagrant directory does not contain the machine id, try to connect remotely to try to find it [view commit](http://github.com///commit/71447bf49afe1fed29fa7ce561305dcc756a2e16)
|
16
|
+
- Fix test for config.network and config.networks. [view commit](http://github.com///commit/5c9161aaf3ac715bc52819ee99c2d02d8434ea7b)
|
17
|
+
|
18
|
+
## 0.4.1
|
19
|
+
|
20
|
+
- update release info [view commit](http://github.com///commit/9866c83713ec0f1db8aed02a9aa9cbaafe8e85a4)
|
6
21
|
|
7
22
|
## 0.4.0
|
8
23
|
|
data/Gemfile
CHANGED
@@ -6,5 +6,5 @@ group :development do
|
|
6
6
|
# We depend on Vagrant for development, but we don't add it as a
|
7
7
|
# gem dependency because we expect to be installed within the
|
8
8
|
# Vagrant environment itself using `vagrant plugin`.
|
9
|
-
gem "vagrant", :git => "https://github.com/mitchellh/vagrant.git"
|
9
|
+
gem "vagrant", :git => "https://github.com/mitchellh/vagrant.git", :tag => "v1.4.3"
|
10
10
|
end
|
data/README.md
CHANGED
@@ -136,6 +136,7 @@ This provider exposes quite a few provider-specific configuration options:
|
|
136
136
|
* `tenant` - Tenant name. You only need to specify this if your OpenStack user has access to multiple tenants.
|
137
137
|
* `region` - Region Name. Specify the region you want the instance to be launched in for multi-region environments.
|
138
138
|
* `proxy` - HTTP proxy. When behind a firewall override this value for API access.
|
139
|
+
* `ssl_verify_peer` - sets the ssl_verify_peer on the underlying excon connection - useful for self signed certs etc.
|
139
140
|
|
140
141
|
These can be set like typical provider-specific configuration:
|
141
142
|
|
@@ -167,6 +168,27 @@ the remote machine over SSH.
|
|
167
168
|
This is good enough for all built-in Vagrant provisioners (shell,
|
168
169
|
chef, and puppet) to work!
|
169
170
|
|
171
|
+
## Contributors
|
172
|
+
|
173
|
+
- [mitchellh](https://github.com/mitchellh)
|
174
|
+
- [tkadauke](https://github.com/tkadauke)
|
175
|
+
- [srenatus](https://github.com/srenatus)
|
176
|
+
- [hvolkmer](https://github.com/hvolkmer)
|
177
|
+
- [ehaselwanter](https://github.com/ehaselwanter)
|
178
|
+
- [BRIMIL01](https://github.com/BRIMIL01)
|
179
|
+
- [jkburges](https://github.com/jkburges)
|
180
|
+
- [johnbellone](https://github.com/johnbellone)
|
181
|
+
- [mat128](https://github.com/mat128)
|
182
|
+
- [jtopjian](https://github.com/jtopjian)
|
183
|
+
- [antoviaque](https://github.com/antoviaque)
|
184
|
+
- [last-g](https://github.com/last-g)
|
185
|
+
- [spil-jasper](https://github.com/spil-jasper)
|
186
|
+
- [detiber](https://github.com/detiber)
|
187
|
+
- [RackerJohnMadrid](https://github.com/RackerJohnMadrid)
|
188
|
+
- [Lull3rSkat3r](https://github.com/Lull3rSkat3r)
|
189
|
+
- [nicobrevin](https://github.com/nicobrevin)
|
190
|
+
- [ohnoimdead](https://github.com/ohnoimdead)
|
191
|
+
|
170
192
|
## Development
|
171
193
|
|
172
194
|
To work on the `vagrant-openstack-plugin` plugin, clone this repository out, and use
|
@@ -24,7 +24,10 @@ module VagrantPlugins
|
|
24
24
|
|
25
25
|
# Pass proxy config down into the Fog::Connection object using
|
26
26
|
# the `connection_options` hash.
|
27
|
-
connection_options = {
|
27
|
+
connection_options = {
|
28
|
+
:proxy => config.proxy,
|
29
|
+
:ssl_verify_peer => config.ssl_verify_peer
|
30
|
+
}
|
28
31
|
|
29
32
|
@logger.info("Connecting to OpenStack...")
|
30
33
|
@logger.debug("API connection params: #{connection_options.inspect}")
|
@@ -38,14 +41,15 @@ module VagrantPlugins
|
|
38
41
|
:openstack_region => region
|
39
42
|
})
|
40
43
|
|
41
|
-
if config.
|
44
|
+
if config.networks && !config.networks.empty?
|
42
45
|
env[:openstack_network] = Fog::Network.new({
|
43
46
|
:provider => :openstack,
|
44
47
|
:connection_options => connection_options,
|
45
48
|
:openstack_username => username,
|
46
49
|
:openstack_api_key => api_key,
|
47
50
|
:openstack_auth_url => endpoint,
|
48
|
-
:openstack_tenant => tenant
|
51
|
+
:openstack_tenant => tenant,
|
52
|
+
:openstack_region => region
|
49
53
|
})
|
50
54
|
end
|
51
55
|
|
@@ -49,13 +49,11 @@ module VagrantPlugins
|
|
49
49
|
unless config.networks
|
50
50
|
if config.network
|
51
51
|
config.networks = [ config.network ]
|
52
|
-
else
|
53
|
-
config.networks = []
|
54
52
|
end
|
55
53
|
end
|
56
54
|
|
57
55
|
# Find networks if provided
|
58
|
-
|
56
|
+
unless config.networks.empty?
|
59
57
|
env[:ui].info(I18n.t("vagrant_openstack.finding_network"))
|
60
58
|
options[:nics] = Array.new
|
61
59
|
config.networks.each do |net|
|
@@ -11,9 +11,12 @@ module VagrantPlugins
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def call(env)
|
14
|
-
|
14
|
+
machine = env[:machine]
|
15
|
+
id = machine.id || env[:openstack_compute].servers.all( :name => machine.name ).first.id
|
16
|
+
|
17
|
+
if id
|
15
18
|
env[:ui].info(I18n.t("vagrant_openstack.deleting_server"))
|
16
|
-
server = env[:openstack_compute].servers.get(
|
19
|
+
server = env[:openstack_compute].servers.get(id)
|
17
20
|
server.destroy
|
18
21
|
env[:machine].id = nil
|
19
22
|
end
|
@@ -18,10 +18,9 @@ module VagrantPlugins
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def read_ssh_info(openstack, machine)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
server = openstack.servers.get(machine.id)
|
21
|
+
id = machine.id || openstack.servers.all( :name => machine.name ).first.id rescue nil
|
22
|
+
return nil if id.nil?
|
23
|
+
server = openstack.servers.get(id)
|
25
24
|
if server.nil?
|
26
25
|
# The machine can't be found
|
27
26
|
@logger.info("Machine couldn't be found, assuming it got destroyed.")
|
@@ -18,10 +18,11 @@ module VagrantPlugins
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def read_state(openstack, machine)
|
21
|
-
|
21
|
+
id = machine.id || openstack.servers.all( :name => machine.name ).first.id rescue nil
|
22
|
+
return :not_created if id.nil?
|
22
23
|
|
23
24
|
# Find the machine
|
24
|
-
server = openstack.servers.get(
|
25
|
+
server = openstack.servers.get(id)
|
25
26
|
if server.nil? || server.state == "DELETED"
|
26
27
|
# The machine can't be found
|
27
28
|
@logger.info("Machine not found or deleted, assuming it got destroyed.")
|
@@ -99,6 +99,10 @@ module VagrantPlugins
|
|
99
99
|
# @return [String]
|
100
100
|
attr_accessor :proxy
|
101
101
|
|
102
|
+
# Value for SSL_VERIFY_PEER, defaults to true. Set to false for self
|
103
|
+
# signed ssl certificate
|
104
|
+
attr_accessor :ssl_verify_peer
|
105
|
+
|
102
106
|
def initialize
|
103
107
|
@api_key = UNSET_VALUE
|
104
108
|
@endpoint = UNSET_VALUE
|
@@ -120,6 +124,7 @@ module VagrantPlugins
|
|
120
124
|
@floating_ip = UNSET_VALUE
|
121
125
|
@region = UNSET_VALUE
|
122
126
|
@proxy = UNSET_VALUE
|
127
|
+
@ssl_verify_peer = UNSET_VALUE
|
123
128
|
end
|
124
129
|
|
125
130
|
def finalize!
|
@@ -151,6 +156,7 @@ module VagrantPlugins
|
|
151
156
|
|
152
157
|
@region = nil if @region == UNSET_VALUE
|
153
158
|
@proxy = nil if @proxy == UNSET_VALUE
|
159
|
+
@ssl_verify_peer = nil if @ssl_verify_peer == UNSET_VALUE
|
154
160
|
end
|
155
161
|
|
156
162
|
def validate(machine)
|
@@ -23,6 +23,7 @@ describe VagrantPlugins::OpenStack::Config do
|
|
23
23
|
its(:scheduler_hints) { should be_nil }
|
24
24
|
its(:tenant) { should be_nil }
|
25
25
|
its(:proxy) { should be_nil }
|
26
|
+
its(:ssl_verify_peer) { should be_nil }
|
26
27
|
end
|
27
28
|
|
28
29
|
describe "overriding defaults" do
|
@@ -38,6 +39,7 @@ describe VagrantPlugins::OpenStack::Config do
|
|
38
39
|
:security_groups,
|
39
40
|
:scheduler_hints,
|
40
41
|
:tenant,
|
42
|
+
:ssl_verify_peer,
|
41
43
|
:proxy].each do |attribute|
|
42
44
|
it "should not default #{attribute} if overridden" do
|
43
45
|
subject.send("#{attribute}=".to_sym, "foo")
|
@@ -6,8 +6,8 @@ require 'vagrant-openstack-plugin/version'
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
7
|
gem.name = "vagrant-openstack-plugin"
|
8
8
|
gem.version = VagrantPlugins::OpenStack::VERSION
|
9
|
-
gem.authors = ["
|
10
|
-
gem.email = ["
|
9
|
+
gem.authors = ["Edmund Haselwanter"]
|
10
|
+
gem.email = ["me@ehaselwanter.com"]
|
11
11
|
gem.description = "Enables Vagrant to manage machines in OpenStack Cloud."
|
12
12
|
gem.summary = "Enables Vagrant to manage machines in OpenStack Cloud."
|
13
13
|
gem.homepage = "http://www.vagrantup.com"
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-openstack-plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- Thomas Kadauke
|
7
|
+
- Edmund Haselwanter
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-20 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: fog
|
@@ -55,8 +54,7 @@ dependencies:
|
|
55
54
|
version: 2.13.0
|
56
55
|
description: Enables Vagrant to manage machines in OpenStack Cloud.
|
57
56
|
email:
|
58
|
-
-
|
59
|
-
- t.kadauke@cloudbau.de
|
57
|
+
- me@ehaselwanter.com
|
60
58
|
executables: []
|
61
59
|
extensions: []
|
62
60
|
extra_rdoc_files: []
|