summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
b429e04)
We seem to be facing a weird failure to look up augmentations, make
sure we report what is available.
Change-Id: Ifd9d27175bc90abfbba1a5e60935dc41cb01fc16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
dc3e4b5e8be164fd0c5332828c7d7a629f388a46)
import static java.util.Objects.requireNonNull;
import static java.util.Objects.requireNonNull;
+import com.google.common.collect.Collections2;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
private static AugmentationSchemaNode enterAugmentation(final AugmentationTarget target,
final AugmentationIdentifier id) throws IOException {
private static AugmentationSchemaNode enterAugmentation(final AugmentationTarget target,
final AugmentationIdentifier id) throws IOException {
- for (var augment : target.getAvailableAugmentations()) {
+ final var augs = target.getAvailableAugmentations();
+ for (var augment : augs) {
if (id.equals(augmentationIdentifierFrom(augment))) {
return augment;
}
}
if (id.equals(augmentationIdentifierFrom(augment))) {
return augment;
}
}
- throw new IOException("Cannot find augmentation " + id + " in " + target);
+ throw new IOException("Cannot find augmentation " + id + " in " + target + ", available: "
+ + Collections2.transform(augs, YangInstanceIdentifierWriter::augmentationIdentifierFrom));
}
// FIXME: duplicate of data.util.DataSchemaContextNode.augmentationIdentifierFrom()
}
// FIXME: duplicate of data.util.DataSchemaContextNode.augmentationIdentifierFrom()