[libvirt] [PATCH 0/4] docs: Cleanup formatnetwork a bit

Jiri Denemark (4): formatnetwork: Remove useless </route> formatnetwork: Split long lines formatnetwork: Remove extra white space in examples formatnetwork: Properly mark attributes of /network/dns/srv docs/formatnetwork.html.in | 99 ++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 48 deletions(-) -- 2.11.0

Almost all XML examples use <tag .../> rather than <tag ...></tag> if the element is empty. Let's remove the two instances of the latter. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- docs/formatnetwork.html.in | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index 4fc779c26..27d7da1c3 100644 --- a/docs/formatnetwork.html.in +++ b/docs/formatnetwork.html.in @@ -824,8 +824,7 @@ <route address="192.168.222.0" prefix="24" gateway="192.168.122.2" /> <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" /> <route family="ipv6" address="2001:db8:ca2:3::" prefix="64" gateway="2001:db8:ca2:2::2"/> - <route family="ipv6" address="2001:db9:4:1::" prefix="64" gateway="2001:db8:ca2:2::3" metric='2'> - </route> + <route family="ipv6" address="2001:db9:4:1::" prefix="64" gateway="2001:db8:ca2:2::3" metric='2'/> ... </pre> @@ -1186,8 +1185,7 @@ <host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="lucas" ip="2001:db8:ca2:2:3::4" /> </dhcp> </ip> - <route family="ipv6" address="2001:db8:ca2:8::" prefix="64" gateway="2001:db8:ca2:7::4" > - </route> + <route family="ipv6" address="2001:db8:ca2:8::" prefix="64" gateway="2001:db8:ca2:7::4"/> </network></pre> <h3><a name="examplesPrivate">Isolated network config</a></h3> -- 2.11.0

