domain.rng 67.4 KB
Newer Older
1 2
<?xml version="1.0"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3 4
  <!-- We handle only document defining a domain -->
  <start>
5
    <ref name="domain"/>
6
  </start>
7

8
  <include href='basictypes.rng'/>
9
  <include href='storageencryption.rng'/>
10
  <include href='networkcommon.rng'/>
11 12 13 14 15 16 17 18 19 20

  <!--
    description element, maybe placed anywhere under the root
    -->
  <define name="description">
    <element name="description">
      <text/>
    </element>
  </define>

21
  <!--
22
      We handle only document defining a domain
23
    -->
24
  <define name="domain">
25
    <element name="domain">
26 27
      <ref name="hvs"/>
      <ref name="ids"/>
28
      <interleave>
29 30 31
        <optional>
          <ref name="description"/>
        </optional>
J
Jiri Denemark 已提交
32 33 34
        <optional>
          <ref name="cpu"/>
        </optional>
35 36 37
        <optional>
          <ref name="sysinfo"/>
        </optional>
38 39 40 41 42 43 44 45 46 47 48
        <ref name="os"/>
        <ref name="clock"/>
        <ref name="resources"/>
        <ref name="features"/>
        <ref name="termination"/>
        <optional>
          <ref name="devices"/>
        </optional>
        <optional>
          <ref name="seclabel"/>
        </optional>
49 50 51
        <optional>
          <ref name='qemucmdline'/>
        </optional>
52
      </interleave>
53
    </element>
54
  </define>
55 56 57 58
  <define name="seclabel">
    <element name="seclabel">
      <attribute name="model">
        <text/>
59
      </attribute>
60
      <attribute name="type">
61 62 63 64
        <choice>
          <value>dynamic</value>
          <value>static</value>
        </choice>
65 66 67 68 69 70
      </attribute>
      <attribute name="relabel">
        <choice>
          <value>yes</value>
          <value>no</value>
        </choice>
71
      </attribute>
72 73
      <element name="label">
        <text/>
74
      </element>
75 76 77
      <element name="imagelabel">
        <text/>
      </element>
78 79 80
      <element name="baselabel">
        <text/>
      </element>
81 82
    </element>
  </define>
83 84
  <define name="hvs">
    <attribute name="type">
85
      <choice>
86 87 88 89 90 91 92
        <value>xen</value>
        <value>kvm</value>
        <value>kqemu</value>
        <value>qemu</value>
        <value>lxc</value>
        <value>openvz</value>
        <value>test</value>
93 94 95
      </choice>
    </attribute>
  </define>
96
  <define name="os">
97
    <choice>
98 99 100
      <ref name="osxen"/>
      <ref name="oshvm"/>
      <ref name="osexe"/>
101 102
    </choice>
  </define>
103
  <define name="osxen">
104 105
    <choice>
      <group>
106 107 108 109 110 111 112
        <optional>
          <ref name="bootloader"/>
        </optional>
        <element name="os">
          <ref name="ostypexen"/>
          <ref name="osbootkernel"/>
        </element>
113 114
      </group>
      <group>
115 116 117 118 119 120 121 122 123
        <ref name="bootloader"/>
        <optional>
          <element name="os">
            <ref name="ostypexen"/>
            <optional>
              <ref name="osbootkernel"/>
            </optional>
          </element>
        </optional>
124 125 126
      </group>
    </choice>
  </define>
127 128 129
  <define name="oshvm">
    <element name="os">
      <ref name="ostypehvm"/>
130
      <interleave>
131 132 133 134 135 136 137
        <optional>
          <element name="loader">
            <ref name="absFilePath"/>
          </element>
        </optional>
        <choice>
          <ref name="osbootkernel"/>
138
          <zeroOrMore>
139
            <ref name="osbootdev"/>
140
          </zeroOrMore>
141
        </choice>
142 143 144 145 146 147 148 149 150 151
        <optional>
          <element name="bootmenu">
            <attribute name="enable">
              <choice>
                <value>yes</value>
                <value>no</value>
              </choice>
            </attribute>
          </element>
        </optional>
152 153 154
        <optional>
          <ref name="smbios"/>
        </optional>
M
Michal Privoznik 已提交
155 156 157
        <optional>
          <ref name="bios"/>
        </optional>
158
      </interleave>
159 160
    </element>
  </define>
161 162
  <define name="ostypexen">
    <element name="type">
163
      <optional>
164 165 166 167 168 169 170
        <attribute name="arch">
          <choice>
            <value>i686</value>
            <value>x86_64</value>
            <value>ia64</value>
          </choice>
        </attribute>
171 172
      </optional>
      <optional>
173 174 175 176 177 178
        <attribute name="machine">
          <choice>
            <value>xenpv</value>
            <value>xenner</value>
          </choice>
        </attribute>
179 180
      </optional>
      <choice>
181 182
        <value>xen</value>
        <value>linux</value>
183 184 185
      </choice>
    </element>
  </define>
186 187
  <define name="ostypehvm">
    <element name="type">
188
      <optional>
189 190 191 192 193 194
        <choice>
          <ref name="hvmx86"/>
          <ref name="hvmmips"/>
          <ref name="hvmsparc"/>
          <ref name="hvmppc"/>
        </choice>
195 196 197
      </optional>
      <value>hvm</value>
    </element>
198
  </define>
199
  <define name="hvmx86">
200
    <group>
201 202 203 204 205 206 207 208 209 210
      <optional>
        <attribute name="arch">
          <choice>
            <value>i686</value>
            <value>x86_64</value>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="machine">
211 212 213
          <data type="string">
            <param name="pattern">[a-zA-Z0-9_\.\-]+</param>
          </data>
214
        </attribute>
215
      </optional>
216 217
    </group>
  </define>
218
  <define name="hvmmips">
219
    <group>
220 221 222 223 224 225 226 227 228 229
      <optional>
        <attribute name="arch">
          <value>mips</value>
        </attribute>
      </optional>
      <optional>
        <attribute name="machine">
          <value>mips</value>
        </attribute>
      </optional>
230 231
    </group>
  </define>
232
  <define name="hvmsparc">
233
    <group>
234 235 236 237 238 239 240 241 242 243
      <optional>
        <attribute name="arch">
          <value>sparc</value>
        </attribute>
      </optional>
      <optional>
        <attribute name="machine">
          <value>sun4m</value>
        </attribute>
      </optional>
244 245
    </group>
  </define>
246
  <define name="hvmppc">
247
    <group>
248 249 250 251 252 253 254 255 256 257 258 259 260 261
      <optional>
        <attribute name="arch">
          <value>ppc</value>
        </attribute>
      </optional>
      <optional>
        <attribute name="machine">
          <choice>
            <value>g3beige</value>
            <value>mac99</value>
            <value>prep</value>
          </choice>
        </attribute>
      </optional>
262 263
    </group>
  </define>
264 265 266 267
  <define name="osexe">
    <element name="os">
      <element name="type">
        <value>exe</value>
268 269
      </element>
      <interleave>
270 271 272 273 274
        <optional>
          <element name="init">
            <ref name="absFilePath"/>
          </element>
        </optional>
275 276 277
      </interleave>
    </element>
  </define>
278
  <!--
279 280 281 282 283
      The Identifiers can be:
      - an optional id attribute with a number on the domain element
      - a mandatory name
      - an optional uuid
    -->
284
  <define name="ids">
285
    <optional>
286 287
      <attribute name="id">
        <ref name="unsignedInt"/>
288 289 290 291
      </attribute>
    </optional>
    <interleave>
      <element name="name">
292
        <ref name="domainName"/>
293 294 295
      </element>
      <optional>
        <element name="uuid">
296
          <ref name="UUID"/>
297 298 299 300 301 302 303
        </element>
      </optional>
    </interleave>
  </define>
  <!--
      Resources usage defines the amount of memory (maximum and possibly
      current usage) and number of virtual CPUs used by that domain.
304
      We can't check here the rule that currentMemory <= memory
305
    -->
306
  <define name="resources">
307
    <interleave>
308 309
      <element name="memory">
        <ref name="memoryKB"/>
310
      </element>
311
      <optional>
312 313
        <element name="currentMemory">
          <ref name="memoryKB"/>
314 315
        </element>
      </optional>
316
      <optional>
R
Richard Jones 已提交
317 318 319 320 321 322 323
        <element name="memoryBacking">
          <optional>
            <element name="hugepages">
              <empty/>
            </element>
          </optional>
        </element>
324
      </optional>
325

326 327 328 329 330 331 332 333 334 335 336 337
      <!-- The Blkio cgroup related tunables would go in the blkiotune -->
      <optional>
        <element name="blkiotune">
          <!-- I/O weight the VM can use -->
          <optional>
            <element name="weight">
              <ref name="weight"/>
            </element>
          </optional>
        </element>
      </optional>

