Roy Golan has posted comments on this change.

Change subject: core: Gluster disk as network device
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/41899/1/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java:

Line 375:                 switch (disk.getDiskStorageType()) {
Line 376:                     case IMAGE:
Line 377:                         DiskImage diskImage = (DiskImage) disk;
Line 378:                         Guid storageDomainId = 
diskImage.getStorageIds().get(0);
Line 379:                         StorageDomain sd = 
DbFacade.getInstance().getStorageDomainDao().get(storageDomainId);
> We are using now CDI to inject DAOs
this bean is "unmanaged" i.e we just create it with "new" keyword or some other 
factory. 

to get instances into that instance you can simply use the 
org.ovirt.core.di.Injector -

 Injector.get(StorageDomainDao.class) 

see other usages of Injector including InjectorRule for Junit
Line 380:                         if (sd.getStorageType() == 
StorageType.GLUSTERFS &&
Line 381:                                 
FeatureSupported.libgfApiSupported(vm.getVdsGroupCompatibilityVersion())) {
Line 382:                             struct.put(VdsProperties.DiskType, 
VdsProperties.NETWORK);
Line 383:                         }


-- 
To view, visit https://gerrit.ovirt.org/41899
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I061594c83342883804fc379a00a953591474bdbb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to