aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Brady <patrick.brady@att.com>2019-01-29 10:41:18 -0800
committerPatrick Brady <patrick.brady@att.com>2019-02-21 21:27:18 +0000
commitbb0e488a0487d05aa965b44569cfda040a2ab8ff (patch)
treee06ad18f8c3a45e0b8f80e93d54e7ba9c582a4f4
parenta6fbd20042f03a46084c2b068c21d1a691a7d836 (diff)
Change seq generator to blueprint
Change-Id: Ib46f149f3c4f7b838beb58f75bc20269ac945a3a Signed-off-by: Patrick Brady <patrick.brady@att.com> Issue-ID: APPC-1368
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/pom.xml63
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/sequencegenerator/impl/rev170706/SequenceGeneratorModule.java54
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/sequencegenerator/impl/rev170706/SequenceGeneratorModuleFactory.java36
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/initial/appc-sequence-generator.xml71
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/org/opendaylight/blueprint/sequence-generator-blueprint.xml (renamed from appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml)30
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/yang/sequence-generator.yang86
-rw-r--r--appc-sequence-generator/appc-sequence-generator-features/onap-appc-sequence-generator/src/main/feature/feature.xml27
-rw-r--r--appc-sequence-generator/appc-sequence-generator-installer/pom.xml10
-rw-r--r--appc-sequence-generator/appc-sequence-generator-installer/src/assembly/assemble_mvnrepo_zip.xml6
-rw-r--r--appc-sequence-generator/appc-sequence-generator-model/pom.xml3
10 files changed, 28 insertions, 358 deletions
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/pom.xml b/appc-sequence-generator/appc-sequence-generator-bundle/pom.xml
index cfbdbafb7..c460a36a2 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/pom.xml
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/pom.xml
@@ -55,69 +55,6 @@
</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
index 204408583..000000000
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/sequencegenerator/impl/rev170706/SequenceGeneratorModule.java
+++ /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
index 8705599fd..000000000
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/sequencegenerator/impl/rev170706/SequenceGeneratorModuleFactory.java
+++ /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
index af586ac22..000000000
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/initial/appc-sequence-generator.xml
+++ /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>
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/org/opendaylight/blueprint/sequence-generator-blueprint.xml
index 02f56dd4d..9d04a0608 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/resources/org/opendaylight/blueprint/sequence-generator-blueprint.xml
@@ -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.
@@ -18,12 +18,28 @@
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
index 0122107f5..000000000
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/yang/sequence-generator.yang
+++ /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
index 9333307c9..000000000
--- a/appc-sequence-generator/appc-sequence-generator-features/onap-appc-sequence-generator/src/main/feature/feature.xml
+++ /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
diff --git a/appc-sequence-generator/appc-sequence-generator-installer/pom.xml b/appc-sequence-generator/appc-sequence-generator-installer/pom.xml
index fff83fad1..4347a66db 100644
--- a/appc-sequence-generator/appc-sequence-generator-installer/pom.xml
+++ b/appc-sequence-generator/appc-sequence-generator-installer/pom.xml
@@ -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
=============================================================================
@@ -68,14 +68,6 @@
<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>
<version>${project.version}</version>
<!--<type>properties</type>-->
diff --git a/appc-sequence-generator/appc-sequence-generator-installer/src/assembly/assemble_mvnrepo_zip.xml b/appc-sequence-generator/appc-sequence-generator-installer/src/assembly/assemble_mvnrepo_zip.xml
index 7510c1be3..26c81a5db 100644
--- a/appc-sequence-generator/appc-sequence-generator-installer/src/assembly/assemble_mvnrepo_zip.xml
+++ b/appc-sequence-generator/appc-sequence-generator-installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -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.
@@ -44,10 +44,6 @@
</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>
diff --git a/appc-sequence-generator/appc-sequence-generator-model/pom.xml b/appc-sequence-generator/appc-sequence-generator-model/pom.xml
index 146bae2ef..f0d051474 100644
--- a/appc-sequence-generator/appc-sequence-generator-model/pom.xml
+++ b/appc-sequence-generator/appc-sequence-generator-model/pom.xml
@@ -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>
@@ -97,10 +98,12 @@
<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>