summaryrefslogtreecommitdiffstats
path: root/v3po/translate-impl
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-06-08 20:51:32 +0200
committerMaros Marsalek <mmarsale@cisco.com>2016-06-09 18:24:23 +0200
commit625b421f3c28e0457f039017b1160662d622f4bc (patch)
tree05ae48d1bf8963fcdf001c060662a0bc648ef5db /v3po/translate-impl
parentfb65fe09c385a898743a0cc7f480fcc16676526e (diff)
HONEYCOMB-62: Add Ip readers
+ Fix 1 interface reads. Interface reader worked only if GET interfaces-state was executed + Fix readSubtree for augmentations. Comoposite readers did not check child readers for augmentations, only direct children. Change-Id: I2bc433e3e5785453062ab262b9edabc72c333bf0 Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/translate-impl')
-rw-r--r--v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/AbstractCompositeReader.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/AbstractCompositeReader.java b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/AbstractCompositeReader.java
index f026d4f92..afd979167 100644
--- a/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/AbstractCompositeReader.java
+++ b/v3po/translate-impl/src/main/java/io/fd/honeycomb/v3po/translate/impl/read/AbstractCompositeReader.java
@@ -141,10 +141,14 @@ abstract class AbstractCompositeReader<D extends DataObject, B extends Builder<D
LOG.debug("{}: Reading subtree: {}", this, id);
final Class<? extends DataObject> next = RWUtils.getNextId(id, getManagedDataObjectType()).getType();
final ChildReader<? extends ChildOf<D>> reader = childReaders.get(next);
+ final ChildReader<? extends Augmentation<D>> augReader = augReaders.get(next);
if (reader != null) {
LOG.debug("{}: Reading subtree: {} from: {}", this, id, reader);
return reader.read(id, ctx);
+ }if (augReader != null) {
+ LOG.debug("{}: Reading subtree: {} from: {}", this, id, augReader);
+ return augReader.read(id, ctx);
} else {
LOG.debug("{}: Dedicated subtree reader missing for: {}. Reading current and filtering", this, next);
// If there's no dedicated reader, use read current