vagrant-digitalocean 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -82,6 +82,9 @@ The following attributes are available to further configure the provider:
82
82
  droplet in. It defaults to `New York 2`.
83
83
  - `provider.size` - A string representing the size to use when creating a
84
84
  new droplet (e.g. `1GB`). It defaults to `512MB`.
85
+ - `provider.private_networking` - A boolean flag indicating whether to enable
86
+ a private network interface (if the region supports private networking). It
87
+ defaults to `false`.
85
88
  - `provider.ssh_key_name` - A string representing the name to use when creating
86
89
  a Digital Ocean SSH key for droplet authentication. It defaults to `Vagrant`.
87
90
  - `provider.setup` - A boolean flag indicating whether to setup a new user
@@ -35,7 +35,8 @@ module VagrantPlugins
35
35
  :region_id => region_id,
36
36
  :image_id => image_id,
37
37
  :name => @machine.config.vm.hostname || @machine.name,
38
- :ssh_key_ids => ssh_key_id
38
+ :ssh_key_ids => ssh_key_id,
39
+ :private_networking => @machine.provider_config.private_networking
39
40
  })
40
41
 
41
42
  # wait for request to complete
@@ -50,6 +51,11 @@ module VagrantPlugins
50
51
  env[:ui].info I18n.t('vagrant_digital_ocean.info.droplet_ip', {
51
52
  :ip => droplet['ip_address']
52
53
  })
54
+ if droplet['private_ip_address']
55
+ env[:ui].info I18n.t('vagrant_digital_ocean.info.droplet_private_ip', {
56
+ :ip => droplet['private_ip_address']
57
+ })
58
+ end
53
59
 
54
60
  # wait for ssh to be ready
55
61
  switch_user = @machine.provider_config.setup?
@@ -6,6 +6,7 @@ module VagrantPlugins
6
6
  attr_accessor :image
7
7
  attr_accessor :region
8
8
  attr_accessor :size
9
+ attr_accessor :private_networking
9
10
  attr_accessor :ca_path
10
11
  attr_accessor :ssh_key_name
11
12
  attr_accessor :setup
@@ -13,25 +14,27 @@ module VagrantPlugins
13
14
  alias_method :setup?, :setup
14
15
 
15
16
  def initialize
16
- @client_id = UNSET_VALUE
17
- @api_key = UNSET_VALUE
18
- @image = UNSET_VALUE
19
- @region = UNSET_VALUE
20
- @size = UNSET_VALUE
21
- @ca_path = UNSET_VALUE
22
- @ssh_key_name = UNSET_VALUE
23
- @setup = UNSET_VALUE
17
+ @client_id = UNSET_VALUE
18
+ @api_key = UNSET_VALUE
19
+ @image = UNSET_VALUE
20
+ @region = UNSET_VALUE
21
+ @size = UNSET_VALUE
22
+ @private_networking = UNSET_VALUE
23
+ @ca_path = UNSET_VALUE
24
+ @ssh_key_name = UNSET_VALUE
25
+ @setup = UNSET_VALUE
24
26
  end
25
27
 
26
28
  def finalize!
27
- @client_id = ENV['DO_CLIENT_ID'] if @client_id == UNSET_VALUE
28
- @api_key = ENV['DO_API_KEY'] if @api_key == UNSET_VALUE
29
- @image = 'Ubuntu 12.04 x64' if @image == UNSET_VALUE
30
- @region = 'New York 2' if @region == UNSET_VALUE
31
- @size = '512MB' if @size == UNSET_VALUE
32
- @ca_path = nil if @ca_path == UNSET_VALUE
33
- @ssh_key_name = 'Vagrant' if @ssh_key_name == UNSET_VALUE
34
- @setup = true if @setup == UNSET_VALUE
29
+ @client_id = ENV['DO_CLIENT_ID'] if @client_id == UNSET_VALUE
30
+ @api_key = ENV['DO_API_KEY'] if @api_key == UNSET_VALUE
31
+ @image = 'Ubuntu 12.04 x64' if @image == UNSET_VALUE
32
+ @region = 'New York 2' if @region == UNSET_VALUE
33
+ @size = '512MB' if @size == UNSET_VALUE
34
+ @private_networking = false if @private_networking == UNSET_VALUE
35
+ @ca_path = nil if @ca_path == UNSET_VALUE
36
+ @ssh_key_name = 'Vagrant' if @ssh_key_name == UNSET_VALUE
37
+ @setup = true if @setup == UNSET_VALUE
35
38
  end
36
39
 
37
40
  def validate(machine)
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module DigitalOcean
3
- VERSION = '0.3.0'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -7,6 +7,7 @@ en:
7
7
  already_off: "Droplet is already off"
8
8
  creating: "Creating a new droplet..."
9
9
  droplet_ip: "Assigned IP address: %{ip}"
10
+ droplet_private_ip: "Private IP address: %{ip}"
10
11
  destroying: "Destroying the droplet..."
11
12
  powering_off: "Powering off the droplet..."
12
13
  powering_on: "Powering on the droplet..."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-digitalocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-22 00:00:00.000000000 Z
12
+ date: 2013-10-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
- requirement: &17944820 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 0.8.6
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17944820
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.8.6
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: json
27
- requirement: &17944260 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *17944260
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: log4r
38
- requirement: &17943140 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,7 +53,12 @@ dependencies:
43
53
  version: '0'
44
54
  type: :runtime
45
55
  prerelease: false
46
- version_requirements: *17943140
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  description: Enables Vagrant to manage Digital Ocean droplets
48
63
  email:
49
64
  - john.m.bender@gmail.com
@@ -108,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
123
  version: '0'
109
124
  requirements: []
110
125
  rubyforge_project:
111
- rubygems_version: 1.8.11
126
+ rubygems_version: 1.8.23
112
127
  signing_key:
113
128
  specification_version: 3
114
129
  summary: Enables Vagrant to manage Digital Ocean droplets