Added support for VPN Intent 99/31099/29
authorIcaro Camelo <icamelo@inocybe.com>
Wed, 9 Dec 2015 23:02:45 +0000 (18:02 -0500)
committerIcaro Camelo <icamelo@inocybe.com>
Fri, 22 Jan 2016 14:33:17 +0000 (14:33 +0000)
Change-Id: I85edca79213c6f20413b66f23003248575d7042a
Signed-off-by: Icaro Camelo <icamelo@inocybe.com>
Signed-off-by: Rashmi Pujar <rpujar@inocybe.com>
13 files changed:
features/pom.xml
features/src/main/features/features.xml
pom.xml
vpnintent/api/pom.xml [new file with mode: 0644]
vpnintent/api/src/main/yang/vpnintent.yang [new file with mode: 0644]
vpnintent/impl/pom.xml [new file with mode: 0644]
vpnintent/impl/src/main/config/default-config.xml [new file with mode: 0644]
vpnintent/impl/src/main/java/org/opendaylight/vpnservice/impl/VpnintentProvider.java [new file with mode: 0644]
vpnintent/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vpnintent/impl/rev141210/VpnintentImplModule.java [new file with mode: 0644]
vpnintent/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vpnintent/impl/rev141210/VpnintentImplModuleFactory.java [new file with mode: 0644]
vpnintent/impl/src/main/yang/vpnintent-impl.yang [new file with mode: 0644]
vpnintent/impl/src/test/java/org/opendaylight/vpnservice/impl/VpnintentProviderTest.java [new file with mode: 0644]
vpnintent/pom.xml [new file with mode: 0644]

index 067f4bb0ab80594c24b250bd501c7c26c9419d6e..2508f3ce053097137e5c51e81248524fed0a165a 100644 (file)
@@ -30,6 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <ovsdb.version>1.3.0-SNAPSHOT</ovsdb.version>
     <liblldp.version>0.11.0-SNAPSHOT</liblldp.version>
     <neutron.version>0.7.0-SNAPSHOT</neutron.version>
+    <nic.version>1.2.0-SNAPSHOT</nic.version>
     <arputil.version>${vpnservices.version}</arputil.version>
     <mdsalutil.version>${vpnservices.version}</mdsalutil.version>
     <vpnmanager.version>${vpnservices.version}</vpnmanager.version>
