Nir Soffer has posted comments on this change.

Change subject: Cleanup of storage domain creation in hsm.py
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/45375/1/vdsm/storage/hsm.py
File vdsm/storage/hsm.py:

Line 2672: 
Line 2673:         # getSharedLock(connectionsResource...)
Line 2674:         # getExclusiveLock(sdUUID...)
Line 2675:         if storageType in sd.BLOCK_DOMAIN_TYPES:
Line 2676:             kreator = blockSD.BlockStorageDomain
Nice!

But lets simplify:

    if storageType in sd.BLOCK_DOMAIN_TYPES:
        create = blockSD.BlockStorageDomain.create
    ...

    create(...)

This eliminate the need to have the trademark "kreator" :-)
Line 2677:         elif storageType in (sd.NFS_DOMAIN, sd.POSIXFS_DOMAIN):
Line 2678:             kreator = nfsSD.NfsStorageDomain
Line 2679:         elif storageType == sd.GLUSTERFS_DOMAIN:
Line 2680:             kreator = glusterSD.GlusterStorageDomain


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib4f3771e40595d77fd80811c6b7ea6bf4c768d69
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to