Moti Asayag has posted comments on this change. Change subject: engine: add network_qos_id to vnic_profile table ......................................................................
Patch Set 2: (8 comments) Please add the new columns to the fixtures with null and not null values for the new column. .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/VnicProfile.java Line 26: @ValidName(message = "VALIDATION_NAME_INVALID", groups = { CreateEntity.class, UpdateEntity.class }) Line 27: private String name; Line 28: @NotNull(groups = { CreateEntity.class, UpdateEntity.class }) Line 29: private Guid networkId; Line 30: private Guid networkQoSId; s/networkQoSId/networkQosId Please maintain camelCase also for the setter and getter Line 31: Line 32: private boolean portMirroring; Line 33: private String description; Line 34: private Map<String, String> customProperties; Line 75: public void setNetworkId(Guid networkId) { Line 76: this.networkId = networkId; Line 77: } Line 78: Line 79: public Guid getNetworkQoSId() { s/getNetworkQoSId/getNetworkQosId Line 80: return networkQoSId; Line 81: } Line 82: Line 83: public void setNetworkQoSId(Guid networkQoSId) { Line 79: public Guid getNetworkQoSId() { Line 80: return networkQoSId; Line 81: } Line 82: Line 83: public void setNetworkQoSId(Guid networkQoSId) { s/setNetworkQoSId/setNetworkQosId also for the parameter name. Line 84: this.networkQoSId = networkQoSId; Line 85: } Line 86: Line 87: public String getDescription() { Line 153: .append(" {id=") Line 154: .append(getId()) Line 155: .append(", networkId=") Line 156: .append(getNetworkId()) Line 157: .append(", networkQoSId=") s/networkQoSId/networkQosId Line 158: .append(getNetworkQoSId()) Line 159: .append(", portMirroring=") Line 160: .append(isPortMirroring()) Line 161: .append(", customProperties=") .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/VnicProfileView.java Line 5: public class VnicProfileView extends VnicProfile { Line 6: Line 7: private static final long serialVersionUID = -7873671947250939737L; Line 8: private String networkName; Line 9: private String networkQoSName; s/networkQoSName/networkQosName Line 10: private String dataCenterName; Line 11: private Version compatibilityVersion; Line 12: Line 13: public String getNetworkName() { Line 17: public void setNetworkName(String networkName) { Line 18: this.networkName = networkName; Line 19: } Line 20: Line 21: public String getNetworkQoSName() { s/ getNetworkQoSName/ getNetworkQosName Line 22: return networkQoSName; Line 23: } Line 24: Line 25: public void setNetworkQoSName(String networkQoSName) { Line 21: public String getNetworkQoSName() { Line 22: return networkQoSName; Line 23: } Line 24: Line 25: public void setNetworkQoSName(String networkQoSName) { s/setNetworkQoSName/setNetworkQosName also for the parameter name Line 26: this.networkQoSName = networkQoSName; Line 27: } Line 28: Line 29: public String getDataCenterName() { .................................................... File packaging/dbscripts/upgrade/03_03_0750_add_network_qos_id_to_vnic_profiles.sql Line 1: select fn_db_add_column('vnic_profiles', 'network_qos_id', 'UUID'); Line 2: DROP INDEX IF EXISTS IDX_vnic_profiles_network_qos_id; Line 3: CREATE INDEX IDX_vnic_profiles_network_qos_id ON vnic_profiles(network_qos_id); Line 4: select fn_db_create_constraint('vnic_profiles', 'FK_vnic_profiles_network_qos_id', 'FOREIGN KEY (network_qos_id) REFERENCES network_qos(id)'); Please add "on cascade set null". so if a network-qos will be removed, we won't be left with a invalid id. -- To view, visit http://gerrit.ovirt.org/17925 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I26327fe3dd6d0af3bf7050e04e780f27e9a4bfe9 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-Reviewer: ofri masad <oma...@redhat.com> Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches