From febeb64a801f3b4c72193bc93ee0400dee3a2a0a Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 9 Nov 2012 01:22:48 -0800 Subject: vagrant support --- lib/leap_cli/config/object.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/leap_cli/config/object.rb') diff --git a/lib/leap_cli/config/object.rb b/lib/leap_cli/config/object.rb index ad32f54..731f3ff 100644 --- a/lib/leap_cli/config/object.rb +++ b/lib/leap_cli/config/object.rb @@ -144,6 +144,20 @@ module LeapCli self end + ## + ## NODE SPECIFIC + ## maybe these should be moved to a Node class. + ## + + # + # returns true if this node has an ip address in the range of the vagrant network + # + def vagrant? + vagrant_range = IPAddr.new @manager.provider.vagrant.network + ip_address = IPAddr.new @node.ip_address + vagrant_range.include?(ip_address) + end + ## ## MACROS ## these are methods used when eval'ing a value in the .json configuration -- cgit v1.2.3