Class: IControl::Networking::Tunnel

Inherits:
Base
  • Object
show all
Defined in:
lib/icontrol/networking/tunnel.rb,
lib/icontrol/networking.rb

Overview

The Tunnel interface manages a virtual network interface that allows a network protocol to carry packets of another protocol between two endpoints. Once created, it can be used just like a VLAN in BIG-IP configurations.

Defined Under Namespace

Classes: TunnelDirection, TunnelDirectionSequence

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class IControl::Base

Instance Method Details

#create(opts) ⇒ Object

Creates a set of tunnel.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :local_addresses (String)

    IP addresses for the local end of each specified tunnel

  • :remote_addresses (String)

    IP addresses for the remote end of each specified tunnel

  • :profiles (String)

    Profile specifying the tunneling protocol for each specified tunnel

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



22
23
24
25
# File 'lib/icontrol/networking/tunnel.rb', line 22

def create(opts)
  opts = check_params(opts,[:local_addresses,:remote_addresses,:profiles])
  super(opts)
end

#delete_all_tunnelsObject

Deletes all tunnel.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



33
34
35
# File 'lib/icontrol/networking/tunnel.rb', line 33

def delete_all_tunnels
  super
end

#delete_tunnelObject

Deletes a set of tunnel.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



43
44
45
# File 'lib/icontrol/networking/tunnel.rb', line 43

def delete_tunnel
  super
end

#directionTunnelDirection

Gets the direction for traffic flow within a set of tunnel.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



54
55
56
# File 'lib/icontrol/networking/tunnel.rb', line 54

def direction
  super
end

#listString

Gets the names of all tunnel.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



65
66
67
# File 'lib/icontrol/networking/tunnel.rb', line 65

def list
  super
end

#local_addressString

Gets the IP address for the local end of a set of tunnel.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



76
77
78
# File 'lib/icontrol/networking/tunnel.rb', line 76

def local_address
  super
end

#mtulong

Gets the maximum transmission unit (MTU) for a set of tunnel.

Returns:

  • (long)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



87
88
89
# File 'lib/icontrol/networking/tunnel.rb', line 87

def mtu
  super
end

#profileString

Gets the profile specifying the tunneling protocol for a set of tunnel.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



98
99
100
# File 'lib/icontrol/networking/tunnel.rb', line 98

def profile
  super
end

#remote_addressString

Gets the IP address for the remote end for a set of tunnel.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



109
110
111
# File 'lib/icontrol/networking/tunnel.rb', line 109

def remote_address
  super
end

#set_direction(opts) ⇒ Object

Sets the direction for traffic flow within a set of tunnel.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



140
141
142
143
# File 'lib/icontrol/networking/tunnel.rb', line 140

def set_direction(opts)
  opts = check_params(opts,[:directions])
  super(opts)
end

#set_local_address(opts) ⇒ Object

Sets the IP address for the local end of the tunnel for a set of tunnel

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :addresses (String)

    IP addresses for the local end of each specified tunnel

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



153
154
155
156
# File 'lib/icontrol/networking/tunnel.rb', line 153

def set_local_address(opts)
  opts = check_params(opts,[:addresses])
  super(opts)
end

#set_mtu(opts) ⇒ Object

Sets the maximum transmission unit (MTU) for a set of tunnel. If zero, the tunnel’s MTU is automatically set to the MTU of the tunnel’s underlying interface minus the encapsulation overhead introduced by the tunneling protocol in use for the tunnel.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :mtus (long)

    Maximum transmission unit (MTU) for each specified tunnel (default: 0)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



168
169
170
171
# File 'lib/icontrol/networking/tunnel.rb', line 168

def set_mtu(opts)
  opts = check_params(opts,[:mtus])
  super(opts)
end

#set_profile(opts) ⇒ Object

Sets the profile specifying the tunneling protocol for a set of tunnel. This profile may be an IPIP, GRE, or WCCP-GRE profile type.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :profiles (String)

    Profile specifying the tunneling protocol for each specified tunnel

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



182
183
184
185
# File 'lib/icontrol/networking/tunnel.rb', line 182

def set_profile(opts)
  opts = check_params(opts,[:profiles])
  super(opts)
end

#set_remote_address(opts) ⇒ Object

Sets the IP address for the remote end of a set of tunnel.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :addresses (String)

    IP addresses for the remote end of each specified tunnel

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



195
196
197
198
# File 'lib/icontrol/networking/tunnel.rb', line 195

def set_remote_address(opts)
  opts = check_params(opts,[:addresses])
  super(opts)
end

#set_tos(opts) ⇒ Object

Sets the Type of Service (ToS) value for the encapsulating packet’s IP header. The valid range is zero to 254. The special value 65535 specifies that the encapsulating packet’s IP header ToS value is set to the encapsulated packet’s IP header ToS value.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :values (long)

    Type of Service ( ToS ) value for the encapsulating packet’s IP header (default: 65535)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



210
211
212
213
# File 'lib/icontrol/networking/tunnel.rb', line 210

def set_tos(opts)
  opts = check_params(opts,[:values])
  super(opts)
end

#toslong

Gets the Type of Service (ToS) value for the encapsulating packet’s IP header.

Returns:

  • (long)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



120
121
122
# File 'lib/icontrol/networking/tunnel.rb', line 120

def tos
  super
end

#versionString

Gets the version information for this interface.

Returns:

  • (String)


128
129
130
# File 'lib/icontrol/networking/tunnel.rb', line 128

def version
  super
end