def get_thread_name_from_bundle(bundle)
      thread_name = nil
      thread_name = bundle.runlist_policy.thread_name if bundle.respond_to?(:runlist_policy) && bundle.runlist_policy
      Log.warn("Encountered a nil thread name unexpectedly, defaulting to '#{RightScale::AgentConfig.default_thread_name}'") unless thread_name
      thread_name ||= RightScale::AgentConfig.default_thread_name
      unless thread_name =~ RightScale::AgentConfig.valid_thread_name
        raise ArgumentError, "Invalid thread name #{thread_name.inspect}"
      end
      thread_name
    end
def get_thread_name_from_bundle(bundle)
      thread_name = nil
      thread_name = bundle.runlist_policy.thread_name if bundle.respond_to?(:runlist_policy) && bundle.runlist_policy
      Log.warn("Encountered a nil thread name unexpectedly, defaulting to '#{RightScale::AgentConfig.default_thread_name}'") unless thread_name
      thread_name ||= RightScale::AgentConfig.default_thread_name
      unless thread_name =~ RightScale::AgentConfig.valid_thread_name
        raise ArgumentError, "Invalid thread name #{thread_name.inspect}"
      end
      thread_name
    end
Initialize sequence

 === Parameter
 bundle(RightScale::ExecutableBundle):: Bundle to be run
 FIX: thread_name should never be nil from the core in future, but
 temporarily we must supply the default thread_name before if nil. in
 future we should fail execution when thread_name is reliably present and
 for any reason does not match ::RightScale::AgentConfig.valid_thread_name
 see also ExecutableSequenceProxy#initialize

 === Parameters
 bundle(ExecutableBundle):: An executable bundle

 === Return
 result(String):: Thread name of this bundle