vagrant-aliyun 0.0.4 → 0.0.5
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/.DS_Store +0 -0
- data/Gemfile.lock +1 -1
- data/lib/vagrant-aliyun/action/run_instance.rb +5 -1
- data/lib/vagrant-aliyun/config.rb +11 -1
- data/lib/vagrant-aliyun/version.rb +1 -1
- data/pkg/vagrant-aliyun-0.0.5.gem +0 -0
- metadata +4 -3
- data/pkg/vagrant-aliyun-0.0.4.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8408453334ab660eef7fd808713d32d5955e05c
|
|
4
|
+
data.tar.gz: 81d541fefdb736a8a7a8f6e137e382bc65461d29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 216536a1357ee9b9536a1b16efebd9a79413d4abd7a02955f23842aed531690e9d88ddb9c124307610d27ed397eba69b3f81c8d5d0dc1f48535207ce536b5ad2
|
|
7
|
+
data.tar.gz: f8850b2db69eecc4279ff8c88df489b6955a4d470ff8322cbbe1dbb15b5f48377059b012ac1a65dd45926deb6aeed0848175955641a8356f401cbd1b6d87738a
|
data/.DS_Store
ADDED
|
Binary file
|
data/Gemfile.lock
CHANGED
|
@@ -36,7 +36,11 @@ module VagrantPlugins
|
|
|
36
36
|
env[:ui].info(" -- Instance Type: #{config.instance_type}")
|
|
37
37
|
env[:ui].info(" -- Internet Max Bandwidth Out: #{config.internet_max_bandwidth_out}")
|
|
38
38
|
env[:ui].info(" -- Security Group ID: #{config.security_group_id}")
|
|
39
|
-
|
|
39
|
+
env[:ui].info(" -- Instance Charge Type: #{config.instance_charge_type}")
|
|
40
|
+
if config.instance_charge_type == 'PrePaid'
|
|
41
|
+
env[:ui].info(" -- Instance Period: #{config.instance_period}")
|
|
42
|
+
end
|
|
43
|
+
instance = ecs.create_instance :region_id=>config.region_id,:image_id=>config.image_id,:instance_type=>config.instance_type,:internet_max_bandwidth_out=>config.internet_max_bandwidth_out,:security_group_id=>config.security_group_id,:password=>config.password,:instance_charge_type=>config.instance_charge_type,:period=>config.instance_period
|
|
40
44
|
ecs.allocate_public_ip_address :instance_id=>instance["InstanceId"]
|
|
41
45
|
env[:ui].info(I18n.t("vagrant_aliyun.starting"))
|
|
42
46
|
ecs.start_instance :instance_id=>instance["InstanceId"]
|
|
@@ -12,6 +12,8 @@ module VagrantPlugins
|
|
|
12
12
|
attr_accessor :internet_max_bandwidth_out
|
|
13
13
|
attr_accessor :security_group_id
|
|
14
14
|
attr_accessor :password
|
|
15
|
+
attr_accessor :instance_charge_type
|
|
16
|
+
attr_accessor :instance_period
|
|
15
17
|
attr_accessor :instance_ready_timeout
|
|
16
18
|
|
|
17
19
|
def initialize()
|
|
@@ -23,7 +25,9 @@ module VagrantPlugins
|
|
|
23
25
|
@internet_max_bandwidth_out = UNSET_VALUE
|
|
24
26
|
@security_group_id = UNSET_VALUE
|
|
25
27
|
@password = UNSET_VALUE
|
|
26
|
-
@
|
|
28
|
+
@instance_charge_type = UNSET_VALUE
|
|
29
|
+
@instance_period = UNSET_VALUE
|
|
30
|
+
@instance_ready_timeout = UNSET_VALUE
|
|
27
31
|
end
|
|
28
32
|
|
|
29
33
|
def finalize!
|
|
@@ -35,6 +39,8 @@ module VagrantPlugins
|
|
|
35
39
|
@internet_max_bandwidth_out = nil if @internet_max_bandwidth_out == UNSET_VALUE
|
|
36
40
|
@security_group_id = nil if @security_group_id == UNSET_VALUE
|
|
37
41
|
@password = nil if @password == UNSET_VALUE
|
|
42
|
+
@instance_charge_type = nil if @instance_charge_type == UNSET_VALUE
|
|
43
|
+
@instance_period = nil if @instance_period == UNSET_VALUE
|
|
38
44
|
@instance_ready_timeout = 120 if @instance_ready_timeout == UNSET_VALUE
|
|
39
45
|
end
|
|
40
46
|
|
|
@@ -48,6 +54,10 @@ module VagrantPlugins
|
|
|
48
54
|
errors << I18n.t("vagrant_aliyun.config.internet_max_bandwidth_out_required") if @internet_max_bandwidth_out.nil?
|
|
49
55
|
errors << I18n.t("vagrant_aliyun.config.security_group_id_required") if @security_group_id.nil?
|
|
50
56
|
errors << I18n.t("vagrant_aliyun.config.password_required") if @password.nil?
|
|
57
|
+
errors << I18n.t("vagrant_aliyun.config.instance_charge_type_required") if @instance_charge_type.nil?
|
|
58
|
+
if @instance_charge_type != nil && @instance_charge_type == 'PrePaid' && @instance_period == nil
|
|
59
|
+
errors << I18n.t("vagrant_aliyun.config.instance_period_required")
|
|
60
|
+
end
|
|
51
61
|
{ "Aliyun Provider" => errors }
|
|
52
62
|
end
|
|
53
63
|
end
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vagrant-aliyun
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Taurus Cheung
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-08-
|
|
11
|
+
date: 2015-08-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aliyun-api
|
|
@@ -71,10 +71,11 @@ files:
|
|
|
71
71
|
- lib/vagrant-aliyun/version.rb
|
|
72
72
|
- lib/vagrant-aliyun.rb
|
|
73
73
|
- locales/en.yml
|
|
74
|
-
- pkg/vagrant-aliyun-0.0.
|
|
74
|
+
- pkg/vagrant-aliyun-0.0.5.gem
|
|
75
75
|
- Rakefile
|
|
76
76
|
- README.md
|
|
77
77
|
- vagrant-aliyun.gemspec
|
|
78
|
+
- .DS_Store
|
|
78
79
|
- .gitignore
|
|
79
80
|
homepage: https://github.com/lccheun2/vagrant-aliyun
|
|
80
81
|
licenses:
|
|
Binary file
|