libraries/patch_mgmt.rb
def compute_rq_type(oslevel)
      return 'Latest' if oslevel.nil? || oslevel.empty? || oslevel.casecmp('latest').zero?
      return 'TL' if oslevel =~ /^([0-9]{4}-[0-9]{2})(|-00|-00-0000)$/
      return 'SP' if oslevel =~ /^([0-9]{4}-[0-9]{2}-[0-9]{2})(|-[0-9]{4})$/
      # else raise exception
      raise InvalidOsLevelProperty, 'Error: oslevel is not recognized'
    end
# -----------------------------------------------------------------
# Compute RqType suma parameter
#
#    raise InvalidOsLevelProperty in case of error
# -----------------------------------------------------------------
Compute RqType suma parameter
raise InvalidOsLevelProperty in case of error
Compute RqType suma parameter raise InvalidOsLevelProperty in case of error
def compute_rq_type(oslevel)
      return 'Latest' if oslevel.nil? || oslevel.empty? || oslevel.casecmp('latest').zero?
      return 'TL' if oslevel =~ /^([0-9]{4}-[0-9]{2})(|-00|-00-0000)$/
      return 'SP' if oslevel =~ /^([0-9]{4}-[0-9]{2}-[0-9]{2})(|-[0-9]{4})$/
      raise InvalidOsLevelProperty, 'Error: oslevel is not recognized'
    end
def compute_rq_type ( oslevel ) return 'Latest' if oslevel . nil? || oslevel . empty? || oslevel . casecmp ( 'latest' ) . zero? return 'TL' if oslevel =~ / ^([0-9]{4}-[0-9]{2})(|-00|-00-0000)$ / return 'SP' if oslevel =~ / ^([0-9]{4}-[0-9]{2}-[0-9]{2})(|-[0-9]{4})$ / raise InvalidOsLevelProperty , 'Error: oslevel is not recognized' end
Compute RqType suma parameter
raise InvalidOsLevelProperty in case of error
Compute RqType suma parameter raise InvalidOsLevelProperty in case of error
# else raise exception
oslevel