katello 3.0.0.rc1 → 3.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (161) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/katello/katello.scss +5 -5
  3. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +3 -3
  4. data/app/controllers/katello/api/v2/activation_keys_controller.rb +12 -12
  5. data/app/controllers/katello/api/v2/api_controller.rb +13 -5
  6. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +30 -27
  7. data/app/controllers/katello/api/v2/content_views_controller.rb +4 -1
  8. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +100 -3
  9. data/app/controllers/katello/api/v2/repositories_controller.rb +2 -2
  10. data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -1
  11. data/app/controllers/katello/api/v2/subscriptions_controller.rb +0 -1
  12. data/app/controllers/katello/api/v2/systems_controller.rb +1 -88
  13. data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +10 -4
  14. data/app/controllers/katello/remote_execution_controller.rb +1 -1
  15. data/app/helpers/katello/concerns/settings_helper_extensions.rb +50 -0
  16. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +17 -4
  17. data/app/helpers/katello/katello_urls_helper.rb +3 -2
  18. data/app/helpers/katello/providers_helper.rb +2 -5
  19. data/app/lib/actions/katello/capsule_content/configure_capsule.rb +1 -1
  20. data/app/lib/actions/katello/capsule_content/{create_or_update.rb → create_repos.rb} +2 -7
  21. data/app/lib/actions/katello/capsule_content/remove_orphans.rb +15 -0
  22. data/app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb +6 -5
  23. data/app/lib/actions/katello/capsule_content/sync.rb +32 -0
  24. data/app/lib/actions/katello/content_view/incremental_updates.rb +4 -3
  25. data/app/lib/actions/katello/content_view/promote.rb +4 -0
  26. data/app/lib/actions/katello/content_view/publish.rb +4 -0
  27. data/app/lib/actions/katello/content_view_puppet_module/destroy.rb +4 -5
  28. data/app/lib/actions/katello/content_view_version/incremental_update.rb +5 -3
  29. data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +2 -2
  30. data/app/lib/actions/katello/host/generate_applicability.rb +1 -1
  31. data/app/lib/actions/katello/host/hypervisors_update.rb +1 -1
  32. data/app/lib/actions/katello/host/register.rb +10 -4
  33. data/app/lib/actions/katello/repository/destroy.rb +2 -1
  34. data/app/lib/actions/katello/repository/import_applicability.rb +23 -0
  35. data/app/lib/actions/katello/repository/sync.rb +1 -8
  36. data/app/lib/actions/pulp/abstract_async_task.rb +8 -0
  37. data/app/lib/actions/pulp/consumer/content_install.rb +14 -0
  38. data/app/lib/actions/pulp/repository/create.rb +2 -1
  39. data/app/lib/actions/pulp/repository/delete_distributor.rb +18 -0
  40. data/app/lib/actions/pulp/repository/refresh.rb +25 -7
  41. data/app/lib/katello/api/v2/error_handling.rb +2 -2
  42. data/app/lib/katello/capsule_content.rb +11 -0
  43. data/app/lib/katello/errors.rb +1 -1
  44. data/app/mailers/katello/errata_mailer.rb +3 -3
  45. data/app/models/katello/activation_key.rb +6 -6
  46. data/app/models/katello/candlepin/product_content.rb +15 -0
  47. data/app/models/katello/concerns/content_facet_host_extensions.rb +13 -0
  48. data/app/models/katello/concerns/operatingsystem_extensions.rb +17 -1
  49. data/app/models/katello/concerns/pulp_database_unit.rb +3 -1
  50. data/app/models/katello/concerns/setting_extensions.rb +12 -0
  51. data/app/models/katello/content_view.rb +2 -2
  52. data/app/models/katello/erratum.rb +7 -0
  53. data/app/models/katello/glue/candlepin/product.rb +4 -0
  54. data/app/models/katello/glue/candlepin/subscription.rb +1 -1
  55. data/app/models/katello/glue/pulp/repo.rb +31 -3
  56. data/app/models/katello/host/content_facet.rb +43 -16
  57. data/app/models/katello/host/subscription_facet.rb +1 -0
  58. data/app/models/katello/pool.rb +6 -11
  59. data/app/models/katello/repository.rb +20 -15
  60. data/app/models/katello/subscription.rb +14 -0
  61. data/app/models/katello/sync_plan.rb +5 -0
  62. data/app/models/katello/system.rb +0 -10
  63. data/app/models/setting/katello.rb +2 -1
  64. data/app/presenters/katello/product_content_presenter.rb +16 -0
  65. data/app/services/katello/candlepin/consumer.rb +22 -1
  66. data/app/services/katello/repository_type_manager.rb +4 -0
  67. data/app/views/dashboard/_content_views_widget.html.erb +2 -2
  68. data/app/views/dashboard/_errata_widget.html.erb +1 -1
  69. data/app/views/dashboard/_host_collection_widget.html.erb +2 -2
  70. data/app/views/dashboard/_subscription_status_widget.html.erb +5 -5
  71. data/app/views/dashboard/_subscription_widget.html.erb +1 -1
  72. data/app/views/dashboard/_sync_widget.html.erb +2 -2
  73. data/app/views/foreman/unattended/finish-katello.erb +2 -0
  74. data/app/views/foreman/unattended/kickstart-katello-atomic.erb +42 -0
  75. data/app/views/foreman/unattended/kickstart-katello.erb +2 -0
  76. data/app/views/foreman/unattended/snippets/_subscription_manager_registration.erb +15 -9
  77. data/app/views/foreman/unattended/userdata-katello.erb +6 -1
  78. data/app/views/katello/api/v2/activation_keys/show.json.rabl +2 -2
  79. data/app/views/katello/api/v2/common/_metadata.json.rabl +1 -0
  80. data/app/views/katello/api/v2/content_facet/show.json.rabl +4 -0
  81. data/app/views/katello/api/v2/host_subscriptions/content_override.json.rabl +3 -0
  82. data/app/views/katello/api/v2/{systems/_content.json.rabl → host_subscriptions/product_content.json.rabl} +1 -3
  83. data/app/views/katello/api/v2/sync_plans/show.json.rabl +5 -1
  84. data/app/views/katello/errata_mailer/host_errata.html.erb +2 -2
  85. data/app/views/katello/errata_mailer/promote_errata.html.erb +1 -1
  86. data/app/views/katello/errata_mailer/promote_errata.text.erb +1 -1
  87. data/app/views/katello/errata_mailer/sync_errata.html.erb +1 -1
  88. data/app/views/katello/errata_mailer/sync_errata.text.erb +1 -1
  89. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +21 -11
  90. data/config/katello.yaml.example +1 -0
  91. data/config/routes/api/v2.rb +0 -6
  92. data/config/routes/overrides.rb +3 -0
  93. data/db/migrate/20140117160939_refactor_content_views.rb +1 -0
  94. data/db/migrate/20140222022712_remove_provider_discovery.rb +2 -0
  95. data/db/migrate/20140502164009_rename_system_groups_to_host_collections.rb +7 -0
  96. data/db/migrate/20141210173220_create_docker_tables.rb +4 -3
  97. data/db/migrate/20151219203225_rename_index_repository_puppet_module.rb +1 -1
  98. data/db/migrate/20160203195736_remove_docker_image_schema.rb +1 -0
  99. data/db/migrate/20160317171813_change_activation_key_column_names.rb +11 -0
  100. data/db/migrate/20160323065901_increase_cdn_length.rb +11 -0
  101. data/db/migrate/20160404132250_remove_katello_from_notification_name.rb +26 -0
  102. data/db/seeds.d/103-provisioning_templates.rb +3 -1
  103. data/db/seeds.d/106-mail_notifications.rb +3 -3
  104. data/db/seeds.d/109-atomic_os.rb +11 -0
  105. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activationKeyConsumed.filter.js +1 -1
  106. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +21 -9
  107. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-add-subscriptions.html +3 -3
  108. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +41 -40
  109. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +1 -1
  110. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +7 -7
  111. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-subscriptions-list.html +3 -3
  112. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/new-activation-key.controller.js +1 -1
  113. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +8 -8
  114. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js +2 -2
  115. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +0 -8
  116. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +19 -16
  117. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +1 -1
  118. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +5 -3
  119. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +27 -3
  120. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-products.controller.js +79 -26
  121. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-add-subscriptions.html +3 -3
  122. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +32 -10
  123. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +8 -8
  124. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-products.html +11 -11
  125. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions-list.html +3 -3
  126. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-promotion.html +1 -1
  127. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-puppet-modules.html +3 -3
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +1 -1
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/errata-content-hosts.controller.js +33 -10
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/errata-details-content-hosts.html +5 -5
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +2 -2
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-details.html +1 -1
  133. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/new-gpg-key.controller.js +7 -3
  134. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-details.html +1 -1
  135. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/new/views/host-collection-new-form.html +1 -1
  136. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-subscription.factory.js +3 -1
  137. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/check-current-organization.run.js +3 -15
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +36 -0
  139. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organization.factory.js +1 -1
  140. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/bulk-actions.html +14 -3
  141. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +1 -1
  142. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-repositories.html +13 -3
  143. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-info.html +1 -1
  144. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-manage-docker-manifests.html +3 -1
  145. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-manage-packages.html +7 -5
  146. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-manage-puppet-modules.html +5 -3
  147. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +16 -6
  148. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details-info.controller.js +7 -2
  149. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +1 -1
  150. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +6 -0
  151. data/lib/katello/engine.rb +4 -3
  152. data/lib/katello/permissions/host_permissions.rb +1 -0
  153. data/lib/katello/version.rb +1 -1
  154. metadata +17 -11
  155. data/app/controllers/katello/concerns/api/v2/bulk_systems_extensions.rb +0 -39
  156. data/app/views/katello/api/v2/systems/content_override.json.rabl +0 -3
  157. data/app/views/katello/api/v2/systems/product_content.json.rabl +0 -3
  158. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-product-details.controller.js +0 -97
  159. data/lib/katello/tasks/upgrades/2.1/import_errata.rake +0 -45
  160. data/lib/katello/tasks/upgrades/2.2/update_gpg_key_urls.rake +0 -20
  161. data/lib/katello/tasks/upgrades/2.2/update_metadata_expire.rake +0 -18
