vagrant-vmware-dhcp 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-vmware-dhcp/action/config_dhcp.rb +1 -2
- data/lib/vagrant-vmware-dhcp/action/set_mac.rb +5 -3
- data/lib/vagrant-vmware-dhcp/config.rb +19 -0
- data/lib/vagrant-vmware-dhcp/plugin.rb +15 -11
- data/lib/vagrant-vmware-dhcp/version.rb +1 -1
- data/lib/vagrant-vmware-dhcp.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41b94ee9258152c1f4876cd69480f2f5aaf86d34
|
4
|
+
data.tar.gz: 9ca0e66e7f97bb066277bad8dccda536c8f2bf07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 669af463443c20509ea29e71cf05e1e904815e5fea53965da20741598754099188283c27d639723202f8a3500cd851be974002772dee726456bcedd508466c59
|
7
|
+
data.tar.gz: c581d528b41c80c62f9523b3f3fe850abf62d700bbbe52a26062adad0a0ffce1e51945f45d75565f078fa61b68ffd55eb7f35f45a8c3f668d06b2045011cc92f
|
@@ -18,8 +18,7 @@ module VagrantPlugins
|
|
18
18
|
if @env[:machine]
|
19
19
|
@logger.debug("In config_dhcp provider_name is #{@env[:machine].provider_name}")
|
20
20
|
|
21
|
-
|
22
|
-
if @env[:machine].provider_name == :vmware_fusion or @env[:machine].provider_name == :vmware_workstation
|
21
|
+
if (@env[:machine].provider_name == :vmware_fusion or @env[:machine].provider_name == :vmware_workstation) and @env[:machine].config.control_dhcp
|
23
22
|
configure_dhcp
|
24
23
|
end
|
25
24
|
end
|
@@ -14,10 +14,12 @@ module VagrantPlugins
|
|
14
14
|
def call(env)
|
15
15
|
@env = env
|
16
16
|
|
17
|
-
|
17
|
+
if @env[:machine]
|
18
|
+
machine = @env[:machine]
|
18
19
|
|
19
|
-
|
20
|
-
|
20
|
+
if (@env[:machine].provider_name == :vmware_fusion or @env[:machine].provider_name == :vmware_workstation) and @env[:machine].config.control_dhcp
|
21
|
+
set_mac_address(@env)
|
22
|
+
end
|
21
23
|
end
|
22
24
|
|
23
25
|
@app.call(@env)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative "action"
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module VagrantVmwareDhcp
|
5
|
+
class Config < Vagrant.plugin(2, :config)
|
6
|
+
attr_accessor :enable
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@enable = false
|
10
|
+
end
|
11
|
+
|
12
|
+
def finalize!
|
13
|
+
if @enable != true
|
14
|
+
@enable = false
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -9,23 +9,27 @@ module VagrantPlugins
|
|
9
9
|
Especially nice on multi-vm environments with Windows.
|
10
10
|
DESC
|
11
11
|
|
12
|
+
config(:control_dhcp) do
|
13
|
+
Config
|
14
|
+
end
|
15
|
+
|
12
16
|
action_hook('DA VMWare Network: Configure MAC addresses') do |hook|
|
13
17
|
action = Vagrant::Action::Builtin::ConfigValidate
|
14
18
|
hook.before(action, VagrantVmwareDhcp::Action::SetMac)
|
15
19
|
end
|
16
20
|
|
17
|
-
if Vagrant::Util::Platform.windows?
|
18
|
-
ConfigDhcpClass = VagrantVmwareDhcp::Action::ConfigDhcpWindows
|
19
|
-
ActionClass = HashiCorp::VagrantVMwaredesktop::Action::Network
|
20
|
-
elsif Vagrant::Util::Platform.linux?
|
21
|
-
ConfigDhcpClass = VagrantVmwareDhcp::Action::ConfigDhcpLinux
|
22
|
-
ActionClass = HashiCorp::VagrantVMwaredesktop::Action::Network
|
23
|
-
elsif Vagrant::Util::Platform.darwin?
|
24
|
-
ConfigDhcpClass = VagrantVmwareDhcp::Action::ConfigDhcpDarwin
|
25
|
-
ActionClass = HashiCorp::VagrantVMwarefusion::Action::Network
|
26
|
-
end
|
27
|
-
|
28
21
|
action_hook('DA VMWare Network: Configure dhcp.conf') do |hook|
|
22
|
+
if Vagrant::Util::Platform.windows?
|
23
|
+
ConfigDhcpClass = VagrantVmwareDhcp::Action::ConfigDhcpWindows
|
24
|
+
ActionClass = HashiCorp::VagrantVMwaredesktop::Action::Network
|
25
|
+
elsif Vagrant::Util::Platform.linux?
|
26
|
+
ConfigDhcpClass = VagrantVmwareDhcp::Action::ConfigDhcpLinux
|
27
|
+
ActionClass = HashiCorp::VagrantVMwaredesktop::Action::Network
|
28
|
+
elsif Vagrant::Util::Platform.darwin?
|
29
|
+
ConfigDhcpClass = VagrantVmwareDhcp::Action::ConfigDhcpDarwin
|
30
|
+
ActionClass = HashiCorp::VagrantVMwarefusion::Action::Network
|
31
|
+
end
|
32
|
+
|
29
33
|
hook.after(ActionClass, ConfigDhcpClass)
|
30
34
|
end
|
31
35
|
|
data/lib/vagrant-vmware-dhcp.rb
CHANGED
@@ -5,6 +5,7 @@ module VagrantPlugins
|
|
5
5
|
module VagrantVmwareDhcp
|
6
6
|
lib_path = Pathname.new(File.expand_path("../vagrant-vmware-dhcp", __FILE__))
|
7
7
|
autoload :Action, lib_path.join("action")
|
8
|
+
autoload :Config, lib_path.join("config")
|
8
9
|
|
9
10
|
def self.source_root
|
10
11
|
@source_root ||= Pathname.new(File.expand_path("../../", __FILE__))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-vmware-dhcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Israel Shirk
|
@@ -58,6 +58,7 @@ files:
|
|
58
58
|
- lib/vagrant-vmware-dhcp/action/config_dhcp_linux.rb
|
59
59
|
- lib/vagrant-vmware-dhcp/action/config_dhcp_windows.rb
|
60
60
|
- lib/vagrant-vmware-dhcp/action/set_mac.rb
|
61
|
+
- lib/vagrant-vmware-dhcp/config.rb
|
61
62
|
- lib/vagrant-vmware-dhcp/plugin.rb
|
62
63
|
- lib/vagrant-vmware-dhcp/version.rb
|
63
64
|
- locales/en.yml
|