The watcher.decision_engine.strategy.strategies.saving_energy Module

The watcher.decision_engine.strategy.strategies.saving_energy Module

class watcher.decision_engine.strategy.strategies.saving_energy.SavingEnergy(config, osc=None)[source]

Bases: watcher.decision_engine.strategy.strategies.base.SavingEnergyBaseStrategy

add_action_poweronoff_node(node_uuid, state)[source]

Add an action for node disability into the solution.

Parameters:
  • node – node uuid
  • state – node power state, power on or power off
Returns:

None

do_execute()[source]

Strategy execution phase

This phase is where you should put the main logic of your strategy.

classmethod get_display_name()[source]
get_hosts_pool()[source]

Get three pools, with_vms_node_pool, free_poweron_node_pool,

free_poweroff_node_pool.

classmethod get_name()[source]
classmethod get_schema()[source]

return a schema of two input parameters

The standby nodes refer to those nodes unused but still poweredon to deal with boom of new instances.

classmethod get_translatable_display_name()[source]
post_execute()[source]

Post-execution phase

This can be used to compute the global efficacy

pre_execute()[source]

Pre-execution phase

This can be used to fetch some pre-requisites or data.

save_energy()[source]
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.