Class: Actions::Katello::Host::UpdateContentView
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::Katello::Host::UpdateContentView
- Defined in:
- app/lib/actions/katello/host/update_content_view.rb
Instance Method Summary collapse
Instance Method Details
#humanized_name ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/lib/actions/katello/host/update_content_view.rb', line 16 def humanized_name if input.try(:[], :hostname).nil? _("Update content view environments for host") else _("Update content view environments for host %s") % input[:hostname] end end |
#plan(host, content_view_id, lifecycle_environment_id) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/lib/actions/katello/host/update_content_view.rb', line 5 def plan(host, content_view_id, lifecycle_environment_id) if host.content_facet cvenv = ::Katello::ContentViewEnvironment.find_by_cv_and_lce!(content_view_id, lifecycle_environment_id) host.content_facet.content_view_environments = [cvenv] host.update_candlepin_associations plan_self(:hostname => host.name) else fail _("Host %s has not been registered with subscription-manager.") % host.name end end |