Class: IControl::Management::Named

Inherits:
Base
  • Object
show all
Defined in:
lib/icontrol/management/named.rb,
lib/icontrol/management.rb

Overview

The Named interface provides the calls to manipulate the named.conf and the named server

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

#bind_versionString

Get the version of bind (named) running on the server as a string

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.



112
113
114
# File 'lib/icontrol/management/named.rb', line 112

def bind_version
  super
end

#delete_acl_statement(opts) ⇒ Object

Deletes the "acl“ statement specified by the statement names.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :statement_names (String)

    The names of the acl Statements

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/management/named.rb', line 17

def delete_acl_statement(opts)
  opts = check_params(opts,[:statement_names])
  super(opts)
end

#delete_controls_statementObject

Deletes the "controls“ statement. There can only be one "controls” statement in the file.

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.



29
30
31
# File 'lib/icontrol/management/named.rb', line 29

def delete_controls_statement
  super
end

#delete_include_statement(opts) ⇒ Object

Deletes the "include“ statement.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :path_names (String)

    The path_names for the include files

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
44
# File 'lib/icontrol/management/named.rb', line 41

def delete_include_statement(opts)
  opts = check_params(opts,[:path_names])
  super(opts)
end

#delete_key_statement(opts) ⇒ Object

Deletes this "key“ statement.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :statement_names (String)

    The names of the statements to delete

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
57
# File 'lib/icontrol/management/named.rb', line 54

def delete_key_statement(opts)
  opts = check_params(opts,[:statement_names])
  super(opts)
end

#delete_logging_statementObject

Deletes an "logging“ statement. There can only be one "logging” statement in the file.

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.



66
67
68
# File 'lib/icontrol/management/named.rb', line 66

def delete_logging_statement
  super
end

#delete_options_statementObject

Deletes the "options“ statement. There can only be one "options” statement in the file.

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.



77
78
79
# File 'lib/icontrol/management/named.rb', line 77

def delete_options_statement
  super
end

#delete_server_statement(opts) ⇒ Object

Deletes the "server“ statement.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :statement_names (String)

    The statements to delete.

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.



89
90
91
92
# File 'lib/icontrol/management/named.rb', line 89

def delete_server_statement(opts)
  opts = check_params(opts,[:statement_names])
  super(opts)
end

#delete_trusted_keys_statementObject

Deletes an "trusted_keys“ statement. There can only be one "trusted_keys” statement in the file.

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.



101
102
103
# File 'lib/icontrol/management/named.rb', line 101

def delete_trusted_keys_statement
  super
end

#named_configuration_fileString

Gets the entire contents of the named.conf file in a sequence of strings, one per line.

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.



124
125
126
# File 'lib/icontrol/management/named.rb', line 124

def named_configuration_file
  super
end

#set_acl_statementObject

Adds the new "acl name“ statement if they do not already exist. If the "acl name” statement already exists, it will delete the existing statement and replace it with this one.

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.



144
145
146
# File 'lib/icontrol/management/named.rb', line 144

def set_acl_statement
  super
end

#set_controls_statement(opts) ⇒ Object

Sets the "controls“ statement. If there is no existing controls statement, one is added. If one exists, it is deleted and replaced with this new one. There can only be one "controls” statement in the file.

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.



158
159
160
161
# File 'lib/icontrol/management/named.rb', line 158

def set_controls_statement(opts)
  opts = check_params(opts,[:statement])
  super(opts)
end

#set_include_statementObject

Adds this "include“ statement

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.



169
170
171
# File 'lib/icontrol/management/named.rb', line 169

def set_include_statement
  super
end

#set_key_statementObject

Sets the "key“ statement. If a key statement with this name already exists, it is deleted and the new one is added. Otherwise the key statement will be added.

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.



180
181
182
# File 'lib/icontrol/management/named.rb', line 180

def set_key_statement
  super
end

#set_logging_statement(opts) ⇒ Object

Sets a new "logging“ statement. If the logging statement exists, it is deleted and replaced with the new statement. If there is no logging statement, this one is added. There can only be one "logging” statement in the file.

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.



194
195
196
197
# File 'lib/icontrol/management/named.rb', line 194

def set_logging_statement(opts)
  opts = check_params(opts,[:statement])
  super(opts)
end

#set_options_statement(opts) ⇒ Object

If there is an existing "options“ statement, it is replaced with this statement. If there is no existing "options” statement, this new one is added. There can only be one "options“ statement in the file.

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.



209
210
211
212
# File 'lib/icontrol/management/named.rb', line 209

def set_options_statement(opts)
  opts = check_params(opts,[:statement])
  super(opts)
end

#set_server_statementObject

Adds the new "server“ statement if they do not exist. If they exist, these statement will replace them.

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.



221
222
223
# File 'lib/icontrol/management/named.rb', line 221

def set_server_statement
  super
end

#set_trusted_keys_statement(opts) ⇒ Object

Adds a new "trusted-keys“ statement or replaces the existing one. There can only be one "trusted_keys” statement in the file.

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.



234
235
236
237
# File 'lib/icontrol/management/named.rb', line 234

def set_trusted_keys_statement(opts)
  opts = check_params(opts,[:statement])
  super(opts)
end

#versionString

Gets the version information for this interface.

Returns:

  • (String)


132
133
134
# File 'lib/icontrol/management/named.rb', line 132

def version
  super
end