Allon Mureinik has posted comments on this change.

Change subject: backend: add the export glance image support
......................................................................


Patch Set 3: I would prefer that you didn't submit this

(4 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportRepoImageCommand.java
Line 36:     private OpenstackImageProviderProxy providerProxy;
Line 37: 
Line 38:     public ExportRepoImageCommand(T parameters) {
Line 39:         super(parameters);
Line 40:         getParameters().setCommandType(getActionType());
why is this needed?
Line 41:     }
Line 42: 
Line 43:     protected ProviderProxyFactory getProviderProxyFactory() {
Line 44:         return ProviderProxyFactory.getInstance();


Line 132:     @Override
Line 133:     public List<PermissionSubject> getPermissionCheckSubjects() {
Line 134:         List<PermissionSubject> permissionSubjects = new 
ArrayList<>();
Line 135:         permissionSubjects.add(new PermissionSubject(
Line 136:                 getDiskImage().getId(), VdcObjectType.Disk, 
ActionGroup.ATTACH_DISK));
shouldn't we also have permissions to write to the glance domain?
Line 137:         return permissionSubjects;
Line 138:     }
Line 139: 
Line 140:     @Override


Line 175:             return false;
Line 176:         }
Line 177: 
Line 178:         if (getDiskImage() == null) {
Line 179:             return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_NOT_EXIST);
this should probably come before the SP validation
Line 180:         }
Line 181: 
Line 182:         // At the moment it's not possible to export images that have 
a snapshot
Line 183:         // or that are based on a a template.


Line 186:         }
Line 187: 
Line 188:         for (VM vm : 
getVmDAO().getVmsListForDisk(getDiskImage().getId())) {
Line 189:             if (vm.isRunningOrPaused()) {
Line 190:                 return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_RUNNING);
I'd check if the status != DOWN.
We probably don't want to support hibernating or migrating VMs
Line 191:             }
Line 192:         }
Line 193: 
Line 194:         return true;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id93d40ebb812e4be8669ad14f6ba92aab4de28ac
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to