Class: Morpheus::LogsInterface
- Inherits:
-
APIClient
- Object
- APIClient
- Morpheus::LogsInterface
- Defined in:
- lib/morpheus/api/logs_interface.rb
Instance Method Summary collapse
- #cluster_logs(id, params = {}) ⇒ Object
- #container_logs(containers = [], params = {}) ⇒ Object
- #list(params = {}) ⇒ Object
- #server_logs(servers = [], params = {}) ⇒ Object
- #stats ⇒ Object
Instance Method Details
#cluster_logs(id, params = {}) ⇒ Object
24 25 26 27 28 |
# File 'lib/morpheus/api/logs_interface.rb', line 24 def cluster_logs(id, params={}) url = "#{@base_url}/api/logs" headers = { params: {'clusterId' => id}.merge(params), authorization: "Bearer #{@access_token}" } execute({method: :get, url: url, headers: headers}) end |
#container_logs(containers = [], params = {}) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/morpheus/api/logs_interface.rb', line 11 def container_logs(containers=[], params={}) url = "#{@base_url}/api/logs" # old versions expected containers[] headers = { params: {'containers' => containers}.merge(params), authorization: "Bearer #{@access_token}" } execute({method: :get, url: url, headers: headers}) end |
#list(params = {}) ⇒ Object
5 6 7 8 9 |
# File 'lib/morpheus/api/logs_interface.rb', line 5 def list(params={}) url = "#{@base_url}/api/logs" headers = { params: params, authorization: "Bearer #{@access_token}" } execute({method: :get, url: url, headers: headers}) end |
#server_logs(servers = [], params = {}) ⇒ Object
18 19 20 21 22 |
# File 'lib/morpheus/api/logs_interface.rb', line 18 def server_logs(servers=[], params={}) url = "#{@base_url}/api/logs" headers = { params: {'servers' => servers}.merge(params), authorization: "Bearer #{@access_token}" } execute({method: :get, url: url, headers: headers}) end |
#stats ⇒ Object
30 31 32 33 34 |
# File 'lib/morpheus/api/logs_interface.rb', line 30 def stats() url = "#{@base_url}/api/logs/log-stats" headers = { params: {}, authorization: "Bearer #{@access_token}" } execute({method: :get, url: url, headers: headers}) end |