Blob Blame History Raw
From 53a8ae976e7886dcfeea151b8a3a045863b7f018 Mon Sep 17 00:00:00 2001
From: Atin Mukherjee <amukherj@redhat.com>
Date: Tue, 30 Aug 2016 18:05:11 +0530
Subject: [PATCH 52/86] eventsapi: declare all the identified events at one go

This patch ensures we don't get into merge conflicts
everytime a single eventing patch is merged which
changes eventskeygen.py. I've collected all the identified
events from the patches posted in gerrit for reviews and
consolidated at one place.

>Reviewed-on: http://review.gluster.org/15351
>Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com>
>Reviewed-by: Avra Sengupta <asengupt@redhat.com>
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>Reviewed-by: Aravinda VK <avishwan@redhat.com>
>Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>

Change-Id: I5a5983d5c8db7c4a223fa02b4f99ec41c6fa9c35
BUG: 1351589
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/84800
---
 events/eventskeygen.py |   94 ++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 76 insertions(+), 18 deletions(-)

diff --git a/events/eventskeygen.py b/events/eventskeygen.py
index a118a4c..2869e45 100644
--- a/events/eventskeygen.py
+++ b/events/eventskeygen.py
@@ -21,16 +21,20 @@ gen_header_type = sys.argv[1]
 
 # When adding new keys add it to the END
 keys = (
+    # user driven events
+    #peer and volume managment events
     "EVENT_PEER_ATTACH",
     "EVENT_PEER_DETACH",
-
     "EVENT_VOLUME_CREATE",
     "EVENT_VOLUME_START",
     "EVENT_VOLUME_STOP",
     "EVENT_VOLUME_DELETE",
     "EVENT_VOLUME_SET",
     "EVENT_VOLUME_RESET",
+    "EVENT_BRICK_RESET",
+    "EVENT_BRICK_REPLACE",
 
+    #geo-rep events
     "EVENT_GEOREP_CREATE",
     "EVENT_GEOREP_START",
     "EVENT_GEOREP_STOP",
@@ -40,19 +44,61 @@ keys = (
     "EVENT_GEOREP_CONFIG_SET",
     "EVENT_GEOREP_CONFIG_RESET",
 
+    #bitrot events
     "EVENT_BITROT_ENABLE",
     "EVENT_BITROT_DISABLE",
     "EVENT_BITROT_SCRUB_THROTTLE",
     "EVENT_BITROT_SCRUB_FREQ",
     "EVENT_BITROT_SCRUB_OPTION",
-    "EVENT_BITROT_BAD_FILE",
 
+    #quota events
+    "EVENT_QUOTA_ENABLE",
+    "EVENT_QUOTA_DISABLE",
+    "EVENT_QUOTA_SET_USAGE_LIMIT",
+    "EVENT_QUOTA_SET_OBJECTS_LIMIT",
+    "EVENT_QUOTA_REMOVE_USAGE_LIMIT",
+    "EVENT_QUOTA_REMOVE_OBJECTS_LIMIT",
+    "EVENT_QUOTA_ALERT_TIME",
+    "EVENT_QUOTA_SOFT_TIMEOUT",
+    "EVENT_QUOTA_HARD_TIMEOUT",
+    "EVENT_QUOTA_DEFAULT_SOFT_LIMIT",
+
+    #snapshot events
+    "EVENT_SNAPSHOT_CREATED",
+    "EVENT_SNAPSHOT_CREATE_FAILED",
+    "EVENT_SNAPSHOT_ACTIVATED",
+    "EVENT_SNAPSHOT_ACTIVATE_FAILED",
+    "EVENT_SNAPSHOT_DEACTIVATED",
+    "EVENT_SNAPSHOT_DEACTIVATE_FAILED",
+    "EVENT_SNAPSHOT_SOFT_LIMIT_REACHED",
+    "EVENT_SNAPSHOT_HARD_LIMIT_REACHED",
+    "EVENT_SNAPSHOT_RESTORED",
+    "EVENT_SNAPSHOT_RESTORE_FAILED",
+    "EVENT_SNAPSHOT_DELETED",
+    "EVENT_SNAPSHOT_DELETE_FAILED",
+    "EVENT_SNAPSHOT_CLONED",
+    "EVENT_SNAPSHOT_CLONE_FAILED",
+    "EVENT_SNAPSHOT_CONFIG_UPDATED",
+    "EVENT_SNAPSHOT_CONFIG_UPDATE_FAILED",
+    "EVENT_SNAPSHOT_SCHEDULER_INITIALISED",
+    "EVENT_SNAPSHOT_SCHEDULER_INIT_FAILED",
+    "EVENT_SNAPSHOT_SCHEDULER_ENABLED",
+    "EVENT_SNAPSHOT_SCHEDULER_ENABLE_FAILED",
+    "EVENT_SNAPSHOT_SCHEDULER_DISABLED",
+    "EVENT_SNAPSHOT_SCHEDULER_DISABLE_FAILED",
+    "EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_ADDED",
+    "EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_ADD_FAILED",
+    "EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_EDITED",
+    "EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_EDIT_FAILED",
+    "EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_DELETED",
+    "EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_DELETE_FAILED",
+
+    #async events
+    #glusterd events
     "EVENT_SVC_MANAGER_FAILED",
     "EVENT_SVC_RECONFIGURE_FAILED",
     "EVENT_SVC_CONNECTED",
     "EVENT_SVC_DISCONNECTED",
-
-
     "EVENT_PEER_STORE_FAILURE",
     "EVENT_PEER_RPC_CREATE_FAILED",
     "EVENT_PEER_REJECT",
@@ -60,16 +106,13 @@ keys = (
     "EVENT_PEER_DISCONNECT",
     "EVENT_PEER_NOT_FOUND",
     "EVENT_UNKNOWN_PEER",
-
     "EVENT_BRICK_START_FAILED",
     "EVENT_BRICK_STOP_FAILED",
     "EVENT_BRICK_DISCONNECTED",
     "EVENT_BRICK_CONNECTED",
     "EVENT_BRICKS_START_FAILED",
     "EVENT_BRICKPATH_RESOLVE_FAILED",
-
     "EVENT_NOTIFY_UNKNOWN_OP",
-
     "EVENT_QUORUM_LOST",
     "EVENT_QUORUM_REGAINED",
     "EVENT_REBALANCE_START_FAILED",
@@ -79,18 +122,33 @@ keys = (
     "EVENT_IMPORT_BRICK_FAILED",
     "EVENT_COMPARE_FRIEND_VOLUME_FAILED",
     "EVENT_NFS_GANESHA_EXPORT_FAILED",
-
-    "EVENT_QUOTA_ENABLE",
-    "EVENT_QUOTA_DISABLE",
-    "EVENT_QUOTA_SET_USAGE_LIMIT",
-    "EVENT_QUOTA_SET_OBJECTS_LIMIT",
-    "EVENT_QUOTA_REMOVE_USAGE_LIMIT",
-    "EVENT_QUOTA_REMOVE_OBJECTS_LIMIT",
-    "EVENT_QUOTA_ALERT_TIME",
-    "EVENT_QUOTA_SOFT_TIMEOUT",
-    "EVENT_QUOTA_HARD_TIMEOUT",
-    "EVENT_QUOTA_DEFAULT_SOFT_LIMIT",
+    #ec events
+    "EVENT_EC_DATA_BRICKS_NOT_UP",
+    "EVENT_EC_DATA_BRICKS_UP",
+    #georep async events
+    "EVENT_GEOREP_FAULTY",
+    #quota async events
     "EVENT_QUOTA_CROSSED_SOFT_LIMIT",
+
+    #bitrot async events
+    "EVENT_BITROT_BAD_FILE",
+    #protocol-server events
+    "EVENT_CLIENT_CONNECT",
+    "EVENT_CLIENT_AUTH_REJECT",
+    "EVENT_CLIENT_DISCONNECT",
+    #posix events
+    "EVENT_POSIX_SAME_GFID",
+    "EVENT_POSIX_ALREADY_PART_OF_VOLUME",
+    "EVENT_POSIX_INVALID_BRICK",
+    "EVENT_POSIX_BRICK_VERIFICATION_FAILED",
+    "EVENT_POSIX_ACL_NOTSUP",
+    "EVENT_POSIX_HEALTH_CHECK_FAILED",
+    #afr events
+    "EVENT_AFR_QUORUM_MET",
+    "EVENT_AFR_QUORUM_FAIL",
+    "EVENT_AFR_SUBVOL_UP",
+    "EVENT_AFR_SUBVOLS_DOWN",
+    "EVENT_AFR_SPLIT_BRAIN",
 )
 
 LAST_EVENT = "EVENT_LAST"
-- 
1.7.1