338 339
      <!-- All the memory/swap related tunables would go in the memtune -->
      <optional>
D
Daniel Veillard 已提交
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
        <element name="memtune">
          <!-- Maximum memory the VM can use -->
          <optional>
            <element name="hard_limit">
              <ref name="memoryKB"/>
            </element>
          </optional>
          <!-- Minimum memory ascertained for the VM during contention -->
          <optional>
            <element name="soft_limit">
              <ref name="memoryKB"/>
            </element>
          </optional>
          <!-- Minimum amount of memory required to start the VM -->
          <optional>
            <element name="min_guarantee">
              <ref name="memoryKB"/>
            </element>
          </optional>
          <!-- Maximum swap area the VM can use -->
          <optional>
            <element name="swap_hard_limit">
              <ref name="memoryKB"/>
            </element>
          </optional>
        </element>
366 367
      </optional>

368
      <optional>
369
        <element name="vcpu">
370
          <optional>
E
Eric Blake 已提交
371 372 373
            <attribute name="cpuset">
              <ref name="cpuset"/>
            </attribute>
374
          </optional>
375 376 377 378 379
          <optional>
            <attribute name="current">
              <ref name="countCPU"/>
            </attribute>
          </optional>
380
          <ref name="countCPU"/>
381 382
        </element>
      </optional>
383 384 385 386 387 388 389 390 391

      <!-- All the cpu related tunables would go in the cputune -->
      <optional>
        <element name="cputune">
          <optional>
            <element name="shares">
              <ref name="cpushares"/>
            </element>
          </optional>
W
Wen Congyang 已提交
392 393 394 395 396 397 398 399 400 401
          <optional>
            <element name="period">
              <ref name="cpuperiod"/>
            </element>
          </optional>
          <optional>
            <element name="quota">
              <ref name="cpuquota"/>
            </element>
          </optional>
402 403 404 405 406 407 408 409 410 411 412 413
          <zeroOrMore>
            <element name="vcpupin">
              <attribute name="vcpu">
                <ref name="vcpuid"/>
              </attribute>
              <attribute name="cpuset">
                <ref name="cpuset"/>
              </attribute>
            </element>
          </zeroOrMore>
        </element>
      </optional>
O
Osier Yang 已提交
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433

      <!-- All the NUMA related tunables would go in the numatune -->
      <optional>
        <element name="numatune">
          <optional>
            <element name="memory">
              <attribute name="mode">
                <choice>
                  <value>strict</value>
                  <value>preferred</value>
                  <value>interleave</value>
                </choice>
              </attribute>
              <attribute name="nodeset">
                <ref name="cpuset"/>
              </attribute>
            </element>
          </optional>
        </element>
      </optional>
434 435
    </interleave>
  </define>
436
  <define name="clock">
437
    <optional>
438
      <element name="clock">
439 440
        <choice>
          <attribute name="offset">
441
            <value>localtime</value>
442 443
          </attribute>
          <attribute name="offset">
444
            <value>utc</value>
445
          </attribute>
446 447 448 449 450 451 452 453 454 455
          <group>
            <attribute name="offset">
              <value>timezone</value>
            </attribute>
            <optional>
              <attribute name="timezone">
                <ref name="timeZone"/>
              </attribute>
            </optional>
          </group>
456 457 458 459 460 461 462 463 464 465 466
          <group>
            <attribute name="offset">
              <value>variable</value>
            </attribute>
            <optional>
              <attribute name="adjustment">
                <ref name="timeDelta"/>
              </attribute>
            </optional>
          </group>
        </choice>
467 468 469
        <zeroOrMore>
          <ref name="timer"/>
        </zeroOrMore>
470 471 472
      </element>
    </optional>
  </define>
L
Laine Stump 已提交
473 474 475 476 477 478 479 480 481 482 483 484
  <define name="timer">
    <element name="timer">
      <attribute name="name">
        <choice>
          <value>platform</value>
          <value>pit</value>
          <value>rtc</value>
          <value>hpet</value>
          <value>tsc</value>
        </choice>
      </attribute>
      <optional>
485
        <attribute name="track">
L
Laine Stump 已提交
486
          <choice>
487
            <value>boot</value>
L
Laine Stump 已提交
488
            <value>guest</value>
489
            <value>wall</value>
L
Laine Stump 已提交
490 491 492 493 494 495 496 497 498 499 500 501 502
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="tickpolicy">
          <choice>
            <value>delay</value>
            <value>catchup</value>
            <value>merge</value>
            <value>discard</value>
          </choice>
        </attribute>
      </optional>
503 504 505
      <optional>
        <ref name="catchup"/>
      </optional>
L
Laine Stump 已提交
506 507 508 509 510 511 512 513 514 515 516 517
      <optional>
        <attribute name="frequency">
          <ref name="unsignedInt"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="mode">
          <choice>
            <value>auto</value>
            <value>native</value>
            <value>emulate</value>
            <value>paravirt</value>
518
            <value>smpsafe</value>
L
Laine Stump 已提交
519 520 521 522 523 524 525 526 527 528 529 530 531 532
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="present">
          <choice>
            <value>yes</value>
            <value>no</value>
          </choice>
        </attribute>
      </optional>
      <empty/>
    </element>
  </define>
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547
  <define name="catchup">
    <element name="catchup">
      <optional>
        <attribute name="threshold">
          <ref name="unsignedInt"/>
        </attribute>
        <attribute name="slew">
          <ref name="unsignedInt"/>
        </attribute>
        <attribute name="limit">
          <ref name="unsignedInt"/>
        </attribute>
      </optional>
    </element>
  </define>
L
Laine Stump 已提交
548
<!--
549 550 551 552
      A bootloader may be used to extract the OS information instead of
      defining the OS parameter in the instance. It points just to the
      binary or script used to extract the data from the first disk device.
    -->
553
  <define name="bootloader">
554
    <interleave>
555 556 557 558 559
      <element name="bootloader">
        <choice>
          <ref name="absFilePath"/>
          <empty/>
        </choice>
560 561
      </element>
      <optional>
562 563 564
        <element name="bootloader_args">
          <text/>
        </element>
565 566
      </optional>
    </interleave>
567
  </define>
568
  <define name="osbootkernel">
569
    <interleave>
570 571 572 573 574
      <optional>
        <element name="kernel">
          <ref name="absFilePath"/>
        </element>
      </optional>
575
      <optional>
576 577 578
        <element name="initrd">
          <ref name="absFilePath"/>
        </element>
579
      </optional>
580
      <optional>
581
        <element name="root">
582
          <ref name="absFilePath"/>
583 584
        </element>
      </optional>
585
      <optional>
586 587 588
        <element name="cmdline">
          <text/>
        </element>
589 590 591
      </optional>
    </interleave>
  </define>
592 593 594
  <define name="osbootdev">
    <element name="boot">
      <attribute name="dev">
595 596 597 598 599 600 601 602
        <choice>
          <value>hd</value>
          <value>fd</value>
          <value>cdrom</value>
          <value>network</value>
        </choice>
      </attribute>
      <empty/>
603
    </element>
604
  </define>
605
  <define name="diskspec">
606
    <optional>
607
      <ref name="driver"/>
608
    </optional>
609
    <ref name="target"/>
610 611 612
    <optional>
      <ref name="deviceBoot"/>
    </optional>
613
    <optional>
614
      <element name="readonly">
615
        <empty/>
616
      </element>
617 618
    </optional>
    <optional>
619
      <element name="shareable">
620 621 622
        <empty/>
      </element>
    </optional>
623 624 625 626 627
    <optional>
      <element name="serial">
        <ref name="diskSerial"/>
      </element>
    </optional>
628 629 630
    <optional>
      <ref name="encryption"/>
    </optional>
631 632 633
    <optional>
      <ref name="address"/>
    </optional>
634
  </define>
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657

  <define name="lease">
    <element name="lease">
      <interleave>
        <element name="lockspace">
          <text/>
        </element>
        <element name="key">
          <text/>
        </element>
        <element name="target">
          <attribute name="path">
            <text/>
          </attribute>
          <optional>
            <attribute name="offset">
              <ref name="unsignedInt"/>
            </attribute>
          </optional>
        </element>
      </interleave>
    </element>
  </define>
658 659 660 661 662
  <!--
      A disk description can be either of type file or block
      The name of the attribute on the source element depends on the type

    -->
663 664
  <define name="disk">
    <element name="disk">
665
      <optional>
666 667 668 669 670 671 672
        <attribute name="device">
          <choice>
            <value>floppy</value>
            <value>disk</value>
            <value>cdrom</value>
          </choice>
        </attribute>
673
      </optional>
674 675
      <choice>
        <group>
676 677
          <attribute name="type">
            <value>file</value>
678
          </attribute>
