Lior Vernia has uploaded a new change for review.

Change subject: core: Rename all management networks and profiles
......................................................................

core: Rename all management networks and profiles

The rename stored procedure used to only rename one management
network, but there actually may be multiple ones (in case multiple DCs
exist). Also, the procedure neglected to rename the corresponding vNIC
profiles. This patch aims to correct these.

Change-Id: I59e6278f283cafdc2f865e18129349f5905f6d3a
Bug-Url: https://bugzilla.redhat.com/1077772
Signed-off-by: Lior Vernia <lver...@redhat.com>
---
M packaging/dbscripts/network_sp.sql
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/40/27040/1

diff --git a/packaging/dbscripts/network_sp.sql 
b/packaging/dbscripts/network_sp.sql
index 02acfc5..7e0aa58 100644
--- a/packaging/dbscripts/network_sp.sql
+++ b/packaging/dbscripts/network_sp.sql
@@ -1277,13 +1277,12 @@
 Create or replace FUNCTION RenameManagementNetwork(v_name varchar(50)) RETURNS 
VOID
    AS $procedure$
 DECLARE
-    v_management_network_id UUID;
     v_old_name  varchar(4000);
 BEGIN
     select option_value into v_old_name from vdc_options where option_name = 
'ManagementNetwork' and version = 'general';
-    select id into v_management_network_id from network where name = 
v_old_name;
     perform fn_db_update_config_value('ManagementNetwork', v_name, 'general');
-    update network set name = v_name where id = v_management_network_id;
+    update network set name = v_name where name = v_old_name;
+    update vnic_profiles set name = v_name where name = v_old_name;
 END; $procedure$
 LANGUAGE plpgsql;
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59e6278f283cafdc2f865e18129349f5905f6d3a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Lior Vernia <lver...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to