xref: /titanic_51/usr/src/lib/fm/topo/maps/common/topology.dtd.1 (revision 614edcae07b011d0a945698ea463995b233d17e8)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
4 Use is subject to license terms.
5
6 CDDL HEADER START
7
8 The contents of this file are subject to the terms of the
9 Common Development and Distribution License (the "License").
10 You may not use this file except in compliance with the License.
11
12 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13 or http://www.opensolaris.org/os/licensing.
14 See the License for the specific language governing permissions
15 and limitations under the License.
16
17 When distributing Covered Code, include this CDDL HEADER in each
18 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19 If applicable, add the following below this CDDL HEADER, with the
20 fields enclosed by brackets "[]" replaced with your own identifying
21 information: Portions Copyright [yyyy] [name of copyright owner]
22
23 CDDL HEADER END
24
25-->
26
27<!--
28  Topology description DTD
29
30    Most attributes are string values (or an individual string from a
31    restricted set), but attributes with a specific type requirement are
32    noted in the comment describing the element.
33-->
34
35<!--
36  XInclude support
37
38    Topologies may be composed via the xi:include tag.
39    libtopo(3LIB) interfaces enforce that all composed topologies be of the
40    same scheme.
41-->
42
43<!ELEMENT xi:include
44	(xi:fallback) >
45
46<!ATTLIST xi:include
47  href CDATA #REQUIRED
48  parse (xml|text) "xml"
49  encoding CDATA #IMPLIED
50  xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
51  >
52
53<!ELEMENT xi:fallback
54  ANY
55  >
56<!ATTLIST xi:fallback
57  xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
58  >
59
60<!-- Properties and property groups -->
61
62<!--
63  propval
64
65 	This element is for a singly valued property within a property group.
66
67	Its attributes are
68
69		name	The name of this property.
70
71		type	The data type for this property.
72
73		value	The value for this property.  Must match type
74			restriction of type attribute.
75-->
76
77<!ELEMENT propval EMPTY >
78
79<!ATTLIST propval
80	name		CDATA #REQUIRED
81	type		( int32 | uint32 | int64 | uint64 |
82			  string | fmri ) #REQUIRED
83	value		CDATA #REQUIRED >
84
85<!--
86  propgroup
87
88	This element is for a set of related properties on a topo node
89	It contains an optional stability element, as well as
90	zero or more property-containing elements.
91
92	Its attributes are
93
94		name		The name of this property group.
95		name-stability	Stability level of the property group name
96		data-stability	Stability level of the property names and
97				content
98		version		Version of the propery group definition
99
100-->
101
102<!ELEMENT propgroup
103	( propval*, propmethod* ) >
104
105<!ATTLIST propgroup
106	name		CDATA #REQUIRED
107	version		CDATA #REQUIRED
108	name-stability	( Private | Standard | Stable | Evolving | Unstable |
109                        External | Obsolete ) #REQUIRED
110	data-stability	( Private | Standard | Stable | Evolving | Unstable |
111                        External | Obsolete ) #REQUIRED >
112
113<!--
114  set
115	This element is for associating ranges, nodes or property groups
116	according to a set type.
117
118	Its attributes are
119
120		type	The type of this property group set.  'product' is the
121			only set type currently supported.
122		setlist	The list of set types.
123
124-->
125
126<!ELEMENT set
127	 ( range*, fac-enum?, propgroup*, facility*, set* ) >
128
129<!ATTLIST set
130	type	( product ) #REQUIRED
131	setlist	CDATA #REQUIRED >
132
133<!--
134  propmap
135	This element is for specifying an additional topo map file for
136	properties assigned to a given range.
137
138	Its attributes are
139
140		name		Name of map file
141-->
142
143<!ELEMENT propmap EMPTY >
144
145<!ATTLIST propmap
146	name		CDATA #REQUIRED >
147
148<!-- Methods -->
149
150<!--
151  argval
152
153	A propmethod argument. It has two attributes:
154
155		name    The name of the argument.
156		type    The data type of the argument.
157		value	The value of the arg
158-->
159
160<!ELEMENT argval EMPTY>
161
162<!ATTLIST argval
163        name            CDATA #REQUIRED
164        type            CDATA #REQUIRED
165        value           CDATA #REQUIRED >
166
167<!--
168   propmethod
169
170	This element is for properties that can only be determined dynamically
171	from a plugin.
172
173	Its attributes are
174
175      		name		Name of the method
176      		version		Version of the method API
177      		propname	Name of the property to create
178		proptype	Type of the property to create
179		mutable         optional: default is false (0)
180		nonvolatile     optional: default is false (0)
181-->
182
183<!ELEMENT propmethod
184	( argval* ) >
185
186<!ATTLIST propmethod
187	name		CDATA #REQUIRED
188	version		CDATA #REQUIRED
189	propname	CDATA #REQUIRED
190	proptype	CDATA #REQUIRED
191	mutable		(0|1) "0"
192	nonvolatile	(0|1) "0" >
193
194<!--
195  enum-method
196
197	This element describes the enumeration method used to
198	populate a composition of topo nodes for a given range of topology
199	nodes.
200
201	Its attributes are
202
203		name	Name of the module exporting an enumeration method.
204
205		version Version of the libtopo API
206
207-->
208
209<!ELEMENT enum-method EMPTY >
210
211<!ATTLIST enum-method
212	name		CDATA #REQUIRED
213	version		CDATA #REQUIRED >
214
215<!--
216  node
217
218	This element identifies a topology node instance.
219
220	Its attributes are
221
222		instance The instance number of the node
223
224-->
225
226<!ELEMENT node
227	( fac-enum?, facility*, propgroup*, set*, enum-method*, dependents? ) >
228
229<!ATTLIST node
230	instance	CDATA #REQUIRED >
231
232<!--
233  dependents
234
235	Ranges may have a number of "dependent" ranges, linked to
236	the original range hierarchically as children or as a list, siblings.
237
238	Its attribute is:
239		grouping	children | siblings
240-->
241
242<!ELEMENT dependents
243	(( range | xi:include )*, set*) >
244
245<!ATTLIST dependents
246	grouping ( children | siblings ) #REQUIRED >
247
248<!--
249  range
250
251    This element identifies a range of possible topology nodes.
252
253    Its attributes are
254
255	name	The common name of all the possible topo nodes
256
257	min	The smallest allowed instance number for an
258		actual topo node.
259
260	max	The largest allowed instance number for an
261		actual topo node.
262-->
263
264<!ELEMENT range
265	( enum-method?, propmap?, fac-enum?, facility*, node*, propgroup*, set*,
266	    dependents* ) >
267
268<!ATTLIST range
269	name		CDATA #REQUIRED
270	min		CDATA #REQUIRED
271	max		CDATA #REQUIRED >
272
273<!--
274  facility
275
276    This element identifies a single facility node instance
277
278    Its attributes are
279
280	name	The name of the facility node
281
282	type	The type of facility node: either "sensor" or "indicator"
283
284	provider	The name of the facility provider module that
285	                implements the methods for this node or range
286-->
287
288<!ELEMENT facility
289	( propgroup* ) >
290
291<!ATTLIST facility
292	name		CDATA #REQUIRED
293	type		(sensor | indicator) #REQUIRED
294	provider	CDATA #REQUIRED >
295
296<!--
297  fac-enum
298
299    This element identifies a facility provider module that
300    implements a facility enumeration method for the enclosing
301    node or range.
302
303    Its attributes are
304
305	provider	The name of the facility provider module that
306	                implements the facility enumerator method for
307			the parent node or range
308-->
309
310<!ELEMENT fac-enum EMPTY >
311
312<!ATTLIST fac-enum provider CDATA #REQUIRED >
313
314<!--
315  topology
316
317	This is the root-level for the scheme-specific topology
318
319	Its attributes are:
320		name	topology name
321		scheme 	( hc | dev  )
322-->
323
324<!ELEMENT topology
325	((range* | xi:include*), set*)>
326
327<!ATTLIST topology
328	name	CDATA #REQUIRED
329	scheme (hc | dev) #REQUIRED >
330