679 680 681 682 683 684 685 686 687 688 689
          <interleave>
            <optional>
              <element name="source">
                <attribute name="file">
                  <ref name="absFilePath"/>
                </attribute>
                <empty/>
              </element>
            </optional>
            <ref name="diskspec"/>
          </interleave>
690 691
        </group>
        <group>
692 693 694 695 696 697 698
          <attribute name="type">
            <value>block</value>
          </attribute>
          <interleave>
            <optional>
              <element name="source">
                <attribute name="dev">
699
                  <ref name="absFilePath"/>
700 701 702 703 704 705
                </attribute>
                <empty/>
              </element>
            </optional>
            <ref name="diskspec"/>
          </interleave>
706
        </group>
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722
        <group>
          <attribute name="type">
            <value>dir</value>
          </attribute>
          <interleave>
            <optional>
              <element name="source">
                <attribute name="dir">
                  <ref name="absFilePath"/>
                </attribute>
                <empty/>
              </element>
            </optional>
            <ref name="diskspec"/>
          </interleave>
        </group>
M
MORITA Kazutaka 已提交
723 724 725 726 727 728 729 730 731 732 733 734 735 736
        <group>
          <attribute name="type">
            <value>network</value>
          </attribute>
          <interleave>
            <optional>
              <element name="source">
                <attribute name="protocol">
                  <choice>
                    <value>nbd</value>
                    <value>rbd</value>
                    <value>sheepdog</value>
                  </choice>
                </attribute>
737 738 739
                <optional>
                  <attribute name="name"/>
                </optional>
M
MORITA Kazutaka 已提交
740 741 742
                <zeroOrMore>
                  <element name="host">
                    <attribute name="name">
743
                      <ref name="dnsName"/>
M
MORITA Kazutaka 已提交
744 745 746 747 748 749 750 751 752 753 754 755
                    </attribute>
                    <attribute name="port">
                      <ref name="unsignedInt"/>
                    </attribute>
                  </element>
                </zeroOrMore>
                <empty/>
              </element>
            </optional>
            <ref name="diskspec"/>
          </interleave>
        </group>
756
        <ref name="diskspec"/>
757 758 759
      </choice>
    </element>
  </define>
760 761 762 763
  <define name="target">
    <element name="target">
      <attribute name="dev">
        <ref name="deviceName"/>
764
      </attribute>
765
      <optional>
766 767 768 769 770 771 772 773 774 775 776
        <attribute name="bus">
          <choice>
            <value>ide</value>
            <value>fdc</value>
            <value>scsi</value>
            <value>virtio</value>
            <value>xen</value>
            <value>usb</value>
            <value>uml</value>
          </choice>
        </attribute>
777
      </optional>
778 779 780
    </element>
  </define>
  <!--
781
      Disk may use a special driver for access. Currently this is
782 783 784
      only defined for Xen for tap/aio and file, but will certainly be
      extended in the future, and libvirt doesn't look for specific values.
    -->
785 786
  <define name="driver">
    <element name="driver">
787
      <choice>
788 789 790 791 792 793 794 795 796 797 798 799
        <group>
          <ref name="driverFormat"/>
          <optional>
            <ref name="driverCache"/>
          </optional>
        </group>
        <group>
          <optional>
            <ref name="driverFormat"/>
          </optional>
          <ref name="driverCache"/>
        </group>
800
      </choice>
801 802 803
      <optional>
        <ref name="driverErrorPolicy"/>
      </optional>
M
Matthias Dahl 已提交
804 805 806
      <optional>
        <ref name="driverIO"/>
      </optional>
807 808 809
      <optional>
        <ref name="ioeventfd"/>
      </optional>
810 811 812
      <optional>
        <ref name="event_idx"/>
      </optional>
813 814
      <empty/>
    </element>
815
  </define>
816 817 818
  <define name="driverFormat">
    <attribute name="name">
      <ref name="genericName"/>
819 820
    </attribute>
    <optional>
821 822
      <attribute name="type">
        <ref name="genericName"/>
823 824 825
      </attribute>
    </optional>
  </define>
826 827
  <define name="driverCache">
    <attribute name="cache">
828
      <choice>
829 830 831
        <value>none</value>
        <value>writeback</value>
        <value>writethrough</value>
832
        <value>directsync</value>
833 834 835
      </choice>
    </attribute>
  </define>
836 837 838 839 840
  <define name="driverErrorPolicy">
    <attribute name="error_policy">
      <choice>
        <value>stop</value>
        <value>ignore</value>
841
        <value>enospace</value>
842 843 844
      </choice>
    </attribute>
  </define>
M
Matthias Dahl 已提交
845 846 847 848 849 850 851 852
  <define name="driverIO">
    <attribute name="io">
      <choice>
        <value>threads</value>
        <value>native</value>
      </choice>
    </attribute>
  </define>
853 854 855 856 857 858 859 860
  <define name="ioeventfd">
    <attribute name="ioeventfd">
      <choice>
        <value>on</value>
        <value>off</value>
      </choice>
    </attribute>
  </define>
861 862 863 864 865 866 867 868
  <define name="event_idx">
    <attribute name="event_idx">
      <choice>
        <value>on</value>
        <value>off</value>
      </choice>
    </attribute>
  </define>
869 870
  <define name="controller">
    <element name="controller">
871 872 873 874 875 876 877 878 879
      <choice>
        <group>
          <optional>
            <attribute name="type">
              <choice>
                <value>fdc</value>
                <value>ide</value>
                <value>scsi</value>
                <value>sata</value>
880
                <value>ccid</value>
881
                <value>usb</value>
882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902
              </choice>
            </attribute>
          </optional>
        </group>
        <!-- virtio-serial can have 2 additional attributes -->
        <group>
          <attribute name="type">
            <value>virtio-serial</value>
          </attribute>
          <optional>
            <attribute name="ports">
              <ref name="unsignedInt"/>
            </attribute>
          </optional>
          <optional>
            <attribute name="vectors">
              <ref name="unsignedInt"/>
            </attribute>
          </optional>
        </group>
      </choice>
903 904 905
      <attribute name="index">
        <ref name="unsignedInt"/>
      </attribute>
906 907 908
      <optional>
        <attribute name="model">
          <choice>
909
            <value>auto</value>
910 911 912
            <value>buslogic</value>
            <value>lsilogic</value>
            <value>lsisas1068</value>
913
            <value>vmpvscsi</value>
M
Marc-André Lureau 已提交
914 915 916 917 918 919 920 921 922
            <value>piix3-uhci</value>
            <value>piix4-uhci</value>
            <value>ehci</value>
            <value>ich9-ehci1</value>
            <value>ich9-uhci1</value>
            <value>ich9-uhci2</value>
            <value>ich9-uhci3</value>
            <value>vt82c686b-uhci</value>
            <value>pci-ohci</value>
923 924 925
          </choice>
        </attribute>
      </optional>
926 927 928
      <optional>
        <ref name="usbmaster"/>
      </optional>
929
      <optional>
M
Matthew Booth 已提交
930
        <ref name="address"/>
931 932 933
      </optional>
    </element>
  </define>
934 935
  <define name="filesystem">
    <element name="filesystem">
936 937
      <choice>
        <group>
938 939
          <attribute name="type">
            <value>file</value>
940
          </attribute>
941 942 943 944 945 946 947 948 949
          <interleave>
            <element name="source">
              <attribute name="file">
                <ref name="absFilePath"/>
              </attribute>
              <empty/>
            </element>
            <ref name="filesystemtgt"/>
          </interleave>
950 951
        </group>
        <group>
952 953 954 955 956 957
          <attribute name="type">
            <value>block</value>
          </attribute>
          <interleave>
            <element name="source">
              <attribute name="dev">
958
                <ref name="absFilePath"/>
959 960 961 962 963
              </attribute>
              <empty/>
            </element>
            <ref name="filesystemtgt"/>
          </interleave>
964 965
        </group>
        <group>
966 967 968 969 970 971 972 973 974 975 976 977
          <attribute name="type">
            <value>mount</value>
          </attribute>
          <interleave>
            <element name="source">
              <attribute name="dir">
                <ref name="absFilePath"/>
              </attribute>
              <empty/>
            </element>
            <ref name="filesystemtgt"/>
          </interleave>
978 979
        </group>
        <group>
980 981 982 983 984 985 986 987 988 989 990 991
          <attribute name="type">
            <value>template</value>
          </attribute>
          <interleave>
            <element name="source">
              <attribute name="name">
                <ref name="genericName"/>
              </attribute>
              <empty/>
            </element>
            <ref name="filesystemtgt"/>
          </interleave>
992 993
        </group>
      </choice>
994
      <optional>
M
Matthew Booth 已提交
995
        <ref name="address"/>
996 997 998 999 1000 1001 1002
        <attribute name="accessmode">
        <choice>
          <value>passthrough</value>
          <value>mapped</value>
          <value>squash</value>
        </choice>
        </attribute>
