summaryrefslogtreecommitdiffstats
path: root/v3po/vpp-japi-cfg/src
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-05-04 10:17:39 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-05-05 08:41:23 +0200
commitf187ae2f6a363616442a8968db1450977ce69078 (patch)
tree7e3c8799f931a47edbbf3a6ec40494a75a2a7d7f /v3po/vpp-japi-cfg/src
parentfd5c022142f871c78d29708c89afc941518acbd0 (diff)
HONEYCOMB-10: Porting v3po2vpp to the new Java API
Change-Id: Ic7166b0f578442165595aa44a587ebbc5db0e75c Signed-off-by: Marek Gradzki <mgradzki@cisco.com> Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/vpp-japi-cfg/src')
-rw-r--r--v3po/vpp-japi-cfg/src/main/config/default-config.xml46
-rw-r--r--v3po/vpp-japi-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/japi/cfg/rev160406/VppJapiImplModule.java37
-rw-r--r--v3po/vpp-japi-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/japi/cfg/rev160406/VppJapiImplModuleFactory.java13
-rw-r--r--v3po/vpp-japi-cfg/src/main/yang/vpp-japi-cfg.yang38
4 files changed, 0 insertions, 134 deletions
diff --git a/v3po/vpp-japi-cfg/src/main/config/default-config.xml b/v3po/vpp-japi-cfg/src/main/config/default-config.xml
deleted file mode 100644
index 7ba72f42f..000000000
--- a/v3po/vpp-japi-cfg/src/main/config/default-config.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (c) 2016 Cisco and/or its affiliates.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at:
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-
-<snapshot>
- <required-capabilities>
- <capability>urn:honeycomb:params:xml:ns:yang:vpp:japi:cfg?module=vpp-japi-cfg&amp;revision=2016-04-06</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:honeycomb:params:xml:ns:yang:vpp:japi:cfg">prefix:vpp-japi-impl</type>
- <name>vpp-japi</name>
- </module>
- </modules>
-
- <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <service>
- <type xmlns:prefix="urn:honeycomb:params:xml:ns:yang:vpp:japi:cfg">prefix:vpp-japi</type>
- <instance>
- <name>vpp-japi</name>
- <provider>/modules/module[type='vpp-japi-impl'][name='vpp-japi']
- </provider>
- </instance>
- </service>
- </services>
- </data>
- </configuration>
-</snapshot>
diff --git a/v3po/vpp-japi-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/japi/cfg/rev160406/VppJapiImplModule.java b/v3po/vpp-japi-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/japi/cfg/rev160406/VppJapiImplModule.java
deleted file mode 100644
index 3f092e936..000000000
--- a/v3po/vpp-japi-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/japi/cfg/rev160406/VppJapiImplModule.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.japi.cfg.rev160406;
-
-import java.io.IOException;
-import org.openvpp.vppjapi.vppApi;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class VppJapiImplModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.japi.cfg.rev160406.AbstractVppJapiImplModule {
-
- private static final Logger LOG = LoggerFactory.getLogger(VppJapiImplModule.class);
-
- public VppJapiImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public VppJapiImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.japi.cfg.rev160406.VppJapiImplModule 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() {
- try {
- final vppApi vppApi = new vppApi(getName());
- LOG.info("VPP-INFO: VPP api client connection established");
- return vppApi;
- } catch (IOException e) {
- LOG.error("VPP-ERROR: VPP api client connection failed", e);
- throw new IllegalStateException("Unable to open vpp API", e);
- }
- }
-
-}
diff --git a/v3po/vpp-japi-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/japi/cfg/rev160406/VppJapiImplModuleFactory.java b/v3po/vpp-japi-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/japi/cfg/rev160406/VppJapiImplModuleFactory.java
deleted file mode 100644
index 6b3724c6d..000000000
--- a/v3po/vpp-japi-cfg/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/vpp/japi/cfg/rev160406/VppJapiImplModuleFactory.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: vpp-japi-cfg yang module local name: vpp-japi-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Apr 06 11:06:28 CEST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.japi.cfg.rev160406;
-public class VppJapiImplModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.vpp.japi.cfg.rev160406.AbstractVppJapiImplModuleFactory {
-
-}
diff --git a/v3po/vpp-japi-cfg/src/main/yang/vpp-japi-cfg.yang b/v3po/vpp-japi-cfg/src/main/yang/vpp-japi-cfg.yang
deleted file mode 100644
index f723f5282..000000000
--- a/v3po/vpp-japi-cfg/src/main/yang/vpp-japi-cfg.yang
+++ /dev/null
@@ -1,38 +0,0 @@
-module vpp-japi-cfg {
- yang-version 1;
- namespace "urn:honeycomb:params:xml:ns:yang:vpp:japi:cfg";
- prefix "vjc";
-
- import config { prefix config; revision-date 2013-04-05; }
-
- description
- "This module contains the base YANG definitions for
- readers/writers plugged into a honeycomb";
-
- revision "2016-04-06" {
- description
- "Initial revision.";
- }
-
- identity vpp-japi {
- base "config:service-type";
- config:java-class org.openvpp.vppjapi.vppApi;
- }
-
- identity vpp-japi-impl {
- base config:module-type;
- config:provided-service vpp-japi;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case vpp-japi-impl {
- when "/config:modules/config:module/config:type = 'vpp-japi-impl'";
-
- leaf name {
- type string;
- default "v3poODL";
- }
- }
- }
-
-} \ No newline at end of file