xref: /illumos-gate/usr/src/lib/fm/topo/maps/common/topology.dtd.1 (revision e86372a01d2d16a5dd4a64e144ed978ba17fe7dd)
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-->
275
276<!ELEMENT node
277	( fac-enum?, facility*, propgroup*, set*, enum-method*, dependents? ) >
278
279<!ATTLIST node
280	instance	CDATA #REQUIRED
281	static		(false|true) "false" >
282
283<!--
284  dependents
285
286	Ranges may have a number of "dependent" ranges, linked to
287	the original range hierarchically as children or as a list, siblings.
288
289	Its attribute is:
290		grouping	children | siblings
291-->
292
293<!ELEMENT dependents
294	(( range | xi:include )*, set*) >
295
296<!ATTLIST dependents
297	grouping ( children | siblings ) #REQUIRED >
298
299<!--
300  range
301
302    This element identifies a range of possible topology nodes.
303
304    Its attributes are
305
306	name	The common name of all the possible topo nodes
307
308	min	The smallest allowed instance number for an
309		actual topo node.
310
311	max	The largest allowed instance number for an
312		actual topo node.
313-->
314
315<!ELEMENT range
316	( enum-method?, propmap?, fac-enum?, facility*, node*, propgroup*, set*,
317	    dependents* ) >
318
319<!ATTLIST range
320	name		CDATA #REQUIRED
321	min		CDATA #REQUIRED
322	max		CDATA #REQUIRED >
323
324<!--
325  facility
326
327    This element identifies a single facility node instance
328
329    Its attributes are
330
331	name	The name of the facility node
332
333	type	The type of facility node: either "sensor" or "indicator"
334
335	provider	The name of the facility provider module that
336	                implements the methods for this node or range
337-->
338
339<!ELEMENT facility
340	( propgroup* ) >
341
342<!ATTLIST facility
343	name		CDATA #REQUIRED
344	type		(sensor | indicator) #REQUIRED
345	provider	CDATA #REQUIRED >
346
347<!--
348  fac-enum
349
350    This element identifies a facility provider module that
351    implements a facility enumeration method for the enclosing
352    node or range.
353
354    Its attributes are
355
356	provider	The name of the facility provider module that
357	                implements the facility enumerator method for
358			the parent node or range
359-->
360
361<!ELEMENT fac-enum EMPTY >
362
363<!ATTLIST fac-enum provider CDATA #REQUIRED >
364
365<!--
366  topology
367
368	This is the root-level for the scheme-specific topology
369
370	Its attributes are:
371		name	topology name
372                scheme  (hc|dev)
373-->
374
375<!ELEMENT topology
376	((range* | xi:include*), set*)>
377
378<!ATTLIST topology
379	name	CDATA #REQUIRED
380	scheme (hc | dev) #REQUIRED >
381