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