Skip to content

Commit eff2da2

Browse files
SadiJrSadiJr
andauthored
Refactor and improvements for method com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.createVMFromSpec() (#5149)
* Refactor method createVMFromSpec * Add unit tests * Fix test * Extract if block to method for add extra configs to VM Domain XML * Split travis tests trying to isolate which test is causing an error * Override toString() method * Update documentation * Fix checkstyle error (line with trailing spaces) * Change VirtualMachineTO print of object * Add try except to find message error. Remove after test * Fix indent * Trying to understanding why is happening in this code * Refactor method createVMFromSpec * Add unit tests * Fix test * Extract if block to method for add extra configs to VM Domain XML * Split travis tests trying to isolate which test is causing an error * Override toString() method * Update documentation * Fix checkstyle error (line with trailing spaces) * Remove unnecessary comment * Revert travis tests Co-authored-by: SadiJr <17a0db2854@firemailbox.club>
1 parent eb3acc3 commit eff2da2

3 files changed

Lines changed: 792 additions & 214 deletions

File tree

api/src/main/java/com/cloud/agent/api/to/VirtualMachineTO.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,4 +413,9 @@ public DeployAsIsInfoTO getDeployAsIsInfo() {
413413
public void setDeployAsIsInfo(DeployAsIsInfoTO deployAsIsInfo) {
414414
this.deployAsIsInfo = deployAsIsInfo;
415415
}
416+
417+
@Override
418+
public String toString() {
419+
return String.format("VM {id: \"%s\", name: \"%s\", uuid: \"%s\", type: \"%s\"}", id, name, uuid, type);
420+
}
416421
}

0 commit comments

Comments
 (0)