NAME
WebService::IdoitAPI::Layer3Net - handle layer 3 networks
VERSION
version 0.4.4
SYNOPSIS
use WebService::IdoitAPI::Layer3Net;
my $api = WebService::IdoitAPI->new( $config );
my $fields = {
network = "$addr_with_or_without_suffix",
title = $title,
description = $description,
};
my $id = WebService::IdoitAPI::Layer3Net::create( $api, $fields );
my $nets = WebService::IdoitAPI::Layer3Net::list( $api );
for my $net ( @$nets ) {
# do something with $net
}
DESCRIPTION
INTERFACE
Functions
create( $api, $fields )
my $api = WebService::IdoitAPI->new( $config );
my $fields = {
network = "$addr_with_or_without_suffix",
title = $title,
description = $description,
};
my $id = WebService::IdoitAPI::Layer3Net::create( $api, $fields );
This function creates a network object within i-doit according to the given field values.
If $fields->{network}
is given without slash (/
) and suffix, the network is created as host network and a suffix of 32
or 128
is added.
If $fields->{title}
is missing or empty, the title is set to $fields->{network}
.
If $fields->{description}
is missing or empty, it is set to the empty string.
list( $api )
my $api = WebService::IdoitAPI->new( $config );
my $nets = WebService::IdoitAPI::Layer3Net::list( $api );
for my $net ( @$nets ) {
# do something
}
This function returns an array containing all networks known by i-doit. Every item in this array has the following structure:
{
id => $id,
address => $address,
cidr_suffix => $suffix,
gateway => $gateway_addr,
gateway_id => $gw_id,
}
$id
can be used to retrieve details from i-doit about the network in question. $address
is the network address, and $suffix
is the CIDR suffix of the network. $gateway
is the address of the gateway or the empty string, $gateway_id
is the id of the object acting as gateway or the empty string.
DIAGNOSTICS
%s(): client error: %s"
-
There was a problem while trying to access i-doit from the function given at the start of the line. Look at the status line after
client error:
for details. %s(): server error: %i: %s
-
The i-doit server returned an error message after a request was made from the function given at the start of the line. Look in the i-doit documentation for the error code and the message after
server error:
for details.
CONFIGURATION AND ENVIRONMENT
WebService::IdoitAPI::Layer3Net itself requires no configuration files or environment variables.
DEPENDENCIES
None.
INCOMPATIBILITIES
None reported.
BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to bug-app-new@rt.cpan.org
, or through the web interface at http://rt.cpan.org.
AUTHOR
Mathias Weidner <mamawe@cpan.org>
LICENCE AND COPYRIGHT
Copyright (c) 123, Mathias Weidner <mamawe@cpan.org>
. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.