diff options
author | 2016-05-04 10:17:39 +0200 | |
---|---|---|
committer | 2016-05-05 08:41:23 +0200 | |
commit | f187ae2f6a363616442a8968db1450977ce69078 (patch) | |
tree | 7e3c8799f931a47edbbf3a6ec40494a75a2a7d7f /v3po/vpp-japi-cfg | |
parent | fd5c022142f871c78d29708c89afc941518acbd0 (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')
5 files changed, 0 insertions, 173 deletions
diff --git a/v3po/vpp-japi-cfg/pom.xml b/v3po/vpp-japi-cfg/pom.xml deleted file mode 100644 index 3e3424acc..000000000 --- a/v3po/vpp-japi-cfg/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright (c) 2015 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. ---> -<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>io.fd.honeycomb.common</groupId> - <artifactId>impl-parent</artifactId> - <version>1.0.0-SNAPSHOT</version> - <relativePath>../../common/impl-parent</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - <groupId>io.fd.honeycomb.v3po</groupId> - <artifactId>vpp-japi-cfg</artifactId> - <version>1.0.0-SNAPSHOT</version> - <packaging>bundle</packaging> - - <dependencies> - <dependency> - <groupId>io.fd.vpp</groupId> - <artifactId>vppjapi</artifactId> - <version>1.0.0-SNAPSHOT</version> - </dependency> - </dependencies> - -</project> 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&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 |