Class: IControl::Management::Zone

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

Overview

The Zone interface enables the user to perform "zone" operations on a dns database

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_zone_file(opts)

Adds the Zones in this views, using the file names specified as the contents of the zone files. Files must be local to target machine.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :zone_records (IControl::Management::ZoneInfo)

    The ZoneInfo struct containing information about the zone to be added

  • :src_file_names (String)

    The files containing the zone's resource records.

  • :sync_ptrs (boolean)

    A list containing sequences of states indicating whether PTR records should automatically be generated.

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/management/zone.rb', line 20

def add_zone_file(opts)
  check_params(opts,[:zone_records,:src_file_names,:sync_ptrs])
  super
end

- (Object) add_zone_option

Adds new options to this zone.

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/management/zone.rb', line 31

def add_zone_option
  super
end

- (Object) add_zone_text(opts)

Adds the Zones in this views, using the texts specified as the contents of the zone files.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :zone_records (IControl::Management::ZoneInfo)

    The ZoneInfo structs containing information about the zones to be added.

  • :text (String[])

    The list of sequence of strings containing the resource records to create in the zones (SOA, NS, etc)

  • :sync_ptrs (boolean)

    A list containing sequences of states indicating whether PTR records should automatically be generated.

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.



46
47
48
49
# File 'lib/icontrol/management/zone.rb', line 46

def add_zone_text(opts)
  check_params(opts,[:zone_records,:text,:sync_ptrs])
  super
end

- (Object) delete_zone(opts)

Deletes this Zones in this views.

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.



59
60
61
62
# File 'lib/icontrol/management/zone.rb', line 59

def delete_zone(opts)
  check_params(opts,[:view_zones])
  super
end

- (Object) delete_zone_option

Deletes existing options of this zone

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.



70
71
72
# File 'lib/icontrol/management/zone.rb', line 70

def delete_zone_option
  super
end

- (Object) set_zone_option

Sets existing options of this zone to new values.

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.



116
117
118
# File 'lib/icontrol/management/zone.rb', line 116

def set_zone_option
  super
end

- (Object) transfer_zone(opts)

Transfers the Zones from this remote named servers, creating them on the local zrd server, using this views and zone info (type, file name, etc )

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :server_names (String)

    The names of the servers to request the zones from.

  • :src_zone_names (String)

    The names of the zones on the source servers.

  • :dst_view_names (String)

    The names of the views to add the zones to.

  • :zone_records (IControl::Management::ZoneInfo)

    The ZoneInfo structs containing information about the zones to 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.



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

def transfer_zone(opts)
  check_params(opts,[:server_names,:src_zone_names,:dst_view_names,:zone_records])
  super
end

- (String) version

Gets the version information for this interface.

Returns:

  • (String)


78
79
80
# File 'lib/icontrol/management/zone.rb', line 78

def version
  super
end

- (ZoneInfo) zone(opts)

Gets the ZoneInfo structs for this zone in this views.

Parameters:

  • opts (Hash)

Options Hash (opts):

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.



91
92
93
94
# File 'lib/icontrol/management/zone.rb', line 91

def zone(opts)
  check_params(opts,[:view_zones])
  super
end

- (boolean) zone_exist(opts)

Tests whether this zone exists

Parameters:

  • opts (Hash)

Options Hash (opts):

Returns:

  • (boolean)

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/management/zone.rb', line 146

def zone_exist(opts)
  check_params(opts,[:view_zones])
  super
end

- (ViewZone) zone_name(opts)

Gets the list of zone names for this views.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :view_names (String)

    The names of the views.

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.



105
106
107
108
# File 'lib/icontrol/management/zone.rb', line 105

def zone_name(opts)
  check_params(opts,[:view_names])
  super
end