Module: FogExtensions::Proxmox::Interface

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

Instance Method Summary collapse

Instance Method Details

#cidrObject



46
47
48
# File 'app/models/concerns/fog_extensions/proxmox/interface.rb', line 46

def cidr
  Fog::Proxmox::IpHelper.prefix(ip) if ip
end

#cidr6Object



50
51
52
# File 'app/models/concerns/fog_extensions/proxmox/interface.rb', line 50

def cidr6
  Fog::Proxmox::IpHelper.prefix6(ip6) if ip6
end

#dhcpObject



30
31
32
# File 'app/models/concerns/fog_extensions/proxmox/interface.rb', line 30

def dhcp
  ip == 'dhcp'
end

#dhcp6Object



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

def dhcp6
  ip6 == 'dhcp'
end

#dhcp6=(value) ⇒ Object



42
43
44
# File 'app/models/concerns/fog_extensions/proxmox/interface.rb', line 42

def dhcp6=(value)
  @dhcp6 = value
end

#dhcp=(value) ⇒ Object



38
39
40
# File 'app/models/concerns/fog_extensions/proxmox/interface.rb', line 38

def dhcp=(value)
  @dhcp = value
end

#macObject



26
27
28
# File 'app/models/concerns/fog_extensions/proxmox/interface.rb', line 26

def mac
  macaddr
end