<artifactId>hwvtepsouthbound-api</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>library-features</artifactId>
+ <type>xml</type>
+ <classifier>features</classifier>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
<repository>mvn:org.opendaylight.netconf/features-restconf/${restconf.version}/xml/features</repository>
<repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/${mdsal.model.version}/xml/features</repository>
<repository>mvn:org.opendaylight.dlux/features-dlux/${dlux.version}/xml/features</repository>
+ <repository>mvn:org.opendaylight.ovsdb/library-features/${project.version}/xml/features</repository>
<feature name='odl-ovsdb-hwvtepsouthbound-api' version='${project.version}' description='OpenDaylight :: hwvtepsouthbound :: api'>
<feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
<bundle>mvn:org.opendaylight.ovsdb/hwvtepsouthbound-api/${project.version}</bundle>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
<feature version='${project.version}'>odl-ovsdb-hwvtepsouthbound-api</feature>
<bundle>mvn:org.opendaylight.ovsdb/hwvtepsouthbound-impl/${project.version}</bundle>
+ <bundle>mvn:org.opendaylight.ovsdb/library/${project.version}</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson.version}</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version}</bundle>
<bundle>mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version}</bundle>
<bundle>mvn:com.fasterxml.jackson.datatype/jackson-datatype-json-org/${jackson.version}</bundle>
<bundle>wrap:mvn:org.json/json/${org.json.version}</bundle>
+ <feature version='${project.version}'>odl-ovsdb-library</feature>
<configfile finalname="${configfile.directory}/hwvtepsouthbound.xml">mvn:org.opendaylight.ovsdb/hwvtepsouthbound-impl/${project.version}/xml/config</configfile>
</feature>
<feature name='odl-ovsdb-hwvtepsouthbound-rest' version='${project.version}' description='OpenDaylight :: hwvtepsouthbound :: REST'>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
- <Private-Package>org.opendaylight.ovsdb.lib.*,org.opendaylight.ovsdb.schema.hardwarevtep</Private-Package>
- <Export-Package>org.opendaylight.ovsdb.hwvtepsouthbound.*,org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hwvtepsouthbound.impl.rev150901</Export-Package>
+ <Private-Package>org.opendaylight.ovsdb.schema.hardwarevtep</Private-Package>
+ <Export-Package>org.opendaylight.ovsdb.hwvtepsouthbound.*,org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hwvtepsouthbound.impl.rev150901.*</Export-Package>
</instructions>
</configuration>
</plugin>
<required-capabilities>
<!-- <capability>urn:opendaylight:params:xml:ns:yang:hwvtepsouthbound:impl?module=hwvtepsouthbound-impl&revision=2015-09-01</capability> -->
<capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28</capability>
+ <capability>urn:opendaylight:params:xml:ns:yang:library:impl?module=library&revision=2014-12-10</capability>
</required-capabilities>
<configuration>
<type xmlns:ns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:entity-ownership-service">ns:entity-ownership-service</type>
<name>entity-ownership-service</name>
</clustering-entity-ownership-service>
+ <connection-service>
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:library:impl">prefix:connection-service</type>
+ <name>connection-service</name>
+ </connection-service>
</module>
</modules>
</data>
private HwvtepDataChangeListener hwvtepDTListener;
public HwvtepSouthboundProvider(
- EntityOwnershipService entityOwnershipServiceDependency) {
+ EntityOwnershipService entityOwnershipServiceDependency,
+ OvsdbConnection ovsdbConnection) {
this.entityOwnershipService = entityOwnershipServiceDependency;
registration = null;
+ this.ovsdbConnection = ovsdbConnection;
+ LOG.info("HwvtepSouthboundProvider ovsdbConnectionService: {}", ovsdbConnection);
}
@Override
if (ownershipStateOpt.isPresent()) {
EntityOwnershipState ownershipState = ownershipStateOpt.get();
if (ownershipState.hasOwner() && !ownershipState.isOwner()) {
- if (ovsdbConnection == null) {
- ovsdbConnection = new OvsdbConnectionService();
- ovsdbConnection.registerConnectionListener(cm);
- ovsdbConnection.startOvsdbManager(HwvtepSouthboundConstants.DEFAULT_OVSDB_PORT);
- }
+ ovsdbConnection.registerConnectionListener(cm);
+ ovsdbConnection.startOvsdbManager(HwvtepSouthboundConstants.DEFAULT_OVSDB_PORT);
}
}
} catch (CandidateAlreadyRegisteredException e) {
} else {
LOG.info("*This* instance of HWVTEP southbound provider is set as a SLAVE instance");
}
- //TODO: How to make this co-exist with OvsdbSouthbound?
- if (ovsdbConnection == null) {
- ovsdbConnection = new OvsdbConnectionService();
- ovsdbConnection.registerConnectionListener(cm);
- ovsdbConnection.startOvsdbManager(HwvtepSouthboundConstants.DEFAULT_OVSDB_PORT);
- }
+ ovsdbConnection.registerConnectionListener(cm);
+ ovsdbConnection.startOvsdbManager(HwvtepSouthboundConstants.DEFAULT_OVSDB_PORT);
}
private class HwvtepsbPluginInstanceEntityOwnershipListener implements EntityOwnershipListener {
public java.lang.AutoCloseable createInstance() {
HwvtepSouthboundUtil.setInstanceIdentifierCodec(new InstanceIdentifierCodec(getSchemaServiceDependency(),
getBindingNormalizedNodeSerializerDependency()));
- HwvtepSouthboundProvider provider = new HwvtepSouthboundProvider(getClusteringEntityOwnershipServiceDependency());
+ HwvtepSouthboundProvider provider = new HwvtepSouthboundProvider(getClusteringEntityOwnershipServiceDependency(),
+ getConnectionServiceDependency());
getBrokerDependency().registerProvider(provider);
return provider;
}
import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
import opendaylight-entity-ownership-service {prefix eos; revision-date 2015-08-10;}
import opendaylight-md-sal-dom {prefix dom; revision-date 2013-10-28;}
+ import library { prefix library; revision-date 2014-12-10; }
description
"Service definition for hwvtepsouthbound project";
}
}
}
+ container connection-service {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity library:connection-service;
+ }
+ }
+ }
}
}
}