katello 3.4.5 → 3.5.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/app/assets/stylesheets/katello/katello.scss +7 -5
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +3 -3
- data/app/controllers/katello/api/v2/api_controller.rb +8 -0
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +6 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +2 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_views_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_collections_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_tracer_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +6 -6
- data/app/controllers/katello/api/v2/repositories_controller.rb +6 -7
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +25 -4
- data/app/controllers/katello/concerns/api/v2/content_overrides_controller.rb +2 -4
- data/app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb +10 -27
- data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +10 -14
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +33 -0
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +2 -1
- data/app/helpers/katello/organizations_helper.rb +1 -1
- data/app/helpers/katello/providers_helper.rb +1 -1
- data/app/lib/actions/candlepin/abstract_async_task.rb +1 -1
- data/app/lib/actions/candlepin/candlepin_listening_service.rb +17 -6
- data/app/lib/actions/candlepin/import_pool_handler.rb +21 -56
- data/app/lib/actions/candlepin/listen_on_candlepin_events.rb +1 -0
- data/app/lib/actions/candlepin/owner/import_products.rb +1 -3
- data/app/lib/actions/candlepin/product/content_create.rb +2 -0
- data/app/lib/actions/candlepin/product/content_update.rb +2 -0
- data/app/lib/actions/candlepin/product/create.rb +2 -10
- data/app/lib/actions/candlepin/product/create_unlimited_subscription.rb +8 -1
- data/app/lib/actions/katello/capsule_content/sync.rb +12 -3
- data/app/lib/actions/katello/host/attach_subscriptions.rb +1 -1
- data/app/lib/actions/katello/host/hypervisors_update.rb +2 -4
- data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
- data/app/lib/actions/katello/organization/create.rb +2 -2
- data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -2
- data/app/lib/actions/katello/product/content_create.rb +4 -4
- data/app/lib/actions/katello/product/create.rb +13 -11
- data/app/lib/actions/katello/repository/sync.rb +0 -1
- data/app/lib/actions/katello/repository/update.rb +2 -1
- data/app/lib/actions/pulp/consumer/generate_applicability.rb +5 -1
- data/app/lib/actions/pulp/repository/create.rb +1 -0
- data/app/lib/actions/pulp/repository/create_in_plan.rb +4 -4
- data/app/lib/actions/pulp/repository/sync.rb +1 -1
- data/app/lib/katello/http_resource.rb +1 -1
- data/app/lib/katello/lazy_accessor.rb +1 -1
- data/app/lib/katello/resources/candlepin.rb +2 -2
- data/app/lib/katello/util/data.rb +6 -0
- data/app/lib/katello/util/support.rb +1 -1
- data/app/models/katello/activation_key.rb +25 -7
- data/app/models/katello/concerns/host_managed_extensions.rb +60 -17
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +31 -10
- data/app/models/katello/content_facet_applicable_rpm.rb +0 -2
- data/app/models/katello/content_facet_erratum.rb +0 -2
- data/app/models/katello/content_facet_repository.rb +0 -2
- data/app/models/katello/content_view.rb +3 -4
- data/app/models/katello/content_view_component.rb +1 -3
- data/app/models/katello/content_view_docker_filter_rule.rb +0 -2
- data/app/models/katello/content_view_environment.rb +2 -4
- data/app/models/katello/content_view_erratum_filter_rule.rb +0 -2
- data/app/models/katello/content_view_filter.rb +0 -2
- data/app/models/katello/content_view_package_filter_rule.rb +0 -2
- data/app/models/katello/content_view_package_group_filter_rule.rb +0 -2
- data/app/models/katello/content_view_puppet_environment.rb +0 -2
- data/app/models/katello/content_view_puppet_environment_puppet_module.rb +0 -2
- data/app/models/katello/content_view_puppet_module.rb +0 -2
- data/app/models/katello/content_view_repository.rb +0 -2
- data/app/models/katello/content_view_version.rb +0 -2
- data/app/models/katello/erratum_bugzilla.rb +0 -2
- data/app/models/katello/erratum_cve.rb +0 -2
- data/app/models/katello/erratum_package.rb +0 -2
- data/app/models/katello/ext/label_from_name.rb +1 -1
- data/app/models/katello/glue/candlepin/pool.rb +18 -11
- data/app/models/katello/glue/candlepin/product.rb +1 -2
- data/app/models/katello/glue/pulp/repo.rb +13 -6
- data/app/models/katello/glue/pulp/repos.rb +16 -16
- data/app/models/katello/gpg_key.rb +0 -2
- data/app/models/katello/host/content_facet.rb +21 -0
- data/app/models/katello/host/info_provider.rb +56 -0
- data/app/models/katello/host/subscription_facet.rb +5 -3
- data/app/models/katello/host_collection.rb +0 -2
- data/app/models/katello/host_collection_hosts.rb +0 -2
- data/app/models/katello/host_installed_package.rb +0 -2
- data/app/models/katello/host_tracer.rb +0 -2
- data/app/models/katello/key_host_collection.rb +0 -2
- data/app/models/katello/kt_environment.rb +0 -2
- data/app/models/katello/model.rb +1 -1
- data/app/models/katello/pool.rb +3 -3
- data/app/models/katello/product.rb +10 -3
- data/app/models/katello/provider.rb +0 -2
- data/app/models/katello/repository.rb +0 -2
- data/app/models/katello/repository_docker_manifest.rb +0 -2
- data/app/models/katello/repository_erratum.rb +0 -2
- data/app/models/katello/repository_file.rb +0 -2
- data/app/models/katello/repository_ostree_branch.rb +0 -2
- data/app/models/katello/repository_package_group.rb +0 -1
- data/app/models/katello/repository_puppet_module.rb +0 -2
- data/app/models/katello/repository_rpm.rb +0 -2
- data/app/models/katello/rpm.rb +2 -2
- data/app/models/katello/subscription_facet_activation_key.rb +0 -2
- data/app/models/katello/subscription_facet_pool.rb +6 -0
- data/app/models/katello/subscription_product.rb +0 -1
- data/app/models/katello/sync_plan.rb +0 -2
- data/app/models/katello/task_status.rb +2 -4
- data/app/models/setting/content.rb +2 -0
- data/app/services/katello/candlepin/consumer.rb +1 -2
- data/app/services/katello/candlepin/message_handler.rb +88 -0
- data/app/services/katello/repository_type_manager.rb +1 -1
- data/app/views/dashboard/_content_views_widget.html.erb +2 -2
- data/app/views/dashboard/_errata_widget.html.erb +3 -3
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +25 -8
- data/app/views/foreman/unattended/kickstart-katello-atomic.erb +1 -1
- data/app/views/foreman/unattended/kickstart-katello.erb +1 -1
- data/app/views/katello/api/v2/common/_org_reference.json.rabl +1 -0
- data/app/views/katello/api/v2/content_facet/base.json.rabl +3 -14
- data/app/views/katello/api/v2/products/base.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +8 -1
- data/app/views/katello/api/v2/subscriptions/base.json.rabl +0 -7
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +4 -37
- data/config/routes/overrides.rb +1 -0
- data/db/migrate/20140422000001_update_products_add_organization.rb +1 -1
- data/db/migrate/20140610154745_content_view_puppet_environment_id.rb +1 -1
- data/db/migrate/20140626204657_add_unlimited_to_activation_keys.rb +1 -1
- data/db/migrate/20140626204902_add_unlimited_to_host_collection.rb +1 -1
- data/db/migrate/20141209103005_disown_foreman_templates.rb +1 -1
- data/db/migrate/20150901213759_remove_distributors.rb +1 -1
- data/db/migrate/20150908222711_drop_marketing_engineering_products.rb +1 -1
- data/db/migrate/20150930183738_migrate_content_hosts.rb +20 -20
- data/db/migrate/20151014144004_host_collection_to_hosts.rb +5 -5
- data/db/migrate/20160114200145_add_mirror_on_sync_to_repositories.rb +1 -1
- data/db/migrate/20160131182301_add_download_policy_to_katello_repositories.rb +1 -1
- data/db/migrate/20160222143432_move_system_description_to_host.rb +2 -2
- data/db/migrate/20160404132250_remove_katello_from_notification_name.rb +1 -1
- data/db/migrate/20160426145517_move_host_description_to_host_comment.rb +1 -1
- data/db/migrate/20160617124149_remove_duplicate_view_filters.rb +4 -4
- data/db/migrate/20160619223332_fix_viewer_role.rb +4 -4
- data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +1 -1
- data/db/migrate/20160924213020_change_katello_widget_names.rb +1 -1
- data/db/migrate/20161014133811_move_content_view_version_description_to_histories.rb +2 -2
- data/db/migrate/20161026191118_fix_invalid_interfaces.rb +1 -1
- data/db/migrate/20170321012632_fill_in_content_view_components.rb +3 -3
- data/db/migrate/20170718142148_create_katello_subscription_facet_pools.rb +15 -0
- data/db/migrate/20170821170915_add_index_to_installed_packages.rb +5 -0
- data/db/migrate/20170821170916_add_nvra_index_to_installed_packages.rb +5 -0
- data/db/migrate/20170913183848_add_errata_counts.rb +23 -0
- data/db/seeds.d/101-locations.rb +2 -2
- data/db/seeds.d/102-organizations.rb +3 -3
- data/db/seeds.d/103-provisioning_templates.rb +29 -31
- data/db/seeds.d/104-proxy.rb +10 -12
- data/db/seeds.d/106-mail_notifications.rb +30 -32
- data/db/seeds.d/107-enable_dynflow.rb +3 -4
- data/db/seeds.d/108-subcription-bookmarks.rb +12 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/architectures/architecture.factory.js +15 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/architectures/architectures.module.js +14 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +107 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html +113 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +13 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +25 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +15 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +11 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-activation-keys.html +15 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-content-hosts.html +16 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +9 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata-counts.html +6 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/views/packages.html +5 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +20 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +9 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +22 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +17 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-set.factory.js +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html +0 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html +31 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html +6 -3
- data/lib/katello/permissions/host_permissions.rb +1 -0
- data/lib/katello/plugin.rb +7 -5
- data/lib/katello/tasks/clean_installed_packages.rake +54 -0
- data/lib/katello/tasks/import_subscriptions.rake +8 -0
- data/lib/katello/tasks/{setup.rake → reset.rake} +10 -0
- data/lib/katello/tasks/test.rake +18 -0
- data/lib/katello/version.rb +1 -1
- data/vendor/assets/stylesheets/katello/{jquery-ui-1.8.11.custom.css → jquery-ui-1.8.11.custom.css.scss} +0 -0
- data/vendor/assets/stylesheets/katello/{jquery.loadmask.css → jquery.loadmask.css.scss} +0 -0
- data/vendor/assets/stylesheets/katello/{jquery.treeTable.scss → jquery.treeTable.css.scss} +0 -0
- data/vendor/assets/stylesheets/katello/{ui.spinner.css → ui.spinner.css.scss} +0 -0
- metadata +43 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-activation-keys.controller.js +0 -30
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-content-hosts.controller.js +0 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-activation-keys.html +0 -48
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-content-hosts.html +0 -62
- data/lib/katello/tasks/upgrades/2.4/import_subscriptions.rake +0 -12
- data/lib/katello/tasks/upgrades/3.3/import_subscriptions.rake +0 -12
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
class RemoveDuplicateViewFilters < ActiveRecord::Migration
|
|
2
|
-
class Role <
|
|
2
|
+
class Role < ApplicationRecord
|
|
3
3
|
end
|
|
4
4
|
|
|
5
|
-
class Filter <
|
|
5
|
+
class Filter < ApplicationRecord
|
|
6
6
|
belongs_to :role
|
|
7
7
|
has_many :filterings, :dependent => :destroy
|
|
8
8
|
has_many :permissions, :through => :filterings
|
|
@@ -10,12 +10,12 @@ class RemoveDuplicateViewFilters < ActiveRecord::Migration
|
|
|
10
10
|
scope :unlimited, -> { where(:search => nil, :taxonomy_search => nil) }
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
class Filtering <
|
|
13
|
+
class Filtering < ApplicationRecord
|
|
14
14
|
belongs_to :filter
|
|
15
15
|
belongs_to :permission
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
class Permission <
|
|
18
|
+
class Permission < ApplicationRecord
|
|
19
19
|
has_many :filterings, :dependent => :destroy
|
|
20
20
|
has_many :filters, :through => :filterings
|
|
21
21
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
class FixViewerRole < ActiveRecord::Migration
|
|
2
|
-
class Role <
|
|
2
|
+
class Role < ApplicationRecord
|
|
3
3
|
has_many :filters
|
|
4
4
|
end
|
|
5
5
|
|
|
6
|
-
class Filter <
|
|
6
|
+
class Filter < ApplicationRecord
|
|
7
7
|
belongs_to :role
|
|
8
8
|
has_many :filterings, :dependent => :destroy
|
|
9
9
|
has_many :permissions, :through => :filterings
|
|
@@ -16,12 +16,12 @@ class FixViewerRole < ActiveRecord::Migration
|
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
class Filtering <
|
|
19
|
+
class Filtering < ApplicationRecord
|
|
20
20
|
belongs_to :filter
|
|
21
21
|
belongs_to :permission
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
class Permission <
|
|
24
|
+
class Permission < ApplicationRecord
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def change
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
class MoveContentViewVersionDescriptionToHistories < ActiveRecord::Migration
|
|
2
|
-
class FakeContentViewVersion <
|
|
2
|
+
class FakeContentViewVersion < ApplicationRecord
|
|
3
3
|
self.table_name = 'katello_content_view_versions'
|
|
4
4
|
has_many :history, :class_name => "CVHistory", :inverse_of => :content_view_version,
|
|
5
5
|
:dependent => :destroy, :foreign_key => :katello_content_view_version_id
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
class CVHistory <
|
|
8
|
+
class CVHistory < ApplicationRecord
|
|
9
9
|
self.table_name = 'katello_content_view_histories'
|
|
10
10
|
belongs_to :content_view_version, :class_name => "FakeContentViewVersion", :foreign_key => :katello_content_view_version_id, :inverse_of => :history
|
|
11
11
|
SUCCESSFUL = 'successful'.freeze
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
class FillInContentViewComponents < ActiveRecord::Migration
|
|
2
|
-
class FakeContentView <
|
|
2
|
+
class FakeContentView < ApplicationRecord
|
|
3
3
|
self.table_name = 'katello_content_views'
|
|
4
4
|
|
|
5
5
|
has_many :content_view_components, :class_name => "FakeContentViewVersion", :dependent => :destroy,
|
|
6
6
|
:inverse_of => :composite_content_view, :foreign_key => :composite_content_view_id
|
|
7
7
|
end
|
|
8
8
|
|
|
9
|
-
class FakeContentViewVersion <
|
|
9
|
+
class FakeContentViewVersion < ApplicationRecord
|
|
10
10
|
self.table_name = 'katello_content_view_versions'
|
|
11
11
|
|
|
12
12
|
has_many :content_view_components, :inverse_of => :content_view_version, :dependent => :destroy, :class_name => 'FakeContentViewComponent'
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
class FakeContentViewComponent <
|
|
15
|
+
class FakeContentViewComponent < ApplicationRecord
|
|
16
16
|
self.table_name = 'katello_content_view_components'
|
|
17
17
|
|
|
18
18
|
belongs_to :content_view_version, :class_name => "FakeContentViewVersion",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class CreateKatelloSubscriptionFacetPools < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
create_table :katello_subscription_facet_pools do |t|
|
|
4
|
+
t.column :subscription_facet_id, :integer, required: true
|
|
5
|
+
t.column :pool_id, :integer, required: true
|
|
6
|
+
end
|
|
7
|
+
add_index "katello_subscription_facet_pools", [:pool_id, :subscription_facet_id], :unique => true,
|
|
8
|
+
:name => "index_katello_sub_facet_pools_on_sfid_poolid"
|
|
9
|
+
|
|
10
|
+
add_foreign_key "katello_subscription_facet_pools", "katello_pools",
|
|
11
|
+
:name => "katello_sub_facet_pools_pool_id_fk", :column => "pool_id"
|
|
12
|
+
add_foreign_key "katello_subscription_facet_pools", "katello_subscription_facets",
|
|
13
|
+
:name => "katello_sub_facet_pools_sf_id_fk", :column => "subscription_facet_id"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
class AddErrataCounts < ActiveRecord::Migration
|
|
2
|
+
def up
|
|
3
|
+
add_column :katello_content_facets, :installable_security_errata_count, :integer, :null => false, :default => 0
|
|
4
|
+
add_column :katello_content_facets, :installable_enhancement_errata_count, :integer, :null => false, :default => 0
|
|
5
|
+
add_column :katello_content_facets, :installable_bugfix_errata_count, :integer, :null => false, :default => 0
|
|
6
|
+
|
|
7
|
+
add_column :katello_content_facets, :applicable_rpm_count, :integer, :null => false, :default => 0
|
|
8
|
+
add_column :katello_content_facets, :upgradable_rpm_count, :integer, :null => false, :default => 0
|
|
9
|
+
|
|
10
|
+
Katello::Host::ContentFacet.find_each do |content_facet|
|
|
11
|
+
content_facet.update_applicability_counts
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def down
|
|
16
|
+
remove_column :katello_content_facets, :installable_security_errata_count
|
|
17
|
+
remove_column :katello_content_facets, :installable_enhancement_errata_count
|
|
18
|
+
remove_column :katello_content_facets, :installable_bugfix_errata_count
|
|
19
|
+
|
|
20
|
+
remove_column :katello_content_facets, :applicable_rpm_count
|
|
21
|
+
remove_column :katello_content_facets, :upgradable_rpm_count
|
|
22
|
+
end
|
|
23
|
+
end
|
data/db/seeds.d/101-locations.rb
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
#
|
|
6
6
|
|
|
7
7
|
if Location.exists? &&
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Setting[:default_location_subscribed_hosts].blank? ||
|
|
9
|
+
Setting[:default_location_puppet_content].blank?
|
|
10
10
|
# Create a new location to be used as the Katello Default.
|
|
11
11
|
default_location = Location.where(:name => ENV['SEED_LOCATION']).first_or_create
|
|
12
12
|
if Setting[:default_location_subscribed_hosts].empty?
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
#
|
|
6
6
|
|
|
7
7
|
Organization.all.each do |org|
|
|
8
|
-
User.
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
User.as(::User.anonymous_api_admin.login) do
|
|
9
|
+
ForemanTasks.sync_task(::Actions::Katello::Organization::Create, org) unless org.library
|
|
10
|
+
end
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
if ENV['SEED_ORGANIZATION']
|
|
@@ -4,41 +4,39 @@
|
|
|
4
4
|
# !!! PLEASE KEEP THIS SCRIPT IDEMPOTENT !!!
|
|
5
5
|
#
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
User.as(::User.anonymous_api_admin.login) do
|
|
8
|
+
# Provisioning Templates
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
hash
|
|
14
|
-
end
|
|
10
|
+
kinds = [:provision, :finish, :user_data].inject({}) do |hash, kind|
|
|
11
|
+
hash[kind] = TemplateKind.find_by(:name => kind)
|
|
12
|
+
hash
|
|
13
|
+
end
|
|
15
14
|
|
|
16
|
-
templates = [{:name => "Katello Kickstart Default", :source => "kickstart-katello.erb", :template_kind => kinds[:provision]},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
templates = [{:name => "Katello Kickstart Default", :source => "kickstart-katello.erb", :template_kind => kinds[:provision]},
|
|
16
|
+
{:name => "Katello Kickstart Default User Data", :source => "userdata-katello.erb", :template_kind => kinds[:user_data]},
|
|
17
|
+
{:name => "Katello Kickstart Default Finish", :source => "finish-katello.erb", :template_kind => kinds[:finish]},
|
|
18
|
+
{:name => "subscription_manager_registration", :source => "snippets/_subscription_manager_registration.erb", :snippet => true},
|
|
19
|
+
{:name => "Katello Atomic Kickstart Default", :source => "kickstart-katello-atomic.erb", :template_kind => kinds[:provision]}]
|
|
21
20
|
|
|
22
|
-
templates.each do |template|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
templates.each do |template|
|
|
22
|
+
template[:template] = File.read(File.join(Katello::Engine.root, "app/views/foreman/unattended", template.delete(:source)))
|
|
23
|
+
ProvisioningTemplate.where(:name => template["name"]).first_or_create do |pt|
|
|
24
|
+
pt.vendor = "Katello"
|
|
25
|
+
pt.default = true
|
|
26
|
+
pt.locked = true
|
|
27
|
+
pt.name = template[:name]
|
|
28
|
+
pt.template = template[:template]
|
|
29
|
+
pt.template_kind = template[:template_kind] if template[:template_kind]
|
|
30
|
+
pt.snippet = template[:snippet] if template[:snippet]
|
|
31
|
+
end
|
|
32
|
+
ProvisioningTemplate.find_by(name: template[:name]).update_attributes!(:template => template[:template])
|
|
32
33
|
end
|
|
33
|
-
ProvisioningTemplate.find_by(name: template[:name]).update_attributes!(:template => template[:template])
|
|
34
|
-
end
|
|
35
34
|
|
|
36
|
-
# Ensure all default templates are seeded into the first org and loc
|
|
37
|
-
ProvisioningTemplate.where(:default => true).each do |template|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
# Ensure all default templates are seeded into the first org and loc
|
|
36
|
+
ProvisioningTemplate.where(:default => true).each do |template|
|
|
37
|
+
template.organizations << Organization.first unless template.organizations.include?(Organization.first) || Organization.count.zero?
|
|
38
|
+
if Location.exists? && !template.location_ids.include?(Location.default_location_ids)
|
|
39
|
+
template.location_ids << Location.default_location_ids
|
|
40
|
+
end
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
|
-
|
|
44
|
-
::User.current = nil
|
data/db/seeds.d/104-proxy.rb
CHANGED
|
@@ -9,17 +9,15 @@ def format_errors(model = nil)
|
|
|
9
9
|
model.errors.full_messages.join(';')
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
User.as(::User.anonymous_api_admin.login) do
|
|
13
|
+
# Proxy features
|
|
14
|
+
feature = Feature.where(:name => 'Pulp').first_or_create
|
|
15
|
+
if feature.nil? || feature.errors.any?
|
|
16
|
+
fail "Unable to create proxy feature: #{format_errors feature}"
|
|
17
|
+
end
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if
|
|
17
|
-
|
|
19
|
+
["Pulp", "Pulp Node"].each do |input|
|
|
20
|
+
f = Feature.where(:name => input).first_or_create
|
|
21
|
+
fail "Unable to create proxy feature: #{format_errors f}" if f.nil? || f.errors.any?
|
|
22
|
+
end
|
|
18
23
|
end
|
|
19
|
-
|
|
20
|
-
["Pulp", "Pulp Node"].each do |input|
|
|
21
|
-
f = Feature.where(:name => input).first_or_create
|
|
22
|
-
fail "Unable to create proxy feature: #{format_errors f}" if f.nil? || f.errors.any?
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
::User.current = nil
|
|
@@ -3,40 +3,38 @@
|
|
|
3
3
|
#
|
|
4
4
|
# !!! PLEASE KEEP THIS SCRIPT IDEMPOTENT !!!
|
|
5
5
|
#
|
|
6
|
-
|
|
6
|
+
User.as(::User.anonymous_api_admin.login) do
|
|
7
|
+
# The notification names are used as humanized labels. These need to be
|
|
8
|
+
# translated as well as the description
|
|
9
|
+
N_('Host errata advisory')
|
|
10
|
+
N_('Sync errata')
|
|
11
|
+
N_('Promote errata')
|
|
7
12
|
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
N_('
|
|
12
|
-
|
|
13
|
+
# Mail Notifications
|
|
14
|
+
notifications = [
|
|
15
|
+
{:name => :host_errata_advisory,
|
|
16
|
+
:description => N_('A summary of available and applicable errata for your hosts'),
|
|
17
|
+
:mailer => 'Katello::ErrataMailer',
|
|
18
|
+
:method => 'host_errata',
|
|
19
|
+
:subscription_type => 'report'
|
|
20
|
+
},
|
|
13
21
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
:subscription_type => 'report'
|
|
21
|
-
},
|
|
22
|
+
{:name => :sync_errata,
|
|
23
|
+
:description => N_('A summary of new errata after a repository is synchronized'),
|
|
24
|
+
:mailer => 'Katello::ErrataMailer',
|
|
25
|
+
:method => 'sync_errata',
|
|
26
|
+
:subscription_type => 'alert'
|
|
27
|
+
},
|
|
22
28
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
{:name => :promote_errata,
|
|
30
|
+
:description => N_('A post-promotion summary of hosts with installable errata'),
|
|
31
|
+
:mailer => 'Katello::ErrataMailer',
|
|
32
|
+
:method => 'promote_errata',
|
|
33
|
+
:subscription_type => 'alert'
|
|
34
|
+
}
|
|
35
|
+
]
|
|
29
36
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
:method => 'promote_errata',
|
|
34
|
-
:subscription_type => 'alert'
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
notifications.each do |notification|
|
|
39
|
-
::MailNotification.where(name: notification[:name]).first_or_create!(notification)
|
|
37
|
+
notifications.each do |notification|
|
|
38
|
+
::MailNotification.where(name: notification[:name]).first_or_create!(notification)
|
|
39
|
+
end
|
|
40
40
|
end
|
|
41
|
-
|
|
42
|
-
::User.current = nil
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
#
|
|
4
4
|
# !!! PLEASE KEEP THIS SCRIPT IDEMPOTENT !!!
|
|
5
5
|
#
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
::User.current = nil
|
|
6
|
+
User.as(::User.anonymous_api_admin.login) do
|
|
7
|
+
Setting.find_by(:name => "dynflow_enable_console").update_attributes!(:value => true) if Rails.env.development?
|
|
8
|
+
end
|
|
@@ -4,16 +4,18 @@
|
|
|
4
4
|
# !!! PLEASE KEEP THIS SCRIPT IDEMPOTENT !!!
|
|
5
5
|
#
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
User.as_anonymous_admin do
|
|
8
|
+
Bookmark.without_auditing do
|
|
9
|
+
bookmarks = [
|
|
10
|
+
{:name => "list hypervisors", :query => 'hypervisor = true', :controller => "hosts"},
|
|
11
|
+
{:name => "future", :query => 'starts > Today', :controller => "katello_subscriptions"},
|
|
12
|
+
{:name => "expiring soon", :query => 'expires 30 days from now', :controller => "katello_subscriptions"}
|
|
13
|
+
]
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
bookmarks.each do |input|
|
|
16
|
+
next if SeedHelper.audit_modified? Bookmark, input[:name], :controller => input[:controller]
|
|
17
|
+
b = Bookmark.find_or_create_by({ :public => true }.merge(input))
|
|
18
|
+
fail "Unable to create bookmark: #{format_errors b}" if b.nil? || b.errors.any?
|
|
19
|
+
end
|
|
18
20
|
end
|
|
19
21
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
angular.module('Bastion.activation-keys').config(['$stateProvider', function ($stateProvider) {
|
|
2
2
|
$stateProvider.state('activation-keys', {
|
|
3
|
-
url: '/activation_keys',
|
|
3
|
+
url: '/activation_keys?search',
|
|
4
4
|
permission: 'view_activation_keys',
|
|
5
5
|
template: '<div ui-view></div>',
|
|
6
6
|
views: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ngdoc service
|
|
3
|
+
* @name Bastion.architectures.factory:Architecture
|
|
4
|
+
*
|
|
5
|
+
* @requires BastionResource
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* Provides a BastionResource for architectures.
|
|
9
|
+
*/
|
|
10
|
+
angular.module('Bastion.architectures').factory('Architecture',
|
|
11
|
+
['BastionResource', function (BastionResource) {
|
|
12
|
+
var resource = BastionResource('/api/v2/architectures/');
|
|
13
|
+
return resource;
|
|
14
|
+
}]
|
|
15
|
+
);
|