Skip to content

Commit 8fb08f0

Browse files
committed
host params for update schema fields
1 parent 5e3dac8 commit 8fb08f0

File tree

1 file changed

+90
-0
lines changed
  • app/models/manageiq/providers/vmware/infra_manager

1 file changed

+90
-0
lines changed

app/models/manageiq/providers/vmware/infra_manager/host.rb

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ class ManageIQ::Providers::Vmware::InfraManager::Host < ::Host
33
include ManageIQ::Providers::Vmware::InfraManager::EmsRefObjMixin
44

55
supports :capture
6+
supports :update
67

78
# overrides base start to support "standby" powerstate
89
supports :start do
@@ -100,4 +101,93 @@ def detect_discovered_hypervisor(_ost, ipaddr)
100101
def self.display_name(number = 1)
101102
n_('Host (Vmware)', 'Hosts (Vmware)', number)
102103
end
104+
105+
def params_for_update
106+
{
107+
:fields => [
108+
{
109+
:component => 'sub-form',
110+
:id => 'endpoints-subform',
111+
:name => 'endpoints-subform',
112+
:title => _("Endpoints"),
113+
:fields => [
114+
:component => 'tabs',
115+
:name => 'tabs',
116+
:fields => [
117+
{
118+
:component => 'tab-item',
119+
:id => 'ws-tab',
120+
:name => 'ws-tab',
121+
:title => _('Web Service'),
122+
:fields => [
123+
{
124+
:component => 'validate-host-credentials',
125+
:id => 'endpoints.ws.valid',
126+
:name => 'endpoints.ws.valid',
127+
:skipSubmit => true,
128+
:isRequired => true,
129+
:fields => [
130+
{
131+
:component => "text-field",
132+
:id => "authentications.ws.userid",
133+
:name => "authentications.ws.userid",
134+
:label => _("Username"),
135+
:isRequired => true,
136+
:validate => [{:type => "required"}],
137+
},
138+
{
139+
:component => "password-field",
140+
:id => "authentications.ws.password",
141+
:name => "authentications.ws.password",
142+
:label => _("Password"),
143+
:type => "password",
144+
:isRequired => true,
145+
:validate => [{:type => "required"}],
146+
:helperText => _('Used for access to Web Services.')
147+
},
148+
],
149+
},
150+
],
151+
},
152+
{
153+
:component => 'tab-item',
154+
:id => 'remote-tab',
155+
:name => 'remote-tab',
156+
:title => _('Remote'),
157+
:fields => [
158+
{
159+
:component => 'validate-remote-credentials',
160+
:id => 'endpoints.remote.valid',
161+
:name => 'endpoints.remote.valid',
162+
:skipSubmit => true,
163+
:isRequired => true,
164+
:fields => [
165+
{
166+
:component => "text-field",
167+
:id => "authentications.remote.userid",
168+
:name => "authentications.remote.userid",
169+
:label => _("Username"),
170+
:isRequired => true,
171+
:validate => [{:type => "required"}],
172+
},
173+
{
174+
:component => "password-field",
175+
:id => "authentications.remote.password",
176+
:name => "authentications.remote.password",
177+
:label => _("Password"),
178+
:type => "password",
179+
:isRequired => true,
180+
:validate => [{:type => "required"}],
181+
:helperText => _('Used for SSH login.')
182+
},
183+
],
184+
},
185+
],
186+
},
187+
]
188+
]
189+
},
190+
]
191+
}
192+
end
103193
end

0 commit comments

Comments
 (0)