Class: IControl::Networking::SelfIP

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

Overview

The SelfIP interface enables you to work with the definitions and attributes contained in a device's Self IP.

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 this self IP addresses with extended attributes.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :vlan_names (String)

    The VLANs that the new self IPs will be on.

  • :netmasks (String)

    The netmasks for the self IPs .

  • :unit_ids (long)

    The unit ids for the self IPs .

  • :floating_states (IControl::Common::EnabledState)

    The floating attributes of the self IPs .

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.



20
21
22
23
# File 'lib/icontrol/networking/self_ip.rb', line 20

def create(opts)
  opts = check_params(opts,[:vlan_names,:netmasks,:unit_ids,:floating_states])
  super(opts)
end

#delete_all_self_ipsObject

Deletes all self IP 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.



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

def delete_all_self_ips
  super
end

#delete_self_ipObject

Deletes this self IP 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.



41
42
43
# File 'lib/icontrol/networking/self_ip.rb', line 41

def delete_self_ip
  super
end

#floating_stateEnabledState

Gets the floating states of this self IPs.

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.



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

def floating_state
  super
end

#listString

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



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

def list
  super
end

#netmaskString

Gets the netmasks of this self IPs.

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/self_ip.rb', line 74

def netmask
  super
end

#set_floating_state(opts) ⇒ Object

Sets the floating states of this self IPs. Note: If floating state is being set to enabled, then unit ID will be set to 1 by default. If floating state is being set to disabled, then unit ID will be set to 0.

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.



118
119
120
121
# File 'lib/icontrol/networking/self_ip.rb', line 118

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

#set_netmask(opts) ⇒ Object

Sets the netmasks of this self IPs.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :netmasks (String)

    The netmasks of the specified self IPs .

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.



131
132
133
134
# File 'lib/icontrol/networking/self_ip.rb', line 131

def set_netmask(opts)
  opts = check_params(opts,[:netmasks])
  super(opts)
end

#set_unit_id(opts) ⇒ Object

Sets the unit ids of this self IPs. Note: If unit ID is being set to 0, then floating state will be set to disabled by default. If unit ID is being set to 1 or 2, then floating state will be set to enabled.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :unit_ids (long)

    The unit ids of the specified self IPs .

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.



146
147
148
149
# File 'lib/icontrol/networking/self_ip.rb', line 146

def set_unit_id(opts)
  opts = check_params(opts,[:unit_ids])
  super(opts)
end

#set_vlan(opts) ⇒ Object

Sets the VLANs with which this self IPs are associated.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :vlan_names (String)

    The 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.



159
160
161
162
# File 'lib/icontrol/networking/self_ip.rb', line 159

def set_vlan(opts)
  opts = check_params(opts,[:vlan_names])
  super(opts)
end

#unit_idlong

Gets the unit ids of this self IPs.

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.



85
86
87
# File 'lib/icontrol/networking/self_ip.rb', line 85

def unit_id
  super
end

#versionString

Gets the version information for this interface.

Returns:

  • (String)


93
94
95
# File 'lib/icontrol/networking/self_ip.rb', line 93

def version
  super
end

#vlanString

Gets the VLANs with which this self IPs are associated.

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.



104
105
106
# File 'lib/icontrol/networking/self_ip.rb', line 104

def vlan
  super
end