diff options
author | Patrick Brady <patrick.brady@att.com> | 2019-01-29 14:05:31 -0800 |
---|---|---|
committer | Patrick Brady <patrick.brady@att.com> | 2019-02-21 13:41:21 -0800 |
commit | 226dd2c5d5988e90cb0c797d250315b3b92e735c (patch) | |
tree | 709aba1071a4cf56f09e913684c9b69d514bea25 | |
parent | c664d0a97c54ace8ea531ccfb2e8b65d59d934d5 (diff) |
Change dg-mdsal to blueprint
Change-Id: I8f9978dce4e7f483a35a338f8c57b854a7c5b29e
Signed-off-by: Patrick Brady <patrick.brady@att.com>
Issue-ID: APPC-1368
6 files changed, 45 insertions, 322 deletions
diff --git a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/pom.xml b/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/pom.xml index 9947340e6..09783a98a 100644 --- a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/pom.xml +++ b/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/pom.xml @@ -57,75 +57,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-mdsal-store.xml</file> - <type>xml</type> - <classifier>config</classifier> - </artifact> - </artifacts> - </configuration> - </execution> - </executions> - </plugin> </plugins> </build> diff --git a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/mdsal/store/impl/rev170925/MdsalStoreProviderModule.java b/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/mdsal/store/impl/rev170925/MdsalStoreProviderModule.java deleted file mode 100644 index 0b2b902ea..000000000 --- a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/mdsal/store/impl/rev170925/MdsalStoreProviderModule.java +++ /dev/null @@ -1,57 +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.mdsal.store.impl.rev170925; - -import org.onap.appc.mdsal.provider.MdsalStoreProvider; - -public class MdsalStoreProviderModule extends org.opendaylight.yang.gen.v1.org.onap.appc.mdsal.store.impl.rev170925.AbstractMdsalStoreProviderModule { - public MdsalStoreProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public MdsalStoreProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.org.onap.appc.mdsal.store.impl.rev170925.MdsalStoreProviderModule 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() { - MdsalStoreProvider provider = new MdsalStoreProvider(getDataBrokerDependency() - ,getNotificationServiceDependency() - ,getRpcRegistryDependency()); - - return new AutoCloseable() { - - @Override - public void close() throws Exception { - provider.close(); - } - }; - } - -} diff --git a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/mdsal/store/impl/rev170925/MdsalStoreProviderModuleFactory.java b/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/mdsal/store/impl/rev170925/MdsalStoreProviderModuleFactory.java deleted file mode 100644 index 0ab7e4ccf..000000000 --- a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/java/org/opendaylight/yang/gen/v1/org/onap/appc/mdsal/store/impl/rev170925/MdsalStoreProviderModuleFactory.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: mdsal-store-impl yang module local name: mdsal-store-impl -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Tue Sep 26 15:55:55 IST 2017 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.yang.gen.v1.org.onap.appc.mdsal.store.impl.rev170925; -public class MdsalStoreProviderModuleFactory extends org.opendaylight.yang.gen.v1.org.onap.appc.mdsal.store.impl.rev170925.AbstractMdsalStoreProviderModuleFactory { - -} diff --git a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/resources/initial/appc-mdsal-store.xml b/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/resources/initial/appc-mdsal-store.xml deleted file mode 100644 index b0211db1b..000000000 --- a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/resources/initial/appc-mdsal-store.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ============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========================================================= - --> - -<!-- 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:mdsal:store:impl"> - prefix:mdsal-store-impl - </type> - <name>mdsal-store-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:mdsal:store:impl?module=mdsal-store-impl&revision=2017-09-25</capability> - </required-capabilities> - -</snapshot> diff --git a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/resources/org/opendaylight/blueprint/dg-mdsal-blueprint.xml b/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/resources/org/opendaylight/blueprint/dg-mdsal-blueprint.xml new file mode 100644 index 000000000..fa841a638 --- /dev/null +++ b/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/resources/org/opendaylight/blueprint/dg-mdsal-blueprint.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + ONAP : APPC + ================================================================================ + 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. + 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========================================================= + --> +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" + 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="mdsal-store" class="org.onap.appc.mdsal.provider.MdsalStoreProvider"> + <argument ref="dataBroker" /> + <argument ref="notificationService" /> + <argument ref="rpcRegistry" /> + </bean> + + <odl:rpc-implementation ref="mdsal-store"/> + +</blueprint> diff --git a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/yang/mdsal-store.yang b/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/yang/mdsal-store.yang deleted file mode 100644 index 67cd7212b..000000000 --- a/appc-dg/appc-dg-shared/appc-dg-mdsal-store/appc-dg-mdsal-bundle/src/main/yang/mdsal-store.yang +++ /dev/null @@ -1,86 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP : APPC - * ================================================================================ - * Copyright (C) 2017 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. - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - * ============LICENSE_END========================================================= - */ - -module mdsal-store-impl { - - yang-version 1; - namespace "org:onap:appc:mdsal:store:impl"; - prefix mdsal-store-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 - mdsal-store-impl implementation."; - - revision "2017-09-25" { - description - "Initial revision."; - } - - // This is the definition of the service implementation as a module identity. - identity mdsal-store-impl { - base config:module-type; - - // Specifies the prefix for generated java classes. - config:java-name-prefix MdsalStoreProvider; - } - - // 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 mdsal-store-impl { - when "/config:modules/config:module/config:type = 'mdsal-store-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; - } - } - } - } - } -} |