Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middleware server group power ops #13741

Merged
merged 4 commits into from
Feb 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 35 additions & 6 deletions app/models/manageiq/providers/hawkular/middleware_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,21 @@ def alerts_client
with_provider_connection(&:alerts)
end

# server ops
def shutdown_middleware_server(ems_ref, params = {})
timeout = params[:timeout] || 0
run_generic_operation(:Shutdown, ems_ref, :restart => false, :timeout => timeout)
end

def suspend_middleware_server(ems_ref, params = {})
timeout = params[:timeout] || 0
run_generic_operation(:Suspend, ems_ref, :timeout => timeout)
end

def resume_middleware_server(ems_ref)
run_generic_operation(:Resume, ems_ref)
end

def reload_middleware_server(ems_ref)
run_generic_operation(:Reload, ems_ref)
end
Expand All @@ -195,6 +210,7 @@ def restart_middleware_server(ems_ref)
run_generic_operation(:Shutdown, ems_ref, :restart => true)
end

# domain server ops
def restart_middleware_domain_server(ems_ref)
run_generic_operation(:Restart, ems_ref)
end
Expand All @@ -203,18 +219,31 @@ def kill_middleware_domain_server(ems_ref)
run_generic_operation(:Kill, ems_ref)
end

def shutdown_middleware_server(ems_ref, params)
# server group ops
def start_middleware_server_group(ems_ref)
run_generic_operation('Start Servers', ems_ref)
end

def stop_middleware_server_group(ems_ref, params = {})
timeout = params[:timeout] || 0
run_generic_operation(:Shutdown, ems_ref, :restart => false, :timeout => timeout)
run_generic_operation('Stop Servers', ems_ref, :timeout => timeout)
end

def restart_middleware_server_group(ems_ref)
run_generic_operation('Restart Servers', ems_ref)
end

def suspend_middleware_server(ems_ref, params)
def reload_middleware_server_group(ems_ref)
run_generic_operation('Reload Servers', ems_ref)
end

def suspend_middleware_server_group(ems_ref, params = {})
timeout = params[:timeout] || 0
run_generic_operation(:Suspend, ems_ref, :timeout => timeout)
run_generic_operation('Suspend Servers', ems_ref, :timeout => timeout)
end

def resume_middleware_server(ems_ref)
run_generic_operation(:Resume, ems_ref)
def resume_middleware_server_group(ems_ref)
run_generic_operation('Resume Servers', ems_ref)
end

def create_jdr_report(ems_ref)
Expand Down
26 changes: 25 additions & 1 deletion db/fixtures/miq_product_features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4069,8 +4069,32 @@
:description: Edit Tags of Middleware Server Groups
:feature_type: control
:identifier: middleware_server_group_tag
- :name: Reload middleware server group
:description: Trigger reload operation for Middleware Server Group
:feature_type: admin
:identifier: middleware_server_group_reload
- :name: Stop middleware server group
:description: Stop Middleware Server Group
:feature_type: admin
:identifier: middleware_server_group_stop
- :name: Start middleware server group
:description: Start Middleware Server Group
:feature_type: admin
:identifier: middleware_server_group_start
- :name: Suspend middleware server group
:description: Suspend Middleware Server Group
:feature_type: admin
:identifier: middleware_server_group_suspend
- :name: Resume middleware server group
:description: Resume a suspended Middleware Server Group
:feature_type: admin
:identifier: middleware_server_group_resume
- :name: Restart middleware server group
:description: Restart a Middleware Server Group
:feature_type: admin
:identifier: middleware_server_group_restart
- :name: Add middleware deployment
:description: Add middleware deployment
:description: Add middleware deployment for Server Group
:feature_type: admin
:identifier: middleware_group_deployment_add

Expand Down