Moti Asayag has posted comments on this change.
Change subject: engine: Add profile validation to VmNicValidator
......................................................................
Patch Set 3:
(3 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmNicValidator.java
Line 44: ? new
ValidationResult(VdcBllMessages.NULL_NETWORK_IS_NOT_SUPPORTED, clusterVersion())
Line 45: : ValidationResult.VALID;
Line 46: }
Line 47:
Line 48: /**
Please use proper javadoc notation.
Line 49: * @return 1. An error if- <BR>
Line 50: * - The profile doesn't exist. <BR>
Line 51: * - The network is not in the current cluster. <BR>
Line 52: * - The profile contains QoS and it is not supported in
the current cluster's version. <BR>
Line 67: }
Line 68:
Line 69: // Check that if the profile contains QoS it is supported
in the current cluster's version
Line 70: if (!FeatureSupported.networkQoS(version)
Line 71: &&
getDbFacade().getQosDao().get(vnicProfile.getNetworkQosId()) != null)
I don't think we need to verify the existence of the networkQoS in the database.
It is enough to block the operation if the user selected a vnic profile which
it vnicProfile.getNetworkQosId() is other than null.
Line 72: return new
ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_NETWROK_QOS_IS_NOT_SUPPORTED,
Line 73: clusterVersion());
Line 74: }
Line 75: return ValidationResult.VALID;
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/VmNicValidatorTest.java
Line 157: false);
Line 158: }
Line 159:
Line 160: @Test
Line 161: public void qosSupported() throws Exception {
s/qosSupported/networkQosSupported (here and below)?
Line 162: vnicProfileValidationTest(isValid(), true, true, true, true);
Line 163: }
Line 164:
Line 165: @Test
--
To view, visit http://gerrit.ovirt.org/18178
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic58cbcdc412ca8ae86f7694148725730aa10acb9
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Moti Asayag <[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