vagrant-cloudstack 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/.travis.yml +1 -1
- data/CHANGELOG.md +16 -1
- data/README.md +6 -1
- data/build_rpm.sh +7 -0
- data/lib/vagrant-cloudstack/action/run_instance.rb +114 -18
- data/lib/vagrant-cloudstack/action/sync_folders.rb +2 -1
- data/lib/vagrant-cloudstack/action/terminate_instance.rb +45 -1
- data/lib/vagrant-cloudstack/config.rb +49 -0
- data/lib/vagrant-cloudstack/version.rb +1 -1
- data/locales/en.yml +6 -0
- data/spec/vagrant-cloudstack/config_spec.rb +25 -0
- data/vagrant-cloudstack.gemspec +6 -6
- data/vagrant-cloudstack.spec +42 -0
- metadata +18 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a9724648009ab879e5942a62aa08d4c188252d7
|
4
|
+
data.tar.gz: 1d0a3bdc0cf73b524751f9d05d93ecc0936dc61a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea6c055c56ff72ae743972a5afa07c2b6bfc79bd7c65e9fa6b1838462c39e2e46cdb861236c8f99c87496a8aab1d0425863e91d2651680e4c278a7680e2ec1db
|
7
|
+
data.tar.gz: ecda268bcf95ab512827da77c009aca1e98c0ecd3f6f64e619c5ef675c35881efce7fcbdf0892f4343cfb9b941b2be1f4bd3edef1f0fa537e6360a3da82f0168
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3-p484
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,19 @@
|
|
1
|
-
# 0.
|
1
|
+
# 0.2.0 (Jan 8, 2014)
|
2
|
+
|
3
|
+
* Add display name and group support
|
4
|
+
* Add support for security groups
|
5
|
+
* Bump versions of dependencies
|
6
|
+
|
7
|
+
# 0.1.2 (Dec 12, 2013)
|
8
|
+
* Version bump to gemspec configucation to use shared email
|
9
|
+
|
10
|
+
# 0.1.1 (Dec 11, 2013)
|
11
|
+
|
12
|
+
* Enable Vagrant 1.4 compability
|
13
|
+
* Add support for security groups
|
14
|
+
* Add helper script to build a RPM for easier deployment
|
15
|
+
|
16
|
+
# 0.1.0 (Dec 3, 2013)
|
2
17
|
* Plugin now enables parallelization by default.
|
3
18
|
* This behaviour can be turned off by invoking vagrant with
|
4
19
|
--no-parallel (this flag requires vagrant 1.2.1)
|
data/README.md
CHANGED
@@ -76,7 +76,10 @@ no preconfigured defaults.
|
|
76
76
|
|
77
77
|
And then run `vagrant up --provider=cloudstack`.
|
78
78
|
|
79
|
-
This will start an instance in Cloudstack. And assuming your template
|
79
|
+
This will start an instance in Cloudstack. And assuming your template
|
80
|
+
on Cloudstack is Vagrant compatible _(vagrant user with official
|
81
|
+
vagrant pub key in authorized_keys)_ SSH and provisioning will work as
|
82
|
+
well.
|
80
83
|
|
81
84
|
## Box Format
|
82
85
|
|
@@ -112,6 +115,8 @@ This provider exposes quite a few provider-specific configuration options:
|
|
112
115
|
* `pf_ip_address_id` - IP address ID for port forwarding rule
|
113
116
|
* `pf_public_port` - Public port for port forwarding rule
|
114
117
|
* `pf_private_port` - Private port for port forwarding rule
|
118
|
+
* `display_name` - Display name for the instance
|
119
|
+
* `group` - Group for the instance
|
115
120
|
|
116
121
|
These can be set like typical provider-specific configuration:
|
117
122
|
|
data/build_rpm.sh
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
VERSION=0.2.0
|
3
|
+
mkdir -p /tmp/vagrant-cloudstack-build_rpm.$$/vagrant-cloudstack-$VERSION
|
4
|
+
cp -r . /tmp/vagrant-cloudstack-build_rpm.$$/vagrant-cloudstack-$VERSION/
|
5
|
+
tar -C /tmp/vagrant-cloudstack-build_rpm.$$/ -czf ~/rpmbuild/SOURCES/vagrant-cloudstack-$VERSION.tar.gz vagrant-cloudstack-$VERSION
|
6
|
+
rpmbuild --define "gemver $VERSION" -bb vagrant-cloudstack.spec
|
7
|
+
rm -rf /tmp/vagrant-cloudstack-build_rpm.$$
|
@@ -25,44 +25,138 @@ module VagrantPlugins
|
|
25
25
|
domain = env[:machine].provider_config.domain
|
26
26
|
|
27
27
|
# Get the configs
|
28
|
-
domain_config
|
29
|
-
zone_id
|
30
|
-
network_id
|
31
|
-
network_type
|
32
|
-
project_id
|
33
|
-
service_offering_id
|
34
|
-
template_id
|
35
|
-
keypair
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
28
|
+
domain_config = env[:machine].provider_config.get_domain_config(domain)
|
29
|
+
zone_id = domain_config.zone_id
|
30
|
+
network_id = domain_config.network_id
|
31
|
+
network_type = domain_config.network_type
|
32
|
+
project_id = domain_config.project_id
|
33
|
+
service_offering_id = domain_config.service_offering_id
|
34
|
+
template_id = domain_config.template_id
|
35
|
+
keypair = domain_config.keypair
|
36
|
+
pf_ip_address_id = domain_config.pf_ip_address_id
|
37
|
+
pf_public_port = domain_config.pf_public_port
|
38
|
+
pf_private_port = domain_config.pf_private_port
|
39
|
+
security_group_ids = domain_config.security_group_ids
|
40
|
+
display_name = domain_config.display_name
|
41
|
+
group = domain_config.group
|
42
|
+
security_group_ids = domain_config.security_group_ids
|
43
|
+
security_group_names = domain_config.security_group_names
|
44
|
+
security_groups = domain_config.security_groups
|
40
45
|
|
41
46
|
# If there is no keypair then warn the user
|
42
47
|
if !keypair
|
43
48
|
env[:ui].warn(I18n.t("vagrant_cloudstack.launch_no_keypair"))
|
44
49
|
end
|
45
50
|
|
51
|
+
if display_name.nil?
|
52
|
+
local_user = ENV['USER'].dup
|
53
|
+
local_user.gsub!(/[^-a-z0-9_]/i, "")
|
54
|
+
prefix = env[:root_path].basename.to_s
|
55
|
+
prefix.gsub!(/[^-a-z0-9_]/i, "")
|
56
|
+
display_name = local_user + "_" + prefix + "_#{Time.now.to_i}"
|
57
|
+
end
|
58
|
+
|
59
|
+
# Can't use Security Group IDs and Names at the same time
|
60
|
+
# Let's use IDs by default...
|
61
|
+
if !security_group_ids.nil?
|
62
|
+
if !security_group_names.nil?
|
63
|
+
env[:ui].warn("Security Group Names won't be used since Security Group IDs are declared")
|
64
|
+
security_group_names = nil
|
65
|
+
end
|
66
|
+
|
67
|
+
if !security_groups.nil?
|
68
|
+
env[:ui].warn("Security Groups defined in Vagrantfile won't be used since Security Group IDs are declared")
|
69
|
+
security_groups = nil
|
70
|
+
end
|
71
|
+
else # security_group_ids is nil
|
72
|
+
if !security_group_names.nil? && !security_groups.nil?
|
73
|
+
env[:ui].warn("Security Groups defined in Vagrantfile won't be used since Security Group Names are declared")
|
74
|
+
security_groups = nil
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
46
78
|
# Launch!
|
47
79
|
env[:ui].info(I18n.t("vagrant_cloudstack.launching_instance"))
|
80
|
+
env[:ui].info(" -- Display Name: #{display_name}")
|
81
|
+
env[:ui].info(" -- Group: #{group}") if group
|
82
|
+
env[:ui].info(" -- Service offering UUID: #{service_offering_id}")
|
48
83
|
env[:ui].info(" -- Service offering UUID: #{service_offering_id}")
|
49
84
|
env[:ui].info(" -- Template UUID: #{template_id}")
|
50
85
|
env[:ui].info(" -- Project UUID: #{project_id}") if project_id != nil
|
51
86
|
env[:ui].info(" -- Zone UUID: #{zone_id}")
|
52
87
|
env[:ui].info(" -- Network UUID: #{network_id}") if network_id
|
53
88
|
env[:ui].info(" -- Keypair: #{keypair}") if keypair
|
89
|
+
if !security_group_ids.nil?
|
90
|
+
security_group_ids.each do |security_group_id|
|
91
|
+
env[:ui].info(" -- Security Group ID: #{security_group_id}")
|
92
|
+
end
|
93
|
+
end
|
54
94
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
95
|
+
if !security_group_names.nil? && security_group_ids.nil?
|
96
|
+
security_group_ids = []
|
97
|
+
security_group_names.each do |security_group_name|
|
98
|
+
env[:ui].info(" -- Security Group Name: #{security_group_name}")
|
99
|
+
# since we can't access Security Groups by name, we grab the ID and add it to the security_group_ids
|
100
|
+
sg = env[:cloudstack_compute].list_security_groups["listsecuritygroupsresponse"]["securitygroup"].select{|sgrp| sgrp["name"] == security_group_name }
|
101
|
+
security_group_ids.push(sg[0]["id"])
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
if !security_groups.nil? && security_group_names.nil? && security_group_ids.nil?
|
106
|
+
security_group_ids = []
|
107
|
+
security_groups.each do |sg|
|
108
|
+
# Creating the security group and retrieving it's ID
|
109
|
+
sgid = nil
|
110
|
+
begin
|
111
|
+
sgid = env[:cloudstack_compute].create_security_group(:name => sg[:name],
|
112
|
+
:description => sg[:description])["createsecuritygroupresponse"]["securitygroup"]["id"]
|
113
|
+
env[:ui].info(" -- Security Group #{sg[:name]} created with ID: #{sgid}")
|
114
|
+
rescue Exception => e
|
115
|
+
if e.message =~ /already exis/
|
116
|
+
existingGroup = env[:cloudstack_compute].list_security_groups["listsecuritygroupsresponse"]["securitygroup"].select {|secgrp| secgrp["name"] == sg[:name] }
|
117
|
+
sgid = existingGroup[0]["id"]
|
118
|
+
env[:ui].info(" -- Security Group #{sg[:name]} found with ID: #{sgid}")
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# security group is created and we have it's ID
|
123
|
+
# so we add the rules... Does it really matter if they already exist ? CLoudstack seems to take care of that!
|
124
|
+
sg[:rules].each do |rule|
|
125
|
+
case rule[:type]
|
126
|
+
when "ingress"
|
127
|
+
env[:cloudstack_compute].authorize_security_group_ingress(:securityGroupId => sgid,
|
128
|
+
:protocol => rule[:protocol],
|
129
|
+
:startport => rule[:startport],
|
130
|
+
:endport => rule[:endport],
|
131
|
+
:cidrlist => rule[:cidrlist])
|
132
|
+
env[:ui].info(" --- Ingress Rule added: #{rule[:protocol]} from #{rule[:startport]} to #{rule[:endport]} (#{rule[:cidrlist]})")
|
133
|
+
when "egress"
|
134
|
+
env[:cloudstack_compute].authorize_security_group_egress(:securityGroupId => sgid,
|
135
|
+
:protocol => rule[:protocol],
|
136
|
+
:startport => rule[:startport],
|
137
|
+
:endport => rule[:endport],
|
138
|
+
:cidrlist => rule[:cidrlist])
|
139
|
+
env[:ui].info(" --- Egress Rule added: #{rule[:protocol]} from #{rule[:startport]} to #{rule[:endport]} (#{rule[:cidrlist]})")
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
# We want to use the Security groups we created
|
144
|
+
security_group_ids.push(sgid)
|
145
|
+
|
146
|
+
# and record the security group ids for future deletion (of rules and groups if possible)
|
147
|
+
security_groups_file = env[:machine].data_dir.join('security_groups')
|
148
|
+
security_groups_file.open('a+') do |f|
|
149
|
+
f.write("#{sgid}\n")
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
60
153
|
|
61
154
|
begin
|
62
155
|
case network_type
|
63
156
|
when "Advanced"
|
64
157
|
options = {
|
65
158
|
:display_name => display_name,
|
159
|
+
:group => group,
|
66
160
|
:zone_id => zone_id,
|
67
161
|
:flavor_id => service_offering_id,
|
68
162
|
:image_id => template_id,
|
@@ -71,9 +165,11 @@ module VagrantPlugins
|
|
71
165
|
when "Basic"
|
72
166
|
options = {
|
73
167
|
:display_name => display_name,
|
168
|
+
:group => group,
|
74
169
|
:zone_id => zone_id,
|
75
170
|
:flavor_id => service_offering_id,
|
76
|
-
:image_id => template_id
|
171
|
+
:image_id => template_id,
|
172
|
+
:security_group_ids => security_group_ids
|
77
173
|
}
|
78
174
|
end
|
79
175
|
|
@@ -57,10 +57,11 @@ module VagrantPlugins
|
|
57
57
|
"chown #{ssh_info[:username]} '#{guestpath}'")
|
58
58
|
|
59
59
|
# Rsync over to the guest path using the SSH info
|
60
|
+
private_keys = (ssh_info[:private_key_path].class == Array ? ssh_info[:private_key_path].join(",") : ssh_info[:private_key_path])
|
60
61
|
command = [
|
61
62
|
"rsync", "--verbose", "--archive", "-z",
|
62
63
|
"--exclude", ".vagrant/",
|
63
|
-
"-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i '#{
|
64
|
+
"-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i '#{private_keys}'",
|
64
65
|
hostpath,
|
65
66
|
"#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"]
|
66
67
|
|
@@ -35,7 +35,51 @@ module VagrantPlugins
|
|
35
35
|
# Destroy the server and remove the tracking ID
|
36
36
|
server = env[:cloudstack_compute].servers.get(env[:machine].id)
|
37
37
|
env[:ui].info(I18n.t("vagrant_cloudstack.terminating"))
|
38
|
-
|
38
|
+
|
39
|
+
job = server.destroy
|
40
|
+
while true
|
41
|
+
response = env[:cloudstack_compute].query_async_job_result({:jobid => job.id})
|
42
|
+
if response["queryasyncjobresultresponse"]["jobstatus"] != 0
|
43
|
+
break
|
44
|
+
else
|
45
|
+
env[:ui].info("Waiting for instance to be deleted")
|
46
|
+
sleep 2
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
security_groups_file = env[:machine].data_dir.join("security_groups")
|
51
|
+
if security_groups_file.file?
|
52
|
+
File.open(security_groups_file, "r").each_line do |line|
|
53
|
+
security_group_id = line.strip
|
54
|
+
begin
|
55
|
+
security_group = env[:cloudstack_compute].security_groups.get(security_group_id)
|
56
|
+
|
57
|
+
security_group.ingress_rules.each do |ir|
|
58
|
+
env[:cloudstack_compute].revoke_security_group_ingress({:id => ir["ruleid"]})
|
59
|
+
end
|
60
|
+
env[:ui].info("Deleted ingress rules")
|
61
|
+
|
62
|
+
security_group.egress_rules.each do |er|
|
63
|
+
env[:cloudstack_compute].revoke_security_group_egress({:id => er["ruleid"]})
|
64
|
+
end
|
65
|
+
env[:ui].info("Deleted egress rules")
|
66
|
+
|
67
|
+
rescue Fog::Compute::Cloudstack::Error => e
|
68
|
+
raise Errors::FogError, :message => e.message
|
69
|
+
end
|
70
|
+
|
71
|
+
begin
|
72
|
+
env[:cloudstack_compute].delete_security_group({:id => security_group_id})
|
73
|
+
rescue Fog::Compute::Cloudstack::Error => e
|
74
|
+
env[:ui].warn("Couldn't delete group right now.")
|
75
|
+
env[:ui].warn("Waiting 30 seconds to retry")
|
76
|
+
sleep 30
|
77
|
+
retry
|
78
|
+
end
|
79
|
+
end
|
80
|
+
security_groups_file.delete
|
81
|
+
end
|
82
|
+
|
39
83
|
env[:machine].id = nil
|
40
84
|
|
41
85
|
@app.call(env)
|
@@ -94,6 +94,35 @@ module VagrantPlugins
|
|
94
94
|
# @return [String]
|
95
95
|
attr_accessor :pf_private_port
|
96
96
|
|
97
|
+
# comma separated list of security groups id that going
|
98
|
+
# to be applied to the virtual machine.
|
99
|
+
#
|
100
|
+
# @return [Array]
|
101
|
+
attr_accessor :security_group_ids
|
102
|
+
|
103
|
+
# comma separated list of security groups name that going
|
104
|
+
# to be applied to the virtual machine.
|
105
|
+
#
|
106
|
+
# @return [Array]
|
107
|
+
attr_accessor :security_group_names
|
108
|
+
|
109
|
+
# comma separated list of security groups
|
110
|
+
# (hash with ingress/egress rules)
|
111
|
+
# to be applied to the virtual machine.
|
112
|
+
#
|
113
|
+
# @return [Array]
|
114
|
+
attr_accessor :security_groups
|
115
|
+
|
116
|
+
# display name for the instance
|
117
|
+
#
|
118
|
+
# @return [String]
|
119
|
+
attr_accessor :display_name
|
120
|
+
|
121
|
+
# group for the instance
|
122
|
+
#
|
123
|
+
# @return [String]
|
124
|
+
attr_accessor :group
|
125
|
+
|
97
126
|
def initialize(domain_specific=false)
|
98
127
|
@host = UNSET_VALUE
|
99
128
|
@path = UNSET_VALUE
|
@@ -113,6 +142,11 @@ module VagrantPlugins
|
|
113
142
|
@pf_ip_address_id = UNSET_VALUE
|
114
143
|
@pf_public_port = UNSET_VALUE
|
115
144
|
@pf_private_port = UNSET_VALUE
|
145
|
+
@security_group_ids = UNSET_VALUE
|
146
|
+
@display_name = UNSET_VALUE
|
147
|
+
@group = UNSET_VALUE
|
148
|
+
@security_group_names = UNSET_VALUE
|
149
|
+
@security_groups = UNSET_VALUE
|
116
150
|
|
117
151
|
# Internal state (prefix with __ so they aren't automatically
|
118
152
|
# merged)
|
@@ -237,6 +271,21 @@ module VagrantPlugins
|
|
237
271
|
# Private port must be nil, since we can't default that
|
238
272
|
@pf_private_port = nil if @pf_private_port == UNSET_VALUE
|
239
273
|
|
274
|
+
# Security Group IDs must be nil, since we can't default that
|
275
|
+
@security_group_ids = nil if @security_group_ids == UNSET_VALUE
|
276
|
+
|
277
|
+
# Security Group Names must be nil, since we can't default that
|
278
|
+
@security_group_names = nil if @security_group_names == UNSET_VALUE
|
279
|
+
|
280
|
+
# Security Groups must be nil, since we can't default that
|
281
|
+
@security_groups = nil if @security_groups == UNSET_VALUE
|
282
|
+
|
283
|
+
# Display name must be nil, since we can't default that
|
284
|
+
@display_name = nil if @display_name == UNSET_VALUE
|
285
|
+
|
286
|
+
# Group must be nil, since we can't default that
|
287
|
+
@group = nil if @group == UNSET_VALUE
|
288
|
+
|
240
289
|
# Compile our domain specific configurations only within
|
241
290
|
# NON-DOMAIN-SPECIFIC configurations.
|
242
291
|
if !@__domain_specific
|
data/locales/en.yml
CHANGED
@@ -32,6 +32,11 @@ describe VagrantPlugins::Cloudstack::Config do
|
|
32
32
|
its("pf_ip_address_id") { should be_nil }
|
33
33
|
its("pf_public_port") { should be_nil }
|
34
34
|
its("pf_private_port") { should be_nil }
|
35
|
+
its("security_group_ids") { should be_nil }
|
36
|
+
its("display_name") { should be_nil }
|
37
|
+
its("group") { should be_nil }
|
38
|
+
its("security_group_names") { should be_nil }
|
39
|
+
its("security_groups") { should be_nil }
|
35
40
|
end
|
36
41
|
|
37
42
|
describe "overriding defaults" do
|
@@ -83,6 +88,11 @@ describe VagrantPlugins::Cloudstack::Config do
|
|
83
88
|
let(:config_pf_ip_address_id) { "foo" }
|
84
89
|
let(:config_pf_public_port) { "foo" }
|
85
90
|
let(:config_pf_private_port) { "foo" }
|
91
|
+
let(:config_security_group_ids) { ["foo", "bar"] }
|
92
|
+
let(:config_display_name) { "foo" }
|
93
|
+
let(:config_group) { "foo" }
|
94
|
+
let(:config_security_group_names) { ["foo", "bar"] }
|
95
|
+
let(:config_security_groups) { [{:foo => "bar"}, {:bar => "foo"}] }
|
86
96
|
|
87
97
|
def set_test_values(instance)
|
88
98
|
instance.host = config_host
|
@@ -102,6 +112,11 @@ describe VagrantPlugins::Cloudstack::Config do
|
|
102
112
|
instance.pf_ip_address_id = config_pf_ip_address_id
|
103
113
|
instance.pf_public_port = config_pf_public_port
|
104
114
|
instance.pf_private_port = config_pf_private_port
|
115
|
+
instance.security_group_ids = config_security_group_ids
|
116
|
+
instance.display_name = config_display_name
|
117
|
+
instance.group = config_group
|
118
|
+
instance.security_group_names = config_security_group_names
|
119
|
+
instance.security_groups = config_security_groups
|
105
120
|
end
|
106
121
|
|
107
122
|
it "should raise an exception if not finalized" do
|
@@ -138,6 +153,11 @@ describe VagrantPlugins::Cloudstack::Config do
|
|
138
153
|
its("pf_ip_address_id") { should == config_pf_ip_address_id }
|
139
154
|
its("pf_public_port") { should == config_pf_public_port }
|
140
155
|
its("pf_private_port") { should == config_pf_private_port }
|
156
|
+
its("security_group_ids") { should == config_security_group_ids }
|
157
|
+
its("display_name") { should == config_display_name }
|
158
|
+
its("group") { should == config_group }
|
159
|
+
its("security_group_names") { should == config_security_group_names }
|
160
|
+
its("security_groups") { should == config_security_groups }
|
141
161
|
end
|
142
162
|
|
143
163
|
context "with a specific config set" do
|
@@ -173,6 +193,11 @@ describe VagrantPlugins::Cloudstack::Config do
|
|
173
193
|
its("pf_ip_address_id") { should == config_pf_ip_address_id }
|
174
194
|
its("pf_public_port") { should == config_pf_public_port }
|
175
195
|
its("pf_private_port") { should == config_pf_private_port }
|
196
|
+
its("security_group_ids") { should == config_security_group_ids }
|
197
|
+
its("display_name") { should == config_display_name }
|
198
|
+
its("group") { should == config_group }
|
199
|
+
its("security_group_names") { should == config_security_group_names }
|
200
|
+
its("security_groups") { should == config_security_groups }
|
176
201
|
end
|
177
202
|
|
178
203
|
describe "inheritance of parent config" do
|
data/vagrant-cloudstack.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.version = VagrantPlugins::Cloudstack::VERSION
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.license = "MIT"
|
9
|
-
s.authors = ["Mitchell Hashimoto", "Carl Loa Odin", "Tor-Åke Fransson", "Olle Lundberg", "Roeland Kuipers", "
|
10
|
-
s.email = "
|
9
|
+
s.authors = ["Mitchell Hashimoto", "Carl Loa Odin", "Tor-Åke Fransson", "Olle Lundberg", "Roeland Kuipers", "Yuichi Uemura", "Atsushi Sasaki", "Nicolas Brechet", "Peter Jönsson"]
|
10
|
+
s.email = "engineering.support@klarna.com"
|
11
11
|
s.homepage = "https://github.com/klarna/vagrant-cloudstack/"
|
12
12
|
s.summary = "Enables Vagrant to manage machines in Cloudstack."
|
13
13
|
s.description = "Enables Vagrant to manage machines in Cloudstack."
|
@@ -15,12 +15,12 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.required_rubygems_version = ">= 1.3.6"
|
16
16
|
s.rubyforge_project = "vagrant-cloudstack"
|
17
17
|
|
18
|
-
s.add_runtime_dependency "fog", "~> 1.
|
18
|
+
s.add_runtime_dependency "fog", "~> 1.19.0"
|
19
19
|
|
20
20
|
s.add_development_dependency "rake"
|
21
|
-
s.add_development_dependency "rspec-core", "~> 2.
|
22
|
-
s.add_development_dependency "rspec-expectations", "~> 2.
|
23
|
-
s.add_development_dependency "rspec-mocks", "~> 2.
|
21
|
+
s.add_development_dependency "rspec-core", "~> 2.14.7"
|
22
|
+
s.add_development_dependency "rspec-expectations", "~> 2.14.4"
|
23
|
+
s.add_development_dependency "rspec-mocks", "~> 2.14.4"
|
24
24
|
|
25
25
|
# The following block of code determines the files that should be included
|
26
26
|
# in the gem. It does this by reading all the files in the directory where
|
@@ -0,0 +1,42 @@
|
|
1
|
+
%define gemdir /usr/lib/vagrant-cloudstack/gems
|
2
|
+
Name: vagrant-cloudstack
|
3
|
+
Version: %{gemver}
|
4
|
+
Release: 3%{?dist}
|
5
|
+
Summary: vagrant cloudstack plugin
|
6
|
+
|
7
|
+
License: MIT
|
8
|
+
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
9
|
+
|
10
|
+
Source0: vagrant-cloudstack-%{version}.tar.gz
|
11
|
+
BuildRequires: rubygems
|
12
|
+
Requires: vagrant >= 1.2.0 libxml2-devel libxslt-devel libffi-devel ruby-devel
|
13
|
+
|
14
|
+
%description
|
15
|
+
vagrant cloudstack
|
16
|
+
|
17
|
+
|
18
|
+
%prep
|
19
|
+
%setup -q
|
20
|
+
|
21
|
+
%build
|
22
|
+
env LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 bundle package
|
23
|
+
env LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 gem build vagrant-cloudstack.gemspec
|
24
|
+
|
25
|
+
|
26
|
+
%install
|
27
|
+
mkdir -p %{buildroot}/%{gemdir}
|
28
|
+
cp vagrant-cloudstack-%{version}.gem %{buildroot}/%{gemdir}
|
29
|
+
cp vendor/cache/*.gem %{buildroot}/%{gemdir}
|
30
|
+
|
31
|
+
|
32
|
+
%clean
|
33
|
+
rm -rf %{buildroot}
|
34
|
+
|
35
|
+
|
36
|
+
%post
|
37
|
+
cd %{gemdir}
|
38
|
+
gem install --local fog --no-rdoc --no-ri
|
39
|
+
|
40
|
+
%files
|
41
|
+
%defattr(-,root,root,-)
|
42
|
+
%{gemdir}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-cloudstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitchell Hashimoto
|
@@ -9,12 +9,14 @@ authors:
|
|
9
9
|
- Tor-Åke Fransson
|
10
10
|
- Olle Lundberg
|
11
11
|
- Roeland Kuipers
|
12
|
-
-
|
13
|
-
-
|
12
|
+
- Yuichi Uemura
|
13
|
+
- Atsushi Sasaki
|
14
|
+
- Nicolas Brechet
|
15
|
+
- Peter Jönsson
|
14
16
|
autorequire:
|
15
17
|
bindir: bin
|
16
18
|
cert_chain: []
|
17
|
-
date:
|
19
|
+
date: 2014-01-08 00:00:00.000000000 Z
|
18
20
|
dependencies:
|
19
21
|
- !ruby/object:Gem::Dependency
|
20
22
|
name: fog
|
@@ -22,14 +24,14 @@ dependencies:
|
|
22
24
|
requirements:
|
23
25
|
- - ~>
|
24
26
|
- !ruby/object:Gem::Version
|
25
|
-
version: 1.
|
27
|
+
version: 1.19.0
|
26
28
|
type: :runtime
|
27
29
|
prerelease: false
|
28
30
|
version_requirements: !ruby/object:Gem::Requirement
|
29
31
|
requirements:
|
30
32
|
- - ~>
|
31
33
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.
|
34
|
+
version: 1.19.0
|
33
35
|
- !ruby/object:Gem::Dependency
|
34
36
|
name: rake
|
35
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,48 +52,49 @@ dependencies:
|
|
50
52
|
requirements:
|
51
53
|
- - ~>
|
52
54
|
- !ruby/object:Gem::Version
|
53
|
-
version: 2.
|
55
|
+
version: 2.14.7
|
54
56
|
type: :development
|
55
57
|
prerelease: false
|
56
58
|
version_requirements: !ruby/object:Gem::Requirement
|
57
59
|
requirements:
|
58
60
|
- - ~>
|
59
61
|
- !ruby/object:Gem::Version
|
60
|
-
version: 2.
|
62
|
+
version: 2.14.7
|
61
63
|
- !ruby/object:Gem::Dependency
|
62
64
|
name: rspec-expectations
|
63
65
|
requirement: !ruby/object:Gem::Requirement
|
64
66
|
requirements:
|
65
67
|
- - ~>
|
66
68
|
- !ruby/object:Gem::Version
|
67
|
-
version: 2.
|
69
|
+
version: 2.14.4
|
68
70
|
type: :development
|
69
71
|
prerelease: false
|
70
72
|
version_requirements: !ruby/object:Gem::Requirement
|
71
73
|
requirements:
|
72
74
|
- - ~>
|
73
75
|
- !ruby/object:Gem::Version
|
74
|
-
version: 2.
|
76
|
+
version: 2.14.4
|
75
77
|
- !ruby/object:Gem::Dependency
|
76
78
|
name: rspec-mocks
|
77
79
|
requirement: !ruby/object:Gem::Requirement
|
78
80
|
requirements:
|
79
81
|
- - ~>
|
80
82
|
- !ruby/object:Gem::Version
|
81
|
-
version: 2.
|
83
|
+
version: 2.14.4
|
82
84
|
type: :development
|
83
85
|
prerelease: false
|
84
86
|
version_requirements: !ruby/object:Gem::Requirement
|
85
87
|
requirements:
|
86
88
|
- - ~>
|
87
89
|
- !ruby/object:Gem::Version
|
88
|
-
version: 2.
|
90
|
+
version: 2.14.4
|
89
91
|
description: Enables Vagrant to manage machines in Cloudstack.
|
90
|
-
email:
|
92
|
+
email: engineering.support@klarna.com
|
91
93
|
executables: []
|
92
94
|
extensions: []
|
93
95
|
extra_rdoc_files: []
|
94
96
|
files:
|
97
|
+
- build_rpm.sh
|
95
98
|
- CHANGELOG.md
|
96
99
|
- dummy.box
|
97
100
|
- example_box/metadata.json
|
@@ -127,7 +130,9 @@ files:
|
|
127
130
|
- README.md
|
128
131
|
- spec/vagrant-cloudstack/config_spec.rb
|
129
132
|
- vagrant-cloudstack.gemspec
|
133
|
+
- vagrant-cloudstack.spec
|
130
134
|
- .gitignore
|
135
|
+
- .ruby-version
|
131
136
|
- .travis.yml
|
132
137
|
homepage: https://github.com/klarna/vagrant-cloudstack/
|
133
138
|
licenses:
|