@@ -129,8 +129,120 @@ class GenerateDataFromManPages extends DefaultTask {
129129 ' [Files] Section Options' : [' Files' ],
130130 ' [Network] Section Options' : [' Network' ],
131131 ]
132- ]]
133-
132+ ]],
133+ // cat systemd.netdev.xml | grep "Section Options" | sed -e "s/<title>//g" | sed -e 's#</title>##g' | sed -E "s/\[(.+)] Section Options/'\0': ['\1'],/"
134+ ' netdev' : [
135+ ' systemd.netdev.xml' :
136+ [' sections' :
137+ [
138+ ' [Match] Section Options' : [' Match' ],
139+ ' [NetDev] Section Options' : [' NetDev' ],
140+ ' [Bridge] Section Options' : [' Bridge' ],
141+ ' [VLAN] Section Options' : [' VLAN' ],
142+ ' [MACVLAN] Section Options' : [' MACVLAN' ],
143+ ' [MACVTAP] Section Options' : [' MACVTAP' ],
144+ ' [IPVLAN] Section Options' : [' IPVLAN' ],
145+ ' [IPVTAP] Section Options' : [' IPVTAP' ],
146+ ' [VXLAN] Section Options' : [' VXLAN' ],
147+ ' [GENEVE] Section Options' : [' GENEVE' ],
148+ ' [BareUDP] Section Options' : [' BareUDP' ],
149+ ' [L2TP] Section Options' : [' L2TP' ],
150+ ' [L2TPSession] Section Options' : [' L2TPSession' ],
151+ ' [MACsec] Section Options' : [' MACsec' ],
152+ ' [MACsecReceiveChannel] Section Options' : [' MACsecReceiveChannel' ],
153+ ' [MACsecTransmitAssociation] Section Options' : [' MACsecTransmitAssociation' ],
154+ ' [MACsecReceiveAssociation] Section Options' : [' MACsecReceiveAssociation' ],
155+ ' [Tunnel] Section Options' : [' Tunnel' ],
156+ ' [FooOverUDP] Section Options' : [' FooOverUDP' ],
157+ ' [Peer] Section Options' : [' Peer' ],
158+ ' [VXCAN] Section Options' : [' VXCAN' ],
159+ ' [Tun] Section Options' : [' Tun' ],
160+ ' [Tap] Section Options' : [' Tap' ],
161+ ' [WireGuard] Section Options' : [' WireGuard' ],
162+ ' [WireGuardPeer] Section Options' : [' WireGuardPeer' ],
163+ ' [Bond] Section Options' : [' Bond' ],
164+ ' [Xfrm] Section Options' : [' Xfrm' ],
165+ ' [VRF] Section Options' : [' VRF' ],
166+ ' [BatmanAdvanced] Section Options' : [' BatmanAdvanced' ],
167+ ' [IPoIB] Section Options' : [' IPoIB' ],
168+ ' [WLAN] Section Options' : [' WLAN' ],
169+ ]
170+ ]
171+ ],
172+ ' network' : [
173+ ' systemd.link.xml' :
174+ [' sections' : [
175+ ' [Match] Section Options' : [' Match' ],
176+ ]
177+ ],
178+ ' systemd.network.xml' :
179+ [' sections' :
180+ [
181+ ' [Match] Section Options' : [' Match' ],
182+ ' [Link] Section Options' : [' Link' ],
183+ ' [SR-IOV] Section Options' : [' SR-IOV' ],
184+ ' [Network] Section Options' : [' Network' ],
185+ ' [Address] Section Options' : [' Address' ],
186+ ' [Neighbor] Section Options' : [' Neighbor' ],
187+ ' [IPv6AddressLabel] Section Options' : [' IPv6AddressLabel' ],
188+ ' [RoutingPolicyRule] Section Options' : [' RoutingPolicyRule' ],
189+ ' [NextHop] Section Options' : [' NextHop' ],
190+ ' [Route] Section Options' : [' Route' ],
191+ ' [DHCPv4] Section Options' : [' DHCPv4' ],
192+ ' [DHCPv6] Section Options' : [' DHCPv6' ],
193+ ' [DHCPPrefixDelegation] Section Options' : [' DHCPPrefixDelegation' ],
194+ ' [IPv6AcceptRA] Section Options' : [' IPv6AcceptRA' ],
195+ ' [DHCPServer] Section Options' : [' DHCPServer' ],
196+ ' [DHCPServerStaticLease] Section Options' : [' DHCPServerStaticLease' ],
197+ ' [IPv6SendRA] Section Options' : [' IPv6SendRA' ],
198+ ' [IPv6Prefix] Section Options' : [' IPv6Prefix' ],
199+ ' [IPv6RoutePrefix] Section Options' : [' IPv6RoutePrefix' ],
200+ ' [IPv6PREF64Prefix] Section Options' : [' IPv6PREF64Prefix' ],
201+ ' [Bridge] Section Options' : [' Bridge' ],
202+ ' [BridgeFDB] Section Options' : [' BridgeFDB' ],
203+ ' [LLDP] Section Options' : [' LLDP' ],
204+ ' [CAN] Section Options' : [' CAN' ],
205+ ' [IPoIB] Section Options' : [' IPoIB' ],
206+ ' [QDisc] Section Options' : [' QDisc' ],
207+ ' [NetworkEmulator] Section Options' : [' NetworkEmulator' ],
208+ ' [TokenBucketFilter] Section Options' : [' TokenBucketFilter' ],
209+ ' [PIE] Section Options' : [' PIE' ],
210+ ' [FlowQueuePIE] Section Options' : [' FlowQueuePIE' ],
211+ ' [StockchasticFairBlue] Section Options' : [' StochasticFairBlue' ],
212+ ' [StockchasticFairnessQueueing] Section Options' : [' StochasticFairnessQueueing' ],
213+ ' [BFIFO] Section Options' : [' BFIFO' ],
214+ ' [PFIFO] Section Options' : [' PFIFO' ],
215+ ' [PFIFOHeadDrop] Section Options' : [' PFIFOHeadDrop' ],
216+ ' [PFIFOFast] Section Options' : [' PFIFOFast' ],
217+ ' [CAKE] Section Options' : [' CAKE' ],
218+ ' [ControlledDelay] Section Options' : [' ControlledDelay' ],
219+ ' [DeficitRoundRobinScheduler] Section Options' : [' DeficitRoundRobinScheduler' ],
220+ ' [DeficitRoundRobinSchedulerClass] Section Options' : [' DeficitRoundRobinSchedulerClass' ],
221+ ' [EnhancedTransmissionSelection] Section Options' : [' EnhancedTransmissionSelection' ],
222+ ' [GenericRandomEarlyDetection] Section Options' : [' GenericRandomEarlyDetection' ],
223+ ' [FairQueueingControlledDelay] Section Options' : [' FairQueueingControlledDelay' ],
224+ ' [FairQueueing] Section Options' : [' FairQueueing' ],
225+ ' [TrivialLinkEqualizer] Section Options' : [' TrivialLinkEqualizer' ],
226+ ' [HierarchyTokenBucket] Section Options' : [' HierarchyTokenBucket' ],
227+ ' [HierarchyTokenBucketClass] Section Options' : [' HierarchyTokenBucketClass' ],
228+ ' [ClassfulMultiQueueing] Section Options' : [' ClassfulMultiQueueing' ],
229+ ' [BandMultiQueueing] Section Options' : [' BandMultiQueueing' ],
230+ ' [HeavyHitterFilter] Section Options' : [' HeavyHitterFilter' ],
231+ ' [QuickFairQueueing] Section Options' : [' QuickFairQueueing' ],
232+ ' [QuickFairQueueingClass] Section Options' : [' QuickFairQueueingClass' ],
233+ ' [BridgeVLAN] Section Options' : [' BridgeVLAN' ],
234+ ]
235+ ]
236+ ],
237+ ' link' :[
238+ ' systemd.link.xml' :
239+ [' sections' : [
240+ ' [Match] Section Options' : [' Match' ],
241+ ' [Link] Section Options' : [' Link' ],
242+ ' [SR-IOV] Section Options' : [' SR-IOV' ],
243+ ]
244+ ],
245+ ]
134246 ]
135247
136248 @Internal
@@ -229,15 +341,26 @@ class GenerateDataFromManPages extends DefaultTask {
229341 result = (NodeList )xpath. evaluate(
230342 " //variablelist[(contains(@class,'nspawn-directives'))]/varlistentry" ,
231343 records, XPathConstants . NODESET );
232- }
233- else {
344+ } else if (file. getAbsolutePath(). endsWith(" systemd.netdev.xml" )) {
345+ result = (NodeList )xpath. evaluate(
346+ " //variablelist[(contains(@class,'network-directives'))]/varlistentry" ,
347+ records, XPathConstants . NODESET );
348+ } else if (file. getAbsolutePath(). endsWith(" systemd.network.xml" )) {
349+ result = (NodeList )xpath. evaluate(
350+ " //variablelist[(contains(@class,'network-directives'))]/varlistentry" ,
351+ records, XPathConstants . NODESET );
352+ } else if (file. getAbsolutePath(). endsWith(" systemd.link.xml" )) {
353+ result = (NodeList )xpath. evaluate(
354+ " //variablelist[(contains(@class,'network-directives'))]/varlistentry" ,
355+ records, XPathConstants . NODESET );
356+ } else {
234357 result = (NodeList )xpath. evaluate(
235358 " //variablelist[(contains(@class,'unit-directives'))]/varlistentry" ,
236359 records, XPathConstants . NODESET );
237360 }
238361
239362 if (result. getLength() == 0 ) {
240- throw new IllegalStateException (" Could not find variables under $filename " )
363+ throw new IllegalStateException (" Could not find variables under $filename , this file type isn't handled " )
241364 }
242365
243366
0 commit comments