Module: FogExtensions::Proxmox::Disk

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/fog_extensions/proxmox/disk.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cipasswordObject

Returns the value of attribute cipassword.



25
26
27
# File 'app/models/concerns/fog_extensions/proxmox/disk.rb', line 25

def cipassword
  @cipassword
end

#ciuserObject

Returns the value of attribute ciuser.



25
26
27
# File 'app/models/concerns/fog_extensions/proxmox/disk.rb', line 25

def ciuser
  @ciuser
end

#nameserverObject

Returns the value of attribute nameserver.



25
26
27
# File 'app/models/concerns/fog_extensions/proxmox/disk.rb', line 25

def nameserver
  @nameserver
end

#searchdomainObject

Returns the value of attribute searchdomain.



25
26
27
# File 'app/models/concerns/fog_extensions/proxmox/disk.rb', line 25

def searchdomain
  @searchdomain
end

#sshkeysObject

Returns the value of attribute sshkeys.



25
26
27
# File 'app/models/concerns/fog_extensions/proxmox/disk.rb', line 25

def sshkeys
  @sshkeys
end

Instance Method Details

#cdromObject



33
34
35
36
37
# File 'app/models/concerns/fog_extensions/proxmox/disk.rb', line 33

def cdrom
  return 'none' unless cdrom? || volid.nil?

  ['none', 'cdrom'].include?(volid) ? volid : 'image'
end

#cloudinitObject



39
40
41
# File 'app/models/concerns/fog_extensions/proxmox/disk.rb', line 39

def cloudinit
  cloud_init? ? 'disk' : 'none'
end

#storage_typeObject



27
28
29
30
31
# File 'app/models/concerns/fog_extensions/proxmox/disk.rb', line 27

def storage_type
  return 'cdrom' if cdrom?

  cloud_init? ? 'cloud_init' : 'hard_disk'
end