diff options
author | elijah <elijah@riseup.net> | 2013-02-10 18:01:01 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-02-10 18:01:01 -0800 |
commit | b82fa123d814b1dd066a3ec7584d98338c722d8f (patch) | |
tree | 979edb831f1ad5541b63a1e4e5a97384c5997674 | |
parent | 656f9f9056a59cca2edf7939d14390127eca152b (diff) |
fix errant references to provider.vagrant (should be leapfilt.vagrant_network)
-rw-r--r-- | lib/leap_cli/commands/vagrant.rb | 7 | ||||
-rw-r--r-- | lib/leap_cli/config/node.rb | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/leap_cli/commands/vagrant.rb b/lib/leap_cli/commands/vagrant.rb index 8e1ffc6..5aeed74 100644 --- a/lib/leap_cli/commands/vagrant.rb +++ b/lib/leap_cli/commands/vagrant.rb @@ -82,7 +82,6 @@ module LeapCli; module Commands def vagrant_command(cmds, args) vagrant_setup cmds = cmds.to_a - assert_config! 'provider.vagrant.network' if args.empty? nodes = [""] else @@ -98,7 +97,7 @@ module LeapCli; module Commands end execute exec.join('; ') else - bail! "No nodes found. This command only works on nodes with ip_address in the network #{provider.vagrant.network}" + bail! "No nodes found. This command only works on nodes with ip_address in the network #{LeapCli.leapfile.vagrant_network}" end end @@ -120,7 +119,7 @@ module LeapCli; module Commands def create_vagrant_file lines = [] - netmask = IPAddr.new('255.255.255.255').mask(provider.vagrant.network.split('/').last).to_s + netmask = IPAddr.new('255.255.255.255').mask(LeapCli.leapfile.vagrant_network.split('/').last).to_s lines << %[Vagrant::Config.run do |config|] manager.each_node do |node| if node.vagrant? @@ -144,7 +143,7 @@ module LeapCli; module Commands highest_ip = taken_ips.map{|ip| IPAddr.new(ip)}.max new_ip = highest_ip.succ else - new_ip = IPAddr.new(provider.vagrant.network).succ.succ + new_ip = IPAddr.new(LeapCli.leapfile.vagrant_network).succ.succ end return new_ip.to_s end diff --git a/lib/leap_cli/config/node.rb b/lib/leap_cli/config/node.rb index 9eea1f3..15a2d3d 100644 --- a/lib/leap_cli/config/node.rb +++ b/lib/leap_cli/config/node.rb @@ -35,7 +35,7 @@ module LeapCli; module Config # def vagrant? begin - vagrant_range = IPAddr.new @manager.provider.vagrant.network + vagrant_range = IPAddr.new LeapCli.leapfile.vagrant_network rescue ArgumentError => exc Util::bail! { Util::log :invalid, "ip address '#{@node.ip_address}' vagrant.network" } end |