Skip to content

Commit

Permalink
Fix Tests, update readme and remove hound
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1984 committed Feb 17, 2023
1 parent e430e3d commit 7f4d230
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 23 deletions.
15 changes: 0 additions & 15 deletions .hound.yml

This file was deleted.

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# ForemanVirtWhoConfigure
# Foreman Virt Who Configure

A foreman plugin to make virt-who configuration easier. This provides simple UI for obtaining required information about the desired virt-who configuration, such as hypervisor credentials, check interval and similar. After the information is gathered, it provides a configuration script that can be used to install and configure the virt-who instance. All incoming reports from such virt-who instance are tracked and monitored by the plugin.
A Foreman plugin to make virt-who configuration easier. This provides a simple UI for obtaining required information about the desired virt-who configuration, such as hypervisor credentials, check interval and other similar config options. After the information is gathered, it provides a configuration script that can be used to install and configure the virt-who instance. All incoming reports from such virt-who instance are tracked and monitored by the plugin.

## Installation

This plugins requires Katello to be installed in your Foreman instance. If its there, simply install a package with the plugin (rpm only), run migrations and seed by running,
This plugins requires Katello to be installed in your Foreman instance. If it's there, simply install a package with the plugin (rpm only), run migrations and seed by running,

yum install rubygem-foreman_virt_who_configure
dnf install rubygem-foreman_virt_who_configure
foreman-rake db:migrate
foreman-rake db:seed

## Usage

After installation there is new "Virt-who configurations" menu added in "Infrastructure" tab. The "Virt-who configurations" -> "Create Config" provides options to add details about configuration, most of the fields are having inline help.

The virt-who configuration should be in an organization. If organization has not selected then Owner field would be displayed where it is required to select organization. If organization is already selected then Owner field is not displayed and virt-configuration will be automatically created in selected organization scope.
The virt-who configuration should be in an organization. If an organization has not selected then Owner field would be displayed where it is required to select organization. If organization is already selected then Owner field is not displayed and virt-configuration will be automatically created in selected organization scope.

To deploy the configuration click on configuration name on "Virt-who configurations" list page, "Overview" page shows details about configuration and "Deploy page" has all details on deploying configuration.

Expand All @@ -26,7 +26,7 @@ Fork and send a Pull Request. Thanks!

## Copyright

Copyright (c) 2017 - Foreman team
Copyright (c) 2023 - Foreman team

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion test/functional/api/v2/configs_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class ForemanVirtWhoConfigure::Api::V2::ConfigsControllerTest < ActionController
post :create, :params => { :foreman_virt_who_configure_config => { :name => 'my new config',
:interval => 240,
:filtering_mode => ForemanVirtWhoConfigure::Config::BLACKLIST,
:blacklist => ' a,b ',
:blacklist => 'a,b',
:hypervisor_id => 'uuid',
:hypervisor_type => 'esx',
:hypervisor_server => "vmware.example.com",
Expand Down
3 changes: 2 additions & 1 deletion test/unit/output_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class OutputGeneratorTest < ActiveSupport::TestCase
test 'empty password is replaced by fake value so that virt-who runs in an non-interactive mode' do
config.hypervisor_password = nil
config.hypervisor_type = 'libvirt'
assert_includes output, 'virt-who-password --password \'' + OutputGenerator::LIBVIRT_FAKE_PASSWORD + '\''
# (echo bGlidmlydF9mYWtlX3Bhc3N3b3Jk|base64 -d) = OutputGenerator::LIBVIRT_FAKE_PASSWORD
assert_includes output, 'virt-who-password --password $(echo bGlidmlydF9mYWtlX3Bhc3N3b3Jk|base64 -d)'
end
end

Expand Down

0 comments on commit 7f4d230

Please sign in to comment.