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
  • Loading branch information
agrare committed Sep 10, 2024
2 parents 6491321 + 3c1a488 commit c73a5bc
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 c73a5bc

Please sign in to comment.