Change seq generator to blueprint 31/77531/8
authorPatrick Brady <patrick.brady@att.com>
Tue, 29 Jan 2019 18:41:18 +0000 (10:41 -0800)
committerPatrick Brady <patrick.brady@att.com>
Thu, 21 Feb 2019 21:27:18 +0000 (21:27 +0000)
Change-Id: Ib46f149f3c4f7b838beb58f75bc20269ac945a3a
Signed-off-by: Patrick Brady <patrick.brady@att.com>
Issue-ID: APPC-1368

appc-sequence-generator/appc-sequence-generator-bundle/pom.xml
appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/sequencegenerator/impl/rev170706/SequenceGeneratorModule.java [deleted file]
appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/sequencegenerator/impl/rev170706/SequenceGeneratorModuleFactory.java [deleted file]
appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/initial/appc-sequence-generator.xml [deleted file]
appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/org/opendaylight/blueprint/sequence-generator-blueprint.xml [moved from appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml with 50% similarity]
appc-sequence-generator/appc-sequence-generator-bundle/src/main/yang/sequence-generator.yang [deleted file]
appc-sequence-generator/appc-sequence-generator-features/onap-appc-sequence-generator/src/main/feature/feature.xml [deleted file]
appc-sequence-generator/appc-sequence-generator-installer/pom.xml
appc-sequence-generator/appc-sequence-generator-installer/src/assembly/assemble_mvnrepo_zip.xml
appc-sequence-generator/appc-sequence-generator-model/pom.xml

index cfbdbaf..c460a36 100644 (file)
                     </instructions>
                 </configuration>
             </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.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
