Class: IControl::Networking::VLAN

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

Overview

The VLAN interface enables you to work with the definitions and attributes contained in a device’s VLAN.

Defined Under Namespace

Classes: ForwardingTableEntry, ForwardingTableSequence, ForwardingTableSequenceSequence, MemberEntry, MemberSequence, MemberSequenceSequence

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_member(opts) ⇒ Object

Adds this member interfaces/trunks to this VLANs.

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.



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

def add_member(opts)
  opts = check_params(opts,[:members])
  super(opts)
end

#add_static_forwarding(opts) ⇒ Object

Adds the static forwarding entries for this VLANs.

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.



35
36
37
38
# File 'lib/icontrol/networking/vlan.rb', line 35

def add_static_forwarding(opts)
  opts = check_params(opts,[:forwarding_entries])
  super(opts)
end

#create(opts) ⇒ Object

Creates this VLANs with extended attributes.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :vlan_ids (long)

    The VLAN tag numbers or IDs (valid range is 1-4095).

  • :members (IControl::Networking::VLAN::MemberEntry[])

    The lists of interfaces/trunks that will be members of the VLANs .

  • :failsafe_states (IControl::Common::EnabledState)

    The failsafe states.

  • :timeouts (long)

    The failsafe timeouts.

  • :mac_masquerade_addresses (String)

    The MAC masquerade addresses.

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
55
# File 'lib/icontrol/networking/vlan.rb', line 52

def create(opts)
  opts = check_params(opts,[:vlan_ids,:members,:failsafe_states,:timeouts,:mac_masquerade_addresses])
  super(opts)
end

#delete_all_vlansObject

Deletes all VLANs.

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/vlan.rb', line 63

def delete_all_vlans
  super
end

#delete_vlanObject

Deletes this VLANs.

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.



73
74
75
# File 'lib/icontrol/networking/vlan.rb', line 73

def delete_vlan
  super
end

#dynamic_forwardingForwardingTableEntry[]

Retrieves the dynamic forwarding entries for this VLANs.

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.



84
85
86
# File 'lib/icontrol/networking/vlan.rb', line 84

def dynamic_forwarding
  super
end

#failsafe_actionHAAction

Gets the failsafe actions for this VLANs.

Returns:

  • (HAAction)

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.



95
96
97
# File 'lib/icontrol/networking/vlan.rb', line 95

def failsafe_action
  super
end

#failsafe_stateEnabledState

Gets the failsafe states for this VLANs.

Returns:

  • (EnabledState)

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.



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

def failsafe_state
  super
end

#failsafe_timeoutlong

Gets the failsafe timeouts for this VLANs.

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.



117
118
119
# File 'lib/icontrol/networking/vlan.rb', line 117

def failsafe_timeout
  super
end

#learning_modeLearningMode

Gets the configured learning modes of this VLANs.

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.



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

def learning_mode
  super
end

#listString

Gets a list of all VLANs 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.



139
140
141
# File 'lib/icontrol/networking/vlan.rb', line 139

def list
  super
end

#mac_masquerade_addressString

Gets the MAC masquerade addresses for this VLANs.

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.



150
151
152
# File 'lib/icontrol/networking/vlan.rb', line 150

def mac_masquerade_address
  super
end

#memberMemberEntry[]

Gets the members of this VLANs.

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.



161
162
163
# File 'lib/icontrol/networking/vlan.rb', line 161

def member
  super
end

#mtulong

Gets the MTUs for this VLANs.

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.



172
173
174
# File 'lib/icontrol/networking/vlan.rb', line 172

def mtu
  super
end

#remove_all_dynamic_forwardingsObject

Removes all dynamic forwarding entries from this VLANs.

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.



236
237
238
# File 'lib/icontrol/networking/vlan.rb', line 236

def remove_all_dynamic_forwardings
  super
end

#remove_all_membersObject

Removes all member interfaces/trunks from this VLANs.

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.



246
247
248
# File 'lib/icontrol/networking/vlan.rb', line 246

def remove_all_members
  super
end

#remove_all_static_forwardingsObject

Removes all static forwarding entries from this VLANs.

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.



256
257
258
# File 'lib/icontrol/networking/vlan.rb', line 256

def remove_all_static_forwardings
  super
end

#remove_member(opts) ⇒ Object

Removes this member interfaces/trunks from this VLANs.

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.



268
269
270
271
# File 'lib/icontrol/networking/vlan.rb', line 268