1003
      </optional>
1004 1005
    </element>
  </define>
1006 1007 1008 1009
  <define name="filesystemtgt">
    <element name="target">
      <attribute name="dir">
        <ref name="absDirPath"/>
1010 1011 1012 1013
      </attribute>
      <empty/>
    </element>
  </define>
1014
  <!--
1015 1016 1017
      An interface description can either be of type bridge in which case
      it will use a bridging source, or of type ethernet which uses a device
      source and a device target instead. They both share a set of interface
1018
      options. FIXME
1019
    -->
1020 1021
  <define name="interface">
    <element name="interface">
1022 1023
      <choice>
        <group>
1024
          <attribute name="type">
1025 1026
            <value>bridge</value>
          </attribute>
1027
          <interleave>
1028
            <optional>
1029 1030 1031 1032 1033 1034
              <element name="source">
                <attribute name="bridge">
                  <ref name="deviceName"/>
                </attribute>
                <empty/>
              </element>
1035
            </optional>
1036 1037 1038
            <ref name="interface-options"/>
          </interleave>
        </group>
1039
        <group>
1040
          <attribute name="type">
1041 1042
            <value>ethernet</value>
          </attribute>
1043
          <interleave>
1044
            <optional>
1045 1046 1047 1048 1049 1050
              <element name="source">
                <attribute name="dev">
                  <ref name="deviceName"/>
                </attribute>
                <empty/>
              </element>
1051
            </optional>
1052 1053 1054
            <ref name="interface-options"/>
          </interleave>
        </group>
1055
        <group>
1056
          <attribute name="type">
1057 1058
            <value>network</value>
          </attribute>
1059 1060 1061 1062 1063
          <interleave>
            <element name="source">
              <attribute name="network">
                <ref name="deviceName"/>
              </attribute>
1064 1065 1066 1067 1068
              <optional>
                <attribute name="portgroup">
                  <ref name="deviceName"/>
                </attribute>
              </optional>
1069 1070
              <empty/>
            </element>
1071 1072 1073
            <optional>
              <ref name="virtualPortProfile"/>
            </optional>
1074 1075 1076
            <ref name="interface-options"/>
          </interleave>
        </group>
1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092
        <group>
          <attribute name="type">
            <value>direct</value>
          </attribute>
          <interleave>
            <element name="source">
              <attribute name="dev">
                <ref name="deviceName"/>
              </attribute>
              <optional>
                <attribute name="mode">
                  <ref name="bridgeMode"/>
                </attribute>
              </optional>
              <empty/>
            </element>
1093 1094 1095
            <optional>
              <ref name="virtualPortProfile"/>
            </optional>
1096 1097 1098
            <ref name="interface-options"/>
          </interleave>
        </group>
1099
        <group>
1100
          <attribute name="type">
1101 1102
            <value>user</value>
          </attribute>
1103 1104 1105 1106
          <interleave>
            <ref name="interface-options"/>
          </interleave>
        </group>
D
Daniel Veillard 已提交
1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120
        <group>
          <attribute name="type">
            <value>internal</value>
          </attribute>
          <interleave>
            <element name="source">
              <attribute name="name">
                <ref name="deviceName"/>
              </attribute>
              <empty/>
            </element>
            <ref name="interface-options"/>
          </interleave>
        </group>
1121 1122 1123 1124 1125 1126
      </choice>
    </element>
  </define>
  <!--
      The interface options possible are:
        - the MAC address
1127 1128 1129
        - the IP address bound to the interface
        - the name of the script used to set up the binding
        - the target device used
1130
        - boot order
1131
    -->
1132
  <define name="interface-options">
1133 1134
    <interleave>
      <optional>
1135 1136 1137 1138 1139 1140
        <element name="target">
          <attribute name="dev">
            <ref name="deviceName"/>
          </attribute>
          <empty/>
        </element>
1141 1142
      </optional>
      <optional>
1143 1144
        <element name="mac">
          <attribute name="address">
1145
            <ref name="macAddr"/>
1146 1147 1148
          </attribute>
          <empty/>
        </element>
1149 1150
      </optional>
      <optional>
1151 1152
        <element name="ip">
          <attribute name="address">
1153
            <ref name="ipv4Addr"/>
1154 1155 1156
          </attribute>
          <empty/>
        </element>
1157 1158
      </optional>
      <optional>
1159 1160 1161 1162 1163 1164
        <element name="script">
          <attribute name="path">
            <ref name="filePath"/>
          </attribute>
          <empty/>
        </element>
1165 1166
      </optional>
      <optional>
1167 1168 1169 1170
        <element name="model">
          <attribute name="type"/>
          <empty/>
        </element>
1171
      </optional>
1172 1173 1174 1175 1176 1177 1178 1179 1180 1181
      <optional>
        <element name="driver">
          <optional>
            <attribute name="name">
              <choice>
                <value>qemu</value>
                <value>vhost</value>
              </choice>
            </attribute>
          </optional>
1182 1183 1184 1185 1186 1187 1188 1189
          <optional>
            <attribute name="txmode">
              <choice>
                <value>iothread</value>
                <value>timer</value>
              </choice>
            </attribute>
          </optional>
1190 1191 1192
          <optional>
            <ref name="ioeventfd"/>
          </optional>
1193 1194 1195
          <optional>
            <ref name="event_idx"/>
          </optional>
1196 1197 1198
          <empty/>
        </element>
      </optional>
1199
      <optional>
M
Matthew Booth 已提交
1200
        <ref name="address"/>
1201
      </optional>
1202 1203 1204 1205 1206
      <optional>
        <element name="filterref">
          <ref name="filterref-node-attributes"/>
        </element>
      </optional>
1207 1208 1209 1210 1211 1212 1213 1214 1215 1216
      <optional>
        <element name="tune">
          <optional>
            <!-- size of send buffer for network tap devices -->
            <element name="sndbuf">
              <ref name="unsignedInt"/>
            </element>
          </optional>
        </element>
      </optional>
1217 1218 1219
      <optional>
        <ref name="deviceBoot"/>
      </optional>
1220 1221 1222
      <optional>
        <ref name="bandwidth"/>
      </optional>
1223
    </interleave>
1224 1225
  </define>
  <!--
1226
      An emulator description is just a path to the binary used for the task
1227
    -->
1228 1229 1230
  <define name="emulator">
    <element name="emulator">
      <ref name="absFilePath"/>
1231 1232 1233
    </element>
  </define>
  <!--
1234
      A graphic description, currently in Xen only 2 types are supported:
1235
        - sdl with optional display, xauth and fullscreen
1236
        - vnc with a required port and optional listen IP address, password
1237
          and keymap
1238
    -->
1239 1240
  <define name="graphic">
    <element name="graphics">
1241
      <choice>
1242 1243 1244 1245 1246 1247 1248 1249 1250
        <group>
          <attribute name="type">
            <value>sdl</value>
          </attribute>
          <optional>
            <attribute name="display">
              <text/>
            </attribute>
          </optional>
1251
          <optional>
1252
            <attribute name="xauth">
1253 1254 1255
              <text/>
            </attribute>
          </optional>
1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268
          <optional>
            <attribute name="fullscreen">
              <choice>
                <value>yes</value>
                <value>no</value>
              </choice>
            </attribute>
          </optional>
        </group>
        <group>
          <attribute name="type">
            <value>vnc</value>
          </attribute>
1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285
          <choice>
            <group>
              <optional>
                <attribute name="port">
                  <ref name="PortNumber"/>
                </attribute>
              </optional>
              <optional>
                <attribute name="autoport">
                  <choice>
                    <value>yes</value>
                    <value>no</value>
                  </choice>
                </attribute>
              </optional>
              <optional>
                <attribute name="listen">
1286
                  <ref name="addrIPorName"/>
1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297
                </attribute>
              </optional>
            </group>
            <group>
              <optional>
                <attribute name="socket">
                  <ref name="absFilePath"/>
                </attribute>
              </optional>
            </group>
          </choice>
1298 1299
          <optional>
            <attribute name="passwd">
1300 1301 1302 1303 1304 1305 1306 1307
              <text/>
            </attribute>
          </optional>
          <optional>
            <attribute name="keymap">
              <text/>
            </attribute>
          </optional>
1308 1309 1310 1311 1312
          <optional>
            <attribute name="passwdValidTo">
              <data type="dateTime"/>
            </attribute>
          </optional>
1313 1314 1315 1316 1317 1318 1319
          <optional>
            <attribute name="connected">
              <choice>
                <value>keep</value>
              </choice>
            </attribute>
          </optional>
1320
          <ref name="listenElements"/>
