You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unsupported_reason_add(:reboot_guest,_("The VM is not powered on"))unlesscurrent_state == "on"
9
+
_("The VM is not powered on")unlesscurrent_state == "on"
10
10
end
11
11
supports:resetdo
12
-
unsupported_reason_add(:reset,_("The VM is not powered on"))unlesscurrent_state == "on"
12
+
_("The VM is not powered on")unlesscurrent_state == "on"
13
13
end
14
14
supports:snapshots
15
15
supports:snapshot_create
16
16
supports:revert_to_snapshotdo
17
-
unsupported_reason_add(:revert_to_snapshot,_("Cannot revert to snapshot while VM is running"))unlesscurrent_state == "off"
17
+
_("Cannot revert to snapshot while VM is running")unlesscurrent_state == "off"
18
18
end
19
19
supports:remove_snapshot
20
20
supports:remove_all_snapshots
21
21
22
22
supports_not:suspend
23
23
24
24
supports:publishdo
25
-
reason=_("Publish not supported because VM is blank")ifblank?
26
-
reason ||= _("Publish not supported because VM is orphaned")iforphaned?
27
-
reason ||= _("Publish not supported because VM is archived")ifarchived?
28
-
unsupported_reason_add(:publish,reason)ifreason
25
+
ifblank?
26
+
_("Publish not supported because VM is blank")
27
+
elsiforphaned?
28
+
_("Publish not supported because VM is orphaned")
29
+
elsifarchved?
30
+
_("Publish not supported because VM is archived")
31
+
end
29
32
end
30
33
31
34
supports:html5_consoledo
32
-
reason=_("VM Console not supported because VM is not powered on")unlesscurrent_state== "on"
35
+
ifcurrent_state!= "on"
33
36
_("VM Console not supported because VM is not powered on")
34
37
else
35
38
unsupported_reason(:native_console)
@@ -46,10 +49,15 @@ class ManageIQ::Providers::IbmCloud::PowerVirtualServers::CloudManager::Vm < Man
46
49
end
47
50
48
51
supports:resizedo
49
-
unsupported_reason_add(:resize,_('The VM is not powered off'))unlesscurrent_state == "off"
50
-
unsupported_reason_add(:resize,_('The VM is not connected to a provider'))unlessext_management_system
51
-
unsupported_reason_add(:resize,_('SAP VM resize not supported'))ifflavor.kind_of?(ManageIQ::Providers::IbmCloud::PowerVirtualServers::CloudManager::SAPProfile)
0 commit comments