@@ -9,7 +9,7 @@
9
9
  <% if errata.empty? %>
10
10
  <p class="ca"><%= _("There are no errata that need to be applied to registered content hosts.") %></p>
11
11
  <% else %>
12
- <table class="table table-striped ellipsis">
12
+ <table class="table table-fixed table-striped">
13
13
  <thead>
14
14
  <tr>
15
15
  <th>Type</th>
@@ -9,7 +9,7 @@
9
9
  <% if host_collections.empty? %>
10
10
  <p class="ca"><%= _("No host collections found.") %></p>
11
11
  <% else %>
12
- <table class="table table-striped ellipsis table-bordered">
12
+ <table class="table table-fixed table-striped table-bordered">
13
13
  <thead>
14
14
  <tr>
15
15
  <th>Updates</th>
@@ -29,7 +29,7 @@
29
29
  <a href="/host_collections/<%= host_collection.id %>/actions" style="text-align: center"><i class="label label-success">&nbsp;</i></a>
30
30
  <% end %>
31
31
  </td>
32
- <td><%= host_collection.name %></td>
32
+ <td class='ellipsis'><%= host_collection.name %></td>
33
33
  <td style="text-align: right"><%= host_collection.hosts.length %></td>
34
34
  </tr>
35
35
  <% end %>
