From e826b441fd88057793b5cea7e784522ea7adcd40 Mon Sep 17 00:00:00 2001 From: Igor Foltin Date: Wed, 24 May 2017 14:39:34 +0200 Subject: [PATCH] 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. Refactor the semantic version related code to use the openconfig-version naming. Adjust existing unit tests accordingly. Change-Id: I25f4f1a6e070b214d1f8ae466639c6dd41899a09 Signed-off-by: Igor Foltin --- .../yangtools/yang/model/api/Module.java | 4 +- .../yang/model/api/ModuleIdentifier.java | 13 ++- .../yang/model/api/ModuleImport.java | 6 +- ...ava => OpenconfigVerSourceIdentifier.java} | 58 +++++------ .../yang/model/repo/api/SourceIdentifier.java | 10 +- .../model/repo/api/StatementParserMode.java | 6 +- .../yang/model/util/ModuleIdentifierImpl.java | 8 +- .../model/util/SchemaContextProxyTest.java | 4 +- .../impl/util/YangModelDependencyInfo.java | 25 +++-- .../yang/parser/repo/DependencyResolver.java | 2 +- ...a => OpenconfigVerDependencyResolver.java} | 14 +-- .../repo/SharedSchemaContextFactory.java | 8 +- .../parser/spi/meta/ModelProcessingPhase.java | 2 +- ... => OpenconfigVersionModuleNamespace.java} | 4 +- ...e.java => OpenconfigVersionNamespace.java} | 4 +- .../yang/parser/spi/meta/StmtContext.java | 2 +- ...refixToOpenconfigVerModuleIdentifier.java} | 4 +- .../spi/source/StatementStreamSource.java | 2 +- .../stmt/reactor/BuildGlobalContext.java | 16 +-- .../reactor/CrossSourceStatementReactor.java | 2 +- .../stmt/reactor/RootStatementContext.java | 4 +- .../stmt/reactor/SourceSpecificContext.java | 4 +- .../stmt/reactor/SubstatementContext.java | 4 +- .../rfc6020/ImportStatementDefinition.java | 28 +++--- .../stmt/rfc6020/ModuleStatementSupport.java | 20 ++-- ...va => OpenconfigVersionStatementImpl.java} | 22 ++--- .../rfc6020/SupportedExtensionsMapping.java | 8 +- .../stmt/rfc6020/YangInferencePipeline.java | 14 +-- .../effective/AbstractEffectiveModule.java | 8 +- .../ImportEffectiveStatementImpl.java | 14 +-- .../rfc6020/effective/ModuleImportImpl.java | 8 +- ...nconfigVersionEffectiveStatementImpl.java} | 6 +- .../ImportStatementRfc7950Support.java | 2 +- .../ModuleStatementRfc7950Support.java | 2 +- .../yang/parser/util/ASTSchemaSource.java | 30 +++--- ...nconfigVerSharedSchemaRepositoryTest.java} | 20 ++-- .../OpenconfigVersionBorderCaseTest.java} | 58 +++++------ .../OpenconfigVersionComplexTest.java} | 40 ++++---- .../OpenconfigVersionDefaultsTest.java} | 26 ++--- ...penconfigVersionIgnoringRevisionTest.java} | 28 +++--- .../OpenconfigVersionImportTest.java} | 44 ++++----- .../OpenconfigVersionMultipleImportTest.java} | 40 ++++---- .../OpenconfigVersionPositionTest.java} | 40 ++++---- .../OpenconfigVersionTest.java} | 82 ++++++++-------- .../yin/YinOpenconfigVersionTest.java} | 32 +++--- .../basic-2/bar.yang | 4 +- .../basic-2/foo.yang | 4 +- .../basic-2/openconfig-extensions.yang} | 56 +++++++++-- .../basic-3/foo.yang | 4 +- .../basic-3/openconfig-extensions.yang} | 57 +++++++++-- .../basic-import-1/bar@2016-01-01.yang | 4 +- .../basic-import-1}/bar@2016-01-31.yang | 4 +- .../basic-import-1/foo.yang | 16 +++ .../openconfig-extensions.yang} | 57 +++++++++-- .../bar@2016-01-01.yang | 4 +- .../bar@2016-01-31.yang | 4 +- .../basic-import-invalid-1/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../basic-import-invalid-2}/bar.yang | 4 +- .../basic-import-invalid-2/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../basic}/bar.yang | 4 +- .../openconfig-version/basic/foo.yang | 16 +++ .../basic/openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 4 +- .../bar@2016-01-02.yang | 4 +- .../bar@2016-01-03.yang | 4 +- .../border-case-invalid-major/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 4 +- .../bar@2016-01-02.yang | 4 +- .../bar@2016-01-03.yang | 4 +- .../border-case-invalid-minor/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 4 +- .../bar@2016-01-03.yang | 4 +- .../border-case-invalid-patch/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 4 +- .../bar@2016-01-03.yang | 4 +- .../border-case-valid-major/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-01-03.yang | 15 +++ .../border-case-valid-minor/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-01-03.yang | 15 +++ .../border-case-valid-patch/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../complex/complex-1/bar@2016-01-03.yang | 6 +- .../complex/complex-1/bar@2016-01-04.yang | 6 +- .../complex/complex-1/foo.yang | 13 +++ .../complex/complex-1/foobar@2016-01-31.yang | 4 +- .../complex/complex-1/foobar@2016-02-28.yang | 4 +- .../complex-1/openconfig-extensions.yang | 84 ++++++++++++++++ .../complex/complex-2/bar@2016-01-03.yang | 6 +- .../complex/complex-2/bar@2016-01-04.yang | 6 +- .../complex/complex-2/foo.yang | 13 +++ .../complex}/complex-2/foobar@2016-01-31.yang | 4 +- .../complex}/complex-2/foobar@2016-02-27.yang | 4 +- .../complex/complex-2/foobar@2016-02-28.yang | 4 +- .../complex-2/openconfig-extensions.yang | 84 ++++++++++++++++ .../defaults/default-major-invalid}/bar.yang | 4 +- .../defaults/default-major-invalid/foo.yang | 2 +- .../openconfig-extensions.yang | 84 ++++++++++++++++ .../defaults/default-major-valid/bar.yang | 15 +++ .../defaults/default-major-valid/foo.yang | 2 +- .../openconfig-extensions.yang | 84 ++++++++++++++++ .../defaults/defaults/bar.yang | 0 .../defaults/defaults/foo.yang | 0 .../ignoring-revision-2/bar@2016-01-01.yang | 15 +++ .../ignoring-revision-2/bar@2016-01-31.yang | 4 +- .../ignoring-revision-2/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../ignoring-revision/bar@2016-01-01.yang | 15 +++ .../ignoring-revision/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../import-invalid-deprecated-1/foo.yang | 2 +- .../openconfig-extensions.yang | 84 ++++++++++++++++ .../import-invalid-deprecated-2}/foo.yang | 2 +- .../openconfig-extensions.yang | 84 ++++++++++++++++ .../import-invalid-notsufficient-1}/foo.yang | 2 +- .../openconfig-extensions.yang | 84 ++++++++++++++++ .../import-invalid-notsufficient-2}/foo.yang | 2 +- .../openconfig-extensions.yang | 84 ++++++++++++++++ .../import/import-valid/foo.yang | 14 +++ .../import-valid/openconfig-extensions.yang | 84 ++++++++++++++++ .../multiple-modules/bar@2016-01-01.yang | 15 +++ .../multiple-modules/bar@2016-01-02.yang | 15 +++ .../multiple-modules/bar@2016-01-03.yang | 15 +++ .../multiple-modules/bar@2016-01-04.yang | 4 +- .../multiple-modules/bar@2016-01-31.yang | 4 +- .../multiple-modules/bar@2016-02-28.yang | 4 +- .../multiple-modules/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-02-01.yang | 4 +- .../bar@2016-02-02.yang | 4 +- .../multiple-invalid-deprecated/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-02-01.yang | 4 +- .../bar@2016-02-02.yang | 4 +- .../multiple-invalid-nosufficient/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-02-01.yang | 4 +- .../bar@2016-02-02.yang | 4 +- .../multiple/multiple-valid-defaults/foo.yang | 4 +- .../openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 15 +++ .../bar@2016-01-02.yang | 15 +++ .../bar@2016-02-01.yang | 4 +- .../bar@2016-02-02.yang | 4 +- .../multiple-valid-specified/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../node-test/bar@20160404.yang | 4 +- .../node-test/bar@20160405.yang | 4 +- .../node-test/bar@20160406.yang | 4 +- .../node-test/bar@20170406.yang | 4 +- .../openconfig-version/node-test/foo.yang | 18 ++++ .../node-test/openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 15 +++ .../foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../position/position-head/bar.yang | 4 +- .../position/position-head/foo.yang | 17 ++++ .../position-head/openconfig-extensions.yang} | 55 +++++++++-- .../position/position-middle/bar.yang | 15 +++ .../position/position-middle/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../position/position-tail/bar.yang | 4 +- .../position/position-tail/foo.yang | 17 ++++ .../position-tail/openconfig-extensions.yang | 84 ++++++++++++++++ .../bar@2016-01-01.yang | 15 +++ .../shared-schema-repository/foo.yang | 16 +++ .../openconfig-extensions.yang | 84 ++++++++++++++++ .../basic-import-invalid/bar@2016-01-01.yin | 10 +- .../basic-import-invalid}/bar@2016-01-31.yin | 10 +- .../basic-import-invalid}/foo@2016-02-01.yin | 12 +-- .../openconfig-extensions@2017-01-29.yin | 97 +++++++++++++++++++ .../yin-input/basic-import/bar@2016-01-01.yin | 10 +- .../basic-import}/bar@2016-01-31.yin | 10 +- .../basic-import}/foo@2016-02-01.yin | 12 +-- .../openconfig-extensions@2016-01-29.yin | 97 +++++++++++++++++++ .../yin-input/basic}/bar@2016-01-31.yin | 12 +-- .../yin-input/basic}/foo@2016-02-01.yin | 14 +-- .../openconfig-extensions@2017-01-29.yin | 97 +++++++++++++++++++ .../complex-1/bar@2016-01-03.yang | 6 +- .../complex-1/bar@2016-01-04.yang | 6 +- .../openconfig-version/complex-1/foo.yang | 13 +++ .../complex-1/foobar@2016-01-31.yang | 4 +- .../complex-1/foobar@2016-02-28.yang | 4 +- .../complex-1/openconfig-extensions.yang | 84 ++++++++++++++++ .../complex-2/bar@2016-01-03.yang | 6 +- .../complex-2/bar@2016-01-04.yang | 6 +- .../openconfig-version/complex-2/foo.yang | 13 +++ .../complex-2/foobar@2016-01-31.yang | 4 +- .../complex-2/foobar@2016-02-27.yang | 4 +- .../complex-2/foobar@2016-02-28.yang | 4 +- .../complex-2/openconfig-extensions.yang | 84 ++++++++++++++++ .../semantic-version/complex-1/foo.yang | 13 --- .../semantic-version/complex-2/foo.yang | 13 --- .../complex-2/semantic-version.yang | 47 --------- .../basic-2/semantic-version.yang | 47 --------- .../semantic-version/basic-import-1/foo.yang | 16 --- .../basic-import-1/semantic-version.yang | 47 --------- .../basic-import-invalid-1/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../basic-import-invalid-2/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../resources/semantic-version/basic/foo.yang | 16 --- .../basic/semantic-version.yang | 47 --------- .../border-case-invalid-major/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../border-case-invalid-minor/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../bar@2016-01-01.yang | 15 --- .../border-case-invalid-patch/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../bar@2016-01-01.yang | 15 --- .../border-case-valid-major/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../bar@2016-01-03.yang | 15 --- .../border-case-valid-minor/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../bar@2016-01-03.yang | 15 --- .../border-case-valid-patch/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../complex/complex-1/foo.yang | 13 --- .../complex/complex-1/semantic-version.yang | 47 --------- .../complex/complex-2/foo.yang | 13 --- .../complex/complex-2/semantic-version.yang | 47 --------- .../semantic-version.yang | 47 --------- .../defaults/default-major-valid/bar.yang | 15 --- .../default-major-valid/semantic-version.yang | 47 --------- .../ignoring-revision-2/bar@2016-01-01.yang | 15 --- .../ignoring-revision-2/foo.yang | 16 --- .../ignoring-revision-2/semantic-version.yang | 47 --------- .../ignoring-revision/bar@2016-01-01.yang | 15 --- .../ignoring-revision/foo.yang | 16 --- .../ignoring-revision/semantic-version.yang | 47 --------- .../semantic-version.yang | 47 --------- .../semantic-version.yang | 47 --------- .../semantic-version.yang | 47 --------- .../semantic-version.yang | 47 --------- .../import/import-valid/foo.yang | 14 --- .../import/import-valid/semantic-version.yang | 47 --------- .../multiple-modules/bar@2016-01-01.yang | 15 --- .../multiple-modules/bar@2016-01-02.yang | 15 --- .../multiple-modules/bar@2016-01-03.yang | 15 --- .../multiple-modules/foo.yang | 16 --- .../multiple-modules/semantic-version.yang | 47 --------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../multiple-invalid-deprecated/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../multiple-invalid-nosufficient/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../semantic-version.yang | 47 --------- .../bar@2016-01-01.yang | 15 --- .../bar@2016-01-02.yang | 15 --- .../multiple-valid-specified/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../semantic-version/node-test/foo.yang | 18 ---- .../node-test/semantic-version.yang | 47 --------- .../position/position-head/foo.yang | 17 ---- .../position/position-middle/bar.yang | 15 --- .../position/position-middle/foo.yang | 16 --- .../position-middle/semantic-version.yang | 47 --------- .../position/position-tail/foo.yang | 17 ---- .../bar@2016-01-01.yang | 15 --- .../semver-shared-schema-repository/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../bar@2016-01-01.yang | 15 --- .../shared-schema-repository/foo.yang | 16 --- .../semantic-version.yang | 47 --------- .../semantic-version@2016-02-02.yin | 54 ----------- .../semantic-version@2016-02-02.yin | 54 ----------- .../basic/semantic-version@2016-02-02.yin | 54 ----------- 296 files changed, 4522 insertions(+), 3066 deletions(-) rename yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/{SemVerSourceIdentifier.java => OpenconfigVerSourceIdentifier.java} (59%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/{SemVerDependencyResolver.java => OpenconfigVerDependencyResolver.java} (71%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/{SemanticVersionModuleNamespace.java => OpenconfigVersionModuleNamespace.java} (75%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/{SemanticVersionNamespace.java => OpenconfigVersionNamespace.java} (76%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/{ImpPrefixToSemVerModuleIdentifier.java => ImpPrefixToOpenconfigVerModuleIdentifier.java} (81%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/{SemanticVersionStatementImpl.java => OpenconfigVersionStatementImpl.java} (76%) rename yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/{SemanticVersionEffectiveStatementImpl.java => OpenconfigVersionEffectiveStatementImpl.java} (90%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/repo/{SemVerSharedSchemaRepositoryTest.java => OpenconfigVerSharedSchemaRepositoryTest.java} (86%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{semver/SemanticVersionBorderCaseTest.java => openconfigver/OpenconfigVersionBorderCaseTest.java} (57%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{semver/SemanticVersionComplexTest.java => openconfigver/OpenconfigVersionComplexTest.java} (79%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{semver/SemanticVersionDefaultsTest.java => openconfigver/OpenconfigVersionDefaultsTest.java} (69%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{semver/SemanticVersionIgnoringRevisionTest.java => openconfigver/OpenconfigVersionIgnoringRevisionTest.java} (60%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{semver/SemanticVersionImportTest.java => openconfigver/OpenconfigVersionImportTest.java} (57%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{semver/SemanticVersionMultipleImportTest.java => openconfigver/OpenconfigVersionMultipleImportTest.java} (66%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{semver/SemanticVersionPositionTest.java => openconfigver/OpenconfigVersionPositionTest.java} (56%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{semver/SemanticVersionTest.java => openconfigver/OpenconfigVersionTest.java} (63%) rename yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/stmt/{semver/yin/YinSemanticVersionTest.java => openconfigver/yin/YinOpenconfigVersionTest.java} (66%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/basic-2/bar.yang (60%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/basic-2/foo.yang (66%) rename yang/yang-parser-impl/src/test/resources/{semantic-version/position/position-tail/semantic-version.yang => openconfig-version/basic-2/openconfig-extensions.yang} (51%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/basic-3/foo.yang (53%) rename yang/yang-parser-impl/src/test/resources/{rfc7950/semantic-version/complex-1/semantic-version.yang => openconfig-version/basic-3/openconfig-extensions.yang} (51%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/basic-import-1/bar@2016-01-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version/basic-import-invalid-1 => openconfig-version/basic-import-1}/bar@2016-01-31.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-1/foo.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version/basic-3/semantic-version.yang => openconfig-version/basic-import-1/openconfig-extensions.yang} (51%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/basic-import-invalid-1/bar@2016-01-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version/basic-import-1 => openconfig-version/basic-import-invalid-1}/bar@2016-01-31.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-1/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version/basic => openconfig-version/basic-import-invalid-2}/bar.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic-import-invalid-2/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version/defaults/default-major-invalid => openconfig-version/basic}/bar.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/basic/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/border-case/border-case-invalid-major/bar@2016-01-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/border-case/border-case-invalid-major/bar@2016-01-02.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/border-case/border-case-invalid-major/bar@2016-01-03.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-major/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/border-case/border-case-invalid-minor/bar@2016-01-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/border-case/border-case-invalid-minor/bar@2016-01-02.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/border-case/border-case-invalid-minor/bar@2016-01-03.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-minor/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/border-case/border-case-invalid-patch/bar@2016-01-02.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/border-case/border-case-invalid-patch/bar@2016-01-03.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-invalid-patch/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/bar@2016-01-01.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/border-case/border-case-valid-major/bar@2016-01-02.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/border-case/border-case-valid-major/bar@2016-01-03.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-major/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-02.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/bar@2016-01-03.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-minor/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-02.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/bar@2016-01-03.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/border-case/border-case-valid-patch/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/complex/complex-1/bar@2016-01-03.yang (64%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/complex/complex-1/bar@2016-01-04.yang (64%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/foo.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/complex/complex-1/foobar@2016-01-31.yang (74%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/complex/complex-1/foobar@2016-02-28.yang (74%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-1/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/complex/complex-2/bar@2016-01-03.yang (64%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/complex/complex-2/bar@2016-01-04.yang (65%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/foo.yang rename yang/yang-parser-impl/src/test/resources/{rfc7950/semantic-version => openconfig-version/complex}/complex-2/foobar@2016-01-31.yang (70%) rename yang/yang-parser-impl/src/test/resources/{rfc7950/semantic-version => openconfig-version/complex}/complex-2/foobar@2016-02-27.yang (70%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/complex/complex-2/foobar@2016-02-28.yang (70%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/complex/complex-2/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version/basic-import-invalid-2 => openconfig-version/defaults/default-major-invalid}/bar.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/defaults/default-major-invalid/foo.yang (67%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-invalid/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/bar.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/defaults/default-major-valid/foo.yang (67%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/defaults/default-major-valid/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/defaults/defaults/bar.yang (100%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/defaults/defaults/foo.yang (100%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/bar@2016-01-01.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/ignoring-revision-2/bar@2016-01-31.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision-2/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/ignoring-revision/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/import/import-invalid-deprecated-1/foo.yang (60%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-1/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version/import/import-invalid-notsufficient-2 => openconfig-version/import/import-invalid-deprecated-2}/foo.yang (60%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-deprecated-2/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version/import/import-invalid-deprecated-2 => openconfig-version/import/import-invalid-notsufficient-1}/foo.yang (60%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-1/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version/import/import-invalid-notsufficient-1 => openconfig-version/import/import-invalid-notsufficient-2}/foo.yang (60%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-invalid-notsufficient-2/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/import/import-valid/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-02.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/bar@2016-01-03.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple-modules/bar@2016-01-04.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple-modules/bar@2016-01-31.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple-modules/bar@2016-02-28.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple-modules/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple/multiple-invalid-deprecated/bar@2016-02-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple/multiple-invalid-deprecated/bar@2016-02-02.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-deprecated/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple/multiple-invalid-nosufficient/bar@2016-02-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple/multiple-invalid-nosufficient/bar@2016-02-02.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-invalid-nosufficient/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple/multiple-valid-defaults/bar@2016-02-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple/multiple-valid-defaults/bar@2016-02-02.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple/multiple-valid-defaults/foo.yang (57%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-defaults/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/bar@2016-01-02.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple/multiple-valid-specified/bar@2016-02-01.yang (53%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/multiple/multiple-valid-specified/bar@2016-02-02.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/multiple/multiple-valid-specified/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/node-test/bar@20160404.yang (57%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/node-test/bar@20160405.yang (62%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/node-test/bar@20160406.yang (65%) rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/node-test/bar@20170406.yang (68%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/node-test/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/openconfigver-shared-schema-repository/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/position/position-head/bar.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-head/foo.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version/position/position-head/semantic-version.yang => openconfig-version/position/position-head/openconfig-extensions.yang} (51%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/bar.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-middle/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/position/position-tail/bar.yang (53%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/position/position-tail/openconfig-extensions.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/bar@2016-01-01.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/foo.yang create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/shared-schema-repository/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/yin-input/basic-import-invalid/bar@2016-01-01.yin (65%) rename yang/yang-parser-impl/src/test/resources/{semantic-version/yin-input/basic => openconfig-version/yin-input/basic-import-invalid}/bar@2016-01-31.yin (65%) rename yang/yang-parser-impl/src/test/resources/{semantic-version/yin-input/basic-import => openconfig-version/yin-input/basic-import-invalid}/foo@2016-02-01.yin (65%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import-invalid/openconfig-extensions@2017-01-29.yin rename yang/yang-parser-impl/src/test/resources/{semantic-version => openconfig-version}/yin-input/basic-import/bar@2016-01-01.yin (65%) rename yang/yang-parser-impl/src/test/resources/{semantic-version/yin-input/basic-import-invalid => openconfig-version/yin-input/basic-import}/bar@2016-01-31.yin (65%) rename yang/yang-parser-impl/src/test/resources/{semantic-version/yin-input/basic => openconfig-version/yin-input/basic-import}/foo@2016-02-01.yin (65%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic-import/openconfig-extensions@2016-01-29.yin rename yang/yang-parser-impl/src/test/resources/{semantic-version/yin-input/basic-import => openconfig-version/yin-input/basic}/bar@2016-01-31.yin (59%) rename yang/yang-parser-impl/src/test/resources/{semantic-version/yin-input/basic-import-invalid => openconfig-version/yin-input/basic}/foo@2016-02-01.yin (60%) create mode 100644 yang/yang-parser-impl/src/test/resources/openconfig-version/yin-input/basic/openconfig-extensions@2017-01-29.yin rename yang/yang-parser-impl/src/test/resources/rfc7950/{semantic-version => openconfig-version}/complex-1/bar@2016-01-03.yang (64%) rename yang/yang-parser-impl/src/test/resources/rfc7950/{semantic-version => openconfig-version}/complex-1/bar@2016-01-04.yang (64%) create mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/foo.yang rename yang/yang-parser-impl/src/test/resources/rfc7950/{semantic-version => openconfig-version}/complex-1/foobar@2016-01-31.yang (74%) rename yang/yang-parser-impl/src/test/resources/rfc7950/{semantic-version => openconfig-version}/complex-1/foobar@2016-02-28.yang (74%) create mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-1/openconfig-extensions.yang rename yang/yang-parser-impl/src/test/resources/rfc7950/{semantic-version => openconfig-version}/complex-2/bar@2016-01-03.yang (64%) rename yang/yang-parser-impl/src/test/resources/rfc7950/{semantic-version => openconfig-version}/complex-2/bar@2016-01-04.yang (66%) create mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/foo.yang rename yang/yang-parser-impl/src/test/resources/{semantic-version/complex => rfc7950/openconfig-version}/complex-2/foobar@2016-01-31.yang (70%) rename yang/yang-parser-impl/src/test/resources/{semantic-version/complex => rfc7950/openconfig-version}/complex-2/foobar@2016-02-27.yang (70%) rename yang/yang-parser-impl/src/test/resources/rfc7950/{semantic-version => openconfig-version}/complex-2/foobar@2016-02-28.yang (70%) create mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/openconfig-version/complex-2/openconfig-extensions.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-1/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/rfc7950/semantic-version/complex-2/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-1/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-1/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic-import-invalid-2/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/basic/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-major/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-minor/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-invalid-patch/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-major/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/bar@2016-01-03.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-minor/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/bar@2016-01-03.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/border-case/border-case-valid-patch/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-1/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/complex/complex-2/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-invalid/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/bar.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/defaults/default-major-valid/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision-2/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/ignoring-revision/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-1/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-deprecated-2/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-1/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-invalid-notsufficient-2/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/import/import-valid/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/bar@2016-01-03.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple-modules/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-deprecated/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-invalid-nosufficient/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-defaults/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/bar@2016-01-02.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/multiple/multiple-valid-specified/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/node-test/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/node-test/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/position/position-head/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/bar.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/position/position-middle/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/position/position-tail/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/semver-shared-schema-repository/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/bar@2016-01-01.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/foo.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/shared-schema-repository/semantic-version.yang delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import-invalid/semantic-version@2016-02-02.yin delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic-import/semantic-version@2016-02-02.yin delete mode 100644 yang/yang-parser-impl/src/test/resources/semantic-version/yin-input/basic/semantic-version@2016-02-02.yin diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/Module.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/Module.java index d64a4de98c..0088db2558 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/Module.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/Module.java @@ -61,9 +61,9 @@ import org.opendaylight.yangtools.concepts.SemVer; @Immutable public interface Module extends DataNodeContainer, SourceStreamAware, ModuleIdentifier, NotificationNodeContainer { /** - * Default semantic version of Module. + * Default openconfig version of Module. */ - SemVer DEFAULT_SEMANTIC_VERSION = SemVer.create(0, 0, 0); + SemVer DEFAULT_OPENCONFIG_VERSION = SemVer.create(0, 0, 0); /** * Returns the prefix of the module diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleIdentifier.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleIdentifier.java index 6afd21a3d5..9ede1bf913 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleIdentifier.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleIdentifier.java @@ -55,17 +55,16 @@ public interface ModuleIdentifier { Date getRevision(); /** - * Returns the semantic version of yang module. + * Returns the openconfig version of yang module. * - * If the semantic version is not specified, default semantic version of + * If the openconfig version is not specified, default openconfig version of * module is returned. * - * @return SemVer semantic version of yang module which is specified as + * @return SemVer openconfig version of yang module which is specified as * argument of - * (urn:opendaylight:yang:extension:semantic-version?revision - * =2016-02-02)semantic-version statement + * (http://openconfig.net/yang/openconfig-ext)openconfig-version statement */ - default SemVer getSemanticVersion() { - return Module.DEFAULT_SEMANTIC_VERSION; + default SemVer getOpenconfigVersion() { + return Module.DEFAULT_OPENCONFIG_VERSION; } } diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleImport.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleImport.java index d352aeacbe..f165e3bceb 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleImport.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/ModuleImport.java @@ -30,10 +30,10 @@ public interface ModuleImport extends DocumentedNode { Date getRevision(); /** - * @return Semantic version of module to import + * @return Openconfig version of module to import */ - default SemVer getSemanticVersion() { - return Module.DEFAULT_SEMANTIC_VERSION; + default SemVer getOpenconfigVersion() { + return Module.DEFAULT_OPENCONFIG_VERSION; } /** diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SemVerSourceIdentifier.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/OpenconfigVerSourceIdentifier.java similarity index 59% rename from yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SemVerSourceIdentifier.java rename to yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/OpenconfigVerSourceIdentifier.java index 76c9ec507d..496514a6a3 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SemVerSourceIdentifier.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/OpenconfigVerSourceIdentifier.java @@ -14,13 +14,13 @@ import org.opendaylight.yangtools.concepts.SemVer; import org.opendaylight.yangtools.yang.model.api.Module; /** - * YANG Schema source identifier with specified semantic version + * YANG Schema source identifier with specified openconfig version * * Simple transfer object represents identifier of source for YANG schema * (module or submodule), which consists of * * @@ -35,12 +35,12 @@ import org.opendaylight.yangtools.yang.model.api.Module; * and http://tools.ietf.org/html/rfc6022#section-3.1 ). */ @Beta -public final class SemVerSourceIdentifier extends SourceIdentifier { +public final class OpenconfigVerSourceIdentifier extends SourceIdentifier { private static final long serialVersionUID = 1L; private final SemVer semVer; /** - * Creates new YANG Schema semVer source identifier. + * Creates new YANG Schema openconfig-version source identifier. * * @param name * Name of schema @@ -48,66 +48,66 @@ public final class SemVerSourceIdentifier extends SourceIdentifier { * Optional of source revision in format YYYY-mm-dd. If not * present, default value will be used. * @param semVer - * semantic version of source + * openconfig version of source */ - SemVerSourceIdentifier(final String name, final Optional formattedRevision, final SemVer semVer) { + OpenconfigVerSourceIdentifier(final String name, final Optional formattedRevision, final SemVer semVer) { super(name, formattedRevision); - this.semVer = semVer == null ? Module.DEFAULT_SEMANTIC_VERSION : semVer; + this.semVer = semVer == null ? Module.DEFAULT_OPENCONFIG_VERSION : semVer; } /** - * Creates new YANG Schema semVer source identifier. + * Creates new YANG Schema openconfig-version source identifier. * * @param name * Name of schema * @param semVer - * semantic version of source + * openconfig version of source */ - SemVerSourceIdentifier(final String name, final SemVer semVer) { + OpenconfigVerSourceIdentifier(final String name, final SemVer semVer) { this(name, Optional.absent(), semVer); } /** - * Returns semantic version of source or - * {@link Module#DEFAULT_SEMANTIC_VERSION} if semantic version was not + * Returns openconfig version of source or + * {@link Module#DEFAULT_OPENCONFIG_VERSION} if openconfig version was not * supplied. * - * @return revision of source or {@link Module#DEFAULT_SEMANTIC_VERSION} if + * @return revision of source or {@link Module#DEFAULT_OPENCONFIG_VERSION} if * revision was not supplied. */ - public SemVer getSemanticVersion() { + public SemVer getOpenconfigVersion() { return semVer; } /** - * Creates new YANG Schema semVer source identifier. + * Creates new YANG Schema openconfig-version source identifier. * * @param moduleName * Name of schema * @param semVer - * semantic version of source + * openconfig version of source */ - public static SemVerSourceIdentifier create(final String moduleName, final SemVer semVer) { - return new SemVerSourceIdentifier(moduleName, semVer); + public static OpenconfigVerSourceIdentifier create(final String moduleName, final SemVer semVer) { + return new OpenconfigVerSourceIdentifier(moduleName, semVer); } /** - * Creates new YANG Schema semVer source identifier. + * Creates new YANG Schema openconfig-version source identifier. * * @param moduleName * Name of schema * @param revision * Revision of source in format YYYY-mm-dd * @param semVer - * semantic version of source + * openconfig version of source */ - public static SemVerSourceIdentifier create(final String moduleName, final String revision, + public static OpenconfigVerSourceIdentifier create(final String moduleName, final String revision, final SemVer semVer) { - return new SemVerSourceIdentifier(moduleName, Optional.of(revision), semVer); + return new OpenconfigVerSourceIdentifier(moduleName, Optional.of(revision), semVer); } /** - * Creates new YANG Schema semVer source identifier. + * Creates new YANG Schema openconfig-version source identifier. * * @param moduleName * Name of schema @@ -115,11 +115,11 @@ public final class SemVerSourceIdentifier extends SourceIdentifier { * Optional of source revision in format YYYY-mm-dd. If not * present, default value will be used. * @param semVer - * semantic version of source + * openconfig version of source */ - public static SemVerSourceIdentifier create(final String moduleName, + public static OpenconfigVerSourceIdentifier create(final String moduleName, final Optional revision, final SemVer semVer) { - return new SemVerSourceIdentifier(moduleName, revision, semVer); + return new OpenconfigVerSourceIdentifier(moduleName, revision, semVer); } @Override @@ -136,15 +136,15 @@ public final class SemVerSourceIdentifier extends SourceIdentifier { if (this == obj) { return true; } - if (!(obj instanceof SemVerSourceIdentifier)) { + if (!(obj instanceof OpenconfigVerSourceIdentifier)) { return false; } - final SemVerSourceIdentifier other = (SemVerSourceIdentifier) obj; + final OpenconfigVerSourceIdentifier other = (OpenconfigVerSourceIdentifier) obj; return Objects.equals(getName(), other.getName()) && Objects.equals(semVer, other.semVer); } @Override public String toString() { - return "SemVerSourceIdentifier [name=" + getName() + "(" + semVer + ")" + "@" + getRevision() + "]"; + return "OpenconfigVerSourceIdentifier [name=" + getName() + "(" + semVer + ")" + "@" + getRevision() + "]"; } } diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java index 8692bedfe0..967a41f423 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/SourceIdentifier.java @@ -95,7 +95,7 @@ public abstract class SourceIdentifier implements Identifier, Immutable { } /** - * Return an interned reference to a equivalent SemVerSourceIdentifier. + * Return an interned reference to a equivalent OpenconfigVerSourceIdentifier. * * @return Interned reference, or this object if it was interned. */ @@ -124,14 +124,14 @@ public abstract class SourceIdentifier implements Identifier, Immutable { /** *

- * Since we've got two ways of model versioning (revision & semantic version), + * Since we've got two ways of model versioning (revision & openconfig version), * this method shouldn't be called directly anymore. Eventually, callers of this method * should be notified before method gets deleted. * @deprecated use either *

    - *
  • {@link SemVerSourceIdentifier#create(String, SemVer)}
  • - *
  • {@link SemVerSourceIdentifier#create(String, Optional, SemVer)}
  • - *
  • {@link SemVerSourceIdentifier#create(String, String, SemVer)}
  • + *
  • {@link OpenconfigVerSourceIdentifier#create(String, SemVer)}
  • + *
  • {@link OpenconfigVerSourceIdentifier#create(String, Optional, SemVer)}
  • + *
  • {@link OpenconfigVerSourceIdentifier#create(String, String, SemVer)}
  • *
* or *
    diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/StatementParserMode.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/StatementParserMode.java index e2e71a278d..c62266c2c9 100644 --- a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/StatementParserMode.java +++ b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/repo/api/StatementParserMode.java @@ -16,8 +16,8 @@ public enum StatementParserMode { */ DEFAULT_MODE, /** - * Semantic version mode of statement parser. If it is enabled, module - * imports are processed on the basis of semantic versions. + * Openconfig version mode of statement parser. If it is enabled, module + * imports are processed on the basis of openconfig versions. */ - SEMVER_MODE + OPENCONFIG_VER_MODE } \ No newline at end of file diff --git a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/ModuleIdentifierImpl.java b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/ModuleIdentifierImpl.java index cb59566eea..b4c1536dc2 100644 --- a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/ModuleIdentifierImpl.java +++ b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/ModuleIdentifierImpl.java @@ -34,12 +34,12 @@ public final class ModuleIdentifierImpl implements ModuleIdentifier { final SemVer semVer) { this.name = checkNotNull(name); this.qnameModule = QNameModule.create(namespace.orElse(null), revision.orElse(null)); - this.semVer = (semVer == null ? Module.DEFAULT_SEMANTIC_VERSION : semVer); + this.semVer = (semVer == null ? Module.DEFAULT_OPENCONFIG_VERSION : semVer); } public static ModuleIdentifier create(final String name, final Optional namespace, final Optional revision) { - return create(name, namespace, revision, Module.DEFAULT_SEMANTIC_VERSION); + return create(name, namespace, revision, Module.DEFAULT_OPENCONFIG_VERSION); } public static ModuleIdentifier create(final String name, final Optional namespace, @@ -58,7 +58,7 @@ public final class ModuleIdentifierImpl implements ModuleIdentifier { } @Override - public SemVer getSemanticVersion() { + public SemVer getOpenconfigVersion() { return semVer; } @@ -106,7 +106,7 @@ public final class ModuleIdentifierImpl implements ModuleIdentifier { return false; } - if (!Objects.equals(getSemanticVersion(), other.getSemanticVersion())) { + if (!Objects.equals(getOpenconfigVersion(), other.getOpenconfigVersion())) { return false; } diff --git a/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextProxyTest.java b/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextProxyTest.java index 52398a7142..09d63dbf2e 100644 --- a/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextProxyTest.java +++ b/yang/yang-model-util/src/test/java/org/opendaylight/yangtools/yang/model/util/SchemaContextProxyTest.java @@ -648,8 +648,8 @@ public class SchemaContextProxyTest { } @Override - public SemVer getSemanticVersion() { - return module.getSemanticVersion(); + public SemVer getOpenconfigVersion() { + return module.getOpenconfigVersion(); } @Override 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..53ba55347d 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 @@ -120,11 +120,11 @@ public abstract class YangModelDependencyInfo { } /** - * Returns semantic version of module + * Returns openconfig version of module * - * @return semantic version + * @return openconfig version */ - public Optional getSemanticVersion() { + public Optional getOpenconfigVersion() { return semVer; } @@ -224,7 +224,7 @@ public abstract class YangModelDependencyInfo { private static YangModelDependencyInfo parseModuleContext(final StatementContext module, final String sourceName) { final String name = Utils.stringFromStringContext(module.argument(), getReference(sourceName, module)); final String latestRevision = getLatestRevision(module, sourceName); - final Optional semVer = Optional.fromNullable(getSemanticVersion(module, sourceName)); + final Optional semVer = Optional.fromNullable(getOpenconfigVersion(module, sourceName)); final ImmutableSet imports = parseImports(module, sourceName); final ImmutableSet includes = parseIncludes(module, sourceName); @@ -245,7 +245,7 @@ public abstract class YangModelDependencyInfo { getReference(sourceName, subStatementContext)); final Date revisionDate = (revisionDateStr == null) ? null : QName .parseRevision(revisionDateStr); - final Optional importSemVer = Optional.fromNullable(getSemanticVersion(subStatementContext, sourceName)); + final Optional importSemVer = Optional.fromNullable(getOpenconfigVersion(subStatementContext, sourceName)); result.add(new ModuleImportImpl(importedModuleName, revisionDate, importSemVer)); } @@ -253,10 +253,10 @@ public abstract class YangModelDependencyInfo { return ImmutableSet.copyOf(result); } - private static SemVer getSemanticVersion(final StatementContext statement, final String sourceName) { + private static SemVer getOpenconfigVersion(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)) { @@ -387,8 +387,7 @@ public abstract class YangModelDependencyInfo { @Override public String toString() { return "Module [name=" + getName() + ", revision=" + getRevision() + ", semanticVersion=" - + getSemanticVersion().or(Module.DEFAULT_SEMANTIC_VERSION) + ", dependencies=" + getDependencies() - + "]"; + + getOpenconfigVersion().or(Module.DEFAULT_OPENCONFIG_VERSION) + ", dependencies=" + getDependencies() + "]"; } } @@ -445,7 +444,7 @@ public abstract class YangModelDependencyInfo { public ModuleImportImpl(final String moduleName, final Date revision, final Optional semVer) { this.name = Preconditions.checkNotNull(moduleName, "Module name must not be null."); this.revision = revision; - this.semVer = semVer.or(Module.DEFAULT_SEMANTIC_VERSION); + this.semVer = semVer.or(Module.DEFAULT_OPENCONFIG_VERSION); } @Override @@ -459,7 +458,7 @@ public abstract class YangModelDependencyInfo { } @Override - public SemVer getSemanticVersion() { + public SemVer getOpenconfigVersion() { return this.semVer; } @@ -505,7 +504,7 @@ public abstract class YangModelDependencyInfo { return false; } - if (!Objects.equals(getSemanticVersion(), other.getSemanticVersion())) { + if (!Objects.equals(getOpenconfigVersion(), other.getOpenconfigVersion())) { return false; } return true; @@ -514,7 +513,7 @@ public abstract class YangModelDependencyInfo { @Override public String toString() { return "ModuleImportImpl [name=" + name + ", revision=" - + QName.formattedRevision(revision) + ", semanticVersion=" + getSemanticVersion() + "]"; + + QName.formattedRevision(revision) + ", semanticVersion=" + getOpenconfigVersion() + "]"; } } } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/DependencyResolver.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/DependencyResolver.java index bc339f7f54..6bce00a841 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/DependencyResolver.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/DependencyResolver.java @@ -175,7 +175,7 @@ abstract class DependencyResolver { } @Override - public SemVer getSemanticVersion() { + public SemVer getOpenconfigVersion() { return null; } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SemVerDependencyResolver.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerDependencyResolver.java similarity index 71% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SemVerDependencyResolver.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerDependencyResolver.java index 8567254762..3d7081d7bb 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SemVerDependencyResolver.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/OpenconfigVerDependencyResolver.java @@ -13,13 +13,13 @@ import java.util.Map; import org.opendaylight.yangtools.concepts.SemVer; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.model.api.ModuleImport; -import org.opendaylight.yangtools.yang.model.repo.api.SemVerSourceIdentifier; +import org.opendaylight.yangtools.yang.model.repo.api.OpenconfigVerSourceIdentifier; import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier; import org.opendaylight.yangtools.yang.parser.impl.util.YangModelDependencyInfo; -final class SemVerDependencyResolver extends DependencyResolver { +final class OpenconfigVerDependencyResolver extends DependencyResolver { - protected SemVerDependencyResolver(final Map depInfo) { + protected OpenconfigVerDependencyResolver(final Map depInfo) { super(depInfo); } @@ -27,7 +27,7 @@ final class SemVerDependencyResolver extends DependencyResolver { final String requestedModuleName = mi.getModuleName(); for (SourceIdentifier r : haystack) { if (requestedModuleName.equals(r.getName()) - && isCompatible(((SemVerSourceIdentifier) r).getSemanticVersion(), mi.getSemanticVersion())) { + && isCompatible(((OpenconfigVerSourceIdentifier) r).getOpenconfigVersion(), mi.getOpenconfigVersion())) { return r; } } @@ -42,7 +42,7 @@ final class SemVerDependencyResolver extends DependencyResolver { @Override protected boolean isKnown(final Collection haystack, final ModuleImport mi) { final String rev = mi.getRevision() != null ? QName.formattedRevision(mi.getRevision()) : null; - final SemVerSourceIdentifier msi = SemVerSourceIdentifier.create(mi.getModuleName(), Optional.fromNullable(rev), mi.getSemanticVersion()); + final OpenconfigVerSourceIdentifier msi = OpenconfigVerSourceIdentifier.create(mi.getModuleName(), Optional.fromNullable(rev), mi.getOpenconfigVersion()); // Quick lookup if (haystack.contains(msi)) { @@ -53,7 +53,7 @@ final class SemVerDependencyResolver extends DependencyResolver { return findCompatibleVersion(haystack, mi) != null; } - public static SemVerDependencyResolver create(final Map depInfo) { - return new SemVerDependencyResolver(depInfo); + public static OpenconfigVerDependencyResolver create(final Map depInfo) { + return new OpenconfigVerDependencyResolver(depInfo); } } \ No newline at end of file diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaContextFactory.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaContextFactory.java index c9c3db8f73..1f05583130 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaContextFactory.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/repo/SharedSchemaContextFactory.java @@ -74,7 +74,7 @@ final class SharedSchemaContextFactory implements SchemaContextFactory { final Collection requiredSources, final StatementParserMode statementParserMode, final Set supportedFeatures) { return createSchemaContext(requiredSources, - statementParserMode == StatementParserMode.SEMVER_MODE ? this.semVerCache : this.cache, + statementParserMode == StatementParserMode.OPENCONFIG_VER_MODE ? this.semVerCache : this.cache, new AssembleSources(Optional.ofNullable(supportedFeatures), statementParserMode)); } @@ -183,7 +183,7 @@ final class SharedSchemaContextFactory implements SchemaContextFactory { this.supportedFeatures = supportedFeatures; this.statementParserMode = Preconditions.checkNotNull(statementParserMode); switch (statementParserMode) { - case SEMVER_MODE: + case OPENCONFIG_VER_MODE: this.getIdentifier = ASTSchemaSource::getSemVerIdentifier; break; default: @@ -200,8 +200,8 @@ final class SharedSchemaContextFactory implements SchemaContextFactory { LOG.debug("Resolving dependency reactor {}", deps); - final DependencyResolver res = this.statementParserMode == StatementParserMode.SEMVER_MODE - ? SemVerDependencyResolver.create(deps) : RevisionDependencyResolver.create(deps); + final DependencyResolver res = this.statementParserMode == StatementParserMode.OPENCONFIG_VER_MODE + ? OpenconfigVerDependencyResolver.create(deps) : RevisionDependencyResolver.create(deps); if (!res.getUnresolvedSources().isEmpty()) { LOG.debug("Omitting models {} due to unsatisfied imports {}", res.getUnresolvedSources(), res.getUnsatisfiedImports()); diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/ModelProcessingPhase.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/ModelProcessingPhase.java index 3fe2ccc0f1..89792a3e60 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/ModelProcessingPhase.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/ModelProcessingPhase.java @@ -16,7 +16,7 @@ public enum ModelProcessingPhase { * Preliminary cross-source relationship resolution phase which collects * available module names and module namespaces. It is necessary in order to * correct resolution of unknown statements used in linkage phase (e.g. - * semantic version of yang modules). + * openconfig version of yang modules). */ SOURCE_PRE_LINKAGE(INIT), /** diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionModuleNamespace.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionModuleNamespace.java similarity index 75% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionModuleNamespace.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionModuleNamespace.java index 4f5f83eef9..7145a6a1e1 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionModuleNamespace.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionModuleNamespace.java @@ -14,8 +14,8 @@ import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace; /** * Namespace class for storing Maps of all modules with the same name. This namespace is - * used only in case the semantic versioning is enabled, otherwise it is empty. + * used only in case the openconfig versioning is enabled, otherwise it is empty. */ @Beta -public interface SemanticVersionModuleNamespace extends IdentifierNamespace>> { +public interface OpenconfigVersionModuleNamespace extends IdentifierNamespace>> { } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionNamespace.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionNamespace.java similarity index 76% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionNamespace.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionNamespace.java index 40a7dbba5b..92dcfda494 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/SemanticVersionNamespace.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/OpenconfigVersionNamespace.java @@ -12,8 +12,8 @@ import org.opendaylight.yangtools.concepts.SemVer; import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace; /** - * namespace class for storing semantic version of yang modules + * namespace class for storing openconfig version of yang modules */ @Beta -public interface SemanticVersionNamespace extends IdentifierNamespace, SemVer> { +public interface OpenconfigVersionNamespace extends IdentifierNamespace, SemVer> { } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContext.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContext.java index bd0e1d8322..df28f4dc4a 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContext.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContext.java @@ -61,7 +61,7 @@ public interface StmtContext, E extends Effect boolean isConfiguration(); - boolean isEnabledSemanticVersioning(); + boolean isEnabledOpenconfigVersioning(); @Nonnull > V getFromNamespace( diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToSemVerModuleIdentifier.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToOpenconfigVerModuleIdentifier.java similarity index 81% rename from yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToSemVerModuleIdentifier.java rename to yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToOpenconfigVerModuleIdentifier.java index d167832ea8..738a14e15c 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToSemVerModuleIdentifier.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/ImpPrefixToOpenconfigVerModuleIdentifier.java @@ -13,8 +13,8 @@ import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace; /** * - * Source-specific mapping of prefixes to module identifier with specified semantic version + * Source-specific mapping of prefixes to module identifier with specified openconfig version */ @Beta -public interface ImpPrefixToSemVerModuleIdentifier extends IdentifierNamespace { +public interface ImpPrefixToOpenconfigVerModuleIdentifier extends IdentifierNamespace { } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/StatementStreamSource.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/StatementStreamSource.java index 25107e6a70..393adb3f55 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/StatementStreamSource.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/StatementStreamSource.java @@ -32,7 +32,7 @@ import org.opendaylight.yangtools.yang.common.YangVersion; * supplied statement definition map. This step is used as preparatory cross-source * relationship resolution phase which collects available module names and namespaces. * It is necessary in order to correct resolution of unknown statements used by linkage - * phase (e.g. semantic version of yang modules). + * phase (e.g. openconfig version of yang modules). * *
  • {@link #writeLinkage(StatementWriter, QNameToStatementDefinition, PrefixToModule)} - * Source MUST emit only statements related in linkage, which are present in diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java index 322b05ffb6..ecd85d8b73 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/BuildGlobalContext.java @@ -80,7 +80,7 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh private final Map supports; private final Set sources = new HashSet<>(); private final Set supportedVersions; - private final boolean enabledSemanticVersions; + private final boolean enabledOpenconfigVersions; private Set libSources = new HashSet<>(); private ModelProcessingPhase currentPhase = ModelProcessingPhase.INIT; @@ -93,10 +93,10 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh switch (statementParserMode) { case DEFAULT_MODE: - enabledSemanticVersions = false; + enabledOpenconfigVersions = false; break; - case SEMVER_MODE: - enabledSemanticVersions = true; + case OPENCONFIG_VER_MODE: + enabledOpenconfigVersions = true; break; default: throw new IllegalArgumentException("Unhandled parser mode " + statementParserMode); @@ -109,8 +109,8 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh this.supportedVersions = ImmutableSet.copyOf(supports.get(ModelProcessingPhase.INIT).getSupportedVersions()); } - boolean isEnabledSemanticVersioning() { - return enabledSemanticVersions; + boolean isEnabledOpenconfigVersioning() { + return enabledOpenconfigVersions; } StatementSupportBundle getSupportsForPhase(final ModelProcessingPhase currentPhase) { @@ -122,8 +122,8 @@ class BuildGlobalContext extends NamespaceStorageSupport implements NamespaceBeh } void addLibSource(@Nonnull final StatementStreamSource libSource) { - Preconditions.checkState(!isEnabledSemanticVersioning(), - "Library sources are not supported in semantic version mode currently."); + Preconditions.checkState(!isEnabledOpenconfigVersioning(), + "Library sources are not supported in openconfig version mode currently."); Preconditions.checkState(currentPhase == ModelProcessingPhase.INIT, "Add library source is allowed in ModelProcessingPhase.INIT only"); libSources.add(new SourceSpecificContext(this, libSource)); diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/CrossSourceStatementReactor.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/CrossSourceStatementReactor.java index c44e2463bc..5495c3ccff 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/CrossSourceStatementReactor.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/CrossSourceStatementReactor.java @@ -235,7 +235,7 @@ public final class CrossSourceStatementReactor { * are present in resulting SchemaContext. Any other library sources are * ignored and this also applies to error reporting. * - * Library sources are not supported in semantic version mode currently. + * Library sources are not supported in openconfig version mode currently. * * @param libSources * yang sources which should be added into library sources diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java index e2d1828ba7..d31c7bd503 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/RootStatementContext.java @@ -190,8 +190,8 @@ public class RootStatementContext, E extends E } @Override - public boolean isEnabledSemanticVersioning() { - return sourceContext.isEnabledSemanticVersioning(); + public boolean isEnabledOpenconfigVersioning() { + return sourceContext.isEnabledOpenconfigVersioning(); } @Override diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java index ee72425c42..0fe22b13db 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SourceSpecificContext.java @@ -90,8 +90,8 @@ public class SourceSpecificContext implements NamespaceStorageNode, NamespaceBeh this.source = Preconditions.checkNotNull(source); } - boolean isEnabledSemanticVersioning(){ - return currentContext.isEnabledSemanticVersioning(); + boolean isEnabledOpenconfigVersioning(){ + return currentContext.isEnabledOpenconfigVersioning(); } ModelProcessingPhase getInProgressPhase() { diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SubstatementContext.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SubstatementContext.java index 5a009523e7..2c0634c706 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SubstatementContext.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/SubstatementContext.java @@ -322,8 +322,8 @@ final class SubstatementContext, E extends Eff } @Override - public boolean isEnabledSemanticVersioning() { - return parent.isEnabledSemanticVersioning(); + public boolean isEnabledOpenconfigVersioning() { + return parent.isEnabledOpenconfigVersioning(); } @Override 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..884e2b7da3 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 @@ -39,13 +39,13 @@ import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException; import org.opendaylight.yangtools.yang.parser.spi.meta.ModelActionBuilder; import org.opendaylight.yangtools.yang.parser.spi.meta.ModelActionBuilder.InferenceAction; import org.opendaylight.yangtools.yang.parser.spi.meta.ModelActionBuilder.Prerequisite; -import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionModuleNamespace; -import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionModuleNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable; import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToModuleIdentifier; import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToNamespace; -import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToSemVerModuleIdentifier; +import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToOpenconfigVerModuleIdentifier; import org.opendaylight.yangtools.yang.parser.spi.source.ImportedModuleContext; import org.opendaylight.yangtools.yang.parser.spi.source.ModuleCtxToModuleIdentifier; import org.opendaylight.yangtools.yang.parser.spi.source.ModuleNameToNamespace; @@ -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() { @@ -123,8 +123,8 @@ public class ImportStatementDefinition extends @Override public void onLinkageDeclared( final Mutable> stmt) { - if (stmt.isEnabledSemanticVersioning()) { - SemanticVersionImport.onLinkageDeclared(stmt); + if (stmt.isEnabledOpenconfigVersioning()) { + OpenconfigVersionImport.onLinkageDeclared(stmt); } else { RevisionImport.onLinkageDeclared(stmt); } @@ -219,8 +219,8 @@ public class ImportStatementDefinition extends } } - private static class SemanticVersionImport { - private SemanticVersionImport() { + private static class OpenconfigVersionImport { + private OpenconfigVersionImport() { throw new UnsupportedOperationException("Utility class"); } @@ -245,7 +245,7 @@ public class ImportStatementDefinition extends if (importedModuleEntry != null) { importedModule = importedModuleEntry.getValue(); importedModuleIdentifier = importedModule.getFromNamespace(ModuleCtxToModuleIdentifier.class, importedModule); - semVerModuleIdentifier = createSemVerModuleIdentifier(importedModuleIdentifier, importedModuleEntry.getKey()); + semVerModuleIdentifier = createOpenconfigVerModuleIdentifier(importedModuleIdentifier, importedModuleEntry.getKey()); } else { throw new InferenceException(stmt.getStatementSourceReference(), "Unable to find module compatible with requested import [%s(%s)].", impIdentifier @@ -255,7 +255,7 @@ public class ImportStatementDefinition extends linkageTarget.get().addToNs(ImportedModuleContext.class, importedModuleIdentifier, importedModule); final String impPrefix = firstAttributeOf(stmt.declaredSubstatements(), PrefixStatement.class); stmt.addToNs(ImpPrefixToModuleIdentifier.class, impPrefix, importedModuleIdentifier); - stmt.addToNs(ImpPrefixToSemVerModuleIdentifier.class, impPrefix, semVerModuleIdentifier); + stmt.addToNs(ImpPrefixToOpenconfigVerModuleIdentifier.class, impPrefix, semVerModuleIdentifier); final URI modNs = firstAttributeOf(importedModule.declaredSubstatements(), NamespaceStatement.class); stmt.addToNs(URIStringToImpPrefix.class, modNs.toString(), impPrefix); @@ -273,9 +273,9 @@ public class ImportStatementDefinition extends } private static SemVer getRequestedImportVersion(final Mutable impStmt) { - SemVer requestedImportVersion = impStmt.getFromNamespace(SemanticVersionNamespace.class, impStmt); + SemVer requestedImportVersion = impStmt.getFromNamespace(OpenconfigVersionNamespace.class, impStmt); if (requestedImportVersion == null) { - requestedImportVersion = Module.DEFAULT_SEMANTIC_VERSION; + requestedImportVersion = Module.DEFAULT_OPENCONFIG_VERSION; } return requestedImportVersion; } @@ -283,7 +283,7 @@ public class ImportStatementDefinition extends private static Entry> findRecentCompatibleModuleEntry(final String moduleName, final Mutable> impStmt) { NavigableMap> allRelevantModulesMap = impStmt.getFromNamespace( - SemanticVersionModuleNamespace.class, moduleName); + OpenconfigVersionModuleNamespace.class, moduleName); if (allRelevantModulesMap == null) { return null; } @@ -303,7 +303,7 @@ public class ImportStatementDefinition extends Optional.of(SimpleDateFormatUtil.DEFAULT_DATE_IMP)); } - private static ModuleIdentifier createSemVerModuleIdentifier(final ModuleIdentifier importedModuleIdentifier, + private static ModuleIdentifier createOpenconfigVerModuleIdentifier(final ModuleIdentifier importedModuleIdentifier, final SemVer semVer) { return ModuleIdentifierImpl.create(importedModuleIdentifier.getName(), Optional.ofNullable(importedModuleIdentifier.getNamespace()), 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..a3b9fee0aa 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 @@ -30,8 +30,8 @@ import org.opendaylight.yangtools.yang.parser.spi.NamespaceToModule; import org.opendaylight.yangtools.yang.parser.spi.PreLinkageModuleNamespace; import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator; import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport; -import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionModuleNamespace; -import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionModuleNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable; import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToModuleIdentifier; @@ -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() { @@ -169,25 +169,25 @@ public class ModuleStatementSupport extends stmt.addToNs(ModuleIdentifierToModuleQName.class, moduleIdentifier, qNameModule); stmt.addToNs(ImpPrefixToModuleIdentifier.class, modulePrefix, moduleIdentifier); - if (stmt.isEnabledSemanticVersioning()) { - addToSemVerModuleNamespace(stmt); + if (stmt.isEnabledOpenconfigVersioning()) { + addToOpenconfigVerModuleNamespace(stmt); } } - private static void addToSemVerModuleNamespace( + private static void addToOpenconfigVerModuleNamespace( final Mutable> stmt) { final String moduleName = stmt.getStatementArgument(); NavigableMap> modulesMap = stmt.getFromNamespace( - SemanticVersionModuleNamespace.class, moduleName); + OpenconfigVersionModuleNamespace.class, moduleName); if (modulesMap == null) { modulesMap = new TreeMap<>(); } - SemVer moduleSemVer = stmt.getFromNamespace(SemanticVersionNamespace.class, stmt); + SemVer moduleSemVer = stmt.getFromNamespace(OpenconfigVersionNamespace.class, stmt); if(moduleSemVer == null) { - moduleSemVer = Module.DEFAULT_SEMANTIC_VERSION; + moduleSemVer = Module.DEFAULT_OPENCONFIG_VERSION; } modulesMap.put(moduleSemVer, stmt); - stmt.addToNs(SemanticVersionModuleNamespace.class, moduleName, modulesMap); + stmt.addToNs(OpenconfigVersionModuleNamespace.class, moduleName, modulesMap); } @Override 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 76% 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..fb04dcd57b 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 @@ -14,27 +14,27 @@ import org.opendaylight.yangtools.yang.model.api.stmt.UnknownStatement; import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator; 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.OpenconfigVersionNamespace; 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 @@ -44,19 +44,19 @@ public final class SemanticVersionStatementImpl extends AbstractDeclaredStatemen @Override public void onLinkageDeclared(final StmtContext.Mutable,EffectiveStatement>> stmt) { - stmt.addToNs(SemanticVersionNamespace.class, stmt.getParentContext(), stmt.getStatementArgument()); + stmt.addToNs(OpenconfigVersionNamespace.class, stmt.getParentContext(), stmt.getStatementArgument()); } @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..f25f0a6e02 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..aeeb70b316 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 @@ -31,8 +31,8 @@ import org.opendaylight.yangtools.yang.parser.spi.TypeNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.DerivedIdentitiesNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.ModelProcessingPhase; import org.opendaylight.yangtools.yang.parser.spi.meta.QNameCacheNamespace; -import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionModuleNamespace; -import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionModuleNamespace; +import org.opendaylight.yangtools.yang.parser.spi.meta.OpenconfigVersionNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.StatementDefinitionNamespace; import org.opendaylight.yangtools.yang.parser.spi.meta.StatementSupportBundle; import org.opendaylight.yangtools.yang.parser.spi.source.AnyxmlSchemaLocationNamespace; @@ -42,7 +42,7 @@ import org.opendaylight.yangtools.yang.parser.spi.source.BelongsToPrefixToModule import org.opendaylight.yangtools.yang.parser.spi.source.BelongsToPrefixToModuleName; import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToModuleIdentifier; import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToNamespace; -import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToSemVerModuleIdentifier; +import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToOpenconfigVerModuleIdentifier; import org.opendaylight.yangtools.yang.parser.spi.source.ImportedModuleContext; import org.opendaylight.yangtools.yang.parser.spi.source.IncludedModuleContext; import org.opendaylight.yangtools.yang.parser.spi.source.IncludedSubmoduleNameToIdentifier; @@ -143,10 +143,10 @@ public final class YangInferencePipeline { .addSupport(sourceLocal(BelongsToModuleContext.class)) .addSupport(sourceLocal(QNameToStatementDefinition.class)) .addSupport(sourceLocal(BelongsToPrefixToModuleName.class)) - .addSupport(new SemanticVersionStatementImpl.SemanticVersionSupport()) - .addSupport(global(SemanticVersionNamespace.class)) - .addSupport(global(SemanticVersionModuleNamespace.class)) - .addSupport(sourceLocal(ImpPrefixToSemVerModuleIdentifier.class)) + .addSupport(new OpenconfigVersionStatementImpl.OpenconfigVersionSupport()) + .addSupport(global(OpenconfigVersionNamespace.class)) + .addSupport(global(OpenconfigVersionModuleNamespace.class)) + .addSupport(sourceLocal(ImpPrefixToOpenconfigVerModuleIdentifier.class)) .build(); public static final StatementSupportBundle STMT_DEF_BUNDLE = StatementSupportBundle 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..68ae3ade28 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,8 +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); - this.semanticVersion = (semanticVersionStmt == null) ? DEFAULT_SEMANTIC_VERSION : semanticVersionStmt.argument(); + final OpenconfigVersionEffectiveStatementImpl semanticVersionStmt = firstEffective(OpenconfigVersionEffectiveStatementImpl.class); + this.semanticVersion = (semanticVersionStmt == null) ? DEFAULT_OPENCONFIG_VERSION : semanticVersionStmt.argument(); final OrganizationEffectiveStatementImpl organizationStmt = firstEffective(OrganizationEffectiveStatementImpl.class); this.organization = (organizationStmt == null) ? null : organizationStmt.argument(); @@ -250,7 +250,7 @@ abstract class AbstractEffectiveModule> exte this.unknownNodes = ImmutableList.copyOf(unknownNodesInit); this.augmentations = ImmutableSet.copyOf(augmentationsInit); - if (ctx.isEnabledSemanticVersioning()) { + if (ctx.isEnabledOpenconfigVersioning()) { this.imports = ImmutableSet.copyOf(importsInit); } else { this.imports = ImmutableSet.copyOf(resolveModuleImports(importsInit, ctx)); @@ -412,7 +412,7 @@ abstract class AbstractEffectiveModule> exte } @Override - public SemVer getSemanticVersion() { + public SemVer getOpenconfigVersion() { return semanticVersion; } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ImportEffectiveStatementImpl.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ImportEffectiveStatementImpl.java index 8209c346a8..da2e3f6544 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ImportEffectiveStatementImpl.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ImportEffectiveStatementImpl.java @@ -18,7 +18,7 @@ import org.opendaylight.yangtools.yang.model.api.ModuleImport; import org.opendaylight.yangtools.yang.model.api.stmt.ImportStatement; import org.opendaylight.yangtools.yang.parser.spi.meta.MissingSubstatementException; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; -import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToSemVerModuleIdentifier; +import org.opendaylight.yangtools.yang.parser.spi.source.ImpPrefixToOpenconfigVerModuleIdentifier; public class ImportEffectiveStatementImpl extends DeclaredEffectiveStatementBase implements ModuleImport { @@ -42,15 +42,15 @@ public class ImportEffectiveStatementImpl extends DeclaredEffectiveStatementBase ctx.getStatementSourceReference()); } - if (!ctx.isEnabledSemanticVersioning()) { + if (!ctx.isEnabledOpenconfigVersioning()) { RevisionDateEffectiveStatementImpl revisionDateStmt = firstEffective(RevisionDateEffectiveStatementImpl.class); this.revision = (revisionDateStmt == null) ? SimpleDateFormatUtil.DEFAULT_DATE_IMP : revisionDateStmt .argument(); - this.semVer = Module.DEFAULT_SEMANTIC_VERSION; + this.semVer = Module.DEFAULT_OPENCONFIG_VERSION; } else { - ModuleIdentifier importedModuleIdentifier = ctx.getFromNamespace(ImpPrefixToSemVerModuleIdentifier.class, prefix); + ModuleIdentifier importedModuleIdentifier = ctx.getFromNamespace(ImpPrefixToOpenconfigVerModuleIdentifier.class, prefix); revision = importedModuleIdentifier.getRevision(); - semVer = importedModuleIdentifier.getSemanticVersion(); + semVer = importedModuleIdentifier.getOpenconfigVersion(); } DescriptionEffectiveStatementImpl descriptionStmt = firstEffective(DescriptionEffectiveStatementImpl.class); @@ -71,7 +71,7 @@ public class ImportEffectiveStatementImpl extends DeclaredEffectiveStatementBase } @Override - public SemVer getSemanticVersion() { + public SemVer getOpenconfigVersion() { return semVer; } @@ -115,7 +115,7 @@ public class ImportEffectiveStatementImpl extends DeclaredEffectiveStatementBase @Override public String toString() { return MoreObjects.toStringHelper(this).add("moduleName", getModuleName()) - .add("revision", getRevision()).add("semantic version", getSemanticVersion()) + .add("revision", getRevision()).add("openconfig version", getOpenconfigVersion()) .add("prefix", getPrefix()).add("description", getDescription()) .add("reference", getReference()).toString(); } diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ModuleImportImpl.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ModuleImportImpl.java index fccc90be9f..2a38ab2bf2 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ModuleImportImpl.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ModuleImportImpl.java @@ -21,14 +21,14 @@ final class ModuleImportImpl implements ModuleImport { private final String prefix; public ModuleImportImpl(final String moduleName, final Date revision, final String prefix) { - this(moduleName, revision, prefix, Module.DEFAULT_SEMANTIC_VERSION); + this(moduleName, revision, prefix, Module.DEFAULT_OPENCONFIG_VERSION); } public ModuleImportImpl(final String moduleName, final Date revision, final String prefix, final SemVer semVer) { this.moduleName = Preconditions.checkNotNull(moduleName, "Module name must not be null."); this.revision = revision; this.prefix = Preconditions.checkNotNull(prefix, "Import prefix must not be null."); - this.semVer = Preconditions.checkNotNull(semVer, "Semantic version of module must not be null."); + this.semVer = Preconditions.checkNotNull(semVer, "Openconfig version of module must not be null."); } @Override @@ -42,7 +42,7 @@ final class ModuleImportImpl implements ModuleImport { } @Override - public SemVer getSemanticVersion() { + public SemVer getOpenconfigVersion() { return semVer; } @@ -83,7 +83,7 @@ final class ModuleImportImpl implements ModuleImport { if (!Objects.equals(getPrefix(), other.getPrefix())) { return false; } - if (!Objects.equals(getSemanticVersion(), other.getSemanticVersion())) { + if (!Objects.equals(getOpenconfigVersion(), other.getOpenconfigVersion())) { return false; } return true; 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/main/java/org/opendaylight/yangtools/yang/parser/util/ASTSchemaSource.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/ASTSchemaSource.java index 44aaeba0bd..f1899959e1 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/ASTSchemaSource.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/util/ASTSchemaSource.java @@ -7,7 +7,7 @@ */ package org.opendaylight.yangtools.yang.parser.util; -import static org.opendaylight.yangtools.yang.model.api.Module.DEFAULT_SEMANTIC_VERSION; +import static org.opendaylight.yangtools.yang.model.api.Module.DEFAULT_OPENCONFIG_VERSION; import com.google.common.annotations.Beta; import com.google.common.base.Function; @@ -19,7 +19,7 @@ import org.antlr.v4.runtime.ParserRuleContext; import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException; import org.opendaylight.yangtools.yang.model.repo.api.RevisionSourceIdentifier; import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation; -import org.opendaylight.yangtools.yang.model.repo.api.SemVerSourceIdentifier; +import org.opendaylight.yangtools.yang.model.repo.api.OpenconfigVerSourceIdentifier; import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier; import org.opendaylight.yangtools.yang.parser.impl.util.YangModelDependencyInfo; @@ -48,12 +48,12 @@ public final class ASTSchemaSource implements SchemaSourceRepresentation { public static final Function GET_AST = ASTSchemaSource::getAST; private final YangModelDependencyInfo depInfo; - private final SemVerSourceIdentifier semVerId; + private final OpenconfigVerSourceIdentifier semVerId; private final ParserRuleContext tree; private final SourceIdentifier id; private final String symbolicName; - private ASTSchemaSource(@Nonnull final SourceIdentifier id, @Nonnull final SemVerSourceIdentifier semVerId, + private ASTSchemaSource(@Nonnull final SourceIdentifier id, @Nonnull final OpenconfigVerSourceIdentifier semVerId, @Nonnull final ParserRuleContext tree, @Nonnull final YangModelDependencyInfo depInfo, @Nullable final String symbolicName) { this.depInfo = Preconditions.checkNotNull(depInfo); @@ -76,7 +76,7 @@ public final class ASTSchemaSource implements SchemaSourceRepresentation { throws YangSyntaxErrorException { final YangModelDependencyInfo depInfo = YangModelDependencyInfo.fromAST(name, tree); final SourceIdentifier id = getSourceId(depInfo); - final SemVerSourceIdentifier semVerId = getSemVerSourceId(depInfo); + final OpenconfigVerSourceIdentifier semVerId = getOpenconfigVerSourceId(depInfo); return new ASTSchemaSource(id, semVerId, tree, depInfo, null); } @@ -86,12 +86,12 @@ public final class ASTSchemaSource implements SchemaSourceRepresentation { : RevisionSourceIdentifier.create(name, depInfo.getFormattedRevision()); } - private static SemVerSourceIdentifier getSemVerSourceId(final YangModelDependencyInfo depInfo) { + private static OpenconfigVerSourceIdentifier getOpenconfigVerSourceId(final YangModelDependencyInfo depInfo) { return depInfo.getFormattedRevision() == null - ? SemVerSourceIdentifier.create(depInfo.getName(), - depInfo.getSemanticVersion().or(DEFAULT_SEMANTIC_VERSION)) - : SemVerSourceIdentifier.create(depInfo.getName(), depInfo.getFormattedRevision(), - depInfo.getSemanticVersion().or(DEFAULT_SEMANTIC_VERSION)); + ? OpenconfigVerSourceIdentifier.create(depInfo.getName(), + depInfo.getOpenconfigVersion().or(DEFAULT_OPENCONFIG_VERSION)) + : OpenconfigVerSourceIdentifier.create(depInfo.getName(), depInfo.getFormattedRevision(), + depInfo.getOpenconfigVersion().or(DEFAULT_OPENCONFIG_VERSION)); } /** @@ -158,11 +158,11 @@ public final class ASTSchemaSource implements SchemaSourceRepresentation { final YangModelDependencyInfo depInfo = YangModelDependencyInfo.fromAST(identifier.getName(), tree); final SourceIdentifier id = getSourceId(depInfo); - final SemVerSourceIdentifier semVerId; - if (identifier instanceof SemVerSourceIdentifier && !depInfo.getSemanticVersion().isPresent()) { - semVerId = (SemVerSourceIdentifier) identifier; + final OpenconfigVerSourceIdentifier semVerId; + if (identifier instanceof OpenconfigVerSourceIdentifier && !depInfo.getOpenconfigVersion().isPresent()) { + semVerId = (OpenconfigVerSourceIdentifier) identifier; } else { - semVerId = getSemVerSourceId(depInfo); + semVerId = getOpenconfigVerSourceId(depInfo); } return new ASTSchemaSource(id, semVerId, tree, depInfo, symbolicName); @@ -179,7 +179,7 @@ public final class ASTSchemaSource implements SchemaSourceRepresentation { return Optional.ofNullable(symbolicName); } - public SemVerSourceIdentifier getSemVerIdentifier() { + public OpenconfigVerSourceIdentifier getSemVerIdentifier() { return semVerId; } 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 86% 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..377f93bb59 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(); @@ -49,12 +49,12 @@ public class SemVerSharedSchemaRepositoryTest { final CheckedFuture inetAndTopologySchemaContextFuture = fact .createSchemaContext(Lists.newArrayList(bar.getId(), foo.getId(), semVer.getId()), - StatementParserMode.SEMVER_MODE); + StatementParserMode.OPENCONFIG_VER_MODE); assertTrue(inetAndTopologySchemaContextFuture.isDone()); assertSchemaContext(inetAndTopologySchemaContextFuture.checkedGet(), 3); final CheckedFuture barSchemaContextFuture = fact - .createSchemaContext(Lists.newArrayList(bar.getId(), semVer.getId()), StatementParserMode.SEMVER_MODE); + .createSchemaContext(Lists.newArrayList(bar.getId(), semVer.getId()), StatementParserMode.OPENCONFIG_VER_MODE); assertTrue(barSchemaContextFuture.isDone()); assertSchemaContext(barSchemaContextFuture.checkedGet(), 2); } @@ -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 57% 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..fd3171fe9a 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,62 +21,62 @@ 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", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-valid-major", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("5.5.5"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("5.5.5"), bar.getOpenconfigVersion()); } @Test public void borderCaseValidMinorTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-valid-minor", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-valid-minor", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("5.6.5"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("5.6.5"), bar.getOpenconfigVersion()); } @Test public void borderCaseValidPatchTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-valid-patch", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-valid-patch", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("5.5.6"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("5.5.6"), bar.getOpenconfigVersion()); } @Test public void borderCaseInvalidMajorTest() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/border-case/border-case-invalid-major", - StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-invalid-major", + StatementParserMode.OPENCONFIG_VER_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(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", - StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-invalid-minor", + StatementParserMode.OPENCONFIG_VER_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(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", - StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + StmtTestUtils.parseYangSources("/openconfig-version/border-case/border-case-invalid-patch", + StatementParserMode.OPENCONFIG_VER_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(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 79% 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..83a2304218 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,19 +21,19 @@ 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", - StatementParserMode.SEMVER_MODE); + final SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/complex/complex-1", + StatementParserMode.OPENCONFIG_VER_MODE); verifySchemaContextTest1(context); } @Test public void complexTest1Yang1_1() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/semantic-version/complex-1", - StatementParserMode.SEMVER_MODE); + final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/openconfig-version/complex-1", + StatementParserMode.OPENCONFIG_VER_MODE); verifySchemaContextTest1(context); } @@ -42,17 +42,17 @@ 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()); - assertEquals(SemVer.valueOf("1.50.2"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("1.3.95"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("1.50.2"), foo.getOpenconfigVersion()); final Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("1.2.6"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("1.2.6"), bar.getOpenconfigVersion()); final Module foobar = StmtTestUtils.findImportedModule(context, bar, "foobar"); - assertEquals(SemVer.valueOf("2.26.465"), foobar.getSemanticVersion()); + assertEquals(SemVer.valueOf("2.26.465"), foobar.getOpenconfigVersion()); // check imported components assertNotNull("This component should be present", SchemaContextUtil.findDataSchemaNode(context, foo, @@ -71,15 +71,15 @@ public class SemanticVersionComplexTest { @Test public void complexTest2() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/complex/complex-2", - StatementParserMode.SEMVER_MODE); + final SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/complex/complex-2", + StatementParserMode.OPENCONFIG_VER_MODE); verifySchemaContextTest2(context); } @Test public void complexTest2Yang1_1() throws Exception { - final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/semantic-version/complex-2", - StatementParserMode.SEMVER_MODE); + final SchemaContext context = StmtTestUtils.parseYangSources("/rfc7950/openconfig-version/complex-2", + StatementParserMode.OPENCONFIG_VER_MODE); verifySchemaContextTest2(context); } @@ -88,17 +88,17 @@ 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()); - assertEquals(SemVer.valueOf("2.32.2"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("2.5.50"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("2.32.2"), foo.getOpenconfigVersion()); final Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("4.9.8"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("4.9.8"), bar.getOpenconfigVersion()); final Module foobar = StmtTestUtils.findImportedModule(context, bar, "foobar"); - assertEquals(SemVer.valueOf("7.13.99"), foobar.getSemanticVersion()); + assertEquals(SemVer.valueOf("7.13.99"), foobar.getOpenconfigVersion()); // check used augmentations assertNotNull("This component should be present", SchemaContextUtil.findDataSchemaNode(context, bar, 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 69% 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..7b84eadb75 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,40 +21,40 @@ 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", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/defaults/defaults", + StatementParserMode.OPENCONFIG_VER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - assertEquals(SemVer.valueOf("0.0.0"), foo.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.0.0"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.0"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.0.0"), bar.getOpenconfigVersion()); } @Test public void defaultMajorValidTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/defaults/default-major-valid", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/defaults/default-major-valid", + StatementParserMode.OPENCONFIG_VER_MODE); assertNotNull(context); Module foo = context.findModuleByNamespace(new URI("foo")).iterator().next(); Module bar = context.findModuleByNamespace(new URI("bar")).iterator().next(); - assertEquals(SemVer.valueOf("0.0.0"), foo.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.99.99"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.0"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.99.99"), bar.getOpenconfigVersion()); } @Test public void defaultMajorInvalidTest() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/defaults/default-major-invalid", - StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + StmtTestUtils.parseYangSources("/openconfig-version/defaults/default-major-invalid", + StatementParserMode.OPENCONFIG_VER_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.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 60% 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..2250c1e7dc 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,37 +18,37 @@ 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", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/ignoring-revision", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); } @Test public void ignoringRevision2Test() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/ignoring-revision-2", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/ignoring-revision-2", + StatementParserMode.OPENCONFIG_VER_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"); - assertEquals(SemVer.valueOf("0.0.1"), semVer.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); } } 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 57% 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..d6ab9af420 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,65 +21,65 @@ 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", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/import/import-valid", + StatementParserMode.OPENCONFIG_VER_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()); + assertEquals(SemVer.valueOf("1.0.0"), semVer.getOpenconfigVersion()); } @Test public void importInvalidDeprecatedTest1() throws Exception { try { - StmtTestUtils.parseYangSources("/semantic-version/import/import-invalid-deprecated-1", - StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid import of semantic-version module"); + StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-deprecated-1", + StatementParserMode.OPENCONFIG_VER_MODE); + 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", - StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid import of semantic-version module"); + StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-deprecated-2", + StatementParserMode.OPENCONFIG_VER_MODE); + 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", - StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid import of semantic-version module"); + StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-notsufficient-1", + StatementParserMode.OPENCONFIG_VER_MODE); + 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", - StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid import of semantic-version module"); + StmtTestUtils.parseYangSources("/openconfig-version/import/import-invalid-notsufficient-2", + StatementParserMode.OPENCONFIG_VER_MODE); + 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 66% 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..90a19121c8 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", - StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-invalid-deprecated", + StatementParserMode.OPENCONFIG_VER_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(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", - StatementParserMode.SEMVER_MODE); - fail("Test should fail due to invalid semantic version"); + StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-invalid-nosufficient", + StatementParserMode.OPENCONFIG_VER_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(2.5.5)].")); @@ -51,34 +51,34 @@ public class SemanticVersionMultipleImportTest { @Test public void multipleValidDefaultsTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-valid-defaults", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-valid-defaults", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); Module bar = findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("0.9.5"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.9.5"), bar.getOpenconfigVersion()); } @Test public void multipleValidSpecifiedTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/multiple/multiple-valid-specified", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/multiple/multiple-valid-specified", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); Module bar = findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("5.5.6"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("5.5.6"), bar.getOpenconfigVersion()); } private static Module findImportedModule(final SchemaContext context, final Module rootModule, 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 56% 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..2f5125c330 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,53 +18,53 @@ 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", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-head", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); } @Test public void positionMiddleTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-middle", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-middle", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); } @Test public void positiontailTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/position/position-tail", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/position/position-tail", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); } } 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 63% 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..c88f9bcfb0 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,90 +27,90 @@ 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", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); } @Test public void basicTest2() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic-2", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic-2", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); } @Test public void basicTest3() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic-3", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic-3", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); } @Test public void basicImportTest1() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/basic-import-1", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/basic-import-1", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); } @Test public void multipleModulesTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/multiple-modules", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/multiple-modules", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("0.10.4"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.10.4"), bar.getOpenconfigVersion()); } @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.OPENCONFIG_VER_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.OPENCONFIG_VER_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,18 +130,18 @@ public class SemanticVersionTest { @Test public void nodeTest() throws Exception { - SchemaContext context = StmtTestUtils.parseYangSources("/semantic-version/node-test", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYangSources("/openconfig-version/node-test", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("2016.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("2016.1.1"), foo.getOpenconfigVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("2016.4.6"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("2016.4.6"), bar.getOpenconfigVersion()); QName root = QName.create("foo", "2016-01-01", "foo-root"); QName container20160404 = QName.create("foo", "2016-01-01", "con20160404"); 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 66% 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..0ac9054381 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,46 +25,46 @@ 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", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYinSources("/openconfig-version/yin-input/basic", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); - assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); } @Test public void basicImportTest1() throws SourceException, FileNotFoundException, ReactorException, URISyntaxException { - SchemaContext context = StmtTestUtils.parseYinSources("/semantic-version/yin-input/basic-import", - StatementParserMode.SEMVER_MODE); + SchemaContext context = StmtTestUtils.parseYinSources("/openconfig-version/yin-input/basic-import", + StatementParserMode.OPENCONFIG_VER_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()); - assertEquals(SemVer.valueOf("0.1.1"), foo.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.0.1"), semVer.getOpenconfigVersion()); + assertEquals(SemVer.valueOf("0.1.1"), foo.getOpenconfigVersion()); Module bar = StmtTestUtils.findImportedModule(context, foo, "bar"); - assertEquals(SemVer.valueOf("0.1.2"), bar.getSemanticVersion()); + assertEquals(SemVer.valueOf("0.1.2"), bar.getOpenconfigVersion()); } @Test 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.OPENCONFIG_VER_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-3/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-3/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-3/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/rfc7950/semantic-version/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/rfc7950/semantic-version/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/rfc7950/semantic-version/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/semantic-version/complex/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/semantic-version/complex/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/semantic-version/complex/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/semantic-version/complex/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/semantic-version/complex/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/semantic-version/complex/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/rfc7950/semantic-version/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/rfc7950/semantic-version/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/rfc7950/semantic-version/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-2/semantic-version.yang b/yang/yang-parser-impl/src/test/resources/semantic-version/basic-2/semantic-version.yang deleted file mode 100644 index dd92de6883..0000000000 --- a/yang/yang-parser-impl/src/test/resources/semantic-version/basic-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-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 -- 2.36.6