class ProxmoxRb::ClusterResources

Public Class Methods

get(ticket) click to toggle source
# File lib/proxmox-rb/cluster_resources.rb, line 3
def self.get(ticket)
  http = Net::HTTP.new(ticket.host, '8006')
  http.use_ssl = true
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  headers = { 'Cookie' => "PVEAuthCookie=#{ticket.ticket}" }
  cluster_resources = http.get('/api2/json/cluster/resources', headers).body
  nodes = JSON.parse( cluster_resources )['data'][1..-1]
end