@@ -3,12 +3,12 @@
3
3
  </h4>
4
4
 
5
5
  <% organizations = Organization.current.present? ? [Organization.current] : User.current.allowed_organizations %>
6
- <% subscriptions = organizations.collect { |org| Katello::Pool.in_org(org.id) }.flatten %>
7
- <% total_active_subscriptions = Katello::Pool.active(subscriptions).count %>
8
- <% total_expiring_subscriptions = Katello::Pool.expiring_soon(subscriptions).count %>
9
- <% total_recently_expired_subscriptions = Katello::Pool.recently_expired(subscriptions).count %>
6
+ <% subscriptions = Katello::Subscription.in_organization(organizations).includes(:pools) %>
7
+ <% total_active_subscriptions = subscriptions.select(&:active?).count %>
8
+ <% total_expiring_subscriptions = subscriptions.select(&:expiring_soon?).count %>
9
+ <% total_recently_expired_subscriptions = subscriptions.select(&:recently_expired?).count %>
10
10
 
11
- <table class="table table-striped ellipsis table-bordered">
11
+ <table class="table table-fixed table-striped table-bordered">
12
12
  <thead>
13
13
  <tr>
14
14
  <th>Subscription Status</th>
@@ -9,7 +9,7 @@
9
9
  <% valid_consumer_count = owner_infos.map(&:total_valid_compliance_consumers).reduce(:+) %>
10
10
  <% total_count = owner_infos.map(&:total_consumers).reduce(:+) %>
11
11
 
12
- <table class="table table-striped ellipsis table-bordered">
12
+ <table class="table table-fixed table-striped table-bordered">
13
13
  <thead>
14
14
  <tr>
15
15
  <th></th>
@@ -11,7 +11,7 @@
11
11
  <% if products.empty? %>
12
12
  <p class="ca"><%= _("No recently synced products") %></p>
13
13
  <% else %>
