2 * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.bgpcep.pcep.topology.provider.config;
10 import com.google.common.base.Optional;
11 import java.net.InetSocketAddress;
12 import javax.annotation.Nonnull;
13 import javax.annotation.Nullable;
14 import org.opendaylight.bgpcep.programming.spi.InstructionScheduler;
15 import org.opendaylight.controller.config.yang.pcep.topology.provider.PCEPTopologyProviderRuntimeRegistrator;
16 import org.opendaylight.protocol.concepts.KeyMapping;
17 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
20 * The PCEPTopologyDeployer service is managing PcepTopologyProvider
22 public interface PCEPTopologyDeployer {
24 * Creates and register topology provider instance
25 * @param topologyId topology ID
26 * @param inetSocketAddress inetSocketAddress
27 * @param rpcTimeout rpc Timeout
28 * @param keys List of clients password configuration
29 * @param scheduler Instruction Scheduler
32 default void createTopologyProvider(@Nonnull TopologyId topologyId, @Nonnull InetSocketAddress inetSocketAddress,
33 short rpcTimeout, @Nullable Optional<KeyMapping> keys, @Nonnull InstructionScheduler scheduler,
34 Optional<PCEPTopologyProviderRuntimeRegistrator> runtime) {
35 if(keys.isPresent()) {
36 createTopologyProvider(topologyId, inetSocketAddress, rpcTimeout, keys.get(), scheduler, runtime);
38 createTopologyProvider(topologyId, inetSocketAddress, rpcTimeout, KeyMapping.getKeyMapping(),
43 * Creates and register topology provider instance
44 * @param topologyId topology ID
45 * @param inetSocketAddress inetSocketAddress
46 * @param rpcTimeout rpc Timeout
47 * @param client List of clients password configuration
48 * @param scheduler Instruction Scheduler
50 void createTopologyProvider(@Nonnull TopologyId topologyId, @Nonnull InetSocketAddress inetSocketAddress,
51 short rpcTimeout, @Nonnull KeyMapping client, @Nonnull InstructionScheduler scheduler,
52 Optional<PCEPTopologyProviderRuntimeRegistrator> runtime);
55 * Closes and unregister topology provider instance
57 * @param topologyID topology ID
59 void removeTopologyProvider(@Nonnull TopologyId topologyID);