Backup::Datto::Device - A class representing a physical Datto appliance.
This document describes Datto version 0.1.1. It is designed to be used by the DattoCollection class, and as a result, most of its interface is not public.
Information about the private interface is commented inline, and minimally here.
Note that and function starting with _priv is not guaranteed to remain in future releases.
Note: This is not useful without something setting the values below. See Device.pm for more details
my $datto = new Backup::Datto::Device();
"Serial Number is " . $datto->get_serial_number(). "\n"; "Device hostname is " . $datto->get_hostname() . "\n"; "Device Model is " . $datto->get_model() . "\n"; "Free Space is " . $datto->get_free_space() . "\n"; "Used Space is " . $datto->get_used_space() . "\n"; "Device has been up for " . $datto->get_uptime() . " seconds\n"; "Internal IP is " . $datto->get_internal_ip() . "\n"; "Device last seen at " . $datto->get_last_seen() . "\n"; "Current transmit limit is " . $datto->get_tx_limit_kb() . "\n";
This module represents a physical (or virtual) Datto appliance and is an OO way to represent its properties, such as hostname, IP, agents, etc.
No arguments required. All fields are set to undef.
Returns undef if there was an error fetching the XML.
Returns the device's serial number
Returns the device's hostname
Returns the devices' model
Returns the free space (in KB) on the device
Returns the used space (in KB) on the device
Returns the uptime (in seconds) of the device
Returns the internal IP as a string.
Returns the last time the device was seen, as a date string
For example, this would return "2014-07-31 22:05:04"
Returns the current offsite transmit limit in KB
All other functions in this module start with _priv and are designed to be use within the module itself. They are documented inline, but not part of the public interface. They are not guaranteed to remain in future releases. The public functions are guaranteed to remain.
Backup::Datto::Device requires no configuration files or environment variables.
This module assumes EST time. Future versions will handle devices in multiple time zones
This module does not handle NAS Shares at this time.
There is very little error checking since this module is intended to be used within the DattoCollection module.
Matthew Topper, topperm9@gmail.com
Copyright (C), Matthew Topper. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
To install Backup::Datto::Agent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Backup::Datto::Agent
CPAN shell
perl -MCPAN -e shell install Backup::Datto::Agent
For more information on module installation, please visit the detailed CPAN module installation guide.