Gilad Chaplik has posted comments on this change.

Change subject: core: add disk profile to newly created storage domain
......................................................................


Patch Set 3:

(3 comments)

new patch to follow.

http://gerrit.ovirt.org/#/c/29037/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/profiles/DiskProfileHelper.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/profiles/DiskProfileHelper.java:

Line 2: 
Line 3: import 
org.ovirt.engine.core.common.businessentities.profiles.DiskProfile;
Line 4: import org.ovirt.engine.core.compat.Guid;
Line 5: 
Line 6: public class DiskProfileHelper {
> let's make the ctor private here so one will create instance of it mistaken
Done
Line 7: 
Line 8:     public static DiskProfile createDiskProfile(Guid storageDomainId, 
String storageDomainName) {
Line 9:         DiskProfile profile = new DiskProfile();
Line 10:         profile.setId(Guid.newGuid());


Line 4: import org.ovirt.engine.core.compat.Guid;
Line 5: 
Line 6: public class DiskProfileHelper {
Line 7: 
Line 8:     public static DiskProfile createDiskProfile(Guid storageDomainId, 
String storageDomainName) {
> let's the second parameter to be 'name', the fact that it's the storage dom
Done
Line 9:         DiskProfile profile = new DiskProfile();
Line 10:         profile.setId(Guid.newGuid());
Line 11:         profile.setName(storageDomainName);
Line 12:         profile.setStorageDomainId(storageDomainId);


http://gerrit.ovirt.org/#/c/29037/3/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageDomainCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageDomainCommand.java:

Line 75:                 StorageDomainStatic storageStaticData = 
getStorageDomain().getStorageStaticData();
Line 76:                 
DbFacade.getInstance().getStorageDomainStaticDao().save(storageStaticData);
Line 77:                 // create default disk profile for type master or data 
storage domains
Line 78:                 if (storageStaticData.getStorageDomainType() == 
StorageDomainType.Master
Line 79:                         || storageStaticData.getStorageDomainType() == 
StorageDomainType.Data) {
> - please replace the condition with storageStaticData.getStorageDomainType(
>please replace the condition with 
>storageStaticData.getStorageDomainType().isDataDomain()

Done.

>what about import storage domain scenario?

should be covered by import domain flow, Maor is aware of it. depends on which 
feature is merged first (in a separate patch anyway).

>what about attach storage domain scenario?

afaik, attached SD already has disk profile
Line 80:                     
getDiskProfileDao().save(DiskProfileHelper.createDiskProfile(storageStaticData.getId(),
Line 81:                             storageStaticData.getStorageName()));
Line 82:                 }
Line 83:                 
getCompensationContext().snapshotNewEntity(storageStaticData);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I29aaf7b0b537f0b80b91b09e025e9487bbb69c2d
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Tal Nisan <[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