1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345
        </group>
        <group>
          <attribute name="type">
            <value>spice</value>
          </attribute>
          <optional>
            <attribute name="port">
              <ref name="PortNumber"/>
            </attribute>
          </optional>
          <optional>
            <attribute name="tlsPort">
              <ref name="PortNumber"/>
            </attribute>
          </optional>
          <optional>
            <attribute name="autoport">
              <choice>
                <value>yes</value>
                <value>no</value>
              </choice>
            </attribute>
          </optional>
          <optional>
            <attribute name="listen">
1346
              <ref name="addrIPorName"/>
1347 1348 1349 1350
            </attribute>
          </optional>
          <optional>
            <attribute name="passwd">
1351 1352 1353 1354 1355 1356 1357 1358
              <text/>
            </attribute>
          </optional>
          <optional>
            <attribute name="keymap">
              <text/>
            </attribute>
          </optional>
1359 1360 1361 1362 1363
          <optional>
            <attribute name="passwdValidTo">
              <data type="dateTime"/>
            </attribute>
          </optional>
1364 1365 1366 1367 1368 1369 1370 1371 1372
          <optional>
            <attribute name="connected">
              <choice>
                <value>fail</value>
                <value>disconnect</value>
                <value>keep</value>
              </choice>
            </attribute>
          </optional>
1373
          <interleave>
1374
            <ref name="listenElements"/>
1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444
            <zeroOrMore>
              <element name="channel">
                <attribute name="name">
                  <choice>
                    <value>main</value>
                    <value>display</value>
                    <value>inputs</value>
                    <value>cursor</value>
                    <value>playback</value>
                    <value>record</value>
                    <value>smartcard</value>
                  </choice>
                </attribute>
                <attribute name="mode">
                  <choice>
                    <value>any</value>
                    <value>secure</value>
                    <value>insecure</value>
                  </choice>
                </attribute>
                <empty/>
              </element>
            </zeroOrMore>
            <optional>
              <element name="image">
                <attribute name="compression">
                  <choice>
                    <value>auto_glz</value>
                    <value>auto_lz</value>
                    <value>quic</value>
                    <value>glz</value>
                    <value>lz</value>
                    <value>off</value>
                  </choice>
                </attribute>
                <empty/>
              </element>
            </optional>
            <optional>
              <element name="jpeg">
                <attribute name="compression">
                  <choice>
                    <value>auto</value>
                    <value>never</value>
                    <value>always</value>
                  </choice>
                </attribute>
                <empty/>
              </element>
            </optional>
            <optional>
              <element name="zlib">
                <attribute name="compression">
                  <choice>
                    <value>auto</value>
                    <value>never</value>
                    <value>always</value>
                  </choice>
                </attribute>
                <empty/>
              </element>
            </optional>
            <optional>
              <element name="playback">
                <attribute name="compression">
                  <choice>
                    <value>on</value>
                    <value>off</value>
                  </choice>
                </attribute>
1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456
                <empty/>
              </element>
            </optional>
            <optional>
              <element name="streaming">
                <attribute name="mode">
                  <choice>
                    <value>filter</value>
                    <value>all</value>
                    <value>off</value>
                  </choice>
                </attribute>
1457 1458 1459
                <empty/>
              </element>
            </optional>
1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470
            <optional>
              <element name="clipboard">
                <attribute name="copypaste">
                  <choice>
                    <value>yes</value>
                    <value>no</value>
                  </choice>
                </attribute>
                <empty/>
              </element>
            </optional>
1471
          </interleave>
1472
        </group>
1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507
        <group>
          <attribute name="type">
            <value>rdp</value>
          </attribute>
          <optional>
            <attribute name="port">
              <ref name="PortNumber"/>
            </attribute>
          </optional>
          <optional>
            <attribute name="autoport">
              <choice>
                <value>yes</value>
                <value>no</value>
              </choice>
            </attribute>
          </optional>
          <optional>
            <attribute name="replaceUser">
              <choice>
                <value>yes</value>
                <value>no</value>
              </choice>
            </attribute>
          </optional>
          <optional>
            <attribute name="multiUser">
              <choice>
                <value>yes</value>
                <value>no</value>
              </choice>
            </attribute>
          </optional>
          <optional>
            <attribute name="listen">
1508
              <ref name="addrIPorName"/>
1509 1510
            </attribute>
          </optional>
1511
          <ref name="listenElements"/>
1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530
        </group>
        <group>
          <attribute name="type">
            <value>desktop</value>
          </attribute>
          <optional>
            <attribute name="display">
              <text/>
            </attribute>
          </optional>
          <optional>
            <attribute name="fullscreen">
              <choice>
                <value>yes</value>
                <value>no</value>
              </choice>
            </attribute>
          </optional>
        </group>
1531 1532 1533
      </choice>
    </element>
  </define>
1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563

  <define name="listenElements">
    <zeroOrMore>
      <element name="listen">
        <choice>
          <group>
            <attribute name="type">
              <value>address</value>
            </attribute>
            <attribute name="address">
              <ref name="addrIPorName"/>
            </attribute>
          </group>
          <group>
            <attribute name="type">
              <value>network</value>
            </attribute>
            <attribute name="network">
              <text/>
            </attribute>
            <optional>
              <attribute name="address">
                <ref name="addrIPorName"/>
              </attribute>
            </optional>
          </group>
        </choice>
      </element>
    </zeroOrMore>
  </define>
1564
  <!--
1565 1566
     A video adapter description, allowing configuration of device
     model, number of virtual heads, and video ram size
1567 1568 1569 1570
   -->
  <define name="video">
    <element name="video">
      <optional>
R
Richard Jones 已提交
1571
        <element name="model">
1572 1573 1574 1575 1576 1577 1578
          <attribute name="type">
            <choice>
              <value>vga</value>
              <value>cirrus</value>
              <value>vmvga</value>
              <value>xen</value>
              <value>vbox</value>
1579
              <value>qxl</value>
1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591
            </choice>
          </attribute>
          <optional>
            <attribute name="vram">
              <ref name="unsignedInt"/>
            </attribute>
          </optional>
          <optional>
            <attribute name="heads">
              <ref name="unsignedInt"/>
            </attribute>
          </optional>
1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611
          <optional>
            <element name="acceleration">
              <optional>
                <attribute name="accel3d">
                  <choice>
                    <value>yes</value>
                    <value>no</value>
                  </choice>
                </attribute>
              </optional>
              <optional>
                <attribute name="accel2d">
                  <choice>
                    <value>yes</value>
                    <value>no</value>
                  </choice>
                </attribute>
              </optional>
            </element>
          </optional>
R
Richard Jones 已提交
1612
        </element>
1613
      </optional>
1614 1615 1616
      <optional>
        <ref name="address"/>
      </optional>
1617 1618
    </element>
  </define>
1619 1620 1621 1622
  <!--
      When a domain terminates multiple policies can be applied depending
      on how it ended:
    -->
1623
  <define name="termination">
1624 1625
    <interleave>
      <optional>
1626 1627 1628
        <element name="on_reboot">
          <ref name="offOptions"/>
        </element>
1629 1630
      </optional>
      <optional>
1631 1632 1633
        <element name="on_poweroff">
          <ref name="offOptions"/>
        </element>
1634 1635
      </optional>
      <optional>
1636
        <element name="on_crash">
1637
          <ref name="crashOptions"/>
1638
        </element>
1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649
      </optional>
    </interleave>
  </define>
  <!--
      Options when a domain terminates:
      destroy: The domain is cleaned up
      restart: A new domain is started in place of the old one
      preserve: The domain will remain in memory until it is destroyed manually
      rename-restart: a variant of the previous one but where the old domain is
                      renamed before being saved to allow a restart
    -->
1650
  <define name="offOptions">
1651 1652 1653 1654 1655 1656 1657
    <choice>
      <value>destroy</value>
      <value>restart</value>
      <value>preserve</value>
      <value>rename-restart</value>
    </choice>
  </define>
1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680
  <!--
      Options when a domain crashes:
      destroy: The domain is cleaned up
      restart: A new domain is started in place of the old one
      preserve: The domain will remain in memory until it is destroyed manually
      rename-restart: a variant of the previous one but where the old domain is
                      renamed before being saved to allow a restart
      coredump-destroy: The crashed domain's core will be dumped, and then the
                        domain will be terminated completely and all resources
                        released
      coredump-restart: The crashed domain's core will be dumped, and then the
                        domain will be restarted with the same configuration
    -->
  <define name="crashOptions">
    <choice>
      <value>destroy</value>
      <value>restart</value>
      <value>preserve</value>
      <value>rename-restart</value>
      <value>coredump-destroy</value>
      <value>coredump-restart</value>
    </choice>
  </define>
1681 1682 1683 1684
  <!--
      Specific setup for a qemu emulated character device.  Note: this
      definition doesn't fully specify the constraints on this node.
    -->
1685
  <define name="qemucdev">
1686
    <ref name="qemucdevSrcType"/>
1687 1688
    <optional>
      <attribute name="tty">
1689
        <ref name="absFilePath"/>