-                                    <outputBaseDir>${salGeneratorPath}</outputBaseDir>
-                                </generator>
-                            </codeGenerators>
-                            <inspectDependencies>true</inspectDependencies>
-                        </configuration>
-                    </execution>
-                </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.opendaylight.mdsal</groupId>
-                        <artifactId>maven-sal-api-gen-plugin</artifactId>
-                        <version>${odl.sal.api.gen.plugin.version}</version>
-                        <type>jar</type>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.opendaylight.controller</groupId>
-                        <artifactId>yang-jmx-generator-plugin</artifactId>
-                        <version>${odl.yang.jmx.generator.version}</version>
-                    </dependency>
-                </dependencies>
-            </plugin>
-            <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/appc-sequence-generator.xml</file>
-                                    <type>xml</type>
-                                    <classifier>config</classifier>
-                                </artifact>
-                            </artifacts>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/sequencegenerator/impl/rev170706/SequenceGeneratorModule.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/sequencegenerator/impl/rev170706/SequenceGeneratorModule.java
deleted file mode 100644 (file)
index 2044085..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP : APPC
- * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Copyright (C) 2017 Amdocs
- * =============================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ============LICENSE_END=========================================================
- */
-
-package org.opendaylight.yang.gen.v1.org.onap.appc.sequencegenerator.impl.rev170706;
-
-import org.onap.appc.seqgen.provider.SequenceGeneratorProvider;
-
-public class SequenceGeneratorModule extends org.opendaylight.yang.gen.v1.org.onap.appc.sequencegenerator.impl.rev170706.AbstractSequenceGeneratorModule {
-    public SequenceGeneratorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public SequenceGeneratorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.org.onap.appc.sequencegenerator.impl.rev170706.SequenceGeneratorModule oldModule, java.lang.AutoCloseable oldInstance) {
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public void customValidation() {
-        // add custom validation form module attributes here.
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        final SequenceGeneratorProvider provider = new SequenceGeneratorProvider(getDataBrokerDependency(), getNotificationServiceDependency(), getRpcRegistryDependency());
-        return new AutoCloseable() {
-
-            @Override
-            public void close() throws Exception {
-                provider.close();
-            }
-        };
-    }
-
-}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/sequencegenerator/impl/rev170706/SequenceGeneratorModuleFactory.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/sequencegenerator/impl/rev170706/SequenceGeneratorModuleFactory.java
deleted file mode 100644 (file)
index 8705599..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP : APPC
- * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Copyright (C) 2017 Amdocs
- * =============================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * ============LICENSE_END=========================================================
- */
-
-/*
-* Generated file
-*
-* Generated from: yang module name: sequence-generator-impl yang module local name: sequence-generator-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Thu Aug 10 15:48:17 IST 2017
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.org.onap.appc.sequencegenerator.impl.rev170706;
-public class SequenceGeneratorModuleFactory extends org.opendaylight.yang.gen.v1.org.onap.appc.sequencegenerator.impl.rev170706.AbstractSequenceGeneratorModuleFactory {
-
-}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/initial/appc-sequence-generator.xml b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/initial/appc-sequence-generator.xml
deleted file mode 100644 (file)
index af586ac..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ============LICENSE_START=======================================================
-  ONAP : APP-C
-  ================================================================================
-  Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
-  ================================================================================
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-  
-       http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  ============LICENSE_END=========================================================
-  -->
-
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<snapshot>
-    <configuration>
-        <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
-            <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-                <module>
-                
-                    <!-- This xmlns:prefix should match the namespace in the *-impl.yang file
-                         The prefix: inside type should match the prefix of the yang file. -->
-                    <type xmlns:prefix="org:onap:appc:sequencegenerator:impl">
-                        prefix:sequence-generator-impl
-                    </type>
-                    <name>sequence-generator-impl</name>
-
-                    <!--  The following sections contain bindings to services defined in the
-                          *-impl yang file. For example the rpc-registry is required
-                          because we have a dependency (or augmentation) named "rpc-registry"
-                          and which binds to the md-sa-binding-registry. If you remove those
-                          dependencies from the yang file then you can remove them from here. -->
-                    <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">
-                            binding:binding-notification-service
-                        </type>
-                        <name>binding-notification-broker</name>
-                    </notification-service>
-                </module>
-
-            </modules>
-        </data>
-
-    </configuration>
-
-    <!--  Required capabilities are basically a listing of all modules that need to be imported before
-          our service can be resolved. Capabilities for dependencies defined above are implied which is
-          why we do not have define a required capability for the data broker, for example. -->
-    <required-capabilities>
-        <capability>org:onap:appc:sequencegenerator:impl?module=sequence-generator-impl&amp;revision=2017-07-06</capability>
-    </required-capabilities>
-
-</snapshot>
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ============LICENSE_START=======================================================
-  ONAP : APP-C
+  ONAP : APPC
   ================================================================================
-  Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
+  Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   limitations under the License.
   ============LICENSE_END=========================================================
   -->
-
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
-           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+           odl:use-default-for-reference-types="true">
+
+    <reference id="dataBroker"
+               interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
+               odl:type="default" />
+
+    <reference id="notificationService"
+               interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"
+               odl:type="default" />
+
+    <reference id="rpcRegistry"
+               interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"
+               odl:type="default" />
+
+    <bean id="sequence-generator" class="org.onap.appc.provider.AppcProvider">
+        <argument ref="dataBroker" />
+        <argument ref="notificationService" />
+        <argument ref="rpcRegistry" />
+    </bean>
 
-    <bean id="sequenceGeneratorDGPlugin" class="org.onap.appc.seqgen.dgplugin.impl.SequenceGeneratorPluginImpl"/>
-    <service interface="org.onap.appc.seqgen.dgplugin.SequenceGeneratorPlugin" ref="sequenceGeneratorDGPlugin"/>
+    <odl:rpc-implementation ref="sequence-generator"/>
 
 </blueprint>
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/yang/sequence-generator.yang b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/yang/sequence-generator.yang
deleted file mode 100644 (file)
index 0122107..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-============LICENSE_START==========================================
-ONAP : APPC
-===================================================================
-Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
-===================================================================
-
-Unless otherwise specified, all software contained herein is licensed
-under the Apache License, Version 2.0 (the License);
-you may not use this software except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-ECOMP is a trademark and service mark of AT&T Intellectual Property.
-============LICENSE_END============================================
-*/
-
-module sequence-generator-impl {
-
-    yang-version 1;
-    namespace "org:onap:appc:sequencegenerator:impl";
-    prefix "sequence-generator-impl";
-
-    import config { prefix config; revision-date 2013-04-05; }
-    import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
-
-     description
-        "This module contains the base YANG definitions for
-        sequence-generator-impl implementation.";
-
-    revision "2017-07-06" {
-        description
-            "Initial revision.";
-    }
-
-    // This is the definition of the service implementation as a module identity.
-    identity sequence-generator-impl {
-            base config:module-type;
-
-            // Specifies the prefix for generated java classes.
-            config:java-name-prefix SequenceGenerator;
-    }
-
-    // Augments the 'configuration' choice node under modules/module.
-    // We consume the two main services, RPCs and DataStore
-    // Notification service is not used
-    augment "/config:modules/config:module/config:configuration" {
-        case sequence-generator-impl {
-            when "/config:modules/config:module/config:type = 'sequence-generator-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 mdsal:binding-notification-service;
-                                }
-                            }
-                        }
-
-            container data-broker {
-                uses config:service-ref {
-                    refine type {
-                        mandatory false;
-                        config:required-identity mdsal:binding-async-data-broker;
-                    }
-                }
-            }
-        }
-    }
-}
diff --git a/appc-sequence-generator/appc-sequence-generator-features/onap-appc-sequence-generator/src/main/feature/feature.xml b/appc-sequence-generator/appc-sequence-generator-features/onap-appc-sequence-generator/src/main/feature/feature.xml
deleted file mode 100644 (file)
index 9333307..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ============LICENSE_START=======================================================
-  ONAP : APPC
-  ================================================================================
-  Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
-  =============================================================================
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-  ============LICENSE_END=========================================================
-  -->
-<features name="onap-appc-sequence-generator" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
-    <feature name="onap-appc-sequence-generator" version="${project.version}">
-        <configfile finalname="etc/opendaylight/karaf/201-appc-sequence-generator.xml">
-                       mvn:org.onap.appc/appc-sequence-generator-bundle/${project.version}/xml/config</configfile>
-    </feature>
-</features>
\ No newline at end of file
index fff83fa..4347a66 100644 (file)
@@ -3,7 +3,7 @@
  ============LICENSE_START=======================================================
  ONAP : APPC
  ================================================================================
- Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
  ================================================================================
  Copyright (C) 2017 Amdocs
  =============================================================================
       <version>${project.version}</version>
     </dependency>
 
-    <dependency>
-      <groupId>org.onap.appc</groupId>
-      <artifactId>appc-sequence-generator-bundle</artifactId>
-      <classifier>config</classifier>
-      <version>${project.version}</version>
-      <type>xml</type>
-    </dependency>
-
     <dependency>
       <groupId>org.onap.appc</groupId>
       <artifactId>appc-sequence-generator-model</artifactId>
index 7510c1b..26c81a5 100644 (file)
@@ -2,7 +2,7 @@
   ============LICENSE_START=======================================================
   ONAP : APP-C
   ================================================================================
-  Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
+  Copyright (C) 2017-2019 AT&T Intellectual Property.  All rights reserved.
   ================================================================================
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
        </fileSets>
        
        <files>
-               <file>
-                       <source>../${feature-name}-bundle/src/main/resources/initial/${feature-name}.xml</source>
-                       <destName>./etc/opendaylight/karaf/201-${feature-name}.xml</destName>
-               </file>
        </files>
 
 </assembly>
index 146bae2..f0d0514 100644 (file)
@@ -51,6 +51,7 @@
             <plugin>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <artifactId>yang-maven-plugin</artifactId>
+                <version>${odl.yangtools.version}</version>
                 <dependencies>
                     <dependency>
                         <groupId>org.opendaylight.mdsal</groupId>
     <dependency>
       <groupId>org.opendaylight.mdsal.model</groupId>
       <artifactId>ietf-inet-types</artifactId>
+      <version>${odl.ietf-inet-types.version}</version>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.mdsal.model</groupId>
       <artifactId>ietf-yang-types</artifactId>
+      <version>${odl.ietf-yang-types.version}</version>
     </dependency>
   </dependencies>
 </project>