Class: Proxmox::AplInfo

Inherits:
Base
  • Object
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?

Methods included from RestConnection

#bench, #rest_del, #rest_get, #rest_post, #rest_put

Constructor Details

#initializeAplInfo

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

Returns:

  • (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

Returns:

  • (Boolean)


690
# File 'lib/pve/proxmox.rb', line 690

def lxc?() 'lxc' == @type end

#nameObject



687
# File 'lib/pve/proxmox.rb', line 687

def name() @template end

#rest_prefixObject



682
683
684
# File 'lib/pve/proxmox.rb', line 682

def rest_prefix
  @rest_prefix ||= "/nodes/#{@node.node}/aplinfo"
end

#system?Boolean

Returns:

  • (Boolean)


688
# File 'lib/pve/proxmox.rb', line 688

def system?() 'system' == @section end