Replace following deprecated API
1) NotificationProviderService replaced with NotificationPublishService
2) InstanceIdentifier<T> toInstance() replace with build()
3) setProperties replaced with setYangMappingProperties
Change-Id: I89fba42e88363c5e1e5b23fe272d2754361aee25
Issue-Id: SDNC-89
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
input = new FileInputStream(propFile);
properties.load(input);
LOG.info("Loaded properties from " + propFileName );
input = new FileInputStream(propFile);
properties.load(input);
LOG.info("Loaded properties from " + propFileName );
- setProperties(properties);
+ setYangMappingProperties(properties);
} catch (Exception e) {
LOG.error("Failed to load properties " + propFileName +"\n",e);
} finally {
} catch (Exception e) {
LOG.error("Failed to load properties " + propFileName +"\n",e);
} finally {
import org.opendaylight.controller.md.sal.common.api.data.OptimisticLockFailedException;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
import org.opendaylight.controller.md.sal.common.api.data.OptimisticLockFailedException;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
+import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
import org.opendaylight.yang.gen.v1.org.onap.sdnctl.vnf.rev150720.NetworkTopologyOperationInput;
import org.opendaylight.yang.gen.v1.org.onap.sdnctl.vnf.rev150720.NetworkTopologyOperationInputBuilder;
import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
import org.opendaylight.yang.gen.v1.org.onap.sdnctl.vnf.rev150720.NetworkTopologyOperationInput;
import org.opendaylight.yang.gen.v1.org.onap.sdnctl.vnf.rev150720.NetworkTopologyOperationInputBuilder;
private ListenerRegistration<DataChangeListener> dclServices;
protected DataBroker dataBroker;
private ListenerRegistration<DataChangeListener> dclServices;
protected DataBroker dataBroker;
- protected NotificationProviderService notificationService;
+ protected NotificationPublishService notificationService;
protected RpcProviderRegistry rpcRegistry;
protected BindingAwareBroker.RpcRegistration<VNFAPIService> rpcRegistration;
protected RpcProviderRegistry rpcRegistry;
protected BindingAwareBroker.RpcRegistration<VNFAPIService> rpcRegistration;
- public vnfapiProvider(DataBroker dataBroker2,
- NotificationProviderService notificationProviderService,
+ public vnfapiProvider(DataBroker dataBroker2, NotificationPublishService notificationPublishService,
RpcProviderRegistry rpcProviderRegistry) {
this.log.info( "Creating provider for " + appName );
executor = Executors.newFixedThreadPool(1);
dataBroker = dataBroker2;
RpcProviderRegistry rpcProviderRegistry) {
this.log.info( "Creating provider for " + appName );
executor = Executors.newFixedThreadPool(1);
dataBroker = dataBroker2;
- notificationService = notificationProviderService;
+ notificationService = notificationPublishService;
rpcRegistry = rpcProviderRegistry;
initialize();
rpcRegistry = rpcProviderRegistry;
initialize();
// See if any data exists yet for this siid, if so grab it.
InstanceIdentifier serviceInstanceIdentifier =
InstanceIdentifier.<Vnfs>builder(Vnfs.class)
// See if any data exists yet for this siid, if so grab it.
InstanceIdentifier serviceInstanceIdentifier =
InstanceIdentifier.<Vnfs>builder(Vnfs.class)
- .child(VnfList.class, new VnfListKey(siid)).toInstance();
+ .child(VnfList.class, new VnfListKey(siid)).build();
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VnfList> data = null;
try {
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VnfList> data = null;
try {
// See if any data exists yet for this siid, if so grab it.
InstanceIdentifier vnfInstanceIdentifier =
InstanceIdentifier.<VnfInstances>builder(VnfInstances.class)
// See if any data exists yet for this siid, if so grab it.
InstanceIdentifier vnfInstanceIdentifier =
InstanceIdentifier.<VnfInstances>builder(VnfInstances.class)
- .child(VnfInstanceList.class, new VnfInstanceListKey(siid)).toInstance();
+ .child(VnfInstanceList.class, new VnfInstanceListKey(siid)).build();
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VnfInstanceList> data = null;
try {
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VnfInstanceList> data = null;
try {
// See if any data exists yet for this siid, if so grab it.
InstanceIdentifier vfModuleIdentifier =
InstanceIdentifier.<VfModules>builder(VfModules.class)
// See if any data exists yet for this siid, if so grab it.
InstanceIdentifier vfModuleIdentifier =
InstanceIdentifier.<VfModules>builder(VfModules.class)
- .child(VfModuleList.class, new VfModuleListKey(siid)).toInstance();
+ .child(VfModuleList.class, new VfModuleListKey(siid)).build();
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VfModuleList> data = null;
try {
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VfModuleList> data = null;
try {
// See if any data exists yet for this name/type, if so grab it.
InstanceIdentifier preloadInstanceIdentifier =
InstanceIdentifier.<PreloadVnfs>builder(PreloadVnfs.class)
// See if any data exists yet for this name/type, if so grab it.
InstanceIdentifier preloadInstanceIdentifier =
InstanceIdentifier.<PreloadVnfs>builder(PreloadVnfs.class)
- .child(VnfPreloadList.class, new VnfPreloadListKey(preload_name, preload_type)).toInstance();
+ .child(VnfPreloadList.class, new VnfPreloadListKey(preload_name, preload_type)).build();
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VnfPreloadList> data = null;
try {
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VnfPreloadList> data = null;
try {
// See if any data exists yet for this name/type, if so grab it.
InstanceIdentifier preloadInstanceIdentifier =
InstanceIdentifier.<PreloadVnfInstances>builder(PreloadVnfInstances.class)
// See if any data exists yet for this name/type, if so grab it.
InstanceIdentifier preloadInstanceIdentifier =
InstanceIdentifier.<PreloadVnfInstances>builder(PreloadVnfInstances.class)
- .child(VnfInstancePreloadList.class, new VnfInstancePreloadListKey(preload_name, preload_type)).toInstance();
+ .child(VnfInstancePreloadList.class, new VnfInstancePreloadListKey(preload_name, preload_type)).build();
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VnfInstancePreloadList> data = null;
try {
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VnfInstancePreloadList> data = null;
try {
// See if any data exists yet for this name/type, if so grab it.
InstanceIdentifier preloadInstanceIdentifier =
InstanceIdentifier.<PreloadVfModules>builder(PreloadVfModules.class)
// See if any data exists yet for this name/type, if so grab it.
InstanceIdentifier preloadInstanceIdentifier =
InstanceIdentifier.<PreloadVfModules>builder(PreloadVfModules.class)
- .child(VfModulePreloadList.class, new VfModulePreloadListKey(preload_name, preload_type)).toInstance();
+ .child(VfModulePreloadList.class, new VfModulePreloadListKey(preload_name, preload_type)).build();
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VfModulePreloadList> data = null;
try {
ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction();
Optional<VfModulePreloadList> data = null;
try {
InstanceIdentifier.InstanceIdentifierBuilder<VnfList> vnfListIdBuilder =
InstanceIdentifier.<Vnfs>builder(Vnfs.class)
.child(VnfList.class, entry.getKey());
InstanceIdentifier.InstanceIdentifierBuilder<VnfList> vnfListIdBuilder =
InstanceIdentifier.<Vnfs>builder(Vnfs.class)
.child(VnfList.class, entry.getKey());
- InstanceIdentifier<VnfList> path = vnfListIdBuilder.toInstance();
+ InstanceIdentifier<VnfList> path = vnfListIdBuilder.build();
int tries = 2;
while(true) {
int tries = 2;
while(true) {
InstanceIdentifier.InstanceIdentifierBuilder<VnfList> vnfListIdBuilder =
InstanceIdentifier.<Vnfs>builder(Vnfs.class)
.child(VnfList.class, entry.getKey());
InstanceIdentifier.InstanceIdentifierBuilder<VnfList> vnfListIdBuilder =
InstanceIdentifier.<Vnfs>builder(Vnfs.class)
.child(VnfList.class, entry.getKey());
- InstanceIdentifier<VnfList> path = vnfListIdBuilder.toInstance();
+ InstanceIdentifier<VnfList> path = vnfListIdBuilder.build();
int tries = 2;
while (true) {
int tries = 2;
while (true) {
InstanceIdentifier.InstanceIdentifierBuilder<VnfInstanceList> vnfInstanceListIdBuilder =
InstanceIdentifier.<VnfInstances>builder(VnfInstances.class)
.child(VnfInstanceList.class, entry.getKey());
InstanceIdentifier.InstanceIdentifierBuilder<VnfInstanceList> vnfInstanceListIdBuilder =
InstanceIdentifier.<VnfInstances>builder(VnfInstances.class)
.child(VnfInstanceList.class, entry.getKey());
- InstanceIdentifier<VnfInstanceList> path = vnfInstanceListIdBuilder.toInstance();
+ InstanceIdentifier<VnfInstanceList> path = vnfInstanceListIdBuilder.build();
int tries = 2;
while(true) {
int tries = 2;
while(true) {
InstanceIdentifier.InstanceIdentifierBuilder<VfModuleList> vfModuleListIdBuilder =
InstanceIdentifier.<VfModules>builder(VfModules.class)
.child(VfModuleList.class, entry.getKey());
InstanceIdentifier.InstanceIdentifierBuilder<VfModuleList> vfModuleListIdBuilder =
InstanceIdentifier.<VfModules>builder(VfModules.class)
.child(VfModuleList.class, entry.getKey());
- InstanceIdentifier<VfModuleList> path = vfModuleListIdBuilder.toInstance();
+ InstanceIdentifier<VfModuleList> path = vfModuleListIdBuilder.build();
int tries = 2;
while(true) {
int tries = 2;
while(true) {
InstanceIdentifier.InstanceIdentifierBuilder<VnfPreloadList> vnfListIdBuilder =
InstanceIdentifier.<PreloadVnfs>builder(PreloadVnfs.class)
.child(VnfPreloadList.class, entry.getKey());
InstanceIdentifier.InstanceIdentifierBuilder<VnfPreloadList> vnfListIdBuilder =
InstanceIdentifier.<PreloadVnfs>builder(PreloadVnfs.class)
.child(VnfPreloadList.class, entry.getKey());
- InstanceIdentifier<VnfPreloadList> path = vnfListIdBuilder.toInstance();
+ InstanceIdentifier<VnfPreloadList> path = vnfListIdBuilder.build();
int tries = 2;
while(true) {
try {
int tries = 2;
while(true) {
try {
InstanceIdentifier.InstanceIdentifierBuilder<VnfInstancePreloadList> vnfInstanceListIdBuilder =
InstanceIdentifier.<PreloadVnfInstances>builder(PreloadVnfInstances.class)
.child(VnfInstancePreloadList.class, entry.getKey());
InstanceIdentifier.InstanceIdentifierBuilder<VnfInstancePreloadList> vnfInstanceListIdBuilder =
InstanceIdentifier.<PreloadVnfInstances>builder(PreloadVnfInstances.class)
.child(VnfInstancePreloadList.class, entry.getKey());
- InstanceIdentifier<VnfInstancePreloadList> path = vnfInstanceListIdBuilder.toInstance();
+ InstanceIdentifier<VnfInstancePreloadList> path = vnfInstanceListIdBuilder.build();
int tries = 2;
while(true) {
try {
int tries = 2;
while(true) {
try {
InstanceIdentifier.InstanceIdentifierBuilder<VfModulePreloadList> vfModuleListIdBuilder =
InstanceIdentifier.<PreloadVfModules>builder(PreloadVfModules.class)
.child(VfModulePreloadList.class, entry.getKey());
InstanceIdentifier.InstanceIdentifierBuilder<VfModulePreloadList> vfModuleListIdBuilder =
InstanceIdentifier.<PreloadVfModules>builder(PreloadVfModules.class)
.child(VfModulePreloadList.class, entry.getKey());
- InstanceIdentifier<VfModulePreloadList> path = vfModuleListIdBuilder.toInstance();
+ InstanceIdentifier<VfModulePreloadList> path = vfModuleListIdBuilder.build();
int tries = 2;
while(true) {
try {
int tries = 2;
while(true) {
try {
@Override
public java.lang.AutoCloseable createInstance() {
final vnfapiProvider provider = new vnfapiProvider(getDataBrokerDependency()
@Override
public java.lang.AutoCloseable createInstance() {
final vnfapiProvider provider = new vnfapiProvider(getDataBrokerDependency()
- , getNotificationServiceDependency()
+ , getNotificationPublishAdapterDependency()
, getRpcRegistryDependency());
return new AutoCloseable() {
, getRpcRegistryDependency());
return new AutoCloseable() {
</data-broker>
<notification-service>
</data-broker>
<notification-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">
- binding:binding-notification-service
- </type>
+ <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
+ binding:binding-new-notification-publish-service
+ </type>
<name>binding-notification-broker</name>
</notification-service>
</module>
<name>binding-notification-broker</name>
</notification-service>
</module>
import config { prefix config; revision-date 2013-04-05; }
import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
import config { prefix config; revision-date 2013-04-05; }
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
description
"This module contains the base YANG definitions for
- container notification-service {
+ container notification-publish-adapter {
uses config:service-ref {
refine type {
mandatory true;
uses config:service-ref {
refine type {
mandatory true;
- config:required-identity mdsal:binding-notification-service;
+ config:required-identity binding-impl:binding-new-notification-publish-service;