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