1. Added 'renderer' folder to the project 81/51881/2
authoruser <db929a@att.com>
Tue, 14 Feb 2017 22:40:53 +0000 (00:40 +0200)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Thu, 16 Feb 2017 09:56:07 +0000 (09:56 +0000)
Signed-off-by: Dhruv Bhardwaj <db929a@att.com>
Change-Id: Ia81bd4ff833f4a13932c47f89a6b5b7e58c9d742

features/pom.xml
features/src/main/features/features.xml
pom.xml
renderer/pom.xml [new file with mode: 0644]
renderer/src/main/java/org/opendaylight/transportpce/renderer/RendererProvider.java [new file with mode: 0644]
renderer/src/main/resources/org/opendaylight/blueprint/renderer-blueprint.xml [new file with mode: 0644]

index aba298cffeeea8a890dcfdd6f21ef5586a3eb7ce..c105beb7ee1580667679b6bfee18b8f607a8ff7a 100644 (file)
@@ -117,6 +117,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <artifactId>transportpce-impl</artifactId>
       <version>${project.version}</version>
     </dependency>
+   <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>transportpce-renderer</artifactId>
+      <version>${project.version}</version>
+    </dependency>
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>transportpce-api</artifactId>
index 938ebc17388ad47b508517f33967f50bbef29791..b607aa7702008c97fdd08b8608b25126f7430a7b 100644 (file)
@@ -27,6 +27,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <feature version='${netconf.version}'>odl-netconf-connector-all</feature>
     <feature version='${project.version}'>odl-transportpce-api</feature>
     <bundle>mvn:org.opendaylight.transportpce/transportpce-impl/{{VERSION}}</bundle>
+    <bundle>mvn:org.opendaylight.transportpce/transportpce-renderer/{{VERSION}}</bundle>
   </feature>
   <feature name='odl-transportpce-rest' version='${project.version}' description='OpenDaylight :: transportpce :: REST'>
     <feature version="${project.version}">odl-transportpce</feature>
diff --git a/pom.xml b/pom.xml
index 49011243d1cb936ee065cd23a682be3ecc620130..8cf0c4acfc8480ff728878ec61eea679b6467130 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -31,6 +31,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <modules>
     <module>api</module>
     <module>impl</module>
+    <module>renderer</module>
     <module>karaf</module>
     <module>features</module>
     <module>artifacts</module>
diff --git a/renderer/pom.xml b/renderer/pom.xml
new file mode 100644 (file)
index 0000000..26e86cc
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © 2016 Orange and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>config-parent</artifactId>
+    <version>0.6.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <groupId>org.opendaylight.transportpce</groupId>
+  <artifactId>transportpce-renderer</artifactId>
+  <version>0.1.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>transportpce-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller.model</groupId>
+      <artifactId>model-topology</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.netconf</groupId>
+      <artifactId>sal-netconf-connector</artifactId>
+      <version>1.5.0-SNAPSHOT</version>
+    </dependency>
+
+    <!-- Testing Dependencies -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/renderer/src/main/java/org/opendaylight/transportpce/renderer/RendererProvider.java b/renderer/src/main/java/org/opendaylight/transportpce/renderer/RendererProvider.java
new file mode 100644 (file)
index 0000000..6775f3f
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright © 2016 Orange and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.transportpce.renderer;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.MountPointService;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RendererProvider {
+
+    private static final Logger LOG = LoggerFactory.getLogger(RendererProvider.class);
+
+    private final DataBroker dataBroker;
+
+    private final MountPointService mountPointService;
+
+    public RendererProvider(final DataBroker dataBroker, final MountPointService mountPointService) {
+        this.dataBroker = dataBroker;
+        this.mountPointService = mountPointService;
+    }
+
+    /**
+     * Method called when the blueprint container is created.
+     */
+    public void init() {
+        LOG.info("RendererProvider Session Initiated");
+    }
+
+    /**
+     * Method called when the blueprint container is destroyed.
+     */
+    public void close() {
+        LOG.info("RendererProvider Closed");
+    }
+}
diff --git a/renderer/src/main/resources/org/opendaylight/blueprint/renderer-blueprint.xml b/renderer/src/main/resources/org/opendaylight/blueprint/renderer-blueprint.xml
new file mode 100644 (file)
index 0000000..5b66919
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © 2016 Orange and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+  xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+  odl:use-default-for-reference-types="true">
+
+  <reference id="dataBroker"
+    interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
+    odl:type="default" />
+  <reference id="mountPointService"
+    interface="org.opendaylight.controller.md.sal.binding.api.MountPointService" />
+
+  <bean id="provider"
+    class="org.opendaylight.transportpce.renderer.RendererProvider"
+    init-method="init" destroy-method="close">
+    <argument ref="dataBroker" />
+    <argument ref="mountPointService" />
+  </bean>
+
+</blueprint>