vagrant-mos 0.8.82 → 0.8.83
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-mos/action/run_instance.rb +4 -4
- data/lib/vagrant-mos/config.rb +3 -3
- data/lib/vagrant-mos/version.rb +1 -1
- data/spec/vagrant-mos/config_spec.rb +6 -6
- 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: 8e594224be6917e4e46e6aa414b38d863195c1b3
|
4
|
+
data.tar.gz: 96dfa51f7e102a4cbf12a112dfd174c9f058cd37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53a335d98f501c129023ff8149dfa743c6009511fd656df2f89ef3446d72d698b0603b7fb42ce83e80aaf8326b5d3683154c19525c7b8e37990107fa7f02e091
|
7
|
+
data.tar.gz: c6311faee37e9c402987e133f19263a841369a97dae13d915f34b088745a7a586c8e5442d3b3648bd9816ae6f59e7c0c70b37cd436a5587115f7e146354fd5d2
|
@@ -27,7 +27,7 @@ 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
|
-
|
30
|
+
name = region_config.name
|
31
31
|
instance_type = region_config.instance_type
|
32
32
|
keypair = region_config.keypair_name
|
33
33
|
terminate_on_shutdown = region_config.terminate_on_shutdown
|
@@ -39,7 +39,7 @@ module VagrantPlugins
|
|
39
39
|
|
40
40
|
# Launch!
|
41
41
|
env[:ui].info(I18n.t("vagrant_mos.launching_instance"))
|
42
|
-
env[:ui].info(" -- Name: #{
|
42
|
+
env[:ui].info(" -- Name: #{name}") if name
|
43
43
|
env[:ui].info(" -- Type: #{instance_type}")
|
44
44
|
env[:ui].info(" -- AMI: #{ami}")
|
45
45
|
env[:ui].info(" -- Region: #{region}")
|
@@ -48,7 +48,7 @@ module VagrantPlugins
|
|
48
48
|
|
49
49
|
options = {
|
50
50
|
:flavor_id => instance_type,
|
51
|
-
:
|
51
|
+
:name => name,
|
52
52
|
:image_id => ami,
|
53
53
|
:key_name => keypair,
|
54
54
|
:instance_initiated_shutdown_behavior => terminate_on_shutdown == true ? "terminate" : nil,
|
@@ -56,7 +56,7 @@ module VagrantPlugins
|
|
56
56
|
|
57
57
|
begin
|
58
58
|
# create a handler to access MOS
|
59
|
-
server = env[:mos_compute].create_instance(options[:image_id], options[:flavor_id], nil, options[:
|
59
|
+
server = env[:mos_compute].create_instance(options[:image_id], options[:flavor_id], nil, options[:name], options[:key_name], datadisk=9, bandwidth=2)
|
60
60
|
rescue Exception => e
|
61
61
|
raise Errors::MosError, :message => e.message
|
62
62
|
end
|
data/lib/vagrant-mos/config.rb
CHANGED
@@ -16,7 +16,7 @@ module VagrantPlugins
|
|
16
16
|
# The name of the instance to create.
|
17
17
|
#
|
18
18
|
# @return [String]
|
19
|
-
attr_accessor :
|
19
|
+
attr_accessor :name
|
20
20
|
|
21
21
|
# The timeout to wait for an instance to become ready.
|
22
22
|
#
|
@@ -78,7 +78,7 @@ module VagrantPlugins
|
|
78
78
|
@access_key_id = UNSET_VALUE
|
79
79
|
@ami = UNSET_VALUE
|
80
80
|
@instance_ready_timeout = UNSET_VALUE
|
81
|
-
@
|
81
|
+
@name = UNSET_VALUE
|
82
82
|
@instance_type = UNSET_VALUE
|
83
83
|
@keypair_name = UNSET_VALUE
|
84
84
|
@region = UNSET_VALUE
|
@@ -165,7 +165,7 @@ module VagrantPlugins
|
|
165
165
|
@ami = nil if @ami == UNSET_VALUE
|
166
166
|
|
167
167
|
# Default instance name is nil
|
168
|
-
@
|
168
|
+
@name = nil if @name == UNSET_VALUE
|
169
169
|
|
170
170
|
# Set the default timeout for waiting for an instance to be ready
|
171
171
|
@instance_ready_timeout = 120 if @instance_ready_timeout == UNSET_VALUE
|
data/lib/vagrant-mos/version.rb
CHANGED
@@ -18,7 +18,7 @@ describe VagrantPlugins::MOS::Config do
|
|
18
18
|
its("access_key_id") { should be_nil }
|
19
19
|
its("ami") { should be_nil }
|
20
20
|
its("instance_ready_timeout") { should == 120 }
|
21
|
-
its("
|
21
|
+
its("name") { should be_nil }
|
22
22
|
its("instance_type") { should == "C1_M2" }
|
23
23
|
its("keypair_name") { should be_nil }
|
24
24
|
its("region") { should == "us-east-1" }
|
@@ -34,7 +34,7 @@ describe VagrantPlugins::MOS::Config do
|
|
34
34
|
# simple boilerplate test, so I cut corners here. It just sets
|
35
35
|
# each of these attributes to "foo" in isolation, and reads the value
|
36
36
|
# and asserts the proper result comes back out.
|
37
|
-
[:access_key_id, :ami, :instance_ready_timeout,:
|
37
|
+
[:access_key_id, :ami, :instance_ready_timeout,:name,
|
38
38
|
:instance_type, :keypair_name, :ssh_host_attribute,
|
39
39
|
:region, :secret_access_key, :secret_access_url, :terminate_on_shutdown,
|
40
40
|
:use_iam_profile].each do |attribute|
|
@@ -88,7 +88,7 @@ describe VagrantPlugins::MOS::Config do
|
|
88
88
|
let(:config_access_key_id) { "foo" }
|
89
89
|
let(:config_ami) { "foo" }
|
90
90
|
let(:config_instance_type) { "foo" }
|
91
|
-
let(:
|
91
|
+
let(:config_name) { "foo" }
|
92
92
|
let(:config_keypair_name) { "foo" }
|
93
93
|
let(:config_region) { "foo" }
|
94
94
|
let(:config_secret_access_key) { "foo" }
|
@@ -98,7 +98,7 @@ describe VagrantPlugins::MOS::Config do
|
|
98
98
|
instance.access_key_id = config_access_key_id
|
99
99
|
instance.ami = config_ami
|
100
100
|
instance.instance_type = config_instance_type
|
101
|
-
instance.
|
101
|
+
instance.name = config_name
|
102
102
|
instance.keypair_name = config_keypair_name
|
103
103
|
instance.region = config_region
|
104
104
|
instance.secret_access_key = config_secret_access_key
|
@@ -125,7 +125,7 @@ describe VagrantPlugins::MOS::Config do
|
|
125
125
|
its("access_key_id") { should == config_access_key_id }
|
126
126
|
its("ami") { should == config_ami }
|
127
127
|
its("instance_type") { should == config_instance_type }
|
128
|
-
its("
|
128
|
+
its("name") { should == config_name }
|
129
129
|
its("keypair_name") { should == config_keypair_name }
|
130
130
|
its("region") { should == config_region }
|
131
131
|
its("secret_access_key") { should == config_secret_access_key }
|
@@ -151,7 +151,7 @@ describe VagrantPlugins::MOS::Config do
|
|
151
151
|
its("access_key_id") { should == config_access_key_id }
|
152
152
|
its("ami") { should == config_ami }
|
153
153
|
its("instance_type") { should == config_instance_type }
|
154
|
-
its("
|
154
|
+
its("name") { should == config_name }
|
155
155
|
its("keypair_name") { should == config_keypair_name }
|
156
156
|
its("region") { should == region_name }
|
157
157
|
its("secret_access_key") { should == config_secret_access_key }
|