lib/launcher/template.rb
# Determines if the Cloudformation is valid. This function attempts to identify additional validity
# errors that the validate_template function may not pick up on, such that there must be at least one
# resource defined.
#
# @note Validation error messages are sent via the {Launcher::Message} module.
#
# @return [Boolean] True if the template is valid, false otherwise.
Determines if the Cloudformation is valid. This function attempts to identify additional validity
errors that the validate_template function may not pick up on, such that there must be at least one
resource defined.
Determines if the Cloudformation is valid . This function attempts to identify additional validity errors that the validate_template function may not pick up on such that there must be at least one resource defined .
def valid?
      valid = true
      if aws_configured?
        validation = cloudformation.validate_template(read)
        if validation.has_key?(:message)
          message validation[:message], :type => :fatal
          valid = false
        end
      else
        message "Skipped AWS Cloudformation template validation.", :type => :warn
      end
      if resources.keys.empty?
        message "Atleast once templated resource must be defined.", :type => :fatal
        valid = false
      end
      return valid
    end
def valid? valid = true if aws_configured? validation = cloudformation . validate_template ( read ) if validation . has_key? ( :message ) message validation [ :message ] , :type => :fatal valid = false end else message "Skipped AWS Cloudformation template validation." , :type => :warn end if resources . keys . empty? message "Atleast once templated resource must be defined." , :type => :fatal valid = false end return valid end
Determines if the Cloudformation is valid.
Determines if the Cloudformation is valid .
True if the template is valid, false otherwise.
True if the template is valid false otherwise .
Boolean
note
Validation error messages are sent via the {Launcher::Message} module.
Validation error messages are sent via the { Launcher :: Message } module .