Class: Morpheus::ApplianceSettingsInterface
- Inherits:
-
APIClient
- Object
- APIClient
- Morpheus::ApplianceSettingsInterface
- Defined in:
- lib/morpheus/api/appliance_settings_interface.rb
Instance Method Summary collapse
- #base_path ⇒ Object
- #cloud_types(params = {}) ⇒ Object
- #get ⇒ Object
- #locales(params = {}) ⇒ Object
- #maintenance(params = {}, payload = {}) ⇒ Object
- #reindex(params = {}, payload = {}) ⇒ Object
- #update(payload) ⇒ Object
Instance Method Details
#base_path ⇒ Object
5 6 7 |
# File 'lib/morpheus/api/appliance_settings_interface.rb', line 5 def base_path "/api/appliance-settings" end |
#cloud_types(params = {}) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/morpheus/api/appliance_settings_interface.rb', line 21 def cloud_types(params={}) url = "#{base_path}/zone-types" headers = { params: params, authorization: "Bearer #{@access_token}" } opts = {method: :get, url: url, headers: headers} execute(opts) end |
#get ⇒ Object
9 10 11 12 13 |
# File 'lib/morpheus/api/appliance_settings_interface.rb', line 9 def get() url = base_path headers = { params: {}, authorization: "Bearer #{@access_token}" } execute(method: :get, url: url, headers: headers) end |
#locales(params = {}) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/morpheus/api/appliance_settings_interface.rb', line 28 def locales(params={}) url = "#{base_path}/locales" headers = { params: params, authorization: "Bearer #{@access_token}" } opts = {method: :get, url: url, headers: headers} execute(opts) end |
#maintenance(params = {}, payload = {}) ⇒ Object
35 36 37 38 39 40 |
# File 'lib/morpheus/api/appliance_settings_interface.rb', line 35 def maintenance(params={}, payload={}) url = "#{base_path}/maintenance" headers = { params: params, authorization: "Bearer #{@access_token}" } opts = {method: :post, url: url, headers: headers, payload: payload} execute(opts) end |
#reindex(params = {}, payload = {}) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/morpheus/api/appliance_settings_interface.rb', line 42 def reindex(params={}, payload={}) url = "#{base_path}/reindex" headers = { params: params, authorization: "Bearer #{@access_token}" } opts = {method: :post, url: url, headers: headers, payload: payload} execute(opts) end |
#update(payload) ⇒ Object
15 16 17 18 19 |
# File 'lib/morpheus/api/appliance_settings_interface.rb', line 15 def update(payload) url = base_path headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } execute(method: :put, url: url, headers: headers, payload: payload.to_json) end |