NAME
NIOS - Perl binding for NIOS
VERSION
version 0.001
SYNOPSIS
# Read below for a list of options
my $n = NIOS->new(
username => "username",
password => "password",
wapi_addr => "10.0.0.1",
);
$x = $n->get(
path => 'record:a',
params => {
_paging => 1,
_max_results => 1,
_return_as_object => 1
}
);
say from_json( $x->decoded_content )->{result}[0]->{_ref};
DESCRIPTION
Perl bindings for https://www.infoblox.com/company/why-infoblox/nios-platform/
NAME
NIOS - Perl binding for NIOS
CONSTRUCTOR
new
The following attributes are required at construction time:
username
password
wapi_addr
my $n = NIOS->new(
username => "username",
password => "password",
wapi_addr => "10.0.0.1",
);
insecure
Enable or disable verifying SSL certificates when scheme
is https
.
Default: false
password
Specifies the password to use to authenticate the connection to the remote instance of NIOS.
scheme
Default: https
timeout
The amount of time before to wait before receiving a response.
Default: 10
username
Configures the username to use to authenticate the connection to the remote instance of NIOS.
wapi_addr
DNS hostname or address for connecting to the remote instance of NIOS WAPI.
wapi_version
Specifies the version of WAPI to use.
Default: v2.7
debug
Methods
All methods require a path parameter that can be either a resource type (eg: "record:a") or a WAPI Object reference.
All methods return an HTTP::Response object.
create
# Create a new A record:
my $x = $n->create(
path => "record:a",
payload => {
name => "rhds.ext.home",
ipv4addr => "10.0.0.1",
extattrs => {
"Tenant ID" => { value => "home" },
"CMP Type" => { value => "OpenStack" },
"Cloud API Owned" => { value => "True" }
}
}
);
delete
# Delete a WAPI Object Reference
$x = $n->delete(path => $object_ref);
get
# List all A records with:
# pagination
# limiting results to 1
# returning response as an object
$x = $n->get(
path => 'record:a',
params => {
_paging => 1,
_max_results => 1,
_return_as_object => 1
}
);
update
# Update a WAPI Object Reference
$x = $n->update(
path => $object_ref,
payload => {
name => "updated_name"
}
);
AUTHOR
Christian Segundo <chn2guevara [at] dont be evil^^ [.] com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2021 by Christian Segundo.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)