vagrant-linode 0.4.0 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b9188fdd2aa3e774b85bab464f1b5830e4c3ed5c
4
- data.tar.gz: 7d13d05b7f4ba405cc0cbf561f8db36955587fa0
2
+ SHA256:
3
+ metadata.gz: b5b5839672a6460958dde7c30c3b44463b6ff0cd0597fe55f57cb859d02ed8c4
4
+ data.tar.gz: 139433a110641fa261551f6f7c621c9721b3a45a48399b6414a18f556575ba06
5
5
  SHA512:
6
- metadata.gz: 96e2e509f49563c002ff8f8a0b6c510813fea9b5be9b175fc476f8a4b8e6d4aef5f7a65aefa9ede6104618652fa26891061f63b634abc71a832d0b4f08dcf8fa
7
- data.tar.gz: aa390a2af81709249571b00dece9663ed946415cc16218fcfdb5fc8872d6f7d1b94b59b40c4634d99adf5d8b3b9a74a1dad77595aa54bd72a2bd973c713120e9
6
+ metadata.gz: 9e4bfab0d4412d28cdd59de2ef5b8a180aa693d61b4e3c2b9de55a8ceab39c382e1d146b048fef4157d587dd7320c0fac292a90d67b509bbef0c7eea207efdc4
7
+ data.tar.gz: 72c5ea83d5b0f6b2d623e07c89bd619a73359631f0003d9b22a96f6f18e88bcd9b3ccf32db7030743eb5304ffff06bc04423c9d8dd1c0018bf5f9f8728fb4e1f
@@ -1,14 +1,45 @@
1
- Changelog
2
- =========
3
- v0.4.0 added support for Linode Volumes
4
- added `vagrant linode volumes list` command
5
- v0.3.0 fixes for Vagrant 2.0.1 (now requires Ruby 2.2.0+)
6
- xen-only kernels are no longer available (Fixes KVM Grub options)
7
- rebuild command warns / quits if Linode is not powered down
8
- v0.2.8 fixes for Vagrant 1.9
9
- v0.2.7 Update default plan (and ways to set it) and default distro
10
- v0.2.6 added StackScript support
11
- v0.2.5 destroy works when linode is already deleted
12
- v0.2.4 fixed the box image
13
- v0.2.3 fixed rsync before provision on startup
14
- v0.2.2 fixed provision on startup
1
+ # Changelog
2
+
3
+ ## v0.4.1
4
+
5
+ * fixes handling of old plan labels [#88](https://github.com/displague/vagrant-linode/issues/88)
6
+ * adds a custom User-Agent token to support usage analytics
7
+
8
+ ## v0.4.0
9
+
10
+ * added support for Linode Volumes
11
+ * added `vagrant linode volumes list` command
12
+
13
+ ## v0.3.0
14
+
15
+ * fixes for Vagrant 2.0.1 (now requires Ruby 2.2.0+)
16
+ * xen-only kernels are no longer available (Fixes KVM Grub options)
17
+ * rebuild command warns / quits if Linode is not powered down
18
+
19
+ ## v0.2.8
20
+
21
+ * fixes for Vagrant 1.9
22
+
23
+ ## v0.2.7
24
+
25
+ * Update default plan (and ways to set it) and default distro
26
+
27
+ ## v0.2.6
28
+
29
+ * added StackScript support
30
+
31
+ ## v0.2.5
32
+
33
+ * destroy works when linode is already deleted
34
+
35
+ ## v0.2.4
36
+
37
+ * fixed the box image
38
+
39
+ ## v0.2.3
40
+
41
+ * fixed rsync before provision on startup
42
+
43
+ ## v0.2.2
44
+
45
+ * fixed provision on startup
data/README.md CHANGED
@@ -39,9 +39,11 @@ Vagrant.configure('2') do |config|
39
39
  override.vm.box = 'linode/ubuntu1404'
40
40
 
41
41
  provider.api_key = 'API_KEY'
42
- provider.distribution = 'Ubuntu 16.04 LTS'
42
+ provider.distribution = 'Ubuntu 18.04 LTS'
43
43
  provider.datacenter = 'newark'
44
- provider.plan = 'Linode 2048'
44
+ provider.plan = 'Linode 2GB' # This will work
45
+ # provider.plan = 'Linode 2048' # This will still work
46
+ # provider.plan = 'Linode 2' # This may work, but may be ambiguous
45
47
  # provider.planid = <int>
46
48
  # provider.paymentterm = <*1*,12,24>
47
49
  # provider.datacenterid = <int>
@@ -95,25 +97,32 @@ attribute is `true`.
95
97
 
96
98
  ### provider.plan
97
99
 
98
- Each Linode Tier has been assigned a Plan Identifcation Number.
99
- Current (Feb 2017) Plan-ID table follows:
100
-
101
- | PlanID | Plan |
102
- |:------- |:----------------------------- |
103
- | 1 | 1GB Standard (Linode 1024) |
104
- | 2 | 2GB Standard (Linode 2048) |
105
- | 3 | 4GB Standard (Linode 4096) |
106
- | 4 | 8GB Standard (Linode 8192) |
107
- | 5 | 12GB Standard (Linode 12288) |
108
- | 6 | 24GB Standard (Linode 24576) |
109
- | 7 | 48GB Standard (Linode 49152) |
110
- | 8 | 64GB Standard (Linode 65536) |
111
- | 9 | 80GB Standard (Linode 81920) |
112
- | 10 | 16GB HighMem (Linode 16384) |
113
- | 11 | 32GB HighMem (Linode 32768) |
114
- | 12 | 60GB HighMem (Linode 61440) |
115
- |   13   | 100GB HighMem (Linode 102400) |
116
- | 14 | 200GB HighMem (Linode 204800) |
100
+ Each Linode Tier has been assigned a Plan Identification Number.
101
+ Current (April 2019) Plan-ID table follows:
102
+
103
+ | Plan ID | Plan Name |
104
+ |:------- |:-------------- |
105
+ | 1 | Nanode 1GB |
106
+ | 2 | Linode 2GB |
107
+ | 3 | Linode 4GB |
108
+ | 4 | Linode 8GB |
109
+ | 5 | Linode 16GB |
110
+ | 6 | Linode 32GB |
111
+ | 7 | Linode 64GB |
112
+ | 8 | Linode 96GB |
113
+ | 9 | Linode 128GB |
114
+ | 10 | Linode 192GB |
115
+ | 11 | Linode 24GB |
116
+ | 12 | Linode 48GB |
117
+ | 13 | Linode 90GB |
118
+ | 14 | Linode 150GB |
119
+ | 15 | Linode 300GB |
120
+ | 16 | Dedicated 4GB |
121
+ | 17 | Dedicated 8GB |
122
+ | 18 | Dedicated 16GB |
123
+ | 19 | Dedicated 32GB |
124
+ | 20 | Dedicated 64GB |
125
+ | 21 | Dedicated 96GB |
117
126
 
118
127
  This can be obtained through vagrant with:
119
128
  ```
@@ -1,4 +1,5 @@
1
1
  require 'vagrant-linode/helpers/client'
2
+ require 'vagrant-linode/helpers/normalizer'
2
3
  require 'vagrant-linode/helpers/waiter'
3
4
  require 'vagrant-linode/errors'
4
5
  require 'vagrant-linode/services/volume_manager'
@@ -8,6 +9,7 @@ module VagrantPlugins
8
9
  module Actions
9
10
  class Create
10
11
  include Vagrant::Util::Retryable
12
+ include VagrantPlugins::Linode::Helpers::Normalizer
11
13
  include VagrantPlugins::Linode::Helpers::Waiter
12
14
 
13
15
  def initialize(app, env)
@@ -92,8 +94,9 @@ module VagrantPlugins
92
94
  end
93
95
 
94
96
  if @machine.provider_config.plan
97
+ plan_label = normalize_plan_label(@machine.provider_config.plan)
95
98
  plans = @client.avail.linodeplans
96
- plan = plans.find { |p| p.label.include? @machine.provider_config.plan }
99
+ plan = plans.find { |p| p.label.include? plan_label }
97
100
  fail Errors::PlanID, plan: @machine.provider_config.plan if plan.nil?
98
101
  plan_id = plan.planid
99
102
  else
@@ -1,4 +1,5 @@
1
1
  require 'vagrant-linode/helpers/client'
2
+ require 'vagrant-linode/helpers/normalizer'
2
3
  require 'vagrant-linode/helpers/waiter'
3
4
  require 'vagrant-linode/errors'
4
5
  require 'vagrant-linode/services/volume_manager'
@@ -8,6 +9,7 @@ module VagrantPlugins
8
9
  module Actions
9
10
  class Rebuild
10
11
  include Vagrant::Util::Retryable
12
+ include VagrantPlugins::Linode::Helpers::Normalizer
11
13
  include VagrantPlugins::Linode::Helpers::Waiter
12
14
 
13
15
  def initialize(app, env)
@@ -92,8 +94,9 @@ module VagrantPlugins
92
94
  end
93
95
 
94
96
  if @machine.provider_config.plan
97
+ plan_label = normalize_plan_label(@machine.provider_config.plan)
95
98
  plans = @client.avail.linodeplans
96
- plan = plans.find { |p| p.label.include? @machine.provider_config.plan }
99
+ plan = plans.find { |p| p.label.include? plan_label }
97
100
  fail Errors::PlanID, plan: @machine.provider_config.plan if plan.nil?
98
101
  plan_id = plan.planid
99
102
  else
@@ -1,4 +1,5 @@
1
1
  require 'vagrant-linode/helpers/result'
2
+ require 'vagrant-linode/version'
2
3
  require 'linodeapi'
3
4
  require 'json'
4
5
  require 'vagrant/util/retryable'
@@ -35,7 +36,9 @@ module VagrantPlugins
35
36
  def initialize(machine)
36
37
  @logger = Log4r::Logger.new('vagrant::linode::apiclient')
37
38
  @config = machine.provider_config
38
- @client = ::LinodeAPI::Retryable.new(apikey: @config.api_key, endpoint: @config.api_url || nil)
39
+ @client = ::LinodeAPI::Retryable.new(apikey: @config.api_key,
40
+ endpoint: @config.api_url || nil,
41
+ user_agent_prefix: "vagrant-linode/#{VagrantPlugins::Linode::VERSION}")
39
42
  end
40
43
 
41
44
  attr_reader :client
@@ -0,0 +1,18 @@
1
+ module VagrantPlugins
2
+ module Linode
3
+ module Helpers
4
+ module Normalizer
5
+ def normalize_plan_label(plan_label)
6
+ # if config plan is "Linode x" instead of "Linode xGB", look for "(x/1024)GB instead", when x >= 1024
7
+ plan_label_has_size = plan_label.match(/(\d{4,})$/)
8
+ if plan_label_has_size
9
+ plan_size = plan_label_has_size.captures.first.to_i
10
+ plan_label.sub(/(\d{4,})$/, "#{plan_size / 1024}GB")
11
+ else
12
+ plan_label
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Linode
3
- VERSION = '0.4.0'
3
+ VERSION = '0.4.1'
4
4
  end
5
5
  end
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.homepage = 'https://www.github.com/displague/vagrant-linode'
14
14
  gem.summary = gem.description
15
15
 
16
- gem.add_runtime_dependency 'linodeapi', '~> 2.0.1'
16
+ gem.add_runtime_dependency 'linodeapi', '~> 2.0.3'
17
17
  gem.add_runtime_dependency 'log4r', '~> 1.1'
18
18
 
19
19
  gem.add_development_dependency 'rake', '~> 12.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-linode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marques Johansson
@@ -9,62 +9,62 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-12-27 00:00:00.000000000 Z
12
+ date: 2019-04-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: linodeapi
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 2.0.1
20
+ version: 2.0.3
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 2.0.1
27
+ version: 2.0.3
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: log4r
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.1'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '1.1'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rake
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: '12.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '12.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '3.5'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '3.5'
70
70
  description: Enables Vagrant to manage Linode linodes
@@ -75,10 +75,10 @@ executables: []
75
75
  extensions: []
76
76
  extra_rdoc_files: []
77
77
  files:
78
- - .gitignore
79
- - .rspec
80
- - .rubocop.yml
81
- - .rubocop_todo.yml
78
+ - ".gitignore"
79
+ - ".rspec"
80
+ - ".rubocop.yml"
81
+ - ".rubocop_todo.yml"
82
82
  - CHANGELOG.md
83
83
  - Gemfile
84
84
  - LICENSE.txt
@@ -137,6 +137,7 @@ files:
137
137
  - lib/vagrant-linode/config.rb
138
138
  - lib/vagrant-linode/errors.rb
139
139
  - lib/vagrant-linode/helpers/client.rb
140
+ - lib/vagrant-linode/helpers/normalizer.rb
140
141
  - lib/vagrant-linode/helpers/result.rb
141
142
  - lib/vagrant-linode/helpers/waiter.rb
142
143
  - lib/vagrant-linode/plugin.rb
@@ -166,17 +167,17 @@ require_paths:
166
167
  - lib
167
168
  required_ruby_version: !ruby/object:Gem::Requirement
168
169
  requirements:
169
- - - '>='
170
+ - - ">="
170
171
  - !ruby/object:Gem::Version
171
172
  version: '0'
172
173
  required_rubygems_version: !ruby/object:Gem::Requirement
173
174
  requirements:
174
- - - '>='
175
+ - - ">="
175
176
  - !ruby/object:Gem::Version
176
177
  version: '0'
177
178
  requirements: []
178
179
  rubyforge_project:
179
- rubygems_version: 2.6.13
180
+ rubygems_version: 2.7.9
180
181
  signing_key:
181
182
  specification_version: 4
182
183
  summary: Enables Vagrant to manage Linode linodes