1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258 |
- <?xml version="1.0"?>
- <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
- <!-- We handle only document defining a domain -->
- <start>
- <ref name="domain"/>
- </start>
- <!--
- We handle only document defining a domain
- -->
- <define name="domain">
- <element name="domain">
- <ref name="hvs"/>
- <ref name="ids"/>
- <interleave>
- <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>
- </interleave>
- </element>
- </define>
- <define name="seclabel">
- <element name="seclabel">
- <attribute name="model">
- <text/>
- </attribute>
- <attribute name="type">
- <choice>
- <value>dynamic</value>
- <value>static</value>
- </choice>
- </attribute>
- <element name="label">
- <text/>
- </element>
- </element>
- </define>
- <define name="hvs">
- <attribute name="type">
- <choice>
- <value>xen</value>
- <value>kvm</value>
- <value>kqemu</value>
- <value>qemu</value>
- <value>lxc</value>
- <value>openvz</value>
- <value>test</value>
- </choice>
- </attribute>
- </define>
- <define name="os">
- <choice>
- <ref name="osxen"/>
- <ref name="oshvm"/>
- <ref name="osexe"/>
- </choice>
- </define>
- <define name="osxen">
- <choice>
- <group>
- <optional>
- <ref name="bootloader"/>
- </optional>
- <element name="os">
- <ref name="ostypexen"/>
- <ref name="osbootkernel"/>
- </element>
- </group>
- <group>
- <ref name="bootloader"/>
- <optional>
- <element name="os">
- <ref name="ostypexen"/>
- <optional>
- <ref name="osbootkernel"/>
- </optional>
- </element>
- </optional>
- </group>
- </choice>
- </define>
- <define name="oshvm">
- <element name="os">
- <ref name="ostypehvm"/>
- <interleave>
- <optional>
- <element name="loader">
- <ref name="absFilePath"/>
- </element>
- </optional>
- <choice>
- <ref name="osbootkernel"/>
- <ref name="osbootdev"/>
- </choice>
- </interleave>
- </element>
- </define>
- <define name="ostypexen">
- <element name="type">
- <optional>
- <attribute name="arch">
- <choice>
- <value>i686</value>
- <value>x86_64</value>
- <value>ia64</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="machine">
- <choice>
- <value>xenpv</value>
- <value>xenner</value>
- </choice>
- </attribute>
- </optional>
- <choice>
- <value>xen</value>
- <value>linux</value>
- </choice>
- </element>
- </define>
- <define name="ostypehvm">
- <element name="type">
- <optional>
- <choice>
- <ref name="hvmx86"/>
- <ref name="hvmmips"/>
- <ref name="hvmsparc"/>
- <ref name="hvmppc"/>
- </choice>
- </optional>
- <value>hvm</value>
- </element>
- </define>
- <define name="hvmx86">
- <group>
- <attribute name="arch">
- <choice>
- <value>i686</value>
- <value>x86_64</value>
- </choice>
- </attribute>
- <attribute name="machine">
- <choice>
- <value>xenfv</value>
- <value>pc</value>
- <value>isapc</value>
- </choice>
- </attribute>
- </group>
- </define>
- <define name="hvmmips">
- <group>
- <attribute name="arch">
- <value>mips</value>
- </attribute>
- <attribute name="machine">
- <value>mips</value>
- </attribute>
- </group>
- </define>
- <define name="hvmsparc">
- <group>
- <attribute name="arch">
- <value>sparc</value>
- </attribute>
- <attribute name="machine">
- <value>sun4m</value>
- </attribute>
- </group>
- </define>
- <define name="hvmppc">
- <group>
- <attribute name="arch">
- <value>ppc</value>
- </attribute>
- <attribute name="machine">
- <choice>
- <value>g3beige</value>
- <value>mac99</value>
- <value>prep</value>
- </choice>
- </attribute>
- </group>
- </define>
- <define name="osexe">
- <element name="os">
- <element name="type">
- <value>exe</value>
- </element>
- <interleave>
- <optional>
- <element name="init">
- <ref name="absFilePath"/>
- </element>
- </optional>
- </interleave>
- </element>
- </define>
- <!--
- The Identifiers can be:
- - an optional id attribute with a number on the domain element
- - a mandatory name
- - an optional uuid
- -->
- <define name="ids">
- <optional>
- <attribute name="id">
- <ref name="unsignedInt"/>
- </attribute>
- </optional>
- <interleave>
- <element name="name">
- <ref name="domainName"/>
- </element>
- <optional>
- <element name="uuid">
- <ref name="UUID"/>
- </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.
- We can't check here the rule that currentMemory <= memory
- -->
- <define name="resources">
- <interleave>
- <element name="memory">
- <ref name="memoryKB"/>
- </element>
- <optional>
- <element name="currentMemory">
- <ref name="memoryKB"/>
- </element>
- </optional>
- <optional>
- <element name="memoryBacking">
- <optional>
- <element name="hugepages">
- <empty/>
- </element>
- </optional>
- </element>
- </optional>
- <optional>
- <element name="vcpu">
- <optional>
- <attribute name="cpuset"/>
- </optional>
- <ref name="countCPU"/>
- </element>
- </optional>
- </interleave>
- </define>
- <define name="clock">
- <optional>
- <element name="clock">
- <attribute name="offset">
- <choice>
- <value>localtime</value>
- <value>utc</value>
- </choice>
- </attribute>
- <empty/>
- </element>
- </optional>
- </define>
- <!--
- 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.
- -->
- <define name="bootloader">
- <interleave>
- <element name="bootloader">
- <choice>
- <ref name="absFilePath"/>
- <empty/>
- </choice>
- </element>
- <optional>
- <element name="bootloader_args">
- <text/>
- </element>
- </optional>
- </interleave>
- </define>
- <define name="osbootkernel">
- <interleave>
- <element name="kernel">
- <ref name="absFilePath"/>
- </element>
- <optional>
- <element name="initrd">
- <ref name="absFilePath"/>
- </element>
- </optional>
- <optional>
- <element name="root">
- <ref name="devicePath"/>
- </element>
- </optional>
- <optional>
- <element name="cmdline">
- <text/>
- </element>
- </optional>
- </interleave>
- </define>
- <define name="osbootdev">
- <element name="boot">
- <attribute name="dev">
- <choice>
- <value>hd</value>
- <value>fd</value>
- <value>cdrom</value>
- <value>network</value>
- </choice>
- </attribute>
- <empty/>
- </element>
- </define>
- <define name="diskspec">
- <optional>
- <ref name="driver"/>
- </optional>
- <ref name="target"/>
- <optional>
- <element name="readonly">
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="shareable">
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="serial">
- <ref name="diskSerial"/>
- </element>
- </optional>
- </define>
- <!--
- A disk description can be either of type file or block
- The name of the attribute on the source element depends on the type
- -->
- <define name="disk">
- <element name="disk">
- <optional>
- <attribute name="device">
- <choice>
- <value>floppy</value>
- <value>disk</value>
- <value>cdrom</value>
- </choice>
- </attribute>
- </optional>
- <choice>
- <group>
- <attribute name="type">
- <value>file</value>
- </attribute>
- <interleave>
- <optional>
- <element name="source">
- <attribute name="file">
- <ref name="absFilePath"/>
- </attribute>
- <empty/>
- </element>
- </optional>
- <ref name="diskspec"/>
- </interleave>
- </group>
- <group>
- <attribute name="type">
- <value>block</value>
- </attribute>
- <interleave>
- <optional>
- <element name="source">
- <attribute name="dev">
- <ref name="deviceName"/>
- </attribute>
- <empty/>
- </element>
- </optional>
- <ref name="diskspec"/>
- </interleave>
- </group>
- <ref name="diskspec"/>
- </choice>
- </element>
- </define>
- <define name="target">
- <element name="target">
- <attribute name="dev">
- <ref name="deviceName"/>
- </attribute>
- <optional>
- <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>
- </optional>
- </element>
- </define>
- <!--
- Disk may use a special driver for access. Currently this is
- 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.
- -->
- <define name="driver">
- <element name="driver">
- <choice>
- <group>
- <ref name="driverFormat"/>
- <optional>
- <ref name="driverCache"/>
- </optional>
- </group>
- <group>
- <optional>
- <ref name="driverFormat"/>
- </optional>
- <ref name="driverCache"/>
- </group>
- </choice>
- <empty/>
- </element>
- </define>
- <define name="driverFormat">
- <attribute name="name">
- <ref name="genericName"/>
- </attribute>
- <optional>
- <attribute name="type">
- <ref name="genericName"/>
- </attribute>
- </optional>
- </define>
- <define name="driverCache">
- <attribute name="cache">
- <choice>
- <value>none</value>
- <value>writeback</value>
- <value>writethrough</value>
- </choice>
- </attribute>
- </define>
- <define name="filesystem">
- <element name="filesystem">
- <choice>
- <group>
- <attribute name="type">
- <value>file</value>
- </attribute>
- <interleave>
- <element name="source">
- <attribute name="file">
- <ref name="absFilePath"/>
- </attribute>
- <empty/>
- </element>
- <ref name="filesystemtgt"/>
- </interleave>
- </group>
- <group>
- <attribute name="type">
- <value>block</value>
- </attribute>
- <interleave>
- <element name="source">
- <attribute name="dev">
- <ref name="deviceName"/>
- </attribute>
- <empty/>
- </element>
- <ref name="filesystemtgt"/>
- </interleave>
- </group>
- <group>
- <attribute name="type">
- <value>mount</value>
- </attribute>
- <interleave>
- <element name="source">
- <attribute name="dir">
- <ref name="absFilePath"/>
- </attribute>
- <empty/>
- </element>
- <ref name="filesystemtgt"/>
- </interleave>
- </group>
- <group>
- <attribute name="type">
- <value>template</value>
- </attribute>
- <interleave>
- <element name="source">
- <attribute name="name">
- <ref name="genericName"/>
- </attribute>
- <empty/>
- </element>
- <ref name="filesystemtgt"/>
- </interleave>
- </group>
- </choice>
- </element>
- </define>
- <define name="filesystemtgt">
- <element name="target">
- <attribute name="dir">
- <ref name="absDirPath"/>
- </attribute>
- <empty/>
- </element>
- </define>
- <!--
- 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
- options. FIXME
- -->
- <define name="interface">
- <element name="interface">
- <choice>
- <group>
- <attribute name="type">
- <value>bridge</value>
- </attribute>
- <interleave>
- <optional>
- <element name="source">
- <attribute name="bridge">
- <ref name="deviceName"/>
- </attribute>
- <empty/>
- </element>
- </optional>
- <ref name="interface-options"/>
- </interleave>
- </group>
- <group>
- <attribute name="type">
- <value>ethernet</value>
- </attribute>
- <interleave>
- <optional>
- <element name="source">
- <attribute name="dev">
- <ref name="deviceName"/>
- </attribute>
- <empty/>
- </element>
- </optional>
- <ref name="interface-options"/>
- </interleave>
- </group>
- <group>
- <attribute name="type">
- <value>network</value>
- </attribute>
- <interleave>
- <element name="source">
- <attribute name="network">
- <ref name="deviceName"/>
- </attribute>
- <empty/>
- </element>
- <ref name="interface-options"/>
- </interleave>
- </group>
- <group>
- <attribute name="type">
- <value>user</value>
- </attribute>
- <interleave>
- <ref name="interface-options"/>
- </interleave>
- </group>
- <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>
- </choice>
- </element>
- </define>
- <!--
- The interface options possible are:
- - the MAC address
- - the IP address bound to the interface
- - the name of the script used to set up the binding
- - the target device used
- -->
- <define name="interface-options">
- <interleave>
- <optional>
- <element name="target">
- <attribute name="dev">
- <ref name="deviceName"/>
- </attribute>
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="mac">
- <attribute name="address">
- <ref name="addrMAC"/>
- </attribute>
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="ip">
- <attribute name="address">
- <ref name="addrIP"/>
- </attribute>
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="script">
- <attribute name="path">
- <ref name="filePath"/>
- </attribute>
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="model">
- <attribute name="type"/>
- <empty/>
- </element>
- </optional>
- </interleave>
- </define>
- <!--
- An emulator description is just a path to the binary used for the task
- -->
- <define name="emulator">
- <element name="emulator">
- <ref name="absFilePath"/>
- </element>
- </define>
- <!--
- A graphic description, currently in Xen only 2 types are supported:
- - sdl with optional display, xauth and fullscreen
- - vnc with a required port and optional listen IP address, password
- and keymap
- -->
- <define name="graphic">
- <element name="graphics">
- <choice>
- <group>
- <attribute name="type">
- <value>sdl</value>
- </attribute>
- <optional>
- <attribute name="display">
- <text/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xauth">
- <text/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fullscreen">
- <choice>
- <value>yes</value>
- <value>no</value>
- </choice>
- </attribute>
- </optional>
- </group>
- <group>
- <attribute name="type">
- <value>vnc</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="listen">
- <ref name="addrIP"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="passwd">
- <text/>
- </attribute>
- </optional>
- <optional>
- <attribute name="keymap">
- <text/>
- </attribute>
- </optional>
- </group>
- <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">
- <ref name="addrIP"/>
- </attribute>
- </optional>
- </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>
- </choice>
- </element>
- </define>
- <!--
- A graphic description, currently in Xen only 2 types are supported:
- - sdl with optional display, xauth and fullscreen
- - vnc with a required port and optional listen IP address, password
- and keymap
- -->
- <define name="video">
- <element name="video">
- <optional>
- <element name="model">
- <attribute name="type">
- <choice>
- <value>vga</value>
- <value>cirrus</value>
- <value>vmvga</value>
- <value>xen</value>
- <value>vbox</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="vram">
- <ref name="unsignedInt"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="heads">
- <ref name="unsignedInt"/>
- </attribute>
- </optional>
- <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>
- </element>
- </optional>
- </element>
- </define>
- <!--
- When a domain terminates multiple policies can be applied depending
- on how it ended:
- -->
- <define name="termination">
- <interleave>
- <optional>
- <element name="on_reboot">
- <ref name="offOptions"/>
- </element>
- </optional>
- <optional>
- <element name="on_poweroff">
- <ref name="offOptions"/>
- </element>
- </optional>
- <optional>
- <element name="on_crash">
- <ref name="offOptions"/>
- </element>
- </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
- -->
- <define name="offOptions">
- <choice>
- <value>destroy</value>
- <value>restart</value>
- <value>preserve</value>
- <value>rename-restart</value>
- </choice>
- </define>
- <!--
- Specific setup for a qemu emulated character device. Note: this
- definition doesn't fully specify the constraints on this node.
- -->
- <define name="qemucdev">
- <attribute name="type">
- <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>
- </choice>
- </attribute>
- <interleave>
- <optional>
- <oneOrMore>
- <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>
- </oneOrMore>
- </optional>
- <optional>
- <element name="protocol">
- <optional>
- <attribute name="type"/>
- </optional>
- </element>
- </optional>
- <optional>
- <element name="target">
- <optional>
- <attribute name="port"/>
- </optional>
- </element>
- </optional>
- </interleave>
- </define>
- <!--
- The description for a console
- just a tty device
- -->
- <define name="console">
- <element name="console">
- <choice>
- <group>
- <optional>
- <attribute name="tty">
- <ref name="devicePath"/>
- </attribute>
- </optional>
- <empty/>
- </group>
- <ref name="qemucdev"/>
- </choice>
- </element>
- </define>
- <define name="sound">
- <element name="sound">
- <attribute name="model">
- <choice>
- <value>sb16</value>
- <value>es1370</value>
- <value>pcspk</value>
- <value>ac97</value>
- </choice>
- </attribute>
- </element>
- </define>
- <define name="parallel">
- <element name="parallel">
- <ref name="qemucdev"/>
- </element>
- </define>
- <define name="serial">
- <element name="serial">
- <ref name="qemucdev"/>
- </element>
- </define>
- <define name="input">
- <element name="input">
- <attribute name="type">
- <choice>
- <value>tablet</value>
- <value>mouse</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="bus">
- <choice>
- <value>ps2</value>
- <value>usb</value>
- <value>xen</value>
- </choice>
- </attribute>
- </optional>
- </element>
- </define>
- <define name="hostdev">
- <element name="hostdev">
- <optional>
- <attribute name="mode">
- <choice>
- <value>subsystem</value>
- <value>capabilities</value>
- </choice>
- </attribute>
- <attribute name="type">
- <choice>
- <value>usb</value>
- <value>pci</value>
- </choice>
- </attribute>
- <attribute name="managed">
- <choice>
- <value>yes</value>
- <value>no</value>
- </choice>
- </attribute>
- </optional>
- <group>
- <element name="source">
- <choice>
- <ref name="usbproduct"/>
- <ref name="usbaddress"/>
- <ref name="pciaddress"/>
- </choice>
- </element>
- </group>
- </element>
- </define>
- <define name="usbproduct">
- <element name="vendor">
- <attribute name="id">
- <ref name="usbId"/>
- </attribute>
- </element>
- <element name="product">
- <attribute name="id">
- <ref name="usbId"/>
- </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>
- <define name="pciaddress">
- <element name="address">
- <optional>
- <attribute name="domain">
- <ref name="pciDomain"/>
- </attribute>
- </optional>
- <attribute name="bus">
- <ref name="pciBus"/>
- </attribute>
- <attribute name="slot">
- <ref name="pciSlot"/>
- </attribute>
- <attribute name="function">
- <ref name="pciFunc"/>
- </attribute>
- </element>
- </define>
- <!--
- Devices attached to a domain.
- -->
- <define name="devices">
- <element name="devices">
- <interleave>
- <optional>
- <ref name="emulator"/>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="disk"/>
- <ref name="filesystem"/>
- <ref name="interface"/>
- <ref name="input"/>
- <ref name="sound"/>
- <ref name="hostdev"/>
- <ref name="graphic"/>
- <ref name="video"/>
- <ref name="console"/>
- <ref name="parallel"/>
- <ref name="serial"/>
- </choice>
- </zeroOrMore>
- </interleave>
- </element>
- </define>
- <!--
- A set of optional features: PAE, APIC and ACPI support
- -->
- <define name="features">
- <optional>
- <element name="features">
- <interleave>
- <optional>
- <element name="pae">
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="apic">
- <empty/>
- </element>
- </optional>
- <optional>
- <element name="acpi">
- <empty/>
- </element>
- </optional>
- </interleave>
- </element>
- </optional>
- </define>
- <!--
- Type library
- Our unsignedInt doesn't allow a leading '+' in its lexical form
- A domain name shoul be made of ascii, numbers, _-+ and is non-empty
- UUID currently allows only the 32 characters strict syntax
- memoryKB request at least 4Mbytes though Xen will grow bigger if too low
- -->
- <define name="unsignedInt">
- <data type="unsignedInt">
- <param name="pattern">[0-9]+</param>
- </data>
- </define>
- <define name="countCPU">
- <data type="unsignedShort">
- <param name="pattern">[0-9]+</param>
- <param name="minInclusive">1</param>
- </data>
- </define>
- <define name="PortNumber">
- <data type="short">
- <param name="minInclusive">-1</param>
- </data>
- </define>
- <define name="memoryKB">
- <data type="unsignedInt">
- <param name="pattern">[0-9]+</param>
- <param name="minInclusive">4000</param>
- </data>
- </define>
- <define name="domainName">
- <data type="string">
- <param name="pattern">[A-Za-z0-9_\.\+\-&:/]+</param>
- </data>
- </define>
- <define name="diskSerial">
- <data type="string">
- <param name="pattern">[A-Za-z0-9_\.\+\-]+</param>
- </data>
- </define>
- <define name="genericName">
- <data type="string">
- <param name="pattern">[a-zA-Z0-9_\+\-]+</param>
- </data>
- </define>
- <define name="UUID">
- <choice>
- <data type="string">
- <param name="pattern">[a-fA-F0-9]{32}</param>
- </data>
- <data type="string">
- <param name="pattern">[a-fA-F0-9]{8}\-([a-fA-F0-9]{4}\-){3}[a-fA-F0-9]{12}</param>
- </data>
- </choice>
- </define>
- <define name="filePath">
- <data type="string">
- <param name="pattern">[a-zA-Z0-9_\.\+\-&/%]+</param>
- </data>
- </define>
- <define name="absFilePath">
- <data type="string">
- <param name="pattern">/[a-zA-Z0-9_\.\+\-&/%]+</param>
- </data>
- </define>
- <define name="absDirPath">
- <data type="string">
- <param name="pattern">/[a-zA-Z0-9_\.\+\-&/%]*</param>
- </data>
- </define>
- <define name="devicePath">
- <data type="string">
- <param name="pattern">/[a-zA-Z0-9_\+\-/%]+</param>
- </data>
- </define>
- <define name="deviceName">
- <data type="string">
- <param name="pattern">[a-zA-Z0-9_\.\-:/]+</param>
- </data>
- </define>
- <define name="addrMAC">
- <data type="string">
- <param name="pattern">([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}</param>
- </data>
- </define>
- <define name="addrIP">
- <data type="string">
- <param name="pattern">([0-2]?[0-9]?[0-9]\.){3}[0-2]?[0-9]?[0-9]</param>
- </data>
- </define>
- <define name="usbId">
- <data type="string">
- <param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
- </data>
- </define>
- <define name="usbAddr">
- <data type="string">
- <param name="pattern">(0x)?[0-9a-fA-F]{1,3}</param>
- </data>
- </define>
- <define name="pciDomain">
- <data type="string">
- <param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
- </data>
- </define>
- <define name="pciBus">
- <data type="string">
- <param name="pattern">(0x)?[0-9a-fA-F]{1,2}</param>
- </data>
- </define>
- <define name="pciSlot">
- <data type="string">
- <param name="pattern">(0x)?[0-1]?[0-9a-fA-F]</param>
- </data>
- </define>
- <define name="pciFunc">
- <data type="string">
- <param name="pattern">(0x)?[0-7]</param>
- </data>
- </define>
- </grammar>
|