Moti Asayag has posted comments on this change.
Change subject: [WIP] core: Add vnic profiles to DB and entities
......................................................................
Patch Set 11: (4 inline comments)
Hi,
I did a quick review and noticed that changing the vnic profile table might be
needed.
In that case - probably most of the patch will have to be changed accordingly.
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/network/VmNetworkInterfaceProfile.java
Line 6: import org.ovirt.engine.core.compat.Guid;
Line 7:
Line 8: import java.io.Serializable;
Line 9:
Line 10: public class VmNetworkInterfaceProfile extends IVdcQueryable
implements Serializable, BusinessEntity<Guid>, Nameable {
IVdcQueryable already implements Serializable. I'm not sure there is a benefit
from specifying it explicitly.
However, the serialUUID should be generated for this class.
Line 11:
Line 12: private String name;
Line 13: private Guid id;
Line 14: private Network network;
Line 10: public class VmNetworkInterfaceProfile extends IVdcQueryable
implements Serializable, BusinessEntity<Guid>, Nameable {
Line 11:
Line 12: private String name;
Line 13: private Guid id;
Line 14: private Network network;
what is the motivation for having both network entity and its flatten fields?
Line 15: private Guid networkId;
Line 16: private String networkName;
Line 17: private boolean portMirroringEnabled;
Line 18: private String customProperties;
....................................................
File packaging/dbscripts/create_views.sql
Line 1123: LEFT JOIN providers ON network.provider_network_provider_id =
providers.id;
Line 1124:
Line 1125: CREATE OR REPLACE VIEW vm_interface_profile_view
Line 1126: AS
Line 1127: SELECT vnic_profiles.id AS id,
what is the use of this view ?
Line 1128: vnic_profiles.name AS name,
Line 1129: vnic_profiles.network_id AS network_id,
Line 1130: vnic_profiles.network_name AS network_name,
Line 1131: vnic_profiles.port_mirroring AS port_mirroring,
....................................................
File packaging/dbscripts/upgrade/03_03_0390_add_profile_to_network_interface.sql
Line 4: CREATE TABLE vnic_profiles
Line 5: (
Line 6: id UUID NOT NULL,
Line 7: name VARCHAR(50) NOT NULL,
Line 8: network_id UUID NOT NULL,
why both network id and network name are required here ? When the network name
will be updated, the change won't reflect to this table.
i think keeping the network id by itself is enough and if we consider the need
of network name (for example from performance consideration) we can add a view
based on this table joined with the network table.
Line 9: network_name VARCHAR(50) NOT NULL,
Line 10: port_mirroring BOOLEAN NOT NULL,
Line 11: custom_properties TEXT,
Line 12: _create_date TIMESTAMP WITH TIME ZONE default LOCALTIMESTAMP,
--
To view, visit http://gerrit.ovirt.org/15992
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id0525a6d30995fe896499fed283638b93cae5e41
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches