Class: Chef::Knife::AcropolisHa
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::AcropolisHa
- Includes:
- AcropolisBase
- Defined in:
- lib/chef/knife/acropolis_ha_list.rb
Instance Method Summary collapse
Methods included from AcropolisBase
#delete, #get, included, #post, #validate
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/chef/knife/acropolis_ha_list.rb', line 15 def run ha_list = [ ui.color('Enabled', :bold), ui.color('Hosts', :bold), ui.color('HA State', :bold) ] ha = get("/ha") info = JSON.parse(ha) ha_list << info["failoverEnabled"].to_s ha_list << info["numHostFailuresToTolerate"].to_s ha_list << info["reservationType"].to_s print ui.list(ha_list, :uneven_columns_across, 3) end |