Changeset 59556 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Feb 2, 2016 2:06:22 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/api/tdAppliance1.py
r59535 r59556 34 34 import os 35 35 import sys 36 import time37 import threading38 import types39 36 40 37 # Only the main script needs to modify the path. … … 48 45 from testdriver import base; 49 46 from testdriver import vbox; 47 from testdriver import vboxwrappers; 50 48 51 49 … … 79 77 80 78 # Import a set of simple OVAs. 81 for sOVA in [,]: 82 pass; ## @todo 79 # Note! Manifests generated by ovftool 4.0.0 does not include the ovf, while the ones b 4.1.0 does. 80 for sOva in ( 81 # t1 is a plain VM without any disks, ovftool 4.0 export from fusion 82 'tdAppliance1-t1.ova', 83 # t2 is a plain VM with one disk. Both 4.0 and 4.1.0 exports. 84 'tdAppliance1-t2.ova', 85 'tdAppliance1-t2-ovftool-4.1.0.ova', 86 # t3 is a VM with one gzipped disk and selecting SHA256 on the ovftool cmdline (--compress=9 --shaAlgorithm=sha256). 87 'tdAppliance1-t3.ova', 88 'tdAppliance1-t3-ovftool-4.1.0.ova', 89 # t4 is a VM with with two gzipped disk, SHA256 and a signed manifest (--privateKey=./tdAppliance1-t4.pem). 90 'tdAppliance1-t4.ova', 91 'tdAppliance1-t4-ovftool-4.1.0.ova', 92 ): 93 reporter.testStart(sOva); 94 try: 95 fRc = self.testImportOva(os.path.join(g_ksValidationKitDir, 'tests', 'api', sOva)) and fRc; 96 except: 97 reporter.errorXcpt(); 98 fRc = False; 99 fRc = reporter.testDone() and fRc; 83 100 101 ## @todo more stuff 84 102 return fRc; 85 103 … … 88 106 # 89 107 108 def testImportOva(self, sOva): 109 """ xxx """ 110 oVirtualBox = self.oVBoxMgr.getVirtualBox(); 111 112 try: 113 oAppliance = oVirtualBox.createAppliance(); 114 except: 115 return reporter.errorXcpt('IVirtualBox::createAppliance failed'); 116 print "oAppliance=%s" % (oAppliance,) 117 118 try: 119 oProgress = vboxwrappers.ProgressWrapper(oAppliance.read(sOva), self.oVBoxMgr, self, 'read "%s"' % (sOva,)); 120 except: 121 return reporter.errorXcpt('IAppliance::read("%s") failed' % (sOva,)); 122 oProgress.wait(); 123 if oProgress.logResult() is False: 124 return False; 125 126 try: 127 oAppliance.interpret(); 128 except: 129 return reporter.errorXcpt('IAppliance::interpret() failed on "%s"' % (sOva,)); 130 131 # 132 try: 133 oProgress = vboxwrappers.ProgressWrapper(oAppliance.importMachines([]), 134 self.oVBoxMgr, self, 'importMachines "%s"' % (sOva,)); 135 except: 136 return reporter.errorXcpt('IAppliance::importMachines failed on "%s"' % (sOva,)); 137 oProgress.wait(); 138 if oProgress.logResult() is False: 139 return False; 140 141 ## @todo do more with this OVA. Like untaring it and loading it as an OVF. Export it and import it again. 142 143 return True; 144 90 145 91 146 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.