[Oval-commits] r69 - trunk/tools/oval/definition

Pavel Vinogradov blaze-guest at alioth.debian.org
Tue Jul 10 19:29:37 UTC 2007


Author: blaze-guest
Date: 2007-07-10 19:29:37 +0000 (Tue, 10 Jul 2007)
New Revision: 69

Modified:
   trunk/tools/oval/definition/generator.py
Log:
Update XML generator to 5.3 schema version.


Modified: trunk/tools/oval/definition/generator.py
===================================================================
--- trunk/tools/oval/definition/generator.py	2007-07-10 18:57:18 UTC (rev 68)
+++ trunk/tools/oval/definition/generator.py	2007-07-10 19:29:37 UTC (rev 69)
@@ -118,9 +118,12 @@
 	
 	ref = __getNewId ("test")
 	test = __createXMLElement("dpkginfo_test", 
-							  attrs={"id":ref, "version":"1", "check":"all",
-									 "xmlns":"http://oval.mitre.org/XMLSchema/oval-deinitions-5#linux"})
-				
+			attrs={"id":ref, 
+				"version":"1", 
+				"check":"all",
+				"check_existence":"at_least_one_exists",
+				"xmlns":"http://oval.mitre.org/XMLSchema/oval-deinitions-5#linux"
+			})
 	test.appendChild ( __createXMLElement("object", attrs={"object_ref" : __createOVALObject (name)}))
 	test.appendChild ( __createXMLElement("state", attrs={"state_ref" : __createOVALState (version)}))
 	tests.appendChild(test)
@@ -135,8 +138,12 @@
 		ref = __getNewId("test")
 		
 		test = __createXMLElement("dpkginfo_test", 
-								  attrs={"id":ref, "version":"1", "check":"all",
-										 "xmlns":"http://oval.mitre.org/XMLSchema/oval-deinitions-5#linux"})
+				attrs={"id":ref, 
+					"version":"1", 
+					"check":"all",
+					"check_existence":"at_least_one_exists",
+					"xmlns":"http://oval.mitre.org/XMLSchema/oval-deinitions-5#linux"
+			})
 		
 		if testType == "release":
 			objectId = __createOVALObject ("debian_version")
@@ -162,7 +169,7 @@
 	generator = doc.createElement ("generator")
 
 	generator.appendChild ( __createXMLElement ("oval:product_name", "Debian") )
-	generator.appendChild ( __createXMLElement ("oval:schema_version", "5.2") )
+	generator.appendChild ( __createXMLElement ("oval:schema_version", "5.3") )
 	generator.appendChild ( __createXMLElement ("oval:timestamp", datetime.datetime.now().strftime ("%Y-%m-%dT%H:%M:%S.188-04:00")) )
 
 	return (generator)




More information about the Oval-commits mailing list