Sha256: dc96f06a6c41ba25e99235d687ed235119266024e897864c0f0e0d18fe185fad

Contents?: true

Size: 398 Bytes

Versions: 42

Compression:

Stored size: 398 Bytes

Contents

module ForemanVirtWhoConfigure
  class Cleaner
    def clean_up!
      User.as_anonymous_admin do
        remove_configurations
        remove_hidden_auth_sources
      end
    end

    private

    def remove_hidden_auth_sources
      AuthSourceHiddenWithAuthentication.destroy_all
    end

    # also removes service users
    def remove_configurations
      Config.destroy_all
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
foreman_virt_who_configure-0.1.7 app/services/foreman_virt_who_configure/cleaner.rb
foreman_virt_who_configure-0.1.6 app/services/foreman_virt_who_configure/cleaner.rb