vagrant-mos 0.9.60 → 0.9.61
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 +9 -1
- data/lib/vagrant-mos/config.rb +18 -0
- data/lib/vagrant-mos/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57f26e0d6c8bb0e5326e6a8a29976f8084484f42
|
4
|
+
data.tar.gz: 0ba9f5177ee5de179501c296049ea424568bbff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f8d5808f2bee4398224bc9d3699d650729648b29ba2deef430caaa067290d4ba1fcbca652a78b4fa9b673ab258aa2a4b5f16f130172b82cbbf484ff85854af7
|
7
|
+
data.tar.gz: 34ac36726de66daf861abccb04697f494b7d3b697060abe35c379004ee6291c1204bda75333c220546623f2402a3ff85f89dc8b57773b15f2ad641bff420b8ae
|
@@ -32,6 +32,8 @@ module VagrantPlugins
|
|
32
32
|
name = region_config.name
|
33
33
|
instance_type = region_config.instance_type
|
34
34
|
keypair = region_config.keypair_name
|
35
|
+
secgroup = region_config.secgroup
|
36
|
+
zone = region_config.zone
|
35
37
|
|
36
38
|
# If there is no keypair then warn the user
|
37
39
|
if !keypair
|
@@ -46,6 +48,8 @@ module VagrantPlugins
|
|
46
48
|
env[:ui].info(" -- Data_disk: #{data_disk}")
|
47
49
|
env[:ui].info(" -- Band_width: #{band_width}")
|
48
50
|
env[:ui].info(" -- Keypair: #{keypair}") if keypair
|
51
|
+
env[:ui].info(" -- Keypair: #{secgroup}") if secgroup
|
52
|
+
env[:ui].info(" -- Keypair: #{zone}") if zone
|
49
53
|
|
50
54
|
options = {
|
51
55
|
:flavor_id => instance_type,
|
@@ -54,11 +58,15 @@ module VagrantPlugins
|
|
54
58
|
:data_disk => data_disk,
|
55
59
|
:band_width => band_width,
|
56
60
|
:key_name => keypair,
|
61
|
+
:secgroup => secgroup,
|
62
|
+
:zone => zone,
|
57
63
|
}
|
58
64
|
|
59
65
|
begin
|
60
66
|
# create a handler to access MOS
|
61
|
-
server = env[:mos_compute].create_instance(options[:template_id], options[:flavor_id], nil, options[:name],
|
67
|
+
server = env[:mos_compute].create_instance(options[:template_id], options[:flavor_id], nil, options[:name],
|
68
|
+
options[:key_name], options[:secgroup], options[:data_disk],
|
69
|
+
options[:band_width], options[:zone])
|
62
70
|
rescue Exception => e
|
63
71
|
raise Errors::MosError, :message => e.message
|
64
72
|
end
|
data/lib/vagrant-mos/config.rb
CHANGED
@@ -48,6 +48,16 @@ module VagrantPlugins
|
|
48
48
|
# @return [String]
|
49
49
|
attr_accessor :keypair_name
|
50
50
|
|
51
|
+
# The name of the secgroup to use.
|
52
|
+
#
|
53
|
+
# @return [String]
|
54
|
+
attr_accessor :secgroup
|
55
|
+
|
56
|
+
# The name of the zone to use.
|
57
|
+
#
|
58
|
+
# @return [String]
|
59
|
+
attr_accessor :zone
|
60
|
+
|
51
61
|
# The name of the MOS region in which to create the instance.
|
52
62
|
#
|
53
63
|
# @return [String]
|
@@ -94,6 +104,8 @@ module VagrantPlugins
|
|
94
104
|
@name = UNSET_VALUE
|
95
105
|
@instance_type = UNSET_VALUE
|
96
106
|
@keypair_name = UNSET_VALUE
|
107
|
+
@secgroup = UNSET_VALUE
|
108
|
+
@zone = UNSET_VALUE
|
97
109
|
@region = UNSET_VALUE
|
98
110
|
@version = UNSET_VALUE
|
99
111
|
@access_secret = UNSET_VALUE
|
@@ -195,6 +207,12 @@ module VagrantPlugins
|
|
195
207
|
# Keypair defaults to nil
|
196
208
|
@keypair_name = nil if @keypair_name == UNSET_VALUE
|
197
209
|
|
210
|
+
# set default secgroup
|
211
|
+
@secgroup = nil if @secgroup == UNSET_VALUE
|
212
|
+
|
213
|
+
# set default zone
|
214
|
+
@zone = nil if @zone == UNSET_VALUE
|
215
|
+
|
198
216
|
# Default region is us-east-1. This is sensible because MOS
|
199
217
|
# generally defaults to this as well.
|
200
218
|
@region = "us-east-1" if @region == UNSET_VALUE
|
data/lib/vagrant-mos/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-mos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.61
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yangcs2009
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mos-sdk
|