2 * Copyright (c) 2015 Juniper Networks, Inc. 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
9 package org.opendaylight.groupbasedpolicy.renderer.oc;
12 import java.util.concurrent.ScheduledExecutorService;
14 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
15 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
16 import org.opendaylight.groupbasedpolicy.resolver.EgKey;
17 import org.opendaylight.groupbasedpolicy.resolver.PolicyListener;
18 import org.opendaylight.groupbasedpolicy.resolver.PolicyResolver;
19 import org.opendaylight.groupbasedpolicy.resolver.PolicyScope;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.L2FloodDomainId;
21 import org.slf4j.Logger;
22 import org.slf4j.LoggerFactory;
27 public class PolicyManager implements PolicyListener, L2DomainListener {
28 private static final Logger LOG =
29 LoggerFactory.getLogger(PolicyManager.class);
31 private final PolicyResolver policyResolver;
32 private final PolicyScope policyScope;
33 private final ScheduledExecutorService executor;
35 public PolicyManager(DataBroker dataBroker,
36 PolicyResolver policyResolver,
37 L2DomainManager l2domainManager,
38 RpcProviderRegistry rpcRegistry,
39 ScheduledExecutorService executor) {
41 this.executor = executor;
42 this.policyResolver = policyResolver;
44 policyScope = policyResolver.registerListener(this);
45 l2domainManager.registerListener((L2DomainListener) this);
46 LOG.debug("Initialized OC policy manager");
50 * Set the learning mode to the specified value
51 * @param learningMode the learning mode to set
53 public void setLearningMode(org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.oc.rev140528.OcConfig.LearningMode learningMode) {
57 public void L2DomainUpdated(L2FloodDomainId id) {
58 // TODO Auto-generated method stub
62 public void policyUpdated(Set<EgKey> updatedGroups) {
63 // TODO Auto-generated method stub