Kanagaraj M has uploaded a new change for review.

Change subject: gluster: add host permission to GlusterAdmin role
......................................................................

gluster: add host permission to GlusterAdmin role

Added following host permission to GlusterAdmin role
-CREATE_HOST
-EDIT_HOST_CONFIGURATION
-DELETE_HOST
-MANIPUTLATE_HOST
-CONFIGURE_HOST_NETWORK

Change-Id: Ibd5ad6210d1eac3c18d50461025bcdc0364c406c
Signed-off-by: Kanagaraj M <kmayi...@redhat.com>
---
A 
packaging/dbscripts/upgrade/03_04_0071_add_host_permissions_to_gluster_admin_role.sql
1 file changed, 40 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/54/20654/1

diff --git 
a/packaging/dbscripts/upgrade/03_04_0071_add_host_permissions_to_gluster_admin_role.sql
 
b/packaging/dbscripts/upgrade/03_04_0071_add_host_permissions_to_gluster_admin_role.sql
new file mode 100644
index 0000000..9f9f361
--- /dev/null
+++ 
b/packaging/dbscripts/upgrade/03_04_0071_add_host_permissions_to_gluster_admin_role.sql
@@ -0,0 +1,40 @@
+Create or replace FUNCTION __temp_add_host_permissions_to_gluster_admin_role()
+RETURNS VOID
+   AS $procedure$
+   DECLARE
+      v_GLUSTER_ADMIN_ROLE_ID UUID;
+BEGIN
+      v_GLUSTER_ADMIN_ROLE_ID := 'DEF0000b-0000-0000-0000-DEF00000000b';
+
+--CREATE_HOST
+INSERT INTO roles_groups(role_id,action_group_id) SELECT 
v_GLUSTER_ADMIN_ROLE_ID, 100
+WHERE not exists (SELECT role_id, action_group_id FROM roles_groups
+        WHERE role_id=v_GLUSTER_ADMIN_ROLE_ID and action_group_id=100);
+
+--EDIT_HOST_CONFIGURATION
+INSERT INTO roles_groups(role_id,action_group_id) SELECT 
v_GLUSTER_ADMIN_ROLE_ID, 101
+WHERE not exists (SELECT role_id, action_group_id FROM roles_groups
+        WHERE role_id=v_GLUSTER_ADMIN_ROLE_ID and action_group_id=101);
+
+--DELETE_HOST
+INSERT INTO roles_groups(role_id,action_group_id) SELECT 
v_GLUSTER_ADMIN_ROLE_ID, 102
+WHERE not exists (SELECT role_id, action_group_id FROM roles_groups
+        WHERE role_id=v_GLUSTER_ADMIN_ROLE_ID and action_group_id=102);
+
+--MANIPUTLATE_HOST
+INSERT INTO roles_groups(role_id,action_group_id) SELECT 
v_GLUSTER_ADMIN_ROLE_ID, 103
+WHERE not exists (SELECT role_id, action_group_id FROM roles_groups
+        WHERE role_id=v_GLUSTER_ADMIN_ROLE_ID and action_group_id=103);
+
+--CONFIGURE_HOST_NETWORK
+INSERT INTO roles_groups(role_id,action_group_id) SELECT 
v_GLUSTER_ADMIN_ROLE_ID, 104
+WHERE not exists (SELECT role_id, action_group_id FROM roles_groups
+        WHERE role_id=v_GLUSTER_ADMIN_ROLE_ID and action_group_id=104);
+
+RETURN;
+END; $procedure$
+LANGUAGE plpgsql;
+
+select __temp_add_host_permissions_to_gluster_admin_role();
+drop function __temp_add_host_permissions_to_gluster_admin_role;
+


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd5ad6210d1eac3c18d50461025bcdc0364c406c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kanagaraj M <kmayi...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to