Class: ManageIQ::ApplianceConsole::EvmServer
- Inherits:
-
Object
- Object
- ManageIQ::ApplianceConsole::EvmServer
show all
- Defined in:
- lib/manageiq/appliance_console/evm_server.rb
Defined Under Namespace
Classes: NotRunnableError
Class Method Summary
collapse
Class Method Details
.disable ⇒ Object
42
43
44
|
# File 'lib/manageiq/appliance_console/evm_server.rb', line 42
def disable
service.disable
end
|
.enable ⇒ Object
38
39
40
|
# File 'lib/manageiq/appliance_console/evm_server.rb', line 38
def enable
service.enable
end
|
.not_runnable_reason ⇒ Object
.restart ⇒ Object
34
35
36
|
# File 'lib/manageiq/appliance_console/evm_server.rb', line 34
def restart
service.restart
end
|
.running? ⇒ Boolean
7
8
9
|
# File 'lib/manageiq/appliance_console/evm_server.rb', line 7
def running?
service.running?
end
|
.start(enable: false) ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/manageiq/appliance_console/evm_server.rb', line 17
def start(enable: false)
start!(:enable => enable)
rescue AwesomeSpawn::CommandResultError => e
say(e.result.output)
say(e.result.error)
say("")
false
rescue NotRunnableError => e
say(e.to_s)
say("")
false
end
|
.start!(enable: false) ⇒ Object
11
12
13
14
15
|
# File 'lib/manageiq/appliance_console/evm_server.rb', line 11
def start!(enable: false)
raise NotRunnableError, "Cannot start #{I18n.t("product.name")}: #{not_runnable_reason}" unless runnable?
service.start(enable)
end
|
.stop ⇒ Object
30
31
32
|
# File 'lib/manageiq/appliance_console/evm_server.rb', line 30
def stop
service.stop
end
|