Let's make sure all examples fit into their grey boxes. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- docs/formatnetwork.html.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index 27d7da1c3..31d2b8b0b 100644 --- a/docs/formatnetwork.html.in +++ b/docs/formatnetwork.html.in @@ -848,7 +848,8 @@ <forwarder addr="8.8.8.8"/> <forwarder domain='example.com' addr="8.8.4.4"/> <forwarder domain='www.example.com'/> - <srv service='name' protocol='tcp' domain='test-domain-name' target='.' port='1024' priority='10' weight='10'/> + <srv service='name' protocol='tcp' domain='test-domain-name' target='.' + port='1024' priority='10' weight='10'/> <host ip='192.168.122.2'> <hostname>myhost</hostname> <hostname>myhostalias</hostname> @@ -1157,7 +1158,8 @@ <host name="paul" ip="2001:db8:ca2:2:3::1" /> <host id="0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66" ip="2001:db8:ca2:2:3::2" /> <host id="0:3:0:1:0:16:3e:11:22:33" name="ralph" ip="2001:db8:ca2:2:3::3" /> - <host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="badbob" ip="2001:db8:ca2:2:3::4" /> + <host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" + name="badbob" ip="2001:db8:ca2:2:3::4"/> </dhcp> </ip> </network></pre> @@ -1182,7 +1184,8 @@ <ip family="ipv6" address="2001:db8:ca2:7::1" prefix="64" > <dhcp> <range start="2001:db8:ca2:7::100" end="2001:db8:ca2::1ff" /> - <host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="lucas" ip="2001:db8:ca2:2:3::4" /> + <host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" + name="lucas" ip="2001:db8:ca2:2:3::4"/> </dhcp> </ip> <route family="ipv6" address="2001:db8:ca2:8::" prefix="64" gateway="2001:db8:ca2:7::4"/> @@ -1230,7 +1233,8 @@ <host name="peter" ip="2001:db8:ca2:6:6::1" /> <host id="0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66" ip="2001:db8:ca2:6:6::2" /> <host id="0:3:0:1:0:16:3e:11:22:33" name="dariusz" ip="2001:db8:ca2:6:6::3" /> - <host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="anita" ip="2001:db8:ca2:6:6::4" /> + <host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" + name="anita" ip="2001:db8:ca2:6:6::4"/> </dhcp> </ip> </network></pre> -- 2.11.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- docs/formatnetwork.html.in | 74 +++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index 31d2b8b0b..a74724747 100644 --- a/docs/formatnetwork.html.in +++ b/docs/formatnetwork.html.in @@ -818,11 +818,11 @@ ... <ip address="192.168.122.1" netmask="255.255.255.0"> <dhcp> - <range start="192.168.122.128" end="192.168.122.254" /> + <range start="192.168.122.128" end="192.168.122.254"/> </dhcp> </ip> - <route address="192.168.222.0" prefix="24" gateway="192.168.122.2" /> - <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" /> + <route address="192.168.222.0" prefix="24" gateway="192.168.122.2"/> + <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64"/> <route family="ipv6" address="2001:db8:ca2:3::" prefix="64" gateway="2001:db8:ca2:2::2"/> <route family="ipv6" address="2001:db9:4:1::" prefix="64" gateway="2001:db8:ca2:2::3" metric='2'/> ... @@ -844,7 +844,7 @@ <mac address='00:16:3E:5D:C7:9E'/> <domain name="example.com"/> <dns> - <txt name="example" value="example value" /> + <txt name="example" value="example value"/> <forwarder addr="8.8.8.8"/> <forwarder domain='example.com' addr="8.8.4.4"/> <forwarder domain='www.example.com'/> @@ -857,13 +857,13 @@ </dns> <ip address="192.168.122.1" netmask="255.255.255.0"> <dhcp> - <range start="192.168.122.100" end="192.168.122.254" /> - <host mac="00:16:3e:77:e2:ed" name="foo.example.com" ip="192.168.122.10" /> - <host mac="00:16:3e:3e:a9:1a" name="bar.example.com" ip="192.168.122.11" /> + <range start="192.168.122.100" end="192.168.122.254"/> + <host mac="00:16:3e:77:e2:ed" name="foo.example.com" ip="192.168.122.10"/> + <host mac="00:16:3e:3e:a9:1a" name="bar.example.com" ip="192.168.122.11"/> </dhcp> </ip> -<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" /> -<route family="ipv6" address="2001:db9:ca1:1::" prefix="64" gateway="2001:db8:ca2:2::2" /> +<ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64"/> +<route family="ipv6" address="2001:db9:ca1:1::" prefix="64" gateway="2001:db8:ca2:2::2"/> </pre> <dl> @@ -1076,14 +1076,14 @@ <pre> <network> <name>default</name> - <bridge name="virbr0" /> + <bridge name="virbr0"/> <forward mode="nat"/> <ip address="192.168.122.1" netmask="255.255.255.0"> <dhcp> - <range start="192.168.122.2" end="192.168.122.254" /> + <range start="192.168.122.2" end="192.168.122.254"/> </dhcp> </ip> - <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" /> + <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64"/> </network></pre> @@ -1095,16 +1095,16 @@ <pre> <network> <name>default6</name> - <bridge name="virbr0" /> + <bridge name="virbr0"/> <forward mode="nat"/> <ip address="192.168.122.1" netmask="255.255.255.0"> <dhcp> - <range start="192.168.122.2" end="192.168.122.254" /> + <range start="192.168.122.2" end="192.168.122.254"/> </dhcp> </ip> - <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" > + <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64"> <dhcp> - <range start="2001:db8:ca2:2:1::10" end="2001:db8:ca2:2:1::ff" /> + <range start="2001:db8:ca2:2:1::10" end="2001:db8:ca2:2:1::ff"/> </dhcp> </ip> </network></pre> @@ -1123,14 +1123,14 @@ <pre> <network> <name>local</name> - <bridge name="virbr1" /> + <bridge name="virbr1"/> <forward mode="route" dev="eth1"/> <ip address="192.168.122.1" netmask="255.255.255.0"> <dhcp> - <range start="192.168.122.2" end="192.168.122.254" /> + <range start="192.168.122.2" end="192.168.122.254"/> </dhcp> </ip> - <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" /> + <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64"/> </network></pre> <p> @@ -1146,18 +1146,18 @@ <pre> <network> <name>local6</name> - <bridge name="virbr1" /> + <bridge name="virbr1"/> <forward mode="route" dev="eth1"/> <ip address="192.168.122.1" netmask="255.255.255.0"> <dhcp> - <range start="192.168.122.2" end="192.168.122.254" /> + <range start="192.168.122.2" end="192.168.122.254"/> </dhcp> </ip> - <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64" > + <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64"> <dhcp> - <host name="paul" ip="2001:db8:ca2:2:3::1" /> - <host id="0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66" ip="2001:db8:ca2:2:3::2" /> - <host id="0:3:0:1:0:16:3e:11:22:33" name="ralph" ip="2001:db8:ca2:2:3::3" /> + <host name="paul" ip="2001:db8:ca2:2:3::1"/> + <host id="0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66" ip="2001:db8:ca2:2:3::2"/> + <host id="0:3:0:1:0:16:3e:11:22:33" name="ralph" ip="2001:db8:ca2:2:3::3"/> <host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="badbob" ip="2001:db8:ca2:2:3::4"/> </dhcp> @@ -1179,11 +1179,11 @@ <pre> <network> <name>net7</name> - <bridge name="virbr7" /> + <bridge name="virbr7"/> <forward mode="route"/> - <ip family="ipv6" address="2001:db8:ca2:7::1" prefix="64" > + <ip family="ipv6" address="2001:db8:ca2:7::1" prefix="64"> <dhcp> - <range start="2001:db8:ca2:7::100" end="2001:db8:ca2::1ff" /> + <range start="2001:db8:ca2:7::100" end="2001:db8:ca2::1ff"/> <host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="lucas" ip="2001:db8:ca2:2:3::4"/> </dhcp> @@ -1204,13 +1204,13 @@ <pre> <network> <name>private</name> - <bridge name="virbr2" /> + <bridge name="virbr2"/> <ip address="192.168.152.1" netmask="255.255.255.0"> <dhcp> - <range start="192.168.152.2" end="192.168.152.254" /> + <range start="192.168.152.2" end="192.168.152.254"/> </dhcp> </ip> - <ip family="ipv6" address="2001:db8:ca2:3::1" prefix="64" /> + <ip family="ipv6" address="2001:db8:ca2:3::1" prefix="64"/> </network></pre> <h3><a name="examplesPrivate6">Isolated IPv6 network config</a></h3> @@ -1227,12 +1227,12 @@ <pre> <network> <name>sixnet</name> - <bridge name="virbr6" /> - <ip family="ipv6" address="2001:db8:ca2:6::1" prefix="64" > + <bridge name="virbr6"/> + <ip family="ipv6" address="2001:db8:ca2:6::1" prefix="64"> <dhcp> - <host name="peter" ip="2001:db8:ca2:6:6::1" /> - <host id="0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66" ip="2001:db8:ca2:6:6::2" /> - <host id="0:3:0:1:0:16:3e:11:22:33" name="dariusz" ip="2001:db8:ca2:6:6::3" /> + <host name="peter" ip="2001:db8:ca2:6:6::1"/> + <host id="0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66" ip="2001:db8:ca2:6:6::2"/> + <host id="0:3:0:1:0:16:3e:11:22:33" name="dariusz" ip="2001:db8:ca2:6:6::3"/> <host id="0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63" name="anita" ip="2001:db8:ca2:6:6::4"/> </dhcp> @@ -1308,7 +1308,7 @@ <network ipv6='yes'> <name>nogw</name> <uuid>7a3b7497-1ec7-8aef-6d5c-38dff9109e93</uuid> - <bridge name="virbr2" stp="on" delay="0" /> + <bridge name="virbr2" stp="on" delay="0"/> <mac address='00:16:3E:5D:C7:9E'/> </network></pre> -- 2.11.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- docs/formatnetwork.html.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index a74724747..cc7d7c7e7 100644 --- a/docs/formatnetwork.html.in +++ b/docs/formatnetwork.html.in @@ -958,9 +958,10 @@ <dd>The <code>dns</code> element can have also 0 or more <code>srv</code> record elements. Each <code>srv</code> record element defines a DNS SRV record and has 2 mandatory and 5 optional attributes. The mandatory attributes - are service name and protocol (tcp, udp) and the optional attributes are - target, port, priority, weight and domain as defined in DNS server SRV - RFC (RFC 2782). + are service <code>name</code> and <code>protocol</code> (tcp, udp) + and the optional attributes are <code>target</code>, + <code>port</code>, <code>priority</code>, <code>weight</code> and + <code>domain</code> as defined in DNS server SRV RFC (RFC 2782). <span class="since">Since 0.9.9</span> </dd> </dl> -- 2.11.0

On 07.12.2016 11:08, Jiri Denemark wrote:
Jiri Denemark (4): formatnetwork: Remove useless </route> formatnetwork: Split long lines formatnetwork: Remove extra white space in examples formatnetwork: Properly mark attributes of /network/dns/srv
docs/formatnetwork.html.in | 99 ++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 48 deletions(-)
ACK Michal
participants (2)
-
Jiri Denemark
-
Michal Privoznik