foreman_virt_who_configure 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc656a6b907fef2fe6de032aae959741b8fac5c8
4
- data.tar.gz: 9054a4675b9fc157f18c7dc51f35a76e000a71a3
3
+ metadata.gz: 3f67a089084c8f494463d27020a510a6141d32aa
4
+ data.tar.gz: 79cda417d8d80bcdedfe3a0709c2758d7c083d92
5
5
  SHA512:
6
- metadata.gz: bed2e34b56cbc2d9fb47c2100673c2b7d1119dfa571150beb400f78c1e2206fe4f12a51ccf033eb36b3e50d2815ea5bfba51959572a179f863357f394207678b
7
- data.tar.gz: 14bc49f4dcb67e0222b9ad40081d94e02f7d669d48d1546b72df6ea7b1538224e3764e6785034add4dbbca0e55625521f967d3d4b86fb44f349ec91313f16101
6
+ metadata.gz: 3ef1c22a5a6fc2dff642e15c293309ad0f04ede5d5e7f29fef0b2cf12563b4fe802c3288a7c6bd31d7d3abbcd49c403a5e8892a8490073d3ff1fe79249e14cd0
7
+ data.tar.gz: 37bba004933053195c22693a4b8d12220b7c8e751e6dadedf849749280352bc06a0774ba1df49838d80b378acdd3494b006ba87d3e95fe361fdcd3761191046d
data/README.md CHANGED
@@ -1,16 +1,24 @@
1
1
  # ForemanVirtWhoConfigure
2
2
 
3
- A foreman plugin to make virt-who configuration easier.
3
+ 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.
4
4
 
5
5
  ## Installation
6
6
 