1690 1691
      </attribute>
    </optional>
1692 1693 1694
    <interleave>
      <ref name="qemucdevSrcDef"/>
      <optional>
1695
        <ref name="qemucdevTgtDef"/>
1696
      </optional>
1697
      <optional>
M
Matthew Booth 已提交
1698
        <ref name="address"/>
1699
      </optional>
1700 1701
    </interleave>
  </define>
1702 1703 1704 1705 1706 1707 1708

  <define name="qemucdevConsoleTgtType">
    <attribute name="type">
      <choice>
        <value>xen</value>
        <value>serial</value>
        <value>uml</value>
C
Cole Robinson 已提交
1709
        <value>virtio</value>
1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726
      </choice>
    </attribute>
  </define>

  <define  name="qemucdevTgtDef">
    <element name="target">
      <interleave>
        <optional>
          <ref name="qemucdevConsoleTgtType"/>
        </optional>
        <optional>
          <attribute name="port"/>
        </optional>
      </interleave>
    </element>
  </define>

1727
  <define name="qemucdevSrcType">
1728
    <attribute name="type">
1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739
      <choice>
        <value>dev</value>
        <value>file</value>
        <value>pipe</value>
        <value>unix</value>
        <value>tcp</value>
        <value>udp</value>
        <value>null</value>
        <value>stdio</value>
        <value>vc</value>
        <value>pty</value>
1740
        <value>spicevmc</value>
1741 1742
      </choice>
    </attribute>
1743 1744
  </define>
  <define name="qemucdevSrcDef">
1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763
    <zeroOrMore>
      <element name="source">
        <optional>
          <attribute name="mode"/>
        </optional>
        <optional>
          <attribute name="path"/>
        </optional>
        <optional>
          <attribute name="host"/>
        </optional>
        <optional>
          <attribute name="service"/>
        </optional>
        <optional>
          <attribute name="wiremode"/>
        </optional>
      </element>
    </zeroOrMore>
1764 1765 1766
    <optional>
      <element name="protocol">
        <optional>
1767 1768 1769 1770 1771 1772 1773 1774
          <attribute name="type">
            <choice>
              <value>raw</value>
              <value>telnet</value>
              <value>telnets</value>
              <value>tls</value>
            </choice>
          </attribute>
1775 1776 1777
        </optional>
      </element>
    </optional>
1778
  </define>
1779 1780 1781 1782
  <!--
      The description for a console
      just a tty device
    -->
1783 1784
  <define name="console">
    <element name="console">
1785 1786 1787
      <choice>
        <group>
          <optional>
1788
            <attribute name="tty">
1789
              <ref name="absFilePath"/>
1790 1791 1792 1793
            </attribute>
          </optional>
          <empty/>
        </group>
C
Cole Robinson 已提交
1794 1795 1796
        <choice>
          <ref name="qemucdev"/>
        </choice>
1797 1798 1799
      </choice>
    </element>
  </define>
1800 1801 1802
  <define name="sound">
    <element name="sound">
      <attribute name="model">
1803 1804 1805 1806
        <choice>
          <value>sb16</value>
          <value>es1370</value>
          <value>pcspk</value>
1807
          <value>ac97</value>
1808
          <value>ich6</value>
1809
        </choice>
1810
      </attribute>
1811 1812 1813
      <optional>
        <ref name="address"/>
      </optional>
1814 1815
    </element>
  </define>
R
Richard Jones 已提交
1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831
  <define name="watchdog">
    <element name="watchdog">
      <attribute name="model">
        <choice>
          <value>i6300esb</value>
          <value>ib700</value>
        </choice>
      </attribute>
      <optional>
        <attribute name="action">
          <choice>
            <value>reset</value>
            <value>shutdown</value>
            <value>poweroff</value>
            <value>pause</value>
            <value>none</value>
1832
            <value>dump</value>
R
Richard Jones 已提交
1833 1834 1835
          </choice>
        </attribute>
      </optional>
1836 1837 1838
      <optional>
        <ref name="address"/>
      </optional>
R
Richard Jones 已提交
1839 1840
    </element>
  </define>
1841 1842 1843 1844 1845 1846
  <define name="memballoon">
    <element name="memballoon">
      <attribute name="model">
        <choice>
          <value>virtio</value>
          <value>xen</value>
1847
          <value>none</value>
1848 1849 1850 1851 1852 1853 1854
        </choice>
      </attribute>
      <optional>
        <ref name="address"/>
      </optional>
    </element>
  </define>
1855 1856 1857
  <define name="parallel">
    <element name="parallel">
      <ref name="qemucdev"/>
1858 1859
    </element>
  </define>
1860 1861 1862
  <define name="serial">
    <element name="serial">
      <ref name="qemucdev"/>
1863 1864
    </element>
  </define>
1865 1866
  <define name="guestfwdTarget">
    <element name="target">
1867 1868 1869 1870 1871
      <attribute name="type">
        <value>guestfwd</value>
      </attribute>
      <attribute name="address"/>
      <attribute name="port"/>
1872 1873
    </element>
  </define>
1874 1875 1876
  <define name="virtioTarget">
    <element name="target">
      <attribute name="type">
1877
        <value>virtio</value>
1878 1879 1880 1881 1882 1883
      </attribute>
      <optional>
        <attribute name="name"/>
      </optional>
    </element>
  </define>
1884 1885 1886 1887 1888
  <define name="channel">
    <element name="channel">
      <ref name="qemucdevSrcType"/>
      <interleave>
        <ref name="qemucdevSrcDef"/>
1889 1890 1891 1892
        <choice>
          <ref name="guestfwdTarget"/>
          <ref name="virtioTarget"/>
        </choice>
M
Matthew Booth 已提交
1893 1894 1895
        <optional>
          <ref name="address"/>
        </optional>
1896 1897 1898
      </interleave>
    </element>
  </define>
1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943
  <define name="smartcard">
    <element name="smartcard">
      <choice>
        <group>
          <attribute name="mode">
            <value>host</value>
          </attribute>
          <!-- might need to add optional database element here later -->
        </group>
        <group>
          <attribute name="mode">
            <value>host-certificates</value>
          </attribute>
          <ref name='certificate'/>
          <ref name='certificate'/>
          <ref name='certificate'/>
          <optional>
            <element name="database">
              <ref name="absDirPath"/>
            </element>
          </optional>
        </group>
        <group>
          <attribute name="mode">
            <value>passthrough</value>
          </attribute>
          <ref name="qemucdevSrcType"/>
          <interleave>
            <ref name="qemucdevSrcDef"/>
            <optional>
              <ref name="qemucdevTgtDef"/>
            </optional>
          </interleave>
        </group>
      </choice>
      <optional>
        <ref name="address"/>
      </optional>
    </element>
  </define>
  <define name="certificate">
    <element name="certificate">
      <text/>
    </element>
  </define>
1944 1945 1946
  <define name="input">
    <element name="input">
      <attribute name="type">
1947 1948 1949 1950 1951 1952
        <choice>
          <value>tablet</value>
          <value>mouse</value>
        </choice>
      </attribute>
      <optional>
1953
        <attribute name="bus">
1954 1955 1956 1957 1958 1959 1960
          <choice>
            <value>ps2</value>
            <value>usb</value>
            <value>xen</value>
          </choice>
        </attribute>
      </optional>
1961
      <optional>
M
Matthew Booth 已提交
1962
        <ref name="address"/>
1963
      </optional>
1964 1965
    </element>
  </define>
M
Marc-André Lureau 已提交
1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977
  <define name="hub">
    <element name="hub">
      <attribute name="type">
        <choice>
          <value>usb</value>
        </choice>
      </attribute>
      <optional>
        <ref name="address"/>
      </optional>
    </element>
  </define>
1978 1979
  <define name="hostdev">
    <element name="hostdev">
1980
      <optional>
1981
        <attribute name="mode">
1982
          <choice>
1983 1984 1985 1986
            <value>subsystem</value>
            <value>capabilities</value>
          </choice>
        </attribute>
1987 1988 1989 1990 1991 1992 1993 1994
      </optional>
      <attribute name="type">
        <choice>
          <value>usb</value>
          <value>pci</value>
        </choice>
      </attribute>
      <optional>
1995 1996 1997 1998
        <attribute name="managed">
          <choice>
            <value>yes</value>
            <value>no</value>
1999 2000 2001 2002
          </choice>
        </attribute>
      </optional>
      <group>
2003 2004
        <element name="source">
          <choice>
M
Matthew Booth 已提交
2005
            <group>
2006
              <ref name="usbproduct"/>
M
Matthew Booth 已提交
2007 2008 2009 2010
              <optional>
                <ref name="usbaddress"/>
              </optional>
            </group>
2011
            <ref name="usbaddress"/>
2012 2013 2014
            <element name="address">
              <ref name="pciaddress"/>
            </element>
