Whamcloud - gitweb
f3c13646b10af13cb0264a093118704fa73442f8
[fs/lustre-release.git] / lustre / conf / lustre2ldif.xsl
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"> 
3 <output omit-xml-declaration="yes" />
4 <strip-space elements="*"/>
5 <param name="config">fs=lustre</param>
6 <variable name="basedn">config=<value-of select="$config"/>,fs=lustre</variable>
7
8 <template match="lustre">
9 dn: <value-of select="$basedn"/>
10 uuid: CONFIG_UUID
11 objectClass: LUSTRECONFIG
12 config: <value-of select="$config"/>
13 <text>
14 </text><apply-templates/>
15 </template>
16
17 <template match="node">
18 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
19 objectClass: NODE
20 lustreName: <value-of select="@name"/>
21 uuid: <value-of select="@uuid"/>
22 networkRef: <value-of select="network/@uuid"/>
23 <for-each select="profile_ref">
24 profileRef: <value-of select="@uuidref"/>
25 </for-each>
26 <text>
27 </text><apply-templates/>
28 </template>
29
30 <template match="profile">
31 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
32 objectClass: PROFILE
33 lustreName: <value-of select="@name"/>
34 uuid: <value-of select="@uuid"/><apply-templates/>
35 <text>
36 </text>
37 </template>
38
39 <template match="network">
40 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
41 objectClass: NETWORK
42 lustreName: <value-of select="@name"/>
43 uuid: <value-of select="@uuid"/>
44 nettype: <value-of select="@nettype"/>
45 nid: <value-of select="nid"/>
46 <if test="port">
47 port: <value-of select="port"/>
48 </if>
49 <text>
50 </text>
51 </template>
52
53 <template match="mds">
54 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
55 objectClass: MDS
56 lustreName: <value-of select="@name"/>
57 uuid: <value-of select="@uuid"/><apply-templates/>
58 <text>
59 </text>
60 </template>
61
62 <template match="mdsdev">
63 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
64 objectClass: MDSDEV
65 lustreName: <value-of select="@name"/>
66 uuid: <value-of select="@uuid"/>
67 <if test="fstype">
68 fstype: <value-of select="fstype"/>
69 </if>
70 <if test="autoformat">
71 autoformat: <value-of select="autoformat"/>
72 </if>
73 <if test="devpath">
74 devpath: <value-of select="devpath"/>
75 </if>
76 <if test="devsize">
77 devsize: <value-of select="devsize"/>
78 </if>
79 nodeRef: <value-of select="node_ref/@uuidref"/>
80 targetRef: <value-of select="target_ref/@uuidref"/>
81 <text>
82 </text>
83 </template>
84
85 <template match="lov">
86 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
87 objectClass: LOV
88 lustreName: <value-of select="@name"/>
89 uuid: <value-of select="@uuid"/>
90 mdsRef: <value-of select="mds_ref/@uuidref"/>
91 stripepattern: <value-of select="@stripepattern"/>
92 stripesize: <value-of select="@stripesize"/>
93 stripecount: <value-of select="@stripecount"/><apply-templates/>
94 <text>
95 </text>
96 </template>
97
98 <template match="lovconfig">
99 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
100 objectClass: LOVCONFIG
101 lustreName: <value-of select="@name"/>
102 uuid: <value-of select="@uuid"/><apply-templates/>
103 <text>
104 </text>
105 </template>
106
107 <template match="osd">
108 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
109 objectClass: OSD
110 lustreName: <value-of select="@name"/>
111 uuid: <value-of select="@uuid"/>
112 nodeRef: <value-of select="node_ref/@uuidref"/>
113 targetRef: <value-of select="target_ref/@uuidref"/>
114 osdtype: <value-of select="@osdtype"/>
115 <if test="fstype">
116 fstype: <value-of select="fstype"/>
117 </if>
118 <if test="autoformat">
119 autoformat: <value-of select="autoformat"/>
120 </if>
121 <if test="devpath">
122 devpath: <value-of select="devpath"/>
123 </if>
124 <if test="devsize">
125 devsize: <value-of select="devsize"/>
126 </if>
127 <text>
128 </text>
129 </template>
130
131 <template match="ost">
132 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
133 objectClass: OST
134 lustreName: <value-of select="@name"/>
135 uuid: <value-of select="@uuid"/><apply-templates/>
136 <text>
137 </text>
138 </template>
139
140 <template match="mountpoint">
141 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
142 objectClass: MOUNTPOINT
143 lustreName: <value-of select="@name"/>
144 uuid: <value-of select="@uuid"/><apply-templates/>
145 <text>
146 </text>
147 </template>
148
149 <template match="echoclient">
150 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
151 objectClass: ECHOCLIENT
152 lustreName: <value-of select="@name"/>
153 uuid: <value-of select="@uuid"/><apply-templates/>
154 <text>
155 </text>
156 </template>
157
158 <template match="ldlm">
159 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
160 objectClass: LDLM
161 lustreName: <value-of select="@name"/>
162 uuid: <value-of select="@uuid"/>
163 <text>
164 </text>
165 </template>
166
167 <template match="ptlrpc">
168 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
169 objectClass: PTLRPC
170 lustreName: <value-of select="@name"/>
171 uuid: <value-of select="@uuid"/>
172 <text>
173 </text>
174 </template>
175
176 <template match="ldlm_ref">
177 ldlmRef: <value-of select="@uuidref"/>
178 </template>
179
180 <template match="ptlrpc_ref">
181 ptlrpcRef: <value-of select="@uuidref"/>
182 </template>
183
184 <template match="obd_ref">
185 obdRef: <value-of select="@uuidref"/>
186 </template>
187
188 <template match="osd_ref">
189 osdRef: <value-of select="@uuidref"/>
190 </template>
191
192 <template match="ost_ref">
193 ostRef: <value-of select="@uuidref"/>
194 </template>
195
196 <template match="network_ref">
197 networkRef: <value-of select="@uuidref"/>
198 </template>
199
200 <template match="mds_ref">
201 mdsRef: <value-of select="@uuidref"/>
202 </template>
203
204 <template match="mdsdev_ref">
205 mdsdevRef: <value-of select="@uuidref"/>
206 </template>
207
208 <template match="mountpoint_ref">
209 mountpointRef: <value-of select="@uuidref"/>
210 </template>
211
212 <template match="echoclient_ref">
213 echoclientRef: <value-of select="@uuidref"/>
214 </template>
215
216 <template match="lov_ref">
217 lovRef: <value-of select="@uuidref"/>
218 </template>
219
220 <template match="lovconfig_ref">
221 lovconfigRef: <value-of select="@uuidref"/>
222 </template>
223
224 <template match="path">
225 path: <value-of select="."/>
226 </template>
227
228 <template match="active_ref">
229 activeRef: <value-of select="@uuidref"/>
230 </template>
231 </stylesheet>
232
233