14
- <table class="table table-striped ellipsis table-bordered">
14
+ <table class="table table-fixed table-striped table-bordered">
15
15
  <thead>
16
16
  <tr>
17
17
  <th>Product</th>
@@ -22,7 +22,7 @@
22
22
  <tbody>
23
23
  <% products.each do |product| %>
24
24
  <tr>
25
- <td><%= product.name %></td>
25
+ <td class='ellipsis'><%= product.name %></td>
26
26
  <td><%= product.sync_status[:state] %></td>
27
27
  <td><%= product.sync_status[:finish_time] %></td>
28
28
  </tr>
@@ -60,6 +60,8 @@ cat > /etc/puppet/puppet.conf << EOF
60
60
  <%= snippet 'puppet.conf' %>
61
61
  EOF
62
62
 
63
+ <%= snippet('remote_execution_ssh_keys') %>
64
+
63
65
  # Setup puppet to run on system reboot
64
66
  /sbin/chkconfig --level 345 puppet on
65
67
 
@@ -0,0 +1,42 @@
1
+ <%#
2
+ kind: provision
3
+ name: Katello Atomic Kickstart default
4
+ %>
5
+
6
+ lang <%= @host.params['lang'] || 'en_US.UTF-8' %>
7
+ keyboard <%= @host.params['keyboard'] || 'us' %>
8
+ timezone --utc <%= @host.params['time-zone'] || 'UTC' %>
9
+
10
+ # Partition table should create /boot and a volume atomicos
11
+ <% if @dynamic -%>
12
+ %include /tmp/diskpart.cfg
13
+ <% else -%>
14
+ <%= @host.diskLayout %>
15
+ <% end -%>
16
+
17
+ bootloader --timeout=3
18
+ text
19
+
20
+ <% if @host.os.name.match /.*fedora.*/i -%>
21
+ ostreesetup --nogpg --osname=fedora-atomic --remote=fedora-atomic --url=<%= @host.param_true?('atomic-upstream') ? "https://dl.fedoraproject.org/pub/fedora/linux/atomic/#{@host.os.major}/" : "#{@host.operatingsystem.medium_uri(@host)}/content/repo/" %> --ref=fedora-atomic/f<%= @host.os.major %>/<%= @host.architecture %>/docker-host
22
+ <% elsif @host.os.name.match /.*centos.*/i -%>
23
+ ostreesetup --nogpg --osname=centos-atomic-host --remote=centos-atomic-host --url=<%= @host.param_true?('atomic-upstream') ? "http://mirror.centos.org/centos/#{@host.os.major}/atomic/#{@host.architecture}/repo/" : @host.operatingsystem.medium_uri(@host) %> --ref=centos-atomic-host/<%= @host.os.major %>/<%= @host.architecture %>/standard
24
+ <% else -%>
25
+ ostreesetup --nogpg --osname=rhel-atomic-host --remote=rhel-atomic-host --url=file:///install/ostree --ref=rhel-atomic-host/<%= @host.os.major %>/<%= @host.architecture %>/standard
26
+ <% end -%>
27
+ services --disabled cloud-init,cloud-config,cloud-final,cloud-init-local
28
+ rootpw --iscrypted <%= root_pass %>
29
+
30
+ reboot
31
+
32
+ %post
33
+ <%= snippet "subscription_manager_registration" %>
34
+ <%= snippet('remote_execution_ssh_keys') %>
35
+ (
36
+ # Report success back to Foreman
37
+ curl -s -o /dev/null --insecure <%= foreman_url %>
38
+ ) 2>&1 | tee /mnt/sysimage/root/install.post.log
39
+
40
+ exit 0
41
+
42
+ %end
@@ -131,6 +131,8 @@ cat > /etc/puppet/puppet.conf << EOF
131
131
  <%= snippet 'puppet.conf' %>
132
132
  EOF
133
133
 
134
+ <%= snippet('remote_execution_ssh_keys') %>
135
+
134
136
  # Setup puppet to run on system reboot
135
137
  /sbin/chkconfig --level 345 puppet on
136
138
 
@@ -1,12 +1,18 @@
1
1
  <% if @host.params['kt_activation_keys'] %>
2
- # add subscription manager
3
- yum -t -y -e 0 install subscription-manager
4
- rpm -ivh <%= subscription_manager_configuration_url(@host) %>
2
+ # add subscription manager
3
+ <% if @host.operatingsystem.name.match(/.*atomic.*/i) %>
4
+ curl -s <%= subscription_manager_configuration_url(@host, false) %> | IS_ATOMIC=true bash
5
+ <% else %>
6
+ yum -t -y -e 0 install subscription-manager
7
+ rpm -ivh <%= subscription_manager_configuration_url(@host) %>
8
+ <% end %>
5
9
 
