xref: /titanic_52/usr/src/lib/fm/topo/maps/common/topology.dtd.1 (revision fca4268092e9961ebb9b5e0098dcebc545023586)
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 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			This is optional for array types
77
78-->
79
80<!ELEMENT propval (propitem*) >
81
82<!ATTLIST propval
83	name		CDATA #REQUIRED
84	type		( int32 | uint32 | int64 | uint64 |
85			  string | fmri | int32_array | uint32_array |
86			  int64_array | uint64_array | string_array |
87			  fmri_array ) #REQUIRED
88	value		CDATA "" >
89<!--
90  propitem
91
92 	This element is an optional child element of propval and is used to
93	specify the values for array elements
94
95	Its attributes are
96
97		value	The value for this property.  Must match type
98			restriction of type attribute.
99
100-->
101
102<!ELEMENT propitem EMPTY >
103
104<!ATTLIST propitem
105	value		CDATA #REQUIRED >
106
107
108<!--
109  propgroup
110
111	This element is for a set of related properties on a topo node
112	It contains an optional stability element, as well as
113	zero or more property-containing elements.
114
115	Its attributes are
116
117		name		The name of this property group.
118		name-stability	Stability level of the property group name
119		data-stability	Stability level of the property names and
120				content
121		version		Version of the propery group definition
122
123-->
124
125<!ELEMENT propgroup
126	( propval*, propmethod* ) >
127
128<!ATTLIST propgroup
129	name		CDATA #REQUIRED
130	version		CDATA #REQUIRED
131	name-stability	( Private | Standard | Stable | Evolving | Unstable |
132                        External | Obsolete ) #REQUIRED
133	data-stability	( Private | Standard | Stable | Evolving | Unstable |
134                        External | Obsolete ) #REQUIRED >
135
136<!--
137  set
138	This element is for associating ranges, nodes or property groups
139	according to a set type.
140
141	Its attributes are
142
143		type	The type of this property group set.  'product' is the
144			only set type currently supported.
145		setlist	The list of set types.
146
147-->
148
149<!ELEMENT set
150	 ( range*, fac-enum?, propgroup*, facility*, set* ) >
151
152<!ATTLIST set
153	type	( product ) #REQUIRED
154	setlist	CDATA #REQUIRED >
155
156<!--
157  propmap
158	This element is for specifying an additional topo map file for
159	properties assigned to a given range.
160
161	Its attributes are
162
163		name		Name of map file
164-->
165
166<!ELEMENT propmap EMPTY >
167
168<!ATTLIST propmap
169	name		CDATA #REQUIRED >
170
171<!-- Methods -->
172
173<!--
174  argval
175
176	A propmethod argument. It has two attributes:
177
178		name    The name of the argument.
179		type    The data type of the argument.
180		value	The value for this argument.  Must match type
181			restriction of type attribute.
182
183			This attribute is optional for array types
184-->
185
186<!ELEMENT argval (argitem*) >
187
188<!ATTLIST argval
189        name            CDATA #REQUIRED
190	type		( int32 | uint32 | int64 | uint64 |
191			  string | fmri | int32_array | uint32_array |
192			  int64_array | uint64_array | string_array |
193			  fmri_array ) #REQUIRED
194        value           CDATA "">
195
196<!--
197  argitem
198
199 	This element is an optional child element of argval and is used to
200	specify the values for array elements
201
202	Its attributes are
203
204		value	The value for this property.  Must match type
205			restriction of type attribute.
206
207-->
208
209<!ELEMENT argitem EMPTY >
210
211<!ATTLIST argitem
212	value		CDATA #REQUIRED >
213
214
215<!--
216   propmethod
217
218	This element is for properties that can only be determined dynamically
219	from a plugin.
220
221	Its attributes are
222
223      		name		Name of the method
224      		version		Version of the method API
225      		propname	Name of the property to create
226		proptype	Type of the property to create
227		mutable         optional: default is false (0)
228		nonvolatile     optional: default is false (0)
229-->
230
231<!ELEMENT propmethod
232	( argval* ) >
233
234<!ATTLIST propmethod
235	name		CDATA #REQUIRED
236	version		CDATA #REQUIRED
237	propname	CDATA #REQUIRED
238	proptype	CDATA #REQUIRED
239	mutable		(0|1) "0"
240	nonvolatile	(0|1) "0" >
241
242<!--
243  enum-method
244
245	This element describes the enumeration method used to
246	populate a composition of topo nodes for a given range of topology
247	nodes.
248
249	Its attributes are
250
251		name	Name of the module exporting an enumeration method.
252
253		version Version of the libtopo API
254
255-->
256
257<!ELEMENT enum-method EMPTY >
258
259<!ATTLIST enum-method
260	name		CDATA #REQUIRED
261	version		CDATA #REQUIRED >
262
263<!--
264  node
265
266	This element identifies a topology node instance.
267
268	Its attributes are
269
270		instance The instance number of the node
271
272-->
273
274<!ELEMENT node
275	( fac-enum?, facility*, propgroup*, set*, enum-method*, dependents? ) >
276
277<!ATTLIST node
278	instance	CDATA #REQUIRED >
279
280<!--
281  dependents
282
283	Ranges may have a number of "dependent" ranges, linked to
284	the original range hierarchically as children or as a list, siblings.
285
286	Its attribute is:
287		grouping	children | siblings
288-->
289
290<!ELEMENT dependents
291	(( range | xi:include )*, set*) >
292
293<!ATTLIST dependents
294	grouping ( children | siblings ) #REQUIRED >
295
296<!--
297  range
298
299    This element identifies a range of possible topology nodes.
300
301    Its attributes are
302
303	name	The common name of all the possible topo nodes
304
305	min	The smallest allowed instance number for an
306		actual topo node.
307
308	max	The largest allowed instance number for an
309		actual topo node.
310-->
311
312<!ELEMENT range
313	( enum-method?, propmap?, fac-enum?, facility*, node*, propgroup*, set*,
314	    dependents* ) >
315
316<!ATTLIST range
317	name		CDATA #REQUIRED
318	min		CDATA #REQUIRED
319	max		CDATA #REQUIRED >
320
321<!--
322  facility
323
324    This element identifies a single facility node instance
325
326    Its attributes are
327
328	name	The name of the facility node
329
330	type	The type of facility node: either "sensor" or "indicator"
331
332	provider	The name of the facility provider module that
333	                implements the methods for this node or range
334-->
335
336<!ELEMENT facility
337	( propgroup* ) >
338
339<!ATTLIST facility
340	name		CDATA #REQUIRED
341	type		(sensor | indicator) #REQUIRED
342	provider	CDATA #REQUIRED >
343
344<!--
345  fac-enum
346
347    This element identifies a facility provider module that
348    implements a facility enumeration method for the enclosing
349    node or range.
350
351    Its attributes are
352
353	provider	The name of the facility provider module that
354	                implements the facility enumerator method for
355			the parent node or range
356-->
357
358<!ELEMENT fac-enum EMPTY >
359
360<!ATTLIST fac-enum provider CDATA #REQUIRED >
361
362<!--
363  topology
364
365	This is the root-level for the scheme-specific topology
366
367	Its attributes are:
368		name	topology name
369		scheme 	( hc | dev  )
370-->
371
372<!ELEMENT topology
373	((range* | xi:include*), set*)>
374
375<!ATTLIST topology
376	name	CDATA #REQUIRED
377	scheme (hc | dev) #REQUIRED >
378