From cb95de666838018aa88c5aba92cd39cb3835ec9b Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Fri, 8 Dec 2023 16:25:00 +0100 Subject: [PATCH] Drop pulpcore::plugin::migration The last supported version of pulp-2to3-migration was with Pulp 3.19 and this module now only supports 3.39 or newer. --- manifests/plugin/migration.pp | 49 --------------------------- spec/classes/plugin_migration_spec.rb | 37 -------------------- templates/migration-settings.py.erb | 22 ------------ 3 files changed, 108 deletions(-) delete mode 100644 manifests/plugin/migration.pp delete mode 100644 spec/classes/plugin_migration_spec.rb delete mode 100644 templates/migration-settings.py.erb diff --git a/manifests/plugin/migration.pp b/manifests/plugin/migration.pp deleted file mode 100644 index 1d2aa92a..00000000 --- a/manifests/plugin/migration.pp +++ /dev/null @@ -1,49 +0,0 @@ -# @summary Pulp 2 to Pulp 3 Migration Plugin -# -# @param mongo_db_name -# MongoDB database name for Pulp2. Used for migrating Pulp2 content -# -# @param mongo_db_seeds -# MongoDB seeds. Used for migrating Pulp2 content -# -# @param mongo_db_username -# MongoDB username for Pulp2 -# -# @param mongo_db_password -# Password of MongoDB user -# -# @param mongo_db_replica_set -# MongoDB Replica Set -# -# @param mongo_db_ssl -# Use SSL for MongoDB connection -# -# @param mongo_db_ssl_keyfile -# SSL Keyfile for MongoDB -# -# @param mongo_db_ssl_certfile -# SSL Certfile for MongoDB -# -# @param mongo_db_verify_ssl -# Whether SSL verification is required for MongoDB -# -# @param mongo_db_ca_path -# CA bundle path to use for MongoDB SSL connection -# -class pulpcore::plugin::migration ( - String $mongo_db_name = 'pulp_database', - String $mongo_db_seeds = 'localhost:27017', - Optional[String] $mongo_db_username = undef, - Optional[String] $mongo_db_password = undef, - Optional[String] $mongo_db_replica_set = undef, - Boolean $mongo_db_ssl = false, - Optional[Stdlib::Absolutepath] $mongo_db_ssl_keyfile = undef, - Optional[Stdlib::Absolutepath] $mongo_db_ssl_certfile = undef, - Boolean $mongo_db_verify_ssl = true, - Stdlib::Absolutepath $mongo_db_ca_path = '/etc/pki/tls/certs/ca-bundle.crt', -) { - pulpcore::plugin { 'migration': - package_name => 'pulpcore-plugin(2to3-migration)', - config => template('pulpcore/migration-settings.py.erb'), - } -} diff --git a/spec/classes/plugin_migration_spec.rb b/spec/classes/plugin_migration_spec.rb deleted file mode 100644 index 560ed893..00000000 --- a/spec/classes/plugin_migration_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'spec_helper' - -migration_config = <<-EOL -PULP2_MONGODB = { - "name": "pulp_database", - "seeds": "localhost:27017", - "ssl": False, - "verify_ssl": True, - "ca_path": "/etc/pki/tls/certs/ca-bundle.crt", -} -EOL - -describe 'pulpcore::plugin::migration' do - on_supported_os.each do |os, os_facts| - context "on #{os}" do - let(:facts) { os_facts } - - it { is_expected.to compile.with_all_deps } - it { is_expected.to contain_pulpcore__plugin('migration') } - it { is_expected.to contain_package('pulpcore-plugin(2to3-migration)') } - it { is_expected.to contain_concat__fragment('plugin-migration').with_content("\n# migration plugin settings\n#{migration_config}") } - - context 'with pulpcore' do - let(:pre_condition) { 'include pulpcore' } - - it do - is_expected.to compile.with_all_deps - is_expected.to contain_pulpcore__plugin('migration') - .with_package_name('pulpcore-plugin(2to3-migration)') - .with_config(migration_config) - .that_subscribes_to('Class[Pulpcore::Install]') - .that_notifies(['Class[Pulpcore::Database]', 'Class[Pulpcore::Service]']) - end - end - end - end -end diff --git a/templates/migration-settings.py.erb b/templates/migration-settings.py.erb deleted file mode 100644 index 8891a418..00000000 --- a/templates/migration-settings.py.erb +++ /dev/null @@ -1,22 +0,0 @@ -PULP2_MONGODB = { - "name": "<%= @mongo_db_name %>", - "seeds": "<%= @mongo_db_seeds %>", -<% unless @mongo_db_username.nil? -%> - "username": "<%= @mongo_db_username %>", -<% end -%> -<% unless @mongo_db_password.nil? -%> - "password": "<%= @mongo_db_password %>", -<% end -%> -<% unless @mongo_db_replica_set.nil? -%> - "replica_set": "<%= @mongo_db_replica_set %>", -<% end -%> - "ssl": <%= @mongo_db_ssl ? 'True' : 'False' %>, -<% unless @mongo_db_ssl_keyfile.nil? -%> - "ssl_keyfile": "<%= @mongo_db_ssl_keyfile %>", -<% end -%> -<% unless @mongo_db_ssl_certfile.nil? -%> - "ssl_certfile": "<%= @mongo_db_ssl_certfile %>", -<% end -%> - "verify_ssl": <%= @mongo_db_verify_ssl ? 'True' : 'False' %>, - "ca_path": "<%= @mongo_db_ca_path %>", -}