6
- echo "Registering the System"
7
- subscription-manager register --org="<%= @host.rhsm_organization_label %>" --name="<%= @host.name %>" --activationkey="<%= @host.params['kt_activation_keys'] %>"
10
+ echo "Registering the System"
11
+ subscription-manager register --org="<%= @host.rhsm_organization_label %>" --name="<%= @host.name %>" --activationkey="<%= @host.params['kt_activation_keys'] %>"
8
12
 
9
- echo "Installing Katello Agent"
10
- yum -t -y -e 0 install katello-agent
11
- chkconfig goferd on
12
- <% end %>
13
+ <% unless @host.operatingsystem.name.match(/.*atomic.*/i) %>
14
+ echo "Installing Katello Agent"
15
+ yum -t -y -e 0 install katello-agent
16
+ chkconfig goferd on
17
+ <% end %>
18
+ <% end %>
@@ -12,10 +12,15 @@ hostname: <%= @host.shortname %>
12
12
  fqdn: <%= @host %>
13
13
  manage_etc_hosts: true
14
14
  <%# Allow user to specify additional SSH key as host paramter -%>
15
- <% if @host.params['sshkey'] -%>
15
+ <% if @host.params['sshkey'].present? || @host.params['remote_execution_ssh_keys'].present? -%>
16
16
  ssh_authorized_keys:
17
+ <% if @host.params['sshkey'].present? -%>
17
18
  - <%= @host.params['sshkey'] %>
18
19
  <% end -%>
20
+ <% @host.params['remote_execution_ssh_keys'].each do |key| -%>
21
+ - <%= key %>
22
+ <% end -%>
23
+ <% end -%>
19
24
  write_files:
20
25
  - path: /tmp/foreman-userdata.sh
21
26
  permissions: '0755'
@@ -1,6 +1,6 @@
1
1
  object @resource
2
2
 
3
- attributes :id, :name, :description, :unlimited_content_hosts, :auto_attach
3
+ attributes :id, :name, :description, :unlimited_hosts, :auto_attach
4
4
 
5
5
  extends 'katello/api/v2/common/org_reference'
6
6
 
@@ -15,7 +15,7 @@ child :environment => :environment do
15
15
  end
16
16
  attributes :environment_id
17
17
 
18
- attributes :usage_count, :user_id, :max_content_hosts, :system_template_id, :release_version,
18
+ attributes :usage_count, :user_id, :max_hosts, :system_template_id, :release_version,
19
19
  :service_level, :auto_attach
20
20
 
21
21
  child :products => :products do |_product|
@@ -4,6 +4,7 @@ node(:total) { @collection[:total] }
4
4
  node(:subtotal) { @collection[:subtotal] }
5
5
  node(:page) { @collection[:page] }
6
6
  node(:per_page) { @collection[:per_page] }
7
+ node(:error) { @collection[:error] }
7
8
  node(:search) { params[:search] }
8
9
  node(:sort) do
9
10
  {
@@ -16,6 +16,10 @@ child :content_facet => :content do
16
16
  node :lifecycle_environment_library? do |content_facet|
17
17
  content_facet.lifecycle_environment.library?
18
18
  end
19
+
20
+ node :katello_agent_installed do |content_facet|
21
+ content_facet.katello_agent_installed?
22
+ end
19
23
  end
20
24
 
21
25
  child :host_collections => :host_collections do
@@ -0,0 +1,3 @@
1
+ object false
2
+
3
+ extends "katello/api/v2/host_subscriptions/product_content"
@@ -11,7 +11,5 @@ child @collection[:results] => :results do
11
11
  attributes :id, :name, :label
12
12
  end
13
13
 
14
- node :override do |pc|
15
- pc.content_override(@system)
16
- end
14
+ attributes :enabled_override, :enabled
17
15
  end
@@ -2,7 +2,7 @@ object @resource
2
2
 
3
3
  attributes :id, :organization_id
4
4
  attributes :name, :description
5
- attributes :sync_date, :interval, :next_sync
5
+ attributes :interval, :next_sync
6
6
  attributes :created_at, :updated_at
7
7
  attributes :enabled
8
8
 
@@ -26,3 +26,7 @@ node :permissions do |sync_plan|
26
26
  :destroy_sync_plans => sync_plan.deletable?
27
27
  }
28
28
  end
