import org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceRpc;
import org.opendaylight.netconf.sal.connect.netconf.util.NetconfMessageTransformUtil;
import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.library.rev160409.ModulesState;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.library.rev160409.module.list.Module;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.library.rev160621.ModulesState;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.library.rev160621.module.list.Module;
import org.opendaylight.yangtools.util.xml.UntrustedXML;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.Revision;
static {
final ModuleInfoBackedContext moduleInfoBackedContext = ModuleInfoBackedContext.create();
moduleInfoBackedContext.registerModuleInfo(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang
- .library.rev160409.$YangModuleInfoImpl.getInstance());
+ .library.rev160621.$YangModuleInfoImpl.getInstance());
LIBRARY_CONTEXT = moduleInfoBackedContext.tryToCreateSchemaContext().get();
}
} catch (final IOException e) {
LOG.warn("Unable to download yang library from {}", url, e);
- return new LibraryModulesSchemas(Collections.<QName, URL>emptyMap());
+ return new LibraryModulesSchemas(Collections.emptyMap());
}
}
} catch (final ExecutionException e) {
LOG.warn("{}: Unable to detect available schemas, get to {} failed", deviceId,
MODULES_STATE_MODULE_LIST, e);
- return new LibraryModulesSchemas(Collections.<QName, URL>emptyMap());
+ return new LibraryModulesSchemas(Collections.emptyMap());
}
if (moduleListNodeResult.getErrors().isEmpty() == false) {
LOG.warn("{}: Unable to detect available schemas, get to {} failed, {}",
deviceId, MODULES_STATE_MODULE_LIST, moduleListNodeResult.getErrors());
- return new LibraryModulesSchemas(Collections.<QName, URL>emptyMap());
+ return new LibraryModulesSchemas(Collections.emptyMap());
}
}
LOG.warn("{}: Unable to detect available schemas, get to {} was empty", deviceId, toId(ModulesState.QNAME));
- return new LibraryModulesSchemas(Collections.<QName, URL>emptyMap());
+ return new LibraryModulesSchemas(Collections.emptyMap());
}
private static LibraryModulesSchemas create(final ContainerNode modulesStateNode) {
} catch (final IOException e) {
LOG.warn("Unable to download yang library from {}", url, e);
- return new LibraryModulesSchemas(Collections.<QName, URL>emptyMap());
+ return new LibraryModulesSchemas(Collections.emptyMap());
}
}
contentType.equals("application/json") ? readJson(in) : readXml(in);
if (!optionalModulesStateNode.isPresent()) {
- return new LibraryModulesSchemas(Collections.<QName, URL>emptyMap());
+ return new LibraryModulesSchemas(Collections.emptyMap());
}
final NormalizedNode<?, ?> modulesStateNode = optionalModulesStateNode.get();
return new LibraryModulesSchemas(schemasMapping.build());
} catch (final IOException e) {
LOG.warn("Unable to download yang library from {}", connection.getURL(), e);
- return new LibraryModulesSchemas(Collections.<QName, URL>emptyMap());
+ return new LibraryModulesSchemas(Collections.emptyMap());
}
}
: QName.create(URI.create(moduleNameSpace), moduleName);
try {
- return Optional.<Map.Entry<QName, URL>>of(new AbstractMap.SimpleImmutableEntry<>(
+ return Optional.of(new AbstractMap.SimpleImmutableEntry<>(
moduleQName, new URL(schemaUriAsString.get())));
} catch (final MalformedURLException e) {
LOG.warn("Skipping library schema for {}. URL {} representing yang schema resource is not valid",