From: Tom Pantelis Date: Tue, 3 May 2016 04:43:53 +0000 (-0400) Subject: Remove CSS-related files from the toaster X-Git-Tag: release/boron~139 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=21186d16ca8b233674ebdf3aa1ea190a2c0b3959 Remove CSS-related files from the toaster The toaster is wired with blueprint and, since it's a sample app, it doesn't need to maintain backwards compatibility with CSS so remove the CSS-related files. Change-Id: I4b99933cec6188f3eb628eedffe20ce198ed1ab5 Signed-off-by: Tom Pantelis --- diff --git a/features/mdsal/pom.xml b/features/mdsal/pom.xml index 5c1a1ed78f..8ac07c2c54 100644 --- a/features/mdsal/pom.xml +++ b/features/mdsal/pom.xml @@ -30,7 +30,6 @@ 00-netty.xml 01-md-sal.xml 04-xsql.xml - 03-toaster-sample.xml @@ -353,13 +352,6 @@ org.opendaylight.controller.samples sample-toaster-provider - - org.opendaylight.controller.samples - toaster-config - ${controller.mdsal.version} - xml - config - diff --git a/features/mdsal/src/main/features/features.xml b/features/mdsal/src/main/features/features.xml index ca04823373..7faae7ecdc 100644 --- a/features/mdsal/src/main/features/features.xml +++ b/features/mdsal/src/main/features/features.xml @@ -61,7 +61,6 @@ mvn:org.opendaylight.controller.samples/sample-toaster/{{VERSION}} mvn:org.opendaylight.controller.samples/sample-toaster-consumer/{{VERSION}} mvn:org.opendaylight.controller.samples/sample-toaster-provider/{{VERSION}} - mvn:org.opendaylight.controller.samples/toaster-config/{{VERSION}}/xml/config odl-mdsal-broker diff --git a/opendaylight/md-sal/samples/pom.xml b/opendaylight/md-sal/samples/pom.xml index 029e4b17a6..0510021186 100644 --- a/opendaylight/md-sal/samples/pom.xml +++ b/opendaylight/md-sal/samples/pom.xml @@ -15,7 +15,6 @@ toaster toaster-consumer toaster-provider - toaster-config clustering-test-app toaster-it diff --git a/opendaylight/md-sal/samples/toaster-config/pom.xml b/opendaylight/md-sal/samples/toaster-config/pom.xml deleted file mode 100644 index d3225b994c..0000000000 --- a/opendaylight/md-sal/samples/toaster-config/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - 4.0.0 - - org.opendaylight.controller.samples - sal-samples - 1.4.0-SNAPSHOT - - toaster-config - Configuration files for toaster - jar - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - attach-artifact - - package - - - - ${project.build.directory}/classes/initial/03-toaster-sample.xml - xml - config - - - - - - - - - diff --git a/opendaylight/md-sal/samples/toaster-config/src/main/resources/initial/03-toaster-sample.xml b/opendaylight/md-sal/samples/toaster-config/src/main/resources/initial/03-toaster-sample.xml deleted file mode 100644 index df07caa067..0000000000 --- a/opendaylight/md-sal/samples/toaster-config/src/main/resources/initial/03-toaster-sample.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - toaster:toaster-provider-impl - - toaster-provider-impl - - - binding:binding-rpc-registry - binding-rpc-broker - - - - binding:binding-async-data-broker - binding-data-broker - - - - - binding:binding-new-notification-publish-service - - binding-notification-publish-adapter - - - - - - kitchen:kitchen-service-impl - - kitchen-service-impl - - - binding:binding-rpc-registry - binding-rpc-broker - - - - - binding:binding-new-notification-service - - binding-notification-adapter - - - - - - - - kitchen:kitchen-service - - - kitchen-service - /modules/module[type='kitchen-service-impl'][name='kitchen-service-impl'] - - - - - - - - - urn:opendaylight:params:xml:ns:yang:controller:config:kitchen-service:impl?module=kitchen-service-impl&revision=2014-01-31 - urn:opendaylight:params:xml:ns:yang:controller:config:toaster-provider:impl?module=toaster-provider-impl&revision=2014-01-31 - - - - diff --git a/opendaylight/md-sal/samples/toaster-consumer/pom.xml b/opendaylight/md-sal/samples/toaster-consumer/pom.xml index 0eee4464b9..32f6e1d208 100644 --- a/opendaylight/md-sal/samples/toaster-consumer/pom.xml +++ b/opendaylight/md-sal/samples/toaster-consumer/pom.xml @@ -19,10 +19,6 @@ sample-toaster ${project.version} - - org.opendaylight.controller - config-api - org.opendaylight.controller sal-common-util @@ -47,35 +43,6 @@ org.apache.felix maven-bundle-plugin - - org.opendaylight.yangtools - yang-maven-plugin - - - config - - generate-sources - - - - - org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator - ${jmxGeneratorPath} - - urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang - - - - org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl - ${salGeneratorPath} - - - true - - - - - diff --git a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/config/yang/config/kitchen_service/impl/KitchenServiceModule.java b/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/config/yang/config/kitchen_service/impl/KitchenServiceModule.java deleted file mode 100644 index 65fba77fb6..0000000000 --- a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/config/yang/config/kitchen_service/impl/KitchenServiceModule.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2014, 2015 Brocade Communications 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 - */ - -/** - * Generated file - - * Generated from: yang module name: toaster-consumer-impl yang module local name: toaster-consumer-impl - * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator - * Generated at: Wed Feb 05 11:31:30 CET 2014 - * - * Do not modify this file unless it is present under src/main directory - */ -package org.opendaylight.controller.config.yang.config.kitchen_service.impl; - -import java.util.concurrent.Future; -import org.opendaylight.controller.config.api.osgi.WaitingServiceTracker; -import org.opendaylight.controller.sample.kitchen.api.EggsType; -import org.opendaylight.controller.sample.kitchen.api.KitchenService; -import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToastType; -import org.opendaylight.yangtools.yang.common.RpcResult; -import org.osgi.framework.BundleContext; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * - */ -public final class KitchenServiceModule extends AbstractKitchenServiceModule { - private static final Logger log = LoggerFactory.getLogger(KitchenServiceModule.class); - - private BundleContext bundleContext; - - public KitchenServiceModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public KitchenServiceModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - final KitchenServiceModule oldModule, final java.lang.AutoCloseable oldInstance) { - - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - protected void customValidation(){ - // No need to validate dependencies, since all dependencies have mandatory true flag in yang - // config-subsystem will perform the validation - } - - @Override - public AutoCloseable createInstance() { - // The KitchenServiceImpl instance is created and advertised with the OSGi registry via blueprint - // so obtain it here so we can return it to the config system. It's possible the blueprint container - // hasn't been created yet so we busy wait 5 min for the service. - final WaitingServiceTracker tracker = WaitingServiceTracker.create( - KitchenService.class, bundleContext); - final KitchenService kitchenService = tracker.waitForService(WaitingServiceTracker.FIVE_MINUTES); - - final class AutoCloseableKitchenService implements KitchenService, AutoCloseable { - @Override - public void close() { - // We need to close the ServiceTracker however we don't want to close the actual - // KitchenService instance because its life-cycle is controlled via blueprint. - tracker.close(); - log.info("KitchenService (instance {}) closed.", kitchenService); - } - - @Override - public Future> makeBreakfast(final EggsType eggs, final Class toast, - final int toastDoneness) { - return kitchenService.makeBreakfast(eggs, toast, toastDoneness); - } - } - - return new AutoCloseableKitchenService(); - } - - public void setBundleContext(BundleContext bundleContext) { - this.bundleContext = bundleContext; - } -} diff --git a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/config/yang/config/kitchen_service/impl/KitchenServiceModuleFactory.java b/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/config/yang/config/kitchen_service/impl/KitchenServiceModuleFactory.java deleted file mode 100644 index e57bc187f2..0000000000 --- a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/config/yang/config/kitchen_service/impl/KitchenServiceModuleFactory.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2014, 2015 Brocade Communications 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 - */ - -/** - * Generated file - - * Generated from: yang module name: toaster-consumer-impl yang module local name: toaster-consumer-impl - * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator - * Generated at: Wed Feb 05 11:31:30 CET 2014 - * - * Do not modify this file unless it is present under src/main directory - */ -package org.opendaylight.controller.config.yang.config.kitchen_service.impl; - -import org.opendaylight.controller.config.api.DependencyResolver; -import org.osgi.framework.BundleContext; - -public class KitchenServiceModuleFactory extends AbstractKitchenServiceModuleFactory { - @Override - public KitchenServiceModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, - KitchenServiceModule oldModule, AutoCloseable oldInstance, BundleContext bundleContext) { - KitchenServiceModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule, - oldInstance, bundleContext); - module.setBundleContext(bundleContext); - return module; - } - - @Override - public KitchenServiceModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, - BundleContext bundleContext) { - KitchenServiceModule module = super.instantiateModule(instanceName, dependencyResolver, bundleContext); - module.setBundleContext(bundleContext); - return module; - } -} diff --git a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/api/KitchenServiceRuntimeMXBean.java b/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/api/KitchenServiceRuntimeMXBean.java new file mode 100644 index 0000000000..a05072f71e --- /dev/null +++ b/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/api/KitchenServiceRuntimeMXBean.java @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2016 Brocade Communications 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 + */ +package org.opendaylight.controller.sample.kitchen.api; + +/** + * MXBean interface that provides attributes and operations for the kitchen service via JMX. + * + * @author Thomas Pantelis + */ +public interface KitchenServiceRuntimeMXBean { + Boolean makeScrambledWithWheat(); +} diff --git a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java b/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java index 563b45ab77..55bb9e4267 100644 --- a/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java +++ b/opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java @@ -21,10 +21,10 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; import java.util.concurrent.Future; -import org.opendaylight.controller.config.yang.config.kitchen_service.impl.KitchenServiceRuntimeMXBean; import org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean; import org.opendaylight.controller.sample.kitchen.api.EggsType; import org.opendaylight.controller.sample.kitchen.api.KitchenService; +import org.opendaylight.controller.sample.kitchen.api.KitchenServiceRuntimeMXBean; import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.MakeToastInput; import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.MakeToastInputBuilder; import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev091120.ToastType; diff --git a/opendaylight/md-sal/samples/toaster-consumer/src/main/yang/kitchen-service-impl.yang b/opendaylight/md-sal/samples/toaster-consumer/src/main/yang/kitchen-service-impl.yang deleted file mode 100644 index fd25878949..0000000000 --- a/opendaylight/md-sal/samples/toaster-consumer/src/main/yang/kitchen-service-impl.yang +++ /dev/null @@ -1,88 +0,0 @@ -// vi: set smarttab et sw=4 tabstop=4: -module kitchen-service-impl { - - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:config:kitchen-service:impl"; - prefix "kitchen-service-impl"; - - import config { prefix config; revision-date 2013-04-05; } - import rpc-context { prefix rpcx; revision-date 2013-06-17; } - - import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; } - import opendaylight-sal-binding-broker-impl { prefix binding-impl; revision-date 2013-10-28; } - - description - "This module contains the base YANG definitions for - kitchen-service impl implementation."; - - revision "2014-01-31" { - description - "Initial revision."; - } - - // This is the definition of kitchen service interface identity. - identity kitchen-service { - base "config:service-type"; - config:java-class "org.opendaylight.controller.sample.kitchen.api.KitchenService"; - } - - // This is the definition of kitchen service implementation module identity. - identity kitchen-service-impl { - base config:module-type; - config:provided-service kitchen-service; - config:java-name-prefix KitchenService; - } - - augment "/config:modules/config:module/config:configuration" { - case kitchen-service-impl { - when "/config:modules/config:module/config:type = 'kitchen-service-impl'"; - - container rpc-registry { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity mdsal:binding-rpc-registry; - } - } - } - - container notification-service { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity binding-impl:binding-new-notification-service; - } - } - } - } - } - - augment "/config:modules/config:module/config:state" { - case kitchen-service-impl { - when "/config:modules/config:module/config:type = 'kitchen-service-impl'"; - - rpcx:rpc-context-instance "make-scrambled-with-wheat-rpc"; - } - } - - identity make-scrambled-with-wheat-rpc; - - rpc make-scrambled-with-wheat { - description - "Shortcut JMX call to make breakfast with scrambled eggs and wheat toast for testing."; - - input { - uses rpcx:rpc-context-ref { - refine context-instance { - rpcx:rpc-context-instance make-scrambled-with-wheat-rpc; - } - } - } - - output { - leaf result { - type boolean; - } - } - } -} \ No newline at end of file diff --git a/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java b/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java index c115fc9114..d6c3db900d 100644 --- a/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java +++ b/opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java @@ -31,16 +31,6 @@ public class ToasterTest extends AbstractMdsalTestBase { @Filter(timeout=60*1000) KitchenService kitchenService; - @Override - public String getModuleName() { - return "toaster-provider-impl"; - } - - @Override - public String getInstanceName() { - return "toaster-provider-impl"; - } - @Override public MavenUrlReference getFeatureRepo() { return maven().groupId("org.opendaylight.controller").artifactId("features-mdsal").classifier("features") diff --git a/opendaylight/md-sal/samples/toaster-provider/pom.xml b/opendaylight/md-sal/samples/toaster-provider/pom.xml index 585d5f38aa..e56eec8164 100644 --- a/opendaylight/md-sal/samples/toaster-provider/pom.xml +++ b/opendaylight/md-sal/samples/toaster-provider/pom.xml @@ -19,10 +19,6 @@ sample-toaster ${project.version} - - org.opendaylight.controller - config-api - org.opendaylight.controller sal-binding-api @@ -68,23 +64,6 @@ com.google.guava guava - - org.opendaylight.mdsal - yang-binding - - - org.opendaylight.mdsal.model - yang-ext - - - org.opendaylight.mdsal.model - ietf-yang-types - - - org.opendaylight.mdsal.model - opendaylight-l2-types - - @@ -92,12 +71,6 @@ org.apache.felix maven-bundle-plugin - - - org.opendaylight.controller.config.yang.toaster_provider, - * - - org.opendaylight.yangtools @@ -110,13 +83,6 @@ - - org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator - ${jmxGeneratorPath} - - urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang - - org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl ${salGeneratorPath} diff --git a/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/config/yang/config/toaster_provider/impl/ToasterProviderModule.java b/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/config/yang/config/toaster_provider/impl/ToasterProviderModule.java deleted file mode 100644 index 73438eb878..0000000000 --- a/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/config/yang/config/toaster_provider/impl/ToasterProviderModule.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 - */ - -/** -* Generated file - -* Generated from: yang module name: toaster-provider-impl yang module local name: toaster-provider-impl -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Wed Feb 05 11:05:32 CET 2014 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.controller.config.yang.config.toaster_provider.impl; - -import org.opendaylight.controller.sal.common.util.NoopAutoCloseable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** -* -*/ -public final class ToasterProviderModule extends - org.opendaylight.controller.config.yang.config.toaster_provider.impl.AbstractToasterProviderModule { - private static final Logger log = LoggerFactory.getLogger(ToasterProviderModule.class); - - public ToasterProviderModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public ToasterProviderModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier, - final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, - final ToasterProviderModule oldModule, final java.lang.AutoCloseable oldInstance) { - - super(identifier, dependencyResolver, oldModule, oldInstance); - } - - @Override - protected void customValidation() { - // No need to validate dependencies, since all dependencies have - // mandatory true flag in yang - // config-subsystem will perform the validation for dependencies - } - - @Override - public java.lang.AutoCloseable createInstance() { - // The components are created and wired via blueprint and, since this module doesn't advertise any - // services, return an empty AutoCloseable. The config module is kept for backwards compatibility. - return NoopAutoCloseable.INSTANCE; - } -} diff --git a/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/config/yang/config/toaster_provider/impl/ToasterProviderModuleFactory.java b/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/config/yang/config/toaster_provider/impl/ToasterProviderModuleFactory.java deleted file mode 100644 index 9758c19bec..0000000000 --- a/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/config/yang/config/toaster_provider/impl/ToasterProviderModuleFactory.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 - */ - -/** -* Generated file - -* Generated from: yang module name: toaster-provider-impl yang module local name: toaster-provider-impl -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Wed Feb 05 11:05:32 CET 2014 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.controller.config.yang.config.toaster_provider.impl; - -/** -* -*/ -public class ToasterProviderModuleFactory extends org.opendaylight.controller.config.yang.config.toaster_provider.impl.AbstractToasterProviderModuleFactory -{ - - -} diff --git a/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java b/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java index ff3117a2e1..b0daca7ce0 100644 --- a/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java +++ b/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java @@ -22,7 +22,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; -import org.opendaylight.controller.config.yang.config.toaster_provider.impl.ToasterProviderRuntimeMXBean; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener; diff --git a/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/ToasterProviderRuntimeMXBean.java b/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/ToasterProviderRuntimeMXBean.java new file mode 100644 index 0000000000..bb38ef78af --- /dev/null +++ b/opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/ToasterProviderRuntimeMXBean.java @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2016 Brocade Communications 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 + */ +package org.opendaylight.controller.sample.toaster.provider; + +/** + * MXBean interface that provides attributes and operations for the toaster via JMX. + * + * @author Thomas Pantelis + */ +public interface ToasterProviderRuntimeMXBean { + Long getToastsMade(); + + void clearToastsMade(); +} diff --git a/opendaylight/md-sal/samples/toaster-provider/src/main/yang/toaster-provider-impl.yang b/opendaylight/md-sal/samples/toaster-provider/src/main/yang/toaster-provider-impl.yang deleted file mode 100644 index f978e49b47..0000000000 --- a/opendaylight/md-sal/samples/toaster-provider/src/main/yang/toaster-provider-impl.yang +++ /dev/null @@ -1,90 +0,0 @@ -// vi: set smarttab et sw=4 tabstop=4: -module toaster-provider-impl { - - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:controller:config:toaster-provider:impl"; - prefix "toaster-provider-impl"; - - import config { prefix config; revision-date 2013-04-05; } - import rpc-context { prefix rpcx; revision-date 2013-06-17; } - import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; } - import opendaylight-sal-binding-broker-impl { prefix binding-impl; revision-date 2013-10-28; } - - description - "This module contains the base YANG definitions for - toaster-provider impl implementation."; - - revision "2014-01-31" { - description - "Initial revision."; - } - - // This is the definition of the service implementation as a module identity. - identity toaster-provider-impl { - base config:module-type; - - // Specifies the prefix for generated java classes. - config:java-name-prefix ToasterProvider; - } - - // Augments the 'configuration' choice node under modules/module. - augment "/config:modules/config:module/config:configuration" { - case toaster-provider-impl { - when "/config:modules/config:module/config:type = 'toaster-provider-impl'"; - - container rpc-registry { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity mdsal:binding-rpc-registry; - } - } - } - - container notification-service { - uses config:service-ref { - refine type { - mandatory true; - config:required-identity binding-impl:binding-new-notification-publish-service; - } - } - } - - container data-broker { - uses config:service-ref { - refine type { - mandatory false; - config:required-identity mdsal:binding-async-data-broker; - } - } - } - } - } - - augment "/config:modules/config:module/config:state" { - case toaster-provider-impl { - when "/config:modules/config:module/config:type = 'toaster-provider-impl'"; - - leaf toasts-made { - type uint32; - } - - rpcx:rpc-context-instance "clear-toasts-made-rpc"; - } - } - - identity clear-toasts-made-rpc; - - rpc clear-toasts-made { - description - "JMX call to clear the toasts-made counter."; - - input { - uses rpcx:rpc-context-ref { - refine context-instance { - rpcx:rpc-context-instance clear-toasts-made-rpc; - } - } - } - } -}