2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.rfc6241.model.api;
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ImmutableList;
12 import java.util.Collection;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
14 import org.opendaylight.yangtools.yang.common.QNameModule;
15 import org.opendaylight.yangtools.yang.common.Revision;
16 import org.opendaylight.yangtools.yang.common.XMLNamespace;
17 import org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier;
18 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
21 * Constants associated with RFC6241.
23 * @author Robert Varga
27 public final class NetconfConstants {
28 private static final String MODULE_NAME = "ietf-netconf";
29 private static final XMLNamespace MODULE_NAMESPACE =
30 XMLNamespace.of("urn:ietf:params:xml:ns:netconf:base:1.0").intern();
31 private static final Revision RFC6241_REVISION = Revision.of("2011-06-01");
34 * Runtime RFC6241 identity.
36 public static final QNameModule RFC6241_MODULE = QNameModule.create(MODULE_NAMESPACE, RFC6241_REVISION).intern();
39 * RFC6241 model source name.
41 public static final SourceIdentifier RFC6241_SOURCE = RevisionSourceIdentifier.create(MODULE_NAME,
45 * Normative prefix to use when importing {@link #RFC6241_SOURCE}.
47 public static final String MODULE_PREFIX = "nc";
49 private NetconfConstants() {
54 * Return identifiers of all sources known to define NACM extension.
56 * @return Collection of identifiers.
58 public static Collection<SourceIdentifier> knownModelSources() {
59 return ImmutableList.of(RFC6241_SOURCE);