foreman_virt_who_configure 0.5.14 → 0.5.15

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
  SHA256:
3
- metadata.gz: e1ddf912439f6fad74b1e2361a4a2fba2619c178a7b9f4f415b27f0dd416bcdb
4
- data.tar.gz: a8e82c3e29d4a6a9da64240ab6eb8500d37eafae011c738385411f6a9f1d3a9f
3
+ metadata.gz: 804bfa0dcf42fa2495425b159e3c2edbea164afcad098d15f7cafc2f543c659c
4
+ data.tar.gz: 88e7460569118f50f3c635ad9c6e55e0db10d118cd96131338f4928cd4abbcb1
5
5
  SHA512:
6
- metadata.gz: e5a729769c5455cf399e88ac8e32136d315eab9c95df44e472d453559793d50a9a12f09b058a0b431ecabb55ad6bd113f6472c888a741b2ca69cb4e9ac679f29
7
- data.tar.gz: 53650766a273bbbbc876ac35e2b6c7d869d2b15e45eb0c79a98eba42094b77f8f4932463d995dd547d8c28decc983b41ef99c4710ca36321cfbae7b6d64bcdd0
6
+ metadata.gz: 66123eb9a60975f6dc753efe576a25d83ebf66f95e3d15b80766f014d7f22c5dc0d36fcbeb592249ed5ad53c39d77f2359222397a1e89fa93fcf1156ff28b69b
7
+ data.tar.gz: 987c19db5ea036ceaaf02fe1235441cc9a251816196b5c6d5a7da796ce61210313d4e045118c129e94f9780f681ec5f367368bf8f3bcb8c748fee5dbf8e890be
@@ -28,13 +28,13 @@ function virt_who_update_listing_mode() {
28
28
  function virt_who_update_hypervisor_fields() {
29
29
  selected_type = $('#foreman_virt_who_configure_config_hypervisor_type').val();
30
30
  var element = $('#foreman_virt_who_configure_config_hypervisor_username');
31
- element.closest('.form-group').toggle(selected_type != 'kubevirt');
31
+ element.closest('.form-group').toggle(selected_type != 'libvirt' && selected_type != 'kubevirt');
32
32
  var element = $('#foreman_virt_who_configure_config_hypervisor_password');
33
33
  element.closest('.form-group').toggle(selected_type != 'libvirt' && selected_type != 'kubevirt');
34
34
  var element = $('#foreman_virt_who_configure_config_kubeconfig_path');
35
35
  element.closest('.form-group').toggle(selected_type == 'kubevirt');
36
36
  var element = $('#foreman_virt_who_configure_config_hypervisor_server');
37
- element.closest('.form-group').toggle(selected_type != 'kubevirt');
37
+ element.closest('.form-group').toggle(selected_type != 'libvirt' && selected_type != 'kubevirt');
38
38
  var element = $('#foreman_virt_who_configure_config_ahv_internal_debug');
39
39
  element.closest('.form-group').toggle(selected_type == 'ahv');
40
40
  virt_who_update_listing_mode();
@@ -106,8 +106,8 @@ module ForemanVirtWhoConfigure
106
106
  :presence => true
107
107
  validates :name, :uniqueness => { :scope => :organization_id }
108
108
  validates :hypervisor_password, :presence => true, :if => Proc.new { |c| c.hypervisor_type != 'libvirt' && c.hypervisor_type != 'kubevirt' }
109
- validates :hypervisor_username, :presence => true, :if => Proc.new { |c| c.hypervisor_type != 'kubevirt' }
110
- validates :hypervisor_server, :presence => true, :if => Proc.new { |c| c.hypervisor_type != 'kubevirt' }
109
+ validates :hypervisor_username, :presence => true, :if => Proc.new { |c| c.hypervisor_type != 'libvirt' && c.hypervisor_type != 'kubevirt' }
110
+ validates :hypervisor_server, :presence => true, :if => Proc.new { |c| c.hypervisor_type != 'libvirt' && c.hypervisor_type != 'kubevirt' }
111
111
  validates :kubeconfig_path, :presence => true, :if => Proc.new { |c| c.hypervisor_type == 'kubevirt' }
112
112
  validates :hypervisor_type, :inclusion => HYPERVISOR_TYPES.keys
113
113
  validates :hypervisor_id, :inclusion => HYPERVISOR_IDS
@@ -159,6 +159,8 @@ EOS
159
159
  def connection_details
160
160
  if config.hypervisor_type == 'kubevirt'
161
161
  ""
162
+ elsif config.hypervisor_type == 'libvirt'
163
+ "\nserver=qemu:///system"
162
164
  else
163
165
  "\nserver=#{cr_server}
164
166
  username=#{cr_username}
@@ -10,5 +10,5 @@
10
10
  <%= select_f f, :hypervisor_type, ForemanVirtWhoConfigure::Config::HYPERVISOR_TYPES, :first, :last, {}, { :label => _('Hypervisor Type') } %>
11
11
  <%= text_f f, :hypervisor_server, { :label => _('Hypervisor Server'), :required => true }.merge(inline_help_popover(hypervisor_server_help_data[f.object.hypervisor_type]).merge(:data => { :help => hypervisor_server_help_data })) %>
12
12
  <%= text_f f, :hypervisor_username, { :label => _('Hypervisor Username'), :required => true }.merge(inline_help_popover(hypervisor_username_help_data[f.object.hypervisor_type]).merge(:data => { :help => hypervisor_username_help_data })) %>
13
- <%= password_f f, :hypervisor_password, { :label => _('Hypervisor Password'), :required => true, :value => f.object.hypervisor_password }.merge(inline_help_popover(_('Account password by which virt-who is to connect to the hypervisor instance.'))) %>
13
+ <%= password_f f, :hypervisor_password, { :label => _('Hypervisor Password'), :required => true, :value => f.object.attributes["hypervisor_password"] }.merge(inline_help_popover(_('Account password by which virt-who is to connect to the hypervisor instance.'))) %>
14
14
  </div>
@@ -1,3 +1,3 @@
1
1
  module ForemanVirtWhoConfigure
2
- VERSION = '0.5.14'.freeze
2
+ VERSION = '0.5.15'.freeze
3
3
  end
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.5.14
4
+ version: 0.5.15
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: 2023-05-24 00:00:00.000000000 Z
11
+ date: 2023-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello