NAME
Lim::Plugin::DNS - DNS Manager plugin for Lim
VERSION
Version 0.11
SYNOPSIS
use Lim::Plugin::DNS;
# Create a Server object
$server = Lim::Plugin::DNS->Server;
# Create a Client object
$client = Lim::Plugin::DNS->Client;
# Create a CLI object
$cli = Lim::Plugin::DNS->CLI;
DESCRIPTION
This plugin manage generic DNS related information like zone files via Lim. It does not manage DNS software specific information.
METHODS
- $plugin_name = Lim::Plugin::DNS->Name
-
Returns the plugin's name.
- $plugin_description = Lim::Plugin::DNS->Description
-
Returns the plugin's description.
- $call_hash_ref = Lim::Plugin::DNS->Calls
-
Returns a hash reference to the calls that can be made to this plugin, used both in Server and Client to verify input and output arguments.
See CALLS for list of calls and arguments.
- $command_hash_ref = Lim::Plugin::DNS->Commands
-
Returns a hash reference to the CLI commands that can be made by this plugin.
See COMMANDS for list of commands and arguments.
CALLS
See Lim::Component::Client on how calls and callback functions should be used.
- $client->ReadZones(sub { my ($call, $response) = @_; })
-
Get a list of all zones that can be managed by the plugin.
$response = { zone => # (optional) Single hash or an array of hashes as below: { file => 'string', # Full path to zone file software => 'string', # Software related to the zone file (optional) read => 'bool', # True if file can be read, otherwise false write => 'bool', # True if file can be written to, otherwise false } };
- $client->CreateZone($input, sub { my ($call) = @_; })
-
Create a new zone file, returns an error if it failed to create the zone file otherwise there is no response.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) # Zone file data is created by option and rr or by a single content option => # (optional) Single hash or an array of hashes as below: { name => 'string', # Name of option (without $) value => 'string' # Value of option }, rr => # (optional) Single hash or an array of hashes as below: { name => 'string', # Name of RR ttl => 'string', # TTL of RR (optional) class => 'string', # Class of RR (optional) type => 'string', # Type of RR rdata => 'string', # Rdata of RR # If you wish to add more RR to the same name you can specify more rr # inside the rr. rr => # (optional) Single hash or an array of hashes as below: { ttl => 'string', # TTL of RR (optional) class => 'string', # Class of RR (optional) type => 'string', # Type of RR rdata => 'string', # Rdata of RR } }, content => 'string' # Content of zone file (optional) } };
- $client->ReadZone($input, sub { my ($call, $response) = @_; })
-
Returns a zone file as a content or split into option and rr.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) as_content => 'bool' # Specify that content should be returned (optional) } }; $response = { zone => # (optional) Single hash or an array of hashes as below: { file => 'string', # Full path to zone file software => 'string', # Software related to the zone file (optional) option => # (optional) Single hash or an array of hashes as below: { name => 'string', # Name of option (without $) value => 'string' # Value of option }, rr => # (optional) Single hash or an array of hashes as below: { name => 'string', # Name of RR ttl => 'string', # TTL of RR (optional) class => 'string', # Class of RR (optional) type => 'string', # Type of RR rdata => 'string', # Rdata of RR }, content => 'string' # Content of zone file (optional) } };
- $client->UpdateZone($input, sub { my ($call) = @_; })
-
Update a zone file, this overwrites all zone data. Returns an error if it failed to update the zone file otherwise there is no reponse.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) # Zone file data is created by option and rr or by a single content option => # (optional) Single hash or an array of hashes as below: { name => 'string', # Name of option (without $) value => 'string' # Value of option }, rr => # (optional) Single hash or an array of hashes as below: { name => 'string', # Name of RR ttl => 'string', # TTL of RR (optional) class => 'string', # Class of RR (optional) type => 'string', # Type of RR rdata => 'string', # Rdata of RR # If you wish to add more RR to the same name you can specify more rr # inside the rr. rr => # (optional) Single hash or an array of hashes as below: { ttl => 'string', # TTL of RR (optional) class => 'string', # Class of RR (optional) type => 'string', # Type of RR rdata => 'string', # Rdata of RR } }, content => 'string' # Content of zone file (optional) } };
- $client->DeleteZone($input, sub { my ($call) = @_; })
-
Delete a zone file, returns an error if it failed to delete the zone file otherwise there is no reponse.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) } };
- $client->CreateZoneOption($input, sub { my ($call) = @_; })
-
Create a new zone option, returns an error if it failed to create the zone option otherwise there is no reponse.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) option => # Single hash or an array of hashes as below: { name => 'string', # Name of option (without $) value => 'string' # Value of option } } };
- $client->ReadZoneOption($input, sub { my ($call, $response) = @_; })
-
Return zone options specified or all zone options for a zone file.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) option => # (optional) Single hash or an array of hashes as below: { name => 'string' # Name of option (without $) } } }; $response = { zone => # (optional) Single hash or an array of hashes as below: { file => 'string', # Full path to zone file software => 'string', # Software related to the zone file (optional) option => # (optional) Single hash or an array of hashes as below: { name => 'string', # Name of option (without $) value => 'string' # Value of option } } };
- $client->UpdateZoneOption($input, sub { my ($call) = @_; })
-
Update a zone option, this does not overwrite other zone options. Returns an error if it failed to update the zone options otherwise there is no reponse.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) option => # Single hash or an array of hashes as below: { name => 'string', # Name of option (without $) value => 'string' # Value of option } } };
- $client->DeleteZoneOption($input, sub { my ($call) = @_; })
-
Delete a zone options, returns an error if it failed to delete the zone options otherwise there is no reponse.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) option => # Single hash or an array of hashes as below: { name => 'string' # Name of option (without $) } } };
- $client->CreateZoneRr($input, sub { my ($call) = @_; })
-
Create a new zone resource record, returns an error if it failed to create the zone resource record otherwise there is no reponse.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) rr => # Single hash or an array of hashes as below: { name => 'string', # Name of RR ttl => 'string', # TTL of RR (optional) class => 'string', # Class of RR (optional) type => 'string', # Type of RR rdata => 'string', # Rdata of RR # If you wish to add more RR to the same name you can specify more rr # inside the rr. rr => # (optional) Single hash or an array of hashes as below: { ttl => 'string', # TTL of RR (optional) class => 'string', # Class of RR (optional) type => 'string', # Type of RR rdata => 'string', # Rdata of RR } } } };
- $client->ReadZoneRr($input, sub { my ($call, $response) = @_; })
-
Return zone resource records specified or all zone resource records for a zone file.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) rr => # (optional) Single hash or an array of hashes as below: { name => 'string' # Name of RR } } }; $response = { zone => # (optional) Single hash or an array of hashes as below: { file => 'string', # Full path to zone file software => 'string', # Software related to the zone file (optional) rr => # (optional) Single hash or an array of hashes as below: { name => 'string', # Name of RR ttl => 'string', # TTL of RR (optional) class => 'string', # Class of RR (optional) type => 'string', # Type of RR rdata => 'string', # Rdata of RR } } };
- $client->UpdateZoneRr($input, sub { my ($call) = @_; })
-
Update a zone resource record, this does not remove other zone resource records. Returns an error if it failed to update the zone resource record otherwise there is no reponse.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) rr => # Single hash or an array of hashes as below: { name => 'string', # Name of RR ttl => 'string', # TTL of RR (optional) class => 'string', # Class of RR (optional) type => 'string', # Type of RR rdata => 'string', # Rdata of RR # If you wish to add more RR to the same name you can specify more rr # inside the rr. rr => # (optional) Single hash or an array of hashes as below: { ttl => 'string', # TTL of RR (optional) class => 'string', # Class of RR (optional) type => 'string', # Type of RR rdata => 'string', # Rdata of RR } } } };
- $client->DeleteZoneRr($input, sub { my ($call) = @_; })
-
Delete a zone resource records, returns an error if it failed to delete the zone resource record otherwise there is no reponse.
$input = { zone => # Single hash or an array of hashes as below: { file => 'string', # Full path to zone file or relative path when used # with software software => 'string', # Software to create zone file in, must be used if # file is relative path (optional) rr => # Single hash or an array of hashes as below: { name => 'string' # Name of RR } } };
COMMANDS
- zones
-
List existing zones and related software.
- zone create [--software <software>] <zone name> <local zone file>
-
Create a new zone with the content of a local zone file.
- zone read [--software <software>] <zone names ... >
-
Read zones and display content.
- zone update [--software <software>] <zone name> <local zone file>
-
Update a existing zone with the content of a local zone file.
- zone delete [--software <software>] <zone name>
-
Delete the specified zone.
- option create [--software <software>] <zone name> <option name> <option values ... >
-
Create a new zone option in the an existing zone.
- option read [--software <software>] <zone name> [option name]
-
Read and display the specified option, or all if not given, from the zone.
- option update [--software <software>] <zone name> <option name> <option values ... >
-
Update an existing option in a zone.
- option delete [--software <software>] <zone name> <option name>
-
Delete the specified option from a zone.
- rr create [--software <software>] [--ttl <ttl>] [--class <class>] <zone name> <rr name> <rr type> <rr data ... >
-
Create a new resource record in an existing zone.
- rr read [--software <software>] <zone name> [rr name]
-
Read and display the specified resource record, or all if not given, from the zone.
- rr update [--software <software>] [--ttl <ttl>] [--class <class>] <zone name> <rr name> <rr type> <rr data ... >
-
Update an existing resource record in a zone.
- rr delete [--software <software>] <zone name> <rr name>
-
Delete the specified resource record from a zone.
AUTHOR
Jerry Lundström, <lundstrom.jerry at gmail.com>
BUGS
Please report any bugs or feature requests to https://github.com/jelu/lim-plugin-dns/issues.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Lim::Plugin::DNS
You can also look for information at:
Lim issue tracker (report bugs here)
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2012-2013 Jerry Lundström.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.