FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora/Linux Management Tools

 
 
LinkBack Thread Tools
 
Old 12-13-2007, 01:23 AM
David Lutterkort
 
Default Add version information to image.xml

# HG changeset patch
# User David Lutterkort <dlutter@redhat.com>
# Date 1197512462 28800
# Node ID 557938724328c5b26e222f4a79d2e36b3a1e5d80
# Parent 81d9288672cb1e296f4dc09633c8faeee66046b7
Add version information to image.xml

diff -r 81d9288672cb -r 557938724328 doc/image.rng
--- a/doc/image.rng Tue Dec 11 11:45:06 2007 -0500
+++ b/doc/image.rng Wed Dec 12 18:21:02 2007 -0800
@@ -8,7 +8,12 @@
storage backing the machine -->
<element name="image">
<!-- A machine-usable name for this image -->
- <element name="name"><ref name="genericName"/></element>
+ <element name="name">
+ <optional>
+ <attribute name="version"><ref name="verString"/></attribute>
+ </optional>
+ <ref name="genericName"/>
+ </element>
<!-- A human-readable label and description, mostly
to support UI's -->
<optional>
@@ -246,4 +251,9 @@
<param name="pattern">[a-zA-Z0-9_-:./]+</param>
</data>
</define>
+ <define name="verString">
+ <data type="string">
+ <param name="pattern">[0-9.]+(-[0-9.]+)?</param>
+ </data>
+ </define>
</grammar>
diff -r 81d9288672cb -r 557938724328 virtinst/ImageParser.py
--- a/virtinst/ImageParser.py Tue Dec 11 11:45:06 2007 -0500
+++ b/virtinst/ImageParser.py Wed Dec 12 18:21:02 2007 -0800
@@ -36,6 +36,8 @@ class Image:
self.name = None
self.label = None
self.descr = None
+ self.version = None
+ self.release = None
if not node is None:
self.parseXML(node)

@@ -43,6 +45,8 @@ class Image:
self.name = xpathString(node, "name")
self.label = xpathString(node, "label")
self.descr = xpathString(node, "description")
+ self.version = xpathString(node, "name/@version")
+ self.release = xpathString(node, "name/@release")
for d in node.xpathEval("storage/disk"):
disk = Disk(d)
if disk.file is None:

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
 

Thread Tools




All times are GMT. The time now is 03:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org