'\" t .\" Title: smf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 08/20/2015 .\" Manual: RAD Module Definitions .\" Source: SunOS 5.11 .\" Language: English .\" .TH "SMF" "3rad" "08/20/2015" "SunOS 5.11" "RAD Module Definitions" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" smf .SH "SYNOPSIS" .SS "interface Entity" .sp .nf string\ \&fmri\ \&; . string\ \&scope\ \&; . string\ \&service\ \&; . Dependency[]\ \&dependencies\ \&; . Manpage[]\ \&manpages\ \&; . Doclink[]\ \&doclinks\ \&; . PropertyGroup[]\ \&pgs\ \&; . Decoration[]\ \&decorations\ \&; .fi .sp .nf delete(); .fi .sp .nf deleteCust(); .fi .sp .nf createPG(string\ \&pg_name, . \ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&string\ \&pg_type, . \ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&uinteger\ \&pg_flags); .fi .sp .nf deletePG(string\ \&pg_name); .fi .sp .nf Decoration[]\ \&readPGDecorations(string\ \&pg_name); .fi .sp .nf deletePGCust(string\ \&pg_name); .fi .sp .nf Property[]\ \&readProperties(string[]\ \&pg_names); .fi .sp .nf writeProperties(PropChange[]\ \&props); .fi .sp .nf Property\ \&readProperty(string\ \&prop_name); .fi .sp .nf writeProperty(string\ \&prop_name, . \ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&PropertyType\ \&prop_type, . \ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&string[]\ \&values); .fi .sp .nf deleteProperty(string\ \&prop_name); .fi .sp .nf Decoration[]\ \&readPropertyDecorations(string\ \&prop_name); .fi .sp .nf deletePropertyCust(string\ \&prop_name); .fi .sp .nf string\ \&getCommonName(string\ \&locale); .fi .sp .nf string\ \&getDescription(string\ \&locale); .fi .sp .nf PGTemplate[]\ \&getPGTemplates(string\ \&locale); .fi .sp .nf PropTemplate[]\ \&getPropTemplates(string\ \&pg_name, . \ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&string\ \&pg_type, . \ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&string\ \&locale); .fi .SS "interface Service" .sp .nf string[]\ \&instances\ \&; .fi .SS "interface Instance" .sp .nf string\ \&instance\ \&; . string\ \&restarter\ \&; . boolean\ \&enabled\ \&; . SMFState\ \&state\ \&; . ExtendedState\ \&ex_state\ \&; . string[]\ \&snapshots\ \&; .fi .sp .nf PropertyGroup[]\ \&readSnapshotPGs(string\ \&snap_name); .fi .sp .nf Property[]\ \&readSnapshotProperties(string[]\ \&pg_names, . \ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&string\ \&snap_name); .fi .sp .nf Property\ \&readSnapshotProperty(string\ \&prop_name, . \ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&string\ \&snap_name); .fi .sp .nf clear(); .fi .sp .nf restart(); .fi .sp .nf refresh(); .fi .sp .nf maintain(boolean\ \&immediate, . \ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&\ \&boolean\ \&temporary); .fi .sp .nf enable(boolean\ \&temporary); .fi .sp .nf disable(boolean\ \&temporary); .fi .sp .nf LogInfo\ \&getLogInfo(integer\ \&max_size); .fi .SS "interface Master" .sp .nf StructService[]\ \&services\ \&; . StructInstance[]\ \&instances\ \&; .fi .SH "DESCRIPTION" .PP \fBapi com\&.oracle\&.solaris\&.rad\&.smf\fR .PP This API exposes common SMF configuration, actions, and state to \fBrad(1m)\fR clients\&. .PP Three core interfaces are provided: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} Master \- a top\-level object providing access to all services and instances on the system .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} Service \- an object that represents an SMF service .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ .sp -1 .IP " 3." 4.2 .\} Instance \- an object that represents an SMF instance .RE .PP The latter two interfaces, Service and Instance, are derived from a common Entity interface\&. .SH "INTERFACES" .SS "interface Entity" .PP functionality common to services and instances .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBEntity Properties\fR .RS 4 .PP \fBstring\fR\ \&\fBfmri\fR (\fIread\-only\fR) \(em the service/instance\'s FMRI .PP \fBstring\fR\ \&\fBscope\fR (\fIread\-only\fR) \(em the service/instance\'s scope .PP \fBstring\fR\ \&\fBservice\fR (\fIread\-only\fR) \(em the service name of the service/instance .PP \fBDependency\fR\fB[]\fR\ \&\fBdependencies\fR (\fIread\-only\fR) \(em the service/instance\'s dependencies .RS 4 .PP A list of dependency objects describing the full nature of each dependency\&. An empty list is returned if there are no dependencies\&. .RE .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .PP \fBManpage\fR\fB[]\fR\ \&\fBmanpages\fR (\fIread\-only\fR) \(em the service/instance\'s manual pages .RS 4 .PP A list of manual page objects describing the name, section, and path of each relevant manual page\&. An empty list is returned if no manual pages are defined\&. .RE .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .PP \fBDoclink\fR\fB[]\fR\ \&\fBdoclinks\fR (\fIread\-only\fR) \(em documentation links .RS 4 .PP A list of links to on\-line documentation for the service/instance\&. An empty list is returned if no on\-line documents are defined\&. .RE .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .PP \fBPropertyGroup\fR\fB[]\fR\ \&\fBpgs\fR (\fIread\-only\fR) \(em directly\-attached property groups .RS 4 .PP A list of all directly\-attached property groups, including name, type and flags for each\&. .RE .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .PP \fBDecoration\fR\fB[]\fR\ \&\fBdecorations\fR (\fIread\-only\fR) \(em list of decorations .RS 4 .PP A list of decorations associated with the service/instance\&. .RE .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBEntity Methods\fR .RS 4 .PP \fBdelete\fR() .RS 4 .PP delete the service/instance .PP Delete the service or instance\&. .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to delete the service or instance\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} EXISTS \- delete was called on a service and the service still had instances .RE .RE .RE .PP \fBdeleteCust\fR() .RS 4 .PP delete administrative customizations .PP Delete all administrative customizations applied to a service/instance and its children, if any exist\&. .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to delete the administrative customizations applied to a service or instance\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .RE .RE .PP \fBcreatePG\fR(\fBstring\fR\ \&\fIpg_name\fR, \fBstring\fR\ \&\fIpg_type\fR, \fBuinteger\fR\ \&\fIpg_flags\fR) .RS 4 .PP create a property group .PP Create a property group on the service/instance\&. .PP \fBArguments:\fR .PP \fIpg_name\fR \(em the name of the new property group .PP \fIpg_type\fR \(em the type of the new property group .PP \fIpg_flags\fR \(em the property group flags .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to create the property group\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} EXISTS \- the propery group already exists .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} BADVALUE \- an invalid property group name or type was specified .RE .RE .RE .PP \fBdeletePG\fR(\fBstring\fR\ \&\fIpg_name\fR) .RS 4 .PP delete a property group .PP Delete a directly\-attached property group and all its properties from the service/instance\&. .PP \fBArguments:\fR .PP \fIpg_name\fR \(em the name of the property group .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to delete the property group\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property group doesn\'t exist .RE .RE .RE .PP \fBDecoration\fR\fB[]\fR \fBreadPGDecorations\fR(\fBstring\fR\ \&\fIpg_name\fR) .RS 4 .PP obtain a list of decorations .PP Obtain all the decorations associated with this property group\&. .PP \fBArguments:\fR .PP \fIpg_name\fR \(em the name of the property group .PP \fBResult:\fR .PP \fBDecoration\fR\fB[]\fR \(em list of available decorations .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to read the property group decorations\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property group doesn\'t exist (see target) .RE .RE .RE .PP \fBdeletePGCust\fR(\fBstring\fR\ \&\fIpg_name\fR) .RS 4 .PP delete administrative customizations .PP Delete all administrative customizations applied to a property group and its children, if any exist\&. .PP \fBArguments:\fR .PP \fIpg_name\fR \(em the name of the property group .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to delete the administrative customizations applied to a property group\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property group doesn\'t exist .RE .RE .RE .PP \fBProperty\fR\fB[]\fR \fBreadProperties\fR(\fBstring[]\fR\ \&\fIpg_names\fR) .RS 4 .PP reads all properties in a set of directly\-attached property groups\&. .PP Read all properties in the specified directly\-attached property group\&. The name, type, and values of each property are included\&. .PP \fBArguments:\fR .PP \fIpg_names\fR (\fInullable\fR) \(em The names of the property groups\&. If this value is Null, all property groups will be read\&. .PP \fBResult:\fR .PP \fBProperty\fR\fB[]\fR \(em a list of properties in the specified directly\-attached property group .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to read properties from the property group\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property group doesn\'t exist .RE .RE .RE .PP \fBwriteProperties\fR(\fBPropChange\fR\fB[]\fR\ \&\fIprops\fR) .RS 4 .PP commit a list of property changes to a property group .PP Commit a set of property changes to the specified property group\&. Each property change specifies a property, type, and optional set of values\&. If the property specified by a property change doesn\'t exist prior to the call, it will be created by the call\&. If the property specified by a property change exists prior to the call but has a different type, its type will be set to the type specified by the call\&. .PP If the call succeeds, all the requested property changes were made\&. If the call fails, none of the requested changes were made\&. .PP \fBArguments:\fR .PP \fIprops\fR \(em the set of changes to apply .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to make all the requested property changes\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property group doesn\'t exist (see target) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} BADVALUE \- a property had an invalid name, or a value couldn\'t be converted to the requested type (see target, aux) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INVALID \- the same property was referenced by two PropertyChanges\&. .RE .PP When an invidual property is the cause of the error, its name will be returned in aux\&. .RE .RE .PP \fBProperty\fR \fBreadProperty\fR(\fBstring\fR\ \&\fIprop_name\fR) .RS 4 .PP read a single directly\-attached property\'s values .PP Read a single property from the specified directly\-attached property group\&. The result includes the name, type, and values of the property\&. .PP \fBArguments:\fR .PP \fIprop_name\fR \(em the name of the property .PP \fBResult:\fR .PP \fBProperty\fR \(em the specified property .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to read the specified property\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property or property group doesn\'t exist (see target) .RE .RE .RE .PP \fBwriteProperty\fR(\fBstring\fR\ \&\fIprop_name\fR, \fBPropertyType\fR\ \&\fIprop_type\fR, \fBstring[]\fR\ \&\fIvalues\fR) .RS 4 .PP writes a list of values to a property .PP Change the specified property\&. If the property doesn\'t exist prior to the call, it will be created by the call\&. If the property exists prior to the call but has a different type, its type will be set to the type specified by the call\&. .PP \fBArguments:\fR .PP \fIprop_name\fR \(em the name of the property .PP \fIprop_type\fR \(em the type of the property .PP \fIvalues\fR \(em the new values for the property .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to make the requested property change\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property group doesn\'t exist (see target) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} BADVALUE \- the property had an invalid name, or a value couldn\'t be converted to the requested type (see target) .RE .RE .RE .PP \fBdeleteProperty\fR(\fBstring\fR\ \&\fIprop_name\fR) .RS 4 .PP delete a property .PP Delete a property from the service/instance\&. .PP \fBArguments:\fR .PP \fIprop_name\fR \(em the name of the property .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to delete the property\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property group doesn\'t exist, or the property to be deleted doesn\'t exist (see target) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} BADVALUE \- the property had an invalid name or type (see target) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INVALID \- the property cannot be deleted while in use (see target) .RE .RE .RE .PP \fBDecoration\fR\fB[]\fR \fBreadPropertyDecorations\fR(\fBstring\fR\ \&\fIprop_name\fR) .RS 4 .PP obtain a list of decorations .PP Obtain all the decorations associated with this property\&. .PP \fBArguments:\fR .PP \fIprop_name\fR \(em the name of the property .PP \fBResult:\fR .PP \fBDecoration\fR\fB[]\fR \(em list of available decorations .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to read the property decorations\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property or property group doesn\'t exist (see target) .RE .RE .RE .PP \fBdeletePropertyCust\fR(\fBstring\fR\ \&\fIprop_name\fR) .RS 4 .PP delete administrative customizations .PP Delete all administrative customizations applied to this property\&. .PP \fBArguments:\fR .PP \fIprop_name\fR \(em the name of the property .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to delete the administrative customizations applied to this property\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property group, or property doesn\'t exist (see target) .RE .RE .RE .PP \fBstring\fR \fBgetCommonName\fR(\fBstring\fR\ \&\fIlocale\fR) .RS 4 .PP obtain the service/instance\'s localized common name .PP Obtain the localized common name for the service/instance, if one exists\&. If a common name doesn\'t exist for the specified locale, attempts to return the common name for the "C" locale instead\&. .PP \fBArguments:\fR .PP \fIlocale\fR \(em the desired locale .PP \fBResult:\fR .PP \fBstring\fR (\fInullable\fR) \(em the common name if available, or null .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP An internal error occurred\&. .RE .RE .PP \fBstring\fR \fBgetDescription\fR(\fBstring\fR\ \&\fIlocale\fR) .RS 4 .PP obtain the service/instance\'s localized description .PP Obtain the localized description for the service/instance, if one exists\&. If a description doesn\'t exist for the specified locale, attempts to return the description for the "C" locale instead\&. .PP \fBArguments:\fR .PP \fIlocale\fR \(em the desired locale .PP \fBResult:\fR .PP \fBstring\fR (\fInullable\fR) \(em the description if available, or null .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP An internal error occurred\&. .RE .RE .PP \fBPGTemplate\fR\fB[]\fR \fBgetPGTemplates\fR(\fBstring\fR\ \&\fIlocale\fR) .RS 4 .PP obtain all property group templates .PP Obtain all property group templates for this service/instance\&. If templates aren\'t provided for the specified locale, attempts to return the templates for the "C" locale instead\&. .PP \fBArguments:\fR .PP \fIlocale\fR \(em the desired locale .PP \fBResult:\fR .PP \fBPGTemplate\fR\fB[]\fR \(em all available property group templates .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP An internal error occurred\&. .RE .RE .PP \fBPropTemplate\fR\fB[]\fR \fBgetPropTemplates\fR(\fBstring\fR\ \&\fIpg_name\fR, \fBstring\fR\ \&\fIpg_type\fR, \fBstring\fR\ \&\fIlocale\fR) .RS 4 .PP obtain all property templates for a property group .PP Obtain all property templates for the specified property group of this service/instance\&. If property templates aren\'t provided for the specified locale, attempts to return the templates for the "C" locale instead\&. If no templates exist for properties of the specified property group, an empty list is returned\&. .PP \fBArguments:\fR .PP \fIpg_name\fR \(em the name of the property group .PP \fIpg_type\fR \(em the type of the property group .PP \fIlocale\fR \(em the desired locale .PP \fBResult:\fR .PP \fBPropTemplate\fR\fB[]\fR \(em all available property templates .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP An internal error occurred\&. .RE .RE .RE .SS "interface Service" .PP an SMF service object .PP \fBInheritance Hierarchy\fR. .sp .if n \{\ .RS 4 .\} .nf \&.\-> interface Entity | \fBinterface Service\fR .fi .if n \{\ .RE .\} .PP The Service interface is an Entity that represents an SMF service\&. Handles to this type of object can be retrieved from the RAD server using an object name built with: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} the "com\&.oracle\&.solaris\&.rad\&.smf" domain name .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} a key named "type" paired with a value of "Service" .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ .sp -1 .IP " 3." 4.2 .\} a key named "service" paired with the service portion of an SMF FMRI .RE .PP Object names for services can be pulled from the Services exposed by the Master\&.services property\&. Or, they can be built directly: .PP \fBExample\ \&1.\ \&Service interface (Python)\fR .sp .if n \{\ .RS 4 .\} .nf import rad\&.client as radcli import rad\&.connect as radcon import rad\&.bindings\&.com\&.oracle\&.solaris\&.rad\&.smf_1 as sbind # Create a connection con = radcon\&.connect_unix() # Retrieve a particular service service = con\&.get_object(sbind\&.Service(), radcli\&.ADRGlobPattern({"service" : "network/physical"})) # Do something with our service print "service %s has %d instances" % (service\&.fmri, len(service\&.instances)) .fi .if n \{\ .RE .\} .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBService Properties\fR .RS 4 .PP \fBstring[]\fR\ \&\fBinstances\fR (\fIread\-only\fR) \(em the list of instances of this service .RS 4 .PP The list of instances of this service\&. An empty list if the service has no instances\&. .RE .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .PP \fBInherited Properties (Entity):\fR .PP \fIfmri\fR, \fIscope\fR, \fIservice\fR, \fIdependencies\fR, \fImanpages\fR, \fIdoclinks\fR, \fIpgs\fR, \fIdecorations\fR .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBService Methods\fR .RS 4 .PP \fBInherited Methods (Entity):\fR .PP \fIdelete\fR, \fIdeleteCust\fR, \fIcreatePG\fR, \fIdeletePG\fR, \fIreadPGDecorations\fR, \fIdeletePGCust\fR, \fIreadProperties\fR, \fIwriteProperties\fR, \fIreadProperty\fR, \fIwriteProperty\fR, \fIdeleteProperty\fR, \fIreadPropertyDecorations\fR, \fIdeletePropertyCust\fR, \fIgetCommonName\fR, \fIgetDescription\fR, \fIgetPGTemplates\fR, \fIgetPropTemplates\fR .RE .SS "interface Instance" .PP an SMF instance object .PP \fBInheritance Hierarchy\fR. .sp .if n \{\ .RS 4 .\} .nf \&.\-> interface Entity | \fBinterface Instance\fR .fi .if n \{\ .RE .\} .PP The Instance interface is an Entity that represents an SMF instance\&. Handles to this type of object can be retrieved from the RAD server using an object name built with: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} the "com\&.oracle\&.solaris\&.rad\&.smf" domain name .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} a key named "type" paired with a value of "Instance" .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ .sp -1 .IP " 3." 4.2 .\} a key named "service" paired with the service portion of an SMF FMRI .RE .sp .RS 4 .ie n \{\ \h'-04' 4.\h'+01'\c .\} .el \{\ .sp -1 .IP " 4." 4.2 .\} a key named "instance" paired with the instance portion of an SMF FMRI .RE .PP Object names for instances can be pulled from the Instances exposed by the Master\&.instances property\&. Or, they can be built directly: .PP \fBExample\ \&2.\ \&Instance interface (Python)\fR .sp .if n \{\ .RS 4 .\} .nf import rad\&.client as radcli import rad\&.connect as radcon import rad\&.bindings\&.com\&.oracle\&.solaris\&.rad\&.smf_1 as sbind # Create a connection con = radcon\&.connect_unix() # Retrieve a particular service instance = con\&.get_object(sbind\&.Instance(), radcli\&.ADRGlobPattern({"service" : "network/physical", "instance" : "default"})) # Do something with our instance print "instance %s state: %s" % (instance\&.fmri, instance\&.state) .fi .if n \{\ .RE .\} .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBInstance Properties\fR .RS 4 .PP \fBstring\fR\ \&\fBinstance\fR (\fIread\-only\fR) \(em the name of the instance .PP \fBstring\fR\ \&\fBrestarter\fR (\fIread\-only\fR) \(em the fmri of the instance\'s restarter .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .PP \fBboolean\fR\ \&\fBenabled\fR (\fIread\-only\fR) \(em is the instance effectively enabled? .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .PP \fBSMFState\fR\ \&\fBstate\fR (\fIread\-only\fR) \(em the current state of the instance .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .PP \fBExtendedState\fR\ \&\fBex_state\fR (\fIread\-only\fR) \(em the extended state of the instance .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .PP \fBstring[]\fR\ \&\fBsnapshots\fR (\fIread\-only\fR) \(em a list of the instance\'s snapshots .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RS 4 .PP An internal SMF error occurred\&. .RE .RE .PP \fBInherited Properties (Entity):\fR .PP \fIfmri\fR, \fIscope\fR, \fIservice\fR, \fIdependencies\fR, \fImanpages\fR, \fIdoclinks\fR, \fIpgs\fR, \fIdecorations\fR .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBInstance Methods\fR .RS 4 .PP \fBPropertyGroup\fR\fB[]\fR \fBreadSnapshotPGs\fR(\fBstring\fR\ \&\fIsnap_name\fR) .RS 4 .PP read all property groups in the composed view of the specified snapshot .PP \fBArguments:\fR .PP \fIsnap_name\fR (\fInullable\fR) \(em the name of the snapshot, or null for the running snapshot .PP \fBResult:\fR .PP \fBPropertyGroup\fR\fB[]\fR .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to read the list of property groups\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the snapshot doesn\'t exist .RE .RE .RE .PP \fBProperty\fR\fB[]\fR \fBreadSnapshotProperties\fR(\fBstring[]\fR\ \&\fIpg_names\fR, \fBstring\fR\ \&\fIsnap_name\fR) .RS 4 .PP reads all properties in the composed view of the specified snapshot of a property group .PP \fBArguments:\fR .PP \fIpg_names\fR (\fInullable\fR) \(em the name of the property group .PP \fIsnap_name\fR (\fInullable\fR) \(em the name of the snapshot, or null for the running snapshot .PP \fBResult:\fR .PP \fBProperty\fR\fB[]\fR .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to read properties from the snapshot\'s composed view of the specified property group\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the property group or snapshot doesn\'t exist (see target) .RE .RE .RE .PP \fBProperty\fR \fBreadSnapshotProperty\fR(\fBstring\fR\ \&\fIprop_name\fR, \fBstring\fR\ \&\fIsnap_name\fR) .RS 4 .PP reads a property in the composed view of the specified snapshot .PP Reads a single property from the composed view of the specified property group\&. The result includes the name, type, and values of the property\&. .PP \fBArguments:\fR .PP \fIprop_name\fR \(em the name of the property .PP \fIsnap_name\fR (\fInullable\fR) \(em the name of the snapshot, or null for the running snapshot .PP \fBResult:\fR .PP \fBProperty\fR .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Failed to read the property\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- the snapshot, property group, or property doesn\'t exist (see target) .RE .RE .RE .PP \fBclear\fR() .RS 4 .PP clear the instance if degraded or in maintenance .PP Attempt to clear the maintenance or degraded state from the instance\&. This operation occurs asynchronously, and will return success even though the attempt could fail\&. .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Was unable to attempt clearing the instance\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} BADSTATE \- the instance wasn\'t in the maintenance or degraded state .RE .RE .RE .PP \fBrestart\fR() .RS 4 .PP restarts the instance .PP Attempt to restart the instance\&. This operation occurs asynchronously, and will return success even though the attempt could fail\&. .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Was unable to attempt restarting the instance\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .RE .RE .PP \fBrefresh\fR() .RS 4 .PP refresh the instance .PP Attempt to refresh the instance\&. This operation occurs asynchronously, and will return success even though the attempt could fail\&. .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Was unable to attempt restarting the instance\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .RE .RE .PP \fBmaintain\fR(\fBboolean\fR\ \&\fIimmediate\fR, \fBboolean\fR\ \&\fItemporary\fR) .RS 4 .PP place the instance in maintenance .PP Attempt to place the instance in maintenance\&. This operation occurs asynchronously, and will return success even though the attempt could fail\&. .PP \fBArguments:\fR .PP \fIimmediate\fR \(em skip attempting a clean shutdown .PP \fItemporary\fR \(em maintenance doesn\'t persist after reboot .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Was unable to attempt to place the instance in maintenance\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .RE .RE .PP \fBenable\fR(\fBboolean\fR\ \&\fItemporary\fR) .RS 4 .PP enable the instance .PP Enable the instance\&. This operation is idempotent; enabling an enabled instance has no effect\&. .PP \fBArguments:\fR .PP \fItemporary\fR \(em enable doesn\'t persist after reboot .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Was unable to enable the instance\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .RE .RE .PP \fBdisable\fR(\fBboolean\fR\ \&\fItemporary\fR) .RS 4 .PP disable the instance .PP Disable the instance\&. This operation is idempotent; disabling a disabled instance has no effect\&. .PP \fBArguments:\fR .PP \fItemporary\fR \(em disable doesn\'t persist after reboot .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Was unable to disable the instance\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} READONLY \- the repository is read\-only .RE .RE .RE .PP \fBLogInfo\fR \fBgetLogInfo\fR(\fBinteger\fR\ \&\fImax_size\fR) .RS 4 .PP obtain instance log file data .PP Obtain information from and about the instance\'s log file\&. Includes the name, size, modification time, and contents\&. .PP \fBArguments:\fR .PP \fImax_size\fR \(em bytes of log file content to return .PP \fBResult:\fR .PP \fBLogInfo\fR \(em the requested log file data .PP \fBError:\fR .PP \fBSmfError\fR .RS 4 .PP Was unable to obtain log data\&. Cause: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} INTERNAL \- an internal error occurred .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} DENIED \- insufficient authorization .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} NOTFOUND \- no log file found .RE .RE .RE .PP \fBInherited Methods (Entity):\fR .PP \fIdelete\fR, \fIdeleteCust\fR, \fIcreatePG\fR, \fIdeletePG\fR, \fIreadPGDecorations\fR, \fIdeletePGCust\fR, \fIreadProperties\fR, \fIwriteProperties\fR, \fIreadProperty\fR, \fIwriteProperty\fR, \fIdeleteProperty\fR, \fIreadPropertyDecorations\fR, \fIdeletePropertyCust\fR, \fIgetCommonName\fR, \fIgetDescription\fR, \fIgetPGTemplates\fR, \fIgetPropTemplates\fR .RE .SS "interface Master" .PP a top\-level object providing access to all services and instances on the system .PP The Master interface provides an iterative entrypoint into the SMF subsystem\&. Handles to this type of object can be retrieved from the RAD server using an object name built with: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} the "com\&.oracle\&.solaris\&.rad\&.smf" domain name .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} a key named "type" paired with a value of "Master" .RE .PP For example, to report the number of services in the ONLINE state: .PP \fBExample\ \&3.\ \&Master interface (Python)\fR .sp .if n \{\ .RS 4 .\} .nf import rad\&.client as radcli import rad\&.connect as radcon import rad\&.bindings\&.com\&.oracle\&.solaris\&.rad\&.smf_1 as sbind # Create a connection con = radcon\&.connect_unix() # Retrieve the Master object master = con\&.get_object(sbind\&.Master()) # Do something with the Master object print "%d service instances are online" % \e len([x for x in master\&.instances if x\&.state == sbind\&.SMFState\&.ONLINE]) .fi .if n \{\ .RE .\} .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBMaster Properties\fR .RS 4 .PP \fBStructService\fR\fB[]\fR\ \&\fBservices\fR (\fIread\-only\fR) .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RE .PP \fBStructInstance\fR\fB[]\fR\ \&\fBinstances\fR (\fIread\-only\fR) .RS 4 .PP \fBRead Error:\fR \fBSmfError\fR .RE .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBMaster Events\fR .RS 4 .PP \fBStateChange\fR\ \&\fBstatechange\fR .PP \fBAddition\fR\ \&\fBadditions\fR .PP \fBRemoval\fR\ \&\fBremovals\fR .RE .SH "ENUMERATED TYPES" .PP \fBenum DepGrouping\fR \(em indicates how dependencies are evaluated .RS 4 .PP REQUIRE_ALL (0) \(em all dependencies must be satisfied .PP REQUIRE_ANY (1) \(em only one dependency must be satisfied .PP EXCLUDE_ALL (2) \(em no dependency may be satisfied .PP OPTIONAL_ALL (3) \(em all satisfiable dependencies must be satisfied .RE .PP \fBenum DepRestart\fR \(em describes when the dependent should be restarted .RS 4 .PP ERROR (0) \(em restart when a dependency encounters an error .PP RESTART (1) \(em restart any time a dependency restarts .PP REFRESH (2) \(em restart when a dependency is refreshed .PP NONE (3) \(em only process dependencies when starting instance .RE .PP \fBenum PropertyType\fR \(em an SMF property type .RS 4 .PP UNKNOWN (0) .PP BOOLEAN (1) .PP COUNT (2) .PP INTEGER (3) .PP TIME (4) .PP ASTRING (5) .PP OPAQUE (6) .PP USTRING (100) .PP URI (200) .PP FMRI (201) .PP HOST (300) .PP HOSTNAME (301) .PP NET_ADDRESS_V4 (302) .PP NET_ADDRESS_V6 (303) .PP NET_ADDRESS (304) .RE .PP \fBenum PropertyVisibility\fR \(em the recommended visibility of a property .RS 4 .PP HIDDEN (0) \(em the property shouldn\'t be displayed .PP READONLY (1) \(em the property isn\'t intended to be modified .PP READWRITE (2) \(em the property is modifiable .RE .PP \fBenum ErrorCode\fR \(em the general cause for failure .RS 4 .PP Indicates the general cause for failure\&. Specific meanings are defined by the individual APIs\&. .RE .RS 4 .PP INTERNAL (0) \(em an internal error occurred .PP DENIED (1) \(em access denied .PP READONLY (2) \(em configuration database is read only .PP NOTFOUND (3) \(em named object wasn\'t found .PP EXISTS (4) \(em name is already in use .PP BADVALUE (5) \(em an illegal value was supplied .PP BADSTATE (6) \(em system was in an invalid state .PP INVALID (7) \(em API was called incorrectly .RE .PP \fBenum ErrorTarget\fR .RS 4 .PP NONE (0) .PP SNAPSHOT (1) .PP PROPERTYGROUP (2) .PP PROPERTY (3) .PP VALUE (4) .RE .PP \fBenum SMFState\fR \(em the state of an SMF instance .RS 4 .PP NONE (0) .PP UNINIT (1) .PP MAINT (2) .PP OFFLINE (3) .PP DISABLED (4) .PP ONLINE (5) .PP DEGRADED (6) .PP LEGACY (7) .RE .SH "STRUCTURE TYPES" .PP \fBstruct Dependency\fR \(em describes a dependency group .RS 4 .PP Fully describes a dependency group, including the FMRIs for the dependencies, the type of dependency, and when the dependency should be evaluated\&. .RE .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIname\fR \(em the name of the dependency group .PP \fBstring[]\fR\ \&\fItarget\fR \(em the list of dependencies\' FMRIs .PP \fBDepGrouping\fR\ \&\fIgrouping\fR \(em how the dependencies are evaluated .PP \fBDepRestart\fR\ \&\fIrestartOn\fR \(em when the dependent should be restarted .RE .PP \fBstruct Property\fR \(em an SMF property and its values .RS 4 .PP Describes a property, its type, and all its values\&. .RE .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIname\fR \(em the name of the property .PP \fBPropertyType\fR\ \&\fItype\fR \(em the type of the property .PP \fBstring[]\fR\ \&\fIvalues\fR \(em all the property\'s values .RS 4 .PP A list of all the values held by the property\&. A single\-valued property will have a list of length 1\&. A property with no values will have a list of length 0\&. .RE .RE .PP \fBstruct Manpage\fR \(em a description of a man page .RS 4 .PP Provides all the information needed to find a man page\&. The referenced man page can be displayed by running MANPATH=$path man \-s $section $title\&. .RE .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fItitle\fR \(em the man page name .PP \fBstring\fR\ \&\fIsection\fR \(em the section the man page is found in .PP \fBstring\fR\ \&\fIpath\fR (\fInullable\fR) \(em the path the man page is found in .RS 4 .PP The colon\-separated MANPATH the man page is found in\&. If this field has no value, the default MANPATH should to be used\&. .RE .RE .PP \fBstruct Doclink\fR \(em an on\-line documentation link .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIname\fR \(em an informative name for the document .PP \fBstring\fR\ \&\fIuri\fR \(em the URI of the document .RE .PP \fBstruct PropertyGroup\fR \(em an SMF property group .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIname\fR \(em the name of the property group .PP \fBstring\fR\ \&\fItype\fR \(em the type of the property group .PP \fBuinteger\fR\ \&\fIflags\fR \(em the property group flags .RE .PP \fBstruct PGTemplate\fR \(em template data for a property group .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIpgname\fR \(em the property group name .PP \fBstring\fR\ \&\fIpgtype\fR \(em the property group type .PP \fBboolean\fR\ \&\fIrequired\fR \(em is the property group required? .PP \fBstring\fR\ \&\fIname\fR (\fInullable\fR) \(em a localized name .PP \fBstring\fR\ \&\fIdescription\fR (\fInullable\fR) \(em a localized description .RE .PP \fBstruct PropTemplate\fR \(em template data for a property .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIpropname\fR \(em the name of the property .PP \fBPropertyType\fR\ \&\fIproptype\fR \(em the type of the property .PP \fBboolean\fR\ \&\fIrequired\fR \(em is the property required? .PP \fBstring\fR\ \&\fIname\fR (\fInullable\fR) \(em a localized name .PP \fBstring\fR\ \&\fIdescription\fR (\fInullable\fR) \(em a localized description .PP \fBstring\fR\ \&\fIunits\fR (\fInullable\fR) \(em a localized units label .PP \fBPropertyVisibility\fR\ \&\fIvisibility\fR \(em how the property should be presented .PP \fBulong\fR\ \&\fIcardinality_min\fR \(em the minimum number of values .PP \fBulong\fR\ \&\fIcardinality_max\fR \(em the maximum number of values .PP \fBstring[]\fR\ \&\fIseparators\fR (\fInullable\fR) \(em value separator characters .RS 4 .PP Separator characters used to embed multiple values in a single property value\&. .RE .RE .PP \fBstruct PropChange\fR \(em a change to make to a property .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIname\fR \(em the property to change .PP \fBPropertyType\fR\ \&\fItype\fR \(em the type of the property to write .PP \fBstring[]\fR\ \&\fIvalues\fR \(em a list of values .RE .PP \fBstruct Decoration\fR \(em an SMF entity decoration .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIlayer\fR \(em the layer associated with this decoration .PP \fBstring\fR\ \&\fIbundle\fR (\fInullable\fR) \(em the bundle associated with this decoration .PP \fBtime\fR\ \&\fImodtime\fR \(em the last modification time .PP \fBstring\fR\ \&\fItype\fR (\fInullable\fR) \(em the decoration value type .PP \fBstring[]\fR\ \&\fIvalues\fR (\fInullable\fR) \(em a list of decoration values\&. This is only valid for property decorations\&. .RE .PP \fBstruct SmfError\fR .RS 4 .PP \fBFields:\fR .PP \fBErrorCode\fR\ \&\fIerror\fR .PP \fBErrorTarget\fR\ \&\fItarget\fR .PP \fBstring\fR\ \&\fIaux\fR (\fInullable\fR) .PP \fBstring\fR\ \&\fImessage\fR (\fInullable\fR) .RE .PP \fBstruct ExtendedState\fR \(em extended instance state information .RS 4 .PP \fBFields:\fR .PP \fBSMFState\fR\ \&\fIstate\fR \(em the current state of the instance .PP \fBSMFState\fR\ \&\fInextState\fR \(em the next state of the instance .PP \fBstring\fR\ \&\fIauxstate\fR (\fInullable\fR) \(em the auxiliary state of the instance .PP \fBtime\fR\ \&\fIstime\fR \(em the time of last state change .PP \fBinteger\fR\ \&\fIcontractid\fR \(em the contract ID, or \-1 if none .PP \fBboolean\fR\ \&\fIenabled_state\fR \(em is the instance enabled or disabled? .PP \fBboolean\fR\ \&\fIenabled_temp\fR \(em is the instance enabled/disabled temporarily? .RS 4 .PP Indicates if the instance\'s enabled/disabled state is temporary\&. .RE .RE .PP \fBstruct LogInfo\fR \(em instance log data .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIname\fR \(em the log file\'s name .PP \fBinteger\fR\ \&\fIsize\fR \(em the log file\'s size .PP \fBtime\fR\ \&\fIMTime\fR \(em the log file\'s modification time .PP \fBopaque\fR\ \&\fIcontents\fR \(em log file contents .RE .PP \fBstruct StructService\fR .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIfmri\fR .PP \fBname\fR\ \&\fIobjectName\fR .PP \fBstring[]\fR\ \&\fIinstances\fR .RE .PP \fBstruct StructInstance\fR .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIfmri\fR .PP \fBname\fR\ \&\fIobjectName\fR .PP \fBtime\fR\ \&\fIstime\fR .PP \fBSMFState\fR\ \&\fIstate\fR .RE .PP \fBstruct StateChange\fR .RS 4 .PP \fBFields:\fR .PP \fBname\fR\ \&\fIsource\fR .PP \fBSMFState\fR\ \&\fIstate\fR .PP \fBSMFState\fR\ \&\fInextState\fR .PP \fBstring\fR\ \&\fIauxState\fR (\fInullable\fR) .PP \fBtime\fR\ \&\fIstateTime\fR .PP \fBstring\fR\ \&\fIreason\fR (\fInullable\fR) .RE .PP \fBstruct Addition\fR .RS 4 .PP \fBFields:\fR .PP \fBname\fR\ \&\fIname\fR .PP \fBstring\fR\ \&\fIfrmi\fR .PP \fBStructInstance\fR\ \&\fIinstance\fR (\fInullable\fR) .PP \fBStructService\fR\ \&\fIservice\fR (\fInullable\fR) .RE .PP \fBstruct Removal\fR .RS 4 .PP \fBFields:\fR .PP \fBstring\fR\ \&\fIfmri\fR .RE .PP \fBVersion:\fR (1\&.0)