test_class.file: cosmic-agent/src/test/java/com/cloud/agent/resource/kvm/storage/utils/QemuImgTest.java
test_class.identifier: QemuImgTest
test_case.body: @Test
      public void testCreateSparseVolume() throws QemuImgException {
          final String filename = "/tmp/" + UUID.randomUUID() + ".qcow2";
  
          /* 10TB virtual_size */
          final long size = 10995116277760l;
          final QemuImgFile file = new QemuImgFile(filename, size, PhysicalDiskFormat.QCOW2);
          final String preallocation = "metadata";
          final Map<String, String> options = new HashMap<>();
  
          options.put("preallocation", preallocation);
  
          final QemuImg qemu = new QemuImg(0);
          qemu.create(file, options);
  
          final String allocatedSize = Script.runSimpleBashScript(String.format("ls -alhs %s | awk '{print $1}'", file));
          final String declaredSize = Script.runSimpleBashScript(String.format("ls -alhs %s | awk '{print $6}'", file));
  
          assertFalse(allocatedSize.equals(declaredSize));
  
          final File f = new File(filename);
          f.delete();
      }
test_case.class_method_signature: QemuImgTest.testCreateSparseVolume()
test_case.full_signature: @Test public void testCreateSparseVolume()
test_case.identifier: testCreateSparseVolume
test_case.invocations: randomUUID put create runSimpleBashScript format runSimpleBashScript format assertFalse equals delete
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateSparseVolume()
focal_class.declarator: qemuImgPath = "qemu-img"
focal_class.modifier: private
focal_class.original_string: private String qemuImgPath = "qemu-img";
focal_class.type: String
focal_class.var_name: qemuImgPath
focal_class.declarator: timeout
focal_class.modifier: private
focal_class.original_string: private int timeout;
focal_class.type: int
focal_class.var_name: timeout
focal_class.file: cosmic-agent/src/main/java/com/cloud/agent/resource/kvm/storage/utils/QemuImg.java
focal_class.identifier: QemuImg
focal_class.class_method_signature: QemuImg.QemuImg(final int timeout)
focal_class.full_signature: public  QemuImg(final int timeout)
focal_class.identifier: QemuImg
focal_class.modifiers: public
focal_class.parameters: (final int timeout)
focal_class.signature:  QemuImg(final int timeout)
focal_class.class_method_signature: QemuImg.QemuImg(final String qemuImgPath)
focal_class.full_signature: public  QemuImg(final String qemuImgPath)
focal_class.identifier: QemuImg
focal_class.modifiers: public
focal_class.parameters: (final String qemuImgPath)
focal_class.signature:  QemuImg(final String qemuImgPath)
focal_class.class_method_signature: QemuImg.setTimeout(final int timeout)
focal_class.full_signature: public void setTimeout(final int timeout)
focal_class.identifier: setTimeout
focal_class.modifiers: public
focal_class.parameters: (final int timeout)
focal_class.return: void
focal_class.signature: void setTimeout(final int timeout)
focal_class.class_method_signature: QemuImg.check(final QemuImgFile file)
focal_class.full_signature: public void check(final QemuImgFile file)
focal_class.identifier: check
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile file)
focal_class.return: void
focal_class.signature: void check(final QemuImgFile file)
focal_class.class_method_signature: QemuImg.create(final QemuImgFile file)
focal_class.full_signature: public void create(final QemuImgFile file)
focal_class.identifier: create
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile file)
focal_class.return: void
focal_class.signature: void create(final QemuImgFile file)
focal_class.class_method_signature: QemuImg.create(final QemuImgFile file, final QemuImgFile backingFile, final Map<String, String> options)
focal_class.full_signature: public void create(final QemuImgFile file, final QemuImgFile backingFile, final Map<String, String> options)
focal_class.identifier: create
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile file, final QemuImgFile backingFile, final Map<String, String> options)
focal_class.return: void
focal_class.signature: void create(final QemuImgFile file, final QemuImgFile backingFile, final Map<String, String> options)
focal_class.class_method_signature: QemuImg.create(final QemuImgFile file, final QemuImgFile backingFile)
focal_class.full_signature: public void create(final QemuImgFile file, final QemuImgFile backingFile)
focal_class.identifier: create
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile file, final QemuImgFile backingFile)
focal_class.return: void
focal_class.signature: void create(final QemuImgFile file, final QemuImgFile backingFile)
focal_class.class_method_signature: QemuImg.create(final QemuImgFile file, final Map<String, String> options)
focal_class.full_signature: public void create(final QemuImgFile file, final Map<String, String> options)
focal_class.identifier: create
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile file, final Map<String, String> options)
focal_class.return: void
focal_class.signature: void create(final QemuImgFile file, final Map<String, String> options)
focal_class.class_method_signature: QemuImg.convert(final QemuImgFile srcFile, final QemuImgFile destFile)
focal_class.full_signature: public void convert(final QemuImgFile srcFile, final QemuImgFile destFile)
focal_class.identifier: convert
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile srcFile, final QemuImgFile destFile)
focal_class.return: void
focal_class.signature: void convert(final QemuImgFile srcFile, final QemuImgFile destFile)
focal_class.class_method_signature: QemuImg.convert(final QemuImgFile srcFile, final QemuImgFile destFile, final Map<String, String> options)
focal_class.full_signature: public void convert(final QemuImgFile srcFile, final QemuImgFile destFile, final Map<String, String> options)
focal_class.identifier: convert
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile srcFile, final QemuImgFile destFile, final Map<String, String> options)
focal_class.return: void
focal_class.signature: void convert(final QemuImgFile srcFile, final QemuImgFile destFile, final Map<String, String> options)
focal_class.class_method_signature: QemuImg.resize(final QemuImgFile file, final long size)
focal_class.full_signature: public void resize(final QemuImgFile file, final long size)
focal_class.identifier: resize
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile file, final long size)
focal_class.return: void
focal_class.signature: void resize(final QemuImgFile file, final long size)
focal_class.class_method_signature: QemuImg.resize(final QemuImgFile file, final long size, final boolean delta)
focal_class.full_signature: public void resize(final QemuImgFile file, final long size, final boolean delta)
focal_class.identifier: resize
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile file, final long size, final boolean delta)
focal_class.return: void
focal_class.signature: void resize(final QemuImgFile file, final long size, final boolean delta)
focal_class.class_method_signature: QemuImg.commit(final QemuImgFile file)
focal_class.full_signature: public void commit(final QemuImgFile file)
focal_class.identifier: commit
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile file)
focal_class.return: void
focal_class.signature: void commit(final QemuImgFile file)
focal_class.class_method_signature: QemuImg.info(final QemuImgFile file)
focal_class.full_signature: public Map<String, String> info(final QemuImgFile file)
focal_class.identifier: info
focal_class.modifiers: public
focal_class.parameters: (final QemuImgFile file)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> info(final QemuImgFile file)
focal_class.class_method_signature: QemuImg.snapshot()
focal_class.full_signature: public void snapshot()
focal_class.identifier: snapshot
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void snapshot()
focal_class.class_method_signature: QemuImg.rebase()
focal_class.full_signature: public void rebase()
focal_class.identifier: rebase
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void rebase()
focal_method.body: public void create(final QemuImgFile file) throws QemuImgException {
          this.create(file, null, null);
      }
focal_method.class_method_signature: QemuImg.create(final QemuImgFile file)
focal_method.full_signature: public void create(final QemuImgFile file)
focal_method.identifier: create
focal_method.invocations: create
focal_method.modifiers: public
focal_method.parameters: (final QemuImgFile file)
focal_method.return: void
focal_method.signature: void create(final QemuImgFile file)