Sha256: 4cce6331098d20bfce13b0c26544100abf3afff5c38416990627a796a6e3f2b1

Contents?: true

Size: 505 Bytes

Versions: 4

Compression:

Stored size: 505 Bytes

Contents

require 'snmpjr/wrappers/smi'

class Snmpjr
  class Target

    def create options = {}
      target = Snmpjr::Wrappers::CommunityTarget.new
      target.community = Snmpjr::Wrappers::SMI::OctetString.new(options.fetch(:community))
      target.address = Snmpjr::Wrappers::SMI::GenericAddress.parse("udp:#{options.fetch(:host)}/#{options.fetch(:port)}")
      target.version = 1
      target.retries = options.fetch(:retries)
      target.timeout = options.fetch(:timeout)
      target
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
snmpjr-0.2.2-java lib/snmpjr/target.rb
snmpjr-0.2.1-java lib/snmpjr/target.rb
snmpjr-0.2.0-java lib/snmpjr/target.rb
snmpjr-0.1.7-java lib/snmpjr/target.rb