From: Igor Foltin Date: Mon, 5 Jun 2017 13:18:31 +0000 (+0200) Subject: Bug 4640: Change semantic-version to openconfig-version X-Git-Tag: release/nitrogen~90 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=9ba2970f55594e4c2704b0c590bd92112e0441fb;p=yangtools.git Bug 4640: Change semantic-version to openconfig-version The concept of semantic version already exists in the openconfig-extensions YANG module in the form of openconfig-version extension. Rename the internal representation of semantic-version statement to openconfig-version in the yang-parser-impl module. Also adjust existing unit tests accordingly. Change-Id: Ie647bfce5c1a462e6d269103e55a13e08f163dc6 Signed-off-by: Igor Foltin --- diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/YangModelDependencyInfo.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/YangModelDependencyInfo.java index 3ce0b60fe4..0019afff70 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/YangModelDependencyInfo.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/impl/util/YangModelDependencyInfo.java @@ -256,7 +256,7 @@ public abstract class YangModelDependencyInfo { private static SemVer getSemanticVersion(final StatementContext statement, final String sourceName) { final List subStatements = statement.statement(); String semVerString = null; - final String semVerStmtName = SupportedExtensionsMapping.SEMANTIC_VERSION.getStatementName().getLocalName(); + final String semVerStmtName = SupportedExtensionsMapping.OPENCONFIG_VERSION.getStatementName().getLocalName(); for (final StatementContext subStatement : subStatements) { final String subStatementName = Utils.trimPrefix(subStatement.keyword().getText()); if (semVerStmtName.equals(subStatementName)) { diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ImportStatementDefinition.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ImportStatementDefinition.java index 77337197b9..42214a1fe9 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ImportStatementDefinition.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ImportStatementDefinition.java @@ -58,7 +58,7 @@ public class ImportStatementDefinition extends .builder(YangStmtMapping.IMPORT) .addMandatory(YangStmtMapping.PREFIX) .addOptional(YangStmtMapping.REVISION_DATE) - .addOptional(SupportedExtensionsMapping.SEMANTIC_VERSION) + .addOptional(SupportedExtensionsMapping.OPENCONFIG_VERSION) .build(); public ImportStatementDefinition() { diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ModuleStatementSupport.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ModuleStatementSupport.java index 2fbdad58e6..643fead841 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ModuleStatementSupport.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/ModuleStatementSupport.java @@ -77,7 +77,7 @@ public class ModuleStatementSupport extends .addAny(YangStmtMapping.TYPEDEF) .addAny(YangStmtMapping.USES) .addOptional(YangStmtMapping.YANG_VERSION) - .addOptional(SupportedExtensionsMapping.SEMANTIC_VERSION) + .addOptional(SupportedExtensionsMapping.OPENCONFIG_VERSION) .build(); public ModuleStatementSupport() { diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SemanticVersionStatementImpl.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/OpenconfigVersionStatementImpl.java similarity index 82% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SemanticVersionStatementImpl.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/OpenconfigVersionStatementImpl.java index 33ef638c3b..a99e535d4a 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SemanticVersionStatementImpl.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/OpenconfigVersionStatementImpl.java @@ -16,25 +16,25 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport; import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; -import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.SemanticVersionEffectiveStatementImpl; +import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OpenconfigVersionEffectiveStatementImpl; @Beta -public final class SemanticVersionStatementImpl extends AbstractDeclaredStatement implements +public final class OpenconfigVersionStatementImpl extends AbstractDeclaredStatement implements UnknownStatement { private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder( - SupportedExtensionsMapping.SEMANTIC_VERSION).build(); + SupportedExtensionsMapping.OPENCONFIG_VERSION).build(); - SemanticVersionStatementImpl( + OpenconfigVersionStatementImpl( final StmtContext, ?> context) { super(context); } - public static class SemanticVersionSupport + public static class OpenconfigVersionSupport extends AbstractStatementSupport, EffectiveStatement>> { - public SemanticVersionSupport() { - super(SupportedExtensionsMapping.SEMANTIC_VERSION); + public OpenconfigVersionSupport() { + super(SupportedExtensionsMapping.OPENCONFIG_VERSION); } @Override @@ -50,13 +50,13 @@ public final class SemanticVersionStatementImpl extends AbstractDeclaredStatemen @Override public UnknownStatement createDeclared( final StmtContext, ?> ctx) { - return new SemanticVersionStatementImpl(ctx); + return new OpenconfigVersionStatementImpl(ctx); } @Override public EffectiveStatement> createEffective( final StmtContext, EffectiveStatement>> ctx) { - return new SemanticVersionEffectiveStatementImpl(ctx); + return new OpenconfigVersionEffectiveStatementImpl(ctx); } @Override diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SupportedExtensionsMapping.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SupportedExtensionsMapping.java index f21322162d..8029cc75e1 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SupportedExtensionsMapping.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/SupportedExtensionsMapping.java @@ -16,16 +16,16 @@ import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement; import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement; import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition; import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.AnyxmlSchemaLocationEffectiveStatementImpl; -import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.SemanticVersionEffectiveStatementImpl; +import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OpenconfigVersionEffectiveStatementImpl; @Beta public enum SupportedExtensionsMapping implements StatementDefinition { ANYXML_SCHEMA_LOCATION("urn:opendaylight:yang:extension:yang-ext", "2013-07-09", AnyxmlSchemaLocationStatementImpl.class, AnyxmlSchemaLocationEffectiveStatementImpl.class, "anyxml-schema-location", "target-node", false), - SEMANTIC_VERSION("urn:opendaylight:yang:extension:semantic-version", "2016-02-02", - SemanticVersionStatementImpl.class, SemanticVersionEffectiveStatementImpl.class, - "semantic-version", "semantic-version", false); + OPENCONFIG_VERSION("http://openconfig.net/yang/openconfig-ext", + OpenconfigVersionStatementImpl.class, OpenconfigVersionEffectiveStatementImpl.class, + "openconfig-version", "semver", false); private final Class> type; private final Class> effectiveType; diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/YangInferencePipeline.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/YangInferencePipeline.java index 7b283fcb61..99a6e9a3c0 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/YangInferencePipeline.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/YangInferencePipeline.java @@ -143,7 +143,7 @@ public final class YangInferencePipeline { .addSupport(sourceLocal(BelongsToModuleContext.class)) .addSupport(sourceLocal(QNameToStatementDefinition.class)) .addSupport(sourceLocal(BelongsToPrefixToModuleName.class)) - .addSupport(new SemanticVersionStatementImpl.SemanticVersionSupport()) + .addSupport(new OpenconfigVersionStatementImpl.OpenconfigVersionSupport()) .addSupport(global(SemanticVersionNamespace.class)) .addSupport(global(SemanticVersionModuleNamespace.class)) .addSupport(sourceLocal(ImpPrefixToSemVerModuleIdentifier.class)) diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveModule.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveModule.java index 46409984e6..00d6b0863d 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveModule.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveModule.java @@ -93,7 +93,8 @@ abstract class AbstractEffectiveModule> exte final YangVersionEffectiveStatementImpl yangVersionStmt = firstEffective(YangVersionEffectiveStatementImpl.class); this.yangVersion = (yangVersionStmt == null) ? YangVersion.VERSION_1 : yangVersionStmt.argument(); - final SemanticVersionEffectiveStatementImpl semanticVersionStmt = firstEffective(SemanticVersionEffectiveStatementImpl.class); + final OpenconfigVersionEffectiveStatementImpl semanticVersionStmt = + firstEffective(OpenconfigVersionEffectiveStatementImpl.class); this.semanticVersion = (semanticVersionStmt == null) ? DEFAULT_SEMANTIC_VERSION : semanticVersionStmt.argument(); final OrganizationEffectiveStatementImpl organizationStmt = firstEffective(OrganizationEffectiveStatementImpl.class); diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/SemanticVersionEffectiveStatementImpl.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/OpenconfigVersionEffectiveStatementImpl.java similarity index 90% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/SemanticVersionEffectiveStatementImpl.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/OpenconfigVersionEffectiveStatementImpl.java index cb7428f7de..6d8d68fe63 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/SemanticVersionEffectiveStatementImpl.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/OpenconfigVersionEffectiveStatementImpl.java @@ -18,12 +18,12 @@ import org.opendaylight.yangtools.yang.model.api.stmt.UnknownStatement; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; @Beta -public final class SemanticVersionEffectiveStatementImpl extends +public final class OpenconfigVersionEffectiveStatementImpl extends UnknownEffectiveStatementBase { private final SchemaPath path; - public SemanticVersionEffectiveStatementImpl( + public OpenconfigVersionEffectiveStatementImpl( final StmtContext, ?> ctx) { super(ctx); path = ctx.getParentContext().getSchemaPath().get().createChild(getNodeType()); @@ -62,7 +62,7 @@ public final class SemanticVersionEffectiveStatementImpl extends if (getClass() != obj.getClass()) { return false; } - SemanticVersionEffectiveStatementImpl other = (SemanticVersionEffectiveStatementImpl) obj; + OpenconfigVersionEffectiveStatementImpl other = (OpenconfigVersionEffectiveStatementImpl) obj; if (!Objects.equals(path, other.path)) { return false; } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ImportStatementRfc7950Support.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ImportStatementRfc7950Support.java index 30ff823413..e442bad03c 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ImportStatementRfc7950Support.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ImportStatementRfc7950Support.java @@ -24,7 +24,7 @@ public class ImportStatementRfc7950Support extends ImportStatementDefinition { .builder(YangStmtMapping.IMPORT) .addMandatory(YangStmtMapping.PREFIX) .addOptional(YangStmtMapping.REVISION_DATE) - .addOptional(SupportedExtensionsMapping.SEMANTIC_VERSION) + .addOptional(SupportedExtensionsMapping.OPENCONFIG_VERSION) .addOptional(YangStmtMapping.DESCRIPTION) .addOptional(YangStmtMapping.REFERENCE) .build(); diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ModuleStatementRfc7950Support.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ModuleStatementRfc7950Support.java index 124dfabe4a..2a99221f38 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ModuleStatementRfc7950Support.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc7950/ModuleStatementRfc7950Support.java @@ -44,7 +44,7 @@ public class ModuleStatementRfc7950Support extends ModuleStatementSupport { .addAny(YangStmtMapping.TYPEDEF) .addAny(YangStmtMapping.USES) .addMandatory(YangStmtMapping.YANG_VERSION) - .addOptional(SupportedExtensionsMapping.SEMANTIC_VERSION) + .addOptional(SupportedExtensionsMapping.OPENCONFIG_VERSION) .build(); @Override diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/SemVerSharedSchemaRepositoryTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerSharedSchemaRepositoryTest.java similarity index 88% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/SemVerSharedSchemaRepositoryTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerSharedSchemaRepositoryTest.java index 2c8b2ff9c9..c516a6b77d 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/SemVerSharedSchemaRepositoryTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerSharedSchemaRepositoryTest.java @@ -24,23 +24,23 @@ import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource; import org.opendaylight.yangtools.yang.parser.util.ASTSchemaSource; import org.opendaylight.yangtools.yang.parser.util.TextToASTTransformer; -public class SemVerSharedSchemaRepositoryTest { +public class OpenconfigVerSharedSchemaRepositoryTest { @Test public void testSemVerSharedSchemaRepository() throws Exception { final SharedSchemaRepository sharedSchemaRepository = new SharedSchemaRepository( - "sem-ver-shared-schema-repo-test"); + "openconfig-ver-shared-schema-repo-test"); final SettableSchemaProvider bar = getImmediateYangSourceProviderFromResource( - "/semantic-version/semver-shared-schema-repository/bar@2016-01-01.yang"); + "/openconfig-version/openconfigver-shared-schema-repository/bar@2016-01-01.yang"); bar.register(sharedSchemaRepository); bar.setResult(); final SettableSchemaProvider foo = getImmediateYangSourceProviderFromResource( - "/semantic-version/semver-shared-schema-repository/foo.yang"); + "/openconfig-version/openconfigver-shared-schema-repository/foo.yang"); foo.register(sharedSchemaRepository); foo.setResult(); final SettableSchemaProvider semVer = getImmediateYangSourceProviderFromResource( - "/semantic-version/semver-shared-schema-repository/semantic-version.yang"); + "/openconfig-version/openconfigver-shared-schema-repository/openconfig-extensions.yang"); semVer.register(sharedSchemaRepository); semVer.setResult(); @@ -64,15 +64,15 @@ public class SemVerSharedSchemaRepositoryTest { final SharedSchemaRepository sharedSchemaRepository = new SharedSchemaRepository("shared-schema-repo-test"); final SettableSchemaProvider bar = getImmediateYangSourceProviderFromResource( - "/semantic-version/shared-schema-repository/bar@2016-01-01.yang"); + "/openconfig-version/shared-schema-repository/bar@2016-01-01.yang"); bar.register(sharedSchemaRepository); bar.setResult(); final SettableSchemaProvider foo = getImmediateYangSourceProviderFromResource( - "/semantic-version/shared-schema-repository/foo.yang"); + "/openconfig-version/shared-schema-repository/foo.yang"); foo.register(sharedSchemaRepository); foo.setResult(); final SettableSchemaProvider semVer = getImmediateYangSourceProviderFromResource( - "/semantic-version/shared-schema-repository/semantic-version.yang"); + "/openconfig-version/shared-schema-repository/openconfig-extensions.yang"); semVer.register(sharedSchemaRepository); semVer.setResult(); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionBorderCaseTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionBorderCaseTest.java similarity index 77% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionBorderCaseTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionBorderCaseTest.java index 8c5e2f1130..882d783d31 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionBorderCaseTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionBorderCaseTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.yangtools.yang.stmt.semver; +package org.opendaylight.yangtools.yang.stmt.openconfigver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -21,16 +21,16 @@ import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class SemanticVersionBorderCaseTest { +public class OpenconfigVersionBorderCaseTest { @Test public void borderCaseValidMajorTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-valid-major", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-valid-major", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -41,12 +41,12 @@ public class SemanticVersionBorderCaseTest { @Test public void borderCaseValidMinorTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-valid-minor", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-valid-minor", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -57,12 +57,12 @@ public class SemanticVersionBorderCaseTest { @Test public void borderCaseValidPatchTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-valid-patch", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-valid-patch", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -74,9 +74,9 @@ public class SemanticVersionBorderCaseTest { @Test public void borderCaseInvalidMajorTest() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-invalid-major", + StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-invalid-major", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + fail("Test should fail due to invalid openconfig version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(5.5.5)].")); @@ -86,9 +86,9 @@ public class SemanticVersionBorderCaseTest { @Test public void borderCaseInvalidMinorTest() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-invalid-minor", + StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-invalid-minor", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + fail("Test should fail due to invalid openconfig version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(5.5.5)].")); @@ -98,9 +98,9 @@ public class SemanticVersionBorderCaseTest { @Test public void borderCaseInvalidPatchTest() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-invalid-patch", + StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-invalid-patch", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + fail("Test should fail due to invalid openconfig version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(5.5.5)].")); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionComplexTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionComplexTest.java similarity index 92% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionComplexTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionComplexTest.java index 48b6efb80a..e8384037f7 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionComplexTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionComplexTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.yangtools.yang.stmt.semver; +package org.opendaylight.yangtools.yang.stmt.openconfigver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -21,18 +21,18 @@ import org.opendaylight.yangtools.yang.model.util.RevisionAwareXPathImpl; import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class SemanticVersionComplexTest { +public class OpenconfigVersionComplexTest { @Test public void complexTest1() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/complex/complex-1", + final SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/complex/complex-1", StatementParserMode.SEMVER_MODE); verifySchemaContextTest1(context); } @Test public void complexTest1Yang1_1() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/semantic-version/complex-1", + final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/openconfig-version/complex-1", StatementParserMode.SEMVER_MODE); verifySchemaContextTest1(context); } @@ -42,7 +42,7 @@ public class SemanticVersionComplexTest { final Module foo = context.findModuleByNamespace(URI.create("foo")).iterator().next(); final Module semVer = context.findModuleByNamespace( - URI.create("urn:opendaylight:yang:extension:semantic-version")).iterator().next(); + URI.create("http://openconfig.net/yang/openconfig-ext")).iterator().next(); // check module versions assertEquals(SemVer.valueOf("1.3.95"), semVer.getSemanticVersion()); @@ -71,14 +71,14 @@ public class SemanticVersionComplexTest { @Test public void complexTest2() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/complex/complex-2", + final SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/complex/complex-2", StatementParserMode.SEMVER_MODE); verifySchemaContextTest2(context); } @Test public void complexTest2Yang1_1() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/semantic-version/complex-2", + final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/openconfig-version/complex-2", StatementParserMode.SEMVER_MODE); verifySchemaContextTest2(context); } @@ -88,7 +88,7 @@ public class SemanticVersionComplexTest { final Module foo = context.findModuleByNamespace(URI.create("foo")).iterator().next(); final Module semVer = context.findModuleByNamespace(URI.create( - "urn:opendaylight:yang:extension:semantic-version")).iterator().next(); + "http://openconfig.net/yang/openconfig-ext")).iterator().next(); // check module versions assertEquals(SemVer.valueOf("2.5.50"), semVer.getSemanticVersion()); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionDefaultsTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionDefaultsTest.java similarity index 86% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionDefaultsTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionDefaultsTest.java index 6dea1b3525..1e6f9759fd 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionDefaultsTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionDefaultsTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.yangtools.yang.stmt.semver; +package org.opendaylight.yangtools.yang.stmt.openconfigver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -21,11 +21,11 @@ import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class SemanticVersionDefaultsTest { +public class OpenconfigVersionDefaultsTest { @Test public void defaultsTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/defaults/defaults", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/defaults/defaults", StatementParserMode.SEMVER_MODE); assertNotNull(context); @@ -38,7 +38,7 @@ public class SemanticVersionDefaultsTest { @Test public void defaultMajorValidTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/defaults/default-major-valid", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/defaults/default-major-valid", StatementParserMode.SEMVER_MODE); assertNotNull(context); @@ -52,9 +52,9 @@ public class SemanticVersionDefaultsTest { @Test public void defaultMajorInvalidTest() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/defaults/default-major-invalid", + StmtTestUtils.parseYangSources("/openconfig-version/defaults/default-major-invalid", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + fail("Test should fail due to invalid openconfig version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(0.0.0)].")); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionIgnoringRevisionTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionIgnoringRevisionTest.java similarity index 83% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionIgnoringRevisionTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionIgnoringRevisionTest.java index ee52231261..b481c7357e 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionIgnoringRevisionTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionIgnoringRevisionTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.yangtools.yang.stmt.semver; +package org.opendaylight.yangtools.yang.stmt.openconfigver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -18,17 +18,17 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class SemanticVersionIgnoringRevisionTest { +public class OpenconfigVersionIgnoringRevisionTest { @Test public void ignoringRevisionTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/ignoring-revision", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/ignoring-revision", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -38,12 +38,12 @@ public class SemanticVersionIgnoringRevisionTest { @Test public void ignoringRevision2Test() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/ignoring-revision-2", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/ignoring-revision-2", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionImportTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionImportTest.java similarity index 67% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionImportTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionImportTest.java index 7f37b2b01c..b012288775 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionImportTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionImportTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.yangtools.yang.stmt.semver; +package org.opendaylight.yangtools.yang.stmt.openconfigver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -21,15 +21,15 @@ import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class SemanticVersionImportTest { +public class OpenconfigVersionImportTest { @Test public void importValidTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/import/import-valid", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/import/import-valid", StatementParserMode.SEMVER_MODE); assertNotNull(context); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("1.0.0"), semVer.getSemanticVersion()); @@ -38,48 +38,48 @@ public class SemanticVersionImportTest { @Test public void importInvalidDeprecatedTest1() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/import/import-invalid-deprecated-1", + StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-deprecated-1", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid import of semantic-version module"); + fail("Test should fail due to invalid import of openconfig-version module"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage().startsWith( - "Unable to find module compatible with requested import " + "[semantic-version(1.0.0)].")); + "Unable to find module compatible with requested import " + "[openconfig-extensions(1.0.0)].")); } } @Test public void importInvalidDeprecatedTest2() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/import/import-invalid-deprecated-2", + StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-deprecated-2", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid import of semantic-version module"); + fail("Test should fail due to invalid import of openconfig-version module"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage().startsWith( - "Unable to find module compatible with requested import " + "[semantic-version(0.9.9)].")); + "Unable to find module compatible with requested import " + "[openconfig-extensions(0.9.9)].")); } } @Test public void importInvalidNotsufficientTest1() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/import/import-invalid-notsufficient-1", + StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-notsufficient-1", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid import of semantic-version module"); + fail("Test should fail due to invalid import of openconfig-version module"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage().startsWith( - "Unable to find module compatible with requested import " + "[semantic-version(2.0.0)].")); + "Unable to find module compatible with requested import " + "[openconfig-extensions(2.0.0)].")); } } @Test public void importInvalidNotsufficientTest2() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/import/import-invalid-notsufficient-2", + StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-notsufficient-2", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid import of semantic-version module"); + fail("Test should fail due to invalid import of openconfig-version module"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage().startsWith( - "Unable to find module compatible with requested import " + "[semantic-version(2.0.5)].")); + "Unable to find module compatible with requested import " + "[openconfig-extensions(2.0.5)].")); } } } diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionMultipleImportTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionMultipleImportTest.java similarity index 82% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionMultipleImportTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionMultipleImportTest.java index c8e4673ebb..f000e7d178 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionMultipleImportTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionMultipleImportTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.yangtools.yang.stmt.semver; +package org.opendaylight.yangtools.yang.stmt.openconfigver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -23,14 +23,14 @@ import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class SemanticVersionMultipleImportTest { +public class OpenconfigVersionMultipleImportTest { @Test public void multipleInvalidDeprecatedTest() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-invalid-deprecated", + StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-invalid-deprecated", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + fail("Test should fail due to invalid openconfig version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(1.0.0)].")); @@ -40,9 +40,9 @@ public class SemanticVersionMultipleImportTest { @Test public void multipleInvalidNosufficientTest() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-invalid-nosufficient", + StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-invalid-nosufficient", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + fail("Test should fail due to invalid openconfig version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(2.5.5)].")); @@ -51,12 +51,12 @@ public class SemanticVersionMultipleImportTest { @Test public void multipleValidDefaultsTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-valid-defaults", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-valid-defaults", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -67,12 +67,12 @@ public class SemanticVersionMultipleImportTest { @Test public void multipleValidSpecifiedTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-valid-specified", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-valid-specified", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionPositionTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionPositionTest.java similarity index 82% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionPositionTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionPositionTest.java index 0c817baf00..533f62df94 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionPositionTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionPositionTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.yangtools.yang.stmt.semver; +package org.opendaylight.yangtools.yang.stmt.openconfigver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -18,17 +18,17 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext; import org.opendaylight.yangtools.yang.model.repo.api.StatementParserMode; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class SemanticVersionPositionTest { +public class OpenconfigVersionPositionTest { @Test public void positionHeadTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-head", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-head", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -38,13 +38,13 @@ public class SemanticVersionPositionTest { @Test public void positionMiddleTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-middle", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-middle", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -54,13 +54,13 @@ public class SemanticVersionPositionTest { @Test public void positiontailTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-tail", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-tail", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionTest.java similarity index 83% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionTest.java index 23c2b10466..f46f8cbcd3 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/SemanticVersionTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/OpenconfigVersionTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.yangtools.yang.stmt.semver; +package org.opendaylight.yangtools.yang.stmt.openconfigver; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -27,16 +27,16 @@ import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil; import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class SemanticVersionTest { +public class OpenconfigVersionTest { @Test public void basicTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -46,13 +46,13 @@ public class SemanticVersionTest { @Test public void basicTest2() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic-2", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic-2", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -62,12 +62,12 @@ public class SemanticVersionTest { @Test public void basicTest3() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic-3", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic-3", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -76,12 +76,12 @@ public class SemanticVersionTest { @Test public void basicImportTest1() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic-import-1", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic-import-1", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -92,12 +92,12 @@ public class SemanticVersionTest { @Test public void multipleModulesTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/multiple-modules", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/multiple-modules", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -109,8 +109,8 @@ public class SemanticVersionTest { @Test public void basicImportErrTest1() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/basic-import-invalid-1", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + StmtTestUtils.parseYangSources("/openconfig-version/basic-import-invalid-1", StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid openconfig version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(0.1.2)].")); @@ -120,8 +120,8 @@ public class SemanticVersionTest { @Test public void basicImportErrTest2() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/basic-import-invalid-2", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + StmtTestUtils.parseYangSources("/openconfig-version/basic-import-invalid-2", StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid openconfig version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(0.1.2)].")); @@ -130,12 +130,12 @@ public class SemanticVersionTest { @Test public void nodeTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/node-test", + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/node-test", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/yin/YinSemanticVersionTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/yin/YinOpenconfigVersionTest.java similarity index 82% rename from yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/yin/YinSemanticVersionTest.java rename to yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/yin/YinOpenconfigVersionTest.java index 1b1039b7da..902da6a356 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/semver/yin/YinSemanticVersionTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/openconfigver/yin/YinOpenconfigVersionTest.java @@ -6,7 +6,7 @@ * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.yangtools.yang.stmt.semver.yin; +package org.opendaylight.yangtools.yang.stmt.openconfigver.yin; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -25,17 +25,17 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException; import org.opendaylight.yangtools.yang.parser.spi.source.SourceException; import org.opendaylight.yangtools.yang.stmt.StmtTestUtils; -public class YinSemanticVersionTest { +public class YinOpenconfigVersionTest { @Test public void basicTest() throws SourceException, FileNotFoundException, ReactorException, URISyntaxException { - SchemaContext context = StmtTestUtils.parseYinSources("/semantic-version/yin-input/basic", + SchemaContext context = StmtTestUtils.parseYinSources("/openconfig-version/yin-input/basic", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -45,12 +45,12 @@ public class YinSemanticVersionTest { @Test public void basicImportTest1() throws SourceException, FileNotFoundException, ReactorException, URISyntaxException { - SchemaContext context = StmtTestUtils.parseYinSources("/semantic-version/yin-input/basic-import", + SchemaContext context = StmtTestUtils.parseYinSources("/openconfig-version/yin-input/basic-import", StatementParserMode.SEMVER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); - Module semVer = context.findModuleByNamespace(new URI("urn:opendaylight:yang:extension:semantic-version")) + Module semVer = context.findModuleByNamespace(new URI("http://openconfig.net/yang/openconfig-ext")) .iterator().next(); assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); @@ -63,8 +63,8 @@ public class YinSemanticVersionTest { public void basicImportErrTest1() throws SourceException, FileNotFoundException, ReactorException, URISyntaxException { try { - StmtTestUtils.parseYinSources("/semantic-version/yin-input/basic-import-invalid", StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + StmtTestUtils.parseYinSources("/openconfig-version/yin-input/basic-import-invalid", StatementParserMode.SEMVER_MODE); + fail("Test should fail due to invalid openconfig version"); } catch (ReactorException e) { assertTrue(e.getCause().getMessage() .startsWith("Unable to find module compatible with requested import [bar(0.1.2)].")); diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/bar.yang similarity index 60% rename from yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/bar.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/bar.yang index 5664e68ba9..64c9a19254 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/bar.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02;} + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29;} revision "2016-01-31" { description "Initial version"; } - sv:semantic-version "0.1.2"; + oc-ext:openconfig-version "0.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/foo.yang similarity index 66% rename from yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/foo.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/foo.yang index 01fe8e8905..22a7e1571f 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/foo.yang @@ -3,13 +3,13 @@ module foo { prefix foo; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02;} + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29;} import bar { prefix bar; revision-date 2016-01-31;} revision "2016-02-01" { description "Initial version"; } - sv:semantic-version "0.1.1"; + oc-ext:openconfig-version "0.1.1"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/openconfig-extensions.yang similarity index 51% rename from yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/semantic-version.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/openconfig-extensions.yang index ca84e112e2..23e90e3f34 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/semantic-version.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-2/openconfig-extensions.yang @@ -1,14 +1,40 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; - revision 2016-02-02 { - description "Initial verison"; + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; } - extension semantic-version { - argument "semantic-version" { + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { yin-element false; } description @@ -44,5 +70,15 @@ module semantic-version { The version number is stored in the module meta-data."; } - sv:semantic-version "0.0.1"; -} + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/foo.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/foo.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/foo.yang index 537f5d7ac6..3945e5439d 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/foo.yang @@ -3,12 +3,12 @@ module foo { prefix foo; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-02-01" { description "Initial version"; } - sv:semantic-version "0.1.1"; + oc-ext:openconfig-version "0.1.1"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/openconfig-extensions.yang similarity index 51% rename from yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/semantic-version.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/openconfig-extensions.yang index 14dc274ebe..23e90e3f34 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/semantic-version.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-3/openconfig-extensions.yang @@ -1,15 +1,40 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1.1; +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; - revision 2016-02-02 { - description "Initial verison"; + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; } - sv:semantic-version "1.3.95"; - extension semantic-version { - argument "semantic-version" { + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { yin-element false; } description @@ -44,4 +69,16 @@ module semantic-version { The version number is stored in the module meta-data."; } -} + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-01.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-01.yang index 54da0db564..2a435be8fa 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-01.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-01" { description "Initial version"; } - sv:semantic-version "0.1.2"; + oc-ext:openconfig-version "0.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-31.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-31.yang index d3d101b61b..2e84793fd7 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/bar@2016-01-31.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - sv:semantic-version "1.1.3"; + oc-ext:openconfig-version "1.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/foo.yang new file mode 100644 index 0000000000..1a1c25a5c7 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/openconfig-extensions.yang similarity index 51% rename from yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/semantic-version.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/openconfig-extensions.yang index dd92de6883..23e90e3f34 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/semantic-version.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/openconfig-extensions.yang @@ -1,15 +1,40 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; - revision 2016-02-02 { - description "Initial verison"; + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; } - sv:semantic-version "0.0.1"; - extension semantic-version { - argument "semantic-version" { + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { yin-element false; } description @@ -44,4 +69,16 @@ module semantic-version { The version number is stored in the module meta-data."; } -} + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-01.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-01.yang index 2e94728149..e1c85adb8b 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/bar@2016-01-01.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-01" { description "Initial version"; } - sv:semantic-version "1.1.2"; + oc-ext:openconfig-version "1.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-31.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-31.yang index e61a340d48..4f4f69514c 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/bar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/bar@2016-01-31.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - sv:semantic-version "1.1.2"; + oc-ext:openconfig-version "1.1.3"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/foo.yang new file mode 100644 index 0000000000..1a1c25a5c7 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/bar.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/basic/bar.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/bar.yang index 2adc1363ba..2e84793fd7 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/bar.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - sv:semantic-version "0.1.2"; + oc-ext:openconfig-version "1.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/foo.yang new file mode 100644 index 0000000000..2b37c2422b --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/bar.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/bar.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/basic/bar.yang index e7fe6096d5..b973ab3f4c 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/bar.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - sv:semantic-version "1.0.0"; + oc-ext:openconfig-version "0.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/foo.yang new file mode 100644 index 0000000000..2b37c2422b --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/basic/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-01.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-01.yang index e016dde777..5ccae0cdcf 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-01.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-01" { description "Initial version"; } - sv:semantic-version "2.5.5"; + oc-ext:openconfig-version "2.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-02.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-02.yang index fa2cc103a5..4cc416c5b3 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-02.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-02" { description "Initial version"; } - sv:semantic-version "3.5.5"; + oc-ext:openconfig-version "3.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-03.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-03.yang index 8bbaa12721..7ba0f33e95 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/bar@2016-01-03.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-03" { description "Initial version"; } - sv:semantic-version "4.5.5"; + oc-ext:openconfig-version "4.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/foo.yang new file mode 100644 index 0000000000..4edb32ed1c --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang index 06c3e48f38..eca43da12e 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-01" { description "Initial version"; } - sv:semantic-version "5.2.5"; + oc-ext:openconfig-version "5.2.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang index 0b59caee3a..dc86015a47 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-02" { description "Initial version"; } - sv:semantic-version "5.3.5"; + oc-ext:openconfig-version "5.3.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang index 4826af89a6..5a3afb60a5 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/bar@2016-01-03.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-03" { description "Initial version"; } - sv:semantic-version "5.4.5"; + oc-ext:openconfig-version "5.4.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/foo.yang new file mode 100644 index 0000000000..4edb32ed1c --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang new file mode 100644 index 0000000000..68b2f665e0 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "5.5.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang index 1398079f2c..b780b3db4b 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-02" { description "Initial version"; } - sv:semantic-version "5.5.3"; + oc-ext:openconfig-version "5.5.3"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang index 714f1de10b..391975aa77 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-03.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-03" { description "Initial version"; } - sv:semantic-version "5.5.4"; + oc-ext:openconfig-version "5.5.4"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/foo.yang new file mode 100644 index 0000000000..4edb32ed1c --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-01.yang new file mode 100644 index 0000000000..38172e4baa --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "4.5.5"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-02.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-02.yang index 920c18af50..2221251649 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-02.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-02" { description "Initial version"; } - sv:semantic-version "5.5.5"; + oc-ext:openconfig-version "5.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-03.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-03.yang index f04a98e343..2aa155d43b 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-03.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-03" { description "Initial version"; } - sv:semantic-version "6.5.5"; + oc-ext:openconfig-version "6.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/foo.yang new file mode 100644 index 0000000000..4edb32ed1c --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-01.yang new file mode 100644 index 0000000000..5f6dfc8f8f --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "5.4.5"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-02.yang new file mode 100644 index 0000000000..2221251649 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + oc-ext:openconfig-version "5.5.5"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-03.yang new file mode 100644 index 0000000000..00929184e2 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-03.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-03" { + description "Initial version"; + } + oc-ext:openconfig-version "5.6.5"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/foo.yang new file mode 100644 index 0000000000..4edb32ed1c --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-01.yang new file mode 100644 index 0000000000..6f0b2ae242 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "5.5.4"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-02.yang new file mode 100644 index 0000000000..2221251649 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + oc-ext:openconfig-version "5.5.5"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-03.yang new file mode 100644 index 0000000000..2b35449bb8 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-03.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-03" { + description "Initial version"; + } + oc-ext:openconfig-version "5.5.6"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/foo.yang new file mode 100644 index 0000000000..4edb32ed1c --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-03.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-03.yang index a7b14f1dfe..138dbad9fd 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-03.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "1.2.012"; } - import foobar { prefix foobar; sv:semantic-version "2.25.3"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.012"; } + import foobar { prefix foobar; oc-ext:openconfig-version "2.25.3"; } revision "2016-01-03" { description "Imported version"; } - sv:semantic-version "1.2.6"; + oc-ext:openconfig-version "1.2.6"; container root { container test-container { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-04.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-04.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-04.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-04.yang index eaff86f9c6..10d176b9f5 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/bar@2016-01-04.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/bar@2016-01-04.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "1.2.210"; } - import foobar { prefix foobar; sv:semantic-version "2.25.3"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.210"; } + import foobar { prefix foobar; oc-ext:openconfig-version "2.25.3"; } revision "2016-01-04" { description "Not-imported version"; } - sv:semantic-version "2.200.200"; + oc-ext:openconfig-version "2.200.200"; container root { container test-container { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foo.yang new file mode 100644 index 0000000000..9caffd9106 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foo.yang @@ -0,0 +1,13 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.0.0"; } + import bar { prefix bar; oc-ext:openconfig-version "1.2.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "1.50.02"; +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-01-31.yang similarity index 74% rename from yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-01-31.yang index 6efe81dfc9..173082532d 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-01-31.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "1.2.95"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.95"; } revision "2016-01-31" { description "Not-imported version"; } - sv:semantic-version "2.25.2"; + oc-ext:openconfig-version "2.25.2"; grouping test-grouping { leaf name { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-02-28.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-02-28.yang similarity index 74% rename from yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-02-28.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-02-28.yang index 867d25eb0b..5e647e9c30 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foobar@2016-02-28.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foobar@2016-02-28.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "1.3.95"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.3.95"; } revision "2016-02-28" { description "Imported version"; } - sv:semantic-version "2.26.465"; + oc-ext:openconfig-version "2.26.465"; grouping test-grouping { leaf name { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/openconfig-extensions.yang new file mode 100644 index 0000000000..6cff937b92 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "1.3.95"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-03.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-03.yang index f11bdb0943..fe922ff142 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-03.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "2.0.40"; } - import foobar { prefix foobar; sv:semantic-version "7.12.54"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.0.40"; } + import foobar { prefix foobar; oc-ext:openconfig-version "7.12.54"; } revision "2016-01-03" { description "Imported version"; } - sv:semantic-version "4.9.8"; + oc-ext:openconfig-version "4.9.8"; augment "/foobar:root/foobar:test-container" { leaf should-present-leaf-1 { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-04.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-04.yang similarity index 65% rename from yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-04.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-04.yang index 1066b8a9b6..c232860931 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/bar@2016-01-04.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/bar@2016-01-04.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "2.0.50"; } - import foobar { prefix foobar; sv:semantic-version "7.12.54"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.0.50"; } + import foobar { prefix foobar; oc-ext:openconfig-version "7.12.54"; } revision "2016-01-04" { description "Not-imported version"; } - sv:semantic-version "3.0.5"; + oc-ext:openconfig-version "3.0.5"; augment "/foobar:root/foobar:test-container" { leaf should-not-be-present-leaf-1 { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foo.yang new file mode 100644 index 0000000000..5f534911c7 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foo.yang @@ -0,0 +1,13 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.40"; } + import bar { prefix bar; oc-ext:openconfig-version "4.1.1"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "2.32.2"; +} diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-01-31.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-01-31.yang index 435bea628d..7c7ac1aaa3 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-01-31.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "2.1.950"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.1.950"; } revision "2016-01-31" { description "Not-imported version"; } - sv:semantic-version "8.0.0"; + oc-ext:openconfig-version "8.0.0"; container root { leaf included-not-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-27.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-27.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-27.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-27.yang index 8b8f48e1a7..930c1162f4 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-27.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-27.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "2.5.50"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.50"; } revision "2016-02-27" { description "Not-imported version"; } - sv:semantic-version "7.13.0"; + oc-ext:openconfig-version "7.13.0"; container root { leaf included-not-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-28.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-28.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-28.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-28.yang index c45a020a52..676834c3dd 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-28.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foobar@2016-02-28.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "2.5.50"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.50"; } revision "2016-02-28" { description "Imported version"; } - sv:semantic-version "7.13.99"; + oc-ext:openconfig-version "7.13.99"; container root { leaf included-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/openconfig-extensions.yang new file mode 100644 index 0000000000..9b021b6590 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "2.5.50"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/bar.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/bar.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/bar.yang index e61a340d48..049c662137 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/bar.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - sv:semantic-version "1.1.2"; + oc-ext:openconfig-version "1.0.0"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/foo.yang similarity index 67% rename from yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/foo.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/foo.yang index e81c79130b..3db561357f 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } import bar { prefix bar; revision-date 2016-01-31; } revision "2016-02-01" { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/bar.yang new file mode 100644 index 0000000000..62e0506d75 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/bar.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-31" { + description "Initial version"; + } + oc-ext:openconfig-version "0.99.99"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/foo.yang similarity index 67% rename from yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/foo.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/foo.yang index e81c79130b..3db561357f 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } import bar { prefix bar; revision-date 2016-01-31; } revision "2016-02-01" { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/defaults/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/defaults/bar.yang similarity index 100% rename from yang/yang-parser-impl/src/test/resources/semantic-version/defaults/defaults/bar.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/defaults/bar.yang diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/defaults/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/defaults/foo.yang similarity index 100% rename from yang/yang-parser-impl/src/test/resources/semantic-version/defaults/defaults/foo.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/defaults/foo.yang diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-01.yang new file mode 100644 index 0000000000..2a435be8fa --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-31.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-31.yang index e61a340d48..2e84793fd7 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-31.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - sv:semantic-version "1.1.2"; + oc-ext:openconfig-version "1.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/foo.yang new file mode 100644 index 0000000000..2b37c2422b --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/bar@2016-01-01.yang new file mode 100644 index 0000000000..2a435be8fa --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/foo.yang new file mode 100644 index 0000000000..2b37c2422b --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/foo.yang similarity index 60% rename from yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/foo.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/foo.yang index a6c665bd3e..7d043d9f43 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "1.0.0"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "1.0.0"; } revision "2016-02-01" { description "Initial version"; diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/openconfig-extensions.yang new file mode 100644 index 0000000000..4601af98ba --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "2.0.0"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/foo.yang similarity index 60% rename from yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/foo.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/foo.yang index d069eef1cb..6a217a9e22 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "2.0.5"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.9.9"; } revision "2016-02-01" { description "Initial version"; diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/openconfig-extensions.yang new file mode 100644 index 0000000000..a310b5cadc --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "1.0.0"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/foo.yang similarity index 60% rename from yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/foo.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/foo.yang index eacb99e2bf..12837d617b 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.9.9"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "2.0.0"; } revision "2016-02-01" { description "Initial version"; diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/openconfig-extensions.yang new file mode 100644 index 0000000000..a310b5cadc --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "1.0.0"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/foo.yang similarity index 60% rename from yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/foo.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/foo.yang index 74446cc940..987eea37ca 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/foo.yang @@ -3,7 +3,7 @@ module foo { prefix foo; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "2.0.0"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "2.0.5"; } revision "2016-02-01" { description "Initial version"; diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/openconfig-extensions.yang new file mode 100644 index 0000000000..4601af98ba --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "2.0.0"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/foo.yang new file mode 100644 index 0000000000..7d043d9f43 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/foo.yang @@ -0,0 +1,14 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "1.0.0"; } + + revision "2016-02-01" { + description "Initial version"; + } + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/openconfig-extensions.yang new file mode 100644 index 0000000000..a310b5cadc --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "1.0.0"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-01.yang new file mode 100644 index 0000000000..ff09241e6e --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-02.yang new file mode 100644 index 0000000000..4280db0c12 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-03.yang new file mode 100644 index 0000000000..c2ff5a957d --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-03.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-03" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.3"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-04.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-04.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-04.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-04.yang index adb243687a..afa6b30163 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-04.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-04.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-04" { description "Initial version"; } - sv:semantic-version "0.10.4"; + oc-ext:openconfig-version "0.10.4"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-31.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-31.yang index e61a340d48..2e84793fd7 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-31.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; } - sv:semantic-version "1.1.2"; + oc-ext:openconfig-version "1.1.2"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-02-28.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-02-28.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-02-28.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-02-28.yang index b4a6511ef4..c6968db878 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-02-28.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-02-28.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-02-28" { description "Initial version"; } - sv:semantic-version "1.2.28"; + oc-ext:openconfig-version "1.2.28"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/foo.yang new file mode 100644 index 0000000000..1a1c25a5c7 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang new file mode 100644 index 0000000000..f701a5be23 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "2.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang new file mode 100644 index 0000000000..c65cd27e2a --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + oc-ext:openconfig-version "2.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang index 69e3d6cca8..2371e1a22a 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-02-01" { description "Initial version"; } - sv:semantic-version "4.1.1"; + oc-ext:openconfig-version "4.1.1"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang index 13c579cceb..03cdd7eb3f 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-02-02" { description "Initial version"; } - sv:semantic-version "5.0.0"; + oc-ext:openconfig-version "5.0.0"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/foo.yang new file mode 100644 index 0000000000..243aa3504a --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "1.0.0"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang new file mode 100644 index 0000000000..ae8c8d5184 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "2.0.0"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang new file mode 100644 index 0000000000..7aff7c5956 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + oc-ext:openconfig-version "2.1.0"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang index 30367614c7..5f124dbf0d 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-02-01" { description "Initial version"; } - sv:semantic-version "2.5.0"; + oc-ext:openconfig-version "2.5.0"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang index f27a9efd35..7fd4d004f0 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-02-02" { description "Initial version"; } - sv:semantic-version "2.5.4"; + oc-ext:openconfig-version "2.5.4"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/foo.yang new file mode 100644 index 0000000000..f5c591b85e --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "2.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang new file mode 100644 index 0000000000..5679d89d6d --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.0.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang new file mode 100644 index 0000000000..0f94048b8b --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.0"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang index 4405fa975b..6a2560ad18 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-02-01" { description "Initial version"; } - sv:semantic-version "0.9.5"; + oc-ext:openconfig-version "0.9.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang index 54506080ba..d343e2a047 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-02-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-02-02" { description "Initial version"; } - sv:semantic-version "1.0.0"; + oc-ext:openconfig-version "1.0.0"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/foo.yang similarity index 57% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/foo.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/foo.yang index 3da8de0a25..25ec2fb4c9 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/foo.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/foo.yang @@ -3,13 +3,13 @@ module foo { prefix foo; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } import bar { prefix bar; } revision "2016-02-01" { description "Initial version"; } - sv:semantic-version "0.1.1"; + oc-ext:openconfig-version "0.1.1"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-01.yang new file mode 100644 index 0000000000..720eee21e2 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "4.4.0"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-02.yang new file mode 100644 index 0000000000..a6116f3e96 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-02.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-02" { + description "Initial version"; + } + oc-ext:openconfig-version "5.5.0"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-01.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-01.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-01.yang index 32edae48fb..26049d4e98 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-01.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-01.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-02-01" { description "Initial version"; } - sv:semantic-version "5.5.5"; + oc-ext:openconfig-version "5.5.5"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-02.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-02.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-02.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-02.yang index a4d94b5af8..0bf5091c20 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-02-02.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-02-02.yang @@ -3,12 +3,12 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-02-02" { description "Initial version"; } - sv:semantic-version "5.5.6"; + oc-ext:openconfig-version "5.5.6"; container root { } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/foo.yang new file mode 100644 index 0000000000..4edb32ed1c --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; oc-ext:openconfig-version "5.5.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160404.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160404.yang similarity index 57% rename from yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160404.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160404.yang index 69270ae685..5e70700d79 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160404.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160404.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision 2016-04-04 { description "test"; } - sv:semantic-version "2016.4.4"; + oc-ext:openconfig-version "2016.4.4"; grouping grp { container con20160404 { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160405.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160405.yang similarity index 62% rename from yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160405.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160405.yang index f2bc4bee73..97faa03d8c 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160405.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160405.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision 2016-04-05 { description "test"; } - sv:semantic-version "2016.4.5"; + oc-ext:openconfig-version "2016.4.5"; grouping grp { container con20160404 { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160406.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160406.yang similarity index 65% rename from yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160406.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160406.yang index 46d63f0751..d2bd0f3711 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20160406.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20160406.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision 2016-04-06 { description "test"; } - sv:semantic-version "2016.4.6"; + oc-ext:openconfig-version "2016.4.6"; grouping grp { container con20160404 { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20170406.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20170406.yang similarity index 68% rename from yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20170406.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20170406.yang index 21066d44e6..bff38fc2cf 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/bar@20170406.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/bar@20170406.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision 2017-04-06 { description "test"; } - sv:semantic-version "2017.4.6"; + oc-ext:openconfig-version "2017.4.6"; grouping grp { container con20160404 { diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/foo.yang new file mode 100644 index 0000000000..c723cc5732 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/foo.yang @@ -0,0 +1,18 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; revision-date 2017-04-06; oc-ext:openconfig-version "2016.4.5"; } + + revision 2016-01-01 { + description "test"; + } + + oc-ext:openconfig-version "2016.1.1"; + + container foo-root { + uses bar:grp; + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/bar@2016-01-01.yang new file mode 100644 index 0000000000..2a435be8fa --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/foo.yang new file mode 100644 index 0000000000..2b37c2422b --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/bar.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/bar.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/bar.yang index 868ce014a0..9e6429c7b2 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/bar.yang @@ -1,11 +1,11 @@ module bar { - sv:semantic-version "0.1.2"; + oc-ext:openconfig-version "0.1.2"; namespace "bar"; prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/foo.yang new file mode 100644 index 0000000000..41b5fdf39a --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/foo.yang @@ -0,0 +1,17 @@ +module foo { + oc-ext:openconfig-version "0.1.1"; + import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} + + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-02-01" { + description "Initial version"; + } + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/openconfig-extensions.yang similarity index 51% rename from yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/semantic-version.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/openconfig-extensions.yang index 3879c0670b..43c5f3a2bf 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/semantic-version.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/openconfig-extensions.yang @@ -1,16 +1,39 @@ -module semantic-version { - sv:semantic-version "0.0.1"; +module openconfig-extensions { + oc-ext:openconfig-version "0.0.1"; + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; + organization "OpenConfig working group"; - revision 2016-02-02 { - description "Initial verison"; + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; } - extension semantic-version { - argument "semantic-version" { + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + extension openconfig-version { + argument "semver" { yin-element false; } description @@ -45,4 +68,16 @@ module semantic-version { The version number is stored in the module meta-data."; } -} + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/bar.yang new file mode 100644 index 0000000000..b973ab3f4c --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/bar.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-31" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/foo.yang new file mode 100644 index 0000000000..2b37c2422b --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/bar.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/bar.yang similarity index 53% rename from yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/bar.yang rename to yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/bar.yang index 8ce6838c35..65b82d4a65 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/bar.yang +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/bar.yang @@ -3,7 +3,7 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } revision "2016-01-31" { description "Initial version"; @@ -12,5 +12,5 @@ module bar { container root { } - sv:semantic-version "0.1.2"; + oc-ext:openconfig-version "0.1.2"; } diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/foo.yang new file mode 100644 index 0000000000..005ef0b304 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/foo.yang @@ -0,0 +1,17 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-02-01" { + description "Initial version"; + } + + container root { + } + + oc-ext:openconfig-version "0.1.1"; + import bar { prefix bar; revision-date 2016-01-31; oc-ext:openconfig-version "0.1.2";} +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/openconfig-extensions.yang new file mode 100644 index 0000000000..40d9fb97cc --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } + + oc-ext:openconfig-version "0.0.1"; +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/bar@2016-01-01.yang new file mode 100644 index 0000000000..2a435be8fa --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/bar@2016-01-01.yang @@ -0,0 +1,15 @@ +module bar { + namespace "bar"; + prefix bar; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + + revision "2016-01-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.2"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/foo.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/foo.yang new file mode 100644 index 0000000000..67ef0679ce --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/foo.yang @@ -0,0 +1,16 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1; + + import openconfig-extensions { prefix oc-ext; revision-date 2017-01-29; oc-ext:openconfig-version "0.0.1"; } + import bar { prefix bar; revision-date 2016-01-01; oc-ext:openconfig-version "0.1.2";} + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "0.1.1"; + + container root { + } +} diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/openconfig-extensions.yang new file mode 100644 index 0000000000..23e90e3f34 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "0.0.1"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-01.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-01.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-01.yin rename to yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-01.yin index 6b4cfb5247..60c968dfea 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-01.yin +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-01.yin @@ -1,13 +1,13 @@ + xmlns:oc-ext="http://openconfig.net/yang/openconfig-ext" name="bar"> - - + + - + @@ -16,7 +16,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/bar@2016-01-31.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-31.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/bar@2016-01-31.yin rename to yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-31.yin index b3fe6a230a..31f989b3bd 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/bar@2016-01-31.yin +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/bar@2016-01-31.yin @@ -1,13 +1,13 @@ + xmlns:oc-ext="http://openconfig.net/yang/openconfig-ext" name="bar"> - - + + - + @@ -16,7 +16,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/foo@2016-02-01.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/foo@2016-02-01.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/foo@2016-02-01.yin rename to yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/foo@2016-02-01.yin index 19c5ea64d9..3183859ffa 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/foo@2016-02-01.yin +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/foo@2016-02-01.yin @@ -1,18 +1,18 @@ + xmlns:oc-ext="http://openconfig.net/yang/openconfig-ext" name="foo"> - + - - + + - + @@ -21,7 +21,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/openconfig-extensions@2017-01-29.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/openconfig-extensions@2017-01-29.yin new file mode 100644 index 0000000000..e93a5a76fb --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/openconfig-extensions@2017-01-29.yin @@ -0,0 +1,97 @@ + + + + + + + OpenConfig working group + + + OpenConfig working group www.openconfig.net + + + + This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined. + + + + + Added extension for annotating encrypted values. + + + TBD + + + + + Initial OpenConfig public release + + + TBD + + + + + Initial revision + + + TBD + + + + + + + + + + The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data. + + + + + + + This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext. + + + + \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-01.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-01.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-01.yin rename to yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-01.yin index ab75b3a61e..a3e08f19b4 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-01.yin +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-01.yin @@ -1,13 +1,13 @@ + xmlns:oc-ext="http://openconfig.net/yang/openconfig-ext" name="bar"> - - + + - + @@ -16,7 +16,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-31.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-31.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-31.yin rename to yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-31.yin index 97d3dea508..959624bed2 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/bar@2016-01-31.yin +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/bar@2016-01-31.yin @@ -1,13 +1,13 @@ + xmlns:oc-ext="http://openconfig.net/yang/openconfig-ext" name="bar"> - - + + - + @@ -16,7 +16,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/foo@2016-02-01.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/foo@2016-02-01.yin similarity index 65% rename from yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/foo@2016-02-01.yin rename to yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/foo@2016-02-01.yin index 19c5ea64d9..3183859ffa 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/foo@2016-02-01.yin +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/foo@2016-02-01.yin @@ -1,18 +1,18 @@ + xmlns:oc-ext="http://openconfig.net/yang/openconfig-ext" name="foo"> - + - - + + - + @@ -21,7 +21,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/openconfig-extensions@2016-01-29.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/openconfig-extensions@2016-01-29.yin new file mode 100644 index 0000000000..e93a5a76fb --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/openconfig-extensions@2016-01-29.yin @@ -0,0 +1,97 @@ + + + + + + + OpenConfig working group + + + OpenConfig working group www.openconfig.net + + + + This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined. + + + + + Added extension for annotating encrypted values. + + + TBD + + + + + Initial OpenConfig public release + + + TBD + + + + + Initial revision + + + TBD + + + + + + + + + + The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data. + + + + + + + This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext. + + + + \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-31.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/bar@2016-01-31.yin similarity index 59% rename from yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-31.yin rename to yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/bar@2016-01-31.yin index 224c76744d..a3a644f944 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/bar@2016-01-31.yin +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/bar@2016-01-31.yin @@ -1,13 +1,13 @@ + xmlns:oc-ext="http://openconfig.net/yang/openconfig-ext" name="bar"> - - - - + + + + @@ -16,7 +16,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/foo@2016-02-01.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/foo@2016-02-01.yin similarity index 60% rename from yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/foo@2016-02-01.yin rename to yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/foo@2016-02-01.yin index 19c5ea64d9..663286d2bf 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/foo@2016-02-01.yin +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/foo@2016-02-01.yin @@ -1,18 +1,18 @@ + xmlns:oc-ext="http://openconfig.net/yang/openconfig-ext" name="foo"> - + - - - - + + + + @@ -21,7 +21,7 @@ - + diff --git a/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/openconfig-extensions@2017-01-29.yin b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/openconfig-extensions@2017-01-29.yin new file mode 100644 index 0000000000..e93a5a76fb --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/openconfig-extensions@2017-01-29.yin @@ -0,0 +1,97 @@ + + + + + + + OpenConfig working group + + + OpenConfig working group www.openconfig.net + + + + This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined. + + + + + Added extension for annotating encrypted values. + + + TBD + + + + + Initial OpenConfig public release + + + TBD + + + + + Initial revision + + + TBD + + + + + + + + + + The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data. + + + + + + + This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext. + + + + \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-03.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-03.yang index 207b4bdb84..3f495b84be 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-03.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1.1; - import semantic-version { prefix sv; sv:semantic-version "1.2.012"; } - import foobar { prefix foobar; sv:semantic-version "2.25.3"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.012"; } + import foobar { prefix foobar; oc-ext:openconfig-version "2.25.3"; } revision "2016-01-03" { description "Imported version"; } - sv:semantic-version "1.2.6"; + oc-ext:openconfig-version "1.2.6"; container root { container test-container { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-04.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-04.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-04.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-04.yang index 8328cbecca..7490e8df60 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/bar@2016-01-04.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/bar@2016-01-04.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1.1; - import semantic-version { prefix sv; sv:semantic-version "1.2.210"; } - import foobar { prefix foobar; sv:semantic-version "2.25.3"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.210"; } + import foobar { prefix foobar; oc-ext:openconfig-version "2.25.3"; } revision "2016-01-04" { description "Not-imported version"; } - sv:semantic-version "2.200.200"; + oc-ext:openconfig-version "2.200.200"; container root { container test-container { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foo.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foo.yang new file mode 100644 index 0000000000..087c05f8b3 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foo.yang @@ -0,0 +1,13 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1.1; + + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.0.0"; } + import bar { prefix bar; oc-ext:openconfig-version "1.2.5"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "1.50.02"; +} diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-01-31.yang similarity index 74% rename from yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-01-31.yang index 773bc65a7a..89863b20a1 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-01-31.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1.1; - import semantic-version { prefix sv; sv:semantic-version "1.2.95"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.2.95"; } revision "2016-01-31" { description "Not-imported version"; } - sv:semantic-version "2.25.2"; + oc-ext:openconfig-version "2.25.2"; grouping test-grouping { leaf name { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-02-28.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-02-28.yang similarity index 74% rename from yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-02-28.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-02-28.yang index 4c92e9f30f..132e305b21 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foobar@2016-02-28.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foobar@2016-02-28.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1.1; - import semantic-version { prefix sv; sv:semantic-version "1.3.95"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "1.3.95"; } revision "2016-02-28" { description "Imported version"; } - sv:semantic-version "2.26.465"; + oc-ext:openconfig-version "2.26.465"; grouping test-grouping { leaf name { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/openconfig-extensions.yang new file mode 100644 index 0000000000..ff84c41722 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1.1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "1.3.95"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-03.yang similarity index 64% rename from yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-03.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-03.yang index f11bdb0943..fe922ff142 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-03.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-03.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "2.0.40"; } - import foobar { prefix foobar; sv:semantic-version "7.12.54"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.0.40"; } + import foobar { prefix foobar; oc-ext:openconfig-version "7.12.54"; } revision "2016-01-03" { description "Imported version"; } - sv:semantic-version "4.9.8"; + oc-ext:openconfig-version "4.9.8"; augment "/foobar:root/foobar:test-container" { leaf should-present-leaf-1 { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-04.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-04.yang similarity index 66% rename from yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-04.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-04.yang index 712b379c01..858bb0466d 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/bar@2016-01-04.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/bar@2016-01-04.yang @@ -3,13 +3,13 @@ module bar { prefix bar; yang-version 1.1; - import semantic-version { prefix sv; sv:semantic-version "2.0.50"; } - import foobar { prefix foobar; sv:semantic-version "7.12.54"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.0.50"; } + import foobar { prefix foobar; oc-ext:openconfig-version "7.12.54"; } revision "2016-01-04" { description "Not-imported version"; } - sv:semantic-version "3.0.5"; + oc-ext:openconfig-version "3.0.5"; augment "/foobar:root/foobar:test-container" { leaf should-not-be-present-leaf-1 { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foo.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foo.yang new file mode 100644 index 0000000000..734f5543c1 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foo.yang @@ -0,0 +1,13 @@ +module foo { + namespace "foo"; + prefix foo; + yang-version 1.1; + + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.40"; } + import bar { prefix bar; oc-ext:openconfig-version "4.1.1"; } + + revision "2016-02-01" { + description "Initial version"; + } + oc-ext:openconfig-version "2.32.2"; +} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-01-31.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-01-31.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-01-31.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-01-31.yang index 435bea628d..7c7ac1aaa3 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-01-31.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-01-31.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "2.1.950"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.1.950"; } revision "2016-01-31" { description "Not-imported version"; } - sv:semantic-version "8.0.0"; + oc-ext:openconfig-version "8.0.0"; container root { leaf included-not-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-27.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-27.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-27.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-27.yang index 8b8f48e1a7..930c1162f4 100644 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foobar@2016-02-27.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-27.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "2.5.50"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.50"; } revision "2016-02-27" { description "Not-imported version"; } - sv:semantic-version "7.13.0"; + oc-ext:openconfig-version "7.13.0"; container root { leaf included-not-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-28.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-28.yang similarity index 70% rename from yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-28.yang rename to yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-28.yang index c45a020a52..676834c3dd 100644 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foobar@2016-02-28.yang +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foobar@2016-02-28.yang @@ -3,12 +3,12 @@ module foobar { prefix foobar; yang-version 1; - import semantic-version { prefix sv; sv:semantic-version "2.5.50"; } + import openconfig-extensions { prefix oc-ext; oc-ext:openconfig-version "2.5.50"; } revision "2016-02-28" { description "Imported version"; } - sv:semantic-version "7.13.99"; + oc-ext:openconfig-version "7.13.99"; container root { leaf included-correct-mark { diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/openconfig-extensions.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/openconfig-extensions.yang new file mode 100644 index 0000000000..9b021b6590 --- /dev/null +++ b/yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/openconfig-extensions.yang @@ -0,0 +1,84 @@ +module openconfig-extensions { + yang-version "1"; + namespace "http://openconfig.net/yang/openconfig-ext"; + prefix "oc-ext"; + + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides extensions to the YANG language to allow + OpenConfig specific functionality and meta-data to be defined."; + + revision "2017-01-29" { + description + "Added extension for annotating encrypted values."; + reference "TBD"; + } + + revision "2015-10-09" { + description + "Initial OpenConfig public release"; + reference "TBD"; + } + + revision "2015-10-05" { + description + "Initial revision"; + reference "TBD"; + } + + oc-ext:openconfig-version "2.5.50"; + + extension openconfig-version { + argument "semver" { + yin-element false; + } + description + "The OpenConfig version number for the module. This is + expressed as a semantic version number of the form: + x.y.z + where: + * x corresponds to the major version, + * y corresponds to a minor version, + * z corresponds to a patch version. + This version corresponds to the model file within which it is + defined, and does not cover the whole set of OpenConfig models. + Where several modules are used to build up a single block of + functionality, the same module version is specified across each + file that makes up the module. + + A major version number of 0 indicates that this model is still + in development (whether within OpenConfig or with industry + partners), and is potentially subject to change. + + Following a release of major version 1, all modules will + increment major revision number where backwards incompatible + changes to the model are made. + + The minor version is changed when features are added to the + model that do not impact current clients use of the model. + + The patch-level version is incremented when non-feature changes + (such as bugfixes or clarifications to human-readable + descriptions that do not impact model functionality) are made + that maintain backwards compatibility. + + The version number is stored in the module meta-data."; + } + + extension openconfig-encrypted-value { + description + "This extension provides an annotation on schema nodes to + indicate that the corresponding value should be stored and + reported in encrypted form. + Clients reading the configuration or applied configuration + for the node should expect to receive only the encrypted value. + This annotation may be used on nodes such as secure passwords + in which the device never reports a cleartext value, even + if the input is provided as cleartext."; + } +} \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foo.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foo.yang deleted file mode 100644 index e3828f085f..0000000000 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foo.yang +++ /dev/null @@ -1,13 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1.1; - - import semantic-version { prefix sv; sv:semantic-version "1.0.0"; } - import bar { prefix bar; sv:semantic-version "1.2.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "1.50.02"; -} diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foo.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foo.yang deleted file mode 100644 index 3955eb50f4..0000000000 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foo.yang +++ /dev/null @@ -1,13 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1.1; - - import semantic-version { prefix sv; sv:semantic-version "2.5.40"; } - import bar { prefix bar; sv:semantic-version "4.1.1"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "2.32.2"; -} diff --git a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/semantic-version.yang deleted file mode 100644 index a7e5ba2a62..0000000000 --- a/yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "2.5.50"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-3/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/foo.yang deleted file mode 100644 index 220c9cc582..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/foo.yang deleted file mode 100644 index 220c9cc582..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/foo.yang deleted file mode 100644 index dda1144dff..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic/foo.yang deleted file mode 100644 index dda1144dff..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/basic/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/foo.yang deleted file mode 100644 index c89c60d0df..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/foo.yang deleted file mode 100644 index c89c60d0df..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang deleted file mode 100644 index f6dd765b7f..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "5.5.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/foo.yang deleted file mode 100644 index c89c60d0df..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-01.yang deleted file mode 100644 index c331b9ec67..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "4.5.5"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/foo.yang deleted file mode 100644 index c89c60d0df..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-01.yang deleted file mode 100644 index c129995474..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "5.4.5"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-02.yang deleted file mode 100644 index 920c18af50..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - sv:semantic-version "5.5.5"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-03.yang deleted file mode 100644 index da8327c89d..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-03.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-03" { - description "Initial version"; - } - sv:semantic-version "5.6.5"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/foo.yang deleted file mode 100644 index c89c60d0df..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-01.yang deleted file mode 100644 index 939c7e81fd..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "5.5.4"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-02.yang deleted file mode 100644 index 920c18af50..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - sv:semantic-version "5.5.5"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-03.yang deleted file mode 100644 index 5d3f96d0ff..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-03.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-03" { - description "Initial version"; - } - sv:semantic-version "5.5.6"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/foo.yang deleted file mode 100644 index c89c60d0df..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foo.yang deleted file mode 100644 index bce4b87d0b..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foo.yang +++ /dev/null @@ -1,13 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; sv:semantic-version "1.0.0"; } - import bar { prefix bar; sv:semantic-version "1.2.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "1.50.02"; -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/semantic-version.yang deleted file mode 100644 index a8de91cac2..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "1.3.95"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foo.yang deleted file mode 100644 index 5be60d8920..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foo.yang +++ /dev/null @@ -1,13 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; sv:semantic-version "2.5.40"; } - import bar { prefix bar; sv:semantic-version "4.1.1"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "2.32.2"; -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/semantic-version.yang deleted file mode 100644 index a7e5ba2a62..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "2.5.50"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/bar.yang deleted file mode 100644 index 678f4f60e9..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/bar.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-31" { - description "Initial version"; - } - sv:semantic-version "0.99.99"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-01.yang deleted file mode 100644 index 54da0db564..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/foo.yang deleted file mode 100644 index dda1144dff..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/bar@2016-01-01.yang deleted file mode 100644 index 54da0db564..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/foo.yang deleted file mode 100644 index dda1144dff..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/semantic-version.yang deleted file mode 100644 index ca9b177b6a..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "2.0.0"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/semantic-version.yang deleted file mode 100644 index 5b1f6163d5..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "1.0.0"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/semantic-version.yang deleted file mode 100644 index 5b1f6163d5..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "1.0.0"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/semantic-version.yang deleted file mode 100644 index ca9b177b6a..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "2.0.0"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/foo.yang deleted file mode 100644 index a6c665bd3e..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/foo.yang +++ /dev/null @@ -1,14 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "1.0.0"; } - - revision "2016-02-01" { - description "Initial version"; - } - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/semantic-version.yang deleted file mode 100644 index 5b1f6163d5..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "1.0.0"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-01.yang deleted file mode 100644 index fdab507214..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-02.yang deleted file mode 100644 index 388f7f15a3..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - sv:semantic-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-03.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-03.yang deleted file mode 100644 index 1b7d0e319f..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-03.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-03" { - description "Initial version"; - } - sv:semantic-version "0.1.3"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/foo.yang deleted file mode 100644 index 220c9cc582..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang deleted file mode 100644 index 6352253fb4..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "2.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang deleted file mode 100644 index db806e8d6d..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - sv:semantic-version "2.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/foo.yang deleted file mode 100644 index 3a2ab942c2..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "1.0.0"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang deleted file mode 100644 index 4422f6d2d9..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "2.0.0"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang deleted file mode 100644 index 9d916f6b27..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - sv:semantic-version "2.1.0"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/foo.yang deleted file mode 100644 index ec773ae546..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "2.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang deleted file mode 100644 index 5c6572cd05..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "0.0.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang deleted file mode 100644 index b819db324a..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - sv:semantic-version "0.1.0"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-01.yang deleted file mode 100644 index 732609a657..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "4.4.0"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-02.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-02.yang deleted file mode 100644 index 82dd7efcba..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-02.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-02" { - description "Initial version"; - } - sv:semantic-version "5.5.0"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/foo.yang deleted file mode 100644 index c89c60d0df..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; sv:semantic-version "5.5.5"; } - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/foo.yang deleted file mode 100644 index b4af34672c..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/foo.yang +++ /dev/null @@ -1,18 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; revision-date 2017-04-06; sv:semantic-version "2016.4.5"; } - - revision 2016-01-01 { - description "test"; - } - - sv:semantic-version "2016.1.1"; - - container foo-root { - uses bar:grp; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/node-test/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/foo.yang deleted file mode 100644 index 4aee60f5bb..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/foo.yang +++ /dev/null @@ -1,17 +0,0 @@ -module foo { - sv:semantic-version "0.1.1"; - import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} - - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-02-01" { - description "Initial version"; - } - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/bar.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/bar.yang deleted file mode 100644 index 2adc1363ba..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/bar.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-31" { - description "Initial version"; - } - sv:semantic-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/foo.yang deleted file mode 100644 index dda1144dff..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/foo.yang deleted file mode 100644 index 67e9025fc4..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/foo.yang +++ /dev/null @@ -1,17 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-02-01" { - description "Initial version"; - } - - container root { - } - - sv:semantic-version "0.1.1"; - import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/bar@2016-01-01.yang deleted file mode 100644 index 54da0db564..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/foo.yang deleted file mode 100644 index dda1144dff..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-31; sv:semantic-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/bar@2016-01-01.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/bar@2016-01-01.yang deleted file mode 100644 index 54da0db564..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/bar@2016-01-01.yang +++ /dev/null @@ -1,15 +0,0 @@ -module bar { - namespace "bar"; - prefix bar; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - - revision "2016-01-01" { - description "Initial version"; - } - sv:semantic-version "0.1.2"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/foo.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/foo.yang deleted file mode 100644 index fd7d13f655..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/foo.yang +++ /dev/null @@ -1,16 +0,0 @@ -module foo { - namespace "foo"; - prefix foo; - yang-version 1; - - import semantic-version { prefix sv; revision-date 2016-02-02; sv:semantic-version "0.0.1"; } - import bar { prefix bar; revision-date 2016-01-01; sv:semantic-version "0.1.2";} - - revision "2016-02-01" { - description "Initial version"; - } - sv:semantic-version "0.1.1"; - - container root { - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/semantic-version.yang +++ /dev/null @@ -1,47 +0,0 @@ -module semantic-version { - namespace "urn:opendaylight:yang:extension:semantic-version"; - prefix sv; - yang-version 1; - - revision 2016-02-02 { - description "Initial verison"; - } - sv:semantic-version "0.0.1"; - - extension semantic-version { - argument "semantic-version" { - yin-element false; - } - description - "The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data."; - } -} diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/semantic-version@2016-02-02.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/semantic-version@2016-02-02.yin deleted file mode 100644 index fe7aeb9346..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/semantic-version@2016-02-02.yin +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data. - - - - \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/semantic-version@2016-02-02.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/semantic-version@2016-02-02.yin deleted file mode 100644 index fe7aeb9346..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/semantic-version@2016-02-02.yin +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data. - - - - \ No newline at end of file diff --git a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/semantic-version@2016-02-02.yin b/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/semantic-version@2016-02-02.yin deleted file mode 100644 index fe7aeb9346..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/semantic-version@2016-02-02.yin +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - The OpenConfig version number for the module. This is - expressed as a semantic version number of the form: - x.y.z - where: - * x corresponds to the major version, - * y corresponds to a minor version, - * z corresponds to a patch version. - This version corresponds to the model file within which it is - defined, and does not cover the whole set of OpenConfig models. - Where several modules are used to build up a single block of - functionality, the same module version is specified across each - file that makes up the module. - - A major version number of 0 indicates that this model is still - in development (whether within OpenConfig or with industry - partners), and is potentially subject to change. - - Following a release of major version 1, all modules will - increment major revision number where backwards incompatible - changes to the model are made. - - The minor version is changed when features are added to the - model that do not impact current clients use of the model. - - The patch-level version is incremented when non-feature changes - (such as bugfixes or clarifications to human-readable - descriptions that do not impact model functionality) are made - that maintain backwards compatibility. - - The version number is stored in the module meta-data. - - - - \ No newline at end of file