Class: Proxmox::AplInfo
- Inherits:
-
Base
- Object
- Base
- Proxmox::AplInfo
show all
- Defined in:
- lib/pve/proxmox.rb
Instance Attribute Summary
Attributes inherited from Base
#sid
Instance Method Summary
collapse
Methods inherited from Base
__new__, fetch, #method_missing, #refresh!, #respond_to?
#bench, #rest_del, #rest_get, #rest_post, #rest_put
Constructor Details
Returns a new instance of AplInfo.
690
|
# File 'lib/pve/proxmox.rb', line 690
def initialize() rest_prefix end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Proxmox::Base
Instance Method Details
#debian? ⇒ Boolean
693
|
# File 'lib/pve/proxmox.rb', line 693
def debian?() %r[\Adebian-] =~ @os end
|
#download(storage) ⇒ Object
696
697
698
699
|
# File 'lib/pve/proxmox.rb', line 696
def download storage
upid = rest_post "#{@rest_prefix}", template: @template, storage: storage.to_s
Task.send :__new__, node: @node, host: self, upid: upid
end
|
#lxc? ⇒ Boolean
694
|
# File 'lib/pve/proxmox.rb', line 694
def lxc?() 'lxc' == @type end
|
#name ⇒ Object
691
|
# File 'lib/pve/proxmox.rb', line 691
def name() @template end
|
#rest_prefix ⇒ Object
686
687
688
|
# File 'lib/pve/proxmox.rb', line 686
def rest_prefix
@rest_prefix ||= "/nodes/#{@node.node}/aplinfo"
end
|
#system? ⇒ Boolean
692
|
# File 'lib/pve/proxmox.rb', line 692
def system?() 'system' == @section end
|