2015 2016
          </choice>
        </element>
2017
      </group>
2018 2019 2020
      <optional>
        <ref name="deviceBoot"/>
      </optional>
2021 2022 2023
      <optional>
        <ref name="address"/>
      </optional>
2024 2025 2026 2027 2028
    </element>
  </define>
  <define name="usbproduct">
    <element name="vendor">
      <attribute name="id">
2029
        <ref name="usbId"/>
2030 2031 2032 2033
      </attribute>
    </element>
    <element name="product">
      <attribute name="id">
2034
        <ref name="usbId"/>
2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047
      </attribute>
    </element>
  </define>
  <define name="usbaddress">
    <element name="address">
      <attribute name="bus">
        <ref name="usbAddr"/>
      </attribute>
      <attribute name="device">
        <ref name="usbAddr"/>
      </attribute>
    </element>
  </define>
2048 2049 2050 2051 2052 2053 2054 2055
  <define name="usbportaddress">
    <attribute name="bus">
      <ref name="usbAddr"/>
    </attribute>
    <attribute name="port">
      <ref name="usbAddr"/>
    </attribute>
  </define>
2056
  <define name="pciaddress">
2057 2058 2059
    <optional>
      <attribute name="domain">
        <ref name="pciDomain"/>
2060
      </attribute>
2061 2062 2063 2064 2065 2066 2067 2068 2069 2070
    </optional>
    <attribute name="bus">
      <ref name="pciBus"/>
    </attribute>
    <attribute name="slot">
      <ref name="pciSlot"/>
    </attribute>
    <attribute name="function">
      <ref name="pciFunc"/>
    </attribute>
2071
  </define>
2072 2073 2074 2075 2076 2077 2078 2079
  <define name="driveaddress">
    <optional>
      <attribute name="controller">
        <ref name="driveController"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="bus">
M
Matthew Booth 已提交
2080
        <ref name="driveBus"/>
2081 2082 2083 2084 2085 2086
      </attribute>
    </optional>
    <attribute name="unit">
      <ref name="driveUnit"/>
    </attribute>
  </define>
2087 2088 2089 2090 2091 2092 2093 2094 2095
  <define name="virtioserialaddress">
    <attribute name="controller">
      <ref name="driveController"/>
    </attribute>
    <optional>
      <attribute name="bus">
        <ref name="driveBus"/>
      </attribute>
    </optional>
2096 2097 2098 2099 2100
    <optional>
      <attribute name="port">
        <ref name="driveUnit"/>
      </attribute>
    </optional>
2101
  </define>
2102 2103 2104 2105 2106 2107 2108 2109 2110 2111
  <define name="ccidaddress">
    <attribute name="controller">
      <ref name="driveController"/>
    </attribute>
    <optional>
      <attribute name="slot">
        <ref name="driveUnit"/>
      </attribute>
    </optional>
  </define>
2112
  <!--
2113
      Devices attached to a domain.
2114 2115 2116
      Sub-elements such as <alias> are not documented here, as they
      can only exist when generated for a live domain and are ignored
      when defining a domain.
2117
    -->
2118 2119
  <define name="devices">
    <element name="devices">
2120
      <interleave>
2121 2122 2123 2124 2125 2126
        <optional>
          <ref name="emulator"/>
        </optional>
        <zeroOrMore>
          <choice>
            <ref name="disk"/>
2127
            <ref name="controller"/>
2128
            <ref name="lease"/>
2129 2130 2131 2132 2133 2134
            <ref name="filesystem"/>
            <ref name="interface"/>
            <ref name="input"/>
            <ref name="sound"/>
            <ref name="hostdev"/>
            <ref name="graphic"/>
2135
            <ref name="video"/>
2136 2137 2138
            <ref name="console"/>
            <ref name="parallel"/>
            <ref name="serial"/>
2139
            <ref name="channel"/>
2140
            <ref name="smartcard"/>
M
Marc-André Lureau 已提交
2141
            <ref name="hub"/>
2142 2143
          </choice>
        </zeroOrMore>
R
Richard Jones 已提交
2144 2145 2146
        <optional>
          <ref name="watchdog"/>
        </optional>
2147 2148 2149
        <optional>
          <ref name="memballoon"/>
        </optional>
2150 2151 2152
      </interleave>
    </element>
  </define>
2153
  <!--
J
Jim Fehlig 已提交
2154
      A set of optional features: PAE, APIC, ACPI, and HAP support
2155
    -->
2156
  <define name="features">
2157 2158 2159
    <optional>
      <element name="features">
        <interleave>
2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174
          <optional>
            <element name="pae">
              <empty/>
            </element>
          </optional>
          <optional>
            <element name="apic">
              <empty/>
            </element>
          </optional>
          <optional>
            <element name="acpi">
              <empty/>
            </element>
          </optional>
J
Jim Fehlig 已提交
2175 2176 2177 2178 2179
          <optional>
            <element name="hap">
              <empty/>
            </element>
          </optional>
2180
        </interleave>
2181 2182 2183
      </element>
    </optional>
  </define>
J
Jiri Denemark 已提交
2184 2185 2186 2187 2188
  <!--
      CPU specification
      -->
  <define name="cpu">
    <element name="cpu">
2189 2190 2191 2192 2193 2194 2195
      <choice>
        <ref name="cpuTopology"/>
        <group>
          <ref name="cpuMatch"/>
          <interleave>
            <ref name="cpuModel"/>
            <optional>
J
Jiri Denemark 已提交
2196
              <ref name="cpuVendor"/>
J
Jiri Denemark 已提交
2197 2198
            </optional>
            <optional>
2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225
              <ref name="cpuTopology"/>
            </optional>
            <zeroOrMore>
              <ref name="cpuFeature"/>
            </zeroOrMore>
          </interleave>
        </group>
      </choice>
    </element>
  </define>

  <define name="cpuMatch">
    <attribute name="match">
      <choice>
        <value>minimum</value>
        <value>exact</value>
        <value>strict</value>
      </choice>
    </attribute>
  </define>

  <define name="cpuModel">
    <element name="model">
      <text/>
    </element>
  </define>

J
Jiri Denemark 已提交
2226 2227 2228 2229 2230 2231
  <define name="cpuVendor">
    <element name="vendor">
      <text/>
    </element>
  </define>

2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260
  <define name="cpuFeature">
    <element name="feature">
      <attribute name="policy">
        <choice>
          <value>force</value>
          <value>require</value>
          <value>optional</value>
          <value>disable</value>
          <value>forbid</value>
        </choice>
      </attribute>
      <attribute name="name">
        <ref name="featureName"/>
      </attribute>
      <empty/>
    </element>
  </define>

  <define name="cpuTopology">
    <element name="topology">
      <attribute name="sockets">
        <ref name="positiveInteger"/>
      </attribute>
      <attribute name="cores">
        <ref name="positiveInteger"/>
      </attribute>
      <attribute name="threads">
        <ref name="positiveInteger"/>
      </attribute>
J
Jiri Denemark 已提交
2261 2262
    </element>
  </define>
2263

2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326
  <!--
      System information specification:
       Placeholder for system specific informations likes the ones
       contained in the SMBIOS area.
       Only a limited subset of entries can be modified there, so we
       fully enumerate each case here.
       The DMTF spec doesn't specify any string subset, just 0 terminated
       byte strings, but better be safe and restrict at least the names
       to avoid problems with space normalization in attribute values,
       the value is kept as the element body for maximum flexibility.
       A priori we allow only type 0 and type 1 string updates
      -->
  <define name="sysinfo">
    <element name="sysinfo">
      <attribute name="type">
        <value>smbios</value>
      </attribute>
      <interleave>
        <optional>
          <element name="bios">
            <oneOrMore>
              <element name="entry">
                <attribute name="name">
                  <ref name="sysinfo-bios-name"/>
                </attribute>
                <ref name="sysinfo-value"/>
              </element>
            </oneOrMore>
          </element>
        </optional>
        <optional>
          <element name="system">
            <oneOrMore>
              <element name="entry">
                <attribute name="name">
                  <ref name="sysinfo-system-name"/>
                </attribute>
                <ref name="sysinfo-value"/>
              </element>
            </oneOrMore>
          </element>
        </optional>
      </interleave>
    </element>
  </define>

  <define name="sysinfo-bios-name">
    <choice>
      <value>vendor</value>
      <value>version</value>
      <value>date</value>
      <value>release</value>
    </choice>
  </define>

  <define name="sysinfo-system-name">
    <choice>
      <value>manufacturer</value>
      <value>product</value>
      <value>version</value>
      <value>serial</value>
      <value>uuid</value>
      <value>sku</value>
E
Eric Blake 已提交
2327
      <value>family</value>
2328 2329 2330 2331 2332
    </choice>
  </define>

  <define name="sysinfo-value">
    <data type="string">
