<config.netty.configfile>00-netty.xml</config.netty.configfile>
<config.mdsal.configfile>01-md-sal.xml</config.mdsal.configfile>
<config.xsql.configfile>04-xsql.xml</config.xsql.configfile>
- <config.toaster.configfile>03-toaster-sample.xml</config.toaster.configfile>
</properties>
<dependencyManagement>
<groupId>org.opendaylight.controller.samples</groupId>
<artifactId>sample-toaster-provider</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller.samples</groupId>
- <artifactId>toaster-config</artifactId>
- <version>${controller.mdsal.version}</version>
- <type>xml</type>
- <classifier>config</classifier>
- </dependency>
</dependencies>
<bundle>mvn:org.opendaylight.controller.samples/sample-toaster/{{VERSION}}</bundle>
<bundle>mvn:org.opendaylight.controller.samples/sample-toaster-consumer/{{VERSION}}</bundle>
<bundle>mvn:org.opendaylight.controller.samples/sample-toaster-provider/{{VERSION}}</bundle>
- <configfile finalname="${config.configfile.directory}/${config.toaster.configfile}">mvn:org.opendaylight.controller.samples/toaster-config/{{VERSION}}/xml/config</configfile>
</feature>
<feature name ='odl-mdsal-xsql' version='${project.version}'>
<feature version='${project.version}'>odl-mdsal-broker</feature>
<module>toaster</module>
<module>toaster-consumer</module>
<module>toaster-provider</module>
- <module>toaster-config</module>
<module>clustering-test-app</module>
<module>toaster-it</module>
</modules>
+++ /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.controller.samples</groupId>
- <artifactId>sal-samples</artifactId>
- <version>1.4.0-SNAPSHOT</version>
- </parent>
- <artifactId>toaster-config</artifactId>
- <description>Configuration files for toaster</description>
- <packaging>jar</packaging>
- <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/initial/03-toaster-sample.xml</file>
- <type>xml</type>
- <classifier>config</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 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
--->
-<snapshot>
- <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:toaster="urn:opendaylight:params:xml:ns:yang:controller:config:toaster-provider:impl">
- toaster:toaster-provider-impl
- </type>
- <name>toaster-provider-impl</name>
-
- <rpc-registry>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
- <name>binding-rpc-broker</name>
- </rpc-registry>
-
- <data-broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <name>binding-data-broker</name>
- </data-broker>
-
- <notification-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- binding:binding-new-notification-publish-service
- </type>
- <name>binding-notification-publish-adapter</name>
- </notification-service>
- </module>
-
- <module>
- <type xmlns:kitchen="urn:opendaylight:params:xml:ns:yang:controller:config:kitchen-service:impl">
- kitchen:kitchen-service-impl
- </type>
- <name>kitchen-service-impl</name>
-
- <rpc-registry>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
- <name>binding-rpc-broker</name>
- </rpc-registry>
-
- <notification-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- binding:binding-new-notification-service
- </type>
- <name>binding-notification-adapter</name>
- </notification-service>
- </module>
- </modules>
-
- <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <service>
- <type xmlns:kitchen="urn:opendaylight:params:xml:ns:yang:controller:config:kitchen-service:impl">
- kitchen:kitchen-service
- </type>
- <instance>
- <name>kitchen-service</name>
- <provider>/modules/module[type='kitchen-service-impl'][name='kitchen-service-impl']</provider>
- </instance>
- </service>
- </services>
- </data>
-
- </configuration>
-
- <required-capabilities>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:config:kitchen-service:impl?module=kitchen-service-impl&revision=2014-01-31</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:config:toaster-provider:impl?module=toaster-provider-impl&revision=2014-01-31</capability>
- </required-capabilities>
-
-</snapshot>
-
<artifactId>sample-toaster</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>config-api</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-common-util</artifactId>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</plugin>
- <plugin>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>config</id>
- <goals>
- <goal>generate-sources</goal>
- </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.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
- <outputBaseDir>${salGeneratorPath}</outputBaseDir>
- </generator>
- </codeGenerators>
- <inspectDependencies>true</inspectDependencies>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
</plugins>
</build>
<scm>
+++ /dev/null
-/*
- * 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<KitchenService> 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<RpcResult<Void>> makeBreakfast(final EggsType eggs, final Class<? extends ToastType> toast,
- final int toastDoneness) {
- return kitchenService.makeBreakfast(eggs, toast, toastDoneness);
- }
- }
-
- return new AutoCloseableKitchenService();
- }
-
- public void setBundleContext(BundleContext bundleContext) {
- this.bundleContext = bundleContext;
- }
-}
+++ /dev/null
-/*
- * 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;
- }
-}
--- /dev/null
+/*
+ * 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();
+}
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;
+++ /dev/null
-// 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
@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")
<artifactId>sample-toaster</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>config-api</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-api</artifactId>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>yang-binding</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>yang-ext</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>ietf-yang-types</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>opendaylight-l2-types</artifactId>
- </dependency>
-
</dependencies>
<build>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Export-Package>org.opendaylight.controller.config.yang.toaster_provider,</Export-Package>
- <Import-Package>*</Import-Package>
- </instructions>
- </configuration>
</plugin>
<plugin>
<groupId>org.opendaylight.yangtools</groupId>
</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.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
<outputBaseDir>${salGeneratorPath}</outputBaseDir>
+++ /dev/null
-/*
- * 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;
- }
-}
+++ /dev/null
-/*
- * 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
-{
-
-
-}
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;
--- /dev/null
+/*
+ * 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();
+}
+++ /dev/null
-// 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;
- }
- }
- }
- }
-}