7
- See [How_to_Install_a_Plugin](http://projects.theforeman.org/projects/foreman/wiki/How_to_Install_a_Plugin)
8
- for how to install Foreman plugins
7
+ 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,
8
+
9
+ yum install rubygem-foreman_virt_who_configure
10
+ foreman-rake db:migrate
11
+ foreman-rake db:seed
9
12
 
10
13
  ## Usage
11
14
 
12
- After installation you should see Virt-who configurations menu item in Infrastructure menu. Create a new configuration
13
- and see the generated script for virt-who deployment.
15
+ 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.
16
+
17
+ 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.
18
+
19
+ 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.
20
+
21
+ More details are available at - https://theforeman.org/plugins/foreman_virt_who_configure
14
22
 
15
23
  ## Contributing
16
24
 
@@ -32,4 +40,3 @@ GNU General Public License for more details.
32
40
 
33
41
  You should have received a copy of the GNU General Public License
34
42
  along with this program. If not, see <http://www.gnu.org/licenses/>.
35
-
@@ -2,24 +2,36 @@ function virt_who_update_listing_mode() {
2
2
  var filtering_mode = $('#foreman_virt_who_configure_config_listing_mode').val();
3
3
  var whitelist = $('#foreman_virt_who_configure_config_whitelist').parents('div.form-group');
4
4
  var blacklist = $('#foreman_virt_who_configure_config_blacklist').parents('div.form-group');
5
+ var whitelist_parent = $('#foreman_virt_who_configure_config_filter_host_parents').parents('div.form-group');
6
+ var blacklist_parent = $('#foreman_virt_who_configure_config_exclude_host_parents').parents('div.form-group');
5
7
 
6
8
  // UNLIMITED = 0, WHITELIST = 1, BLACKLIST = 2, see config.rb model for the definition
7
9
  if (filtering_mode == '0') {
8
10
  whitelist.hide();
9
11
  blacklist.hide();
12
+ whitelist_parent.hide();
13
+ blacklist_parent.hide();
10
14
  } else if (filtering_mode == '1') {
11
15
  whitelist.show();
16
+ whitelist_parent.show();
12
17
  blacklist.hide();
18
+ blacklist_parent.hide();
13
19
  } else if (filtering_mode == '2') {
14
20
  whitelist.hide();
21
+ whitelist_parent.hide();
15
22
  blacklist.show();
23
+ blacklist_parent.show();
16
24
  }
17
25
  }
18
26
 
19
27
  function virt_who_update_hypervisor_fields() {
20
28
  selected_type = $('#foreman_virt_who_configure_config_hypervisor_type').val();
29
+ var element = $('#foreman_virt_who_configure_config_hypervisor_username');
30
+ element.closest('.form-group').toggle(selected_type != 'kubevirt');
21
31
  var element = $('#foreman_virt_who_configure_config_hypervisor_password');
22
- element.closest('.form-group').toggle(selected_type != 'libvirt');
32
+ element.closest('.form-group').toggle(selected_type != 'libvirt' && selected_type != 'kubevirt');
33
+ var element = $('#foreman_virt_who_configure_config_kubeconfig_path');
34
+ element.closest('.form-group').toggle(selected_type == 'kubevirt');
23
35
  }
24
36
 
25
37
  function virt_who_update_credentials_help() {
@@ -69,7 +69,7 @@ module ForemanVirtWhoConfigure
69
69
  end
70
70
 
71
71
  def auto_complete_controller_name
72
- 'configs'
72
+ 'foreman_virt_who_configure_configs'
73
73
  end
74
74
 
75
75
  def controller_name
@@ -7,7 +7,8 @@ module ForemanVirtWhoConfigure
7
7
  # 'vdsm' => 'Red Hat Enterprise Linux Hypervisor (vdsm)',
8
8
  'hyperv' => _('Microsoft Hyper-V fully qualified host name or IP address.'),
9
9
  'xen' => _('XenServer server’s fully qualified host name or IP address.'),
10
- 'libvirt' => _('Libvirt server’s fully qualified host name or IP address. You can also specify preferred schema, for example: <code>qemu+ssh://libvirt.example.com/system</code>. If you use SSH, make sure you setup root\'s SSH key on target host for a user specified at hypervisor username field')
10
+ 'libvirt' => _('Libvirt server’s fully qualified host name or IP address. You can also specify preferred schema, for example: <code>qemu+ssh://libvirt.example.com/system</code>. If you use SSH, make sure you setup root\'s SSH key on target host for a user specified at hypervisor username field'),
11
+ 'kubevirt' => _('Container-native virtualization’s fully qualified host name or IP address. In order to connect to the cluster it is required to provide path to kubeconfig which contains connection details and authentication token.')
11
12
  }
12
13
  end
13
14
 
@@ -18,7 +19,8 @@ module ForemanVirtWhoConfigure
18
19
  # 'vdsm' => '',
19
20
  'hyperv' => _('Account name by which virt-who is to connect to the hypervisor. By default this is <code>Administrator</code>. To use an alternate account, create a user account and assign that account to the following groups (Windows 2012 Server): Hyper-V Administrators and Remote Management Users.'),
20
21
  'xen' => _('Account name by which virt-who is to connect to the hypervisor.'),
21
- 'libvirt' => _('Account name by which virt-who is to connect to the hypervisor. Virt-who does not support password based authentication, you must manually setup SSH key, see <a href="https://access.redhat.com/solutions/1515983">Red Hat Knowledgebase solution How to configure virt-who for a KVM host</a> for more information.')
22
+ 'libvirt' => _('Account name by which virt-who is to connect to the hypervisor. Virt-who does not support password based authentication, you must manually setup SSH key, see <a href="https://access.redhat.com/solutions/1515983">Red Hat Knowledgebase solution How to configure virt-who for a KVM host</a> for more information.'),
23
+ 'kubevirt' => ''
22
24
  }
23
25
  end
24
26
 
@@ -64,7 +66,7 @@ module ForemanVirtWhoConfigure
64
66
  end
65
67
 
66
68
  def config_attribute_default_label(attr)
67
- s_(ForemanVirtWhoConfigure::Config.gettext_translation_for_attribute_name(attr).titleize)
69
+ s_(ForemanVirtWhoConfigure::Config.gettext_translation_for_attribute_name(attr)).titleize
68
70
  end
69
71
 
70
72
  def config_attribute_label(attr, label)
@@ -6,7 +6,7 @@ module ForemanVirtWhoConfigure
6
6
  :satellite_url, :proxy, :no_proxy, :name,
7
7
  # API parameter filtering_mode gets translated to listing_mode in the controller
8
8
  # We keep both params permitted for compatibility with 1.11
9
- :listing_mode, :filtering_mode
9
+ :listing_mode, :filtering_mode, :filter_host_parents, :exclude_host_parents, :kubeconfig_path
10
10
  ]
11
11
  audited :except => [ :hypervisor_password, :last_report_at, :out_of_date_at ], :associations => []
