gbp-ise-adapter:gbp-ise-adapter-impl
</type>
<name>gbp-ise-adapter</name>
-
- <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>
- <broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
- <name>binding-osgi-broker</name>
- </broker>
</module>
</modules>
</data>
--- /dev/null
+/*
+ * Copyright (c) 2016 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
+ */
+
+package org.opendaylight.controller.config.yang.config.groupbasedpolicy.gbp_ise_adapter;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+import org.opendaylight.groupbasedpolicy.gbp_ise_adapter.impl.GbpIseAdapterProvider;
+
+public class GbpIseAdapterProviderInstance implements AutoCloseable{
+
+ private GbpIseAdapterProvider iseAdapterProvider;
+
+ public GbpIseAdapterProviderInstance(DataBroker dataBroker, BindingAwareBroker broker) {
+ iseAdapterProvider = new GbpIseAdapterProvider(dataBroker, broker);
+ }
+
+ @Override
+ public void close() throws Exception {
+ iseAdapterProvider.close();
+ }
+
+}
package org.opendaylight.controller.config.yang.config.groupbasedpolicy.gbp_ise_adapter;
-import org.opendaylight.groupbasedpolicy.gbp_ise_adapter.impl.GbpIseAdapterProvider;
+import org.opendaylight.controller.sal.common.util.NoopAutoCloseable;
/**
* gbp-ise-adapter impl module
@Override
public java.lang.AutoCloseable createInstance() {
- return new GbpIseAdapterProvider(getDataBrokerDependency(), getBrokerDependency());
+ return NoopAutoCloseable.INSTANCE;
}
}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<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"/>
+ <reference id="broker" interface="org.opendaylight.controller.sal.binding.api.BindingAwareBroker"/>
+
+ <bean id="gbpIseAdapter" class="org.opendaylight.controller.config.yang.config.groupbasedpolicy.gbp_ise_adapter.GbpIseAdapterProviderInstance"
+ destroy-method="close">
+ <argument ref="dataBroker"/>
+ <argument ref="broker"/>
+ </bean>
+</blueprint>
\ No newline at end of file
augment "/config:modules/config:module/config:configuration" {
case gbp-ise-adapter-impl {
when "/config:modules/config:module/config:type = 'gbp-ise-adapter-impl'";
-
- //wires in the data-broker service
- container data-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity mdsal:binding-async-data-broker;
- }
- }
- }
-
- container broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity mdsal:binding-broker-osgi-registry;
- }
- }
- }
-
}
}
}