NAME
Illumos::SMF - SMF control object
SYNOPSIS
use Illumos::SMF;
...
my $smf = Illumos::SMF->new(zonesupport => 1, debug => 0);
...
DESCRIPTION
object to manage SMF
ATTRIBUTES
zonesupport
if enabled, SMF can handle FMRI in zones (requires Illumos::Zones
)
debug
print debug information to STDERR
METHODS
refreshFMRI
refreshs the instance
$smf->refreshFMRI();
listFMRI
lists all child entities of a FMRI. lists instances only if 'instancesonly' is set.
$smf->listFMRI($fmri, { zonename => $zone, instancesonly => 1 });
$smf->listFMRI($fmri, { instancesonly => 1 });
fmriExists
checks if the FMRI exists
$smf->fmriExists($fmri, { zonename => $zone });
$smf->fmriExists($fmri);
fmriState
returns the state of the FMRI
$smf->fmriState($fmri, { zonename => $zone });
$smf->fmriState($fmri);
fmriOnline
checks if the FRMI is online
$smf->fmriOnline($fmri, { zonename => $zone });
$smf->fmriOnline($fmri);
enable
enables the FMRI
$smf->enable($fmri, { zonename => $zone });
$smf->enable($fmri);
disable
disables the FMRI
$smf->disable($fmri, { zonename => $zone });
$smf->disable($fmri);
restart
restarts the FMRI
$smf->restart($fmri, { zonename => $zone });
$smf->restart($fmri);
addFMRI
adds an FMRI to SFM
$smf->addFMRI($fmri, { zonename => $zone });
$smf->addFMRI($fmri);
deleteFMRI
removes an FMRI from SMF
$smf->deleteFMRI($fmri, { zonename => $zone });
$smf->deleteFMRI($fmri);
addInstance
adds an instance to an existing FMRI
$smf->addInstance($fmri, $instance, { zonename => $zone });
$smf->addInstance($fmri, $instance);
getPropertyGroups
returns a list of property groups
$smf->getPropertyGroups($fmri, { zonename => $zone });
$smf->addInstance($fmri);
propertyExists
returns whether a property exists or not
$smf->propertyExists($fmri, $prop, { zonename => $zone });
$smf->propertyExists($fmri, $prop);
propertyGroupExists
returns whether a property group exists or not
$smf->propertyGroupExists($fmri, $pg, { zonename => $zone });
$smf->propertyGroupExists($fmri, $pg);
addPropertyGroup
adds a property group to a FMRI. $type
defaults to 'application' if not given.
$smf->addPropertyGroup($fmri, $pg, $type, { zonename => $zone });
$smf->addPropertyGroup($fmri, $pg, $type);
deletePropertyGroup
deletes a property group from a FMRI
$smf->deletePropertyGroup($fmri, $pg, { zonename => $zone });
$smf->deletePropertyGroup($fmri, $pg);
setProperty
sets a property of a FMRI. $type
is guessed if not given.
$smf->setProperty($fmri, $prop, $value, $type, { zonename => $zone });
$smf->setProperty($fmri, $prop, $value, $type);
setProperties
sets a set of properties of a property group of a FMRI
$smf->setProperties($fmri, { %props }, { zonename => $zone });
$smf->setProperties($fmri, { %props }, $type);
getProperties
gets the set of properties of a property group of a FMRI
$smf->getProperties($fmri, $pg, { zonename => $zone });
$smf->getProperties($fmri, $pg, $type);
setFMRIProperties
sets all properties of a FMRI
$smf->setFMRIProperties($fmri, { %props }, { zonename => $zone });
$smf->setFMRIProperties($fmri, { %props });
getFMRIProperties
gets all properties of a FMRI
$smf->getFMRIProperties($fmri, { zonename => $zone });
$smf->getFMRIProperties($fmri);
COPYRIGHT
Copyright (c) 2015 by OETIKER+PARTNER AG. All rights reserved.
LICENSE
This program 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 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
AUTHOR
Dominik Hassler <hadfl@cpan.org>, Tobias Oetiker <tobi@oetiker.ch>
HISTORY
2015-05-07 had Initial Version