author | František Kučera <franta-hg@frantovo.cz> |
Thu, 25 Jul 2019 22:16:12 +0200 | |
branch | v_0 |
changeset 263 | 8bf13358a50a |
child 264 | d39cfc926f95 |
permissions | -rw-r--r-- |
263
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
1 |
<stránka |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
2 |
xmlns="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/strana" |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
3 |
xmlns:m="https://trac.frantovo.cz/xml-web-generator/wiki/xmlns/makro"> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
4 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
5 |
<nadpis>Reading Libvirt XML files using XMLTable</nadpis> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
6 |
<perex>converting arbitrary XML into one or more relations</perex> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
7 |
<m:pořadí-příkladu>02700</m:pořadí-příkladu> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
8 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
9 |
<text xmlns="http://www.w3.org/1999/xhtml"> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
10 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
11 |
<p> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
12 |
<a href="https://libvirt.org/">Libvirt</a> is a popular API/tool for managing virtual machines (KVM/Qemu, LXC etc.) and stores its configuration in XML files. |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
13 |
Thanks to the tool <code>relpipe-in-xmltable</code> we can get aggregated overview of our virtual machines. |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
14 |
This tool does similar job like the <a href="https://www.postgresql.org/docs/current/functions-xml.html">xmltable</a> function known from SQL. |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
15 |
It uses the <a href="https://www.w3.org/TR/xpath/all/">XPath</a> language for selecting parts of the input XML – one XPath expression points to record nodes |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
16 |
and one or more XPath expressions point to attribute nodes/values relatively to particular record node. |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
17 |
Our tool is able to produce one or more relations from a single XML input. |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
18 |
The input is parsed at once and converted to DOM in memory i.e. no streaming – thus processing of huge XML files requires appropriate amounts of RAM, on the other hand: |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
19 |
our expression can access whole XML document and pick values not only from currently processed record node. |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
20 |
</p> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
21 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
22 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
23 |
<p>These XML config files contain lot of information describing given virtual machine:</p> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
24 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
25 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
26 |
<m:pre jazyk="xml"><![CDATA[<?xml version="1.0" encoding="utf8"?> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
27 |
<domain type="kvm"> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
28 |
<name>relpipe-1</name> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
29 |
<uuid>36d1e8b2-97e9-40cb-9fc2-306ebf989282</uuid> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
30 |
<memory unit="KiB">1048576</memory> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
31 |
<currentMemory unit="KiB">1048576</currentMemory> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
32 |
<vcpu placement="static">2</vcpu> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
33 |
<os> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
34 |
<type arch="x86_64" machine="pc-i440fx-bionic">hvm</type> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
35 |
<boot dev="hd"/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
36 |
</os> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
37 |
<features> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
38 |
<acpi/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
39 |
<apic/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
40 |
<vmport state="off"/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
41 |
</features> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
42 |
<cpu mode="custom" match="exact" check="partial"> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
43 |
<model fallback="allow">Opteron_G5</model> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
44 |
</cpu> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
45 |
<clock offset="utc"> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
46 |
<timer name="rtc" tickpolicy="catchup"/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
47 |
<timer name="pit" tickpolicy="delay"/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
48 |
<timer name="hpet" present="no"/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
49 |
</clock> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
50 |
… |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
51 |
<devices> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
52 |
<emulator>/usr/bin/kvm-spice</emulator> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
53 |
<disk type='file' device='disk'> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
54 |
<driver name='qemu' type='qcow2'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
55 |
<source file='/mnt/kvm-image/relpipe-1.qcow2'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
56 |
<target dev='vda' bus='virtio'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
57 |
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
58 |
</disk> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
59 |
<disk type='file' device='cdrom'> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
60 |
<driver name='qemu' type='raw'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
61 |
<target dev='hda' bus='ide'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
62 |
<readonly/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
63 |
<address type='drive' controller='0' bus='0' target='0' unit='0'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
64 |
</disk> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
65 |
… |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
66 |
<interface type='bridge'> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
67 |
<mac address='52:54:e9:f2:f6:bb'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
68 |
<source bridge='br0'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
69 |
<model type='virtio'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
70 |
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
71 |
</interface> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
72 |
… |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
73 |
</devices> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
74 |
</domain>]]></m:pre> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
75 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
76 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
77 |
<p>If we are interested only in certain parts, we can pick them using a command like this one:</p> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
78 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
79 |
<m:pre jazyk="bash"><![CDATA[cat /etc/libvirt/qemu/relpipe-1.xml \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
80 |
| relpipe-in-xmltable \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
81 |
--relation "machine" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
82 |
--records "/domain" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
83 |
--attribute "uuid" string "uuid" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
84 |
--attribute "name" string "name" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
85 |
--attribute "memory_size" integer "memory" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
86 |
--attribute "memory_unit" string "memory/@unit" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
87 |
--attribute "cpu_count" integer "vcpu" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
88 |
--relation "storage" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
89 |
--records "/domain/devices/disk" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
90 |
--attribute "machine" string "/domain/uuid" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
91 |
--attribute "type" string "@device" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
92 |
--attribute "format" string "driver/@type" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
93 |
--attribute "source" string "source/@file" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
94 |
--attribute "target_dev" string "target/@dev" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
95 |
--attribute "target_type" string "target/@bus" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
96 |
--relation "network_interface" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
97 |
--records "/domain/devices/interface" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
98 |
--attribute "machine" string "/domain/uuid" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
99 |
--attribute "mac" string "mac/@address" \ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
100 |
| relpipe-out-tabular]]></m:pre> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
101 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
102 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
103 |
<p>And get three relations:</p> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
104 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
105 |
<pre><![CDATA[machine: |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
106 |
╭──────────────────────────────────────┬───────────────┬───────────────────────┬──────────────────────┬─────────────────────╮ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
107 |
│ uuid (string) │ name (string) │ memory_size (integer) │ memory_unit (string) │ cpu_count (integer) │ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
108 |
├──────────────────────────────────────┼───────────────┼───────────────────────┼──────────────────────┼─────────────────────┤ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
109 |
│ 36d1e8b2-97e9-40cb-9fc2-306ebf989282 │ relpipe-1 │ 1048576 │ KiB │ 2 │ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
110 |
╰──────────────────────────────────────┴───────────────┴───────────────────────┴──────────────────────┴─────────────────────╯ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
111 |
Record count: 1 |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
112 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
113 |
storage: |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
114 |
╭──────────────────────────────────────┬───────────────┬─────────────────┬─────────────────────────────────┬─────────────────────┬──────────────────────╮ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
115 |
│ machine (string) │ type (string) │ format (string) │ source (string) │ target_dev (string) │ target_type (string) │ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
116 |
├──────────────────────────────────────┼───────────────┼─────────────────┼─────────────────────────────────┼─────────────────────┼──────────────────────┤ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
117 |
│ 36d1e8b2-97e9-40cb-9fc2-306ebf989282 │ disk │ qcow2 │ /mnt/kvm-image/relpipe-1.qcow2 │ vda │ virtio │ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
118 |
│ 36d1e8b2-97e9-40cb-9fc2-306ebf989282 │ cdrom │ raw │ │ hda │ ide │ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
119 |
╰──────────────────────────────────────┴───────────────┴─────────────────┴─────────────────────────────────┴─────────────────────┴──────────────────────╯ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
120 |
Record count: 2 |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
121 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
122 |
network_interface: |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
123 |
╭──────────────────────────────────────┬───────────────────╮ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
124 |
│ machine (string) │ mac (string) │ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
125 |
├──────────────────────────────────────┼───────────────────┤ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
126 |
│ 36d1e8b2-97e9-40cb-9fc2-306ebf989282 │ 52:54:e9:f2:f6:bb │ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
127 |
╰──────────────────────────────────────┴───────────────────╯ |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
128 |
Record count: 1]]></pre> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
129 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
130 |
<p> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
131 |
Each record contain ID of the machine, thus if we collect data from several VMs, |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
132 |
we can JOIN relevant records together, do some aggregations or statistics. |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
133 |
If we are sure that the <code>name</code> field is unique, we can use it as a key instead of the UUID. |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
134 |
</p> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
135 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
136 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
137 |
</text> |
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
138 |
|
8bf13358a50a
examples: relpipe-in-xmltable
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
139 |
</stránka> |