Class: Scalarium::API
- Inherits:
-
Object
- Object
- Scalarium::API
- Defined in:
- lib/scalarium-api-wrapper/api.rb
Instance Method Summary collapse
-
#deploy_application(app_id, options = {:comment => nil, :migrate => false}) ⇒ Object
Method allows to deploy application in scalarium.
-
#fetch_deployment_details(app_id, deployment_id) ⇒ Object
Method pings scalarium to check the details of the deploy (i.e. progress).
-
#get_applications ⇒ Object
Method fetches all applications on the server.
-
#get_clouds ⇒ Object
Method fetches all clouds on the server.
Instance Method Details
#deploy_application(app_id, options = {:comment => nil, :migrate => false}) ⇒ Object
Method allows to deploy application in scalarium
43 44 45 46 47 48 |
# File 'lib/scalarium-api-wrapper/api.rb', line 43 def deploy_application(app_id, = {:comment => nil, :migrate => false}) json_command = JSON.dump(:command => 'deploy', :comment => [:comment], :migrate => [:migrate]) http_post_request(Scalarium.applications_url+"/#{app_id}/deploy", json_command) end |
#fetch_deployment_details(app_id, deployment_id) ⇒ Object
Method pings scalarium to check the details of the deploy (i.e. progress)
29 30 31 |
# File 'lib/scalarium-api-wrapper/api.rb', line 29 def fetch_deployment_details(app_id, deployment_id) http_get_request(Scalarium.applications_url+"/#{app_id}/deployments/#{deployment_id}") end |
#get_applications ⇒ Object
Method fetches all applications on the server
20 21 22 |
# File 'lib/scalarium-api-wrapper/api.rb', line 20 def get_applications http_get_request(Scalarium.applications_url) end |
#get_clouds ⇒ Object
Method fetches all clouds on the server
12 13 14 |
# File 'lib/scalarium-api-wrapper/api.rb', line 12 def get_clouds http_get_request(Scalarium.clouds_url) end |