From 469c65356d15832801188e234281bc59e60f84b7 Mon Sep 17 00:00:00 2001 From: Michal Polkorab Date: Tue, 18 Nov 2014 10:41:42 +0100 Subject: [PATCH] Statistics loadable / installable in Karaf - created new feature odl-openflowjava-stats in order to ensure correct module start - created new project openflowjava-config to properly store and delagate statistics config file - removed stats-collection as a service from configuration xml Change-Id: If2b94c4ec9bf2a2c8157eaad546672df6e1d1500 Signed-off-by: Michal Polkorab --- features/src/main/resources/features.xml | 4 ++ .../rev140328/StatisticsCollectionModule.java | 3 -- openflowjava-config/pom.xml | 53 +++++++++++++++++++ .../main/resources/45-openflowjava-stats.xml | 41 ++++++++++++++ pom.xml | 19 +++---- 5 files changed, 108 insertions(+), 12 deletions(-) create mode 100644 openflowjava-config/pom.xml create mode 100644 openflowjava-config/src/main/resources/45-openflowjava-stats.xml diff --git a/features/src/main/resources/features.xml b/features/src/main/resources/features.xml index ace7ba14..87d05699 100644 --- a/features/src/main/resources/features.xml +++ b/features/src/main/resources/features.xml @@ -24,4 +24,8 @@ mvn:org.opendaylight.openflowjava/openflow-protocol-impl/${project.version} mvn:org.opendaylight.openflowjava/util/${project.version} + + odl-openflowjava-protocol + mvn:org.opendaylight.openflowjava/openflowjava-config/${project.version}/xml/configstats + diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/openflow/_switch/connection/provider/impl/rev140328/StatisticsCollectionModule.java b/openflow-protocol-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/openflow/_switch/connection/provider/impl/rev140328/StatisticsCollectionModule.java index ff686c16..5de0a75f 100644 --- a/openflow-protocol-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/openflow/_switch/connection/provider/impl/rev140328/StatisticsCollectionModule.java +++ b/openflow-protocol-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/openflow/_switch/connection/provider/impl/rev140328/StatisticsCollectionModule.java @@ -50,10 +50,7 @@ public class StatisticsCollectionModule extends org.opendaylight.yang.gen.v1.urn return 0; } }; - } else { - LOGGER.error("STATISTICS ARE NULL"); } - LOGGER.error("config " + statsConfig); if (statsConfig != null) { statsCounter.startCounting(statsConfig.getStatisticsCollect(), statsConfig.getLogReportDelay()); } else { diff --git a/openflowjava-config/pom.xml b/openflowjava-config/pom.xml new file mode 100644 index 00000000..60647655 --- /dev/null +++ b/openflowjava-config/pom.xml @@ -0,0 +1,53 @@ + + + + + 4.0.0 + + + org.opendaylight.openflowjava + openflow-protocol-parent + 0.6.0-SNAPSHOT + + openflowjava-config + Configuration files for openflowjava statistics + jar + Openflow Protocol Library - CONFIG + + https://wiki.opendaylight.org/view/Openflow_Protocol_Library:Main + HEAD + + + 45-openflowjava-stats.xml + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-artifacts + + attach-artifact + + package + + + + ${project.build.directory}/classes/${configfile} + xml + configstats + + + + + + + + + diff --git a/openflowjava-config/src/main/resources/45-openflowjava-stats.xml b/openflowjava-config/src/main/resources/45-openflowjava-stats.xml new file mode 100644 index 00000000..12761959 --- /dev/null +++ b/openflowjava-config/src/main/resources/45-openflowjava-stats.xml @@ -0,0 +1,41 @@ + + + + + + + urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider:impl?module=openflow-switch-connection-provider-impl&revision=2014-03-28 + urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider?module=openflow-switch-connection-provider&revision=2014-03-28 + + + + + + + + stats:statistics-collection-service-impl + statistics-collection-service-impl + + true + 10000 + + + ofSwitch:openflow-switch-connection-provider + openflow-switch-connection-provider-default + + + ofSwitch:openflow-switch-connection-provider + openflow-switch-connection-provider-legacy + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index d2d90009..da66cf0c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,6 +6,7 @@ 0.6.0-SNAPSHOT pom + openflowjava-config openflow-protocol-api openflow-protocol-spi util @@ -13,7 +14,7 @@ openflow-protocol-it features simple-client - + scm:git:ssh://git.opendaylight.org:29418/openflowjava.git scm:git:ssh://git.opendaylight.org:29418/openflowjava.git @@ -434,7 +435,7 @@ - + @@ -447,7 +448,7 @@ - + @@ -462,7 +463,7 @@ - + @@ -490,7 +491,7 @@ - + @@ -503,7 +504,7 @@ - + @@ -516,7 +517,7 @@ - + @@ -529,7 +530,7 @@ - + @@ -628,4 +629,4 @@ - + \ No newline at end of file -- 2.36.6