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

- (Object) add_member(opts)

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)
  check_params(opts,[:members])
  super
end

- (Object) add_static_forwarding(opts)

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)
  check_params(opts,[:forwarding_entries])
  super
end

- (Object) create(opts)

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)
  check_params(opts,[:vlan_ids,:members,:failsafe_states,:timeouts,:mac_masquerade_addresses])
  super
end

- (Object) delete_all_vlans

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

- (Object) delete_vlan

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

- (ForwardingTableEntry[]) dynamic_forwarding

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

- (HAAction) failsafe_action

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

- (EnabledState) failsafe_state

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

- (long) failsafe_timeout

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

- (LearningMode) learning_mode

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

- (String) list

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

- (String) mac_masquerade_address

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

- (MemberEntry[]) member

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

- (long) mtu

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

- (Object) remove_all_dynamic_forwardings

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

- (Object) remove_all_members

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

- (Object) remove_all_static_forwardings

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

- (Object) remove_member(opts)

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)
  check_params(opts,[:members])
  super
end

- (Object) remove_static_forwarding(opts)

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)
  check_params(opts,[:forwarding_entries])
  super
end

- (Object) set_failsafe_action(opts)

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)
  check_params(opts,[:actions])
  super
end

- (Object) set_failsafe_state(opts)

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)
  check_params(opts,[:states])
  super
end

- (Object) set_failsafe_timeout(opts)

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)
  check_params(opts,[:timeouts])
  super
end

- (Object) set_learning_mode(opts)

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)
  check_params(opts,[:modes])
  super
end

- (Object) set_mac_masquerade_address(opts)

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)
  check_params(opts,[:mac_masquerade_addresses])
  super
end

- (Object) set_mtu(opts)

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)
  check_params(opts,[:mtus])
  super
end

- (Object) set_source_check_state(opts)

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)
  check_params(opts,[:states])
  super
end

- (Object) set_vlan_id(opts)

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)
  check_params(opts,[:vlan_ids])
  super
end

- (EnabledState) source_check_state

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

- (ForwardingTableEntry[]) static_forwarding

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

- (String) true_mac_address

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

- (String) version

Gets the version information for this interface.

Returns:

  • (String)


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

def version
  super
end

- (long) vlan_id

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