diff options
author | Maros Marsalek <mmarsale@cisco.com> | 2016-10-19 15:32:57 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-10-20 14:20:55 +0000 |
commit | 85fd3da7efba703d473c8120c1680b65be28f565 (patch) | |
tree | 706a6cf95318412ba0e8d28f928daccb7357c6e8 /infra/minimal-distribution/src/main/java/io | |
parent | db9ce3d32c794b0cfa78fc5b3c8d5efcd0bd4532 (diff) |
HONEYCOMB-261 Make ModificationDiff schema aware
to check presence statement on containers for starters
+ update all checks in ModificationDiff to be performed on schema
instead of data
Change-Id: I6ec1a0f9e1ca821ef9f6835072d075dd0994bdb6
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'infra/minimal-distribution/src/main/java/io')
2 files changed, 9 insertions, 2 deletions
diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/ModifiableDTDelegProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/ModifiableDTDelegProvider.java index edd4faadb..6fd7ac98c 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/ModifiableDTDelegProvider.java +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/data/ModifiableDTDelegProvider.java @@ -26,6 +26,7 @@ import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; import io.fd.honeycomb.translate.write.registry.WriterRegistryBuilder; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; +import org.opendaylight.controller.sal.core.api.model.SchemaService; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; public final class ModifiableDTDelegProvider extends ProviderTrait<ModifiableDataManager> { @@ -33,6 +34,8 @@ public final class ModifiableDTDelegProvider extends ProviderTrait<ModifiableDat @Inject private BindingToNormalizedNodeCodec serializer; @Inject + private SchemaService schemaService; + @Inject @Named(ConfigAndOperationalPipelineModule.HONEYCOMB_CONFIG) private DataTree dataTree; @Inject @@ -43,7 +46,7 @@ public final class ModifiableDTDelegProvider extends ProviderTrait<ModifiableDat @Override protected ModifiableDataTreeDelegator create() { - return new ModifiableDataTreeDelegator(serializer, dataTree, + return new ModifiableDataTreeDelegator(serializer, dataTree, schemaService.getGlobalContext(), ((WriterRegistryBuilder) registry).build(), contextBroker); } } diff --git a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.java b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.java index 8da9d75be..3579ff11d 100644 --- a/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.java +++ b/infra/minimal-distribution/src/main/java/io/fd/honeycomb/infra/distro/initializer/ModifiableDTDelegInitProvider.java @@ -26,6 +26,7 @@ import io.fd.honeycomb.infra.distro.data.context.ContextPipelineModule; import io.fd.honeycomb.translate.util.write.NoopWriterRegistry; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec; +import org.opendaylight.controller.sal.core.api.model.SchemaService; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; public final class ModifiableDTDelegInitProvider extends ProviderTrait<ModifiableDataManager> { @@ -38,9 +39,12 @@ public final class ModifiableDTDelegInitProvider extends ProviderTrait<Modifiabl @Inject @Named(ContextPipelineModule.HONEYCOMB_CONTEXT) private DataBroker contextBroker; + @Inject + private SchemaService schemaService; @Override public ModifiableDataTreeDelegator create() { - return new ModifiableDataTreeDelegator(serializer, dataTree, new NoopWriterRegistry(), contextBroker); + return new ModifiableDataTreeDelegator(serializer, dataTree, schemaService.getGlobalContext(), + new NoopWriterRegistry(), contextBroker); } } |