Skip to content

Commit

Permalink
Merge pull request #15683 from skovic/additional-power-ops
Browse files Browse the repository at this point in the history
Add support for additional power operations
  • Loading branch information
blomquisg authored Aug 29, 2017
2 parents 68cb56e + 2c58479 commit bf64a63
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/models/physical_server/operations/power.rb
Original file line number Diff line number Diff line change
@@ -7,10 +7,26 @@ def power_off
change_state(:power_off)
end

def power_off_now
change_state(:power_off_now)
end

def restart
change_state(:restart)
end

def restart_now
change_state(:restart_now)
end

def restart_to_sys_setup
change_state(:restart_to_sys_setup)
end

def restart_mgmt_controller
change_state(:restart_mgmt_controller)
end

private

def change_state(verb)
16 changes: 16 additions & 0 deletions db/fixtures/miq_product_features.yml
Original file line number Diff line number Diff line change
@@ -6264,10 +6264,26 @@
:description: Turn Off Server
:feature_type: control
:identifier: physical_server_power_off
- :name: Turn Off Server Immediately
:description: Turn Off Server Immediately
:feature_type: control
:identifier: physical_server_power_off_now
- :name: Restart Server
:description: Restart Server
:feature_type: control
:identifier: physical_server_restart
- :name: Restart Server Immediately
:description: Restart Server Immediately
:feature_type: control
:identifier: physical_server_restart_now
- :name: Restart Server to System Setup
:description: Restart Server to System Setup
:feature_type: control
:identifier: physical_server_restart_to_sys_setup
- :name: Restart Management Controller
:description: Restart Management Controller
:feature_type: control
:identifier: physical_server_restart_mgmt_controller
- :name: Blink LED
:description: Blink Loc LED
:feature_type: control

0 comments on commit bf64a63

Please sign in to comment.