NetApp...gregate(3pm)
โจ NetApp::Aggregate โ the perl manual page but make it cute โจ
okay bestie, welcome to NetApp...gregate(3pm) from the User Contributed Perl Documentation โจ it's giving very "I manage NetApp filer aggregates for a living and I'm also fun at parties". let's get into it ๐
๐ธ NAME ๐ธ
NetApp::Aggregate โ it's an OO class, and its whole job is creating and managing NetApp filer aggregates. that's it. that's the girl. ๐
๐ฆ SYNOPSIS ๐ฆ
here's the vibe, literally copy-paste core:
use NetApp::Filer;
use NetApp::Aggregate;
my $filer = NetApp::Filer->new({ .... });
my @aggregate_names = $filer->get_aggregate_names;
my @aggregates = $filer->get_aggregates;
my $aggregate = $filer->get_aggregate( 'aggr01' );
look at that. gorgeous. no notes. ๐
๐ DESCRIPTION ๐
so this class wraps up a single NetApp filer aggregate (one. just one. main character energy only) and gives you methods to:
- query info about the aggregate itself
- query info about its sub-objects (eg. volumes, iykyk)
- manage the aggregate itself
that's the whole thing bestie, it's honestly so tidy ๐
๐ซถ INSTANCE METHODS ๐ซถ
โญ General Instance Methods โญ
get_filerโ hands you theNetApp::Filerobject for the filer that this aggregate lives on. it's the aggregate's home address basically ๐get_nameโ returns the name of the aggregate, as a string. simple. iconic.get_states,get_statuses,get_optionsโ each one of these gives you back a list of strings, and each string is a single state, status, or option for the aggregate. so like, one string per thing, in a list. ๐ซ
NOTE: to all you English grammar pluralization rules fanatics out there โ give up trying to convince the author to call that one methodget_stati. it'sget_statuses. periodt. ๐
get_state( $state ),get_status( $status ),get_option( $option )โ each of these returns the value for the state / status / option you asked for. and here's the cute part: if that particular key wasn't present, it returnsundef. which means you can tell the difference between a key that literally doesn't exist and a key that exists but has a false value. slay, honestly ๐ฅget_plexโ returns theNetApp::Aggregate::Plexobject for the plex the aggregate lives on. yes, plex. no, we're not elaborating. ๐ฆ
๐ Volume Specific Methods ๐
get_volume_namesโ returns a list of the volume names that live inside this aggregate. just names. ๐get_volumesโ returns a list ofNetApp::Volumeobjects, and each one represents one of the volumes in the aggregate. the full objects this time, not just names ๐get_volume( $name )โ returns a singleNetApp::Volumeobject for the volume you specified. but if that volume doesn't exist on the aggregate, a fatal exception is raised. so, like, know your volumes bestie ๐ญcreate_volume( %args )โ makes a flexible volume in the aggregate and returns theNetApp::Volumeobject for the brand new volume. the arguments go like this โ all values are simple strings unless noted otherwise:
$aggregate->create_volume(
# Required arguments
name => $name,
size => $size,
# Optional arguments
space => 'none' | 'file' | 'volume',
language => $language,
source_filer => $source_filer,
source_volume => $source_volume,
);
heads up: bothsource_filerandsource_volumemust be given when you're creating a flexcache volume. and thespaceandlanguagearguments may not be specified alongside thesource_filer/source_volumearguments. pick a lane, bestie ๐
destroy_volume( %args )โ destroys the volume you specify. and listen: since this API is not designed to be used interactively, the-f(force) argument is always used. be sure you really want to destroy the volume, programatically. like, sure sure. ๐ซฃ
$aggregate->destroy_volume(
# Required argument
name => $name,
);
the $name must be a string, and it must be one of the volumes in the $aggregate. no random names, no ghost volumes, we don't do that here โจ
๐ง Qtree Specific Methods ๐ง
get_qtree_namesโ returns a list of strings, and each string is the name of a qtree on the aggregate. ๐ธget_qtreesโ returns a list ofNetApp::Qtreeobjects, each one representing a single qtree on the aggregate. ๐get_qtree( $name )โ returns a singleNetApp::Qtreeobject for the qtree name you gave. the name has to be in the form of a pathname, for example:
/vol/volume_name/qtree_name
also: the qtree_name is optional if you're querying the object for a volume's qtree. and this method simply returns nothing if the specified qtree doesn't exist on the aggregate. no drama, just silence ๐
๐ Snapshot Specific Methods ๐
get_snapshotsโ returns a list ofNetApp::Snapshotobjects, one for each of the aggregate's snapshots. ๐ธget_snapshot( $name )โ returns a singleNetApp::Snapshotobject matching the name you gave, if it exists for the aggregate. ๐ฆcreate_snapshot( $name )โ creates a snapshot of the aggregate with the name you specified. โจdelete_snapshot( $name )โ deletes a snapshot of the aggregate with the name you specified. bye bestie ๐get_snapshot_deltasโ returns a list ofNetApp::Snapshot::Deltaobjects, one for each snapshot delta for the aggregate. ๐get_snapshot_reservedโ returns a string representing the amount of reserved space, as a percentage. and this string does NOT include the%sign. it's just the number, bestie, do not add the percent ๐ซset_snapshot_reserved( $percentage )โ sets the snapshot reserved space to the percentage you specify, which should also NOT include the%sign. same energy, opposite direction ๐get_snapshot_scheduleโ returns aNetApp::Snapshot::Scheduleobject representing the snapshot schedule for the aggregate. ๐๏ธset_snapshot_schedule( %args )โ sets the snapshot schedule for the aggregate based on the args you pass. the syntax is:
$aggregate->set_snapshot_schedule(
weekly => $weekly,
daily => $daily,
hourly => $hourly,
hourlist => [
$hour1, $hour2, $hour3, ....
],
);
๐ฎ TO BE IMPLEMENTED ๐ฎ
NOTE: currently, all of the following methods have yet to be implemented, but they will be soon. this documentation is serving as a guideline for how to implement the perl API for each associated CLI function. so like, manifesting โจ
๐ NetApp::Aggregate->create( ... )
my $aggregate = NetApp::Aggregate->create(
# Required arguments
filer => $filer, # NetApp::Filer object
name => $aggregate_name,
# Required but mutually exclusive arguments
# Either 'disks' OR 'diskcount and/or disksize'
disks => [
[ $disk1, $disk2, .... ],
[ $diskn, $diskn+1, .... ],
],
diskcount => $diskcount,
disksize => $disksize,
# Optional arguments
raidtype => 'raid0' | 'raid4' | 'raid-dp',
raidsize => $raidsize,
disktype => 'ATA' | 'FCAL' | 'LUN' | 'SAS' | 'SATA' | 'SCSI',
rpm => $rpm,
mirrored => $boolean,
);
note the mutual exclusivity bestie โ it's either disks OR diskcount and/or disksize. not both. we don't do both ๐ซ
๐ธ $aggregate->add( ... )
$aggregate->add(
# Required arguments
name => $aggregate_name,
# Required but mutually exclusive arguments
# Either 'disks' OR 'diskcount and/or disksize'
disks => [
[ $disk1, $disk2, .... ],
[ $diskn, $diskn+1, .... ],
],
diskcount => $diskcount,
disksize => $disksize,
# Optional arguments
raidgroup => $raidgroup,
force => 1,
);
same mutually exclusive situation up top โ disks or diskcount and/or disksize, choose one โจ
๐ $aggregate->destroy()
NOTE: this always uses the -force option, since this API is not interactive. no take-backs, no confirmation prompt, just vibes and consequences ๐ญ
๐ $aggregate->offline()
$aggregate->offline(
# Optional arguments
cifsdelaytime => $cifsdelaytime,
);
โญ $aggregate->online()
NOTE: it is unclear whether or not we should always imply-f(force => 1), or whether we should treat the prompted scenario as an error and raise an exception. and since forcing an aggregate online can result in data loss when-fis used, perhaps we should force that state to be cleaned up first. so likeโฆ unresolved. thinking about it. ๐ซ
๐ฆ $aggregate->rename( $newname )
that's the whole signature. it renames. with a new name. $newname. cute ๐
๐ $aggregate->restrict( ... )
$aggregate->restrict(
# Optional arguments
cifsdelaytime => $cifsdelaytime,
);
and that's the whole page bestie!! ๐ซถ this was NetApp...gregate(3pm) from the User Contributed Perl Documentation, perl v5.36.0, dated 2022-11-19. go forth and manage those aggregates responsibly, mwah ๐
โจ๐
๐ฆ where this page comes from
- debian bookworm: libnetapp-perl 500.002-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnetapp-perl 500.002-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnetapp-perl 500.002-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnetapp-perl 500.002-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnetapp-perl 500.002-3 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms