Whamcloud - gitweb
f5d80989b751624102ee010bb8e492447dc972e8
[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 networkRef: <value-of select="network_ref/@uuidref"/>
80 mdsRef: <value-of select="mds_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="obd">
108 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
109 objectClass: OBD
110 lustreName: <value-of select="@name"/>
111 uuid: <value-of select="@uuid"/>
112 activeRef: <value-of select="active_ref/@uuidref"/>
113 obdtype: <value-of select="@obdtype"/>
114 <if test="fstype">
115 fstype: <value-of select="fstype"/>
116 </if>
117 <if test="autoformat">
118 autoformat: <value-of select="autoformat"/>
119 </if>
120 <if test="devpath">
121 devpath: <value-of select="devpath"/>
122 </if>
123 <if test="devsize">
124 devsize: <value-of select="devsize"/>
125 </if>
126 <text>
127 </text>
128 </template>
129
130 <template match="ost">
131 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
132 objectClass: OST
133 lustreName: <value-of select="@name"/>
134 uuid: <value-of select="@uuid"/><apply-templates/>
135 <text>
136 </text>
137 </template>
138
139 <template match="mountpoint">
140 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
141 objectClass: MOUNTPOINT
142 lustreName: <value-of select="@name"/>
143 uuid: <value-of select="@uuid"/><apply-templates/>
144 <text>
145 </text>
146 </template>
147
148 <template match="echoclient">
149 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
150 objectClass: ECHOCLIENT
151 lustreName: <value-of select="@name"/>
152 uuid: <value-of select="@uuid"/><apply-templates/>
153 <text>
154 </text>
155 </template>
156
157 <template match="ldlm">
158 dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
159 objectClass: LDLM
160 lustreName: <value-of select="@name"/>
161 uuid: <value-of select="@uuid"/>
162 <text>
163 </text>
164 </template>
165
166
167 <template match="ldlm_ref">
168 ldlmRef: <value-of select="@uuidref"/>
169 </template>
170
171 <template match="obd_ref">
172 obdRef: <value-of select="@uuidref"/>
173 </template>
174
175 <template match="ost_ref">
176 ostRef: <value-of select="@uuidref"/>
177 </template>
178
179 <template match="network_ref">
180 networkRef: <value-of select="@uuidref"/>
181 </template>
182
183 <template match="mds_ref">
184 mdsRef: <value-of select="@uuidref"/>
185 </template>
186
187 <template match="mountpoint_ref">
188 mountpointRef: <value-of select="@uuidref"/>
189 </template>
190
191 <template match="echoclient_ref">
192 echoclientRef: <value-of select="@uuidref"/>
193 </template>
194
195 <template match="lov_ref">
196 lovRef: <value-of select="@uuidref"/>
197 </template>
198
199 <template match="lovconfig_ref">
200 lovconfigRef: <value-of select="@uuidref"/>
201 </template>
202
203 <template match="path">
204 path: <value-of select="."/>
205 </template>
206
207 <template match="active_ref">
208 activeRef: <value-of select="@uuidref"/>
209 </template>
210 </stylesheet>
211
212