12
12
  include Authorizable
@@ -35,7 +35,8 @@ module ForemanVirtWhoConfigure
35
35
  # 'vdsm' => 'Red Hat Enterprise Linux Hypervisor (vdsm)',
36
36
  'hyperv' => 'Microsoft Hyper-V (hyperv)',
37
37
  'xen' => 'XenServer (xen)',
38
- 'libvirt' => 'libvirt'
38
+ 'libvirt' => 'libvirt',
39
+ 'kubevirt' => 'Container-native virtualization'
39
40
  }
40
41
 
41
42
  HYPERVISOR_DEFAULT_TYPE = 'esx'
@@ -46,6 +47,9 @@ module ForemanVirtWhoConfigure
46
47
  '240' => N_('Every 4 hours'),
47
48
  '480' => N_('Every 8 hours'),
48
49
  '720' => N_('Every 12 hours'),
50
+ '1440' => N_('Every 24 hours'),
51
+ '2880' => N_('Every 2 days'),
52
+ '4320' => N_('Every 3 days'),
49
53
  }
50
54
 
51
55
  DEFAULT_INTERVAL = 120
@@ -88,17 +92,31 @@ module ForemanVirtWhoConfigure
88
92
  after_create :create_service_user
89
93
  after_destroy :destroy_service_user
90
94
 
91
- validates :interval, :hypervisor_type, :hypervisor_server, :hypervisor_username,
95
+ validates :interval, :hypervisor_type, :hypervisor_server,
92
96
  :satellite_url, :hypervisor_id, :organization_id, :name,
93
97
  :presence => true
94
98
  validates :name, :uniqueness => { :scope => :organization_id }
95
- validates :hypervisor_password, :presence => true, :if => Proc.new { |c| c.hypervisor_type != 'libvirt' }
99
+ validates :hypervisor_password, :presence => true, :if => Proc.new { |c| c.hypervisor_type != 'libvirt' && c.hypervisor_type != 'kubevirt' }
100
+ validates :hypervisor_username, :presence => true, :if => Proc.new { |c| c.hypervisor_type != 'kubevirt' }
96
101
  validates :hypervisor_type, :inclusion => HYPERVISOR_TYPES.keys
97
102
  validates :hypervisor_id, :inclusion => HYPERVISOR_IDS
98
103
  validates :interval, :inclusion => AVAILABLE_INTERVALS.keys.map(&:to_i)
99
104
  validates :listing_mode, :inclusion => FILTERING_MODES.keys.map(&:to_i)
100
- validates :whitelist, :presence => true, :if => Proc.new { |c| c.listing_mode.to_i == WHITELIST }
101
- validates :blacklist, :presence => true, :if => Proc.new { |c| c.listing_mode.to_i == BLACKLIST }
105
+ validate :validates_whitelist_blacklist
106
+
107
+ def validates_whitelist_blacklist
108
+ case listing_mode.to_i
109
+ when WHITELIST
110
+ unless whitelist.present? || filter_host_parents.present?
111
+ [:whitelist, :filter_host_parents].each {|f| errors.add(f, "Filter hosts or Filter host parents is required")}
112
+ end
113
+ when BLACKLIST
114
+ unless blacklist.present? || exclude_host_parents.present?
115
+ [:blacklist, :exclude_host_parents].each {|f| errors.add(f, "Exclude hosts or Exclude host parents is required")}
116
+ end
117
+ end
118
+ end
119
+
102
120
  validates_lengths_from_database
103
121
 
104
122
  before_validation :remove_whitespaces
@@ -9,7 +9,7 @@ module ForemanVirtWhoConfigure
9
9
  end
10
10
  end
11
11
 
12
- MINIMUM_VIRT_WHO_VERSION = '0.19'
12
+ MINIMUM_VIRT_WHO_VERSION = '0.24.2'
13
13
 
14
14
  LIBVIRT_FAKE_PASSWORD = 'libvirt_fake_password'
15
15
 
@@ -48,6 +48,7 @@ module ForemanVirtWhoConfigure
48
48
  end
49
49
 
50
50
  def virt_who_output(format = nil)
51
+ kubeconfig = config.hypervisor_type == 'kubevirt' ? "\nkubeconfig=#{config.kubeconfig_path}" : ''
51
52
  result = ''
