Shahar Havivi has posted comments on this change.

Change subject: core: add query for getting vms from external provider
......................................................................


Patch Set 47:

(1 comment)

http://gerrit.ovirt.org/#/c/33052/47/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java:

Line 120:         vmStatic.setId(Guid.createGuidFromString((String) 
xmlRpcStruct.get(VdsProperties.vm_guid)));
Line 121:         vmStatic.setName((String) 
xmlRpcStruct.get(VdsProperties.vm_name));
Line 122:         vmStatic.setMemSizeMb((int) 
xmlRpcStruct.get(VdsProperties.mem_size_mb));
Line 123:         vmStatic.setNumOfSockets((int) 
xmlRpcStruct.get(VdsProperties.num_of_cpus));
Line 124: 
in case id, name, cpu and mem - vdsm is not throwing an exception if its not 
there so you may have here NPE,
maybe you can check if exists as you did in the networks and disks
Line 125:         if (xmlRpcStruct.containsKey(VdsProperties.vm_disks)) {
Line 126:             for (Object diskMap : (Object[]) 
xmlRpcStruct.get(VdsProperties.vm_disks)) {
Line 127:                 DiskImage image = 
buildDiskImageFromExternalProvider((Map<String, Object>)diskMap);
Line 128:                 vmStatic.getImages().add(image);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I870043d8c392e6cd60d133a8701fa756b6b6a079
Gerrit-PatchSet: 47
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to