Module: FogExtensions::Proxmox::Container
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/fog_extensions/proxmox/container.rb
Instance Attribute Summary collapse
-
#ostemplate_file ⇒ Object
Returns the value of attribute ostemplate_file.
-
#ostemplate_storage ⇒ Object
Returns the value of attribute ostemplate_storage.
-
#password ⇒ Object
Returns the value of attribute password.
Instance Method Summary collapse
- #config_attributes=(attrs) ⇒ Object
- #identity ⇒ Object
- #interfaces ⇒ Object
- #interfaces_attributes=(attrs) ⇒ Object
- #memory ⇒ Object
- #mount_points ⇒ Object
- #persisted? ⇒ Boolean
- #templated? ⇒ Boolean
- #to_s ⇒ Object
- #vm_description ⇒ Object
- #volumes ⇒ Object
- #volumes_attributes=(attrs) ⇒ Object
Instance Attribute Details
#ostemplate_file ⇒ Object
Returns the value of attribute ostemplate_file.
24 25 26 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 24 def ostemplate_file @ostemplate_file end |
#ostemplate_storage ⇒ Object
Returns the value of attribute ostemplate_storage.
24 25 26 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 24 def ostemplate_storage @ostemplate_storage end |
#password ⇒ Object
Returns the value of attribute password.
24 25 26 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 24 def password @password end |
Instance Method Details
#config_attributes=(attrs) ⇒ Object
51 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 51 def config_attributes=(attrs); end |
#identity ⇒ Object
31 32 33 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 31 def identity "#{type}_#{vmid}" end |
#interfaces ⇒ Object
43 44 45 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 43 def interfaces config.interfaces end |
#interfaces_attributes=(attrs) ⇒ Object
49 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 49 def interfaces_attributes=(attrs); end |
#memory ⇒ Object
40 41 42 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 40 def memory maxmem.to_i end |
#mount_points ⇒ Object
37 38 39 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 37 def mount_points config.mount_points.collect { |mp| mp.id+': '+mp.volid } end |
#persisted? ⇒ Boolean
28 29 30 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 28 def persisted? !!identity && !!uptime end |
#templated? ⇒ Boolean
52 53 54 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 52 def templated? volumes.any? { |volume| volume.templated? } end |
#to_s ⇒ Object
25 26 27 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 25 def to_s name end |
#vm_description ⇒ Object
46 47 48 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 46 def vm_description "Name=#{name}, vmid=#{vmid}" end |
#volumes ⇒ Object
34 35 36 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 34 def volumes config.mount_points end |
#volumes_attributes=(attrs) ⇒ Object
50 |
# File 'app/models/concerns/fog_extensions/proxmox/container.rb', line 50 def volumes_attributes=(attrs); end |