Class: Proxmox::Resources::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/proxmox/resources/node.rb

Overview

Proxmox Node Class

Instance Method Summary collapse

Constructor Details

#initialize(client, node_name) ⇒ Node



7
8
9
10
# File 'lib/proxmox/resources/node.rb', line 7

def initialize(client, node_name)
  @client = client
  @node   = node_name
end

Instance Method Details

#create_vm(params) ⇒ Object

Creating Resources



23
24
25
# File 'lib/proxmox/resources/node.rb', line 23

def create_vm(params)
  @client.request(:post, "/nodes/#{@node}/qemu", {}, params)
end

#statusObject

Getting status of the Node



13
14
15
# File 'lib/proxmox/resources/node.rb', line 13

def status
  @client.request(:get, "/nodes/#{@node}/status")
end

#updatesObject

Getting a list of updates for the Node



18
19
20
# File 'lib/proxmox/resources/node.rb', line 18

def updates
  @client.request(:get, "/nodes/#{@node}/apt/update")
end