Remove CSS-related files from the toaster 35/38335/9
authorTom Pantelis <tpanteli@brocade.com>
Tue, 3 May 2016 04:43:53 +0000 (00:43 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 10 Jun 2016 09:56:25 +0000 (09:56 +0000)
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 <tpanteli@brocade.com>
18 files changed:
features/mdsal/pom.xml
features/mdsal/src/main/features/features.xml
opendaylight/md-sal/samples/pom.xml
opendaylight/md-sal/samples/toaster-config/pom.xml [deleted file]
opendaylight/md-sal/samples/toaster-config/src/main/resources/initial/03-toaster-sample.xml [deleted file]
opendaylight/md-sal/samples/toaster-consumer/pom.xml
opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/config/yang/config/kitchen_service/impl/KitchenServiceModule.java [deleted file]
opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/config/yang/config/kitchen_service/impl/KitchenServiceModuleFactory.java [deleted file]
opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/api/KitchenServiceRuntimeMXBean.java [new file with mode: 0644]
opendaylight/md-sal/samples/toaster-consumer/src/main/java/org/opendaylight/controller/sample/kitchen/impl/KitchenServiceImpl.java
opendaylight/md-sal/samples/toaster-consumer/src/main/yang/kitchen-service-impl.yang [deleted file]
opendaylight/md-sal/samples/toaster-it/src/test/java/org/opendaylight/controller/sample/toaster/it/ToasterTest.java
opendaylight/md-sal/samples/toaster-provider/pom.xml
opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/config/yang/config/toaster_provider/impl/ToasterProviderModule.java [deleted file]
opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/config/yang/config/toaster_provider/impl/ToasterProviderModuleFactory.java [deleted file]
opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java
opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/ToasterProviderRuntimeMXBean.java [new file with mode: 0644]
opendaylight/md-sal/samples/toaster-provider/src/main/yang/toaster-provider-impl.yang [deleted file]

index 5c1a1ed..8ac07c2 100644 (file)
@@ -30,7 +30,6 @@
     <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>
 
index ca04823..7faae7e 100644 (file)
@@ -61,7 +61,6 @@
         <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>
index 029e4b1..0510021 100644 (file)
@@ -15,7 +15,6 @@
     <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>
diff --git a/opendaylight/md-sal/samples/toaster-config/pom.xml b/opendaylight/md-sal/samples/toaster-config/pom.xml
deleted file mode 100644 (file)
index d3225b9..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?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>
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 (file)
index df07caa..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?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&amp;revision=2014-01-31</capability>
-        <capability>urn:opendaylight:params:xml:ns:yang:controller:config:toaster-provider:impl?module=toaster-provider-impl&amp;revision=2014-01-31</capability>
-    </required-capabilities>
-
-</snapshot>
-
index 0eee446..32f6e1d 100644 (file)
       <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>
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 (file)
index 65fba77..0000000
+++ /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<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;
-    }
-}
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 (file)
index e57bc18..0000000
+++ /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 (file)
index 0000000..a05072f
--- /dev/null
@@ -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();
+}
index 563b45a..55bb9e4 100644 (file)
@@ -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 (file)
index fd25878..0000000
+++ /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
index c115fc9..d6c3db9 100644 (file)
@@ -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")
index 585d5f3..e56eec8 100644 (file)
       <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>
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 (file)
index 73438eb..0000000
+++ /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 (file)
index 9758c19..0000000
+++ /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
-{
-
-
-}
index ff3117a..b0daca7 100644 (file)
@@ -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 (file)
index 0000000..bb38ef7
--- /dev/null
@@ -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 (file)
index f978e49..0000000
+++ /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;
-                }
-            }
-        }
-    }
-}

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.