Juan Hernandez has posted comments on this change. Change subject: restapi: refactored out updateActionTypeForQosType method ......................................................................
Patch Set 2: Code-Review+1 (3 comments) https://gerrit.ovirt.org/#/c/41468/2/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendQosResource.java File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendQosResource.java: Line 60: return VdcActionType.UpdateCpuQos; Line 61: case NETWORK: Line 62: return VdcActionType.UpdateNetworkQoS; Line 63: default: Line 64: throw new IllegalArgumentException("Unsupported QoS type"); Consider adding the name of the unsupported type to the exception message. For example: throw new IllegalArgumentException("Unsupported QoS type \"" + qosType + "\"."); Line 65: } Line 66: } Line 67: Line 68: protected class UpdateParametersProvider implements ParametersProvider<QoS, QosBase> { https://gerrit.ovirt.org/#/c/41468/2/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendQossResource.java File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendQossResource.java: Line 62: return new CpuQos(); Line 63: case NETWORK: Line 64: return new NetworkQoS(); Line 65: default: Line 66: throw new IllegalArgumentException("Unsupported QoS type"); Consider adding the name of the type to the exception message. Line 67: } Line 68: } Line 69: Line 70: private VdcActionType addActionTypeForQosType(QosType qosType) { Line 75: return VdcActionType.AddCpuQos; Line 76: case NETWORK: Line 77: return VdcActionType.AddNetworkQoS; Line 78: default: Line 79: throw new IllegalArgumentException("Unsupported QoS type"); Same. Line 80: Line 81: } Line 82: } Line 83: -- To view, visit https://gerrit.ovirt.org/41468 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic16d1488a932b49a4fedea3247c2e00cf06f6c5c Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches