Skip to content

Instantly share code, notes, and snippets.

@parthaa
Last active February 6, 2023 13:34
Show Gist options
  • Save parthaa/4d03017a0f68ca69375f5d436d108025 to your computer and use it in GitHub Desktop.
Save parthaa/4d03017a0f68ca69375f5d436d108025 to your computer and use it in GitHub Desktop.
def report
rows = []
Organization.all.each do |org|
org.kt_environments.each do |env|
env.content_view_versions.not_ignorable.each do |cvv|
nvra = Katello::Rpm.latest(::Katello::Rpm.where(name: "kernel", id: cvv.packages)).first&.nvra
if nvra
rows << { organization: org.title,
lifecycle_environment: env.label,
version: cvv.name,
nvra: nvra
}
end
end
end
end
rows
end
@sayan3296
Copy link

FYI, the shell script i came up with for Sat 6.10 - 6.13 i.e. https://gist.github.com/sayan3296/61a4d3efc1ba6a2f817dc6bc94b0dc14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment