ONOS-944: Implemented a Group operation failure handler in GroupManger and SimpleGroupStore.
Change-Id: Ib3be4d534ceff04af2dad0c062fd4cd63d49ee82
diff --git a/core/api/src/main/java/org/onosproject/net/group/GroupEvent.java b/core/api/src/main/java/org/onosproject/net/group/GroupEvent.java
index d9d8a97..45fbb3e 100644
--- a/core/api/src/main/java/org/onosproject/net/group/GroupEvent.java
+++ b/core/api/src/main/java/org/onosproject/net/group/GroupEvent.java
@@ -41,6 +41,21 @@
*/
GROUP_UPDATED,
+ /**
+ * Signifies that a request to create Group has failed.
+ */
+ GROUP_ADD_FAILED,
+
+ /**
+ * Signifies that a request to remove Group has failed.
+ */
+ GROUP_REMOVE_FAILED,
+
+ /**
+ * Signifies that a request to update Group has failed.
+ */
+ GROUP_UPDATE_FAILED,
+
// internal event between Manager <-> Store
/*
@@ -55,6 +70,8 @@
* Signifies that a request to delete Group has been added to the store.
*/
GROUP_REMOVE_REQUESTED,
+
+
}
/**
diff --git a/core/api/src/main/java/org/onosproject/net/group/GroupProviderService.java b/core/api/src/main/java/org/onosproject/net/group/GroupProviderService.java
index 26c7bb1..076de49 100644
--- a/core/api/src/main/java/org/onosproject/net/group/GroupProviderService.java
+++ b/core/api/src/main/java/org/onosproject/net/group/GroupProviderService.java
@@ -29,9 +29,10 @@
/**
* Notifies core if any failure from data plane during group operations.
*
+ * @param deviceId the device ID
* @param operation offended group operation
*/
- void groupOperationFailed(GroupOperation operation);
+ void groupOperationFailed(DeviceId deviceId, GroupOperation operation);
/**
* Pushes the collection of group detected in the data plane along
diff --git a/core/api/src/main/java/org/onosproject/net/group/GroupStore.java b/core/api/src/main/java/org/onosproject/net/group/GroupStore.java
index 2fc7030..6803b58 100644
--- a/core/api/src/main/java/org/onosproject/net/group/GroupStore.java
+++ b/core/api/src/main/java/org/onosproject/net/group/GroupStore.java
@@ -143,4 +143,12 @@
* @return initial group audit status
*/
boolean deviceInitialAuditStatus(DeviceId deviceId);
+
+ /**
+ * Indicates the group operations failed.
+ *
+ * @param deviceId the device ID
+ * @param operation the group operation failed
+ */
+ void groupOperationFailed(DeviceId deviceId, GroupOperation operation);
}