<artifactId>ne-location-provider</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vpp-renderer</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>neutron-mapper</artifactId>
<type>xml</type>
<classifier>config</classifier>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>vpp-renderer</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>config</classifier>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>neutron-mapper</artifactId>
<groupId>org.opendaylight.groupbasedpolicy</groupId>
<artifactId>ne-location-provider</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.groupbasedpolicy</groupId>
+ <artifactId>vpp-renderer</artifactId>
+ </dependency>
<dependency>
<groupId>org.opendaylight.groupbasedpolicy</groupId>
<artifactId>neutron-mapper</artifactId>
<type>xml</type>
<classifier>config</classifier>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.groupbasedpolicy</groupId>
+ <artifactId>vpp-renderer</artifactId>
+ <type>xml</type>
+ <classifier>config</classifier>
+ </dependency>
<dependency>
<groupId>org.opendaylight.groupbasedpolicy</groupId>
<artifactId>neutron-mapper</artifactId>
<configfile finalname="${config.configfile.directory}/15-neutron-ovsdb.xml">mvn:org.opendaylight.groupbasedpolicy/neutron-ovsdb/{{VERSION}}/xml/config</configfile>
</feature>
+ <!--
+ The VPP renderer
+ -->
+ <feature name='odl-groupbasedpolicy-vpp' version='${project.version}' description='OpenDaylight :: groupbasedpolicy :: VPP renderer '>
+ <feature version="${project.version}">odl-groupbasedpolicy-base</feature>
+ <bundle>mvn:org.opendaylight.groupbasedpolicy/vpp-renderer/{{VERSION}}</bundle>
+ <configfile finalname="${config.configfile.directory}/15-vpp-renderer.xml">mvn:org.opendaylight.groupbasedpolicy/vpp-renderer/{{VERSION}}/xml/config</configfile>
+ </feature>
+
<!--
The UI Backend
-->
<module>iovisor</module>
<module>ovssfc</module>
<module>netconf</module>
+ <module>vpp</module>
</modules>
<dependencies>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2015 Cisco Systems, Inc. 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.groupbasedpolicy</groupId>
+ <artifactId>groupbasedpolicy-renderers</artifactId>
+ <version>0.4.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <artifactId>vpp-renderer</artifactId>
+ <packaging>bundle</packaging>
+
+ <properties></properties>
+
+ <dependencies>
+ <!-- project specific dependencies -->
+
+ <!-- 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 build -->
+ <build>
+ <!-- We use the maven-resources-plugin to copy a class from the groupbasepolicy
+ bundle that we need in order to run some unit tests in the renderer (classes
+ in the test directory aren't packaged in bundles, and instead of keeping
+ separate copies, we just copy the file(s) needed in order to run the test). -->
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>
+ org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.vpp.input.rev160425.*
+ </Export-Package> -->
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2013 Cisco Systems, Inc. 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
+-->
+<snapshot>
+ <configuration>
+ <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+ <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+ <module>
+ <name>vpp-provider-impl</name>
+ <type xmlns:vpp="urn:opendaylight:params:xml:ns:yang:controller:config:vpp-provider:impl">
+ vpp:vpp-provider-impl
+ </type>
+ <data-broker>
+ <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
+ <name>binding-data-broker</name>
+ </data-broker>
+ </module>
+ </modules>
+ </data>
+ </configuration>
+ <required-capabilities>
+ <capability>urn:opendaylight:params:xml:ns:yang:controller:config:vpp-provider:impl?module=vpp-provider-impl&revision=2016-04-25</capability>
+ </required-capabilities>
+</snapshot>
--- /dev/null
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.config.yang.config.vpp_provider.impl;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class VppProviderModule extends org.opendaylight.controller.config.yang.config.vpp_provider.impl.AbstractVppProviderModule {
+
+ private static final Logger LOG = LoggerFactory.getLogger(VppProviderModule.class);
+
+ public VppProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+ super(identifier, dependencyResolver);
+ }
+
+ public VppProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.yang.config.vpp_provider.impl.VppProviderModule oldModule, java.lang.AutoCloseable oldInstance) {
+ super(identifier, dependencyResolver, oldModule, oldInstance);
+ }
+
+ @Override
+ public void customValidation() {
+ // add custom validation form module attributes here.
+ }
+
+ @Override
+ public java.lang.AutoCloseable createInstance() {
+ final VppRenderer vppRenderer = new VppRenderer(getDataBrokerDependency());
+
+ LOG.info("VPP Renderer instance has been created");
+
+ return new AutoCloseable() {
+
+ @Override
+ public void close() throws Exception {
+ vppRenderer.close();
+ }
+ };
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. 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
+ */
+/*
+* Generated file
+*
+* Generated from: yang module name: vpp-provider-impl yang module local name: vpp-provider-impl
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Thu May 05 09:46:48 CEST 2016
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.controller.config.yang.config.vpp_provider.impl;
+public class VppProviderModuleFactory extends org.opendaylight.controller.config.yang.config.vpp_provider.impl.AbstractVppProviderModuleFactory {
+
+}
--- /dev/null
+/*\r
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
+\r
+package org.opendaylight.controller.config.yang.config.vpp_provider.impl;\r
+\r
+import com.google.common.base.Preconditions;\r
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+public class VppRenderer implements AutoCloseable {\r
+ private static final Logger LOG = LoggerFactory.getLogger(VppRenderer.class);\r
+\r
+ private DataBroker dataBroker;\r
+\r
+ public VppRenderer(DataBroker dataBroker) {\r
+ Preconditions.checkNotNull(dataBroker);\r
+\r
+ this.dataBroker = dataBroker;\r
+\r
+ LOG.info("VPP Renderer has Started");\r
+ }\r
+\r
+ @Override\r
+ public void close() throws Exception {\r
+ this.dataBroker = null;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. 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
+ */
+
+module vpp-provider-impl {
+ yang-version 1;
+ namespace "urn:opendaylight:params:xml:ns:yang:controller:config:vpp-provider:impl";
+ prefix "vpp-provider-impl";
+
+ import config { prefix config; revision-date 2013-04-05; }
+ import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
+ import ietf-yang-types { prefix "yang"; revision-date 2010-09-24; }
+ import opendaylight-sal-binding-broker-impl { prefix sal-broker; revision-date 2013-10-28;}
+ import groupbasedpolicy-cfg { prefix gbpcfg; revision-date 2015-11-06; }
+
+ description
+ "This module contains the base YANG definitions for
+ vpp-provider impl implementation.";
+
+ revision "2016-04-25" {
+ description
+ "Initial revision.";
+ }
+
+ identity vpp-provider-impl {
+ base "config:module-type";
+
+ config:java-name-prefix VppProvider;
+ }
+
+ // Augments the 'configuration' choice node under modules/module.
+ augment "/config:modules/config:module/config:configuration" {
+ case vpp-provider-impl {
+ when "/config:modules/config:module/config:type = 'vpp-provider-impl'";
+
+ // Wires in the data-broker service
+ container data-broker {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity mdsal:binding-async-data-broker;
+ }
+ }
+ }
+ }
+ }
+}