vagrant-mos 0.8.40 → 0.8.41
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/Gemfile +1 -1
- data/README.md +3 -6
- data/lib/vagrant-mos/action/connect_mos.rb +2 -3
- data/lib/vagrant-mos/action.rb +0 -3
- data/lib/vagrant-mos/config.rb +1 -13
- data/lib/vagrant-mos/version.rb +1 -1
- data/spec/vagrant-mos/config_spec.rb +11 -11
- data/vagrant-mos.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4497a2cda0990ef789b172f33a08c462cfb0b1c0
|
4
|
+
data.tar.gz: 53af4e9ca4113e9605f3ca76d8b924879204308e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00fc8f6c5960ec23f224cf14af009bf1a65fa1121b54aa58a1ac365f86691d38420abfae8c5d1feeb2965034a1314c29605176f9ba793dc360fd34102f966bf4
|
7
|
+
data.tar.gz: 5143cef1c7be8d06dedd99305291e52a5bd48c4fb044da3a40b1d33f3dad887ac010147b8e1b6d3f0fb0458f232870ae3cdc12394ca1a7d318b77d0d62884148
|
data/Gemfile
CHANGED
@@ -7,6 +7,6 @@ group :development do
|
|
7
7
|
# gem dependency because we expect to be installed within the
|
8
8
|
# Vagrant environment itself using `vagrant plugin`.
|
9
9
|
gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
|
10
|
-
gem '
|
10
|
+
gem 'mos-sdk'
|
11
11
|
gem 'crack', '~> 0.4.2'
|
12
12
|
end
|
data/README.md
CHANGED
@@ -58,12 +58,12 @@ your information where necessary.
|
|
58
58
|
|
59
59
|
```
|
60
60
|
Vagrant.configure("2") do |config|
|
61
|
-
config.vm.box = "
|
61
|
+
config.vm.box = "mos_box"
|
62
62
|
|
63
63
|
config.vm.provider :mos do |mos, override|
|
64
64
|
mos.access_key_id = "YOUR KEY"
|
65
65
|
mos.secret_access_key = "YOUR SECRET KEY"
|
66
|
-
mos.
|
66
|
+
mos.secret_access_url = "YOUR MOS ACCESS URL"
|
67
67
|
mos.keypair_name = "KEYPAIR NAME"
|
68
68
|
|
69
69
|
mos.ami = "ami-7747d01e"
|
@@ -116,12 +116,9 @@ This provider exposes quite a few provider-specific configuration options:
|
|
116
116
|
type to support both paravirtualization and hvm AMIs
|
117
117
|
* `keypair_name` - The name of the keypair to use to bootstrap AMIs
|
118
118
|
which support it.
|
119
|
-
* `
|
119
|
+
* `secret_access_url` - The accee url for accessing MOS
|
120
120
|
* `private_ip_address` - The private IP address to assign to an instance
|
121
121
|
within a [VPC](http://mos.amazon.com/vpc/)
|
122
|
-
* `elastic_ip` - Can be set to 'true', or to an existing Elastic IP address.
|
123
|
-
If true, allocate a new Elastic IP address to the instance. If set
|
124
|
-
to an existing Elastic IP address, assign the address to the instance.
|
125
122
|
* `region` - The region to start the instance in, such as "us-east-1"
|
126
123
|
* `secret_access_key` - The secret access key for accessing MOS
|
127
124
|
* `security_groups` - An array of security groups for the instance. If this
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require "fog"
|
2
|
-
require "
|
2
|
+
require "mos-sdk"
|
3
3
|
require "log4r"
|
4
4
|
|
5
5
|
module VagrantPlugins
|
@@ -32,7 +32,6 @@ module VagrantPlugins
|
|
32
32
|
fog_config[:mos_access_key_id] = region_config.access_key_id
|
33
33
|
fog_config[:mos_secret_access_key] = region_config.secret_access_key
|
34
34
|
fog_config[:mos_secret_url] = region_config.secret_access_url
|
35
|
-
#fog_config[:mos_session_token] = region_config.session_token
|
36
35
|
end
|
37
36
|
|
38
37
|
fog_config[:endpoint] = region_config.endpoint if region_config.endpoint
|
@@ -40,7 +39,7 @@ module VagrantPlugins
|
|
40
39
|
|
41
40
|
@logger.info("Connecting to MOS...")
|
42
41
|
#env[:mos_compute] = Fog::Compute.new(fog_config)
|
43
|
-
env[:mos_compute] =
|
42
|
+
env[:mos_compute] = MOS::Client.new(region_config.access_key_id, region_config.secret_access_key, region_config.secret_access_url)
|
44
43
|
# env[:mos_elb] = Fog::MOS::ELB.new(fog_config.except(:provider, :endpoint))
|
45
44
|
|
46
45
|
@app.call(env)
|
data/lib/vagrant-mos/action.rb
CHANGED
@@ -51,7 +51,6 @@ module VagrantPlugins
|
|
51
51
|
next
|
52
52
|
end
|
53
53
|
b3.use ConnectMOS
|
54
|
-
b3.use ElbDeregisterInstance
|
55
54
|
b3.use TerminateInstance
|
56
55
|
b3.use ProvisionerCleanup if defined?(ProvisionerCleanup)
|
57
56
|
end
|
@@ -205,8 +204,6 @@ module VagrantPlugins
|
|
205
204
|
autoload :TimedProvision, action_root.join("timed_provision") # some plugins now expect this action to exist
|
206
205
|
autoload :WaitForState, action_root.join("wait_for_state")
|
207
206
|
autoload :WarnNetworks, action_root.join("warn_networks")
|
208
|
-
autoload :ElbRegisterInstance, action_root.join("elb_register_instance")
|
209
|
-
autoload :ElbDeregisterInstance, action_root.join("elb_deregister_instance")
|
210
207
|
end
|
211
208
|
end
|
212
209
|
end
|
data/lib/vagrant-mos/config.rb
CHANGED
@@ -44,12 +44,6 @@ module VagrantPlugins
|
|
44
44
|
# @return [String]
|
45
45
|
attr_accessor :private_ip_address
|
46
46
|
|
47
|
-
# If true, acquire and attach an elastic IP address.
|
48
|
-
# If set to an IP address, assign to the instance.
|
49
|
-
#
|
50
|
-
# @return [String]
|
51
|
-
attr_accessor :elastic_ip
|
52
|
-
|
53
47
|
# The name of the MOS region in which to create the instance.
|
54
48
|
#
|
55
49
|
# @return [String]
|
@@ -75,10 +69,6 @@ module VagrantPlugins
|
|
75
69
|
# @return [String]
|
76
70
|
attr_accessor :secret_access_url
|
77
71
|
|
78
|
-
# The token associated with the key for accessing MOS.
|
79
|
-
#
|
80
|
-
# @return [String]
|
81
|
-
attr_accessor :session_token
|
82
72
|
|
83
73
|
# The security groups to set on the instance. For VPC this must
|
84
74
|
# be a list of IDs. For EC2, it can be either.
|
@@ -174,7 +164,6 @@ module VagrantPlugins
|
|
174
164
|
@version = UNSET_VALUE
|
175
165
|
@secret_access_key = UNSET_VALUE
|
176
166
|
@secret_access_url = UNSET_VALUE
|
177
|
-
@session_token = UNSET_VALUE
|
178
167
|
@security_groups = UNSET_VALUE
|
179
168
|
@subnet_id = UNSET_VALUE
|
180
169
|
@tags = {}
|
@@ -274,7 +263,7 @@ module VagrantPlugins
|
|
274
263
|
# will default to nil if the environment variables are not present.
|
275
264
|
@access_key_id = ENV['MOS_ACCESS_KEY'] if @access_key_id == UNSET_VALUE
|
276
265
|
@secret_access_key = ENV['MOS_SECRET_KEY'] if @secret_access_key == UNSET_VALUE
|
277
|
-
@
|
266
|
+
@secret_access_url = ENV['MOS_SECRET_URL'] if @secret_access_url == UNSET_VALUE
|
278
267
|
|
279
268
|
# AMI must be nil, since we can't default that
|
280
269
|
@ami = nil if @ami == UNSET_VALUE
|
@@ -286,7 +275,6 @@ module VagrantPlugins
|
|
286
275
|
@instance_package_timeout = 600 if @instance_package_timeout == UNSET_VALUE
|
287
276
|
|
288
277
|
# Default instance type is an m3.medium
|
289
|
-
#@instance_type = "m3.medium" if @instance_type == UNSET_VALUE
|
290
278
|
@instance_type = "C1_M2" if @instance_type == UNSET_VALUE
|
291
279
|
# Keypair defaults to nil
|
292
280
|
@keypair_name = nil if @keypair_name == UNSET_VALUE
|
data/lib/vagrant-mos/version.rb
CHANGED
@@ -25,7 +25,7 @@ describe VagrantPlugins::MOS::Config do
|
|
25
25
|
its("private_ip_address") { should be_nil }
|
26
26
|
its("region") { should == "us-east-1" }
|
27
27
|
its("secret_access_key") { should be_nil }
|
28
|
-
its("
|
28
|
+
its("secret_access_url") { should be_nil }
|
29
29
|
its("security_groups") { should == [] }
|
30
30
|
its("subnet_id") { should be_nil }
|
31
31
|
its("iam_instance_profile_arn") { should be_nil }
|
@@ -49,8 +49,8 @@ describe VagrantPlugins::MOS::Config do
|
|
49
49
|
# and asserts the proper result comes back out.
|
50
50
|
[:access_key_id, :ami, :availability_zone, :instance_ready_timeout,
|
51
51
|
:instance_package_timeout, :instance_type, :keypair_name, :ssh_host_attribute,
|
52
|
-
:ebs_optimized, :region, :secret_access_key, :
|
53
|
-
:associate_public_ip, :subnet_id, :tags, :
|
52
|
+
:ebs_optimized, :region, :secret_access_key, :secret_access_url, :monitoring,
|
53
|
+
:associate_public_ip, :subnet_id, :tags, :terminate_on_shutdown,
|
54
54
|
:iam_instance_profile_arn, :iam_instance_profile_name,
|
55
55
|
:use_iam_profile, :user_data, :block_device_mapping].each do |attribute|
|
56
56
|
|
@@ -77,14 +77,14 @@ describe VagrantPlugins::MOS::Config do
|
|
77
77
|
|
78
78
|
its("access_key_id") { should be_nil }
|
79
79
|
its("secret_access_key") { should be_nil }
|
80
|
-
its("
|
80
|
+
its("secret_access_url") { should be_nil }
|
81
81
|
end
|
82
82
|
|
83
|
-
context "with
|
83
|
+
context "with MOS credential environment variables" do
|
84
84
|
before :each do
|
85
85
|
ENV.stub(:[]).with("MOS_ACCESS_KEY").and_return("access_key")
|
86
86
|
ENV.stub(:[]).with("MOS_SECRET_KEY").and_return("secret_key")
|
87
|
-
ENV.stub(:[]).with("
|
87
|
+
ENV.stub(:[]).with("MOS_SECRET_URL").and_return("secret_url")
|
88
88
|
end
|
89
89
|
|
90
90
|
subject do
|
@@ -95,7 +95,7 @@ describe VagrantPlugins::MOS::Config do
|
|
95
95
|
|
96
96
|
its("access_key_id") { should == "access_key" }
|
97
97
|
its("secret_access_key") { should == "secret_key" }
|
98
|
-
its("
|
98
|
+
its("secret_access_url") { should == "secret_url" }
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
@@ -106,7 +106,7 @@ describe VagrantPlugins::MOS::Config do
|
|
106
106
|
let(:config_keypair_name) { "foo" }
|
107
107
|
let(:config_region) { "foo" }
|
108
108
|
let(:config_secret_access_key) { "foo" }
|
109
|
-
let(:
|
109
|
+
let(:config_secret_access_url) { "foo" }
|
110
110
|
|
111
111
|
def set_test_values(instance)
|
112
112
|
instance.access_key_id = config_access_key_id
|
@@ -115,7 +115,7 @@ describe VagrantPlugins::MOS::Config do
|
|
115
115
|
instance.keypair_name = config_keypair_name
|
116
116
|
instance.region = config_region
|
117
117
|
instance.secret_access_key = config_secret_access_key
|
118
|
-
instance.
|
118
|
+
instance.secret_access_url = config_secret_access_url
|
119
119
|
end
|
120
120
|
|
121
121
|
it "should raise an exception if not finalized" do
|
@@ -141,7 +141,7 @@ describe VagrantPlugins::MOS::Config do
|
|
141
141
|
its("keypair_name") { should == config_keypair_name }
|
142
142
|
its("region") { should == config_region }
|
143
143
|
its("secret_access_key") { should == config_secret_access_key }
|
144
|
-
its("
|
144
|
+
its("secret_access_url") { should == config_secret_access_url }
|
145
145
|
end
|
146
146
|
|
147
147
|
context "with a specific config set" do
|
@@ -166,7 +166,7 @@ describe VagrantPlugins::MOS::Config do
|
|
166
166
|
its("keypair_name") { should == config_keypair_name }
|
167
167
|
its("region") { should == region_name }
|
168
168
|
its("secret_access_key") { should == config_secret_access_key }
|
169
|
-
its("
|
169
|
+
its("secret_access_url") { should == config_secret_access_url }
|
170
170
|
end
|
171
171
|
|
172
172
|
describe "inheritance of parent config" do
|
data/vagrant-mos.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.rubyforge_project = "vagrant-mos"
|
17
17
|
|
18
18
|
s.add_runtime_dependency "fog", "~> 1.22"
|
19
|
-
s.add_runtime_dependency "
|
19
|
+
s.add_runtime_dependency "mos-sdk", ">= 1.0.0"
|
20
20
|
|
21
21
|
s.add_runtime_dependency "crack", "~> 0.4.2"
|
22
22
|
s.add_development_dependency "rake"
|
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.8.
|
4
|
+
version: 0.8.41
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yangcs2009
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.22'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: mos-sdk
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '>='
|