lib/pvcglue/cloud.rb
# find node by full node_name or by matching prefix of node_name
find node by full node_name or by matching prefix of node_name
find node by full node_name or by matching prefix of node_name
def find_node(node_name)
      puts "*"*80
      raise(Thor::Error, "Node not specified.") if node_name.nil? || node_name.empty?
      return {node_name => nodes_in_stage[node_name]} if nodes_in_stage[node_name]
      puts "-"*80
      nodes_in_stage.each do |key, value|
        puts key
        return {key => value} if key.start_with?(node_name)
      end
      raise(Thor::Error, "Not found:  #{node_name} in #{stage_name}.")
    end
def find_node ( node_name ) puts "*" * 80 raise ( Thor :: Error , "Node not specified." ) if node_name . nil? || node_name . empty? return { node_name => nodes_in_stage [ node_name ] } if nodes_in_stage [ node_name ] puts "-" * 80 nodes_in_stage . each do | key , value | puts key return { key => value } if key . start_with? ( node_name ) end raise ( Thor :: Error , "Not found:  #{node_name} in #{stage_name}." ) end
find node by full node_name or by matching prefix of node_name
find node by full node_name or by matching prefix of node_name
node_name