Class: Proxmox::Storage
Defined Under Namespace
Classes: Content
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize ⇒ Storage
constructor
A new instance of Storage.
- #rest_prefix ⇒ Object
- #to_s ⇒ Object
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
#initialize ⇒ Storage
Returns a new instance of Storage.
667 |
# File 'lib/pve/proxmox.rb', line 667 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
#content ⇒ Object
661 662 663 664 665 |
# File 'lib/pve/proxmox.rb', line 661 def content rest_get( "#{@rest_prefix}/content").map do |c| Content.send :__new__, c.merge( node: @node, storage: self, t: 'smc') end end |
#rest_prefix ⇒ Object
657 658 659 |
# File 'lib/pve/proxmox.rb', line 657 def rest_prefix @rest_prefix ||= "/nodes/#{@node.node}/storage/#{@storage}" end |
#to_s ⇒ Object
669 |
# File 'lib/pve/proxmox.rb', line 669 def to_s() "#{@node.node}:#{@storage}" end |