Class: HammerCLIForemanVirtWhoConfigure::VirtWhoConfig
- Inherits:
-
HammerCLIForeman::Command
- Object
- HammerCLIForeman::Command
- HammerCLIForemanVirtWhoConfigure::VirtWhoConfig
show all
- Defined in:
- lib/hammer_cli_foreman_virt_who_configure/config.rb
Defined Under Namespace
Modules: UpdateCommons
Classes: CreateCommand, DeleteCommand, DeployCommand, FetchCommand, InfoCommand, ListCommand, UpdateCommand
Class Method Summary
collapse
Class Method Details
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/hammer_cli_foreman_virt_who_configure/config.rb', line 33
def self.format_filtering_mode(mode)
case mode
when MODE_UNLIMITED
_('Unlimited')
when MODE_WHITELIST
_('Whitelist')
when MODE_BLACKLIST
_('Blacklist')
else
_('Unknown listing mode')
end
end
|
11
12
13
14
15
16
17
18
|
# File 'lib/hammer_cli_foreman_virt_who_configure/config.rb', line 11
def self.format_interval(interval)
hr_interval = (interval / 60)
if hr_interval <= 1
_('every hour')
else
_('every %s hours') % (interval / 60)
end
end
|
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/hammer_cli_foreman_virt_who_configure/config.rb', line 20
def self.format_status(status)
case status
when 'unknown'
_('No Report Yet')
when 'ok', 'out_of_date'
_('OK')
when 'error'
_('Error')
else
_('Unknown configuration status')
end
end
|