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

#add_zone_file(opts) ⇒ Object

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.

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)
  opts = check_params(opts,[:zone_records,:src_file_names,:sync_ptrs])
  super(opts)
end

#add_zone_optionObject

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

#add_zone_text(opts) ⇒ Object

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

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)
  opts = check_params(opts,[:zone_records,:text,:sync_ptrs])
  super(opts)
end

#delete_zone(opts) ⇒ Object

Deletes this Zones in this views.

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

#delete_zone_optionObject

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

#set_zone_optionObject

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

#transfer_zone(opts) ⇒ Object

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 )

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)
  opts = check_params(opts,[:server_names,:src_zone_names,:dst_view_names,:zone_records])
  super(opts)
end

#versionString

Gets the version information for this interface.



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

def version
  super
end

#zone(opts) ⇒ ZoneInfo

Gets the ZoneInfo structs for this zone in this views.

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.



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

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

#zone_exist(opts) ⇒ boolean

Tests whether this zone exists

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.



146
147
148
149
# File 'lib/icontrol/management/zone.rb', line 146

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

#zone_name(opts) ⇒ ViewZone

Gets the list of zone names for this views.

Options Hash (opts):

  • :view_names (String)

    The names of the views.

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