<type>test-jar</type>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>${project.groupId}.openflowjava</groupId>
- <artifactId>openflowjava-config</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>${project.groupId}.openflowjava</groupId>
<artifactId>openflowjava-blueprint-config</artifactId>
<type>xml</type>
<classifier>legacyConfig</classifier>
</dependency>
- <dependency>
- <groupId>${project.groupId}.openflowjava</groupId>
- <artifactId>openflowjava-config</artifactId>
- <type>xml</type>
- <version>${project.version}</version>
- <classifier>configstats</classifier>
- </dependency>
<!-- features -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>openflowjava-util</artifactId>
</dependency>
<!-- config files -->
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>openflowjava-config</artifactId>
- <type>xml</type>
- <classifier>configstats</classifier>
- </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>openflowjava-blueprint-config</artifactId>
<features name="odl-openflowjava-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
<feature name='odl-openflowjava-protocol' version='${project.version}'>
- <configfile finalname="etc/opendaylight/karaf/45-openflowjava-stats.xml">mvn:org.opendaylight.openflowplugin.openflowjava/openflowjava-config/${project.version}/xml/configstats</configfile>
<configfile finalname="etc/opendaylight/datastore/initial/config/default-openflow-connection-config.xml">mvn:org.opendaylight.openflowplugin.openflowjava/openflowjava-blueprint-config/${project.version}/xml/config</configfile>
<configfile finalname="etc/opendaylight/datastore/initial/config/legacy-openflow-connection-config.xml">mvn:org.opendaylight.openflowplugin.openflowjava/openflowjava-blueprint-config/${project.version}/xml/legacyConfig</configfile>
</feature>
-</features>
+</features>
\ No newline at end of file
<instructions>
<Export-Package>
org.opendaylight.openflowjava.protocol.impl.*,
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow._switch.connection.provider.impl.*
</Export-Package>
</instructions>
</configuration>
</goals>
<configuration>
<codeGenerators>
- <generator>
- <codeGeneratorClass>
- org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- </codeGeneratorClass>
- <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
- <additionalConfiguration>
- <namespaceToPackage1>
- urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang
- </namespaceToPackage1>
- </additionalConfiguration>
- </generator>
<generator>
<codeGeneratorClass>
org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl
</execution>
</executions>
<dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>yang-jmx-generator-plugin</artifactId>
- <version>${config.version}</version>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow._switch.connection.provider.impl.rev140328;
-
-import org.opendaylight.openflowjava.protocol.api.connection.StatisticsConfiguration;
-import org.opendaylight.openflowjava.protocol.spi.statistics.StatisticsHandler;
-import org.opendaylight.openflowjava.statistics.StatisticsCounters;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
-* This is the definition of statistics collection module identity.
-*/
-public class StatisticsCollectionModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow._switch.connection.provider.impl.rev140328.AbstractStatisticsCollectionModule {
-
- private static final Logger LOG = LoggerFactory.getLogger(StatisticsCollectionModule.class);
-
- public StatisticsCollectionModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public StatisticsCollectionModule(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.openflow._switch.connection.provider.impl.rev140328.StatisticsCollectionModule 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 Statistics statistics = getStatistics();
- final StatisticsCounters statsCounter = StatisticsCounters.getInstance();
- StatisticsConfiguration statsConfig = null;
- if (statistics != null) {
- statsConfig = new StatisticsConfiguration() {
-
- @Override
- public boolean getStatisticsCollect() {
- if (statistics.getStatisticsCollect() != null) {
- return statistics.getStatisticsCollect().booleanValue();
- }
- return false;
- }
-
- @Override
- public int getLogReportDelay() {
- if (statistics.getLogReportDelay() != null) {
- return statistics.getLogReportDelay().intValue();
- }
- return 0;
- }
- };
- }
- if (statsConfig != null) {
- statsCounter.startCounting(statsConfig.getStatisticsCollect(), statsConfig.getLogReportDelay());
- } else {
- LOG.debug("Unable to start StatisticCounter - wrong configuration");
- }
-
- /* Internal MXBean implementation */
- final StatisticsCollectionRuntimeMXBean collectionBean = new StatisticsCollectionRuntimeMXBean() {
-
- @Override
- public String printOfjavaStatistics() {
- if (statsCounter != null) {
- return statsCounter.printStatistics();
- }
- return "Statistics collection is not avaliable.";
- }
- @Override
- public String getMsgStatistics() {
- return printOfjavaStatistics();
- }
- @Override
- public String resetOfjavaStatistics() {
- statsCounter.resetCounters();
- return "Statistics have been reset";
- }
- };
-
- /* MXBean registration */
- final StatisticsCollectionRuntimeRegistration runtimeReg =
- getRootRuntimeBeanRegistratorWrapper().register(collectionBean);
-
- /* Internal StatisticsCollectionService implementation */
- final class AutoClosableStatisticsCollection implements StatisticsHandler, AutoCloseable {
-
- @Override
- public void close() {
- if (runtimeReg != null) {
- try {
- runtimeReg.close();
- }
- catch (Exception e) {
- String errMsg = "Error by stoping StatisticsCollectionService.";
- LOG.error(errMsg, e);
- throw new IllegalStateException(errMsg, e);
- }
- }
- LOG.info("StatisticsCollection Service consumer (instance {} turn down.)", this);
- }
-
- @Override
- public void resetCounters() {
- statsCounter.resetCounters();
- }
-
- @Override
- public String printStatistics() {
- return statsCounter.printStatistics();
- }
- }
-
- AutoCloseable ret = new AutoClosableStatisticsCollection();
- LOG.info("StatisticsCollection service (instance {}) initialized.", ret);
- return ret;
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
-* Generated file
-*
-* Generated from: yang module name: openflow-switch-connection-provider-impl yang module local name: statistics-collection-service-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Thu Nov 13 12:52:26 CET 2014
-*
-* 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.openflow._switch.connection.provider.impl.rev140328;
-public class StatisticsCollectionModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow._switch.connection.provider.impl.rev140328.AbstractStatisticsCollectionModuleFactory {
-
-}
+++ /dev/null
-/**
-* Generated file
-
-* Generated from: yang module name: openflow-switch-connection-provider-impl yang module local name: openflow-switch-connection-provider-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Fri Mar 28 17:50:58 PDT 2014
-*
-* 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.openflow._switch.connection.provider.impl.rev140328;
-
-import com.google.common.reflect.AbstractInvocationHandler;
-import com.google.common.reflect.Reflection;
-import java.lang.reflect.Method;
-import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker;
-import org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider;
-import org.osgi.framework.BundleContext;
-
-/**
- * @deprecated Replaced by blueprint wiring
- */
-@Deprecated
-public final class SwitchConnectionProviderModule extends AbstractSwitchConnectionProviderModule {
- private BundleContext bundleContext;
-
- /**
- * @param identifier
- * @param dependencyResolver
- */
- public SwitchConnectionProviderModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- /**
- * @param identifier
- * @param dependencyResolver
- * @param oldModule
- * @param oldInstance
- */
- public SwitchConnectionProviderModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- final SwitchConnectionProviderModule oldModule, final java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public AutoCloseable createInstance() {
- // The service is provided via blueprint so wait for and return it here for backwards compatibility.
- String typeFilter = String.format("(type=%s)", getIdentifier().getInstanceName());
- final WaitingServiceTracker<SwitchConnectionProvider> tracker = WaitingServiceTracker.create(
- SwitchConnectionProvider.class, bundleContext, typeFilter);
- final SwitchConnectionProvider actualService = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES);
-
- // We don't want to call close on the actual service as its life cycle is controlled by blueprint but
- // we do want to close the tracker so create a proxy to override close appropriately.
- return Reflection.newProxy(SwitchConnectionProvider.class, new AbstractInvocationHandler() {
- @Override
- protected Object handleInvocation(Object proxy, Method method, Object[] args) throws Throwable {
- if (method.getName().equals("close")) {
- tracker.close();
- return null;
- } else {
- return method.invoke(actualService, args);
- }
- }
- });
- }
-
- public void setBundleContext(BundleContext bundleContext) {
- this.bundleContext = bundleContext;
- }
-
- @Override
- public boolean canReuseInstance(AbstractSwitchConnectionProviderModule oldModule) {
- return true;
- }
-}
+++ /dev/null
-/**
-* Generated file
-
-* Generated from: yang module name: openflow-switch-connection-provider-impl yang module local name: openflow-switch-connection-provider-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Fri Mar 28 17:50:58 PDT 2014
-*
-* 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.openflow._switch.connection.provider.impl.rev140328;
-
-import org.opendaylight.controller.config.api.DependencyResolver;
-import org.osgi.framework.BundleContext;
-
-/**
- * @deprecated Replaced by blueprint wiring
- */
-@Deprecated
-public class SwitchConnectionProviderModuleFactory extends AbstractSwitchConnectionProviderModuleFactory {
- @Override
- public SwitchConnectionProviderModule instantiateModule(String instanceName, DependencyResolver dependencyResolver,
- SwitchConnectionProviderModule oldModule, AutoCloseable oldInstance, BundleContext bundleContext) {
- SwitchConnectionProviderModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule,
- oldInstance, bundleContext);
- module.setBundleContext(bundleContext);
- return module;
- }
-
- @Override
- public SwitchConnectionProviderModule instantiateModule(String instanceName, DependencyResolver dependencyResolver,
- BundleContext bundleContext) {
- SwitchConnectionProviderModule module = super.instantiateModule(instanceName, dependencyResolver, bundleContext);
- module.setBundleContext(bundleContext);
- return module;
- }
-}
+++ /dev/null
-module openflow-switch-connection-provider-impl {
- yang-version 1;
- namespace "urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider:impl";
- prefix "openflow-switch-connection-provider-impl";
-
- import config {prefix config; revision-date 2013-04-05; }
- import openflow-switch-connection-provider {prefix openflow-switch-connection-provider; revision-date 2014-03-28; }
- import ietf-inet-types {prefix ietf-inet; revision-date 2013-07-15; }
- import openflow-configuration {prefix of-config; revision-date 2014-06-30; }
- import rpc-context { prefix rpcx; revision-date 2013-06-17; }
-
- description
- "openflow-switch-connection-provider";
-
- revision "2014-03-28" {
- description
- "Initial revision";
- }
-
- identity openflow-switch-connection-provider-impl {
- base "config:module-type";
- config:provided-service openflow-switch-connection-provider:openflow-switch-connection-provider;
- config:java-name-prefix SwitchConnectionProvider;
- status deprecated;
- }
-
- identity statistics-collection-service-impl {
- description
- "This is the definition of statistics collection module identity.";
- base config:module-type;
- config:provided-service openflow-switch-connection-provider:statistics-collection-service;
- config:java-name-prefix StatisticsCollection;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case openflow-switch-connection-provider-impl {
- when "/config:modules/config:module/config:type = 'openflow-switch-connection-provider-impl'";
-
- leaf use-barrier {
- description "Enable barrier in Openflow java";
- type boolean;
- default true;
- }
-
- leaf port {
- description "local listening port";
- type uint16;
- mandatory true;
- }
- leaf address {
- description "address of local listening interface";
- type ietf-inet:ip-address;
- }
- leaf transport-protocol {
- description "Transport protocol used for communication.";
- type of-config:transport-protocol;
- mandatory true;
- }
- leaf switch-idle-timeout {
- description "idle timeout in [ms]";
- type uint32;
- mandatory true;
- }
- container tls {
- leaf keystore {
- description "keystore location";
- type string;
- }
- leaf keystore-type {
- description "keystore type (JKS or PKCS12)";
- type of-config:keystore-type;
- }
- leaf keystore-path-type {
- description "keystore path type (CLASSPATH or PATH)";
- type of-config:path-type;
- }
- leaf keystore-password {
- description "password protecting keystore";
- type string;
- }
- leaf certificate-password {
- description "password protecting certificate";
- type string;
- }
- leaf truststore {
- description "truststore location";
- type string;
- }
- leaf truststore-type {
- description "truststore type (JKS or PKCS12)";
- type of-config:keystore-type;
- }
- leaf truststore-path-type {
- description "truststore path type (CLASSPATH or PATH)";
- type of-config:path-type;
- }
- leaf truststore-password {
- description "password protecting truststore";
- type string;
- }
- leaf-list cipher-suites {
- description "combination of cryptographic algorithms used by TLS connection";
- type string;
- }
- }
- container threads {
- leaf boss-threads {
- type uint16;
- }
- leaf worker-threads {
- type uint16;
- }
- }
- }
-
- case statistics-collection-service-impl {
- when "/config:modules/config:module/config:type = 'statistics-collection-service-impl'";
-
- container statistics {
- leaf statistics-collect {
- description "Toggle statistics collecting";
- type boolean;
- }
- leaf log-report-delay {
- description "Delay between statistics logs";
- type uint16;
- }
- }
- list openflow-switch-connection-provider {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity openflow-switch-connection-provider:openflow-switch-connection-provider;
- }
- }
- }
- }
- }
-
- augment "/config:modules/config:module/config:state" {
- case statistics-collection-service-impl {
- when "/config:modules/config:module/config:type = 'statistics-collection-service-impl'";
-
- description
- "MXBean designed for Message Statistic providing to JConsole.";
-
- leaf msgStatistics {
- type string;
- }
-
- rpcx:rpc-context-instance "print-ofjava-statistics-rpc";
- rpcx:rpc-context-instance "reset-ofjava-statistics-rpc";
- }
- }
-
- identity print-ofjava-statistics-rpc;
- identity reset-ofjava-statistics-rpc;
-
- rpc print-ofjava-statistics {
- description
- "Shortcut JMX call to printOfjavaStatistics.";
- input {
- uses rpcx:rpc-context-ref {
- refine context-instance {
- rpcx:rpc-context-instance print-ofjava-statistics-rpc;
- }
- }
- }
- output {
- leaf result {
- type string;
- }
- }
- }
-
- rpc reset-ofjava-statistics {
- description
- "Shortcut JMX call to resetOfjavaStatistics.";
- input {
- uses rpcx:rpc-context-ref {
- refine context-instance {
- rpcx:rpc-context-instance reset-ofjava-statistics-rpc;
- }
- }
- }
- output {
- leaf result {
- type string;
- }
- }
- }
-}
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+
+import com.google.common.collect.Lists;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.group.DefaultChannelGroup;
import org.opendaylight.openflowjava.protocol.impl.serialization.SerializationFactory;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.KeystoreType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.PathType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflow._switch.connection.provider.impl.rev140328.Tls;
-
-import com.google.common.collect.Lists;
/**
*
@Mock ConnectionAdapterFactory mockConnAdaptorFactory;
@Mock DefaultChannelGroup mockChGrp ;
@Mock ConnectionFacade mockConnFacade ;
- @Mock Tls mockTls ;
+ @Mock
SSLEngine sslEngine ;
@Mock SerializationFactory mockSerializationFactory ;
</goals>
<configuration>
<codeGenerators>
- <generator>
- <codeGeneratorClass>
- org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- </codeGeneratorClass>
- <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
- <additionalConfiguration>
- <namespaceToPackage1>
- urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang
- </namespaceToPackage1>
- </additionalConfiguration>
- </generator>
<generator>
<codeGeneratorClass>
org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl
</execution>
</executions>
<dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>yang-jmx-generator-plugin</artifactId>
- <version>${config.version}</version>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
+++ /dev/null
-module openflow-switch-connection-provider {
- yang-version 1;
- namespace "urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider";
- prefix "openflow-switch-connection-provider";
-
- import config {prefix config; revision-date 2013-04-05; }
-
- description
- "openflow-switch-connection-provider service definitions";
-
- revision "2014-03-28" {
- description
- "Initial revision";
- }
-
- identity openflow-switch-connection-provider {
- base "config:service-type";
- config:java-class "org.opendaylight.openflowjava.protocol.spi.connection.SwitchConnectionProvider";
- config:disable-osgi-service-registration;
- status deprecated;
- }
-
- identity statistics-collection-service {
- description
- "StatisticsHandlerService interface as a StatisticsCollection interface identity";
- base config:service-type;
- config:java-class "org.opendaylight.openflowjava.protocol.spi.statistics.StatisticsHandler";
- }
-}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 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 -->
-<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.openflowplugin.openflowjava</groupId>
- <artifactId>openflowjava-parent</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
- <artifactId>openflowjava-config</artifactId>
- <description>Configuration files for openflowjava statistics</description>
- <packaging>jar</packaging>
- <!-- <name> formatting is used by autorelease to parse and notify projects on
- build failure. Please do not modify this unless you have a good reason. -->
- <name>ODL :: openflowjava :: ${project.artifactId}</name>
- <scm>
- <url>https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main</url>
- <tag>HEAD</tag>
- </scm>
- <properties>
- <configfile>45-openflowjava-stats.xml</configfile>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/classes/${configfile}</file>
- <type>xml</type>
- <classifier>configstats</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright (c) 2013 Pantheon Technologies s.r.o. 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>
- <!-- openflowjava -->
- <capability>urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider:impl?module=openflow-switch-connection-provider-impl&revision=2014-03-28</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider?module=openflow-switch-connection-provider&revision=2014-03-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:stats="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider:impl">stats:statistics-collection-service-impl</type>
- <name>statistics-collection-service-impl</name>
- <statistics>
- <statistics-collect>true</statistics-collect>
- <log-report-delay>10000</log-report-delay>
- </statistics>
- </module>
- </modules>
- </data>
-
- </configuration>
-</snapshot>
\ No newline at end of file
<modules>
<module>features-openflowjava-aggregator</module>
- <module>openflowjava-config</module>
<module>openflowjava-blueprint-config</module>
<module>openflow-protocol-api</module>
<module>openflow-protocol-impl</module>
</execution>
</executions>
<dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>yang-jmx-generator-plugin</artifactId>
- <version>${config.version}</version>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>maven-sal-api-gen-plugin</artifactId>
namespace "urn:opendaylight:params:xml:ns:yang:openflow:common:config:impl";
prefix "ofplugin-cfg-impl";
- import config {prefix config; revision-date 2013-04-05;}
- import rpc-context { prefix rpcx; revision-date 2013-06-17; }
- import openflow-provider { prefix openflow-provider; revision-date 2014-03-26; }
- import openflow-switch-connection-provider {prefix openflow-switch-connection-provider;revision-date 2014-03-28;}
- import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
- import openflowplugin-extension-registry {prefix ofp-ext-reg; revision-date 2015-04-25;}
- import opendaylight-entity-ownership-service { prefix entity-ownership-service; }
-
description
"openflow-plugin-custom-config-impl";
"Initial revision";
}
- identity openflow-provider-impl {
- base config:module-type;
- config:provided-service openflow-provider:openflow-provider;
- config:provided-service ofp-ext-reg:openflow-extension-registry-provider;
- config:java-name-prefix ConfigurableOpenFlowProvider;
- }
-
- identity msg-spy-service {
- description
- "MessageCountDumperServiceInterface as a MsgSpyService interface identity";
- base config:service-type;
- config:java-class "org.opendaylight.openflowplugin.api.openflow.statistics.MessageCountDumper";
- }
-
- identity msg-spy-service-impl {
- description
- "This is the definition of MsgSpyService implementation module identity.";
- base config:module-type;
- config:provided-service msg-spy-service;
- config:java-name-prefix MsgSpyService;
- }
-
// role of OFPlugin instance
typedef ofp-role {
type enumeration {
}
}
}
-
- augment "/config:modules/config:module/config:configuration" {
- case openflow-provider-impl {
- when "/config:modules/config:module/config:type = 'openflow-provider-impl'";
-
- container data-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-async-data-broker;
- }
- }
- }
-
- container ownership-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity entity-ownership-service:entity-ownership-service;
- }
- }
- }
-
- container rpc-registry {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-rpc-registry;
- }
- }
- }
- container notification-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-notification-service;
- }
- }
- }
-
- list openflow-switch-connection-provider {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity openflow-switch-connection-provider:openflow-switch-connection-provider;
- }
- }
- }
- leaf role {
- type ofp-role;
- default "NOCHANGE";
- }
-
- leaf skip-table-features {
- description "Ability to skip pulling and storing of large table features. These features are still
- available via rpc, so if use set it to true, it won't store table feature data in DataStore.";
- type boolean;
- default "false";
- }
- }
-
- case msg-spy-service-impl {
- when "/config:modules/config:module/config:type = 'msg-spy-service-impl'";
-
- container openflow-plugin-provider {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity openflow-provider:openflow-provider;
- }
- }
- }
- }
- }
-
- augment "/config:modules/config:module/config:state" {
- case msg-spy-service-impl {
- when "/config:modules/config:module/config:type = 'msg-spy-service-impl'";
-
- description
- "MXBean designed for Message Statistic providing to JConsole.";
-
- leaf msgStatistics {
- type string;
- }
-
- rpcx:rpc-context-instance "make-msg-statistics-rpc";
- }
- }
-
- identity make-msg-statistics-rpc;
-
- rpc make-msg-statistics {
-
- description
- "Shortcut JMX call to getMsgStatistics.";
-
- input {
- uses rpcx:rpc-context-ref {
- refine context-instance {
- rpcx:rpc-context-instance make-msg-statistics-rpc;
- }
- }
- }
-
- output {
- leaf result {
- type string;
- }
- }
- }
}
+++ /dev/null
-module openflow-provider {
- yang-version 1;
- namespace "urn:opendaylight:params:xml:ns:yang:openflow:common:config";
- prefix "ofplugin-cfg";
-
- import config {prefix config; revision-date 2013-04-05; }
-
- description
- "openflow-plugin-custom-config";
-
- revision "2014-03-26" {
- description
- "Initial revision";
- }
-
- identity openflow-provider{
- base config:service-type;
- config:java-class "org.opendaylight.openflowplugin.openflow.md.core.sal.OpenflowPluginProvider";
- config:disable-osgi-service-registration;
- }
-}
\ No newline at end of file