def remove_member(opts)
  opts = check_params(opts,[:members])
  super(opts)
end

#remove_static_forwarding(opts) ⇒ Object

Removes the static forwarding entries from this VLANs.

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.



281
282
283
284
# File 'lib/icontrol/networking/vlan.rb', line 281

def remove_static_forwarding(opts)
  opts = check_params(opts,[:forwarding_entries])
  super(opts)
end

#set_failsafe_action(opts) ⇒ Object

Sets the failsafe actions for this VLANs.

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.



294
295
296
297
# File 'lib/icontrol/networking/vlan.rb', line 294

def set_failsafe_action(opts)
  opts = check_params(opts,[:actions])
  super(opts)
end

#set_failsafe_state(opts) ⇒ Object

Sets the failsafe states for this VLANs.

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.



307
308
309
310
# File 'lib/icontrol/networking/vlan.rb', line 307

def set_failsafe_state(opts)
  opts = check_params(opts,[:states])
  super(opts)
end

#set_failsafe_timeout(opts) ⇒ Object

Sets the failsafe timeouts for this VLANs.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :timeouts (long)

    The failsafe timeouts to set for the specified VLAN names.

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.



320
321
322
323
# File 'lib/icontrol/networking/vlan.rb', line 320

def set_failsafe_timeout(opts)
  opts = check_params(opts,[:timeouts])
  super(opts)
end

#set_learning_mode(opts) ⇒ Object

Sets the learning modes for this VLANs.

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.



333
334
335
336
# File 'lib/icontrol/networking/vlan.rb', line 333

def set_learning_mode(opts)
  opts = check_params(opts,[:modes])
  super(opts)
end

#set_mac_masquerade_address(opts) ⇒ Object

Sets the MAC masquerade addresses for this VLANs.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :mac_masquerade_addresses (String)

    The MAC masquerade addresses to set for the specified VLAN names.

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.



346
347
348
349
# File 'lib/icontrol/networking/vlan.rb', line 346

def set_mac_masquerade_address(opts)
  opts = check_params(opts,[:mac_masquerade_addresses])
  super(opts)
end

#set_mtu(opts) ⇒ Object

Sets the MTUs for this VLANs.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :mtus (long)

    The MTUs to set for the specified VLAN names.

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.



359
360
361
362
# File 'lib/icontrol/networking/vlan.rb', line 359

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

#set_source_check_state(opts) ⇒ Object

Sets the the source checking states for this VLANs. If enabled and auto lasthop is disabled, check that the source of the first packet of a connection is correct (correct VLAN, router, node). This is equivalent to BSD’s net.inet.sourcecheck sysctl variable.

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.



374
375
376
377
# File 'lib/icontrol/networking/vlan.rb', line 374

def set_source_check_state(opts)
  opts = check_params(opts,[:states])
  super(opts)
end

#set_vlan_id(opts) ⇒ Object

Sets the tag ids for this VLANs. Note: Currently (9.4.0+), this method is not supported; delete and re-create the VLAN instead.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :vlan_ids (long)

    The VLAN ID/tag numbers (valid range is 1-4095).

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.



388
389
390
391
# File 'lib/icontrol/networking/vlan.rb', line 388

def set_vlan_id(opts)
  opts = check_params(opts,[:vlan_ids])
  super(opts)
end

#source_check_stateEnabledState

Gets the source checking states for this VLANs. If enabled and auto lasthop is disabled, check that the source of the first packet of a connection is correct (correct VLAN, router, node). This is equivalent to BSD’s net.inet.sourcecheck sysctl variable.

Returns:

  • (EnabledState)

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.



185
186
187
# File 'lib/icontrol/networking/vlan.rb', line 185

def source_check_state
  super
end

#static_forwardingForwardingTableEntry[]

Retrieves the static forwarding entries for this VLANs.

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.



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

def static_forwarding
  super
end

#true_mac_addressString

Gets the true MAC addresses used by this VLANs.

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.



207
208
209
# File 'lib/icontrol/networking/vlan.rb', line 207

def true_mac_address
  super
end

#versionString

Gets the version information for this interface.

Returns:

  • (String)


215
216
217
# File 'lib/icontrol/networking/vlan.rb', line 215

def version
  super
end

#vlan_idlong

Gets the ids for this VLANs.

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.



226
227
228
# File 'lib/icontrol/networking/vlan.rb', line 226

def vlan_id
  super
end