Ejemplo n.º 1
0
    def x_export_base(self, args):
        _, base = self.find_base(args.id)

        output_path = args.dest
        if base is not None:
            PackagingUtil.export_basevm(output_path, base.disk_path,
                                        base.hash_value)
        else:
            print "Failed to find matching image with id: %s" % args.id
Ejemplo n.º 2
0
 def test_export_base(self):
     disk_path = self.base_vm_path
     dbconn, matching_basevm = PackagingUtil._get_matching_basevm(disk_path)
     self.assertTrue(matching_basevm is not None,
                     "Cannot find the requested base VM")
     try:
         PackagingUtil.export_basevm(self.export_outpath,
                                     matching_basevm.disk_path,
                                     matching_basevm.hash_value)
     except Exception as e:
         self.assertTrue(False, "Failed to export base VM: %s" % str(e))
     else:
         self.assertTrue(os.path.join(self.export_outpath))
 def test_export_base(self):
     disk_path=self.base_vm_path
     dbconn, matching_basevm = PackagingUtil._get_matching_basevm(disk_path)
     self.assertTrue(matching_basevm is not None,
                     "Cannot find the requested base VM")
     try:
         PackagingUtil.export_basevm(
             self.export_outpath,
             matching_basevm.disk_path,
             matching_basevm.hash_value
         )
     except Exception as e:
         self.assertTrue(False, "Failed to export base VM: %s" % str(e))
     else:
         self.assertTrue(os.path.join(self.export_outpath))