This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Katello::ContentViewEnvironment.all.each do |cve| | |
ForemanTasks.async_task( | |
Actions::Candlepin::Environment::SetContent, | |
cve.content_view, | |
cve.owner, | |
cve, | |
) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script clears the smart_proxy_sync_history for a set of repositories on Satellite, from a list of repository IDs. | |
# | |
# This is useful when you want to guarantee these repositories are synchronized on Capsules (with the Library environment) on the | |
# next 'Optimized' sync that is run, without having to run a full 'Complete' sync of the Capsule. | |
# | |
# The only required input is a list (Ruby Array) of repository_ids, on the first non-comment line below this documentation. | |
# Edit this Array of repository_ids to match the repository IDs that should be eligible for the next optimized syncs. | |
# | |
# For example, if I have the following repositories on Satellite: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo ' | |
myHost = Host.find_by_name("myhost.example.com") | |
Katello::Candlepin::Consumer.new(myHost.subscription_facet.uuid, myHost.organization.label).entitlement_status | |
' | foreman-rake console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Importing Subscription Pools from Candlepin to Katello (what is displayed on the WebUI)." | |
echo ' | |
namespace :katello do | |
task :import_subscriptions => ["environment"] do | |
User.current = User.anonymous_api_admin | |
puts _("Importing Subscriptions") | |
Katello::Subscription.import_all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Importing Subscription Pools from Candlepin." | |
echo ' | |
namespace :katello do | |
task :import_subscriptions => ["environment"] do | |
User.current = User.anonymous_api_admin | |
puts _("Importing Subscriptions") | |
Katello::Subscription.import_all |