52
53
  result += "#!/bin/bash\n" if format == :bash_script
53
54
  result += <<EOS
@@ -104,7 +105,7 @@ encrypted_password=$cr_password#{filtering}
104
105
  rhsm_hostname=#{satellite_url}
105
106
  rhsm_username=#{service_user_username}
106
107
  rhsm_encrypted_password=$user_password
107
- rhsm_prefix=/rhsm
108
+ rhsm_prefix=/rhsm#{kubeconfig}
108
109
  EOF
109
110
  if [ $? -ne 0 ]; then result_code=$(($result_code|#{error_code(:virt_who_config_file_issue)})); fi
110
111
 
@@ -112,7 +113,6 @@ EOF
112
113
  cat > #{sysconfig_file_path} << EOF
113
114
  ### This configuration file is managed via the virt-who configure plugin
114
115
  ### manual edits will be deleted.
115
- VIRTWHO_SATELLITE6=1
116
116
  VIRTWHO_DEBUG=#{config.debug? ? 1 : 0}
117
117
  VIRTWHO_INTERVAL=#{config.interval * 60}#{proxy_strings}
118
118
  EOF
@@ -146,15 +146,19 @@ EOS
146
146
 
147
147
  def filtering
148
148
  case config.listing_mode.to_i
149
- when ForemanVirtWhoConfigure::Config::UNLIMITED
150
- return ''
151
- when ForemanVirtWhoConfigure::Config::WHITELIST
152
- return filtering_line_sanitized('filter_hosts', config.whitelist)
153
- when ForemanVirtWhoConfigure::Config::BLACKLIST
154
- return filtering_line_sanitized('exclude_hosts', config.blacklist)
149
+ when ForemanVirtWhoConfigure::Config::UNLIMITED
150
+ ''
151
+ when ForemanVirtWhoConfigure::Config::WHITELIST
152
+ enabled_filters({'filter_hosts' => config.whitelist, 'filter_host_parents' => config.filter_host_parents})
153
+ when ForemanVirtWhoConfigure::Config::BLACKLIST
154
+ enabled_filters({'exclude_hosts' => config.blacklist, 'exclude_host_parents' => config.exclude_host_parents})
155
155
  end
156
156
  end
157
157
 
158
+ def enabled_filters(filter)
159
+ filter.reject { |_, list| list.empty? }.map { |filter,list| filtering_line_sanitized(filter, list) }.join(',')
160
+ end
161
+
158
162
  def filtering_line_sanitized(filter, list)
159
163
  "\n" + filter + '=' + sanitize_filter(list.to_s)
160
164
  end
@@ -232,6 +236,7 @@ EOS
232
236
  output = ''
233
237
  output << "\nhttp_proxy=#{sanitize_proxy(proxy)}" if proxy.present?
234
238
  output << "\nNO_PROXY=#{sanitize_proxy(no_proxy)}" if no_proxy.present?
239
+ output << "\nNO_PROXY=*" if !proxy.present? && !no_proxy.present?
235
240
  output
236
241
  end
237
242
 
@@ -34,7 +34,7 @@
34
34
  <%= config_attribute :status, config_report_status(@config), _('Status') %>
35
35
  <%= config_attribute :hypervisor_type, _(ForemanVirtWhoConfigure::Config::HYPERVISOR_TYPES[@config.hypervisor_type]) %>
36
36
  <%= config_attribute :hypervisor_server, @config.hypervisor_server %>
37
- <%= config_attribute :hypervisor_username, @config.hypervisor_username %>
37
+ <%= config_attribute :hypervisor_username, @config.hypervisor_username if @config.hypervisor_type != 'kubevirt' %>
38
38
  <%= config_attribute :interval, _(ForemanVirtWhoConfigure::Config::AVAILABLE_INTERVALS[@config.interval.to_s]) %>
39
39
  <%= config_attribute :satellite_url, @config.satellite_url, _('Satellite server FQDN')%>
40
40
  <%= config_attribute :hypervisor_id, @config.hypervisor_id, _('Hypervisor ID') %>
@@ -44,6 +44,7 @@
44
44
  <%= config_attribute :debug, checked_icon(@config.debug), _('Enable debugging output?') %>
45
45
  <%= config_attribute :proxy, @config.proxy if @config.proxy.present? %>
46
46
  <%= config_attribute :no_proxy, @config.no_proxy if @config.no_proxy.present? %>
47
+ <%= config_attribute :kubeconfig_path, @config.kubeconfig_path if @config.hypervisor_type == 'kubevirt' %>
47
48
  </div>
48
49
  </div>
49
50
  </div>
@@ -8,9 +8,17 @@
8
8
  This property is meant to be set up before the initial run of virt-who. Changing it later will result in duplicated entries in the subscription manager.").html_safe)) %>
9
9
  <%= selectable_f f, :listing_mode, ForemanVirtWhoConfigure::Config::FILTERING_MODES.map { |k,v| [_(v), k] }, {}, { :label => _('Filtering') }.merge(
10
10
  inline_help_popover(_("If you run a hybrid environment, with virtual machines running Red Hat Enterprise Linux and other operating systems, you may want to limit the scope of virt-who’s access to hosts. For example, if some hypervisors host only Microsoft Windows Server instances, there is no benefit in having those hypervisors reported by the virt-who agent."))) %>
11
- <%= textarea_f f, :whitelist, inline_help_popover(_('Only hosts which uuid (or hostname or hwuuid, based on <code>hypervisor_id</code>) is specified in comma-separated list in this option will be reported. Wildcards and regular expressions are supported, multiple records must be separated by comma. Put the value into the double-quotes if it contains special characters like comma. All new line characters will be removed in resulting configuration file, white spaces are removed from beginning and end.')).merge(:label => _('Filter hosts')) %>
12
- <%= textarea_f f, :blacklist, inline_help_popover(_('Hosts which uuid (or hostname or hwuuid, based on <code>hypervisor_id</code>) is specified in comma-separated list in this option will <b>NOT</b> be reported. Wildcards and regular expressions are supported, multiple records must be separated by comma. Put the value into the double-quotes if it contains special characters like comma. All new line characters will be removed in resulting configuration file, white spaces are removed from beginning and end.')).merge(:label => _('Exclude hosts')) %>
11
+
12
+ <%= textarea_f f, :whitelist, inline_help_popover(_('Only hosts which uuid (or hostname or hwuuid, based on <code>hypervisor_id</code>) is specified in comma-separated list in this option will be reported. Wildcards and regular expressions are supported, multiple records must be separated by comma. Put the value into the double-quotes if it contains special characters like comma. All new line characters will be removed in resulting configuration file, white spaces are removed from beginning and end.')).merge(:label => _('Filter hosts')) %>
13
+
14
+ <%= textarea_f f, :blacklist, inline_help_popover(_('Hosts which uuid (or hostname or hwuuid, based on <code>hypervisor_id</code>) is specified in comma-separated list in this option will <b>NOT</b> be reported. Wildcards and regular expressions are supported, multiple records must be separated by comma. Put the value into the double-quotes if it contains special characters like comma. All new line characters will be removed in resulting configuration file, white spaces are removed from beginning and end.')).merge(:label => _('Exclude hosts')) %>
15
+
16
+ <%= textarea_f f, :filter_host_parents, inline_help_popover(_('Only hosts which parent (usually ComputeResource) name is specified in comma-separated list in this option will be reported. Wildcards and regular expressions are supported, multiple records must be separated by comma. Put the value into the double-quotes if it contains special characters like comma. All new line characters will be removed in resulting configuration file, white spaces are removed from beginning and end.')).merge(:label => _('Filter host parents')) %>
17
+
18
+ <%= textarea_f f, :exclude_host_parents, inline_help_popover(_('Hosts which parent (usually ComputeResource) name is specified in comma-separated list in this option will <b>NOT</b> be reported. Wildcards and regular expressions are supported, multiple records must be separated by comma. Put the value into the double-quotes if it contains special characters like comma. All new line characters will be removed in resulting configuration file, white spaces are removed from beginning and end.')).merge(:label => _('Exclude host parents')) %>
19
+
13
20
  <%= checkbox_f f, :debug, { :label => _('Enable debugging output') }.merge(inline_help_popover(_("Different debug value can't be set per hypervisor, therefore it will affect all other deployed configurations on the host on which this configuration will be deployed."))) %>
14
21
  <%= text_f f, :proxy, inline_help_popover(_('HTTP proxy that should be used for communication between the server on which virt-who is running and the hypervisors and virtualization managers. Leave this blank if no proxy is used.')).merge(:label => _('HTTP proxy')) %>
15
22
  <%= text_f f, :no_proxy, inline_help_popover(_('A comma-separated list of hostnames or domains or ip addresses to ignore proxy settings for. Optionally this may be set to <code>*</code> to bypass proxy settings for all hostnames domains or ip addresses.')).merge(:label => _('Ignore proxy')) %>
23
+ <%= text_f f, :kubeconfig_path, inline_help_popover(_('Configuration file containing details about how to connect to the cluster and authentication details')).merge(:label => _('Path to kubeconfig file')) %>
16
24
  </div>
@@ -0,0 +1,6 @@
1
+ class FilterAndExcludeHostParents < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :foreman_virt_who_configure_configs, :filter_host_parents, :text
4
+ add_column :foreman_virt_who_configure_configs, :exclude_host_parents, :text
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class AddKubeconfigToConfig < ActiveRecord::Migration[4.2]
2
+ def change
3
+ add_column :foreman_virt_who_configure_configs, :kubeconfig_path, :string, :null => true
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module ForemanVirtWhoConfigure
2
- VERSION = '0.3.3'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
@@ -56,11 +56,11 @@ module ForemanVirtWhoConfigure
56
56
  end
57
57
 
58
58
  describe 'proxy attributes' do
59
- test 'it does not set any proxy attributes by default' do
59
+ test 'it does not set any proxy attributes by default and set no_proxy to * to bypass sub-man proxy' do
60
60
  assert_nil config.proxy
61
61
  assert_nil config.no_proxy
62
62
  assert_not_includes output, 'http_proxy'
63
- assert_not_includes output, 'no_proxy'
63
+ assert_includes output, 'NO_PROXY=*'
64
64
  end
65
65
 
66
66
  test 'it configures proxy when set' do
@@ -70,28 +70,28 @@ module ForemanVirtWhoConfigure
70
70
 
71
71
  test 'it configures no_proxy when set' do
72
72
  config.no_proxy = '*'
73
- assert_includes output, 'no_proxy=*'
73
+ assert_includes output, 'NO_PROXY=*'
74
74
  end
75
75
 
76
76
  test 'proxy_strings prints both proxy and no proxy if present' do
77
77
  config.proxy = 'a'
78
78
  config.no_proxy = 'b'
79
79
  assert_includes generator.proxy_strings, "\nhttp_proxy=a"
80
- assert_includes generator.proxy_strings, "\nno_proxy=b"
80
+ assert_includes generator.proxy_strings, "\NO_PROXY=b"
81
81
  end
82
82
 
83
83
  test 'proxy_strings ignores empty string values' do
84
84
  config.proxy = ''
85
85
  config.no_proxy = ''
86
86
  assert_not_includes generator.proxy_strings, 'http_proxy'
87
- assert_not_includes generator.proxy_strings, 'no_proxy'
87
+ assert_includes generator.proxy_strings, 'NO_PROXY=*'
88
88
  end
89
89
 
90
90
  test 'proxy_strings removes any new line chars' do
91
91
  config.proxy = "\na\nb\nc\n"
92
92
  config.no_proxy = "\nx\ny\nz"
93
93
  assert_includes generator.proxy_strings, "\nhttp_proxy=abc"
94
- assert_includes generator.proxy_strings, "\nno_proxy=xyz"
94
+ assert_includes generator.proxy_strings, "\NO_PROXY=xyz"
95
95
  end
96
96
  end
97
97
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_virt_who_configure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman virt-who-configure team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-28 00:00:00.000000000 Z
11
+ date: 2019-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello
@@ -105,6 +105,8 @@ files:
105
105
  - db/migrate/20170309161551_add_proxy_and_no_proxy_to_config.rb
106
106
  - db/migrate/20170404152851_add_last_report_info_to_config.rb
107
107
  - db/migrate/20170407152851_add_name_to_config.rb
108
+ - db/migrate/20181005065724_filter_and_exclude_host_parents.foreman_virt_who_configure.rb
109
+ - db/migrate/20190104125749_add_kubeconfig_to_config.rb
108
110
  - lib/foreman_virt_who_configure.rb
109
111
  - lib/foreman_virt_who_configure/engine.rb
110
112
  - lib/foreman_virt_who_configure/version.rb