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.
686
|
# File 'lib/pve/proxmox.rb', line 686
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
689
|
# File 'lib/pve/proxmox.rb', line 689
def debian?() %r[\Adebian-] =~ @os end
|
#download(storage) ⇒ Object
692
693
694
695
|
# File 'lib/pve/proxmox.rb', line 692
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
690
|
# File 'lib/pve/proxmox.rb', line 690
def lxc?() 'lxc' == @type end
|
#name ⇒ Object
687
|
# File 'lib/pve/proxmox.rb', line 687
def name() @template end
|
#rest_prefix ⇒ Object
682
683
684
|
# File 'lib/pve/proxmox.rb', line 682
def rest_prefix
@rest_prefix ||= "/nodes/#{@node.node}/aplinfo"
end
|
#system? ⇒ Boolean
688
|
# File 'lib/pve/proxmox.rb', line 688
def system?() 'system' == @section end
|