Module: Nucleus::Adapters::V1::OpenshiftV2::Lifecycle
- Included in:
- Nucleus::Adapters::V1::OpenshiftV2
- Defined in:
- lib/nucleus/adapters/v1/openshift_v2/lifecycle.rb
Instance Method Summary collapse
Instance Method Details
#restart(application_id) ⇒ Object
24 25 26 27 28 |
# File 'lib/nucleus/adapters/v1/openshift_v2/lifecycle.rb', line 24 def restart(application_id) id = app_id_by_name(application_id) validate_start_requirements(id, 'restart') to_nucleus_app(send_event(id, 'restart')) end |
#start(application_id) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/nucleus/adapters/v1/openshift_v2/lifecycle.rb', line 7 def start(application_id) # if app is only deployed, we must first restore the latest deployment id = app_id_by_name(application_id) validate_start_requirements(id, 'start') to_nucleus_app(send_event(id, 'start')) end |
#stop(application_id) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/nucleus/adapters/v1/openshift_v2/lifecycle.rb', line 15 def stop(application_id) id = app_id_by_name(application_id) unless deployed?(id) fail Errors::SemanticAdapterRequestError, 'Application must be deployed before it can be stopped' end to_nucleus_app(send_event(id, 'stop')) end |