29
+
30
+ node :sync_date do |sync_plan|
31
+ sync_plan.plan_date_time
32
+ end
@@ -18,7 +18,7 @@
18
18
  <tr>
19
19
  <td align="center" valign="top">
20
20
  <div align="left">
21
- <h2 style="font-weight: normal;"><b>KATELLO</b> <%= _("Host Advisory").upcase %></h2>
21
+ <h2 style="font-weight: normal;"><b>HOST</b> <%= _("ERRATA ADVISORY").upcase %></h2>
22
22
  </div>
23
23
  <table border="0" width="100%" id="emailHeader" style="background-color: #e1e2e3;" bgcolor="#e1e2e3">
24
24
  <tr>
@@ -48,7 +48,7 @@
48
48
  <th style="border-collapse: collapse; background-image: linear-gradient(#f5f5f5, #e8e8e8); text-align: center; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Bugfix") %></th>
49
49
  <th style="border-collapse: collapse; background-image: linear-gradient(#f5f5f5, #e8e8e8); text-align: center; padding: 4px; border: 1px solid #cccccc;" align="center"><%= _("Enhancement") %></th>
50
50
  </tr>
51
- <% hosts.each do |host| %>
51
+ <% hosts.sort.each do |host| %>
52
52
  <tr>
53
53
  <td style="text-align: left; border-collapse: collapse; background-color: #FFFFFF; padding: 4px; border: 1px solid #cccccc;" width="48%" align="left" bgcolor="#FFFFFF"><%= link_to host, content_host_errata_path(host) %></td>
54
54
  <td width="18%" style="border-collapse: collapse; text-align: center; background-color: #FFFFFF; padding: 4px; border: 1px solid #cccccc;" align="center" bgcolor="#FFFFFF"><%= errata_count(host, :security) %></td>
@@ -18,7 +18,7 @@
18
18
  <tr>
19
19
  <td align="center" valign="top">
20
20
  <div align="left">
21
- <h2 style="font-weight: normal;"><b>KATELLO</b> PROMOTION SUMMARY</h2>
21
+ <h2 style="font-weight: normal;"><%= _("<b>PROMOTION</b> SUMMARY") %></h2>
22
22
 
