diff options
author | 2016-04-13 10:44:12 +0200 | |
---|---|---|
committer | 2016-04-13 12:17:44 +0200 | |
commit | 036a3589cfc1a62eddb49dc9cf09b7949c313f9b (patch) | |
tree | 6c9dfeba3743aabeccd18d5d7aede1e1722a5bac /v3po/impl/src/main/java/org/opendaylight/yang | |
parent | d98b39ae51b94b5442718c668c4a5353e79e3c0c (diff) |
HONEYCOMB-9: Remove initial Honeycomb pipeline
+ Rewire global restconf to only serve VPP requests
+ Remove artificial Honeycomb mountpoint
Change-Id: I90738123e46a9fb29db19ee09fd139b57cd8af10
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/impl/src/main/java/org/opendaylight/yang')
-rw-r--r-- | v3po/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModule.java | 76 |
1 files changed, 12 insertions, 64 deletions
diff --git a/v3po/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModule.java b/v3po/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModule.java index 697213b3c..b22ece04f 100644 --- a/v3po/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModule.java +++ b/v3po/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/v3po/impl/rev141210/V3poModule.java @@ -16,21 +16,10 @@ package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210; -import io.fd.honeycomb.v3po.impl.V3poProvider; -import java.util.Collection; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; -import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction; +import io.fd.honeycomb.v3po.impl.NetconfFacadeHoneycombBindingBroker; +import org.opendaylight.controller.sal.core.api.AbstractProvider; import org.opendaylight.controller.sal.core.api.Broker; -import org.opendaylight.controller.sal.core.api.Provider; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.BridgeDomains; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.bridge.domains.BridgeDomain; -import org.opendaylight.yangtools.yang.common.QName; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.impl.schema.Builders; +import org.opendaylight.controller.sal.core.api.model.SchemaService; public class V3poModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210.AbstractV3poModule { @@ -54,58 +43,17 @@ public class V3poModule extends @Override public java.lang.AutoCloseable createInstance() { - final Broker domBroker = getDomBrokerDependency(); - domBroker.registerProvider(new InitializationProvider()); - final V3poProvider provider = new V3poProvider(domBroker, getVppJapiDependency(), getSerializerDependency(), - getDomDataBrokerDependency()); - getBrokerDependency().registerProvider(provider); - return provider; - } - - /** - * Writes list parents as a workaround for ODL issue TODO remove (also remove from yang model and cfg) and fix ODL - * bug-5382 - */ - private class InitializationProvider implements Provider { - @Override - public void onSessionInitiated(final Broker.ProviderSession providerSession) { - final DOMDataBroker service = providerSession.getService(DOMDataBroker.class); - final DOMDataWriteTransaction domDataWriteTransaction = service.newWriteOnlyTransaction(); - - // Initialize interfaces list - YangInstanceIdentifier.NodeIdentifier nodeId = getNodeId(Interfaces.QNAME); - YangInstanceIdentifier interfacesYid = YangInstanceIdentifier.create(nodeId); - domDataWriteTransaction.merge(LogicalDatastoreType.CONFIGURATION, - interfacesYid, Builders.containerBuilder().withNodeIdentifier(nodeId) - .withChild(Builders.mapBuilder().withNodeIdentifier(getNodeId(Interface.QNAME)).build()) - .build()); - - // Initialize bridge domains list - nodeId = getNodeId(BridgeDomains.QNAME); - interfacesYid = YangInstanceIdentifier.create(getNodeId( - org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.Vpp.QNAME), nodeId); - domDataWriteTransaction.merge(LogicalDatastoreType.CONFIGURATION, - interfacesYid, Builders.containerBuilder().withNodeIdentifier(nodeId) - .withChild(Builders.mapBuilder().withNodeIdentifier(getNodeId(BridgeDomain.QNAME)).build()) - .build()); + final Broker.ProviderSession providerSession = + getDomBrokerDependency().registerProvider(new AbstractProvider() { + @Override + public void onSessionInitiated(final Broker.ProviderSession providerSession) { + // NOOP + } + }); + final SchemaService schemaBiService = providerSession.getService(SchemaService.class); - try { - domDataWriteTransaction.submit().checkedGet(); - } catch (TransactionCommitFailedException e) { - throw new IllegalStateException("Unable to initialize parent data structures", e); - } - } - - private YangInstanceIdentifier.NodeIdentifier getNodeId(final QName qname) { - return new YangInstanceIdentifier.NodeIdentifier(qname); - } - - @Override - public Collection<ProviderFunctionality> getProviderFunctionality() { - return null; - } + return new NetconfFacadeHoneycombBindingBroker(getHoneycombDomDataBrokerDependency(), schemaBiService); } - } |