Alissa Bonas has posted comments on this change.

Change subject: restapi: add storage domain with existing conn id
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResource.java
Line 74:     public StorageDomainResource getStorageDomainSubResource(String 
id) {
Line 75:         return inject(new BackendStorageDomainResource(id, this));
Line 76:     }
Line 77: 
Line 78:     private Response addDomain(VdcActionType action, StorageDomain 
model, StorageDomainStatic entity, Guid hostId, StorageServerConnections 
connection) {
No, it does not represent collection. it's the name of the bll object 
representing a single connection. (I agree that the class name is not good, but 
it's there for several versions by now)
If I had to guess why it was named like this, I would assume it was taken from 
the exact same name of the db table that stores those connections.
Line 79:         if (connection.getstorage_type().isFileDomain() && 
StringUtils.isEmpty(connection.getid())) {
Line 80:                 
connection.setid(addStorageServerConnection(connection, hostId));
Line 81:         }
Line 82:         entity.setStorage(connection.getid());


Line 168:         validateEnums(StorageDomain.class, storageDomain);
Line 169:         Guid hostId = getHostId(storageDomain);
Line 170:         StorageServerConnections cnx = null;
Line 171: 
Line 172:         if (StringUtils.isEmpty(storageConnectionFromUser.getId()) ) {
agreed, will add validation that storage object ( storageConnectionFromUser) is 
not null, it should solve the comments below.
Line 173:              validateParameters(storageDomain, "storage.type");
Line 174:              cnx = mapToCnx(storageDomain);
Line 175:              if(cnx.getstorage_type().isFileDomain()) {
Line 176:                  validateParameters(storageConnectionFromUser, 
"path");


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb0495be711f80d71ad5334080228faee03d03dc
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com>
Gerrit-Reviewer: Ori Liel <ol...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to