SalGroupService stores group IDs into device context's internal registry
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / services / SalGroupServiceImpl.java
index 21e5f92258636ab776a7a9e1fdb8d6dfeb62f5c0..6660670df0e04886680dcad90d85c0793dece765 100644 (file)
@@ -38,6 +38,7 @@ public class SalGroupServiceImpl extends CommonService implements SalGroupServic
 
     @Override
     public Future<RpcResult<AddGroupOutput>> addGroup(final AddGroupInput input) {
+        deviceContext.getDeviceGroupRegistry().store(input.getGroupId());
         return this.<AddGroupOutput, Void> handleServiceCall( PRIMARY_CONNECTION,
                  new Function<DataCrate<AddGroupOutput>,ListenableFuture<RpcResult<Void>>>() {
 
@@ -62,6 +63,7 @@ public class SalGroupServiceImpl extends CommonService implements SalGroupServic
 
     @Override
     public Future<RpcResult<RemoveGroupOutput>> removeGroup(final RemoveGroupInput input) {
+        deviceContext.getDeviceGroupRegistry().markToBeremoved(input.getGroupId());
         return this.<RemoveGroupOutput, Void> handleServiceCall(PRIMARY_CONNECTION,
                 new Function<DataCrate<RemoveGroupOutput>, ListenableFuture<RpcResult<Void>>>() {