Method: CiscoAclIntp::AceSrcDstSpec#initialize

Defined in:
lib/cisco_acl_intp/acespec_srcdst.rb

#initialize(opts) ⇒ AceSrcDstSpec

Note:

When it does not specified port in opts, (:port_spec or :operator, :begin_port, :end_port) it assumed with ANY port.

Constructor

Parameters:

  • opts (Hash)

    Options

Options Hash (opts):

  • :ip_spec (AceIpSpec)

    IP address/Mask object

  • :ipaddr (String)

    IP Address (dotted notation)

  • :wildcard (String)

    Wildcard mask (dotted/bit-flipped notation)

  • :netmask (Integer)

    Subnet mask length (e.g. 24)

  • :port_spec (AcePortSpec)

    Port/Operator object

  • :operator (String, Symbol)

    Port operator

  • :port (AceProtoSpecBase)

    port number (single/lower) (same as :begin_port, alias for unary operator)

  • :begin_port (AceProtoSpecBase)

    port number (single/lower)

  • :end_port (AceProtoSpecBase)

    port number (higher)

Raises:



39
40
41
42
43
# File 'lib/cisco_acl_intp/acespec_srcdst.rb', line 39

def initialize(opts)
  @options = opts
  @ip_spec = define_ipspec
  @port_spec = define_portspec
end