Class: Proxmox::Resources::Node
- Inherits:
-
Object
- Object
- Proxmox::Resources::Node
- Defined in:
- lib/proxmox/resources/node.rb
Overview
Proxmox Node Class
Instance Method Summary collapse
-
#create_vm(params) ⇒ Object
Creating Resources.
-
#initialize(client, node_name) ⇒ Node
constructor
A new instance of Node.
-
#status ⇒ Object
Getting status of the Node.
-
#updates ⇒ Object
Getting a list of updates for the Node.
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 |
#status ⇒ Object
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 |
#updates ⇒ Object
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 |