From 205b61dfe721e6d88fc06b050a0497eeb35f4e02 Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 21 Jul 2016 00:55:12 -0700 Subject: added 'leap vm' command --- lib/leap_cli/config/node.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'lib/leap_cli/config/node.rb') diff --git a/lib/leap_cli/config/node.rb b/lib/leap_cli/config/node.rb index 2d76b814..23abdee3 100644 --- a/lib/leap_cli/config/node.rb +++ b/lib/leap_cli/config/node.rb @@ -9,11 +9,8 @@ module LeapCli; module Config class Node < Object attr_accessor :file_paths - def initialize(environment=nil) #, name=nil) + def initialize(environment=nil) super(environment) - #if name - # self['name'] = name - #end @node = self @file_paths = [] end @@ -38,6 +35,14 @@ module LeapCli; module Config return vagrant_range.include?(ip_addr) end + def vm? + self['vm'] + end + + def vm_id? + self['vm.id'] && !self['vm.id'].empty? + end + # # Return a hash table representation of ourselves, with the key equal to the @node.name, # and the value equal to the fields specified in *keys. -- cgit v1.2.3