]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
added 'nodes_like_me' macro
authorelijah <elijah@riseup.net>
Sat, 9 Feb 2013 03:39:34 +0000 (19:39 -0800)
committerelijah <elijah@riseup.net>
Sat, 9 Feb 2013 03:39:34 +0000 (19:39 -0800)
lib/leap_cli/config/object.rb

index e039660ca2979ef9f9395fe9b494332ecfd65334..9172fa738eb8b7640777a89837e21c51e4036789 100644 (file)
@@ -187,6 +187,13 @@ module LeapCli
         global.nodes
       end
 
+      #
+      # returns a list of nodes that match similar production level (production, local, testing, etc)
+      #
+      def nodes_like_me
+        nodes[:production => @node.production, :local => @node.local]
+      end
+
       class FileMissing < Exception
         attr_accessor :path, :options
         def initialize(path, options={})