1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
7 The contents of this file are subject to the terms of the
8 Common Development and Distribution License (the "License").
9 You may not use this file except in compliance with the License.
11 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12 or http://www.opensolaris.org/os/licensing.
13 See the License for the specific language governing permissions
14 and limitations under the License.
16 When distributing Covered Code, include this CDDL HEADER in each
17 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18 If applicable, add the following below this CDDL HEADER, with the
19 fields enclosed by brackets "[]" replaced with your own identifying
20 information: Portions Copyright [yyyy] [name of copyright owner]
26 Service description DTD
28 Most attributes are string values (or an individual string from a
29 restricted set), but attributes with a specific type requirement are
30 noted in the comment describing the element.
36 A series of service bundles may be composed via the xi:include tag.
37 smf(5) tools enforce that all bundles be of the same type.
41 These entities are used for the property, propval and property_group
42 elements, that require type attributes for manifest, while for profiles
43 the type attributes are only implied.
46 <!ENTITY % profile
"IGNORE">
47 <!ENTITY % manifest
"INCLUDE">
54 parse (xml|text)
"xml"
55 encoding CDATA #IMPLIED
56 xmlns:xi CDATA #FIXED
"http://www.w3.org/2001/XInclude"
63 xmlns:xi CDATA #FIXED
"http://www.w3.org/2001/XInclude"
69 This element associates an SMI stability level with the parent
70 element. See attributes(5) for an explanation of interface
75 value The stability level of the parent element.
78 <!ELEMENT stability EMPTY
>
81 value ( Standard | Stable | Evolving | Unstable |
82 External | Obsolete ) #REQUIRED
>
84 <!-- Property value lists -->
89 This element represents a single value within any of the typed
94 value The value for this node in the list.
97 <!ELEMENT value_node EMPTY
>
100 value CDATA #REQUIRED
>
118 These elements represent the typed lists of values for a property.
119 Each contains one or more value_node elements representing each
122 None of these elements has attributes.
128 <!ATTLIST count_list
>
130 <!ELEMENT integer_list
133 <!ATTLIST integer_list
>
135 <!ELEMENT opaque_list
138 <!ATTLIST opaque_list
>
145 <!ELEMENT hostname_list
148 <!ATTLIST hostname_list
>
150 <!ELEMENT net_address_list
153 <!ATTLIST net_address_list
>
155 <!ELEMENT net_address_v4_list
158 <!ATTLIST net_address_v4_list
>
160 <!ELEMENT net_address_v6_list
163 <!ATTLIST net_address_v6_list
>
170 <!ELEMENT astring_list
173 <!ATTLIST astring_list
>
175 <!ELEMENT ustring_list
178 <!ATTLIST ustring_list
>
180 <!ELEMENT boolean_list
183 <!ATTLIST boolean_list
>
195 <!-- Properties and property groups -->
200 This element is for a singly or multiply valued property within a
201 property group. It contains an appropriate value list element,
202 which is expected to be consistent with the type attribute.
206 name The name of this property.
208 type The data type for this property.
210 override These values should replace values already in the
216 ( count_list | integer_list | opaque_list | host_list | hostname_list |
217 net_address_list | net_address_v4_list | net_address_v6_list |
218 time_list | astring_list | ustring_list | boolean_list | fmri_list |
223 type ( count | integer | opaque | host | hostname |
224 net_address | net_address_v4 | net_address_v6 | time |
225 astring | ustring | boolean | fmri | uri ) #IMPLIED
226 override ( true | false )
"false" >
231 ( count_list | integer_list | opaque_list | host_list | hostname_list |
232 net_address_list | net_address_v4_list | net_address_v6_list |
233 time_list | astring_list | ustring_list | boolean_list | fmri_list |
238 type ( count | integer | opaque | host | hostname |
239 net_address | net_address_v4 | net_address_v6 | time |
240 astring | ustring | boolean | fmri | uri ) #REQUIRED
241 override ( true | false )
"false" >
247 This element is for a singly valued property within a property
248 group. List-valued properties must use the property element above.
252 name The name of this property.
254 type The data type for this property.
256 value The value for this property. Must match type
257 restriction of type attribute.
259 override This value should replace any values already in the
264 <!ELEMENT propval EMPTY
>
268 type ( count | integer | opaque | host | hostname |
269 net_address | net_address_v4 | net_address_v6 | time |
270 astring | ustring | boolean | fmri | uri ) #IMPLIED
271 value CDATA #REQUIRED
272 override ( true | false )
"false" >
276 <!ELEMENT propval EMPTY
>
280 type ( count | integer | opaque | host | hostname |
281 net_address | net_address_v4 | net_address_v6 | time |
282 astring | ustring | boolean | fmri | uri ) #REQUIRED
283 value CDATA #REQUIRED
284 override ( true | false )
"false" >
290 This element is for a set of related properties on a service or
291 instance. It contains an optional stability element, as well as
292 zero or more property-containing elements.
296 name The name of this property group.
298 type A category for this property group. Groups of type
299 "framework", "implementation" or "template" are primarily
300 of interest to the service management facility, while
301 groups of type "application" are expected to be only of
302 interest to the service to which this group is attached.
303 Other types may be introduced using the service symbol
304 namespace conventions.
306 delete If in the repository, this property group should be removed.
310 <!ELEMENT property_group
311 ( stability?, ( propval | property )* )
>
313 <!ATTLIST property_group
316 delete ( true | false )
"false" >
320 <!ELEMENT property_group
321 ( stability?, ( propval | property )* )
>
323 <!ATTLIST property_group
326 delete ( true | false )
"false" >
332 This element defines a reference to a service FMRI (for either a
333 service or an instance).
340 <!ELEMENT service_fmri EMPTY
>
342 <!ATTLIST service_fmri
343 value CDATA #REQUIRED
>
345 <!-- Dependencies -->
350 This element identifies a group of FMRIs upon which the service is
351 in some sense dependent. Its interpretation is left to the
352 restarter to which a particular service instance is delegated. It
353 contains a group of service FMRIs, as well as a block of properties.
357 name The name of this dependency.
359 grouping The relationship between the various FMRIs grouped
360 here; "require_all" of the FMRIs to be online, "require_any"
361 of the FMRIs to be online, or "exclude_all" of the FMRIs
362 from being online or in maintenance for the dependency to
363 be satisfied. "optional_all" dependencies are satisfied
364 when all of the FMRIs are either online or unable to come
365 online (because they are disabled, misconfigured, or one
366 of their dependencies is unable to come online).
368 restart_on The type of events from the FMRIs that the service should
369 be restarted for. "error" restarts the service if the
370 dependency is restarted due to hardware fault. "restart"
371 restarts the service if the dependency is restarted for
372 any reason, including hardware fault. "refresh" restarts
373 the service if the dependency is refreshed or restarted for
374 any reason. "none" will never restart the service due to
375 dependency state changes.
377 type The type of dependency: on another service ('service'), on
378 a filesystem path ('path'), or another dependency type.
380 delete This dependency should be deleted.
384 ( service_fmri*, stability?, ( propval | property )* )
>
388 grouping ( require_all | require_any | exclude_all |
389 optional_all ) #REQUIRED
390 restart_on ( error | restart | refresh | none ) #REQUIRED
392 delete ( true | false )
"false" >
399 This element identifies a service which should depend on this service. It
400 corresponds to a dependency in the named service. The grouping and type
401 attributes of that dependency are implied to be "require_all" and
402 "service", respectively.
406 name The name of the dependency property group to create in the
409 grouping The grouping relationship of the dependency property
410 group to create in the dependent entity. See "grouping"
411 attribute on the dependency element.
413 restart_on The type of events from this service that the named service
414 should be restarted for.
416 delete True if this dependent should be deleted.
418 override Whether to replace an existing dependent of the same name.
423 ( service_fmri, stability?, ( propval | property )* )
>
427 grouping ( require_all | require_any | exclude_all |
428 optional_all) #REQUIRED
429 restart_on ( error | restart | refresh | none) #REQUIRED
430 delete ( true | false )
"false"
431 override ( true | false )
"false" >
433 <!-- Method execution context, security profile, and credential definitions -->
438 An environment variable. It has two attributes:
440 name The name of the environment variable.
441 value The value of the environment variable.
444 <!ELEMENT envvar EMPTY
>
448 value CDATA #REQUIRED
>
453 This element defines the environment for a method. It has no
454 attributes, and one or more envvar child elements.
457 <!ELEMENT method_environment (envvar+)
>
459 <!ATTLIST method_environment
>
464 This element indicates which exec_attr(5) profile applies to the
465 method context being defined.
469 name The name of the profile.
472 <!ELEMENT method_profile EMPTY
>
474 <!ATTLIST method_profile
475 name CDATA #REQUIRED
>
480 This element specifies credential attributes for the execution
485 user The user ID, in numeric or text form.
487 group The group ID, in numeric or text form. If absent or
488 ":default", the group associated with the user in the
491 supp_groups Supplementary group IDs to be associated with the
492 method, separated by commas or spaces. If absent or
493 ":default", initgroups(3C) will be used.
495 privileges An optional string specifying the privilege set.
497 limit_privileges An optional string specifying the limit
501 <!ELEMENT method_credential EMPTY
>
503 <!ATTLIST method_credential
506 supp_groups CDATA #IMPLIED
507 privileges CDATA #IMPLIED
508 limit_privileges CDATA #IMPLIED
>
513 This element combines credential and resource management attributes
514 for execution methods. It may contain a method_environment, or
515 a method_profile or method_credential element.
519 working_directory The home directory to launch the method from.
520 ":default" can be used as a token to indicate use of the
521 user specified by the credential or profile specified.
523 project The project ID, in numeric or text form. ":default" can
524 be used as a token to indicate use of the project
525 identified by getdefaultproj(3PROJECT) for the non-root
526 user specified by the credential or profile specified.
527 If the user is root, ":default" designates the project
528 the restarter is running in.
530 resource_pool The resource pool name to launch the method on.
531 ":default" can be used as a token to indicate use of the
532 pool specified in the project(4) entry given in the
533 "project" attribute above.
535 <!ELEMENT method_context
536 ( (method_profile | method_credential)?, method_environment? )
>
538 <!ATTLIST method_context
539 security_flags CDATA #IMPLIED
540 working_directory CDATA #IMPLIED
541 project CDATA #IMPLIED
542 resource_pool CDATA #IMPLIED
>
544 <!-- Restarter delegation, methods, and monitors -->
549 This element describes one of the methods used by the designated
550 restarter to act on the service instance. Its interpretation is
551 left to the restarter to which a particular service instance is
552 delegated. It contains a set of attributes, an optional method
553 context, and an optional stability element for the optional
554 properties that can be included.
558 type The type of method, either "method" or "monitor".
560 name Name of this execution method. The method names are
561 usually a defined interface of the restarter to which an
562 instance of this service is delegated.
564 exec The string identifying the action to take. For
565 svc.startd(1M), this is a string suitable to pass to
568 timeout_seconds [integer] Duration, in seconds, to wait for this
569 method to complete. A '0' or '-1' denotes an infinite
572 delete If in the repository, the property group for this method
576 <!ELEMENT exec_method
577 ( method_context?, stability?, ( propval | property )* )
>
579 <!ATTLIST exec_method
580 type ( method | monitor ) #REQUIRED
583 timeout_seconds CDATA #REQUIRED
584 delete ( true | false )
"false" >
589 A flag element identifying the restarter to which this service or
590 service instance is delegated. Contains the FMRI naming the
593 This element has no attributes.
608 The doc_link relates a resource described by the given URI to the
609 service described by the containing template. The resource is
610 expected to be a documentation or elucidatory reference of some
615 name A label for this resource.
617 uri A URI to the resource.
620 <!ELEMENT doc_link EMPTY
>
624 uri CDATA #REQUIRED
>
629 The manpage element connects the reference manual page to the
634 title The manual page title.
636 section The manual page's section.
638 manpath The MANPATH environment variable, as described in man(1)
639 that is required to reach the named manual page
642 <!ELEMENT manpage EMPTY
>
645 title CDATA #REQUIRED
646 section CDATA #REQUIRED
647 manpath CDATA
":default" >
652 The documentation element groups an arbitrary number of doc_link
653 and manpage references.
655 It has no attributes.
658 <!ELEMENT documentation
659 ( doc_link | manpage )*
>
661 <!ATTLIST documentation
>
666 The loctext element is a container for localized text.
668 Its sole attribute is
670 xml:lang The name of the locale, in the form accepted by LC_ALL,
677 xml:lang CDATA #REQUIRED
>
682 The description holds a set of potentially longer, localized strings that
683 consist of a short description of the service.
685 The description has no attributes.
687 <!ELEMENT description
690 <!ATTLIST description
>
695 The common_name holds a set of short, localized strings that
696 represent a well-known name for the service in the given locale.
698 The common_name has no attributes.
700 <!ELEMENT common_name
703 <!ATTLIST common_name
>
708 The units a numerical property is expressed in.
719 Expresses how a property is typically accessed. This isn't
720 intended as access control, but as an indicator as to how a
725 value 'hidden', 'readonly', or 'readwrite' indicating that
726 the property should be hidden from the user, shown but
727 read-only, or modifiable.
730 <!ELEMENT visibility EMPTY
>
733 value ( hidden | readonly | readwrite ) #REQUIRED
>
738 Describes a legal value for a property value, and optionally contains a
739 human-readable name and description for the specified property
744 name A string representation of the value.
748 ( common_name?, description? )
>
751 name CDATA #REQUIRED
>
756 Human-readable names and descriptions for valid values of a property.
767 Places a constraint on the number of values the property can take
771 min minimum number of values
772 max maximum number of values
774 Both attributes are optional. If min is not specified, it defaults to
775 0. If max is not specified it indicates an unlimited number of values.
776 If neither is specified this indicates 0 or more values.
779 <!ELEMENT cardinality EMPTY
>
781 <!ATTLIST cardinality
783 max CDATA
"18446744073709551615">
788 Indicates the separators used within a property's value used to
789 separate the actual values. Used in situations where multiple
790 values are packed into a single property value instead of using a
791 multi-valued property.
794 <!ELEMENT internal_separators
797 <!ATTLIST internal_separators
>
802 Indicates a range of possible integer values.
806 min The minimum value of the range (inclusive).
807 max The maximum value of the range (inclusive).
810 <!ELEMENT range EMPTY
>
814 max CDATA #REQUIRED
>
819 Provides a set of constraints on the values a property can take on.
822 <!ELEMENT constraints
824 <!ATTLIST constraints
>
829 Includes an entire set of values in the choices block.
833 type Either "constraints" or "values", indicating an
834 inclusion of all values allowed by the property's
835 constraints or all values for which there are
836 human-readable names and descriptions, respectively.
839 <!ELEMENT include_values EMPTY
>
841 <!ATTLIST include_values
842 type ( constraints | values ) #REQUIRED
>
847 Provides a set of common choices for the values a property can take
848 on. Useful in those cases where the possibilities are unenumerable
849 or merely inconveniently legion, and a manageable subset is desired
850 for presentation in a user interface.
854 ( value*, range*, include_values* )
>
862 The prop_pattern describes one property of the enclosing property group
867 name The property's name.
868 type The property's type.
870 If the property group is present, this property is required.
872 type can be omitted if required is false.
875 <!ELEMENT prop_pattern
876 ( common_name?, description?, units?, visibility?, cardinality?,
877 internal_separators?, values?, constraints?, choices? )
>
879 <!ATTLIST prop_pattern
881 type ( count | integer | opaque | host | hostname |
882 net_address | net_address_v4 | net_address_v6 | time |
883 astring | ustring | boolean | fmri | uri ) #IMPLIED
884 required ( true | false )
"false" >
889 The pg_pattern describes one property group.
890 Depending on the element's attributes, these descriptions may apply
891 to just the enclosing service/instance, instances of the enclosing
892 service, delegates of the service (assuming it is a restarter), or
897 name The property group's name. If not specified, it
898 matches all property groups with the specified type.
899 type The property group's type. If not specified, it
900 matches all property groups with the specified name.
902 If the property group is required.
903 target The scope of the pattern, which may be all, delegate,
904 instance, or this. 'all' is reserved for framework use
905 and applies the template to all services on the system.
906 'delegate' is reserved for restarters, and means the
907 template applies to all services which use the restarter.
908 'this' would refer to the defining service or instance.
909 'instance' can only be used in a service's template block,
910 and means the definition applies to all instances of this
916 ( common_name?, description?, prop_pattern* )
>
921 required ( true | false )
"false"
922 target ( this | instance | delegate | all )
"this" >
927 The template contains a collection of metadata about the service.
928 It contains a localizable string that serves as a common,
929 human-readable name for the service. (This name should be less than
930 60 characters in a single byte locale.) The template may optionally
931 contain a longer localizable description of the service, a
932 collection of links to documentation, either in the form of manual
933 pages or in the form of URI specifications to external documentation
934 sources (such as docs.sun.com).
936 The template has no attributes.
939 ( common_name, description?, documentation?, pg_pattern* )
>
943 <!-- Notification Parameters -->
945 <!ELEMENT paramval EMPTY
>
949 value CDATA #REQUIRED
>
955 name CDATA #REQUIRED
>
957 <!ELEMENT event EMPTY
>
960 value CDATA #REQUIRED
>
963 ( ( parameter | paramval )* )
>
967 active ( true | false )
"true" >
970 notification parameters
972 This element sets the notification parameters for Software Events and
973 Fault Management problem lifecycle events.
976 <!ELEMENT notification_parameters
979 <!ATTLIST notification_parameters
>
981 <!-- Services and instances -->
984 create_default_instance
986 A flag element indicating that an otherwise empty default instance
987 of this service (named "default") should be created at install, with
988 its enabled property set as given.
992 enabled [boolean] The initial value for the enabled state of
996 <!ELEMENT create_default_instance EMPTY
>
998 <!ATTLIST create_default_instance
999 enabled ( true | false ) #REQUIRED
>
1004 A flag element stating that this service can only have a single
1005 instance on a particular system.
1008 <!ELEMENT single_instance EMPTY
>
1010 <!ATTLIST single_instance
>
1015 The service instance is the object representing a software component
1016 that will run on the system if enabled. It contains an enabled
1017 element, a set of dependencies on other services, potentially
1018 customized methods or configuration data, an optional method
1019 context, and a pointer to its restarter. (If no restarter is
1020 specified, the master restarter, svc.startd(1M), is assumed to be
1021 responsible for the service.)
1025 name The canonical name for this instance of the service.
1027 enabled [boolean] The initial value for the enabled state of
1032 ( restarter?, dependency*, dependent*, method_context?,
1033 exec_method*, notification_parameters*, property_group*,
1037 name CDATA #REQUIRED
1038 enabled ( true | false ) #REQUIRED
>
1043 The service contains the set of instances defined by default for
1044 this service, an optional method execution context, any default
1045 methods, the template, and various restrictions or advice applicable
1046 at installation. The method execution context and template elements
1047 are required for service_bundle documents with type "manifest", but
1048 are optional for "profile" or "archive" documents.
1052 name The canonical name for the service.
1054 version [integer] The integer version for this service.
1056 type Whether this service is a simple service, a delegated
1057 restarter, or a milestone (a synthetic service that
1058 collects a group of dependencies).
1062 ( create_default_instance?, single_instance?, restarter?,
1063 dependency*, dependent*, method_context?, exec_method*,
1064 notification_parameters*, property_group*, instance*,
1065 stability?, template? )
>
1068 name CDATA #REQUIRED
1069 version CDATA #REQUIRED
1070 type ( service | restarter | milestone ) #REQUIRED
>
1075 The bundle possesses two attributes:
1077 type How this file is to be understood by the framework (or
1078 used in a non-framework compliant way). Standard types
1079 are 'archive', 'manifest', and 'profile'.
1081 name A name for the bundle. Manifests should be named after
1082 the package which delivered them; profiles should be
1083 named after the "feature set nickname" they intend to
1087 <!ELEMENT service_bundle
1088 ( service_bundle* | service* | xi:include* )
>
1090 <!ATTLIST service_bundle
1091 type CDATA #REQUIRED
1092 name CDATA #REQUIRED
>