2 * Copyright © 2017 Orange, 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
9 package org.opendaylight.transportpce.stubrenderer;
11 import java.util.ArrayList;
12 import java.util.List;
14 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.service.TopologyBuilder;
15 import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev161014.topology.AToZ;
16 import org.opendaylight.yang.gen.v1.http.org.openroadm.topology.rev161014.topology.ZToA;
17 import org.slf4j.Logger;
18 import org.slf4j.LoggerFactory;
23 * - Service-implementation-request
24 * - Service-delete-request.
25 * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
28 public class SendingRendererRPCs {
30 private static final Logger LOG = LoggerFactory.getLogger(SendingRendererRPCs.class);
31 /* define procedure success (or not ). */
32 private Boolean success;
33 /* define type of request<br>
34 * <code>true</code> pathcomputation <br>
35 * <code>false</code> cancelresourcereserve. */
36 private TopologyBuilder topology;
37 private List<AToZ> atoz;
38 private List<ZToA> ztoa;
40 public SendingRendererRPCs() {
45 private void buildAtoZ() {
46 atoz = new ArrayList<AToZ>();
49 private void buildZtoA() {
50 ztoa = new ArrayList<ZToA>();
53 public void serviceDelete() {
54 LOG.info("Wait for 10s til beginning the Renderer ServiceDelete request");
56 Thread.sleep(10000); //sleep for 10s
57 } catch (InterruptedException e) {
58 LOG.error(e.toString());
60 LOG.info("ServiceDelete ...");
63 public void serviceImplementation() {
64 LOG.info("Wait for 10s til beginning the Renderer serviceImplementation request");
66 Thread.sleep(10000); //sleep for 10s
67 } catch (InterruptedException e) {
68 LOG.error(e.toString());
70 LOG.info("serviceImplementation ...");
74 setTopology(new TopologyBuilder()
79 public Boolean getSuccess() {
83 public void setSuccess(Boolean success) {
84 this.success = success;
87 public TopologyBuilder getTopology() {
91 public void setTopology(TopologyBuilder topo) {