2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.openflowplugin.api.openflow.md;
10 import com.google.common.base.Optional;
11 import java.math.BigInteger;
12 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
13 import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.OpendaylightFlowStatisticsService;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.OpendaylightFlowTableStatisticsService;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.OpendaylightGroupStatisticsService;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.OpendaylightMeterStatisticsService;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.module.config.rev141015.NodeConfigService;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.service.rev131107.SalPortService;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.OpendaylightPortStatisticsService;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.OpendaylightQueueStatisticsService;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
29 import org.opendaylight.yangtools.concepts.Identifiable;
30 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
33 * interface concatenating all md-sal services provided by OF-switch
35 public interface ModelDrivenSwitch
39 SalMeterService, SalTableService, SalPortService, PacketProcessingService, NodeConfigService,
40 OpendaylightGroupStatisticsService, OpendaylightMeterStatisticsService, OpendaylightFlowStatisticsService,
41 OpendaylightPortStatisticsService, OpendaylightFlowTableStatisticsService, OpendaylightQueueStatisticsService,
42 Identifiable<InstanceIdentifier<Node>> {
45 * @param rpcProviderRegistry
46 * @return wrapped list of {service provider + path} registration couples
48 ModelDrivenSwitchRegistration register(RpcProviderRegistry rpcProviderRegistry);
51 * @return id of encapsulated node (served by this impl)
56 * returnes the session context associated with this model-driven switch
58 * @return session context object
60 SessionContext getSessionContext();
63 * Returns whether this *instance* is entity owner or not
64 * @return true if it's entity owner, else false.
66 boolean isEntityOwner();
69 * Set entity ownership satus of this switch in *this* instance
72 void setEntityOwnership(boolean isOwner);
75 * Send table feature to the switch to get tables features for all the tables.
76 * @return Transaction id
78 Optional<BigInteger> sendEmptyTableFeatureRequest();
81 * Method send port/desc multipart request to the switch to fetch the initial details.
84 public abstract void requestSwitchDetails();