class Interface
Attributes
dns[R]
ip[R]
main[R]
port[R]
type[R]
useip[R]
Public Class Methods
new(attributes)
click to toggle source
for more info see
https://www.zabbix.com/documentation/2.0/manual/appendix/api/hostinterface/definitions#host_interface
we assume ip and dns shall always be set
# File lib/zapix/zabbix_classes/interface.rb, line 8 def initialize(attributes) @type = attributes['type'] ||= 1 @main = attributes['main'] ||= 1 @useip = attributes['useip'] ||= 1 @ip = attributes['ip'] = attributes['ip'] @dns = attributes['dns'] = attributes['dns'] @port = attributes['port'] = attributes['port'] ||= 10_050 @result = { 'type' => type, 'main' => main, 'useip' => useip, 'ip' => ip, 'dns' => dns, 'port' => port } end
Public Instance Methods
to_hash()
click to toggle source
# File lib/zapix/zabbix_classes/interface.rb, line 25 def to_hash @result end