Moti Asayag has posted comments on this change.

Change subject: engine: Vnic interface validation
......................................................................


Patch Set 1:

(4 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/UpdateVmInterfaceCommand.java
Line 296:      * Internal validator that adds checks specific to this class, 
but uses info from the {@link VmNicValidator}.
Line 297:      */
Line 298:     private class UpdateVmNicValidator extends VmNicValidator {
Line 299: 
Line 300:         public UpdateVmNicValidator(VmNic nic, Version version) {
if this c'tor isn't used anymore - it can be removed.
Line 301:             super(nic, version);
Line 302:         }
Line 303: 
Line 304:         public UpdateVmNicValidator(VmNic nic, Version version, int 
osId) {


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmNicValidator.java
Line 61:     /**
Line 62:      * @return An error if the network interface type is not 
compatible with the selected operating
Line 63:      *         system.
Line 64:      */
Line 65:     public ValidationResult isVersionCompatible() {
please add a unit test to cover this method.
Line 66: 
Line 67:         OsRepository osRepository = 
SimpleDependecyInjector.getInstance().get(OsRepository.class);
Line 68: 
Line 69:         ArrayList<String> networkDevices = 
osRepository.getNetworkDevices(osId, version);


Line 65:     public ValidationResult isVersionCompatible() {
Line 66: 
Line 67:         OsRepository osRepository = 
SimpleDependecyInjector.getInstance().get(OsRepository.class);
Line 68: 
Line 69:         ArrayList<String> networkDevices = 
osRepository.getNetworkDevices(osId, version);
can you declare the type of networkDevices as List<String> ?
Line 70: 
Line 71:         List<VmInterfaceType> interfaceTypes = new 
ArrayList<VmInterfaceType>();
Line 72: 
Line 73:         for (String networkDevice : networkDevices) {


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
Line 623:     HOT_PLUG_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED),
Line 624:     UNLINKING_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED),
Line 625:     NULL_NETWORK_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED),
Line 626:     HOT_VM_INTERFACE_UPDATE_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED),
Line 627:     
VM_INTERFACE_VERSION_IS_NOT_SUPPORTED(ErrorType.INCOMPATIBLE_VERSION),
please change to VM_INTERFACE_TYPE_IS_NOT_SUPPORTED_BY_OS
(and in the properties files as well)
Line 628:     CANNOT_PERFOM_HOT_UPDATE(ErrorType.CONFLICT),
Line 629:     CANNOT_PERFOM_HOT_UPDATE_WITH_PORT_MIRRORING(ErrorType.CONFLICT),
Line 630:     PORT_MIRRORING_REQUIRES_NETWORK(ErrorType.BAD_PARAMETERS),
Line 631:     
ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED(ErrorType.CONFLICT),


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia1236826adbc021f4fa7f3816c6bd8a2f199de79
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gustavo Frederico Temple Pedrosa <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Leonardo Bianconi <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Vitor de Lima <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-Reviewer: ofri masad <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to