Class: IControl::Networking::PortMirror

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

Overview

The PortMirror interface enables you to work with the definitions and attributes of port mirroring.

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

#add_interface(opts) ⇒ Object

Adds the lists of mirrored-from interfaces to this port mirrors (mirrored-to interfaces).

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :interfaces (String[])

    The lists of mirrored-from interfaces.

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.


17
18
19
20
# File 'lib/icontrol/networking/port_mirror.rb', line 17

def add_interface(opts)
  opts = check_params(opts,[:interfaces])
  super(opts)
end

#create(opts) ⇒ Object

Creates this port mirrors (mirrored-to interfaces) from the list of specified interfaces (mirrored-from interfaces).

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :interfaces (String[])

    The lists of interfaces from which mirroring will take place.

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.


31
32
33
34
# File 'lib/icontrol/networking/port_mirror.rb', line 31

def create(opts)
  opts = check_params(opts,[:interfaces])
  super(opts)
end

#delete_all_port_mirrorsObject

Deletes all port mirrors (mirrored-to interfaces).

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.


42
43
44
# File 'lib/icontrol/networking/port_mirror.rb', line 42

def delete_all_port_mirrors
  super
end

#delete_port_mirrorObject

Deletes this port mirrors (mirrored-to interfaces).

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.


52
53
54
# File 'lib/icontrol/networking/port_mirror.rb', line 52

def delete_port_mirror
  super
end

#interfaceString[]

Gets the lists of mirrored-from interfaces associated with this port mirrors.

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.


63
64
65
# File 'lib/icontrol/networking/port_mirror.rb', line 63

def interface
  super
end

#listString

Gets a list of all port mirrors (mirrored-to interfaces) on this device.

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.


74
75
76
# File 'lib/icontrol/networking/port_mirror.rb', line 74

def list
  super
end

#remove_all_interfacesObject

Removes all mirrored-from interfaces from this port mirrors (mirrored-to interfaces).

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.


92
93
94
# File 'lib/icontrol/networking/port_mirror.rb', line 92

def remove_all_interfaces
  super
end

#remove_interface(opts) ⇒ Object

Removes the lists of mirrored-from interfaces from this port mirrors (mirrored-to interfaces).

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :interfaces (String[])

    The lists of mirrored-from interfaces.

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.


105
106
107
108
# File 'lib/icontrol/networking/port_mirror.rb', line 105

def remove_interface(opts)
  opts = check_params(opts,[:interfaces])
  super(opts)
end

#versionString

Gets the version information for this interface.

Returns:

  • (String)

82
83
84
# File 'lib/icontrol/networking/port_mirror.rb', line 82

def version
  super
end