aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/config/object.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-09 01:22:48 -0800
committerelijah <elijah@riseup.net>2012-11-09 01:22:48 -0800
commitfebeb64a801f3b4c72193bc93ee0400dee3a2a0a (patch)
treea31d0efc4f9ef563c3f9e9023d09e9dfb8b954af /lib/leap_cli/config/object.rb
parente0471e278c3baf7fc74f288281c7219cbcf0172c (diff)
downloadleap_cli-febeb64a801f3b4c72193bc93ee0400dee3a2a0a.tar.gz
leap_cli-febeb64a801f3b4c72193bc93ee0400dee3a2a0a.tar.bz2
vagrant support
Diffstat (limited to 'lib/leap_cli/config/object.rb')
-rw-r--r--lib/leap_cli/config/object.rb14
1 files changed, 14 insertions, 0 deletions
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
@@ -145,6 +145,20 @@ module LeapCli
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
##