Skip to content

Commit

Permalink
Merge pull request #537 from nasark/subclass_osv_kubevirt
Browse files Browse the repository at this point in the history
Separate OSV and Kubevirt virtualization options from form

(cherry picked from commit c73a5bc)
  • Loading branch information
agrare authored and Fryguy committed Oct 8, 2024
1 parent f5f9bb5 commit 2b89bdf
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions app/models/manageiq/providers/kubernetes/container_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,17 +328,7 @@ def self.params_for_create
:skipSubmit => true,
:initialValue => 'none',
:label => _('Type'),
:options => [
{
:label => _('Disabled'),
:value => 'none',
},
{
:label => _('OpenShift Virtualization / KubeVirt'),
:value => 'kubevirt',
:pivot => 'endpoints.kubevirt.hostname',
},
],
:options => virtualization_options,
},
{
:component => 'validate-provider-credentials',
Expand Down Expand Up @@ -544,6 +534,20 @@ def self.params_for_create
}
end

def self.virtualization_options
[
{
:label => _('Disabled'),
:value => 'none',
},
{
:label => _('KubeVirt'),
:value => 'kubevirt',
:pivot => 'endpoints.kubevirt.hostname',
},
]
end

def self.verify_credentials(args)
endpoint_name = args.dig("endpoints").keys.first
endpoint = args.dig("endpoints", endpoint_name)
Expand Down

0 comments on commit 2b89bdf

Please sign in to comment.