23
23
  <%= (_("The promotion of %{content_view} to <b>%{environment}</b> has completed. %{count} needed errata are installable on your hosts.") %
24
24
  {:content_view => link_to(@content_view.name, content_view_path(@content_view)),
@@ -1,4 +1,4 @@
1
- <%= _("Katello Promotion Summary") %>
1
+ <%= _("Promotion Summary") %>
2
2
 
3
3
  <%= (_("The promotion of %{content_view} to %{environment} has completed. %{count} errata are available to your hosts.") %
4
4
  {:content_view => @content_view.name,
@@ -18,7 +18,7 @@
18
18
  <tr>
19
19
  <td align="center" valign="top">
20
20
  <div align="left">
21
- <h2 style="font-weight: normal;"><b>KATELLO</b> SYNC SUMMARY</h2>
21
+ <h2 style="font-weight: normal;"><%= _("<b>SYNC</b> SUMMARY") %></h2>
22
22
  <p><%= _("The synchronization of \"%s\" has completed. Below is a summary of new errata.") % @repo.name %>
23
23
  <% if @errata_counts[:total] > 100 %>
24
24
  <%= _("A large number of errata were synced for this repository, so only the first 100 are shown.") %>
@@ -1,4 +1,4 @@
1
- <%= _("Katello Sync Summary") %>
1
+ <%= _("Sync Summary") %>
2
2
 
3
3
  <%= _("The synchronization of \"%s\" has completed. Below is a summary of new errata.") % @repo.name %>
4
4
  <% if @errata_counts[:total] > 100 %>
@@ -4,29 +4,39 @@
4
4
  option.kt-cv { margin-left: 1em; }
5
5
  </style>
6
6
 
7
- <% env_select_id = @hostgroup ? :hostgroup_lifecycle_environment_id : :host_lifecycle_environment_id %>
8
- <% env_select_name = @hostgroup ? 'hostgroup[lifecycle_environment_id]' : 'host[content_facet_attributes][lifecycle_environment_id]' %>
9
- <% env_select_attr = @hostgroup ? 'lifecycle_environment' : 'content_facet.lifecycle_environment' %>
7
+ <% using_hostgroups_page = @host.nil? %>
8
+
9
+ <% env_select_id = using_hostgroups_page ? :hostgroup_lifecycle_environment_id : :host_lifecycle_environment_id %>
10
+ <% env_select_name = using_hostgroups_page ? 'hostgroup[lifecycle_environment_id]' : 'host[content_facet_attributes][lifecycle_environment_id]' %>
11
+ <% env_select_attr = using_hostgroups_page ? 'lifecycle_environment' : 'content_facet.lifecycle_environment' %>
10
12
 
11
13
  <%= field(f, env_select_attr, {:label => _("Lifecycle Environment")}) do
12
- select_tag env_select_id, lifecycle_environment_options(@host || @hostgroup, :include_blank => blank_or_inherit_with_id(f, :lifecycle_environment)),
13
- :class => 'form-control', :name => env_select_name
14
+ if using_hostgroups_page
15
+ select_tag env_select_id, lifecycle_environment_options(@hostgroup, :include_blank => blank_or_inherit_with_id(f, :lifecycle_environment)),
16
+ :class => 'form-control', :name => env_select_name
17
+ else
18
+ select_tag env_select_id, lifecycle_environment_options(@host, :selected_host_group => @hostgroup, :include_blank => blank_or_inherit_with_id(f, :lifecycle_environment)), :class => 'form-control', :name => env_select_name
19
+ end
14
20
  end %>
15
21
 
16
22
 
17
- <% cv_select_id = @hostgroup ? :hostgroup_content_view_id : :host_content_view_id %>
18
- <% cv_select_name = @hostgroup ? 'hostgroup[content_view_id]' : 'host[content_facet_attributes][content_view_id]' %>
19
- <% cv_select_attr = @hostgroup ? 'content_view' : 'content_facet.content_view' %>
23
+ <% cv_select_id = using_hostgroups_page ? :hostgroup_content_view_id : :host_content_view_id %>
24
+ <% cv_select_name = using_hostgroups_page ? 'hostgroup[content_view_id]' : 'host[content_facet_attributes][content_view_id]' %>
25
+ <% cv_select_attr = using_hostgroups_page ? 'content_view' : 'content_facet.content_view' %>
20
26
  <%= field(f, cv_select_attr, {:label => _("Content View")}) do
21
- select_tag cv_select_id, content_views_for_host(@host || @hostgroup, :include_blank => blank_or_inherit_with_id(f, :content_view)),
22
- :class => 'form-control', :name => cv_select_name
27
+ if using_hostgroups_page
28
+ select_tag cv_select_id, content_views_for_host(@hostgroup, :include_blank => blank_or_inherit_with_id(f, :content_view)),
29
+ :class => 'form-control', :name => cv_select_name
30
+ else
31
+ select_tag cv_select_id, content_views_for_host(@host, :selected_host_group => @hostgroup, :include_blank => blank_or_inherit_with_id(f, :content_view)), :class => 'form-control', :name => cv_select_name
32
+ end
23
33
  end %>
24
34
 
25
35
  <% if @host %>
26
36
  <input type="hidden" name="host[content_facet_attributes][id]" value="<%= @host.content_facet.try(:id) %>">
27
37
  <% end %>
28
38
 
29
- <% data_url = @hostgroup ? environment_selected_hostgroups_path : hostgroup_or_environment_selected_hosts_path %>
39
+ <% data_url = using_hostgroups_page ? environment_selected_hostgroups_path : hostgroup_or_environment_selected_hosts_path %>
30
40
  <%= select_f f, :environment_id, Environment.all, :id, :to_label, {:include_blank => blank_or_inherit_f(f, :environment)},
31
41
  {:label => _("Puppet Environment"), :onchange => 'update_puppetclasses(this);', 'data-url'=> data_url,
32
42
  'data-content_puppet_match' => (@host || @hostgroup).new_record? || (@host || @hostgroup).content_and_puppet_match?,
@@ -12,6 +12,7 @@
12
12
  :redhat_repository_url: https://cdn.redhat.com
13
13
 
14
14
  :consumer_cert_rpm: 'katello-ca-consumer-latest.noarch.rpm'
15
+ :consumer_cert_sh: 'katello-rhsm-consumer'
15
16
 
16
17
  # Setup your candlepin environment here
17
18
  :candlepin:
@@ -240,13 +240,7 @@ Katello::Engine.routes.draw do
240
240
 
241
241
  api_resources :systems, :only => [:index, :show, :create, :update, :destroy] do
242
242
  member do
243
- post :host_collections, :action => :add_host_collections
244
- delete :host_collections, :action => :remove_host_collections
245
- get :pools
246
243
  get :releases
247
- put :content_override
248
- get :product_content
249
- post :subscriptions, :action => :add_subscriptions
250
244
  end
251
245
  collection do
252
246
  get :auto_complete_search
@@ -64,6 +64,7 @@ Foreman::Application.routes.draw do
64
64
  match '/bulk/destroy' => 'hosts_bulk_actions#destroy_hosts', :via => :put
65
65
  match '/bulk/environment_content_view' => 'hosts_bulk_actions#environment_content_view', :via => :put
66
66
  match '/bulk/available_incremental_updates' => 'hosts_bulk_actions#available_incremental_updates', :via => :post
67
+ match '/subscriptions/' => 'host_subscriptions#create', :via => :post
67
68
  end
68
69
 
69
70
  resources :packages, :only => [:index], :controller => :host_packages do
@@ -82,8 +83,10 @@ Foreman::Application.routes.draw do
82
83
  put :auto_attach
83
84
  get :product_content
84
85
  get :events
86
+ put :content_override
85
87
  put :remove_subscriptions
86
88
  put :add_subscriptions
89
+ delete :destroy
87
90
  end
88
91
  end
89
92
  end
@@ -14,6 +14,7 @@ class RefactorContentViews < ActiveRecord::Migration
14
14
  remove_foreign_key "katello_filters_products", :name => "filters_product_filter_id_fk"
15
15
  remove_foreign_key "katello_filters_products", :name => "filters_product_product_id_fk"
16
16
  remove_foreign_key "katello_filter_rules", :name => "filters_rules_filter_id_fk"
17
+ remove_foreign_key "katello_filters_repositories", :name => "filters_repositories_filter_id_fk"
17
18
 
18
19
  drop_table :katello_content_view_definition_bases
19
20
  drop_table :katello_content_view_definition_products
@@ -1,5 +1,6 @@
1
1
  class RemoveProviderDiscovery < ActiveRecord::Migration
2
2
  def up
3
+ remove_foreign_key "katello_providers", :name => "providers_discovery_task_id_fk"
3
4
  remove_column :katello_providers, :discovery_url
4
5
  remove_column :katello_providers, :discovery_task_id
5
6
  remove_column :katello_providers, :discovered_repos
@@ -9,5 +10,6 @@ class RemoveProviderDiscovery < ActiveRecord::Migration
9
10
  add_column :katello_providers, :discovery_url, :string, :limit => 255
10
11
  add_column :katello_providers, :discovered_repos, :text
11
12
  add_column :katello_providers, :discovery_task_id, :integer
13
+ add_foreign_key "katello_providers", "katello_task_statuses", :name => "providers_discovery_task_id_fk", :column => "discovery_task_id"
12
14
  end
13
15
  end
@@ -2,6 +2,9 @@ class RenameSystemGroupsToHostCollections < ActiveRecord::Migration
2
2
  def change
3
3
  rename_index :katello_key_system_groups, "index_key_system_groups_on_activation_key_id", "index_key_host_collections_on_activation_key_id"
4
4
  rename_index :katello_key_system_groups, "index_key_system_groups_on_system_group_id", "index_key_host_collections_on_host_collection_id"
5
+
6
+ remove_foreign_key :katello_key_system_groups, :name => "key_system_groups_system_group_id_fk"
7
+
5
8
  rename_column :katello_key_system_groups, :system_group_id, :host_collection_id
6
9
  rename_table :katello_key_system_groups, :katello_key_host_collections
7
10
 
@@ -10,9 +13,13 @@ class RenameSystemGroupsToHostCollections < ActiveRecord::Migration
10
13
  rename_column :katello_system_groups, :max_systems, :max_content_hosts
11
14
  rename_table :katello_system_groups, :katello_host_collections
12
15
 
16
+ add_foreign_key :katello_key_host_collections, :katello_host_collections, :name => "key_system_groups_system_group_id_fk", :column => "host_collection_id"
17
+
13
18
  rename_index :katello_system_system_groups, "index_system_system_groups_on_system_group_id", "index_system_host_collections_on_host_collection_id"
14
19
  rename_index :katello_system_system_groups, "index_system_system_groups_on_system_id", "index_system_host_collections_on_system_id"
20
+ remove_foreign_key :katello_system_system_groups, :name => "system_system_groups_system_group_id_fk"
15
21
  rename_column :katello_system_system_groups, :system_group_id, :host_collection_id
16
22
  rename_table :katello_system_system_groups, :katello_system_host_collections
23
+ add_foreign_key :katello_system_host_collections, :katello_host_collections, :name => "system_system_groups_system_group_id_fk", :column => "host_collection_id"
17
24
  end
18
25
  end