in source/code/plugins/oms_diag_lib.rb [41:110]
def IsDiagSupported()
return @@DiagSupported unless @@DiagSupported.nil?
begin
versionline = IO.readlines(@@InstallInfoPath)[0]
versionnum = versionline.split()[0]
cur_major, cur_minor, cur_patch, cur_build = GetVersionParts(versionnum)
if cur_major.nil? or
cur_minor.nil? or
cur_patch.nil? or
cur_build.nil?
@@DiagSupported = false
return @@DiagSupported
end
tar_major, tar_minor, tar_patch, tar_build = GetVersionParts(DIAG_MIN_VERSION)
if @@DiagSupported.nil?
if cur_major.to_i > tar_major.to_i
@@DiagSupported = true
elsif cur_major.to_i < tar_major.to_i
@@DiagSupported = false
end
end
if @@DiagSupported.nil?
if cur_minor.to_i > tar_minor.to_i
@@DiagSupported = true
elsif cur_minor.to_i < tar_minor.to_i
@@DiagSupported = false
end
end
if @@DiagSupported.nil?
if cur_patch.to_i > tar_patch.to_i
@@DiagSupported = true
elsif cur_patch.to_i < tar_patch.to_i
@@DiagSupported = false
end
end
if @@DiagSupported.nil?
if cur_build.to_i > tar_build.to_i
@@DiagSupported = true
elsif cur_build.to_i < tar_build.to_i
@@DiagSupported = false
end
end
rescue
return false
end
@@DiagSupported = true if @@DiagSupported.nil?
return @@DiagSupported
end