Ravi Nori has posted comments on this change.

Change subject: restapi: VM-runtime-only information presented after VM goes 
down (#869682)
......................................................................


Patch Set 1: (5 inline comments)

....................................................
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
Line 284:                 if (osType != null) {
Line 285:                     os.setType(osType.value());
Line 286:                 }
Line 287:             }
Line 288:             if (getIsVmRunning(entity) && entity.getboot_sequence() 
!= null) {
Yes I will change it.
Line 289:                 for (Boot boot : 
map(entity.getdefault_boot_sequence(), null)) {
Line 290:                     os.getBoot().add(boot);
Line 291:                 }
Line 292:             }


Line 311:             VmPool pool = new VmPool();
Line 312:             pool.setId(entity.getVmPoolId().toString());
Line 313:             model.setVmPool(pool);
Line 314:         }
Line 315:         if (getIsVmRunning(entity) && entity.getrun_on_vds() != null) 
{
Do you mean I should change org.ovirt.engine.core.common.businessentities.VM to 
return null when VM is down. What if we need the dynamic properties even when 
the VM is down? More over I would need to add the logic about VM state in this 
class.
Line 316:             model.setHost(new Host());
Line 317:             model.getHost().setId(entity.getrun_on_vds().toString());
Line 318:         }
Line 319:         if (entity.getdefault_display_type() != null) {


Line 322:                 
model.getDisplay().setType(map(entity.getDynamicData().getdisplay_type(), 
null));
Line 323:             } else {
Line 324:                 
model.getDisplay().setType(map(entity.getdefault_display_type(), null));
Line 325:             }
Line 326:             if (getIsVmRunning(entity) && entity.getDynamicData() != 
null) {
I will move it
Line 327:                 model.getDisplay().setAddress(entity.getdisplay_ip());
Line 328:                 Integer displayPort = entity.getdisplay();
Line 329:                 model.getDisplay().setPort(displayPort==null || 
displayPort==-1 ? null : displayPort);
Line 330:                 Integer displaySecurePort = 
entity.getdisplay_secure_port();


Line 361:             Domain domain = new Domain();
Line 362:             domain.setName(entity.getvm_domain());
Line 363:             model.setDomain(domain);
Line 364:         }
Line 365:         if (getIsVmRunning(entity) && entity.getvm_ip()!=null && 
!entity.getvm_ip().isEmpty()) {
Same as above should I change org.ovirt.engine.core.common.businessentities.VM?
Line 366:             model.setGuestInfo(new GuestInfo());
Line 367:             model.getGuestInfo().setIps(new IPs());
Line 368:             for (String item : entity.getvm_ip().split(" ")) {
Line 369:                 if (!item.equals("")) {


....................................................
Commit Message
Line 8: 
Line 9: VM-runtime-only display information is presented by api after VM goes 
down
Line 10: 
Line 11: The runtime only information like address, port, secure_port, 
start_time and
Line 12: boot priority need to be hidden when the vm is not running.
I will fix this.
Line 13: 
Line 14: Change-Id: Ie36fa8049c8ddad483e7e16f13a3d0a029f8f218
Line 15: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=869682


--
To view, visit http://gerrit.ovirt.org/9090
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie36fa8049c8ddad483e7e16f13a3d0a029f8f218
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to