From 0186b5f6c4e02ee15e16c7e53bb3ad7c69bc0f91 Mon Sep 17 00:00:00 2001 From: Vishal Thapar Date: Mon, 30 Mar 2015 20:47:54 +0530 Subject: [PATCH] Initial checkin for Interface Manager 1. Bare bones changes for Interfacemgr bundle 2. Added .gitreview 3. Updated .gitignore Change-Id: Ib75a68b716e92dd58f35c65f4b0e71a9d64bcf8c Signed-off-by: Vishal Thapar --- .gitignore | 5 ++ .gitreview | 4 ++ features/pom.xml | 13 +++++ features/src/main/features/features.xml | 2 + interfacemgr/interfacemgr-impl/pom.xml | 38 +++++++++++++++ .../src/main/config/default-config.xml | 30 ++++++++++++ .../interfacemgr/InterfacemgrProvider.java | 29 ++++++++++++ .../rev150325/InterfacemgrImplModule.java | 34 ++++++++++++++ .../InterfacemgrImplModuleFactory.java | 20 ++++++++ .../src/main/yang/interfacemgr-impl.yang | 35 ++++++++++++++ interfacemgr/pom.xml | 47 +++++++++++++++++++ pom.xml | 1 + 12 files changed, 258 insertions(+) create mode 100644 .gitreview create mode 100644 interfacemgr/interfacemgr-impl/pom.xml create mode 100644 interfacemgr/interfacemgr-impl/src/main/config/default-config.xml create mode 100644 interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/InterfacemgrProvider.java create mode 100644 interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/interfacemgr/impl/rev150325/InterfacemgrImplModule.java create mode 100644 interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/interfacemgr/impl/rev150325/InterfacemgrImplModuleFactory.java create mode 100644 interfacemgr/interfacemgr-impl/src/main/yang/interfacemgr-impl.yang create mode 100644 interfacemgr/pom.xml diff --git a/.gitignore b/.gitignore index 44cd214bf6..1e7478880f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,8 @@ bin xtend-gen target .DS_Store +.checkstyle +yang-gen-config +yang-gen-sal +classes +maven-metadata-local.xml diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000000..d4ea063624 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=git.opendaylight.org +port=29418 +project=vpnservice.git diff --git a/features/pom.xml b/features/pom.xml index 1acacbf92b..8605559f0c 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -23,6 +23,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL 1.2.0-SNAPSHOT 0.7.0-SNAPSHOT + 0.0.1-SNAPSHOT @@ -80,6 +81,18 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL config xml + + ${project.groupId} + interfacemgr-impl + ${interfacemgr.version} + + + ${project.groupId} + interfacemgr-impl + ${interfacemgr.version} + config + xml + ${project.groupId} vpnmanager-api diff --git a/features/src/main/features/features.xml b/features/src/main/features/features.xml index e56a1b2872..69b08ff30b 100644 --- a/features/src/main/features/features.xml +++ b/features/src/main/features/features.xml @@ -24,7 +24,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html odl-mdsal-broker odl-vpnservice-api mvn:org.opendaylight.vpnservice/vpnmanager-impl/${project.version} + mvn:org.opendaylight.vpnservice/interfacemgr-impl/${interfacemgr.version} mvn:org.opendaylight.vpnservice/vpnmanager-impl/${project.version}/xml/config + mvn:org.opendaylight.vpnservice/interfacemgr-impl/${interfacemgr.version}/xml/config odl-vpnservice-impl diff --git a/interfacemgr/interfacemgr-impl/pom.xml b/interfacemgr/interfacemgr-impl/pom.xml new file mode 100644 index 0000000000..cfbee4fdd3 --- /dev/null +++ b/interfacemgr/interfacemgr-impl/pom.xml @@ -0,0 +1,38 @@ + + + + + + org.opendaylight.controller + config-parent + 0.3.0-SNAPSHOT + + + + 4.0.0 + org.opendaylight.vpnservice + interfacemgr-impl + 0.0.1-SNAPSHOT + bundle + + + + junit + junit + test + + + + org.mockito + mockito-all + test + + + + diff --git a/interfacemgr/interfacemgr-impl/src/main/config/default-config.xml b/interfacemgr/interfacemgr-impl/src/main/config/default-config.xml new file mode 100644 index 0000000000..9404e2aa76 --- /dev/null +++ b/interfacemgr/interfacemgr-impl/src/main/config/default-config.xml @@ -0,0 +1,30 @@ + + + + + + urn:opendaylight:params:xml:ns:yang:interfacemgr:impl?module=interfacemgr-impl&revision=2015-03-25 + urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28 + + + + + + + prefix:interfacemgr-impl + interfacemgr-default + + binding:binding-broker-osgi-registry + binding-osgi-broker + + + + + + diff --git a/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/InterfacemgrProvider.java b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/InterfacemgrProvider.java new file mode 100644 index 0000000000..a3d4e7324c --- /dev/null +++ b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/InterfacemgrProvider.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. 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.interfacemgr; + +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext; +import org.opendaylight.controller.sal.binding.api.BindingAwareProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class InterfacemgrProvider implements BindingAwareProvider, AutoCloseable { + + private static final Logger LOG = LoggerFactory.getLogger(InterfacemgrProvider.class); + + @Override + public void onSessionInitiated(ProviderContext session) { + LOG.info("InterfacemgrProvider Session Initiated"); + } + + @Override + public void close() throws Exception { + LOG.info("InterfacemgrProvider Closed"); + } + +} diff --git a/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/interfacemgr/impl/rev150325/InterfacemgrImplModule.java b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/interfacemgr/impl/rev150325/InterfacemgrImplModule.java new file mode 100644 index 0000000000..e4435ff33a --- /dev/null +++ b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/interfacemgr/impl/rev150325/InterfacemgrImplModule.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. 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.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.interfacemgr.impl.rev150325; + +import org.opendaylight.vpnservice.interfacemgr.InterfacemgrProvider; + +public class InterfacemgrImplModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.interfacemgr.impl.rev150325.AbstractInterfacemgrImplModule { + public InterfacemgrImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { + super(identifier, dependencyResolver); + } + + public InterfacemgrImplModule(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.interfacemgr.impl.rev150325.InterfacemgrImplModule 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() { + InterfacemgrProvider provider = new InterfacemgrProvider(); + getBrokerDependency().registerProvider(provider); + return provider; + } + +} diff --git a/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/interfacemgr/impl/rev150325/InterfacemgrImplModuleFactory.java b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/interfacemgr/impl/rev150325/InterfacemgrImplModuleFactory.java new file mode 100644 index 0000000000..1a49bf9488 --- /dev/null +++ b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/interfacemgr/impl/rev150325/InterfacemgrImplModuleFactory.java @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. 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: interfacemgr-impl yang module local name: interfacemgr-impl +* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator +* Generated at: Mon Mar 30 16:35:19 IST 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.interfacemgr.impl.rev150325; +public class InterfacemgrImplModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.interfacemgr.impl.rev150325.AbstractInterfacemgrImplModuleFactory { + +} diff --git a/interfacemgr/interfacemgr-impl/src/main/yang/interfacemgr-impl.yang b/interfacemgr/interfacemgr-impl/src/main/yang/interfacemgr-impl.yang new file mode 100644 index 0000000000..774fdbcf4e --- /dev/null +++ b/interfacemgr/interfacemgr-impl/src/main/yang/interfacemgr-impl.yang @@ -0,0 +1,35 @@ +module interfacemgr-impl { + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:interfacemgr:impl"; + prefix "interfacemgr-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 interfacemgr project"; + + revision "2015-03-25" { + description + "Initial revision"; + } + + identity interfacemgr-impl { + base config:module-type; + config:java-name-prefix InterfacemgrImpl; + } + + augment "/config:modules/config:module/config:configuration" { + case interfacemgr-impl { + when "/config:modules/config:module/config:type = 'interfacemgr-impl'"; + container broker { + uses config:service-ref { + refine type { + mandatory true; + config:required-identity md-sal-binding:binding-broker-osgi-registry; + } + } + } + } + } +} diff --git a/interfacemgr/pom.xml b/interfacemgr/pom.xml new file mode 100644 index 0000000000..fe3de1f84f --- /dev/null +++ b/interfacemgr/pom.xml @@ -0,0 +1,47 @@ + + + + + + org.opendaylight.odlparent + odlparent + 1.5.0-SNAPSHOT + + + org.opendaylight.vpnservice + interfacemgr-aggregator + 0.0.1-SNAPSHOT + interfacemgr + pom + 4.0.0 + + 3.1.1 + + + interfacemgr-impl + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.apache.maven.plugins + maven-install-plugin + + true + + + + + diff --git a/pom.xml b/pom.xml index 4227d1e149..8214f574e7 100644 --- a/pom.xml +++ b/pom.xml @@ -22,6 +22,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL distribution/karaf features vpnservice-artifacts + interfacemgr -- 2.36.6