Class: OSPFv2::MtExternalRoute

Inherits:
ExternalRoute_Base show all
Defined in:
lib/ie/external_route.rb

Constant Summary

Constants inherited from ExternalRoute_Base

ExternalRoute_Base::ForwardingAddress

Instance Attribute Summary

Attributes inherited from ExternalRoute_Base

#forwarding_address, #metric, #mt_id, #tag, #type

Instance Method Summary collapse

Methods inherited from ExternalRoute_Base

#encode, new_hash, #parse, #to_s

Methods included from Common

#ivar_to_klassname, #ivars, #set, #to_hash

Constructor Details

#initialize(arg = {}) ⇒ MtExternalRoute

Returns a new instance of MtExternalRoute.



163
164
165
166
167
168
169
170
# File 'lib/ie/external_route.rb', line 163

def initialize(arg={})
  if arg.is_a?(Hash)
    @forwarding_address = ForwardingAddress.new
    raise ArgumentError, "MT-ID not set!" unless arg.has_key?(:mt_id)
    raise ArgumentError, "MT-ID should not be 0!" if arg[:mt_id]==0
  end
  super
end