Fixed aggregated statistics
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / util / MdSalRegistratorUtils.java
1 /**
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.openflowplugin.impl.util;
9
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.echo.service.rev150305.SalEchoService;
11
12 import org.opendaylight.openflowplugin.impl.services.SalEchoServiceImpl;
13 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
14 import org.opendaylight.openflowplugin.api.openflow.rpc.RpcContext;
15 import org.opendaylight.openflowplugin.impl.services.NodeConfigServiceImpl;
16 import org.opendaylight.openflowplugin.impl.services.PacketProcessingServiceImpl;
17 import org.opendaylight.openflowplugin.impl.services.SalFlowServiceImpl;
18 import org.opendaylight.openflowplugin.impl.services.SalGroupServiceImpl;
19 import org.opendaylight.openflowplugin.impl.services.SalMeterServiceImpl;
20 import org.opendaylight.openflowplugin.impl.services.SalTableServiceImpl;
21 import org.opendaylight.openflowplugin.impl.statistics.services.OpendaylightFlowStatisticsServiceImpl;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.OpendaylightFlowStatisticsService;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.NodeConfigService;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
29
30 /**
31  * @author joe
32  */
33 public class MdSalRegistratorUtils {
34
35     private MdSalRegistratorUtils() {
36         throw new IllegalStateException();
37     }
38
39     public static void registerServices(final RpcContext rpcContext, final DeviceContext deviceContext) {
40         rpcContext.registerRpcServiceImplementation(SalFlowService.class, new SalFlowServiceImpl(rpcContext, deviceContext));
41         rpcContext.registerRpcServiceImplementation(SalEchoService.class, new SalEchoServiceImpl(rpcContext, deviceContext));
42         //TODO: add constructors with rcpContext and deviceContext to meter, group, table constructors
43         rpcContext.registerRpcServiceImplementation(SalMeterService.class, new SalMeterServiceImpl(rpcContext, deviceContext));
44         rpcContext.registerRpcServiceImplementation(SalGroupService.class, new SalGroupServiceImpl(rpcContext, deviceContext));
45         rpcContext.registerRpcServiceImplementation(SalTableService.class, new SalTableServiceImpl(rpcContext, deviceContext));
46         rpcContext.registerRpcServiceImplementation(PacketProcessingService.class, new PacketProcessingServiceImpl(rpcContext, deviceContext));
47         rpcContext.registerRpcServiceImplementation(NodeConfigService.class, new NodeConfigServiceImpl(rpcContext, deviceContext));
48         rpcContext.registerRpcServiceImplementation(OpendaylightFlowStatisticsService.class, new OpendaylightFlowStatisticsServiceImpl(rpcContext, deviceContext));
49     }
50 }