Sahina Bose has uploaded a new change for review. Change subject: engine:Gluster hook entity related entries ......................................................................
engine:Gluster hook entity related entries Added name and parents retrieval to entity functions for gluster hook entity. Added missing notitification entries for gluster hook events. Added entries for GlusterHookStage and GlusterHookStatus enums Change-Id: I1fd69508ccd882251540c27b14c855b42c39bec7 Signed-off-by: Sahina Bose <[email protected]> --- M backend/manager/dbscripts/create_functions.sql M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java 3 files changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/08/14708/1 diff --git a/backend/manager/dbscripts/create_functions.sql b/backend/manager/dbscripts/create_functions.sql index 69c2566..40a0da8 100644 --- a/backend/manager/dbscripts/create_functions.sql +++ b/backend/manager/dbscripts/create_functions.sql @@ -273,6 +273,22 @@ SELECT v_storage_pool_id AS id UNION SELECT v_entity_id AS id; + + WHEN v_entity_type = 23 THEN -- Gluster Hook + + -- get cluster id + cluster_id := ( SELECT v.cluster_id FROM gluster_volumes v WHERE id = v_entity_id ); + -- get data center id + ds_id := ( SELECT storage_pool_id FROM vds_groups WHERE vds_group_id = cluster_id ); + + RETURN QUERY + SELECT system_root_id AS id + UNION + SELECT ds_id AS id + UNION + SELECT cluster_id AS id + UNION + SELECT v_entity_id AS id; ELSE IF v_entity_type IN ( 1,14,15,16 ) THEN -- Data Center, users and roles are under system RETURN QUERY @@ -460,6 +476,8 @@ result := ( SELECT disk_alias FROM base_disks WHERE disk_id = v_entity_id ); WHEN v_entity_type = 20 THEN result := ( SELECT name FROM network WHERE id = v_entity_id ); + WHEN v_entity_type = 23 THEN + result := ( SELECT concat(gluster_command,'-',stage,'-',name) FROM gluster_hooks where id = v_entity_id ); ELSE result := 'Unknown type ' || v_entity_type; END CASE; diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java index 6783fc3..8b1e7e2 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java @@ -81,6 +81,8 @@ AddEventNotificationEntry(EventNotificationEntity.GlusterHook, AuditLogType.GLUSTER_HOOK_ENABLE_FAILED); AddEventNotificationEntry(EventNotificationEntity.GlusterHook, AuditLogType.GLUSTER_HOOK_DISABLE); AddEventNotificationEntry(EventNotificationEntity.GlusterHook, AuditLogType.GLUSTER_HOOK_DISABLE_FAILED); + AddEventNotificationEntry(EventNotificationEntity.GlusterHook, AuditLogType.GLUSTER_HOOK_ADDED); + AddEventNotificationEntry(EventNotificationEntity.GlusterHook, AuditLogType.GLUSTER_HOOK_CONFLICT_DETECTED); // DWH AddEventNotificationEntry(EventNotificationEntity.DWH, AuditLogType.DWH_STOPPED); diff --git a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java index 49ed3c8..2f79dcb 100644 --- a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java +++ b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java @@ -670,4 +670,14 @@ String VdsTransparentHugePagesState___MAdvise(); String VdsTransparentHugePagesState___Always(); + + String GlusterHookStage__PRE(); + + String GlusterHookStage__POST(); + + String GlusterHookStatus__ENABLED(); + + String GlusterHookStatus__DISABLED(); + + String GlusterHookStatus__MISSING(); } -- To view, visit http://gerrit.ovirt.org/14708 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1fd69508ccd882251540c27b14c855b42c39bec7 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sahina Bose <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
