vagrant-mos 0.8.56 → 0.8.59
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -2
- data/lib/vagrant-mos/action/connect_mos.rb +0 -2
- data/lib/vagrant-mos/action/run_instance.rb +44 -44
- data/lib/vagrant-mos/config.rb +37 -35
- data/lib/vagrant-mos/version.rb +1 -1
- data/locales/en.yml +17 -15
- data/spec/vagrant-mos/config_spec.rb +21 -21
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2a8ce614665da8e35298f3a24d7e15876adf548
|
4
|
+
data.tar.gz: bb9df21ade6940343a98bc23b3f4a538b4200bf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4384d329bf046ad1bd7548ab4c4659942ea4c726f1d268e67fa711f1e7b469b4cb599f6bb92db1b88bb80856b000e83374b56ee2d6b8440e78dba28e29d668df
|
7
|
+
data.tar.gz: 57c1be6e5c9bcf2e9460eef0c0f1f045824e76d4dca84d1faa51644d9846d5d2571b7d4012956a3bd08e4b6c33728ab29fafa00850bb03ea37e4c195de161dff
|
data/README.md
CHANGED
@@ -103,8 +103,6 @@ This provider exposes quite a few provider-specific configuration options:
|
|
103
103
|
|
104
104
|
* `access_key_id` - The access key for accessing MOS
|
105
105
|
* `ami` - The image id to boot, such as "fa1026fe-c082-4ead-8458-802bf65ca64c"
|
106
|
-
* `availability_zone` - The availability zone within the region to launch
|
107
|
-
the instance. If nil, it will use the default set.
|
108
106
|
* `instance_ready_timeout` - The number of seconds to wait for the instance
|
109
107
|
to become "ready" in MOS. Defaults to 120 seconds.
|
110
108
|
* `instance_type` - The type of instance, such as "C1_M1". The default
|
@@ -27,22 +27,22 @@ module VagrantPlugins
|
|
27
27
|
# Get the configs
|
28
28
|
region_config = env[:machine].provider_config.get_region_config(region)
|
29
29
|
ami = region_config.ami
|
30
|
-
availability_zone = region_config.availability_zone
|
30
|
+
#availability_zone = region_config.availability_zone
|
31
31
|
instance_type = region_config.instance_type
|
32
32
|
keypair = region_config.keypair_name
|
33
|
-
private_ip_address = region_config.private_ip_address
|
34
|
-
security_groups = region_config.security_groups
|
35
|
-
subnet_id = region_config.subnet_id
|
36
|
-
tags = region_config.tags
|
37
|
-
user_data = region_config.user_data
|
38
|
-
block_device_mapping = region_config.block_device_mapping
|
33
|
+
#private_ip_address = region_config.private_ip_address
|
34
|
+
#security_groups = region_config.security_groups
|
35
|
+
#subnet_id = region_config.subnet_id
|
36
|
+
#tags = region_config.tags
|
37
|
+
#user_data = region_config.user_data
|
38
|
+
#block_device_mapping = region_config.block_device_mapping
|
39
39
|
#elastic_ip = region_config.elastic_ip
|
40
40
|
terminate_on_shutdown = region_config.terminate_on_shutdown
|
41
41
|
iam_instance_profile_arn = region_config.iam_instance_profile_arn
|
42
42
|
iam_instance_profile_name = region_config.iam_instance_profile_name
|
43
|
-
monitoring = region_config.monitoring
|
43
|
+
#monitoring = region_config.monitoring
|
44
44
|
#ebs_optimized = region_config.ebs_optimized
|
45
|
-
associate_public_ip = region_config.associate_public_ip
|
45
|
+
#associate_public_ip = region_config.associate_public_ip
|
46
46
|
|
47
47
|
# If there is no keypair then warn the user
|
48
48
|
if !keypair
|
@@ -54,45 +54,45 @@ module VagrantPlugins
|
|
54
54
|
env[:ui].info(" -- Type: #{instance_type}")
|
55
55
|
env[:ui].info(" -- AMI: #{ami}")
|
56
56
|
env[:ui].info(" -- Region: #{region}")
|
57
|
-
env[:ui].info(" -- Availability Zone: #{availability_zone}") if availability_zone
|
57
|
+
#env[:ui].info(" -- Availability Zone: #{availability_zone}") if availability_zone
|
58
58
|
env[:ui].info(" -- Keypair: #{keypair}") if keypair
|
59
|
-
env[:ui].info(" -- Subnet ID: #{subnet_id}") if subnet_id
|
59
|
+
#env[:ui].info(" -- Subnet ID: #{subnet_id}") if subnet_id
|
60
60
|
env[:ui].info(" -- IAM Instance Profile ARN: #{iam_instance_profile_arn}") if iam_instance_profile_arn
|
61
61
|
env[:ui].info(" -- IAM Instance Profile Name: #{iam_instance_profile_name}") if iam_instance_profile_name
|
62
|
-
env[:ui].info(" -- Private IP: #{private_ip_address}") if private_ip_address
|
63
|
-
env[:ui].info(" -- User Data: yes") if user_data
|
64
|
-
env[:ui].info(" -- Security Groups: #{security_groups.inspect}") if !security_groups.empty?
|
65
|
-
env[:ui].info(" -- User Data: #{user_data}") if user_data
|
66
|
-
env[:ui].info(" -- Block Device Mapping: #{block_device_mapping}") if block_device_mapping
|
62
|
+
#env[:ui].info(" -- Private IP: #{private_ip_address}") if private_ip_address
|
63
|
+
#env[:ui].info(" -- User Data: yes") if user_data
|
64
|
+
#env[:ui].info(" -- Security Groups: #{security_groups.inspect}") if !security_groups.empty?
|
65
|
+
#env[:ui].info(" -- User Data: #{user_data}") if user_data
|
66
|
+
#env[:ui].info(" -- Block Device Mapping: #{block_device_mapping}") if block_device_mapping
|
67
67
|
env[:ui].info(" -- Terminate On Shutdown: #{terminate_on_shutdown}")
|
68
|
-
env[:ui].info(" -- Monitoring: #{monitoring}")
|
69
|
-
env[:ui].info(" -- Assigning a public IP address in a VPC: #{associate_public_ip}")
|
68
|
+
#env[:ui].info(" -- Monitoring: #{monitoring}")
|
69
|
+
#env[:ui].info(" -- Assigning a public IP address in a VPC: #{associate_public_ip}")
|
70
70
|
|
71
71
|
options = {
|
72
|
-
|
72
|
+
#:availability_zone => availability_zone,
|
73
73
|
:flavor_id => instance_type,
|
74
74
|
:image_id => ami,
|
75
75
|
:key_name => keypair,
|
76
|
-
|
77
|
-
|
76
|
+
#:private_ip_address => private_ip_address,
|
77
|
+
#:subnet_id => subnet_id,
|
78
78
|
:iam_instance_profile_arn => iam_instance_profile_arn,
|
79
79
|
:iam_instance_profile_name => iam_instance_profile_name,
|
80
|
-
|
81
|
-
|
82
|
-
|
80
|
+
#:tags => tags,
|
81
|
+
#:user_data => user_data,
|
82
|
+
#:block_device_mapping => block_device_mapping,
|
83
83
|
:instance_initiated_shutdown_behavior => terminate_on_shutdown == true ? "terminate" : nil,
|
84
|
-
|
84
|
+
#:monitoring => monitoring,
|
85
85
|
#:ebs_optimized => ebs_optimized,
|
86
|
-
|
86
|
+
#:associate_public_ip => associate_public_ip
|
87
87
|
}
|
88
|
-
if !security_groups.empty?
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
end
|
88
|
+
#if !security_groups.empty?
|
89
|
+
# security_group_key = options[:subnet_id].nil? ? :groups : :security_group_ids
|
90
|
+
# options[security_group_key] = security_groups
|
91
|
+
# env[:ui].warn(I18n.t("vagrant_mos.warn_ssh_access")) unless allows_ssh_port?(env, security_groups, subnet_id)
|
92
|
+
#end
|
93
93
|
|
94
94
|
begin
|
95
|
-
#
|
95
|
+
# create a handler to access MOS
|
96
96
|
server = env[:mos_compute].create_instance(options[:image_id], options[:flavor_id], nil, nil, options[:key_name], datadisk=9, bandwidth=2)
|
97
97
|
rescue Exception => e
|
98
98
|
raise Errors::MosError, :message => e.message
|
@@ -164,18 +164,18 @@ module VagrantPlugins
|
|
164
164
|
end
|
165
165
|
end
|
166
166
|
|
167
|
-
def allows_ssh_port?(env, test_sec_groups, is_vpc)
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
end
|
167
|
+
#def allows_ssh_port?(env, test_sec_groups, is_vpc)
|
168
|
+
# port = 22 # TODO get ssh_info port
|
169
|
+
# test_sec_groups = ["default"] if test_sec_groups.empty? # MOS default security group
|
170
|
+
# # filter groups by name or group_id (vpc)
|
171
|
+
# groups = test_sec_groups.map do |tsg|
|
172
|
+
# env[:mos_compute].security_groups.all.select { |sg| tsg == (is_vpc ? sg.group_id : sg.name) }
|
173
|
+
# end.flatten
|
174
|
+
# # filter TCP rules
|
175
|
+
# rules = groups.map { |sg| sg.ip_permissions.select { |r| r["ipProtocol"] == "tcp" } }.flatten
|
176
|
+
# # test if any range includes port
|
177
|
+
# !rules.select { |r| (r["fromPort"]..r["toPort"]).include?(port) }.empty?
|
178
|
+
#end
|
179
179
|
|
180
180
|
def terminate(env)
|
181
181
|
destroy_env = env.dup
|
data/lib/vagrant-mos/config.rb
CHANGED
@@ -17,7 +17,7 @@ module VagrantPlugins
|
|
17
17
|
# use the default for your account.
|
18
18
|
#
|
19
19
|
# @return [String]
|
20
|
-
attr_accessor :availability_zone
|
20
|
+
#attr_accessor :availability_zone
|
21
21
|
|
22
22
|
# The timeout to wait for an instance to become ready.
|
23
23
|
#
|
@@ -42,7 +42,7 @@ module VagrantPlugins
|
|
42
42
|
# The private IP address to give this machine (VPC).
|
43
43
|
#
|
44
44
|
# @return [String]
|
45
|
-
attr_accessor :private_ip_address
|
45
|
+
#attr_accessor :private_ip_address
|
46
46
|
|
47
47
|
# The name of the MOS region in which to create the instance.
|
48
48
|
#
|
@@ -52,7 +52,7 @@ module VagrantPlugins
|
|
52
52
|
# The EC2 endpoint to connect to
|
53
53
|
#
|
54
54
|
# @return [String]
|
55
|
-
attr_accessor :endpoint
|
55
|
+
#attr_accessor :endpoint
|
56
56
|
|
57
57
|
# The version of the MOS api to use
|
58
58
|
#
|
@@ -74,7 +74,7 @@ module VagrantPlugins
|
|
74
74
|
# be a list of IDs. For EC2, it can be either.
|
75
75
|
#
|
76
76
|
# @return [Array<String>]
|
77
|
-
attr_reader :security_groups
|
77
|
+
#attr_reader :security_groups
|
78
78
|
|
79
79
|
# The Amazon resource name (ARN) of the IAM Instance Profile
|
80
80
|
# to associate with the instance.
|
@@ -91,12 +91,12 @@ module VagrantPlugins
|
|
91
91
|
# The subnet ID to launch the machine into (VPC).
|
92
92
|
#
|
93
93
|
# @return [String]
|
94
|
-
attr_accessor :subnet_id
|
94
|
+
#attr_accessor :subnet_id
|
95
95
|
|
96
96
|
# The tags for the machine.
|
97
97
|
#
|
98
98
|
# @return [Hash<String, String>]
|
99
|
-
attr_accessor :tags
|
99
|
+
#attr_accessor :tags
|
100
100
|
|
101
101
|
# Use IAM Instance Role for authentication to MOS instead of an
|
102
102
|
# explicit access_id and secret_access_key
|
@@ -107,12 +107,12 @@ module VagrantPlugins
|
|
107
107
|
# The user data string
|
108
108
|
#
|
109
109
|
# @return [String]
|
110
|
-
attr_accessor :user_data
|
110
|
+
#attr_accessor :user_data
|
111
111
|
|
112
112
|
# Block device mappings
|
113
113
|
#
|
114
114
|
# @return [Array<Hash>]
|
115
|
-
attr_accessor :block_device_mapping
|
115
|
+
#attr_accessor :block_device_mapping
|
116
116
|
|
117
117
|
# Indicates whether an instance stops or terminates when you initiate shutdown from the instance
|
118
118
|
#
|
@@ -132,7 +132,7 @@ module VagrantPlugins
|
|
132
132
|
# Enables Monitoring
|
133
133
|
#
|
134
134
|
# @return [Boolean]
|
135
|
-
attr_accessor :monitoring
|
135
|
+
#attr_accessor :monitoring
|
136
136
|
|
137
137
|
# EBS optimized instance
|
138
138
|
#
|
@@ -142,7 +142,7 @@ module VagrantPlugins
|
|
142
142
|
# Assigning a public IP address in a VPC
|
143
143
|
#
|
144
144
|
# @return [Boolean]
|
145
|
-
attr_accessor :associate_public_ip
|
145
|
+
#attr_accessor :associate_public_ip
|
146
146
|
|
147
147
|
# The name of ELB, which an instance should be
|
148
148
|
# attached to
|
@@ -153,31 +153,31 @@ module VagrantPlugins
|
|
153
153
|
def initialize(region_specific=false)
|
154
154
|
@access_key_id = UNSET_VALUE
|
155
155
|
@ami = UNSET_VALUE
|
156
|
-
|
156
|
+
#@availability_zone = UNSET_VALUE
|
157
157
|
@instance_ready_timeout = UNSET_VALUE
|
158
158
|
#@instance_package_timeout = UNSET_VALUE
|
159
159
|
@instance_type = UNSET_VALUE
|
160
160
|
@keypair_name = UNSET_VALUE
|
161
|
-
|
161
|
+
#@private_ip_address = UNSET_VALUE
|
162
162
|
@region = UNSET_VALUE
|
163
|
-
|
163
|
+
#@endpoint = UNSET_VALUE
|
164
164
|
@version = UNSET_VALUE
|
165
165
|
@secret_access_key = UNSET_VALUE
|
166
166
|
@secret_access_url = UNSET_VALUE
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
167
|
+
#@security_groups = UNSET_VALUE
|
168
|
+
#@subnet_id = UNSET_VALUE
|
169
|
+
#@tags = {}
|
170
|
+
#@user_data = UNSET_VALUE
|
171
171
|
@use_iam_profile = UNSET_VALUE
|
172
|
-
|
172
|
+
#@block_device_mapping = []
|
173
173
|
#@elastic_ip = UNSET_VALUE
|
174
174
|
@iam_instance_profile_arn = UNSET_VALUE
|
175
175
|
@iam_instance_profile_name = UNSET_VALUE
|
176
176
|
@terminate_on_shutdown = UNSET_VALUE
|
177
177
|
@ssh_host_attribute = UNSET_VALUE
|
178
|
-
|
178
|
+
#@monitoring = UNSET_VALUE
|
179
179
|
#@ebs_optimized = UNSET_VALUE
|
180
|
-
|
180
|
+
#@associate_public_ip = UNSET_VALUE
|
181
181
|
#@elb = UNSET_VALUE
|
182
182
|
|
183
183
|
# Internal state (prefix with __ so they aren't automatically
|
@@ -249,12 +249,12 @@ module VagrantPlugins
|
|
249
249
|
result.instance_variable_set(:@__region_config, new_region_config)
|
250
250
|
|
251
251
|
# Merge in the tags
|
252
|
-
result.tags.merge!(self.tags)
|
253
|
-
result.tags.merge!(other.tags)
|
252
|
+
#result.tags.merge!(self.tags)
|
253
|
+
#result.tags.merge!(other.tags)
|
254
254
|
|
255
255
|
# Merge block_device_mapping
|
256
|
-
result.block_device_mapping |= self.block_device_mapping
|
257
|
-
result.block_device_mapping |= other.block_device_mapping
|
256
|
+
#result.block_device_mapping |= self.block_device_mapping
|
257
|
+
#result.block_device_mapping |= other.block_device_mapping
|
258
258
|
end
|
259
259
|
end
|
260
260
|
|
@@ -280,7 +280,7 @@ module VagrantPlugins
|
|
280
280
|
@keypair_name = nil if @keypair_name == UNSET_VALUE
|
281
281
|
|
282
282
|
# Default the private IP to nil since VPC is not default
|
283
|
-
|
283
|
+
#@private_ip_address = nil if @private_ip_address == UNSET_VALUE
|
284
284
|
|
285
285
|
# Acquire an elastic IP if requested
|
286
286
|
#@elastic_ip = nil if @elastic_ip == UNSET_VALUE
|
@@ -288,15 +288,15 @@ module VagrantPlugins
|
|
288
288
|
# Default region is us-east-1. This is sensible because MOS
|
289
289
|
# generally defaults to this as well.
|
290
290
|
@region = "us-east-1" if @region == UNSET_VALUE
|
291
|
-
|
292
|
-
|
291
|
+
#@availability_zone = nil if @availability_zone == UNSET_VALUE
|
292
|
+
#@endpoint = nil if @endpoint == UNSET_VALUE
|
293
293
|
@version = nil if @version == UNSET_VALUE
|
294
294
|
|
295
295
|
# The security groups are empty by default.
|
296
|
-
|
296
|
+
#@security_groups = [] if @security_groups == UNSET_VALUE
|
297
297
|
|
298
298
|
# Subnet is nil by default otherwise we'd launch into VPC.
|
299
|
-
|
299
|
+
#@subnet_id = nil if @subnet_id == UNSET_VALUE
|
300
300
|
|
301
301
|
# IAM Instance profile arn/name is nil by default.
|
302
302
|
@iam_instance_profile_arn = nil if @iam_instance_profile_arn == UNSET_VALUE
|
@@ -306,7 +306,7 @@ module VagrantPlugins
|
|
306
306
|
@use_iam_profile = false if @use_iam_profile == UNSET_VALUE
|
307
307
|
|
308
308
|
# User Data is nil by default
|
309
|
-
|
309
|
+
#@user_data = nil if @user_data == UNSET_VALUE
|
310
310
|
|
311
311
|
# default false
|
312
312
|
@terminate_on_shutdown = false if @terminate_on_shutdown == UNSET_VALUE
|
@@ -315,13 +315,13 @@ module VagrantPlugins
|
|
315
315
|
@ssh_host_attribute = nil if @ssh_host_attribute == UNSET_VALUE
|
316
316
|
|
317
317
|
# default false
|
318
|
-
|
318
|
+
#@monitoring = false if @monitoring == UNSET_VALUE
|
319
319
|
|
320
320
|
# default false
|
321
321
|
#@ebs_optimized = false if @ebs_optimized == UNSET_VALUE
|
322
322
|
|
323
323
|
# default false
|
324
|
-
|
324
|
+
#@associate_public_ip = false if @associate_public_ip == UNSET_VALUE
|
325
325
|
|
326
326
|
# Don't attach instance to any ELB by default
|
327
327
|
#@elb = nil if @elb == UNSET_VALUE
|
@@ -366,11 +366,13 @@ module VagrantPlugins
|
|
366
366
|
config.access_key_id.nil?
|
367
367
|
errors << I18n.t("vagrant_mos.config.secret_access_key_required") if \
|
368
368
|
config.secret_access_key.nil?
|
369
|
+
errors << I18n.t("vagrant_mos.config.secret_access_url_required") if \
|
370
|
+
config.secret_access_url.nil?
|
369
371
|
end
|
370
372
|
|
371
|
-
if config.associate_public_ip && !config.subnet_id
|
372
|
-
|
373
|
-
end
|
373
|
+
#if config.associate_public_ip && !config.subnet_id
|
374
|
+
# errors << I18n.t("vagrant_mos.config.subnet_id_required_with_public_ip")
|
375
|
+
#end
|
374
376
|
|
375
377
|
errors << I18n.interpolate("vagrant_mos.config.ami_required", :region => @region) if config.ami.nil?
|
376
378
|
end
|
data/lib/vagrant-mos/version.rb
CHANGED
data/locales/en.yml
CHANGED
@@ -2,8 +2,8 @@ en:
|
|
2
2
|
vagrant_mos:
|
3
3
|
already_status: |-
|
4
4
|
The machine is already %{status}.
|
5
|
-
burning_ami: |-
|
6
|
-
Waiting for the AMI '%{ami_id}' to burn...
|
5
|
+
# burning_ami: |-
|
6
|
+
# Waiting for the AMI '%{ami_id}' to burn...
|
7
7
|
# elb:
|
8
8
|
# adjusting: |-
|
9
9
|
# Adjusting availability zones of ELB %{elb_name}...
|
@@ -21,17 +21,17 @@ en:
|
|
21
21
|
launch_no_keypair: |-
|
22
22
|
Warning! You didn't specify a keypair to launch your instance with.
|
23
23
|
This can sometimes result in not being able to access your instance.
|
24
|
-
launch_vpc_warning: |-
|
25
|
-
Warning! You're launching this instance into a VPC without an
|
26
|
-
elastic IP. Please verify you're properly connected to a VPN so
|
27
|
-
you can access this machine, otherwise Vagrant will not be able
|
28
|
-
to SSH into it.
|
24
|
+
# launch_vpc_warning: |-
|
25
|
+
# Warning! You're launching this instance into a VPC without an
|
26
|
+
# elastic IP. Please verify you're properly connected to a VPN so
|
27
|
+
# you can access this machine, otherwise Vagrant will not be able
|
28
|
+
# to SSH into it.
|
29
29
|
not_created: |-
|
30
30
|
Instance is not created. Please run `vagrant up` first.
|
31
|
-
packaging_instance: |-
|
32
|
-
Burning instance %{instance_id} into an ami
|
33
|
-
packaging_instance_complete: |-
|
34
|
-
Burn was successful in %{time_seconds}s
|
31
|
+
# packaging_instance: |-
|
32
|
+
# Burning instance %{instance_id} into an ami
|
33
|
+
# packaging_instance_complete: |-
|
34
|
+
# Burn was successful in %{time_seconds}s
|
35
35
|
ready: |-
|
36
36
|
Machine is booted and ready for use!
|
37
37
|
rsync_not_found_warning: |-
|
@@ -71,16 +71,18 @@ en:
|
|
71
71
|
A region must be specified via "region"
|
72
72
|
secret_access_key_required: |-
|
73
73
|
A secret access key is required via "secret_access_key"
|
74
|
-
|
75
|
-
|
74
|
+
secret_access_url_required: |-
|
75
|
+
A secret access url is required via "secret_access_url"
|
76
|
+
# subnet_id_required_with_public_ip: |-
|
77
|
+
# If you assign a public IP address to an instance in a VPC, a subnet must be specifed via "subnet_id"
|
76
78
|
|
77
79
|
errors:
|
78
|
-
|
80
|
+
mos_error: |-
|
79
81
|
There was an error talking to MOS. The error message is shown
|
80
82
|
below:
|
81
83
|
|
82
84
|
%{message}
|
83
|
-
|
85
|
+
internal_mos_error: |-
|
84
86
|
There was an error talking to MOS. The error message is shown
|
85
87
|
below:
|
86
88
|
|
@@ -17,7 +17,7 @@ describe VagrantPlugins::MOS::Config do
|
|
17
17
|
|
18
18
|
its("access_key_id") { should be_nil }
|
19
19
|
its("ami") { should be_nil }
|
20
|
-
its("availability_zone") { should be_nil }
|
20
|
+
#its("availability_zone") { should be_nil }
|
21
21
|
its("instance_ready_timeout") { should == 120 }
|
22
22
|
#its("instance_package_timeout") { should == 600 }
|
23
23
|
its("instance_type") { should == "C1_M2" }
|
@@ -30,16 +30,16 @@ describe VagrantPlugins::MOS::Config do
|
|
30
30
|
its("subnet_id") { should be_nil }
|
31
31
|
its("iam_instance_profile_arn") { should be_nil }
|
32
32
|
its("iam_instance_profile_name") { should be_nil }
|
33
|
-
its("tags") { should == {} }
|
34
|
-
its("user_data") { should be_nil }
|
33
|
+
#its("tags") { should == {} }
|
34
|
+
#its("user_data") { should be_nil }
|
35
35
|
its("use_iam_profile") { should be_false }
|
36
|
-
its("block_device_mapping") {should == [] }
|
36
|
+
#its("block_device_mapping") {should == [] }
|
37
37
|
#its("elastic_ip") { should be_nil }
|
38
38
|
its("terminate_on_shutdown") { should == false }
|
39
39
|
its("ssh_host_attribute") { should be_nil }
|
40
|
-
its("monitoring") { should == false }
|
40
|
+
#its("monitoring") { should == false }
|
41
41
|
#its("ebs_optimized") { should == false }
|
42
|
-
its("associate_public_ip") { should == false }
|
42
|
+
#its("associate_public_ip") { should == false }
|
43
43
|
end
|
44
44
|
|
45
45
|
describe "overriding defaults" do
|
@@ -47,7 +47,7 @@ describe VagrantPlugins::MOS::Config do
|
|
47
47
|
# simple boilerplate test, so I cut corners here. It just sets
|
48
48
|
# each of these attributes to "foo" in isolation, and reads the value
|
49
49
|
# and asserts the proper result comes back out.
|
50
|
-
[:access_key_id, :ami, :
|
50
|
+
[:access_key_id, :ami, :instance_ready_timeout,
|
51
51
|
:instance_type, :keypair_name, :ssh_host_attribute,
|
52
52
|
:region, :secret_access_key, :secret_access_url, :monitoring,
|
53
53
|
:associate_public_ip, :subnet_id, :tags, :terminate_on_shutdown,
|
@@ -206,20 +206,20 @@ describe VagrantPlugins::MOS::Config do
|
|
206
206
|
let(:first) { described_class.new }
|
207
207
|
let(:second) { described_class.new }
|
208
208
|
|
209
|
-
it "should merge the tags and block_device_mappings" do
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
end
|
209
|
+
#it "should merge the tags and block_device_mappings" do
|
210
|
+
# first.tags["one"] = "one"
|
211
|
+
# second.tags["two"] = "two"
|
212
|
+
# first.block_device_mapping = [{:one => "one"}]
|
213
|
+
# second.block_device_mapping = [{:two => "two"}]
|
214
|
+
#
|
215
|
+
# third = first.merge(second)
|
216
|
+
# third.tags.should == {
|
217
|
+
# "one" => "one",
|
218
|
+
# "two" => "two"
|
219
|
+
# }
|
220
|
+
# third.block_device_mapping.index({:one => "one"}).should_not be_nil
|
221
|
+
# third.block_device_mapping.index({:two => "two"}).should_not be_nil
|
222
|
+
#end
|
223
223
|
end
|
224
224
|
end
|
225
225
|
end
|