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;
21 * Class for Sending Renderer requests :
22 * - Service-implementation-request
23 * - Service-delete-request.
24 * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange
27 public class SendingRendererRPCs {
29 private static final Logger LOG = LoggerFactory.getLogger(SendingRendererRPCs.class);
30 /* define procedure success (or not ). */
31 private Boolean success;
32 /* define type of request<br>
33 * <code>true</code> pathcomputation <br>
34 * <code>false</code> cancelresourcereserve. */
35 private TopologyBuilder topology;
36 private List<AToZ> atoz;
37 private List<ZToA> ztoa;
39 public SendingRendererRPCs() {
44 private void buildAtoZ() {
45 atoz = new ArrayList<AToZ>();
48 private void buildZtoA() {
49 ztoa = new ArrayList<ZToA>();
52 public void serviceDelete() {
53 LOG.info("Wait for 10s til beginning the Renderer ServiceDelete request");
55 Thread.sleep(10000); //sleep for 10s
56 } catch (InterruptedException e) {
57 LOG.error(e.toString());
59 LOG.info("ServiceDelete ...");
62 public void serviceImplementation() {
63 LOG.info("Wait for 10s til beginning the Renderer serviceImplementation request");
65 Thread.sleep(10000); //sleep for 10s
66 } catch (InterruptedException e) {
67 LOG.error(e.toString());
69 LOG.info("serviceImplementation ...");
73 setTopology(new TopologyBuilder()
78 public Boolean getSuccess() {
82 public void setSuccess(Boolean success) {
83 this.success = success;
86 public TopologyBuilder getTopology() {
90 public void setTopology(TopologyBuilder topo) {