E
Eric Blake 已提交
2333
      <param name='pattern'>[a-zA-Z0-9/\-_\. \(\)]+</param>
2334 2335 2336
    </data>
  </define>

2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349
  <define name="smbios">
    <element name="smbios">
      <attribute name="mode">
        <choice>
          <value>emulate</value>
          <value>host</value>
          <value>sysinfo</value>
        </choice>
      </attribute>
      <empty/>
    </element>
  </define>

M
Michal Privoznik 已提交
2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360
  <define name="bios">
    <element name="bios">
      <attribute name="useserial">
        <choice>
          <value>yes</value>
          <value>no</value>
        </choice>
      </attribute>
    </element>
  </define>

2361 2362 2363
  <define name="address">
    <element name="address">
      <choice>
M
Matthew Booth 已提交
2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375
        <group>
          <attribute name="type">
            <value>pci</value>
          </attribute>
          <ref name="pciaddress"/>
        </group>
        <group>
          <attribute name="type">
            <value>drive</value>
          </attribute>
          <ref name="driveaddress"/>
        </group>
2376 2377 2378 2379 2380 2381
        <group>
          <attribute name="type">
            <value>virtio-serial</value>
          </attribute>
          <ref name="virtioserialaddress"/>
        </group>
2382 2383 2384 2385 2386 2387
        <group>
          <attribute name="type">
            <value>ccid</value>
          </attribute>
          <ref name="ccidaddress"/>
        </group>
2388 2389 2390 2391 2392 2393
        <group>
          <attribute name="type">
            <value>usb</value>
          </attribute>
          <ref name="usbportaddress"/>
        </group>
2394 2395 2396 2397
      </choice>
    </element>
  </define>

2398 2399 2400 2401 2402 2403 2404 2405 2406
  <define name="usbmaster">
    <element name="master">
      <attribute name="startport">
        <ref name="usbAddr"/>
      </attribute>
      <empty/>
    </element>
  </define>

2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422
  <define name="filterref-node-attributes">
    <attribute name="filter">
      <data type="NCName"/>
    </attribute>
    <optional>
      <element name="parameter">
        <attribute name="name">
          <ref name="filter-param-name"/>
        </attribute>
        <attribute name="value">
          <ref name="filter-param-value"/>
        </attribute>
      </element>
    </optional>
  </define>

2423 2424 2425 2426 2427 2428 2429 2430 2431
  <define name="deviceBoot">
    <element name="boot">
      <attribute name="order">
        <ref name="positiveInteger"/>
      </attribute>
      <empty/>
    </element>
  </define>

2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456
  <!--
       Optional hypervisor extensions in their own namespace:
         QEmu
    -->
  <define name="qemucmdline">
    <element name="commandline" ns="http://libvirt.org/schemas/domain/qemu/1.0">
      <zeroOrMore>
        <element name="arg">
          <attribute name='value'/>
        </element>
      </zeroOrMore>
      <zeroOrMore>
        <element name="env">
          <attribute name='name'>
            <ref name="filter-param-name"/>
          </attribute>
          <optional>
            <attribute name='value'/>
          </optional>
          <empty/>
        </element>
      </zeroOrMore>
    </element>
  </define>

2457 2458 2459
  <!--
       Type library

2460
       A domain name should be made of ascii, numbers, _-+ and is non-empty
2461
       memoryKB request at least 4Mbytes though Xen will grow bigger if too low
2462
       weight currently is in range [100, 1000]
2463
    -->
E
Eric Blake 已提交
2464 2465 2466 2467 2468
  <define name="cpuset">
    <data type="string">
      <param name="pattern">([0-9]+(-[0-9]+)?|\^[0-9]+)(,([0-9]+(-[0-9]+)?|\^[0-9]+))*</param>
    </data>
  </define>
2469 2470
  <define name="countCPU">
    <data type="unsignedShort">
2471 2472 2473 2474
      <param name="pattern">[0-9]+</param>
      <param name="minInclusive">1</param>
    </data>
  </define>
2475 2476 2477 2478 2479 2480 2481 2482 2483
  <define name="vcpuid">
    <data type="unsignedShort">
      <param name="pattern">[0-9]+</param>
    </data>
  </define>
  <define name="cpushares">
    <data type="unsignedInt">
      <param name="pattern">[0-9]+</param>
    </data>
W
Wen Congyang 已提交
2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498
  </define>
  <define name="cpuperiod">
    <data type="unsignedLong">
      <param name="pattern">[0-9]+</param>
      <param name="minInclusive">1000</param>
      <param name="maxInclusive">1000000</param>
    </data>
  </define>
  <define name="cpuquota">
    <data type="long">
      <param name="pattern">-?[0-9]+</param>
      <param name="maxInclusive">18446744073709551</param>
      <param name='minInclusive'>-1</param>
    </data>
  </define>
2499 2500
  <define name="PortNumber">
    <data type="short">
2501
      <param name="minInclusive">-1</param>
2502 2503
    </data>
  </define>
2504 2505 2506 2507 2508 2509 2510
  <define name="weight">
    <data type="unsignedInt">
      <param name="pattern">[0-9]+</param>
      <param name="minInclusive">100</param>
      <param name="maxInclusive">1000</param>
    </data>
  </define>
2511 2512
  <define name="memoryKB">
    <data type="unsignedInt">
2513 2514 2515 2516
      <param name="pattern">[0-9]+</param>
      <param name="minInclusive">4000</param>
    </data>
  </define>
2517 2518
  <define name="domainName">
    <data type="string">
2519
      <param name="pattern">[A-Za-z0-9_\.\+\-&amp;:/]+</param>
2520 2521
    </data>
  </define>
2522 2523 2524 2525 2526
  <define name="diskSerial">
    <data type="string">
      <param name="pattern">[A-Za-z0-9_\.\+\-]+</param>
    </data>
  </define>
2527 2528
  <define name="genericName">
    <data type="string">
2529 2530 2531
      <param name="pattern">[a-zA-Z0-9_\+\-]+</param>
    </data>
  </define>
2532 2533
  <define name="bridgeMode">
    <data type="string">
2534
      <param name="pattern">(vepa|bridge|private|passthrough)</param>
2535 2536
    </data>
  </define>
2537 2538 2539 2540 2541
  <define name="addrIPorName">
    <data type="string">
      <param name="pattern">(([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9])|(([0-9a-fA-F]+|:)+[0-9a-fA-F]+)|([a-zA-Z0-9_\.\+\-]*)</param>
    </data>
  </define>
2542 2543
  <define name="usbId">
    <data type="string">
2544 2545 2546
      <param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
    </data>
  </define>
2547 2548
  <define name="usbAddr">
    <data type="string">
2549 2550 2551
      <param name="pattern">(0x)?[0-9a-fA-F]{1,3}</param>
    </data>
  </define>
2552 2553
  <define name="pciDomain">
    <data type="string">
2554 2555 2556
      <param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
    </data>
  </define>
2557 2558
  <define name="pciBus">
    <data type="string">
2559 2560 2561
      <param name="pattern">(0x)?[0-9a-fA-F]{1,2}</param>
    </data>
  </define>
2562 2563
  <define name="pciSlot">
    <data type="string">
2564 2565 2566
      <param name="pattern">(0x)?[0-1]?[0-9a-fA-F]</param>
    </data>
  </define>
2567 2568
  <define name="pciFunc">
    <data type="string">
2569 2570 2571
      <param name="pattern">(0x)?[0-7]</param>
    </data>
  </define>
2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586
  <define name="driveController">
    <data type="string">
      <param name="pattern">[0-9]{1,2}</param>
    </data>
  </define>
  <define name="driveBus">
    <data type="string">
      <param name="pattern">[0-9]{1,2}</param>
    </data>
  </define>
  <define name="driveUnit">
    <data type="string">
      <param name="pattern">[0-9]{1,2}</param>
    </data>
  </define>
J
Jiri Denemark 已提交
2587 2588 2589 2590 2591
  <define name="featureName">
    <data type="string">
      <param name='pattern'>[a-zA-Z0-9\-_]+</param>
    </data>
  </define>
2592 2593 2594 2595 2596
  <define name="timeDelta">
    <data type="string">
      <param name="pattern">(-|\+)?[0-9]+</param>
    </data>
  </define>
2597 2598 2599 2600 2601
  <define name="timeZone">
    <data type="string">
      <param name="pattern">[a-zA-Z0-9_\.\+\-/]+</param>
    </data>
  </define>
2602 2603 2604 2605 2606 2607 2608 2609 2610 2611
  <define name="filter-param-name">
    <data type="string">
      <param name="pattern">[a-zA-Z0-9_]+</param>
    </data>
  </define>
  <define name="filter-param-value">
    <data type="string">
      <param name="pattern">[a-zA-Z0-9_\.:]+</param>
    </data>
  </define>
2612
</grammar>