Allon Mureinik has posted comments on this change.

Change subject: core: Block removing network when it's related to iSCSI bond.
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.ovirt.org/#/c/30913/1/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
File 
backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties:

Line 610: TAGS_SPECIFIED_TAG_CANNOT_BE_THE_PARENT_OF_ITSELF=Operation canceled, 
recursive Tag hierarchy cannot be defined.
Line 611: VM_CANNOT_MOVE_TO_CLUSTER_IN_OTHER_STORAGE_POOL=VM can be moved only 
to a Cluster in the same Data Center.
Line 612: VM_CLUSTER_IS_NOT_VALID=Cannot ${action} ${type}. Cluster ID is not 
valid.
Line 613: NETWORK_CANNOT_REMOVE_MANAGEMENT_NETWORK=The Management Network 
('${NetworkName}') is mandatory and cannot be removed.
Line 614: NETWORK_CANNOT_REMOVE_ISCSI_BOND_NETWORK=The Management Network 
('${NetworkName}') could not be removed since it is part of the following iSCSI 
bonds: ${IscsiBonds}. Please, remove the network, first from those iSCSI bonds, 
and try again.
Is the term "management network" correct here?
Line 615: NETWORK_OLD_NETWORK_NOT_SPECIFIED=Previous network name is required.
Line 616: ACTION_TYPE_FAILED_DETECTED_ACTIVE_VMS=Cannot ${action} ${type}. 
Active VMs were detected.\n\
Line 617:       -Please ensure all VMs associated with this Storage Domain are 
stopped and in the Down state first.
Line 618: ACTION_TYPE_FAILED_HOST_NOT_EXIST=The provided Host does not exist.


http://gerrit.ovirt.org/#/c/30913/1/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/IscsiBondDaoTest.java
File 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/IscsiBondDaoTest.java:

Line 113:     public void testGetIscsiBondIdByNetworkId() {
Line 114:         List<IscsiBond> fetchedIscsiBonds = 
dao.getIscsiBondsByNetworkId(FixturesTool.NETWORK_ENGINE);
Line 115:         assertEquals(1, fetchedIscsiBonds.size());
Line 116:         assertEquals(FixturesTool.ISCSI_BOND_ID, 
fetchedIscsiBonds.get(0).getId());
Line 117:     }
Please also add a test that asserts an empty list is returned in the following 
cases:
 1. When the network doesn't have iSCSI bonds
 2. When the network doesn't exist
Line 118: 
Line 119:     @Test
Line 120:     public void testRemoveNetworkFromIscsiBond() {
Line 121:         List<Guid> networks = 
dao.getNetworkIdsByIscsiBondId(iscsiBondId);


http://gerrit.ovirt.org/#/c/30913/1/packaging/dbscripts/iscsi_bonds_sp.sql
File packaging/dbscripts/iscsi_bonds_sp.sql:

Line 40: END; $procedure$
Line 41: LANGUAGE plpgsql;
Line 42: 
Line 43: 
Line 44: Create or replace FUNCTION GetIscsiByNetworkId(v_network_id UUID) 
RETURNS SETOF iscsi_bonds  STABLE
Naming: GetIscsiBondByNetworkId
Line 45:    AS $procedure$
Line 46: BEGIN
Line 47:       RETURN QUERY SELECT iscsi_bonds.*
Line 48:       FROM iscsi_bonds_networks_map, iscsi_bonds


Line 46: BEGIN
Line 47:       RETURN QUERY SELECT iscsi_bonds.*
Line 48:       FROM iscsi_bonds_networks_map, iscsi_bonds
Line 49:       WHERE iscsi_bonds.id = iscsi_bonds_networks_map.iscsi_bond_id
Line 50:       AND network_id = v_network_id;
Please user explicit joins:

      RETURN QUERY SELECT iscsi_bonds.*
      FROM iscsi_bonds_networks_map
      JOIN iscsi_bonds ON iscsi_bonds.id = 
iscsi_bonds_networks_map.iscsi_bond_id 
      WHERE network_id = v_network_id;
Line 51: END; $procedure$
Line 52: LANGUAGE plpgsql;
Line 53: 
Line 54: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I68bd390175d42ee4e33773e12d6184a97a755eed
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@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

Reply via email to