@@ -86,6 +87,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.nic</groupId>
+      <artifactId>features-nic</artifactId>
+      <classifier>features</classifier>
+      <version>${nic.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
     <dependency>
       <groupId>org.opendaylight.ovsdb</groupId>
       <artifactId>features-ovsdb</artifactId>
@@ -377,5 +386,22 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <artifactId>commons-net</artifactId>
       <version>${commons.net.version}</version>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpnintent-api</artifactId>
+      <version>${vpnservices.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpnintent-impl</artifactId>
+      <version>${vpnservices.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpnintent-impl</artifactId>
+      <version>${vpnservices.version}</version>
+      <classifier>config</classifier>
+      <type>xml</type>
+    </dependency>
   </dependencies>
 </project>
index cfebda449e8e4bebd8209dd75cb5446e62e9f1d0..74e321ffd8f92540c329e250c238c9098e060c02 100644 (file)
@@ -18,6 +18,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <repository>mvn:org.opendaylight.netconf/features-restconf/${restconf.version}/xml/features</repository>
   <repository>mvn:org.opendaylight.ovsdb/features-ovsdb/${ovsdb.version}/xml/features</repository>
   <repository>mvn:org.opendaylight.neutron/features-neutron/${neutron.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.nic/features-nic/{{VERSION}}/xml/features</repository>
   <feature name='odl-vpnservice-api' version='${project.version}' description='OpenDaylight :: vpnservice :: api '>
     <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
     <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
@@ -66,6 +67,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <bundle>mvn:org.opendaylight.vpnservice/elanmanager-impl/${elanmgr.version}</bundle>
 
     <!--<bundle>mvn:org.opendaylight.vpnservice.third-party/org.apache.thriftlib/1.1.0-SNAPSHOT</bundle>-->
+    <!--<bundle>mvn:org.opendaylight.vpnservice.third-party/org.apache.thriftlib/1.0.1-SNAPSHOT</bundle>-->
     <bundle>wrap:mvn:org.apache.thrift/libthrift/0.9.1$overwrite=merge&amp;Bundle-Version=0.9.1&amp;Export-Package=*;-noimport:=true;version="0.9.1"</bundle>
     <!--<bundle>wrap:mvn:javax.servlet/servlet-api/2.5</bundle>-->
     <configfile finalname="lockmanager-impl-default-config.xml">mvn:org.opendaylight.vpnservice/lockmanager-impl/${lockmanager.version}/xml/config</configfile>
@@ -101,4 +103,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <feature name='odl-vpnservice-openstack' version='${project.version}' description='OpenDaylight :: vpnservice :: impl :: REST '>
     <feature version="${project.version}">odl-vpnservice-impl</feature>
   </feature>
+  <feature name='odl-vpnservice-intent' version='${project.version}' description='OpenDaylight :: vpnservice :: intent'>
+    <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
+    <feature version='${nic.version}'>odl-nic-core-service-mdsal</feature>
+    <feature version='${nic.version}'>odl-nic-core</feature>
+    <feature version='${nic.version}'>odl-nic-listeners</feature>
+    <bundle>mvn:org.opendaylight.vpnservice/vpnintent-api/{{VERSION}}</bundle>
+    <bundle>mvn:org.opendaylight.vpnservice/vpnintent-impl/{{VERSION}}</bundle>
+    <configfile finalname="vpnintent-impl-default-config.xml">mvn:org.opendaylight.vpnservice/vpnintent-impl/{{VERSION}}/xml/config</configfile>
+  </feature>
   </features>
diff --git a/pom.xml b/pom.xml
index 591652c614cb313d9f3b8aa5a043e71584839235..e29557e99b9cce51a66757b8a4c7e0bf4d871739 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -4,8 +4,7 @@ Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others.  A
 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 INTERNAL
--->
-<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">
+--><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">
   <groupId>org.opendaylight.vpnservice</groupId>
   <artifactId>vpnservice</artifactId>
   <version>0.3.0-SNAPSHOT</version>
@@ -35,6 +34,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <module>distribution/karaf</module>
     <module>features</module>
     <module>vpnservice-artifacts</module>
+    <module>vpnintent</module>
   </modules>
 
   <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
@@ -62,4 +62,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <url>https://wiki.opendaylight.org/view/VPNService:Main</url>
     <tag>HEAD</tag>
   </scm>
-</project>
+</project>
\ No newline at end of file
diff --git a/vpnintent/api/pom.xml b/vpnintent/api/pom.xml
new file mode 100644 (file)
index 0000000..24f8d54
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2016 Inocybe Technologies 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">
+  <parent>
+    <groupId>org.opendaylight.vpnservice</groupId>
+    <artifactId>binding-parent</artifactId>
+    <version>0.3.0-SNAPSHOT</version>
+    <relativePath>../../commons/binding-parent</relativePath>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.vpnservice</groupId>
+  <artifactId>vpnintent-api</artifactId>
+  <version>${vpnservices.version}</version>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+  <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>ietf-inet-types</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>ietf-yang-types</artifactId>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/vpnintent/api/src/main/yang/vpnintent.yang b/vpnintent/api/src/main/yang/vpnintent.yang
new file mode 100644 (file)
index 0000000..bb2528f
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2016 Inocybe Technologies 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 INTERNAL
+ */
+module vpnintent {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:vpnintent";
+    prefix "vpnintent";
+
+    import ietf-inet-types { prefix inet; revision-date 2010-09-24;}
+
+    revision "2015-01-05" {
+        description "Initial revision of VPN intent model.
+            Create VPN via Intent, keep VPN state and manage MPLS labels";
+    }
+
+    container vpns{
+        list vpn-intents {
+            key "vpn-name";
+            uses vpn-intent;
+        }
+    }
+
+    grouping vpn-intent {
+        leaf vpn-name {
+            type string;
+            description "VPN name";
+            mandatory true;
+        }
+        list endpoint {
+            key "site-name";
+            uses endpoint-fields;
+            description "List to keep track site name and endpoint.";
+          }
+    }
+
+    grouping endpoint-fields {
+        leaf site-name{
+            type string;
+            description "VPN member site name.";
+        }
+
+        leaf ip-prefix {
+            type inet:ip-prefix;
+            description "VPN member IP prefix.";
+        }
+
+        leaf switch-port-id {
+            type string;
+            description "Switch and port ID that VPN member is connected to.";
+        }
+    }
+
+    grouping labels {
+        list label {
+            key "label-id";
+            leaf "label-id"{
+                type uint64;
+                description "MPLS or other label ID.";
+                mandatory true;
+            }
+            uses endpoint-fields;
+            description "Keep track of MPLS/other label endpoint relation.";
+        }
+     }
+  }
diff --git a/vpnintent/impl/pom.xml b/vpnintent/impl/pom.xml
new file mode 100644 (file)
index 0000000..51cb833
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2016 Inocybe Technologies 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 INTERNAL
+-->
+<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">
+
+  <parent>
+    <groupId>org.opendaylight.vpnservice</groupId>
+    <artifactId>config-parent</artifactId>
+    <version>0.3.0-SNAPSHOT</version>
+    <relativePath>../../commons/config-parent</relativePath>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>vpnintent-impl</artifactId>
+  <version>${vpnservices.version}</version>
+  <packaging>bundle</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>vpnintent-api</artifactId>
+      <version>${project.version}</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/vpnintent/impl/src/main/config/default-config.xml b/vpnintent/impl/src/main/config/default-config.xml
new file mode 100644 (file)
index 0000000..0b6f6a6
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright (c) 2016 Inocybe Technologies 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>
+  <required-capabilities>
+      <capability>urn:opendaylight:params:xml:ns:yang:vpnintent:impl?module=vpnintent-impl&amp;revision=2014-12-10</capability>
+      <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
+  </required-capabilities>
+  <configuration>
+
+    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+        <module>
+          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:vpnintent:impl">prefix:vpnintent-impl</type>
+          <name>vpnintent-impl-default</name>
+          <broker>
+            <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
+            <name>binding-osgi-broker</name>
+          </broker>
+          <rpc-registry>
+              <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
+              <name>binding-rpc-broker</name>
+          </rpc-registry>
+        </module>
+      </modules>
+    </data>
+  </configuration>
+</snapshot>
diff --git a/vpnintent/impl/src/main/java/org/opendaylight/vpnservice/impl/VpnintentProvider.java b/vpnintent/impl/src/main/java/org/opendaylight/vpnservice/impl/VpnintentProvider.java
new file mode 100644 (file)
index 0000000..637d815
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2016 Inocybe Technologies 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.vpnservice.impl;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
+import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpnintent.rev150105.Vpns;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpnintent.rev150105.VpnsBuilder;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+
+public class VpnintentProvider implements BindingAwareProvider, AutoCloseable {
+
+    private static final Logger LOG = LoggerFactory.getLogger(VpnintentProvider.class);
+    public static final InstanceIdentifier<Vpns> VPN_INTENT_IID = InstanceIdentifier.builder(Vpns.class).build();
+
+    private DataBroker dataBroker;
+
+    @Override
+    public void onSessionInitiated(ProviderContext session) {
+        LOG.info("VpnintentProvider Session Initiated");
+        dataBroker = session.getSALService(DataBroker.class);
+
+        Vpns vpns = new VpnsBuilder().build();
+
+        // Initialize default config data in MD-SAL data store
+        initDatastore(LogicalDatastoreType.CONFIGURATION, VPN_INTENT_IID, vpns);
+    }
+
+    @Override
+    public void close() throws Exception {
+        LOG.info("VpnintentProvider Closed");
+    }
+
+    private void initDatastore(LogicalDatastoreType store, InstanceIdentifier<Vpns> iid, Vpns mappings) {
+        // Put the Mapping data to MD-SAL data store
+        WriteTransaction transaction = dataBroker.newWriteOnlyTransaction();
+        transaction.put(store, iid, mappings);
+
+        // Perform the tx.submit asynchronously
+        Futures.addCallback(transaction.submit(), new FutureCallback<Void>() {
+            @Override
+            public void onSuccess(final Void result) {
+                LOG.info("initDatastore for VPN-Intents: transaction succeeded");
+            }
+
+            @Override
+            public void onFailure(final Throwable throwable) {
+                LOG.error("initDatastore for VPN-Intents: transaction failed");
+            }
+        });
+        LOG.info("initDatastore: VPN-Intents data populated: {}", store, iid, mappings);
+    }
+}
diff --git a/vpnintent/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vpnintent/impl/rev141210/VpnintentImplModule.java b/vpnintent/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vpnintent/impl/rev141210/VpnintentImplModule.java
new file mode 100644 (file)
index 0000000..7d0cfb1
--- /dev/null
@@ -0,0 +1,26 @@
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpnintent.impl.rev141210;
+
+import org.opendaylight.vpnservice.impl.VpnintentProvider;
+
+public class VpnintentImplModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpnintent.impl.rev141210.AbstractVpnintentImplModule {
+    public VpnintentImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+        super(identifier, dependencyResolver);
+    }
+
+    public VpnintentImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpnintent.impl.rev141210.VpnintentImplModule 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() {
+        VpnintentProvider provider = new VpnintentProvider();
+        getBrokerDependency().registerProvider(provider);
+        return provider;
+    }
+
+}
diff --git a/vpnintent/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vpnintent/impl/rev141210/VpnintentImplModuleFactory.java b/vpnintent/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/vpnintent/impl/rev141210/VpnintentImplModuleFactory.java
new file mode 100644 (file)
index 0000000..a369ccc
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+* Generated file
+*
+* Generated from: yang module name: vpnintent-impl yang module local name: vpnintent-impl
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Wed Dec 16 22:44:32 EST 2015
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpnintent.impl.rev141210;
+public class VpnintentImplModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpnintent.impl.rev141210.AbstractVpnintentImplModuleFactory {
+
+}
diff --git a/vpnintent/impl/src/main/yang/vpnintent-impl.yang b/vpnintent/impl/src/main/yang/vpnintent-impl.yang
new file mode 100644 (file)
index 0000000..1016f7e
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2016 Inocybe Technologies 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 INTERNAL
+ */
+module vpnintent-impl {
+    yang-version 1;
+    namespace "urn:opendaylight:params:xml:ns:yang:vpnintent:impl";
+    prefix "vpnintent-impl";
+
+    import config { prefix config; revision-date 2013-04-05; }
+    import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
+
+    description
+        "Service definition for vpnintent project";
+
+    revision "2014-12-10" {
+        description
+            "Initial revision";
+    }
+
+    identity vpnintent-impl {
+        base config:module-type;
+        config:java-name-prefix VpnintentImpl;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        case vpnintent-impl {
+            when "/config:modules/config:module/config:type = 'vpnintent-impl'";
+            container broker {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity md-sal-binding:binding-broker-osgi-registry;
+                    }
+                }
+            }
+            container rpc-registry {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity md-sal-binding:binding-rpc-registry;
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/vpnintent/impl/src/test/java/org/opendaylight/vpnservice/impl/VpnintentProviderTest.java b/vpnintent/impl/src/test/java/org/opendaylight/vpnservice/impl/VpnintentProviderTest.java
new file mode 100644 (file)
index 0000000..a23d8ae
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2016 Inocybe Technologies 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.vpnservice.impl;
+
+import static org.mockito.Mockito.mock;
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+
+public class VpnintentProviderTest {
+    @Ignore
+    @Test
+    public void testOnSessionInitiated() {
+        VpnintentProvider provider = new VpnintentProvider();
+
+        // ensure no exceptions
+        // currently this method is empty
+        provider.onSessionInitiated(mock(BindingAwareBroker.ProviderContext.class));
+    }
+
+    @Ignore
+    @Test
+    public void testClose() throws Exception {
+        VpnintentProvider provider = new VpnintentProvider();
+
+        // ensure no exceptions
+        // currently this method is empty
+        provider.close();
+    }
+}
diff --git a/vpnintent/pom.xml b/vpnintent/pom.xml
new file mode 100644 (file)
index 0000000..32d0504
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2016 Inocybe Technologies 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 INTERNAL
+-->
+<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">
+
+  <parent>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>odlparent-lite</artifactId>
+    <version>1.7.0-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.opendaylight.vpnservice</groupId>
+  <artifactId>vpnintent-aggregator</artifactId>
+  <version>0.3.0-SNAPSHOT</version>
+  <name>vpnintent</name>
+  <packaging>pom</packaging>
+  <modelVersion>4.0.0</modelVersion>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+  <modules>
+    <module>api</module>
+    <module>impl</module>
+  </modules>
+  <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
+