my Method template

###################################
#
# CFME Automate Method: <method_name>
#
# by Marco Berube
#
# Notes: ******************
#
###################################
begin
 # Method for logging
 def log(level, message)
 @method = 'change_me_for_method_name'
 $evm.log(level, "#{@method}: #{message}")
 end
 # dump_root
 def dump_root()
 log(:info, "Root:<$evm.root> Begin $evm.root.attributes")
 $evm.root.attributes.sort.each { |k, v| log(:info, "Root:<$evm.root> Attribute - #{k}: #{v}")}
 log(:info, "Root:<$evm.root> End $evm.root.attributes")
 log(:info, "")
 end

 # dump all root attributes to the log
 dump_root

 #
 # ADD YOUR CODE HERE
 #

 # Exit method
 log(:info, "CFME Automate Method Ended")
 exit MIQ_OK

 # Error Rescue
rescue => err
 log(:error, "[#{err}]\n#{err.backtrace.join("\n")}")
 exit MIQ_STOP
end