diff options
author | 2016-03-04 12:32:10 +0100 | |
---|---|---|
committer | 2016-03-21 09:05:29 +0000 | |
commit | 08c7806335dfa24246210329630efafea3c151ea (patch) | |
tree | 8c7972d1556cd137c5e99c7614c2d6426714f53a /v3po/impl/src/main/java/org/opendaylight/yang | |
parent | f5667a352ef968b8c6f011cd21e6fdb5174006f8 (diff) |
API for dedicated data-tree for Honeycomb agent.
Data-tree allows for better control over data processing
(commit refusal, change processing ordering, additional
validation etc.) than data-store (previous design).
Change-Id: Id165df33da179ed925b2187fe247b2d6f672af43
Signed-off-by: Marek Gradzki <mgradzki@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 | 42 |
1 files changed, 27 insertions, 15 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 0805452c5..f51eb0575 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 @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210; import io.fd.honeycomb.v3po.impl.V3poProvider; @@ -25,30 +26,39 @@ 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; 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.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class V3poModule extends + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210.AbstractV3poModule { -public class V3poModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210.AbstractV3poModule { - public V3poModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { + private static final Logger LOG = LoggerFactory.getLogger(V3poModule.class); + + public V3poModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, + org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { super(identifier, dependencyResolver); } - public V3poModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210.V3poModule oldModule, java.lang.AutoCloseable oldInstance) { + public V3poModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, + org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, + org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.impl.rev141210.V3poModule oldModule, + java.lang.AutoCloseable oldInstance) { super(identifier, dependencyResolver, oldModule, oldInstance); } @Override public void customValidation() { - // add custom validation form module attributes here. + // add custom validation form module attributes here.AbstractModule } @Override public java.lang.AutoCloseable createInstance() { - getDomBrokerDependency().registerProvider(new InitializationProvider()); + getDomBrokerDependency().registerProvider(new InitializationProvider()); V3poProvider provider = new V3poProvider(); getBrokerDependency().registerProvider(provider); @@ -56,8 +66,8 @@ public class V3poModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.pa } /** - * Writes list parents as a workaround for ODL issue - * TODO remove (also remove from yang model and cfg) and fix ODL bug-5382 + * 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 @@ -69,17 +79,18 @@ public class V3poModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.pa 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()); + 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(Vpp.QNAME), nodeId); + 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()); + interfacesYid, Builders.containerBuilder().withNodeIdentifier(nodeId) + .withChild(Builders.mapBuilder().withNodeIdentifier(getNodeId(BridgeDomain.QNAME)).build()) + .build()); try { domDataWriteTransaction.submit().checkedGet(); @@ -97,4 +108,5 @@ public class V3poModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.pa return null; } } + } |