├── .coafile
├── .eslintrc
├── .gitignore
├── .jshintrc
├── .project
├── .travis.yml
├── LICENSE
├── README.md
├── code
└── README.md
├── models
├── README.md
├── tools
│ ├── .gitignore
│ ├── 01-get-resources.sh
│ ├── 03-uml-to-yang.sh
│ ├── 04-yang2yin.sh
│ ├── 05-yin2json.sh
│ ├── README.md
│ ├── compare
│ │ └── MW10-MW11
│ │ │ ├── compare-report.html
│ │ │ ├── microwave-model@2017-03-24.yang
│ │ │ └── microwave-model@2019-03-23.yang
│ └── src
│ │ └── main
│ │ ├── docs
│ │ ├── config.txt.png
│ │ ├── core-model-ideal-process.png
│ │ ├── core-model-process.png
│ │ ├── main.js.png
│ │ ├── type.js.png
│ │ └── util.js.png
│ │ ├── json
│ │ ├── bbf-tr-196-2-0-3-full@2018-04-08.schema-information.json
│ │ ├── core-model@2017-03-20.schema-information.json
│ │ ├── g.874.1-model@2017-03-20.schema-information.json
│ │ ├── iana-crypt-hash@2014-08-06.schema-information.json
│ │ ├── ietf-inet-types@2010-09-24.schema-information.json
│ │ ├── ietf-inet-types@2013-07-15.schema-information.json
│ │ ├── ietf-netconf-acm@2012-02-22.schema-information.json
│ │ ├── ietf-netconf-monitoring@2010-10-04.schema-information.json
│ │ ├── ietf-netconf-partial-lock@2009-10-19.schema-information.json
│ │ ├── ietf-netconf-with-defaults@2011-06-01.schema-information.json
│ │ ├── ietf-netconf@2011-06-01.schema-information.json
│ │ ├── ietf-ptp-dataset@2017-02-08.schema-information.json
│ │ ├── ietf-restconf@2013-10-19.schema-information.json
│ │ ├── ietf-system@2014-08-06.schema-information.json
│ │ ├── ietf-yang-library@2016-04-09.schema-information.json
│ │ ├── ietf-yang-types@2013-07-15.schema-information.json
│ │ ├── microwave-model@2017-03-24.schema-information.json
│ │ ├── microwave-model@2018-09-07.schema-information.json
│ │ ├── microwave-model@2018-10-10.schema-information.json
│ │ ├── nc-notifications@2008-07-14.schema-information.json
│ │ ├── notifications@2008-07-14.schema-information.json
│ │ ├── notifications@2018-05-30.schema-information.json
│ │ ├── onf-core-model-conditional-packages@2017-04-02.schema-information.json
│ │ ├── onf-core-model-conditional-packages@2018-04-08.schema-information.json
│ │ ├── onf-ethernet-conditional-packages@2017-04-02.schema-information.json
│ │ ├── onf-otn-odu-conditional-packages@2017-10-20.schema-information.json
│ │ ├── onf-ptp-dataset@2017-05-08.schema-information.json
│ │ ├── photonic-media@2018-09-24.schema-information.json
│ │ ├── tapi-common@2018-08-31.schema-information.json
│ │ ├── tapi-connectivity@2018-08-31.schema-information.json
│ │ ├── tapi-dsr@2018-08-31.schema-information.json
│ │ ├── tapi-eth@2018-08-31.schema-information.json
│ │ ├── tapi-notification@2018-08-31.schema-information.json
│ │ ├── tapi-oam@2018-08-31.schema-information.json
│ │ ├── tapi-odu@2018-08-31.schema-information.json
│ │ ├── tapi-path-computation@2018-08-31.schema-information.json
│ │ ├── tapi-photonic-media@2018-08-31.schema-information.json
│ │ ├── tapi-topology@2018-08-31.schema-information.json
│ │ └── tapi-virtual-network@2018-08-31.schema-information.json
│ │ ├── odl-yang-to-sources
│ │ ├── .gitignore
│ │ ├── pom.xml
│ │ └── src
│ │ │ └── main
│ │ │ └── yang
│ │ │ ├── bbf-tr-196-2-0-3-full@2018-04-08.yang
│ │ │ ├── core-model@2017-03-20.yang
│ │ │ ├── core-model@2017-12-29.yang
│ │ │ ├── g.874.1-model@2017-03-20.yang
│ │ │ ├── ltp-path@2017-05-26.yang
│ │ │ ├── microwave-model@2017-03-24.yang
│ │ │ ├── notifications@2018-05-30.yang
│ │ │ └── onf-core-model-conditional-packages@2018-04-08.yang
│ │ ├── prune-and-refactor
│ │ ├── classesWithoutKey.xml
│ │ ├── keys.xml
│ │ ├── packagesBlackList.xml
│ │ ├── prune-and-refactor.xslt
│ │ └── removed.xml
│ │ ├── xmi2yang
│ │ ├── main.js
│ │ ├── model
│ │ │ └── yang
│ │ │ │ ├── type.js
│ │ │ │ └── util.js
│ │ ├── post-processing.js
│ │ ├── post-processing
│ │ │ ├── add-partial.yang
│ │ │ ├── find-replace.json
│ │ │ └── root-lists.json
│ │ └── project
│ │ │ ├── config.txt
│ │ │ └── ietf-system.yang
│ │ ├── xslt
│ │ └── yin2json.xslt
│ │ ├── yang
│ │ ├── bbf-tr-196-2-0-3-full@2018-04-08.yang
│ │ ├── core-model@2017-03-20.yang
│ │ ├── g.874.1-model@2017-03-20.yang
│ │ ├── iana-crypt-hash@2014-08-06.yang
│ │ ├── ietf-inet-types@2010-09-24.yang
│ │ ├── ietf-inet-types@2013-07-15.yang
│ │ ├── ietf-netconf-acm@2012-02-22.yang
│ │ ├── ietf-netconf-monitoring@2010-10-04.yang
│ │ ├── ietf-netconf-partial-lock@2009-10-19.yang
│ │ ├── ietf-netconf-with-defaults@2011-06-01.yang
│ │ ├── ietf-netconf@2011-06-01.yang
│ │ ├── ietf-ptp-dataset@2017-02-08.yang
│ │ ├── ietf-restconf@2013-10-19.yang
│ │ ├── ietf-system@2014-08-06.yang
│ │ ├── ietf-yang-library@2016-04-09.yang
│ │ ├── ietf-yang-types@2013-07-15.yang
│ │ ├── microwave-model@2017-03-24.yang
│ │ ├── microwave-model@2018-09-07.yang
│ │ ├── microwave-model@2018-10-10.yang
│ │ ├── nc-notifications@2008-07-14.yang
│ │ ├── notifications@2008-07-14.yang
│ │ ├── notifications@2018-05-30.yang
│ │ ├── onf-core-model-conditional-packages@2017-04-02.yang
│ │ ├── onf-core-model-conditional-packages@2018-04-08.yang
│ │ ├── onf-ethernet-conditional-packages@2017-04-02.yang
│ │ ├── onf-otn-odu-conditional-packages@2017-10-20.yang
│ │ ├── onf-ptp-dataset@2017-05-08.yang
│ │ ├── photonic-media@2018-09-24.yang
│ │ ├── tapi-common@2018-08-31.yang
│ │ ├── tapi-connectivity@2018-08-31.yang
│ │ ├── tapi-dsr@2018-08-31.yang
│ │ ├── tapi-eth@2018-08-31.yang
│ │ ├── tapi-notification@2018-08-31.yang
│ │ ├── tapi-oam@2018-08-31.yang
│ │ ├── tapi-odu@2018-08-31.yang
│ │ ├── tapi-path-computation@2018-08-31.yang
│ │ ├── tapi-photonic-media@2018-08-31.yang
│ │ ├── tapi-topology@2018-08-31.yang
│ │ └── tapi-virtual-network@2018-08-31.yang
│ │ └── yin
│ │ ├── bbf-tr-196-2-0-3-full@2018-04-08.yin
│ │ ├── core-model@2017-03-20.yin
│ │ ├── g.874.1-model@2017-03-20.yin
│ │ ├── iana-crypt-hash@2014-08-06.yin
│ │ ├── ietf-inet-types@2010-09-24.yin
│ │ ├── ietf-inet-types@2013-07-15.yin
│ │ ├── ietf-netconf-acm@2012-02-22.yin
│ │ ├── ietf-netconf-monitoring@2010-10-04.yin
│ │ ├── ietf-netconf-partial-lock@2009-10-19.yin
│ │ ├── ietf-netconf-with-defaults@2011-06-01.yin
│ │ ├── ietf-netconf@2011-06-01.yin
│ │ ├── ietf-ptp-dataset@2017-02-08.yin
│ │ ├── ietf-restconf@2013-10-19.yin
│ │ ├── ietf-system@2014-08-06.yin
│ │ ├── ietf-yang-library@2016-04-09.yin
│ │ ├── ietf-yang-types@2013-07-15.yin
│ │ ├── microwave-model@2017-03-24.yin
│ │ ├── microwave-model@2018-09-07.yin
│ │ ├── microwave-model@2018-10-10.yin
│ │ ├── nc-notifications@2008-07-14.yin
│ │ ├── notifications@2008-07-14.yin
│ │ ├── notifications@2018-05-30.yin
│ │ ├── onf-core-model-conditional-packages@2017-04-02.yin
│ │ ├── onf-core-model-conditional-packages@2018-04-08.yin
│ │ ├── onf-ethernet-conditional-packages@2017-04-02.yin
│ │ ├── onf-otn-odu-conditional-packages@2017-10-20.yin
│ │ ├── onf-ptp-dataset@2017-05-08.yin
│ │ ├── photonic-media@2018-09-24.yin
│ │ ├── tapi-common@2018-08-31.yin
│ │ ├── tapi-connectivity@2018-08-31.yin
│ │ ├── tapi-dsr@2018-08-31.yin
│ │ ├── tapi-eth@2018-08-31.yin
│ │ ├── tapi-notification@2018-08-31.yin
│ │ ├── tapi-oam@2018-08-31.yin
│ │ ├── tapi-odu@2018-08-31.yin
│ │ ├── tapi-path-computation@2018-08-31.yin
│ │ ├── tapi-photonic-media@2018-08-31.yin
│ │ ├── tapi-topology@2018-08-31.yin
│ │ └── tapi-virtual-network@2018-08-31.yin
├── tree
│ ├── core-model.tree
│ ├── g.874.1-model.tree
│ ├── ietf-ptp-dataset.tree
│ ├── ietf-yang-types.tree
│ ├── ltp-path.tree
│ ├── microwave-model.tree
│ ├── onf-core-model-conditional-packages.tree
│ ├── onf-ethernet-conditional-packages.tree
│ ├── onf-otn-odu-conditional-packages.tree
│ └── onf-ptp-dataset.tree
├── uml
│ ├── G.874_1_v2.08-PAP
│ │ ├── OpenModel_Profile.epx
│ │ ├── OpenModel_Profile.profile.di
│ │ ├── OpenModel_Profile.profile.notation
│ │ ├── OpenModel_Profile.profile.uml
│ │ ├── g874.1-model.di
│ │ ├── g874.1-model.notation
│ │ └── g874.1-model.uml
│ ├── OnfModel-CoreModel-ConditionalPackages
│ │ ├── onf-core-model-conditional-packages.di
│ │ ├── onf-core-model-conditional-packages.notation
│ │ └── onf-core-model-conditional-packages.uml
│ ├── OnfModel-CoreModel
│ │ ├── CoreCommonDataTypes.di
│ │ ├── CoreCommonDataTypes.notation
│ │ ├── CoreCommonDataTypes.uml
│ │ ├── CoreModel.di
│ │ ├── CoreModel.notation
│ │ ├── CoreModel.uml
│ │ ├── ImplementationCommonDataTypes.di
│ │ ├── ImplementationCommonDataTypes.notation
│ │ └── ImplementationCommonDataTypes.uml
│ ├── OnfModel-Ethernet-ConditionalPackages
│ │ ├── onf-ethernet-conditional-packages.di
│ │ ├── onf-ethernet-conditional-packages.notation
│ │ └── onf-ethernet-conditional-packages.uml
│ ├── OnfModel-MicrowaveTransportNetwork
│ │ ├── MicrowaveModel.di
│ │ ├── MicrowaveModel.notation
│ │ ├── MicrowaveModel.uml
│ │ └── Style Sheets
│ │ │ ├── CompartmentRestrictions.css
│ │ │ └── NoStereotyesDiagram.css
│ ├── OnfModel-OTN-ConditionalPackages
│ │ ├── onf-otn-conditional-packages.di
│ │ ├── onf-otn-conditional-packages.notation
│ │ └── onf-otn-conditional-packages.uml
│ └── OpenModelProfile
│ │ ├── OpenModel_Profile.profile.di
│ │ ├── OpenModel_Profile.profile.notation
│ │ └── OpenModel_Profile.profile.uml
├── yang
│ ├── core-model.yang
│ ├── g.874.1-model.yang
│ ├── ietf-ptp-dataset.yang
│ ├── ietf-yang-types.yang
│ ├── ltp-path.yang
│ ├── microwave-model.yang
│ ├── onf-core-model-conditional-packages.yang
│ ├── onf-ethernet-conditional-packages.yang
│ ├── onf-otn-odu-conditional-packages.yang
│ └── onf-ptp-dataset.yang
├── yang2whatever.sh
├── yin
│ ├── core-model.yin
│ ├── g.874.1-model.yin
│ ├── ietf-dataset.yin
│ ├── ietf-ptp-dataset.yin
│ ├── ietf-yang-types.yin
│ ├── ltp-path.yin
│ ├── microwave-model.yin
│ ├── onf-core-model-conditional-packages.yin
│ ├── onf-ethernet-conditional-packages.yin
│ ├── onf-otn-odu-conditional-packages.yin
│ └── onf-ptp-dataset.yin
└── yin2json.sh
└── test
├── test-automation-project
├── test-automation
│ ├── INSTALL.md
│ ├── README.md
│ ├── TA-ArchAndTopo.png
│ ├── automated_tests
│ │ ├── 01-standalone-YANG-parser.js
│ │ ├── 02-netconfserver-YANG-parser.js
│ │ ├── 03-netconfserver-YANG.js
│ │ ├── 04.1-netconf-YANG-ConfigurableData.js
│ │ ├── 04.2-netconf-YANG-ConfigurableData.js
│ │ ├── input
│ │ │ ├── test-cases-dvm.json
│ │ │ ├── test-cases-wte.json
│ │ │ └── test-cases.json
│ │ ├── logs
│ │ │ ├── TestResult.log
│ │ │ ├── capability.xml
│ │ │ ├── client.log
│ │ │ ├── data.xml
│ │ │ ├── parseData.log
│ │ │ ├── summaryReport01.log
│ │ │ ├── summaryReport02.log
│ │ │ ├── summaryReport03.log
│ │ │ ├── summaryReport04.log
│ │ │ └── userdata.xml
│ │ └── netconf_client
│ │ │ ├── core
│ │ │ ├── config.js
│ │ │ ├── debug.js
│ │ │ ├── netconf.js
│ │ │ └── xml2js-promise.js
│ │ │ └── netconf_client.js
│ ├── config.json
│ ├── package.json
│ └── ux
│ │ ├── app.js
│ │ ├── bin
│ │ └── www
│ │ ├── index.html
│ │ ├── public
│ │ ├── images
│ │ │ └── logo_opendaylight.gif
│ │ ├── index.html
│ │ ├── javascripts
│ │ │ ├── jquery-3.1.1.min.js
│ │ │ └── jquery-ui.js
│ │ └── stylesheets
│ │ │ ├── jquery-ui.css
│ │ │ ├── style.css
│ │ │ └── wstyle.css
│ │ ├── routes
│ │ ├── configxml.js
│ │ ├── executescript.js
│ │ ├── getjsonFile.js
│ │ ├── getlog.js
│ │ ├── gettopology.js
│ │ └── index.js
│ │ ├── stylesheets
│ │ └── wstyle.css
│ │ └── views
│ │ ├── error.jade
│ │ ├── index.jade
│ │ └── layout.jade
└── test-client
│ ├── README.md
│ ├── client
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── highstreet
│ │ │ └── technologies
│ │ │ └── test
│ │ │ └── client
│ │ │ ├── api
│ │ │ ├── Attribute.java
│ │ │ ├── Builder.java
│ │ │ ├── Node.java
│ │ │ ├── RestConfServer.java
│ │ │ ├── Result.java
│ │ │ ├── TestClient.java
│ │ │ └── Value.java
│ │ │ ├── enums
│ │ │ ├── AttributeNames.java
│ │ │ ├── ConditionalPackage.java
│ │ │ ├── Layer.java
│ │ │ ├── Protocol.java
│ │ │ └── SubObjectClass.java
│ │ │ └── impl
│ │ │ ├── AttributeBuilder.java
│ │ │ ├── NodeBuilder.java
│ │ │ ├── RestConfServerBuilder.java
│ │ │ ├── ResultBuilder.java
│ │ │ ├── TestClientBuilder.java
│ │ │ └── ValueBuilder.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── highstreet
│ │ └── technologies
│ │ └── test
│ │ └── client
│ │ └── TestClientTest.java
│ ├── pom.xml
│ └── test-cases
│ ├── example
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── highstreet
│ │ │ └── technologies
│ │ │ └── test
│ │ │ └── testCase
│ │ │ └── example
│ │ │ └── TestExample.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── highstreet
│ │ └── technologies
│ │ └── test
│ │ └── testCase
│ │ └── example
│ │ └── TestExampleTest.java
│ └── pom.xml
└── test-yang-compatibility
├── README.md
└── odl-carbon-cache-schema-yang
├── bbf-tr-196-2-0-3-full@2018-04-08.yang
├── core-model@2017-03-20.yang
├── g.874.1-model@2017-03-20.yang
├── ietf-inet-types@2010-09-24.yang
├── ietf-inet-types@2013-07-15.yang
├── ietf-netconf-acm@2012-02-22.yang
├── ietf-netconf-monitoring@2010-10-04.yang
├── ietf-netconf-partial-lock@2009-10-19.yang
├── ietf-netconf-with-defaults@2011-06-01.yang
├── ietf-netconf@2011-06-01.yang
├── ietf-ptp-dataset@2017-02-08.yang
├── ietf-restconf@2013-10-19.yang
├── ietf-system@2014-08-06.yang
├── ietf-yang-library@2016-04-09.yang
├── ietf-yang-types@2013-07-15.yang
├── microwave-model@2017-03-24.yang
├── nc-notifications@2008-07-14.yang
├── notifications@2008-07-14.yang
├── notifications@2018-05-30.yang
├── onf-core-model-conditional-packages@2017-04-02.yang
├── onf-core-model-conditional-packages@2018-04-08.yang
├── onf-ethernet-conditional-packages@2017-04-02.yang
├── onf-otn-odu-conditional-packages@2017-10-20.yang
└── onf-ptp-dataset@2017-05-08.yang
/.coafile:
--------------------------------------------------------------------------------
1 | # [javascript]
2 | # bears = ESLintBear, JSHintBear #, HappinessLintBear
3 | # eslint_config = .eslintrc
4 | # jshint_config = .jshintrc
5 | # files = models/**.js
6 |
7 | [json]
8 | bears = JSONFormatBear
9 | files = .eslintrc
10 |
11 | [yaml]
12 | bears = YAMLLintBear
13 | files = .travis.yml
14 |
15 | [yang]
16 | bears = YANGBear
17 | files = models/**.yang
18 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "eslint:recommended",
3 | "rules": {
4 | "no-console": 0,
5 | "no-redeclare": 0,
6 | "no-undef": 0
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | *.bak
3 | *.class
4 | .classpath
5 | .checkstyle
6 | .javacp*
7 | .metadata
8 | .project
9 | .pydevproject
10 | .recommenders
11 | .settings
12 | .fbExcludeFilterFile
13 | target
14 | target-ide
15 | *.iml
16 | *.pyc
17 | dependency-reduced-pom.xml
18 | maven-metadata-local.xml
19 | .idea
20 | *.DS_Store
21 | *.D
22 | *.o
23 | *.so
24 | *.md.html
25 | dependencies
26 | code*/dist*
27 | dist/
28 | code/ux/ux-dev.sh
29 | core/store/trivial/data/
30 | core/store/apps
31 | node_modules/
32 | bower_components/
33 | yang-gen-sal/
34 | yang-gen-config/
35 | models/tools/src/main/odl-yang-to-sources/src/main/yang/core-model@2017-12-29.yang
36 | wireless-transport/
37 | yarn-error.log
38 |
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "shadow": true,
3 | "sub": true,
4 |
5 | "undef": true,
6 | "predef": ["console", "module", "require"]
7 | }
8 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | CENTENNIAL
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language: python
4 | python:
5 | - '3.6'
6 |
7 | env:
8 | - NODE_JS_VERSION="7.5"
9 |
10 | install:
11 | - nvm install $NODE_JS_VERSION
12 | - npm install -g eslint jshint
13 |
14 | - pip install git+https://github.com/coala/coala-bears.git@zimmermann/yang
15 |
16 | script:
17 | - coala --ci --disable-caching
18 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 5G xHaul
2 |
3 | ONF 5G xHaul (front, mid, back, self) PoC Applications
4 |
--------------------------------------------------------------------------------
/code/README.md:
--------------------------------------------------------------------------------
1 | # Code
2 |
3 | Please place code for ONF 5G-xHaul apps and microservices here.
4 |
5 | ## Note
6 |
7 | Previous code in this directory is moved to [ONAP SDN-R](https://wiki.onap.org/display/DW/SDN-R+Developer+Guide) and managed within [ONAP gerrit](https://gerrit.onap.org).
8 |
9 | - **wiki**: https://wiki.onap.org/display/DW/SDN-R
10 |
11 | - **gerrit**: https://gerrit.onap.org/r/gitweb?p=ccsdk/features.git;a=tree;f=sdnr/wt;h=97b8c243c688030085affd76ab6c147bf72b0126;hb=refs/heads/master
12 |
13 | - **jira**: https://jira.onap.org/projects/CCSDK/issues/CCSDK-640?filter=allopenissues
14 |
15 | - **jenkins**: https://jenkins.onap.org/view/ccsdk/
16 |
17 | - **documenation**: https://docs.onap.org/en/latest/submodules/ccsdk/features.git/sdnr/wt/readthedocs/src/home.html#sdn-controller-for-radio-sdn-r
18 |
--------------------------------------------------------------------------------
/models/README.md:
--------------------------------------------------------------------------------
1 | # Data models
2 |
3 | ## Status
4 |
5 | - YANG files are valid according to pyang 1.7.3.
6 | - YANG files are valid according to OpenDaylight yang-validation-tool-1.2.0 (Nitrogen)
7 |
--------------------------------------------------------------------------------
/models/tools/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | src/main/resources
3 | src/main/yang
4 | **/.*
5 | *.log
--------------------------------------------------------------------------------
/models/tools/01-get-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ################################################################################
4 | # Script to convert yang modules into other formats
5 | # Author: martin.skorupski@highstreet-technologies.com
6 | #
7 | # Copyright 2018 higshtreet technologies GmbH
8 | # Licensed under the Apache License, Version 2.0 (the "License");
9 | # you may not use this file except in compliance with the License.
10 | # You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing, software
15 | # distributed under the License is distributed on an "AS IS" BASIS,
16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | # See the License for the specific language governing permissions and
18 | # limitations under the License.
19 | #
20 |
21 | echo
22 | echo "JAVA 8 expected"
23 | echo " sudo apt-get install openjdk-8-jdk"
24 | java -version
25 |
26 | echo
27 | echo "node expected"
28 | echo " sudo apt-get install nodejs npm jq --"
29 | echo " sudo ln -s /usr/bin/nodejs /usr/bin/node"
30 | node --version
31 |
32 | echo
33 | echo "python expected"
34 | echo " sudo apt-get install python-setuptools"
35 | echo " sudo python setup.py install"
36 | python --version
37 |
38 | echo
39 | echo "pyang expected"
40 | echo " git clone https://github.com/mbj4668/pyang.git"
41 | echo " cd pyang"
42 | echo " sudo apt-get install python-setuptools"
43 | echo " sudo python setup.py install"
44 | echo " cd .."
45 | pyang --version
46 |
47 | echo
48 | echo "unzip expected"
49 | echo " sudo apt-get install unzip"
50 | unzip -version
51 |
52 | cd src/main/resources
53 | rm -rf *
54 |
55 | echo "Download xslt processor"
56 | mkdir lib && cd lib
57 | wget https://sourceforge.net/projects/saxon/files/Saxon-HE/9.8/SaxonHE9-8-0-1J.zip;
58 | unzip SaxonHE9-8-0-1J.zip;
59 | cd ..
60 |
61 | echo "Download CoreModel 1.3"
62 | wget https://www.dropbox.com/sh/zns6hihpk2du7k4/AABAYA8ON1edlSAJ8jLBzoZEa/TR%20512%20v1.3/TR-512_v1._3_Publish.zip;
63 | unzip "TR-512_v1._3_Publish.zip"
64 |
65 | echo "Download UmlYangTools"
66 | rm -rf EAGLE-Open-Model-Profile-and-Tools;
67 | git clone https://github.com/OpenNetworkingFoundation/EAGLE-Open-Model-Profile-and-Tools.git;
68 | cd ./EAGLE-Open-Model-Profile-and-Tools/UmlYangTools/xmi2yang/;
69 | npm install
70 | cd ../../..
71 |
72 | echo "Modify UmlYangTools"
73 | cp -r ./src/main/xmi2yang/* ./src/main/resources/EAGLE-Open-Model-Profile-and-Tools/UmlYangTools/xmi2yang
--------------------------------------------------------------------------------
/models/tools/03-uml-to-yang.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ################################################################################
4 | # Script to convert yang modules into other formats
5 | # Author: martin.skorupski@highstreet-technologies.com
6 | #
7 | # Copyright 2018 higshtreet technologies GmbH
8 | # Licensed under the Apache License, Version 2.0 (the "License");
9 | # you may not use this file except in compliance with the License.
10 | # You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing, software
15 | # distributed under the License is distributed on an "AS IS" BASIS,
16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | # See the License for the specific language governing permissions and
18 | # limitations under the License.
19 | #
20 |
21 | # Modify UmlYangTools
22 | cp -r ./src/main/xmi2yang/* ./src/main/resources/EAGLE-Open-Model-Profile-and-Tools/UmlYangTools/xmi2yang
23 |
24 | # Convert UML to YANG
25 | cd ./src/main/resources/EAGLE-Open-Model-Profile-and-Tools/UmlYangTools/xmi2yang
26 |
27 | node main
28 | node post-processing
29 |
30 | # itereate through post processed yang modules
31 | files=./project/*@*.yang
32 | for file in $files;
33 | do
34 | # use pyang to format yang by converting yang to yin and back to yang
35 | pyang -f yin -o $file.yin $file;
36 | pyang -f yang -o $file $file.yin;
37 | # generate yang tree
38 | pyang -f tree -o $file.tree $file
39 |
40 | # copy all yang for odl java generation
41 | cp $file ../../../../odl-yang-to-sources/src/main/yang;
42 | done;
43 | cd ../../../../../..
44 |
45 | # verify, that OpenDaylight can generate sources
46 | # Expectation in logs: [INFO] BUILD SUCCESS
47 | cd ./src/main/odl-yang-to-sources
48 | mvn clean install -DskipTests
49 | cd ../../..
50 |
51 | # deploy
52 | cp ./src/main/odl-yang-to-sources/src/main/yang/*.yang ./target
53 | cp ./src/main/resources/EAGLE-Open-Model-Profile-and-Tools/UmlYangTools/xmi2yang/project/*.yang.yin ./target
54 | cp ./src/main/resources/EAGLE-Open-Model-Profile-and-Tools/UmlYangTools/xmi2yang/project/*.yang.tree ./target
--------------------------------------------------------------------------------
/models/tools/04-yang2yin.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ################################################################################
4 | # Script to convert yang modules into other formats
5 | # Author: martin.skorupski@highstreet-technologies.com
6 | #
7 | # Copyright 2018 higshtreet technologies GmbH
8 | # Licensed under the Apache License, Version 2.0 (the "License");
9 | # you may not use this file except in compliance with the License.
10 | # You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing, software
15 | # distributed under the License is distributed on an "AS IS" BASIS,
16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | # See the License for the specific language governing permissions and
18 | # limitations under the License.
19 | #
20 | # SPDX-License-Identifier: Apache-2.0
21 |
22 | # parameters
23 | yangs="./src/main/yang";
24 | yins="./src/main/yin";
25 |
26 | # methods
27 | function filename {
28 | x=${1%.*}
29 | y=${x/$yins/\.\/$2}
30 | echo $y"."$2;
31 | }
32 |
33 | function convert {
34 | FILENAME=$(filename $1 $2);
35 | pyang --path "$yangs:$yangs/ietf" --format $2 --output $FILENAME $1;
36 | }
37 |
38 | # process
39 | mkdir $yins;
40 | for yang in $yangs/*.yang; do
41 | echo "convert file: "$yang;
42 | $(convert $yang "yin");
43 | echo "done!";
44 | echo;
45 | done
--------------------------------------------------------------------------------
/models/tools/05-yin2json.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ################################################################################
4 | # Script to convert yang modules into other formats
5 | # Author: martin.skorupski@highstreet-technologies.com
6 | #
7 | # Copyright 2018 higshtreet technologies GmbH
8 | # Licensed under the Apache License, Version 2.0 (the "License");
9 | # you may not use this file except in compliance with the License.
10 | # You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing, software
15 | # distributed under the License is distributed on an "AS IS" BASIS,
16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | # See the License for the specific language governing permissions and
18 | # limitations under the License.
19 | #
20 |
21 | yins="./src/main/yin";
22 | jsons="./src/main/json";
23 | processor="./src/main/resources/lib/saxon9he.jar";
24 | xslt="./src/main/xslt/yin2json.xslt";
25 |
26 | mkdir $jsons;
27 |
28 | function filename {
29 | x=${1%.*}
30 | y=${x/$yins/\.\/$2}
31 | echo $y".schema-information."$2;
32 | }
33 |
34 | function convert {
35 | FILENAME=$(filename $1 $2);
36 | java -jar $processor -s:"$1" -xsl:"$xslt" -o:"$FILENAME";
37 | }
38 |
39 | for yin in $yins/*.yin; do
40 | echo "convert file: "$yin;
41 | $(convert $yin "json");
42 | echo "done!";
43 | echo;
44 | done
--------------------------------------------------------------------------------
/models/tools/src/main/docs/config.txt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/models/tools/src/main/docs/config.txt.png
--------------------------------------------------------------------------------
/models/tools/src/main/docs/core-model-ideal-process.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/models/tools/src/main/docs/core-model-ideal-process.png
--------------------------------------------------------------------------------
/models/tools/src/main/docs/core-model-process.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/models/tools/src/main/docs/core-model-process.png
--------------------------------------------------------------------------------
/models/tools/src/main/docs/main.js.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/models/tools/src/main/docs/main.js.png
--------------------------------------------------------------------------------
/models/tools/src/main/docs/type.js.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/models/tools/src/main/docs/type.js.png
--------------------------------------------------------------------------------
/models/tools/src/main/docs/util.js.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/models/tools/src/main/docs/util.js.png
--------------------------------------------------------------------------------
/models/tools/src/main/json/iana-crypt-hash@2014-08-06.schema-information.json:
--------------------------------------------------------------------------------
1 | { "schmea-information": {
2 |
3 | "iana-crypt-hash": {
4 | "id": "iana-crypt-hash",
5 | "is-read-only": false,
6 | "description": ["This YANG module defines a type for storing passwords using a hash function and features to indicate which hash functions are supported by an implementation. The latest revision of this YANG module can be obtained from the IANA web site. Requests for new values should be made to IANA via email (iana&iana.org). Copyright (c) 2014 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). The initial version of this YANG module is part of RFC 7317; see the RFC itself for full legal notices."]
7 | },
8 | "crypt-hash": {
9 | "id": "crypt-hash",
10 | "is-read-only": false,
11 | "description": ["The crypt-hash type is used to store passwords using a hash function. The algorithms for applying the hash function and encoding the result are implemented in various UNIX systems as the function crypt(3). A value of this type matches one of the forms: $0$ $$$ $$$$ The '$0$' prefix signals that the value is clear text. When such a value is received by the server, a hash value is calculated, and the string '$$$' or $$$$ is prepended to the result. This value is stored in the configuration data store. If a value starting with '$$', where is not '0', is received, the server knows that the value already represents a hashed value and stores it 'as is' in the data store. When a server needs to verify a password given by a user, it finds the stored password hash string for that user, extracts the salt, and calculates the hash with the salt and given password as input. If the calculated hash value is the same as the stored value, the password given by the client is accepted. This type defines the following hash functions: id | hash function | feature ---+---------------+------------------- 1 | MD5 | crypt-hash-md5 5 | SHA-256 | crypt-hash-sha-256 6 | SHA-512 | crypt-hash-sha-512 The server indicates support for the different hash functions by advertising the corresponding feature."]
12 | },
13 | "crypt-hash-md5": {
14 | "id": "crypt-hash-md5",
15 | "is-read-only": false,
16 | "description": ["Indicates that the device supports the MD5 hash function in 'crypt-hash' values."]
17 | },
18 | "crypt-hash-sha-256": {
19 | "id": "crypt-hash-sha-256",
20 | "is-read-only": false,
21 | "description": ["Indicates that the device supports the SHA-256 hash function in 'crypt-hash' values."]
22 | },
23 | "crypt-hash-sha-512": {
24 | "id": "crypt-hash-sha-512",
25 | "is-read-only": false,
26 | "description": ["Indicates that the device supports the SHA-512 hash function in 'crypt-hash' values."]
27 | }}
28 | }
--------------------------------------------------------------------------------
/models/tools/src/main/json/ietf-netconf-partial-lock@2009-10-19.schema-information.json:
--------------------------------------------------------------------------------
1 | { "schmea-information": {
2 |
3 | "ietf-netconf-partial-lock": {
4 | "id": "ietf-netconf-partial-lock",
5 | "is-read-only": false,
6 | "description": ["This YANG module defines the and operations."]
7 | },
8 | "lock-id-type": {
9 | "id": "lock-id-type",
10 | "is-read-only": false,
11 | "description": ["A number identifying a specific partial-lock granted to a session. It is allocated by the system, and SHOULD be used in the partial-unlock operation."]
12 | },
13 | "partial-lock": {
14 | "id": "partial-lock",
15 | "is-read-only": false,
16 | "description": ["A NETCONF operation that locks parts of the running datastore."]
17 | },
18 | "select": {
19 | "id": "select",
20 | "is-read-only": false,
21 | "description": ["XPath expression that specifies the scope of the lock. An Instance Identifier expression MUST be used unless the :xpath capability is supported, in which case any XPath 1.0 expression is allowed."]
22 | },
23 | "lock-id": {
24 | "id": "lock-id",
25 | "is-read-only": false,
26 | "description": ["Identifies the lock, if granted. The lock-id SHOULD be used in the partial-unlock rpc."]
27 | },
28 | "locked-node": {
29 | "id": "locked-node",
30 | "is-read-only": false,
31 | "description": ["List of locked nodes in the running datastore"]
32 | },
33 | "partial-unlock": {
34 | "id": "partial-unlock",
35 | "is-read-only": false,
36 | "description": ["A NETCONF operation that releases a previously acquired partial-lock."]
37 | },
38 | "lock-id": {
39 | "id": "lock-id",
40 | "is-read-only": false,
41 | "description": ["Identifies the lock to be released. MUST be the value received in the response to a partial-lock operation."]
42 | }}
43 | }
--------------------------------------------------------------------------------
/models/tools/src/main/json/ietf-netconf-with-defaults@2011-06-01.schema-information.json:
--------------------------------------------------------------------------------
1 | { "schmea-information": {
2 |
3 | "ietf-netconf-with-defaults": {
4 | "id": "ietf-netconf-with-defaults",
5 | "is-read-only": false,
6 | "description": ["This module defines an extension to the NETCONF protocol that allows the NETCONF client to control how default values are handled by the server in particular NETCONF operations. Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC 6243; see the RFC itself for full legal notices."]
7 | },
8 | "with-defaults-mode": {
9 | "id": "with-defaults-mode",
10 | "is-read-only": false,
11 | "description": ["Possible modes to report default data."]
12 | },
13 | "report-all": {
14 | "id": "report-all",
15 | "is-read-only": false,
16 | "description": ["All default data is reported."]
17 | },
18 | "report-all-tagged": {
19 | "id": "report-all-tagged",
20 | "is-read-only": false,
21 | "description": ["All default data is reported. Any nodes considered to be default data will contain a 'default' XML attribute, set to 'true' or '1'."]
22 | },
23 | "trim": {
24 | "id": "trim",
25 | "is-read-only": false,
26 | "description": ["Values are not reported if they contain the default."]
27 | },
28 | "explicit": {
29 | "id": "explicit",
30 | "is-read-only": false,
31 | "description": ["Report values that contain the definition of explicitly set data."]
32 | },
33 | "with-defaults-parameters": {
34 | "id": "with-defaults-parameters",
35 | "is-read-only": false,
36 | "description": ["Contains the parameter for control of defaults in NETCONF retrieval operations."]
37 | },
38 | "with-defaults": {
39 | "id": "with-defaults",
40 | "is-read-only": false,
41 | "description": ["The explicit defaults processing mode requested."]
42 | },}
43 | }
--------------------------------------------------------------------------------
/models/tools/src/main/json/nc-notifications@2008-07-14.schema-information.json:
--------------------------------------------------------------------------------
1 | { "schmea-information": {
2 |
3 | "nc-notifications": {
4 | "id": "nc-notifications",
5 | "is-read-only": false,
6 | "description": ["Conversion of the 'manageEvent' XSD in the NETCONF Notifications RFC."]
7 | },
8 | "netconf": {
9 | "id": "netconf",
10 | "is-read-only": false,
11 | "description": ["Top-level element in the notification namespace"]
12 | },
13 | "streams": {
14 | "id": "streams",
15 | "is-read-only": false,
16 | "description": ["The list of event streams supported by the system. When a query is issued, the returned set of streams is determined based on user privileges."]
17 | },
18 | "stream": {
19 | "id": "stream",
20 | "is-read-only": false,
21 | "description": ["Stream name, description and other information."]
22 | },
23 | "name": {
24 | "id": "name",
25 | "is-read-only": false,
26 | "description": ["The name of the event stream. If this is the default NETCONF stream, this must have the value 'NETCONF'."]
27 | },
28 | "description": {
29 | "id": "description",
30 | "is-read-only": false,
31 | "description": ["A description of the event stream, including such information as the type of events that are sent over this stream."]
32 | },
33 | "replaySupport": {
34 | "id": "replaySupport",
35 | "is-read-only": false,
36 | "description": ["A description of the event stream, including such information as the type of events that are sent over this stream."]
37 | },
38 | "replayLogCreationTime": {
39 | "id": "replayLogCreationTime",
40 | "is-read-only": false,
41 | "description": ["The timestamp of the creation of the log used to support the replay function on this stream. Note that this might be earlier then the earliest available notification in the log. This object is updated if the log resets for some reason. This object MUST be present if replay is supported."]
42 | },
43 | "replayComplete": {
44 | "id": "replayComplete",
45 | "is-read-only": false,
46 | "description": ["This notification is sent to signal the end of a replay portion of a subscription."]
47 | },
48 | "notificationComplete": {
49 | "id": "notificationComplete",
50 | "is-read-only": false,
51 | "description": ["This notification is sent to signal the end of a notification subscription. It is sent in the case that stopTime was specified during the creation of the subscription.."]
52 | }}
53 | }
--------------------------------------------------------------------------------
/models/tools/src/main/json/notifications@2008-07-14.schema-information.json:
--------------------------------------------------------------------------------
1 | { "schmea-information": {
2 |
3 | "notifications": {
4 | "id": "notifications",
5 | "is-read-only": false,
6 | "description": ["Conversion of the 'ncEvent' XSD in the NETCONF Notifications RFC."]
7 | },
8 | "streamNameType": {
9 | "id": "streamNameType",
10 | "is-read-only": false,
11 | "description": ["The name of an event stream."]
12 | },
13 | "create-subscription": {
14 | "id": "create-subscription",
15 | "is-read-only": false,
16 | "description": ["The command to create a notification subscription. It takes as argument the name of the notification stream and filter. Both of those options limit the content of the subscription. In addition, there are two time-related parameters, startTime and stopTime, which can be used to select the time interval of interest to the notification replay feature."]
17 | },
18 | "stream": {
19 | "id": "stream",
20 | "is-read-only": false,
21 | "description": ["An optional parameter that indicates which stream of events is of interest. If not present, then events in the default NETCONF stream will be sent."]
22 | },
23 | "filter": {
24 | "id": "filter",
25 | "is-read-only": false,
26 | "description": ["An optional parameter that indicates which subset of all possible events is of interest. The format of this parameter is the same as that of the filter parameter in the NETCONF protocol operations. If not present, all events not precluded by other parameters will be sent."]
27 | },
28 | "startTime": {
29 | "id": "startTime",
30 | "is-read-only": false,
31 | "description": ["A parameter used to trigger the replay feature and indicates that the replay should start at the time specified. If start time is not present, this is not a replay subscription."]
32 | },
33 | "stopTime": {
34 | "id": "stopTime",
35 | "is-read-only": false,
36 | "description": ["An optional parameter used with the optional replay feature to indicate the newest notifications of interest. If stop time is not present, the notifications will continue until the subscription is terminated. Must be used with startTime."]
37 | }}
38 | }
--------------------------------------------------------------------------------
/models/tools/src/main/json/notifications@2018-05-30.schema-information.json:
--------------------------------------------------------------------------------
1 | { "schmea-information": {
2 |
3 | "notifications": {
4 | "id": "notifications",
5 | "is-read-only": false,
6 | "description": ["Conversion of the 'ncEvent' XSD in the NETCONF Notifications RFC."]
7 | },
8 | "streamNameType": {
9 | "id": "streamNameType",
10 | "is-read-only": false,
11 | "description": ["The name of an event stream."]
12 | },
13 | "create-subscription": {
14 | "id": "create-subscription",
15 | "is-read-only": false,
16 | "description": ["The command to create a notification subscription. It takes as argument the name of the notification stream and filter. Both of those options limit the content of the subscription. In addition, there are two time-related parameters, startTime and stopTime, which can be used to select the time interval of interest to the notification replay feature."]
17 | },
18 | "stream": {
19 | "id": "stream",
20 | "is-read-only": false,
21 | "description": ["An optional parameter that indicates which stream of events is of interest. If not present, then events in the default NETCONF stream will be sent."]
22 | },
23 | "filter": {
24 | "id": "filter",
25 | "is-read-only": false,
26 | "description": ["An optional parameter that indicates which subset of all possible events is of interest. The format of this parameter is the same as that of the filter parameter in the NETCONF protocol operations. If not present, all events not precluded by other parameters will be sent."]
27 | },
28 | "startTime": {
29 | "id": "startTime",
30 | "is-read-only": false,
31 | "description": ["A parameter used to trigger the replay feature and indicates that the replay should start at the time specified. If start time is not present, this is not a replay subscription."]
32 | },
33 | "stopTime": {
34 | "id": "stopTime",
35 | "is-read-only": false,
36 | "description": ["An optional parameter used with the optional replay feature to indicate the newest notifications of interest. If stop time is not present, the notifications will continue until the subscription is terminated. Must be used with startTime."]
37 | },
38 | "notification": {
39 | "id": "notification",
40 | "is-read-only": false,
41 | "description": ["internal struct to start a notification"]
42 | },
43 | "eventTime": {
44 | "id": "eventTime",
45 | "is-read-only": false,
46 | "description": ["The time the event was generated by the event source. This parameter is of type dateTime and compliant to [RFC3339]. Implementations must support time zones."]
47 | }}
48 | }
--------------------------------------------------------------------------------
/models/tools/src/main/json/onf-ethernet-conditional-packages@2017-04-02.schema-information.json:
--------------------------------------------------------------------------------
1 | { "schmea-information": {
2 |
3 | "onf-ethernet-conditional-packages": {
4 | "id": "onf-ethernet-conditional-packages",
5 | "is-read-only": false,
6 | "description": ["This model adds conditional packages to the ONF CoreModel in order address Ethernet use cases."]
7 | },
8 | "layer-protocol": {
9 | "id": "layer-protocol",
10 | "is-read-only": false,
11 | "description": ["none"]
12 | },
13 | "ethernet-capability": {
14 | "id": "ethernet-capability",
15 | "is-read-only": false,
16 | "description": ["none"]
17 | },
18 | "ethernet-configuration": {
19 | "id": "ethernet-configuration",
20 | "is-read-only": false,
21 | "description": ["none"]
22 | },
23 | "ethernet-status": {
24 | "id": "ethernet-status",
25 | "is-read-only": false,
26 | "description": ["none"]
27 | },
28 | "ethernet-current-problems": {
29 | "id": "ethernet-current-problems",
30 | "is-read-only": false,
31 | "description": ["none"]
32 | },
33 | "ethernet-current-performance": {
34 | "id": "ethernet-current-performance",
35 | "is-read-only": false,
36 | "description": ["none"]
37 | },
38 | "ethernet-historical-performances": {
39 | "id": "ethernet-historical-performances",
40 | "is-read-only": false,
41 | "description": ["none"]
42 | },
43 | "ethernet-pac": {
44 | "id": "ethernet-pac",
45 | "is-read-only": false,
46 | "description": ["none"]
47 | },
48 | "ethernet-capability-g": {
49 | "id": "ethernet-capability-g",
50 | "is-read-only": false,
51 | "description": ["none"]
52 | },
53 | "vlan-id": {
54 | "id": "vlan-id",
55 | "is-read-only": false,
56 | "description": ["value = 0: frames on ingress must be untagged, frames on egress get untagged; value = any other positive integer < 4096: frames on ingress must be tagged with this VLAN ID, frames on egress either already have or get this VLAN ID attached;"]
57 | },
58 | "ethernet-configuration-g": {
59 | "id": "ethernet-configuration-g",
60 | "is-read-only": false,
61 | "description": ["none"]
62 | },
63 | "ethernet-status-g": {
64 | "id": "ethernet-status-g",
65 | "is-read-only": false,
66 | "description": ["none"]
67 | },
68 | "ethernet-current-problems-g": {
69 | "id": "ethernet-current-problems-g",
70 | "is-read-only": false,
71 | "description": ["none"]
72 | },
73 | "ethernet-current-performance-g": {
74 | "id": "ethernet-current-performance-g",
75 | "is-read-only": false,
76 | "description": ["none"]
77 | },
78 | "ethernet-historical-performances-g": {
79 | "id": "ethernet-historical-performances-g",
80 | "is-read-only": false,
81 | "description": ["none"]
82 | }}
83 | }
--------------------------------------------------------------------------------
/models/tools/src/main/json/onf-ptp-dataset@2017-05-08.schema-information.json:
--------------------------------------------------------------------------------
1 | { "schmea-information": {
2 |
3 | "onf-ptp-dataset": {
4 | "id": "onf-ptp-dataset",
5 | "is-read-only": false,
6 | "description": ["This module contains a collection of YANG definitions to extent ptp-dataset."]
7 | },
8 | "local-priority": {
9 | "id": "local-priority",
10 | "is-read-only": false,
11 | "description": ["none"]
12 | },
13 | "max-steps-removed": {
14 | "id": "max-steps-removed",
15 | "is-read-only": false,
16 | "description": ["none"]
17 | },
18 | "multicast-mac-address": {
19 | "id": "multicast-mac-address",
20 | "is-read-only": false,
21 | "description": ["none"]
22 | },
23 | "designated-enabled": {
24 | "id": "designated-enabled",
25 | "is-read-only": false,
26 | "description": ["A PTP Clock needs to be enabled by management."]
27 | },
28 | "master-only": {
29 | "id": "master-only",
30 | "is-read-only": false,
31 | "description": ["Indicates that port can only be a master."]
32 | },
33 | "local-priority": {
34 | "id": "local-priority",
35 | "is-read-only": false,
36 | "description": ["Local priority as used for alternate BMCA"]
37 | },
38 | "designated-enabled": {
39 | "id": "designated-enabled",
40 | "is-read-only": false,
41 | "description": ["A PTP Port needs to be enabled by management."]
42 | },
43 | "delay-asymmetry": {
44 | "id": "delay-asymmetry",
45 | "is-read-only": false,
46 | "description": ["As per PTP Known path asymmetry in ns."]
47 | },
48 | "logical-termination-point": {
49 | "id": "logical-termination-point",
50 | "is-read-only": false,
51 | "description": ["A reference to a LTP of layer-protocol-name 'ETY' or 'MWPS', which is used to discover the PTP topology."]
52 | }}
53 | }
--------------------------------------------------------------------------------
/models/tools/src/main/odl-yang-to-sources/.gitignore:
--------------------------------------------------------------------------------
1 | /target-ide/
2 |
--------------------------------------------------------------------------------
/models/tools/src/main/odl-yang-to-sources/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | org.opendaylight.controller
6 | config-parent
7 | 0.7.1
8 |
9 |
10 | device-model
11 | ${prefix} ${project.artifactId}
12 | bundle
13 |
14 | ONF ::
15 |
30 | true
31 | true
32 |
33 |
34 |
35 | org.opendaylight.mdsal.model
36 | ietf-topology
37 |
38 |
39 |
40 | org.opendaylight.mdsal.model
41 | yang-ext
42 |
43 |
44 | org.opendaylight.controller
45 | config-api
46 |
47 |
48 | junit
49 | junit
50 | test
51 |
52 |
53 | org.mockito
54 | mockito-core
55 | test
56 |
57 |
58 |
59 |
60 |
61 | org.apache.maven.plugins
62 | maven-checkstyle-plugin
63 |
64 |
65 | process-sources
66 |
67 | check
68 |
69 |
70 |
71 |
72 |
73 | ${project.basedir}/../../commons/src/main/resources/checks.xml
74 |
75 | true
76 | **/*.java,**/*.xml,**/*.ini,**/*.sh,**/*.bat
77 | **\/target\/,**\/bin\/,**\/third-party,**\/yang-gen-sal
78 |
79 |
80 |
81 | org.jacoco
82 | jacoco-maven-plugin
83 |
84 |
85 | org.opendaylight.atrium.*
86 |
87 |
88 |
89 |
90 | pre-test
91 |
92 | prepare-agent
93 |
94 |
95 |
96 | post-test
97 |
98 | report
99 |
100 | test
101 |
102 |
103 |
104 |
105 | maven-jar-plugin
106 |
107 |
108 | org.apache.felix
109 | maven-bundle-plugin
110 | true
111 |
112 |
113 | ${project.groupId}.${project.artifactId}
114 |
115 |
116 |
117 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/models/tools/src/main/odl-yang-to-sources/src/main/yang/ltp-path@2017-05-26.yang:
--------------------------------------------------------------------------------
1 | module ltp-path {
2 | namespace "urn:onf:params:xml:ns:yang:ltp-path";
3 | prefix ltp-path;
4 |
5 | import core-model {
6 | prefix core-model;
7 | }
8 |
9 | organization
10 | "ONF (Open Networking Foundation) Open Transport Working Group -
11 | Wireless Transport Project";
12 | contact
13 | "WG Web:
15 | WG List:
16 | WG Chair: Lyndon Ong
17 |
18 | WG Chair: Giorgio Cazzaniga
19 |
20 | Editor: Martin Skorupski
21 | ";
22 | description
23 | "This module contains a collection of YANG definitions describing a
24 | telecommunication network path.";
25 |
26 | revision 2017-05-26 {
27 | description "Initial version";
28 | reference "ltp-path, ONF core-model 1.2";
29 | }
30 |
31 | typedef layer-protocol-name-enumeration {
32 | type enumeration {
33 | enum ETH {
34 | value 1;
35 | description
36 | "Identifying the layer of Ethernet.";
37 | }
38 | enum PTP {
39 | value 2;
40 | description
41 | "Identifying the layer or the Precision Time Protocol.";
42 | }
43 | }
44 |
45 | description
46 | "The propagation of the layer protocol name.";
47 | }
48 |
49 | container ltp-path {
50 | description
51 | "Listing all the path-identifiers, used by RESTCONF interfaces to
52 | address an entry in the ltp-path-list.";
53 |
54 | leaf-list path-identifier {
55 | type leafref {
56 | path '/ltp-path/ltp-path-list/path-id';
57 | }
58 | description
59 | "List of reference values for existing path entries.";
60 | }
61 |
62 | list ltp-path-list {
63 |
64 | key "path-id";
65 |
66 | description
67 | "A list of path found in the network.";
68 |
69 | leaf path-id {
70 | type string;
71 | description
72 | "A unique identifier of a path. It migth be beneficial to use the
73 | format as defined in RFC 4122
74 | (https://www.ietf.org/rfc/rfc4122.txt).";
75 | }
76 |
77 | leaf path-name {
78 | type string;
79 | description
80 | "The human readable name of a path. It should include start
81 | and end point.";
82 | }
83 |
84 | leaf forwarding-direction {
85 | type core-model:forwarding-direction;
86 | description
87 | "Defines the directionality of the path.";
88 | }
89 |
90 | leaf layer-protocol-name {
91 | type layer-protocol-name-enumeration;
92 | description
93 | "Defines the layer of the path. Please see ONF CoreModel for
94 | further details.";
95 | }
96 |
97 | list logical-termination-point-list {
98 |
99 | key "ltp-index";
100 | min-elements 2;
101 |
102 | description
103 | "An ordered list of logical-termination points, defining the path.";
104 |
105 | leaf ltp-index {
106 | type string;
107 | description
108 | "The index of the LTP with in the list. The LTP with the highest
109 | index is the end-point of the path. The LTP with the lowest
110 | index is the start-point of the path.";
111 | }
112 |
113 | leaf ltp-reference {
114 | type leafref {
115 | path '/core-model:network-element/core-model:ltp/core-model:uuid';
116 | }
117 | description
118 | "The reference value of a network-elements LTP.";
119 | }
120 |
121 | leaf physical-port-reference {
122 | type string;
123 | description
124 | "A text label for the unmodelled physical port associated with
125 | the LTP. In many cases there is no associated physical port.";
126 | }
127 |
128 | leaf node-reference {
129 | type leafref {
130 | path '/core-model:network-element/core-model:uuid';
131 | }
132 | description
133 | "A reference value identifying a network-element.";
134 | }
135 | }
136 | }
137 | }
138 | }
139 |
--------------------------------------------------------------------------------
/models/tools/src/main/odl-yang-to-sources/src/main/yang/notifications@2018-05-30.yang:
--------------------------------------------------------------------------------
1 | module notifications {
2 | yang-version 1;
3 | namespace "urn:ietf:params:xml:ns:netconf:notification:1.0";
4 | prefix ncEvent;
5 |
6 | import ietf-yang-types {
7 | prefix yang;
8 | }
9 |
10 | organization
11 | "IETF NETCONF WG";
12 | contact
13 | "netconf@ops.ietf.org";
14 | description
15 | "Conversion of the 'ncEvent' XSD in the
16 | NETCONF Notifications RFC.";
17 | reference "RFC 5277.";
18 |
19 | revision 2018-05-30 {
20 | description
21 | "First step to a common notification yang.";
22 | reference
23 | "RFC 5277: NETCONF Event Notifications";
24 | }
25 | revision 2008-07-14 {
26 | description
27 | "Initial version";
28 | reference
29 | "RFC 5277: NETCONF Event Notifications";
30 | }
31 |
32 | typedef streamNameType {
33 | type string;
34 | description
35 | "The name of an event stream.";
36 | }
37 |
38 | rpc create-subscription {
39 | description
40 | "The command to create a notification subscription. It
41 | takes as argument the name of the notification stream
42 | and filter. Both of those options limit the content of
43 | the subscription. In addition, there are two time-related
44 | parameters, startTime and stopTime, which can be used to
45 | select the time interval of interest to the notification
46 | replay feature.";
47 | input {
48 | leaf stream {
49 | type streamNameType;
50 | default "NETCONF";
51 | description
52 | "An optional parameter that indicates which stream of events
53 | is of interest. If not present, then events in the default
54 | NETCONF stream will be sent.";
55 | }
56 | anyxml filter {
57 | description
58 | "An optional parameter that indicates which subset of all
59 | possible events is of interest. The format of this
60 | parameter is the same as that of the filter parameter
61 | in the NETCONF protocol operations. If not present,
62 | all events not precluded by other parameters will
63 | be sent.";
64 | }
65 | leaf startTime {
66 | type yang:date-and-time;
67 | description
68 | "A parameter used to trigger the replay feature and
69 | indicates that the replay should start at the time
70 | specified. If start time is not present, this is not a
71 | replay subscription.";
72 | }
73 | leaf stopTime {
74 | type yang:date-and-time;
75 | description
76 | "An optional parameter used with the optional replay
77 | feature to indicate the newest notifications of
78 | interest. If stop time is not present, the notifications
79 | will continue until the subscription is terminated.
80 | Must be used with startTime.";
81 | }
82 | }
83 | }
84 | container notification {
85 | config false;
86 | description
87 | "internal struct to start a notification";
88 | leaf eventTime {
89 | type yang:date-and-time;
90 | mandatory true;
91 | description
92 | "The time the event was generated by the event source. This
93 | parameter is of type dateTime and compliant to [RFC3339].
94 | Implementations must support time zones.";
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/models/tools/src/main/prune-and-refactor/classesWithoutKey.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | A list of UML classes missing a key attributes used as index, identifier or yang-key. Such classes will enhanced by pruning and refactoring with the generalization of the GlobalClass. This way the uuid of the GlobalClass can be used as the missing key attribute. Other approches are possbile and may need to be discussed case-by-case.
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/models/tools/src/main/prune-and-refactor/keys.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | A list of uml attributes, which should be marked as 'partOfObjectKey'.
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/models/tools/src/main/prune-and-refactor/packagesBlackList.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | A list of uml packages, which are removed by pruning and refactoring from the intitial model. Reason are: Packages are deprecated or too much experimantal or used only for explainatory purposes.
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/models/tools/src/main/prune-and-refactor/removed.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | A list of UML attributes, enumerations and classes, which are removed from model by pruning and refactoring
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/models/tools/src/main/xmi2yang/model/yang/util.js:
--------------------------------------------------------------------------------
1 | /********************************************************************************************************
2 | * Name: UML to YANG Mapping Tool
3 | * Copyright 2015 CAICT (China Academy of Information and Communication Technology (former China Academy of Telecommunication Research)). All Rights Reserved.
4 | * Licensed under the Apache License, Version 2.0 (the "License").
5 | *
6 | * This tool is developed according to the mapping rules defined in onf2015.261_Mapping_Gdls_UML-YANG.08 by OpenNetworkFoundation(ONF) IMP group.
7 | *
8 | * file: \model\yang\module.js
9 | *
10 | * The above copyright information should be included in all distribution, reproduction or derivative works of this software.
11 | *
12 | ****************************************************************************************************/
13 | function Util(str){
14 |
15 | }
16 | Util.yangifyName = function(str) {
17 | if (str === str.toUpperCase()) {
18 | // "BIDIRECTIONAL" to "bidirectional" instead of "b-i-d-i-r-e-c-t-i-o-n-a-l"
19 | return str.toLowerCase();
20 | }
21 | return str
22 | .replace( /([a-z])([A-Z])/g, '$1-$2' ) // insert dashes
23 | .replace( /([0-9]+)/g, '-$1' )
24 | .replace( /([0-9]+)([A-Z])/g, '$1-$2' )
25 | .replace( /([A-Z])([A-Z])/g, '$1-$2' )
26 | .toLowerCase() // lowercase everything
27 | .replace( /^[_-]/, '') // remove leading underscore
28 | .replace( /^[_-]/, '') // remove leading underscore (also second) TODO merge with previous line
29 | .replace( /:_/g, ':') // and leading underscores in path segments
30 | .replace( /_/g, '-') // convert underscore and period to dash
31 | //.replace( /(^-)/g, '')
32 | .replace( /-{2}/g, '-')
33 | .replace( /([0-9])\.-([0-9])/g, '$1.$2');
34 | };
35 |
36 | Util.typeifyName = function(str) {
37 | return str
38 | .replace( /([a-z])([A-Z])/g, '$1-$2' ) // insert dashes
39 | .replace( /([0-9]+)/g, '-$1' )
40 | .replace( /([0-9]+)([A-Z])/g, '$1-$2' )
41 | .toLowerCase() // lowercase everything
42 | .replace( /^[_-]/, '') // remove leading underscore
43 | .replace( /:_/g, ':') // and leading underscores in path segments
44 | .replace( /_/g, '-') // convert underscore and period to dash
45 | //.replace( /(^-)/g, '')
46 | .replace( /-{2}/g, '-')
47 | .replace( /([0-9])\.-([0-9])/g, '$1.$2');
48 | };
49 |
50 | module.exports = Util;
--------------------------------------------------------------------------------
/models/tools/src/main/xmi2yang/post-processing.js:
--------------------------------------------------------------------------------
1 | if (!String.prototype.format) {
2 | String.prototype.format = function () {
3 | var args = arguments;
4 | return this.replace(/{(\d+)}/g, function (match, number) {
5 | return typeof args[number] != 'undefined' ? args[number] : match;
6 | });
7 | };
8 | }
9 |
10 | var fs = require('fs');
11 | var path = require('path');
12 | var replacing = require('./post-processing/find-replace.json');
13 | var rootLists = require('./post-processing/root-lists.json')['root-lists'];
14 |
15 | var whiteList = ['core-model.yang'];
16 | var extension = '.yang';
17 |
18 | var folder = './project';
19 | if (process.argv.length > 2) {
20 | folder = process.argv[2];
21 | }
22 |
23 | var save = function (filename, string) {
24 | fs.writeFile(filename, string, function (error) {
25 | if (error) throw error;
26 | });
27 | };
28 |
29 | var getRevision = function (data) {
30 | var find = 'revision ';
31 | var revisionFormat = 'yyyy-mm-dd';
32 | var start = data.indexOf(find) + find.length;
33 | return data.slice(start, start + revisionFormat.length);
34 | };
35 |
36 | var postProcess = function (filename) {
37 | var addToYang = [__dirname, 'post-processing', 'add-partial.yang'].join('/');
38 | var add = fs.readFileSync(addToYang, 'utf8');
39 | var format = [' list {0} {', ' key "{1}";', ' uses {2};',' description', ' "{3}";', ' }', ''].join('\n');
40 | Object.keys(rootLists).map(function (item) {
41 | var key = rootLists[item].key || 'uuid';
42 | var uses = rootLists[item].uses || item + '-g';
43 | var description = rootLists[item].description || 'none';
44 | var yangList = format.format(item, key, uses, description);
45 | add += yangList;
46 | });
47 |
48 | fs.readFile(filename, 'utf8', function (error, data) {
49 | if (error) throw error;
50 | var revision = getRevision(data);
51 | var newFilename = [filename.slice(0, filename.length - extension.length), '@', revision, extension].join('');
52 |
53 | // replace leaf references
54 | Object.keys(replacing).map(function (find) {
55 | var regex = new RegExp(find, 'g');
56 | data = data.replace(regex, replacing[find]);
57 | });
58 |
59 | // add yang root elements at the end
60 | var pos = data.lastIndexOf('}');
61 | data = [data.slice(0, pos), add, data.slice(pos)].join('\n');
62 |
63 | save(newFilename, data);
64 | });
65 | };
66 |
67 | var scanFolder = function (startPath, filter) {
68 |
69 | if (!fs.existsSync(startPath)) {
70 | console.info("Is not a directory:", startPath);
71 | return;
72 | }
73 |
74 | var files = fs.readdirSync(startPath)
75 | .filter(function (file) {
76 | return file.slice(-filter.length) === filter && whiteList.indexOf(file) > -1;
77 | })
78 | .map(function (file) {
79 | var filename = [__dirname, startPath, file].join('/');
80 | postProcess(filename);
81 | });
82 | };
83 | scanFolder(folder, extension);
--------------------------------------------------------------------------------
/models/tools/src/main/xmi2yang/post-processing/add-partial.yang:
--------------------------------------------------------------------------------
1 | container control-component {
2 | uses control-component-g;
3 | description "none";
4 | }
5 |
--------------------------------------------------------------------------------
/models/tools/src/main/xmi2yang/post-processing/find-replace.json:
--------------------------------------------------------------------------------
1 | {
2 | "type to-be-defined;'": "type string; // type to-be-defined;'",
3 | "default \"LayerProtocol\"":"// default \"LayerProtocol\"",
4 | "/core-model:equipment-non-fru/core-model:uuid'": "/core-model:equipment/core-model:uuid'",
5 | "/core-model:conector-in-holder/core-model:local-id'": "/core-model:holder/core-model:local-id'",
6 | "/core-model:connector-on-equipment-for-cable/core-model:local-id'": "/core-model:connector/core-model:local-id'",
7 | "/core-model:lifecycle-scoping-class/core-model:composed-dependent'": "/core-model:lifecycle-scoping-class/core-model:uuid'",
8 | "/core-model:outcome-element/core-model:uuid'": "/core-model:outcome-element-constraints/core-model:uuid'",
9 | "/core-model:connector-cable-end/core-model:local-id'": "/core-model:connector/core-model:local-id'",
10 | "/core-model:connector-on-equipment-for-holder/core-model:local-id'": "/core-model:holder/core-model:local-id'",
11 | "/core-model:encapsulated-fc/core-model:uuid'": "/core-model:forwarding-construct/core-model:uuid'",
12 | "/core-model:fc-port/core-model:local-id'": "/core-model:forwarding-construct/core-model:fc-port/core-model:local-id'",
13 | "/core-model:peer-ltp/core-model:uuid'": "/core-model:logical-termination-point/core-model:uuid'",
14 | "/core-model:lp/core-model:local-id'": "/core-model:layer-protocol/core-model:local-id'",
15 | "/core-model:peer-ltp/core-model:transfer-capacity-pac'": "/core-model:forwarding-construct/core-model:transfer-capacity-pac/core-model:capacity-interaction-algorithm'",
16 | "/core-model:embedded-clock/core-model:local-id'": "/core-model:clock/core-model:local-id'",
17 | "/core-model:encapsulated-non-fru/core-model:uuid'": "/core-model:equipment/core-model:uuid'",
18 | "/core-model:manufactured-thing/core-model:operator-augmented-equipment-instance'": "/core-model:operator-augmented-equipment-instance/core-model:asset-instance-identifier'",
19 | "/core-model:exposed-cable/core-model:uuid'": "/core-model:cable/core-model:uuid'",
20 | "/core-model:holder/core-model:supported-equipment-type'": "/core-model:equipment-type/core-model:model-identifier'",
21 | "/core-model:foundation-pc/core-model:uuid'": "/core-model:processing-construct/core-model:uuid'",
22 | "/core-model:casc-spec/core-model:uuid'": "/core-model:configuration-and-switch-control/core-model:switch-rule'",
23 | "/core-model:switch-control-rule/core-model:local-id'": "/core-model:control-rule/core-model:local-id'",
24 | "/core-model:equipment-instance/core-model:serial-number,asset-instance-identifier'": "/core-model:equipment-instance/core-model:serial-number'",
25 | "/core-model:manufactured-thing/core-model:operator-augmented-equipment-type'": "/core-model:operator-augmented-equipment-type/core-model:asset-type-identifier'",
26 | "/core-model:structure/core-model:category'": "/core-model:equipment-structure/core-model:category'",
27 | "/core-model:port-role-properties/core-model:uuid'": "/core-model:casc-port-role-properties/core-model:uuid'",
28 | "/core-model:forwarding-spec/core-model:spec-target-class,uuid'": "/core-model:forwarding-spec/core-model:spec-target-class'",
29 | "/core-model:adapter-spec/core-model:uuid":"/core-model:connection-point-and-adapter-spec/core-model:uuid",
30 | "/core-model:lp-spec/core-model:lp-spec":"/core-model:lp-spec/core-model:spec-target-class"
31 | }
--------------------------------------------------------------------------------
/models/tools/src/main/xmi2yang/post-processing/root-lists.json:
--------------------------------------------------------------------------------
1 | {
2 | "root-lists":{
3 | "adapter-property-spec":{},
4 | "aggregate-function":{},
5 | "atomic-function":{},
6 | "cable":{},
7 | "casc-port":{},
8 | "casc-port-role-properties":{},
9 | "client-spec":{},
10 | "composed-part":{},
11 | "connection-spec":{},
12 | "connection-point-and-adapter-spec":{},
13 | "configuration-and-switch-controller-spec":{},
14 | "configuration-group-spec":{},
15 | "constraint-domain":{},
16 | "control-parameters":{"uses":"control-parameters-pac-g"},
17 | "control-port":{},
18 | "control-system-view":{},
19 | "desired-outcome-constraints":{},
20 | "environmental-rating":{},
21 | "equipment":{},
22 | "element-constraints":{},
23 | "elemental-signals":{},
24 | "extension-container":{},
25 | "fc-route":{},
26 | "fd-and-link-rule":{},
27 | "fd-and-link-rule-set":{},
28 | "forwarding-construct":{},
29 | "forwarding-domain":{},
30 | "forwarding-spec":{},
31 | "function-block":{},
32 | "function-enablers":{},
33 | "holder-monitor":{},
34 | "holder-structure":{},
35 | "lifecycle-scoping-class":{},
36 | "link":{},
37 | "location":{},
38 | "logical-termination-point":{},
39 | "name-and-value-authority":{},
40 | "mechanical-functions":{},
41 | "non-fru-support-position":{},
42 | "necessary-initial-condition-constraints":{},
43 | "operation-details":{},
44 | "operation-set":{},
45 | "outcome-element-constraints":{},
46 | "processing-construct": {},
47 | "physical-characteristics":{},
48 | "physical-properties":{},
49 | "pin-group":{},
50 | "pin-layout":{},
51 | "provider-view-spec":{},
52 | "resilient-function-block":{},
53 | "pool-property-spec":{},
54 | "signal-ref-pt-group":{},
55 | "spatial-properties-of-type":{},
56 | "swapability":{"uses":"swappability-g"},
57 | "support-constraints":{},
58 | "supported-non-fru-type":{},
59 | "termination-spec":{},
60 | "view-mapping": {},
61 |
62 | "cd-port":{"key":"local-id"},
63 | "clock":{"key":"local-id"},
64 | "connector":{"key":"local-id"},
65 | "control-rule":{"key":"local-id"},
66 | "egress-port-set":{"key":"local-id"},
67 | "fc-switch":{"key":"local-id"},
68 | "fd-port":{"key":"local-id"},
69 | "holder":{"key":"local-id"},
70 | "ingress-port-set":{"key":"local-id"},
71 | "layer-protocol":{"key":"local-id"},
72 | "ltp-association-rule":{"key":"local-id"},
73 | "multi-switched-uni-flow":{"key":"local-id"},
74 | "port-set-spec":{"key":"local-id"},
75 | "pc-port":{"key":"local-id"},
76 | "pc-resilience-selector":{"key":"local-id"},
77 |
78 | "configuration-and-switch-control":{"key":"switch-rule"},
79 | "equipment-structure":{"key":"category"},
80 | "equipment-instance":{"key":"serial-number"},
81 | "equipment-type":{"key":"model-identifier"},
82 | "lp-spec":{"key":"spec-target-class"},
83 | "manufactured-thing":{"key":"equipment-instance"},
84 | "manufacturer-properties":{"key":"manufacturer-identifier"},
85 | "network-scheme-specification":{"key":"scheme-name"},
86 | "operator-augmented-equipment-instance":{"key":"asset-instance-identifier"},
87 | "operator-augmented-equipment-type":{"key":"asset-type-identifier"},
88 | "part-spec":{"key":"spec-target-class"},
89 | "pin":{"key":"position"},
90 | "profile-proxy":{"key":"profile-proxy-mode"},
91 | "signal-ref-pt":{"key":"ltp"},
92 | "specific-class-structure":{"key":"class-type-name"}
93 | }
94 | }
--------------------------------------------------------------------------------
/models/tools/src/main/xmi2yang/project/config.txt:
--------------------------------------------------------------------------------
1 | Notice:
2 | 1. This config file will be read to JSON. If you want to write some special characters "'", """ and "\" in the content, please add an escape character in front of them. For example, if the content should include "I'm", please write "I\'m" instead.
3 | 2. If the "prefix" filed is left blank, the tool will automatically set the module name as the "prefix" value.
4 | 3. "withSuffix" field is to decide whether to add suffix "-g" for groupings or not. The default value is "N" which means the tool will not do suffix pending, if it's set to "Y", all grouping names will be added suffix "-g" to avoid name conflict in JAVA code.
5 |
6 | If there are errors in reading config file, please report an issue on git.
7 |
8 | {"namespace":"urn:onf:params:xml:ns:yang:",
9 | "prefix":{"tapi-common":"com","tapi-topology":"top","tapi-connectivity":"con","tapi-path-computation":"pat","tapi-virtual-network":"vnw","tapi-notification":"not","tapi-oam":"oam","tapi-odu":"odu","tapi-och":"och"},
10 | "withSuffix":"Y",
11 | "organization":"ONF (Open Networking Foundation) - Open Information Modeling & Tooling (OIMT)",
12 | "contact":"WG Web:
13 | WG List:
14 | WG Chair: Hing-Kam Lam
15 |
16 | Nigel Davis
17 |
18 | Editor: Xing Zhao
19 |
20 | Martin Skorupski
21 | ",
22 | "revision":{"date":"2017-12-29", "description":"Initial version", "reference":"ONF CoreModel 1.3"}}
--------------------------------------------------------------------------------
/models/tools/src/main/xslt/yin2json.xslt:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
23 |
24 |
25 | { "schmea-information": {
26 |
27 | }
}
28 |
29 |
30 | "status": "
31 |
32 | ",
33 |
34 |
35 |
36 |
"
37 |
38 | ": {
39 | "id": "
40 |
41 | ",
42 | "is-read-only":
43 |
44 | ,
45 |
46 | "description": [
47 |
48 | ]
}
49 |
50 | ,
51 |
52 |
53 |
54 |
55 | "
56 |
57 | "
58 |
59 | ,
60 |
61 |
62 |
81 |
82 |
--------------------------------------------------------------------------------
/models/tools/src/main/yang/ietf-netconf-partial-lock@2009-10-19.yang:
--------------------------------------------------------------------------------
1 | module ietf-netconf-partial-lock {
2 |
3 | namespace urn:ietf:params:xml:ns:netconf:partial-lock:1.0;
4 | prefix pl;
5 |
6 | // needed to force data type of select string to be corect
7 | import ietf-yang-types { prefix yang; }
8 |
9 | organization "IETF Network Configuration (netconf) Working Group";
10 |
11 | contact
12 | "Netconf Working Group
13 | Mailing list: netconf@ietf.org
14 | Web: http://www.ietf.org/html.charters/netconf-charter.html
15 |
16 | Balazs Lengyel
17 | Ericsson
18 | balazs.lengyel@ericsson.com";
19 |
20 | description
21 | "This YANG module defines the and
22 | operations.";
23 |
24 | revision 2009-10-19 {
25 | description
26 | "Initial version, published as RFC 5717.";
27 | }
28 |
29 | typedef lock-id-type {
30 | type uint32;
31 | description
32 | "A number identifying a specific partial-lock granted to a session.
33 | It is allocated by the system, and SHOULD be used in the
34 | partial-unlock operation.";
35 | }
36 |
37 | rpc partial-lock {
38 | description
39 | "A NETCONF operation that locks parts of the running datastore.";
40 | input {
41 | leaf-list select {
42 | //type string;
43 | type yang:xpath1.0;
44 | min-elements 1;
45 | description
46 | "XPath expression that specifies the scope of the lock.
47 | An Instance Identifier expression MUST be used unless the
48 | :xpath capability is supported, in which case any XPath 1.0
49 | expression is allowed.";
50 | }
51 | }
52 | output {
53 | leaf lock-id {
54 | type lock-id-type;
55 | mandatory true;
56 | description
57 | "Identifies the lock, if granted. The lock-id SHOULD be
58 | used in the partial-unlock rpc.";
59 | }
60 | leaf-list locked-node {
61 | type instance-identifier;
62 | min-elements 1;
63 | description
64 | "List of locked nodes in the running datastore";
65 | }
66 | }
67 | }
68 |
69 | rpc partial-unlock {
70 | description
71 | "A NETCONF operation that releases a previously acquired
72 | partial-lock.";
73 | input {
74 | leaf lock-id {
75 | type lock-id-type;
76 | mandatory true;
77 | description
78 | "Identifies the lock to be released. MUST be the value
79 | received in the response to a partial-lock operation.";
80 | }
81 | }
82 | }
83 | }
--------------------------------------------------------------------------------
/models/tools/src/main/yang/ietf-netconf-with-defaults@2011-06-01.yang:
--------------------------------------------------------------------------------
1 | module ietf-netconf-with-defaults {
2 |
3 | namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults";
4 |
5 | prefix ncwd;
6 |
7 | import ietf-netconf { prefix nc; }
8 |
9 | organization
10 | "IETF NETCONF (Network Configuration Protocol) Working Group";
11 |
12 | contact
13 | "WG Web:
14 |
15 | WG List:
16 |
17 | WG Chair: Bert Wijnen
18 |
19 |
20 | WG Chair: Mehmet Ersue
21 |
22 |
23 | Editor: Andy Bierman
24 |
25 |
26 | Editor: Balazs Lengyel
27 | ";
28 |
29 | description
30 | "This module defines an extension to the NETCONF protocol
31 | that allows the NETCONF client to control how default
32 | values are handled by the server in particular NETCONF
33 | operations.
34 |
35 | Copyright (c) 2011 IETF Trust and the persons identified as
36 | the document authors. All rights reserved.
37 |
38 | Redistribution and use in source and binary forms, with or
39 | without modification, is permitted pursuant to, and subject
40 | to the license terms contained in, the Simplified BSD License
41 | set forth in Section 4.c of the IETF Trust's Legal Provisions
42 | Relating to IETF Documents
43 | (http://trustee.ietf.org/license-info).
44 |
45 | This version of this YANG module is part of RFC 6243; see
46 | the RFC itself for full legal notices.";
47 |
48 | revision 2011-06-01 {
49 | description
50 | "Initial version.";
51 | reference
52 | "RFC 6243: With-defaults Capability for NETCONF";
53 | }
54 |
55 | typedef with-defaults-mode {
56 | description
57 | "Possible modes to report default data.";
58 | reference
59 | "RFC 6243; Section 3.";
60 | type enumeration {
61 | enum report-all {
62 | description
63 | "All default data is reported.";
64 | reference
65 | "RFC 6243; Section 3.1";
66 | }
67 | enum report-all-tagged {
68 | description
69 | "All default data is reported.
70 | Any nodes considered to be default data
71 | will contain a 'default' XML attribute,
72 | set to 'true' or '1'.";
73 | reference
74 | "RFC 6243; Section 3.4";
75 | }
76 | enum trim {
77 | description
78 | "Values are not reported if they contain the default.";
79 | reference
80 | "RFC 6243; Section 3.2";
81 | }
82 | enum explicit {
83 | description
84 | "Report values that contain the definition of
85 | explicitly set data.";
86 | reference
87 | "RFC 6243; Section 3.3";
88 | }
89 | }
90 | }
91 |
92 | grouping with-defaults-parameters {
93 | description
94 | "Contains the parameter for control
95 | of defaults in NETCONF retrieval operations.";
96 |
97 | leaf with-defaults {
98 | description
99 | "The explicit defaults processing mode requested.";
100 | reference
101 | "RFC 6243; Section 4.5.1";
102 |
103 | type with-defaults-mode;
104 | }
105 | }
106 |
107 | // extending the get-config operation
108 | augment /nc:get-config/nc:input {
109 | description
110 | "Adds the parameter to the
111 | input of the NETCONF operation.";
112 | reference
113 | "RFC 6243; Section 4.5.1";
114 |
115 | uses with-defaults-parameters;
116 | }
117 |
118 | // extending the get operation
119 | augment /nc:get/nc:input {
120 | description
121 | "Adds the parameter to
122 | the input of the NETCONF operation.";
123 | reference
124 | "RFC 6243; Section 4.5.1";
125 |
126 | uses with-defaults-parameters;
127 | }
128 |
129 | // extending the copy-config operation
130 | augment /nc:copy-config/nc:input {
131 | description
132 | "Adds the parameter to
133 | the input of the NETCONF operation.";
134 | reference
135 | "RFC 6243; Section 4.5.1";
136 |
137 | uses with-defaults-parameters;
138 | }
139 |
140 | }
--------------------------------------------------------------------------------
/models/tools/src/main/yang/nc-notifications@2008-07-14.yang:
--------------------------------------------------------------------------------
1 | module nc-notifications {
2 |
3 | namespace "urn:ietf:params:xml:ns:netmod:notification";
4 | prefix "manageEvent";
5 |
6 | import ietf-yang-types{ prefix yang; }
7 | import notifications { prefix ncEvent; }
8 |
9 | organization
10 | "IETF NETCONF WG";
11 |
12 | contact
13 | "netconf@ietf.org";
14 |
15 | description
16 | "Conversion of the 'manageEvent' XSD in the NETCONF
17 | Notifications RFC.";
18 |
19 | reference
20 | "RFC 5277";
21 |
22 | revision 2008-07-14 {
23 | description "RFC 5277 version.";
24 | }
25 |
26 | container netconf {
27 | description "Top-level element in the notification namespace";
28 |
29 | config false;
30 |
31 | container streams {
32 | description
33 | "The list of event streams supported by the system. When
34 | a query is issued, the returned set of streams is
35 | determined based on user privileges.";
36 |
37 | list stream {
38 | description
39 | "Stream name, description and other information.";
40 | key name;
41 | min-elements 1;
42 |
43 | leaf name {
44 | description
45 | "The name of the event stream. If this is the default
46 | NETCONF stream, this must have the value 'NETCONF'.";
47 | type ncEvent:streamNameType;
48 | }
49 |
50 | leaf description {
51 | description
52 | "A description of the event stream, including such
53 | information as the type of events that are sent over
54 | this stream.";
55 | type string;
56 | mandatory true;
57 | }
58 |
59 | leaf replaySupport {
60 | description
61 | "A description of the event stream, including such
62 | information as the type of events that are sent over
63 | this stream.";
64 | type boolean;
65 | mandatory true;
66 | }
67 |
68 | leaf replayLogCreationTime {
69 | description
70 | "The timestamp of the creation of the log used to support
71 | the replay function on this stream. Note that this might
72 | be earlier then the earliest available notification in
73 | the log. This object is updated if the log resets for
74 | some reason. This object MUST be present if replay is
75 | supported.";
76 | type yang:date-and-time; // xsd:dateTime is wrong!
77 | }
78 | }
79 | }
80 | }
81 |
82 | notification replayComplete {
83 | description
84 | "This notification is sent to signal the end of a replay
85 | portion of a subscription.";
86 | }
87 |
88 | notification notificationComplete {
89 | description
90 | "This notification is sent to signal the end of a notification
91 | subscription. It is sent in the case that stopTime was
92 | specified during the creation of the subscription..";
93 | }
94 |
95 | }
--------------------------------------------------------------------------------
/models/tools/src/main/yang/notifications@2008-07-14.yang:
--------------------------------------------------------------------------------
1 | module notifications {
2 |
3 | namespace "urn:ietf:params:xml:ns:netconf:notification:1.0";
4 | prefix "ncEvent";
5 |
6 | import ietf-yang-types { prefix yang; revision-date "2013-07-15";}
7 |
8 | organization
9 | "IETF NETCONF WG";
10 |
11 | contact
12 | "netconf@ops.ietf.org";
13 |
14 | description
15 | "Conversion of the 'ncEvent' XSD in the
16 | NETCONF Notifications RFC.";
17 |
18 | reference
19 | "RFC 5277.";
20 |
21 | revision 2008-07-14 {
22 | description "RFC 5277 version.";
23 | }
24 |
25 | typedef streamNameType {
26 | description
27 | "The name of an event stream.";
28 | type string;
29 | }
30 |
31 | rpc create-subscription {
32 | description
33 | "The command to create a notification subscription. It
34 | takes as argument the name of the notification stream
35 | and filter. Both of those options limit the content of
36 | the subscription. In addition, there are two time-related
37 | parameters, startTime and stopTime, which can be used to
38 | select the time interval of interest to the notification
39 | replay feature.";
40 |
41 | input {
42 | leaf stream {
43 | description
44 | "An optional parameter that indicates which stream of events
45 | is of interest. If not present, then events in the default
46 | NETCONF stream will be sent.";
47 | type streamNameType;
48 | default "NETCONF";
49 | }
50 |
51 | anyxml filter {
52 | description
53 | "An optional parameter that indicates which subset of all
54 | possible events is of interest. The format of this
55 | parameter is the same as that of the filter parameter
56 | in the NETCONF protocol operations. If not present,
57 | all events not precluded by other parameters will
58 | be sent.";
59 | }
60 |
61 | leaf startTime {
62 | description
63 | "A parameter used to trigger the replay feature and
64 | indicates that the replay should start at the time
65 | specified. If start time is not present, this is not a
66 | replay subscription.";
67 | type yang:date-and-time;
68 | }
69 |
70 | leaf stopTime {
71 | // must ". >= ../startTime";
72 | description
73 | "An optional parameter used with the optional replay
74 | feature to indicate the newest notifications of
75 | interest. If stop time is not present, the notifications
76 | will continue until the subscription is terminated.
77 | Must be used with startTime.";
78 | type yang:date-and-time;
79 | }
80 | }
81 | }
82 | }
--------------------------------------------------------------------------------
/models/tools/src/main/yang/notifications@2018-05-30.yang:
--------------------------------------------------------------------------------
1 | module notifications {
2 | yang-version 1;
3 | namespace "urn:ietf:params:xml:ns:netconf:notification:1.0";
4 | prefix ncEvent;
5 |
6 | import ietf-yang-types {
7 | prefix yang;
8 | }
9 |
10 | organization
11 | "IETF NETCONF WG";
12 | contact
13 | "netconf@ops.ietf.org";
14 | description
15 | "Conversion of the 'ncEvent' XSD in the
16 | NETCONF Notifications RFC.";
17 | reference "RFC 5277.";
18 |
19 | revision 2018-05-30 {
20 | description
21 | "First step to a common notification yang.";
22 | reference
23 | "RFC 5277: NETCONF Event Notifications";
24 | }
25 | revision 2008-07-14 {
26 | description
27 | "Initial version";
28 | reference
29 | "RFC 5277: NETCONF Event Notifications";
30 | }
31 |
32 | typedef streamNameType {
33 | type string;
34 | description
35 | "The name of an event stream.";
36 | }
37 |
38 | rpc create-subscription {
39 | description
40 | "The command to create a notification subscription. It
41 | takes as argument the name of the notification stream
42 | and filter. Both of those options limit the content of
43 | the subscription. In addition, there are two time-related
44 | parameters, startTime and stopTime, which can be used to
45 | select the time interval of interest to the notification
46 | replay feature.";
47 | input {
48 | leaf stream {
49 | type streamNameType;
50 | default "NETCONF";
51 | description
52 | "An optional parameter that indicates which stream of events
53 | is of interest. If not present, then events in the default
54 | NETCONF stream will be sent.";
55 | }
56 | anyxml filter {
57 | description
58 | "An optional parameter that indicates which subset of all
59 | possible events is of interest. The format of this
60 | parameter is the same as that of the filter parameter
61 | in the NETCONF protocol operations. If not present,
62 | all events not precluded by other parameters will
63 | be sent.";
64 | }
65 | leaf startTime {
66 | type yang:date-and-time;
67 | description
68 | "A parameter used to trigger the replay feature and
69 | indicates that the replay should start at the time
70 | specified. If start time is not present, this is not a
71 | replay subscription.";
72 | }
73 | leaf stopTime {
74 | type yang:date-and-time;
75 | description
76 | "An optional parameter used with the optional replay
77 | feature to indicate the newest notifications of
78 | interest. If stop time is not present, the notifications
79 | will continue until the subscription is terminated.
80 | Must be used with startTime.";
81 | }
82 | }
83 | }
84 | container notification {
85 | config false;
86 | description
87 | "internal struct to start a notification";
88 | leaf eventTime {
89 | type yang:date-and-time;
90 | mandatory true;
91 | description
92 | "The time the event was generated by the event source. This
93 | parameter is of type dateTime and compliant to [RFC3339].
94 | Implementations must support time zones.";
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/models/tools/src/main/yang/onf-ethernet-conditional-packages@2017-04-02.yang:
--------------------------------------------------------------------------------
1 | module onf-ethernet-conditional-packages {
2 | namespace "urn:onf:params:xml:ns:yang:onf-ethernet-conditional-packages";
3 | prefix onf-ethernet-conditional-packages;
4 | import core-model {
5 | prefix core-model;
6 | }
7 | organization "ONF (Open Networking Foundation) Open Transport Working Group - Wireless Transport Project";
8 | contact "WG Web:
9 | WG List:
10 | WG Chair: Lyndon Ong
11 |
12 | WG Chair: Giorgio Cazzaniga
13 |
14 | Editors: Thorsten Heinze
15 |
16 | Martin Skorupski
17 | ";
18 | description "This model adds conditional packages to the ONF CoreModel in order address Ethernet use cases.";
19 | revision 2017-04-02 {
20 | description "Initial version";
21 | reference "ONF TR 532: A YANG Data Model for Wireless Networks.";
22 | }
23 | /***********************
24 | * package object-classes
25 | **********************/
26 | list ethernet-pac {
27 | key 'layer-protocol';
28 | leaf layer-protocol {
29 | type leafref {
30 | path '/core-model:network-element/core-model:ltp/core-model:lp/core-model:uuid';
31 | }
32 | description "none";
33 | }
34 | container ethernet-capability {
35 | config false;
36 | uses ethernet-capability-g;
37 | description "none";
38 | }
39 | container ethernet-configuration {
40 | uses ethernet-configuration-g;
41 | description "none";
42 | }
43 | container ethernet-status {
44 | config false;
45 | uses ethernet-status-g;
46 | description "none";
47 | }
48 | container ethernet-current-problems {
49 | config false;
50 | uses ethernet-current-problems-g;
51 | description "none";
52 | }
53 | container ethernet-current-performance {
54 | config false;
55 | uses ethernet-current-performance-g;
56 | description "none";
57 | }
58 | container ethernet-historical-performances {
59 | config false;
60 | uses ethernet-historical-performances-g;
61 | description "none";
62 | }
63 | description "none";
64 | }
65 | grouping ethernet-capability-g {
66 | description "none";
67 | }
68 | grouping ethernet-configuration-g {
69 | leaf vlan-id {
70 | type int16;
71 | description "value = 0: frames on ingress must be untagged, frames on egress get untagged; value = any other positive integer < 4096: frames on ingress must be tagged with this VLAN ID, frames on egress either already have or get this VLAN ID attached;";
72 | }
73 | description "none";
74 | }
75 | grouping ethernet-status-g {
76 | description "none";
77 | }
78 | grouping ethernet-current-problems-g {
79 | description "none";
80 | }
81 | grouping ethernet-current-performance-g {
82 | description "none";
83 | }
84 | grouping ethernet-historical-performances-g {
85 | description "none";
86 | }
87 |
88 | }
89 |
--------------------------------------------------------------------------------
/models/tools/src/main/yin/ietf-netconf-partial-lock@2009-10-19.yin:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | IETF Network Configuration (netconf) Working Group
13 |
14 |
15 | Netconf Working Group
16 | Mailing list: netconf@ietf.org
17 | Web: http://www.ietf.org/html.charters/netconf-charter.html
18 |
19 | Balazs Lengyel
20 | Ericsson
21 | balazs.lengyel@ericsson.com
22 |
23 |
24 | This YANG module defines the <partial-lock> and
25 | <partial-unlock> operations.
26 |
27 |
28 |
29 | Initial version, published as RFC 5717.
30 |
31 |
32 |
33 |
34 |
35 | A number identifying a specific partial-lock granted to a session.
36 | It is allocated by the system, and SHOULD be used in the
37 | partial-unlock operation.
38 |
39 |
40 |
41 |
42 | A NETCONF operation that locks parts of the running datastore.
43 |
44 |
45 |
46 |
47 |
48 |
49 | XPath expression that specifies the scope of the lock.
50 | An Instance Identifier expression MUST be used unless the
51 | :xpath capability is supported, in which case any XPath 1.0
52 | expression is allowed.
53 |
54 |
55 |
56 |
73 |
74 |
75 |
76 | A NETCONF operation that releases a previously acquired
77 | partial-lock.
78 |
79 |
80 |
81 |
82 |
83 |
84 | Identifies the lock to be released. MUST be the value
85 | received in the response to a partial-lock operation.
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/models/tools/src/main/yin/nc-notifications@2008-07-14.yin:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | IETF NETCONF WG
17 |
18 |
19 | netconf@ietf.org
20 |
21 |
22 | Conversion of the 'manageEvent' XSD in the NETCONF
23 | Notifications RFC.
24 |
25 |
26 | RFC 5277
27 |
28 |
29 |
30 | RFC 5277 version.
31 |
32 |
33 |
34 |
35 | Top-level element in the notification namespace
36 |
37 |
38 |
39 |
40 | The list of event streams supported by the system. When
41 | a query is issued, the returned set of streams is
42 | determined based on user privileges.
43 |
44 |
45 |
46 | Stream name, description and other information.
47 |
48 |
49 |
50 |
51 |
52 | The name of the event stream. If this is the default
53 | NETCONF stream, this must have the value 'NETCONF'.
54 |
55 |
56 |
57 |
58 |
59 | A description of the event stream, including such
60 | information as the type of events that are sent over
61 | this stream.
62 |
63 |
64 |
65 |
66 |
67 |
68 | A description of the event stream, including such
69 | information as the type of events that are sent over
70 | this stream.
71 |
72 |
73 |
74 |
75 |
76 |
77 | The timestamp of the creation of the log used to support
78 | the replay function on this stream. Note that this might
79 | be earlier then the earliest available notification in
80 | the log. This object is updated if the log resets for
81 | some reason. This object MUST be present if replay is
82 | supported.
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | This notification is sent to signal the end of a replay
92 | portion of a subscription.
93 |
94 |
95 |
96 |
97 | This notification is sent to signal the end of a notification
98 | subscription. It is sent in the case that stopTime was
99 | specified during the creation of the subscription..
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/models/tools/src/main/yin/notifications@2008-07-14.yin:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | IETF NETCONF WG
14 |
15 |
16 | netconf@ops.ietf.org
17 |
18 |
19 | Conversion of the 'ncEvent' XSD in the
20 | NETCONF Notifications RFC.
21 |
22 |
23 | RFC 5277.
24 |
25 |
26 |
27 | RFC 5277 version.
28 |
29 |
30 |
31 |
32 | The name of an event stream.
33 |
34 |
35 |
36 |
37 |
38 | The command to create a notification subscription. It
39 | takes as argument the name of the notification stream
40 | and filter. Both of those options limit the content of
41 | the subscription. In addition, there are two time-related
42 | parameters, startTime and stopTime, which can be used to
43 | select the time interval of interest to the notification
44 | replay feature.
45 |
46 |
47 |
48 |
49 | An optional parameter that indicates which stream of events
50 | is of interest. If not present, then events in the default
51 | NETCONF stream will be sent.
52 |
53 |
54 |
55 |
56 |
57 |
58 | An optional parameter that indicates which subset of all
59 | possible events is of interest. The format of this
60 | parameter is the same as that of the filter parameter
61 | in the NETCONF protocol operations. If not present,
62 | all events not precluded by other parameters will
63 | be sent.
64 |
65 |
66 |
67 |
68 | A parameter used to trigger the replay feature and
69 | indicates that the replay should start at the time
70 | specified. If start time is not present, this is not a
71 | replay subscription.
72 |
73 |
74 |
75 |
76 |
77 | An optional parameter used with the optional replay
78 | feature to indicate the newest notifications of
79 | interest. If stop time is not present, the notifications
80 | will continue until the subscription is terminated.
81 | Must be used with startTime.
82 |
83 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/models/tools/src/main/yin/notifications@2018-05-30.yin:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | IETF NETCONF WG
14 |
15 |
16 | netconf@ops.ietf.org
17 |
18 |
19 | Conversion of the 'ncEvent' XSD in the
20 | NETCONF Notifications RFC.
21 |
22 |
23 | RFC 5277.
24 |
25 |
26 |
27 | First step to a common notification yang.
28 |
29 |
30 | RFC 5277: NETCONF Event Notifications
31 |
32 |
33 |
34 |
35 | Initial version
36 |
37 |
38 | RFC 5277: NETCONF Event Notifications
39 |
40 |
41 |
42 |
43 |
44 | The name of an event stream.
45 |
46 |
47 |
48 |
49 | The command to create a notification subscription. It
50 | takes as argument the name of the notification stream
51 | and filter. Both of those options limit the content of
52 | the subscription. In addition, there are two time-related
53 | parameters, startTime and stopTime, which can be used to
54 | select the time interval of interest to the notification
55 | replay feature.
56 |
57 |
58 |
59 |
60 |
61 |
62 | An optional parameter that indicates which stream of events
63 | is of interest. If not present, then events in the default
64 | NETCONF stream will be sent.
65 |
66 |
67 |
68 |
69 | An optional parameter that indicates which subset of all
70 | possible events is of interest. The format of this
71 | parameter is the same as that of the filter parameter
72 | in the NETCONF protocol operations. If not present,
73 | all events not precluded by other parameters will
74 | be sent.
75 |
76 |
77 |
78 |
79 |
80 | A parameter used to trigger the replay feature and
81 | indicates that the replay should start at the time
82 | specified. If start time is not present, this is not a
83 | replay subscription.
84 |
85 |
86 |
87 |
88 |
89 | An optional parameter used with the optional replay
90 | feature to indicate the newest notifications of
91 | interest. If stop time is not present, the notifications
92 | will continue until the subscription is terminated.
93 | Must be used with startTime.
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 | internal struct to start a notification
102 |
103 |
104 |
105 |
106 |
107 | The time the event was generated by the event source. This
108 | parameter is of type dateTime and compliant to [RFC3339].
109 | Implementations must support time zones.
110 |
111 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/models/tree/g.874.1-model.tree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/models/tree/g.874.1-model.tree
--------------------------------------------------------------------------------
/models/tree/ietf-ptp-dataset.tree:
--------------------------------------------------------------------------------
1 | module: ietf-ptp-dataset
2 | +--rw instance-list* [instance-number]
3 | | +--rw instance-number uint16
4 | | +--rw default-ds
5 | | | +--rw two-step-flag? boolean
6 | | | +--rw clock-identity? clock-identity-type
7 | | | +--rw number-ports? uint16
8 | | | +--rw clock-quality
9 | | | | +--rw clock-class? uint8
10 | | | | +--rw clock-accuracy? uint8
11 | | | | +--rw offset-scaled-log-variance? uint16
12 | | | +--rw priority1? uint8
13 | | | +--rw priority2? uint8
14 | | | +--rw domain-number? uint8
15 | | | +--rw slave-only? boolean
16 | | +--rw current-ds
17 | | | +--rw steps-removed? uint16
18 | | | +--rw offset-from-master? time-interval-type
19 | | | +--rw mean-path-delay? time-interval-type
20 | | +--rw parent-ds
21 | | | +--rw parent-port-identity
22 | | | | +--rw clock-identity? clock-identity-type
23 | | | | +--rw port-number? uint16
24 | | | +--rw parent-stats? boolean
25 | | | +--rw observed-parent-offset-scaled-log-variance? uint16
26 | | | +--rw observed-parent-clock-phase-change-rate? int32
27 | | | +--rw grandmaster-identity? binary
28 | | | +--rw grandmaster-clock-quality
29 | | | | +--rw clock-class? uint8
30 | | | | +--rw clock-accuracy? uint8
31 | | | | +--rw offset-scaled-log-variance? uint16
32 | | | +--rw grandmaster-priority1? uint8
33 | | | +--rw grandmaster-priority2? uint8
34 | | +--rw time-properties-ds
35 | | | +--rw current-utc-offset-valid? boolean
36 | | | +--rw current-utc-offset? int16
37 | | | +--rw leap59? boolean
38 | | | +--rw leap61? boolean
39 | | | +--rw time-traceable? boolean
40 | | | +--rw frequency-traceable? boolean
41 | | | +--rw ptp-timescale? boolean
42 | | | +--rw time-source? uint8
43 | | +--rw port-ds-list* [port-number]
44 | | +--rw port-number -> ../port-identity/port-number
45 | | +--rw port-identity
46 | | | +--rw clock-identity? clock-identity-type
47 | | | +--rw port-number? uint16
48 | | +--rw port-state? port-state-enumeration
49 | | +--rw log-min-delay-req-interval? int8
50 | | +--rw peer-mean-path-delay? time-interval-type
51 | | +--rw log-announce-interval? int8
52 | | +--rw announce-receipt-timeout? uint8
53 | | +--rw log-sync-interval? int8
54 | | +--rw delay-mechanism? delay-mechanism-enumeration
55 | | +--rw log-min-pdelay-req-interval? int8
56 | | +--rw version-number? uint8
57 | +--rw transparent-clock-default-ds
58 | | +--rw clock-identity? clock-identity-type
59 | | +--rw number-ports? uint16
60 | | +--rw delay-mechanism? delay-mechanism-enumeration
61 | | +--rw primary-domain? uint8
62 | +--rw transparent-clock-port-ds-list* [port-number]
63 | +--rw port-number -> ../port-identity/port-number
64 | +--rw port-identity
65 | | +--rw clock-identity? clock-identity-type
66 | | +--rw port-number? uint16
67 | +--rw log-min-pdelay-req-interval? int8
68 | +--rw faulty-flag? boolean
69 | +--rw peer-mean-path-delay? time-interval-type
70 |
--------------------------------------------------------------------------------
/models/tree/ietf-yang-types.tree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/models/tree/ietf-yang-types.tree
--------------------------------------------------------------------------------
/models/tree/ltp-path.tree:
--------------------------------------------------------------------------------
1 | module: ltp-path
2 | +--rw ltp-path
3 | +--rw path-identifier* -> /ltp-path/ltp-path-list/path-id
4 | +--rw ltp-path-list* [path-id]
5 | +--rw path-id string
6 | +--rw path-name? string
7 | +--rw forwarding-direction? core-model:forwarding-direction
8 | +--rw layer-protocol-name? layer-protocol-name-enumeration
9 | +--rw logical-termination-point-list* [ltp-index]
10 | +--rw ltp-index string
11 | +--rw ltp-reference? -> /core-model:network-element/ltp/uuid
12 | +--rw physical-port-reference? string
13 | +--rw node-reference? -> /core-model:network-element/uuid
14 |
--------------------------------------------------------------------------------
/models/tree/onf-core-model-conditional-packages.tree:
--------------------------------------------------------------------------------
1 | module: onf-core-model-conditional-packages
2 | +--rw network-element-pac
3 | | +--rw network-element? -> /core-model:network-element/uuid
4 | | +--ro network-element-capability
5 | | | +--ro supported-alarms* string
6 | | +--rw network-element-configuration
7 | | | +--rw problem-type-severity-list* [problem-type-name]
8 | | | | +--rw problem-type-name string
9 | | | | +--rw problem-type-severity? microwave-model:severity-type
10 | | | +--rw trigger-refresh? boolean
11 | | +--ro network-element-status
12 | | | +--ro refresh-status? processing-type
13 | | +--ro network-element-current-problems
14 | | +--ro current-problem-list* [sequence-number]
15 | | +--ro problem-name? string
16 | | +--ro object-reference? string
17 | | +--ro sequence-number int32
18 | | +--ro time-stamp? yang:date-and-time
19 | | +--ro problem-severity? severity-type
20 | +--rw equipment-pac* [equipment]
21 | | +--rw equipment -> /core-model:equipment/uuid
22 | | +--ro equipment-capability
23 | | | +--ro supported-alarms* string
24 | | +--rw equipment-configuration
25 | | | +--rw problem-type-severity-list* [problem-type-name]
26 | | | +--rw problem-type-name string
27 | | | +--rw problem-type-severity? microwave-model:severity-type
28 | | +--ro equipment-status
29 | | +--ro equipment-current-problems
30 | | +--ro current-problem-list* [sequence-number]
31 | | +--ro problem-name? string
32 | | +--ro sequence-number int32
33 | | +--ro time-stamp? yang:date-and-time
34 | | +--ro problem-severity? severity-type
35 | +--rw holder-pac* [holder]
36 | | +--rw holder -> /core-model:equipment/contained-holder/uuid
37 | | +--ro holder-capability
38 | | | +--ro supported-alarms* string
39 | | +--rw holder-configuration
40 | | | +--rw problem-type-severity-list* [problem-type-name]
41 | | | +--rw problem-type-name string
42 | | | +--rw problem-type-severity? microwave-model:severity-type
43 | | +--ro holder-status
44 | | +--ro holder-current-problems
45 | | +--ro current-problem-list* [sequence-number]
46 | | +--ro problem-name? string
47 | | +--ro sequence-number int32
48 | | +--ro time-stamp? yang:date-and-time
49 | | +--ro problem-severity? severity-type
50 | +--rw connector-pac* [connector]
51 | +--rw connector -> /core-model:equipment/exposed-cable/connector/uuid
52 | +--ro connector-capability
53 | | +--ro supported-alarms* string
54 | +--rw connector-configuration
55 | | +--rw problem-type-severity-list* [problem-type-name]
56 | | | +--rw problem-type-name string
57 | | | +--rw problem-type-severity? microwave-model:severity-type
58 | | +--rw remote-end-point? string
59 | +--ro connector-status
60 | | +--ro local-end-point? string
61 | +--ro connector-current-problems
62 | +--ro current-problem-list* [sequence-number]
63 | +--ro problem-name? string
64 | +--ro sequence-number int32
65 | +--ro time-stamp? yang:date-and-time
66 | +--ro problem-severity? severity-type
67 |
--------------------------------------------------------------------------------
/models/tree/onf-ethernet-conditional-packages.tree:
--------------------------------------------------------------------------------
1 | module: onf-ethernet-conditional-packages
2 | +--rw ethernet-pac* [layer-protocol]
3 | +--rw layer-protocol -> /core-model:network-element/ltp/lp/uuid
4 | +--ro ethernet-capability
5 | +--rw ethernet-configuration
6 | | +--rw vlan-id? int16
7 | +--ro ethernet-status
8 | +--ro ethernet-current-problems
9 | +--ro ethernet-current-performance
10 | +--ro ethernet-historical-performances
11 |
--------------------------------------------------------------------------------
/models/tree/onf-otn-odu-conditional-packages.tree:
--------------------------------------------------------------------------------
1 | module: onf-otn-odu-conditional-packages
2 | +--rw otn-odu-connection-pac* [layer-protocol]
3 | | +--rw layer-protocol -> /core-model:network-element/ltp/lp/uuid
4 | | +--ro otn-odu-connection-capability
5 | | | +--ro accepted-payload-type
6 | | | +--ro named-payload-type? odu-named-payload-type
7 | | | +--ro hex-payload-type? uint64
8 | | +--rw otn-odu-connection-configuration
9 | | | +--rw tributary-slot-list* uint64
10 | | | +--rw tributary-port-number? uint64
11 | | | +--rw accepted-m-si? string
12 | | | +--rw opu-tributary-slot-size? odu-slot-size
13 | | | +--rw auto-payload-type? boolean
14 | | | +--rw configured-mapping-type? mapping-type
15 | | | +--rw configured-client-type? string
16 | | +--ro otn-odu-connection-status
17 | | +--ro otn-odu-connection-current-problems
18 | | +--ro otn-odu-connection-current-performance
19 | | +--ro otn-odu-connection-historical-performances
20 | +--rw otn-odu-termination-pac* [layer-protocol]
21 | +--rw layer-protocol -> /core-model:network-element/ltp/lp/uuid
22 | +--ro otn-odu-termination-capability
23 | +--rw otn-odu-termination-configuration
24 | | +--rw odu-type? odu-type
25 | | +--rw odu-rate? uint64
26 | | +--rw odu-rate-tolerance? uint64
27 | +--ro otn-odu-termination-status
28 | +--ro otn-odu-termination-current-problems
29 | +--ro otn-odu-termination-current-performance
30 | +--ro otn-odu-termination-historical-performances
31 |
--------------------------------------------------------------------------------
/models/tree/onf-ptp-dataset.tree:
--------------------------------------------------------------------------------
1 |
2 | module: onf-ptp-dataset
3 | augment /ptp:instance-list/ptp:default-ds:
4 | +--rw local-priority? uint8
5 | +--rw max-steps-removed? uint8
6 | +--rw multicast-mac-address? yang:mac-address
7 | +--rw designated-enabled? boolean
8 | augment /ptp:instance-list/ptp:port-ds-list:
9 | +--rw master-only? boolean
10 | +--rw local-priority? uint8
11 | +--rw designated-enabled? boolean
12 | +--rw delay-asymmetry? int64
13 | +--rw logical-termination-point? -> /core-model:network-element/ltp/uuid
14 |
--------------------------------------------------------------------------------
/models/uml/G.874_1_v2.08-PAP/OpenModel_Profile.epx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/G.874_1_v2.08-PAP/OpenModel_Profile.profile.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/G.874_1_v2.08-PAP/g874.1-model.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/OnfModel-CoreModel-ConditionalPackages/onf-core-model-conditional-packages.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/OnfModel-CoreModel/CoreCommonDataTypes.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/OnfModel-CoreModel/CoreCommonDataTypes.notation:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/OnfModel-CoreModel/CoreModel.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/models/uml/OnfModel-CoreModel/ImplementationCommonDataTypes.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/OnfModel-Ethernet-ConditionalPackages/onf-ethernet-conditional-packages.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/OnfModel-MicrowaveTransportNetwork/MicrowaveModel.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/OnfModel-MicrowaveTransportNetwork/Style Sheets/CompartmentRestrictions.css:
--------------------------------------------------------------------------------
1 | Class > Compartment[kind="nestedclassifiers"]{visible:false;}Class > Compartment[kind="operations"]{visible:false;}DataType > Compartment[kind="operations"]{visible:false;}*{fontName:"Segoe UI";fillColor:#C3D7DD;transparency:0.0;gradient:#FFFFFF vertical;lineColor:#000000}*.CompartmentRestrictions{fontName:"Segoe UI";fillColor:#C3D7DD;transparency:0.0;gradient:#FFFFFF vertical;lineColor:#000000}
--------------------------------------------------------------------------------
/models/uml/OnfModel-MicrowaveTransportNetwork/Style Sheets/NoStereotyesDiagram.css:
--------------------------------------------------------------------------------
1 | Property { maskLabel: name type multiplicity defaultValue;}
2 |
3 | Label[type=StereotypeLabel]{
4 | visible:false;}
5 |
6 | * {
7 | fontName:"Segoe UI";
8 | fillColor:#C3D7DD;
9 | transparency:0.0;
10 | gradient:#FFFFFF vertical;
11 | lineColor:#000000 }
--------------------------------------------------------------------------------
/models/uml/OnfModel-OTN-ConditionalPackages/onf-otn-conditional-packages.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/OnfModel-OTN-ConditionalPackages/onf-otn-conditional-packages.notation:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/models/uml/OpenModelProfile/OpenModel_Profile.profile.di:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/models/yang/ltp-path.yang:
--------------------------------------------------------------------------------
1 | module ltp-path {
2 | namespace "urn:onf:params:xml:ns:yang:ltp-path";
3 | prefix ltp-path;
4 |
5 | import core-model {
6 | prefix core-model;
7 | }
8 |
9 | organization
10 | "ONF (Open Networking Foundation) Open Transport Working Group -
11 | Wireless Transport Project";
12 | contact
13 | "WG Web:
15 | WG List:
16 | WG Chair: Lyndon Ong
17 |
18 | WG Chair: Giorgio Cazzaniga
19 |
20 | Editor: Martin Skorupski
21 | ";
22 | description
23 | "This module contains a collection of YANG definitions describing a
24 | telecommunication network path.";
25 |
26 | revision 2017-05-26 {
27 | description "Initial version";
28 | reference "ltp-path, ONF core-model 1.2";
29 | }
30 |
31 | typedef layer-protocol-name-enumeration {
32 | type enumeration {
33 | enum ETH {
34 | value 1;
35 | description
36 | "Identifying the layer of Ethernet.";
37 | }
38 | enum PTP {
39 | value 2;
40 | description
41 | "Identifying the layer or the Precision Time Protocol.";
42 | }
43 | }
44 |
45 | description
46 | "The propagation of the layer protocol name.";
47 | }
48 |
49 | container ltp-path {
50 | description
51 | "Listing all the path-identifiers, used by RESTCONF interfaces to
52 | address an entry in the ltp-path-list.";
53 |
54 | leaf-list path-identifier {
55 | type leafref {
56 | path '/ltp-path/ltp-path-list/path-id';
57 | }
58 | description
59 | "List of reference values for existing path entries.";
60 | }
61 |
62 | list ltp-path-list {
63 |
64 | key "path-id";
65 |
66 | description
67 | "A list of path found in the network.";
68 |
69 | leaf path-id {
70 | type string;
71 | description
72 | "A unique identifier of a path. It migth be beneficial to use the
73 | format as defined in RFC 4122
74 | (https://www.ietf.org/rfc/rfc4122.txt).";
75 | }
76 |
77 | leaf path-name {
78 | type string;
79 | description
80 | "The human readable name of a path. It should include start
81 | and end point.";
82 | }
83 |
84 | leaf forwarding-direction {
85 | type core-model:forwarding-direction;
86 | description
87 | "Defines the directionality of the path.";
88 | }
89 |
90 | leaf layer-protocol-name {
91 | type layer-protocol-name-enumeration;
92 | description
93 | "Defines the layer of the path. Please see ONF CoreModel for
94 | further details.";
95 | }
96 |
97 | list logical-termination-point-list {
98 |
99 | key "ltp-index";
100 | min-elements 2;
101 |
102 | description
103 | "An ordered list of logical-termination points, defining the path.";
104 |
105 | leaf ltp-index {
106 | type string;
107 | description
108 | "The index of the LTP with in the list. The LTP with the highest
109 | index is the end-point of the path. The LTP with the lowest
110 | index is the start-point of the path.";
111 | }
112 |
113 | leaf ltp-reference {
114 | type leafref {
115 | path '/core-model:network-element/core-model:ltp/core-model:uuid';
116 | }
117 | description
118 | "The reference value of a network-elements LTP.";
119 | }
120 |
121 | leaf physical-port-reference {
122 | type string;
123 | description
124 | "A text label for the unmodelled physical port associated with
125 | the LTP. In many cases there is no associated physical port.";
126 | }
127 |
128 | leaf node-reference {
129 | type leafref {
130 | path '/core-model:network-element/core-model:uuid';
131 | }
132 | description
133 | "A reference value identifying a network-element.";
134 | }
135 | }
136 | }
137 | }
138 | }
139 |
--------------------------------------------------------------------------------
/models/yang/onf-ethernet-conditional-packages.yang:
--------------------------------------------------------------------------------
1 | module onf-ethernet-conditional-packages {
2 | namespace "urn:onf:params:xml:ns:yang:onf-ethernet-conditional-packages";
3 | prefix onf-ethernet-conditional-packages;
4 | import core-model {
5 | prefix core-model;
6 | }
7 | organization "ONF (Open Networking Foundation) Open Transport Working Group - Wireless Transport Project";
8 | contact "WG Web:
9 | WG List:
10 | WG Chair: Lyndon Ong
11 |
12 | WG Chair: Giorgio Cazzaniga
13 |
14 | Editors: Thorsten Heinze
15 |
16 | Martin Skorupski
17 | ";
18 | description "This model adds conditional packages to the ONF CoreModel in order address Ethernet use cases.";
19 | revision 2017-04-02 {
20 | description "Initial version";
21 | reference "ONF TR 532: A YANG Data Model for Wireless Networks.";
22 | }
23 | /***********************
24 | * package object-classes
25 | **********************/
26 | list ethernet-pac {
27 | key 'layer-protocol';
28 | leaf layer-protocol {
29 | type leafref {
30 | path '/core-model:network-element/core-model:ltp/core-model:lp/core-model:uuid';
31 | }
32 | description "none";
33 | }
34 | container ethernet-capability {
35 | config false;
36 | uses ethernet-capability-g;
37 | description "none";
38 | }
39 | container ethernet-configuration {
40 | uses ethernet-configuration-g;
41 | description "none";
42 | }
43 | container ethernet-status {
44 | config false;
45 | uses ethernet-status-g;
46 | description "none";
47 | }
48 | container ethernet-current-problems {
49 | config false;
50 | uses ethernet-current-problems-g;
51 | description "none";
52 | }
53 | container ethernet-current-performance {
54 | config false;
55 | uses ethernet-current-performance-g;
56 | description "none";
57 | }
58 | container ethernet-historical-performances {
59 | config false;
60 | uses ethernet-historical-performances-g;
61 | description "none";
62 | }
63 | description "none";
64 | }
65 | grouping ethernet-capability-g {
66 | description "none";
67 | }
68 | grouping ethernet-configuration-g {
69 | leaf vlan-id {
70 | type int16;
71 | description "value = 0: frames on ingress must be untagged, frames on egress get untagged; value = any other positive integer < 4096: frames on ingress must be tagged with this VLAN ID, frames on egress either already have or get this VLAN ID attached;";
72 | }
73 | description "none";
74 | }
75 | grouping ethernet-status-g {
76 | description "none";
77 | }
78 | grouping ethernet-current-problems-g {
79 | description "none";
80 | }
81 | grouping ethernet-current-performance-g {
82 | description "none";
83 | }
84 | grouping ethernet-historical-performances-g {
85 | description "none";
86 | }
87 |
88 | }
89 |
--------------------------------------------------------------------------------
/models/yang2whatever.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ################################################################################
4 | # Script to convert yang modules into other formats
5 | # Author: martin.skorupski@highstreet-technologies.com
6 | #
7 | # Copyright 2018 higshtreet technologies GmbH
8 | # Licensed under the Apache License, Version 2.0 (the "License");
9 | # you may not use this file except in compliance with the License.
10 | # You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing, software
15 | # distributed under the License is distributed on an "AS IS" BASIS,
16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | # See the License for the specific language governing permissions and
18 | # limitations under the License.
19 | #
20 |
21 | yangs="./yang";
22 |
23 | function filename {
24 | x=${1%.*}
25 | y=${x/$yangs/\.\/$2}
26 | echo $y"."$2;
27 | }
28 |
29 | function convert {
30 | FILENAME=$(filename $1 $2);
31 | pyang --path "$yangs:$yangs/ietf" --format $2 --output $FILENAME $1;
32 | }
33 |
34 | for yang in $yangs/*.yang; do
35 | echo "convert file: "$yang;
36 | $(convert $yang "tree");
37 | $(convert $yang "yin");
38 | echo "done!";
39 | echo;
40 | done
--------------------------------------------------------------------------------
/models/yin2json.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ################################################################################
4 | # Script to convert yang modules into other formats
5 | # Author: martin.skorupski@highstreet-technologies.com
6 | #
7 | # Copyright 2018 higshtreet technologies GmbH
8 | # Licensed under the Apache License, Version 2.0 (the "License");
9 | # you may not use this file except in compliance with the License.
10 | # You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing, software
15 | # distributed under the License is distributed on an "AS IS" BASIS,
16 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | # See the License for the specific language governing permissions and
18 | # limitations under the License.
19 | #
20 |
21 | yins="./yin";
22 | mkdir -f "./json";
23 |
24 | function filename {
25 | x=${1%.*}
26 | y=${x/$yins/\.\/$2}
27 | echo $y"."$2;
28 | }
29 |
30 | function convert {
31 | FILENAME=$(filename $1 $2);
32 | # xslt
33 | }
34 |
35 | for yin in $yins/*.yin; do
36 | echo "convert file: "$yin;
37 | $(convert $yang "json");
38 | echo "done!";
39 | echo;
40 | done
41 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/INSTALL.md:
--------------------------------------------------------------------------------
1 | How to Install ONF Microwave Transport Network Test Framework
2 | =============================================================
3 |
4 | This document describes how to install the ONF Microwave Transport Network Test
5 | Framework on Ubuntu 14.04. These instructions should also work on other Debian
6 | derivative distributions.
7 |
8 | Requirements
9 | ------------
10 |
11 | To run the Test Framework you will need the following software:
12 |
13 | - node.js: the JavaScript runtime environment.
14 |
15 | ```
16 | curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
17 | sudo apt-get install -y nodejs
18 | ```
19 |
20 | - check node.js, npm installations: versions
21 |
22 | ```
23 | node -v (expected v6.7.0)
24 | npm -v (expected 3.10.3)
25 | ```
26 |
27 | - grunt: the JavaScript task runner.
28 |
29 | ```
30 | sudo npm install -g grunt-cli
31 | ```
32 |
33 | - java-jdk: the Java development kit.
34 |
35 | ```
36 | sudo add-apt-repository ppa:openjdk-r/ppa
37 | sudo apt-get update
38 | sudo apt-get install openjdk-8-jdk
39 | sudo update-alternatives --config java
40 | sudo update-alternatives --config javac
41 | ```
42 |
43 | - maven: the Apache build manager for Java projects.
44 |
45 | ```
46 | wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
47 | sudo tar xzvf apache-maven-3.3.9-bin.tar.gz -C /usr/share/
48 | sudo update-alternatives --install /usr/bin/mvn mvn /usr/share/apache-maven-3.3.9/bin/mvn 150
49 | sudo update-alternatives --config mvn
50 | ```
51 |
52 | - docker: the operating-system-level virtualization system on Linux.
53 |
54 | ```
55 | sudo apt-get install curl
56 | curl -fsSL https://get.docker.com/ | sh
57 | sudo usermod -aG docker
58 | ...
59 | sudo usermod -aG docker
60 | sudo reboot
61 | ```
62 |
63 |
64 | Contacts
65 | --------
66 |
67 |
68 | paolo.spallaccini@hcl.com
69 |
70 | saurabhchattopadhya@hcl.com
71 |
72 |
73 | [INSTALL.md]:INSTALL.md
74 |
75 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/TA-ArchAndTopo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/TA-ArchAndTopo.png
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/04.1-netconf-YANG-ConfigurableData.js:
--------------------------------------------------------------------------------
1 | /*
2 | * 04.1-netconf-YANG-ConfigurableData.js - Gets capability and running config from OEM WT mediator
3 | *
4 | * Copyright (C) 2017 HCL Technologies
5 | *
6 | * Authors: HCL SDN & NFV CoE Team
7 | *
8 | * Contact: paolo.spallaccini@hcl.com
9 | * saurabhchattopadhya@hcl.com
10 | *
11 | */
12 |
13 |
14 | var yang = require("yang-js");
15 | var fs = require('fs');
16 | var supertest = require('supertest');
17 | var config = require('../config.json');
18 | var test_cases = require('./input/test-cases.json');
19 | var debug = require('./netconf_client/core/debug.js');
20 | var mediatorIndex = "";
21 |
22 | mediatorIndex = process.argv.slice(2);
23 |
24 | var sync = require('synchronize');
25 |
26 | var clientFileHandle;
27 | var capabilityFileHandle;
28 | var dataFileHandle;
29 |
30 |
31 | var netConfDataFile = __dirname + test_cases["NetConfDataFile"];
32 | var netConfCapabilityXml = __dirname + test_cases["NetConfCapabilityXml"];
33 | var netConfDataXml = __dirname + test_cases["NetConfDataXml"];
34 |
35 |
36 | var Client = require('ssh2').Client;
37 |
38 | xmlhello = '' +
39 | '' +
40 | ' ' +
41 | ' urn:ietf:params:netconf:base:1.0' +
42 | ' ' +
43 | ']]>]]>';
44 |
45 |
46 | var xmlhello1 = '' +
47 | '' +
48 | '' +
49 | '' +
50 | '' +
51 | '' +
52 | '' +
53 | ']]>]]>';
54 |
55 |
56 | var writeSync = function (msg, to_console, to_file) {
57 | if (!msg) {
58 | return;
59 | }
60 |
61 | fs.writeFileSync(to_file, msg + require('os').EOL);
62 | };
63 |
64 |
65 | sync.fiber(function () {
66 |
67 | clientFileHandle = fs.openSync(netConfDataFile, "w")
68 | capabilityFileHandle = fs.openSync(netConfCapabilityXml, "w");
69 | dataFileHandle = fs.openSync(netConfDataXml, "w");
70 |
71 | sync.await(netconfCAll(sync.defers()));
72 |
73 | fs.closeSync(clientFileHandle);
74 | fs.closeSync(capabilityFileHandle);
75 | fs.closeSync(dataFileHandle);
76 |
77 | process.exit(0);
78 |
79 |
80 | });
81 |
82 |
83 | function netconfCAll(cb) {
84 |
85 | var conn = new Client();
86 |
87 | if (mediatorIndex == "") {
88 | mediatorIndex = "1";
89 | }
90 |
91 |
92 | conn.on('ready', function () {
93 | //console.log('Client :: ready');
94 | conn.subsys('netconf', function (err, stream) {
95 |
96 | if (err) throw err;
97 | var reply = "";
98 |
99 | stream.on('data', function (data) {
100 | // console.log(data.toString('utf8'));
101 |
102 | }).write(xmlhello);
103 |
104 | stream.on('data', function (data) {
105 |
106 | reply += data;
107 |
108 | //console.log(data.toString('utf8'));
109 |
110 |
111 | if (reply.toString('utf8').endsWith("]]>]]>")) {
112 |
113 | writeSync(reply.toString('utf8'), true, clientFileHandle);
114 | splitXmlData(reply.toString('utf8'));
115 |
116 | }
117 |
118 |
119 | }).write(xmlhello1);
120 |
121 | setTimeout(function () {
122 |
123 | // remember that callbacks expect (err, result)
124 | cb(null);
125 |
126 | }, 1000)
127 |
128 |
129 | });
130 |
131 | }).connect({
132 |
133 | host: config[config.topology[mediatorIndex].type].ip,
134 | port: config[config.topology[mediatorIndex].type].port,
135 | username: config[config.topology[mediatorIndex].type].user,
136 | password: config[config.topology[mediatorIndex].type].passwd
137 | });
138 |
139 |
140 | }
141 |
142 |
143 | function splitXmlData(str) {
144 |
145 |
146 | var index = str.indexOf("]]>]]>");
147 | var cap = str.substr(0, index + 8);
148 | var len = str.length - index - 20;
149 |
150 | var data = str.substr(index + 14, len);
151 |
152 | writeSync(cap, true, capabilityFileHandle);
153 | writeSync(data, true, dataFileHandle);
154 |
155 | }
156 |
157 |
158 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/input/test-cases-dvm.json:
--------------------------------------------------------------------------------
1 | {
2 | "nodeName": "Simulator-99",
3 | "yangModelName": "microwave-model",
4 | "TestResultFile": "/logs/TestResult.log",
5 | "ParseDataFile": "/logs/parseData.log",
6 | "NetConfCapabilityXml": "/logs/capability.xml",
7 | "NetConfUserDataXml": "/logs/userdata.xml",
8 | "NetConfDataXml": "/logs/data.xml",
9 | "NetConfDataFile": "/logs/client.log",
10 | "SummaryReportFile01": "/logs/summaryReport01.log",
11 | "SummaryReportFile02": "/logs/summaryReport02.log",
12 | "SummaryReportFile03": "/logs/summaryReport03.log",
13 | "SummaryReportFile04": "/logs/summaryReport04.log",
14 | "mw-air-interface-pac": "LP-MWPS-TTP-RADIO",
15 | "YangDirectory": "/../../../models/yang/"
16 | }
17 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/input/test-cases-wte.json:
--------------------------------------------------------------------------------
1 | {
2 | "nodeName": "Simulator-1",
3 | "yangModelName": "microwave-model",
4 | "TestResultFile": "/logs/TestResult.log",
5 | "ParseDataFile": "/logs/parseData.log",
6 | "NetConfCapabilityXml": "/logs/capability.xml",
7 | "NetConfUserDataXml": "/logs/userdata.xml",
8 | "NetConfDataXml": "/logs/data.xml",
9 | "NetConfDataFile": "/logs/client.log",
10 | "SummaryReportFile01": "/logs/summaryReport01.log",
11 | "SummaryReportFile02": "/logs/summaryReport02.log",
12 | "SummaryReportFile03": "/logs/summaryReport03.log",
13 | "SummaryReportFile04": "/logs/summaryReport04.log",
14 | "mw-air-interface-pac": "airIntf1-LP-1",
15 | "YangDirectory": "/../../../models/yang/"
16 | }
17 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/input/test-cases.json:
--------------------------------------------------------------------------------
1 | {
2 | "nodeName": "Simulator-1",
3 | "yangModelName": "microwave-model",
4 | "TestResultFile": "/logs/TestResult.log",
5 | "ParseDataFile": "/logs/parseData.log",
6 | "NetConfCapabilityXml": "/logs/capability.xml",
7 | "NetConfUserDataXml": "/logs/userdata.xml",
8 | "NetConfDataXml": "/logs/data.xml",
9 | "NetConfDataFile": "/logs/client.log",
10 | "SummaryReportFile01": "/logs/summaryReport01.log",
11 | "SummaryReportFile02": "/logs/summaryReport02.log",
12 | "SummaryReportFile03": "/logs/summaryReport03.log",
13 | "SummaryReportFile04": "/logs/summaryReport04.log",
14 | "mw-air-interface-pac": "airIntf1-LP-1",
15 | "YangDirectory": "/../../../models/yang/"
16 | }
17 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/logs/TestResult.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/automated_tests/logs/TestResult.log
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/logs/capability.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/automated_tests/logs/capability.xml
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/logs/client.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/automated_tests/logs/client.log
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/logs/data.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/automated_tests/logs/data.xml
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/logs/parseData.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/automated_tests/logs/parseData.log
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/logs/summaryReport01.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/automated_tests/logs/summaryReport01.log
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/logs/summaryReport02.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/automated_tests/logs/summaryReport02.log
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/logs/summaryReport03.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/automated_tests/logs/summaryReport03.log
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/logs/summaryReport04.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/automated_tests/logs/summaryReport04.log
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/logs/userdata.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/automated_tests/logs/userdata.xml
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/netconf_client/core/config.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Cisco Systems, Inc.
3 | *
4 | * Author: Petar Koretic
5 | * Author: Luka Perkov
6 | *
7 | * testconf is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 2 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * You should have received a copy of the GNU General Public License
13 | * along with testconf. If not, see .
14 | */
15 |
16 | var config = {}
17 | module.exports = config
18 | config.netconf = {}
19 | config.netconf.host = '172.17.0.2'
20 | config.netconf.port = 830
21 | config.netconf.user = 'root'
22 | config.netconf.pass = 'root'
23 |
24 | config.client = {}
25 | config.client.log_name = __dirname + "/logs/client.log"
26 |
27 |
28 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/netconf_client/core/debug.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Cisco Systems, Inc.
3 | *
4 | * Author: Petar Koretic
5 | * Author: Luka Perkov
6 | *
7 | * testconf is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU General Public License as published by
9 | * the Free Software Foundation, either version 2 of the License, or
10 | * (at your option) any later version.
11 | *
12 | * You should have received a copy of the GNU General Public License
13 | * along with testconf. If not, see .
14 | */
15 |
16 | var net = require('net');
17 | var config = require('./config')
18 | var fs = require('fs')
19 |
20 | exports.write = function(msg, to_console, to_file)
21 | {
22 | if (!msg)
23 | return
24 |
25 | if (to_console)
26 | //console.log(msg)
27 |
28 | fs.write(to_file, msg + require('os').EOL, null, 'utf8', function(error, written)
29 | {
30 | if (error)
31 | {
32 | //console.error(error)
33 | //process.exit(1)
34 | }
35 | })
36 | }
37 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/automated_tests/netconf_client/core/xml2js-promise.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 Deutsche Telekom AG
3 | *
4 | * Author: Mak Krnic
5 | *
6 | * testconf is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 2 of the License, or
9 | * (at your option) any later version.
10 | *
11 | * You should have received a copy of the GNU General Public License
12 | * along with testconf. If not, see .
13 | */
14 |
15 | var xml2js = require('xml2js')
16 | var Promise = require('promise')
17 |
18 | module.exports.parseString = function(input)
19 | {
20 | return new Promise(function(resolve, reject)
21 | {
22 | var parser = new xml2js.Parser()
23 |
24 | parser.parseString(input, function(error, data)
25 | {
26 | if (error)
27 | {
28 | reject(error)
29 | }
30 | else
31 | {
32 | resolve(data)
33 | }
34 | })
35 | })
36 | }
37 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ONF-Microwave-Transport-Network-Test-Framework",
3 | "description": "ONF microwave transport network test framework",
4 | "version": "0.0.7",
5 | "author": "Paolo Rovelli ",
6 | "repository": {
7 | "type": "git",
8 | "url": "http://github.com/OpenNetworkingFoundation/CENTENNIAL.git"
9 | },
10 | "license": "Copyright (C) 2016 HCL Technologies",
11 | "private": true,
12 | "scripts": {
13 | "start": "node ./ux/bin/www"
14 | },
15 | "dependencies": {
16 | "JSONPath": "0.11.2",
17 | "body-parser": "~1.15.1",
18 | "buffer-equal-constant-time": "1.0.1",
19 | "cookie-parser": "~1.4.3",
20 | "debug": "~>2.6.9",
21 | "es6-shim": "0.35.0",
22 | "express": "~4.13.4",
23 | "jade": "~1.11.0",
24 | "morgan": "~1.9.1",
25 | "promise": "7.1.1",
26 | "serve-favicon": "~2.3.0",
27 | "ssh2": "0.4.13",
28 | "xml2js": "0.4.16",
29 | "xmldom": "^0.1.27",
30 | "yang-js": "0.13.0"
31 | },
32 | "devDependencies": {
33 | "async": "2.0.0-rc.2",
34 | "chai": "3.5.0",
35 | "chai-things": "0.2.0",
36 | "grunt": "0.4.5",
37 | "grunt-contrib-jshint": "1.0.0",
38 | "grunt-jscs": "2.8.0",
39 | "grunt-mocha-test": "0.12.7",
40 | "grunt-newer": "1.1.2",
41 | "grunt-shell": "1.2.1",
42 | "jit-grunt": "0.10.0",
43 | "jshint-stylish": "2.1.0",
44 | "mocha": "2.4.5",
45 | "supertest": "1.2.0",
46 | "time-grunt": "1.3.0",
47 | "websocket": "1.0.22",
48 | "synchronize": "2.0.0"
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/app.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var path = require('path');
3 | var favicon = require('serve-favicon');
4 | var logger = require('morgan');
5 | var cookieParser = require('cookie-parser');
6 | var bodyParser = require('body-parser');
7 |
8 | var routes = require('./routes/index');
9 | var executescript = require('./routes/executescript');
10 | var getlog = require('./routes/getlog');
11 | var getjsonFile = require('./routes/getjsonFile');
12 | var gettopology = require('./routes/gettopology');
13 | var configxml = require('./routes/configxml');
14 |
15 |
16 |
17 | var app = express();
18 |
19 | // view engine setup
20 | app.set('views', path.join(__dirname, 'views'));
21 | app.set('view engine', 'jade');
22 |
23 | // uncomment after placing your favicon in /public
24 | //app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
25 | app.use(logger('dev'));
26 | app.use(bodyParser.json());
27 | app.use(bodyParser.urlencoded({limit: '5mb', extended: true}));
28 | app.use(cookieParser());
29 | app.use(express.static(path.join(__dirname, 'public')));
30 |
31 | app.use('/', routes);
32 | app.use('/executescript', executescript);
33 | app.use('/getlog', getlog);
34 | app.use('/getjsonFile', getjsonFile);
35 | app.use('/gettopology', gettopology);
36 | app.use('/configxml', configxml);
37 |
38 |
39 |
40 | // catch 404 and forward to error handler
41 | app.use(function(req, res, next) {
42 | var err = new Error('Not Found');
43 | err.status = 404;
44 | next(err);
45 | });
46 |
47 | // error handlers
48 |
49 | // development error handler
50 | // will print stacktrace
51 | if (app.get('env') === 'development') {
52 | app.use(function(err, req, res, next) {
53 | res.status(err.status || 500);
54 | res.render('error', {
55 | message: err.message,
56 | error: err
57 | });
58 | });
59 | }
60 |
61 | // production error handler
62 | // no stacktraces leaked to user
63 | app.use(function(err, req, res, next) {
64 | res.status(err.status || 500);
65 | res.render('error', {
66 | message: err.message,
67 | error: {}
68 | });
69 | });
70 |
71 |
72 | module.exports = app;
73 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/bin/www:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | /**
4 | * Module dependencies.
5 | */
6 |
7 | var app = require('../app');
8 | var debug = require('debug')('ux:server');
9 | var http = require('http');
10 |
11 | /**
12 | * Get port from environment and store in Express.
13 | */
14 |
15 | var port = normalizePort(process.env.PORT || '3000');
16 | app.set('port', port);
17 |
18 | /**
19 | * Create HTTP server.
20 | */
21 |
22 | var server = http.createServer(app);
23 |
24 | /**
25 | * Listen on provided port, on all network interfaces.
26 | */
27 |
28 | server.listen(port);
29 | server.on('error', onError);
30 | server.on('listening', onListening);
31 |
32 | /**
33 | * Normalize a port into a number, string, or false.
34 | */
35 |
36 | function normalizePort(val) {
37 | var port = parseInt(val, 10);
38 |
39 | if (isNaN(port)) {
40 | // named pipe
41 | return val;
42 | }
43 |
44 | if (port >= 0) {
45 | // port number
46 | return port;
47 | }
48 |
49 | return false;
50 | }
51 |
52 | /**
53 | * Event listener for HTTP server "error" event.
54 | */
55 |
56 | function onError(error) {
57 | if (error.syscall !== 'listen') {
58 | throw error;
59 | }
60 |
61 | var bind = typeof port === 'string'
62 | ? 'Pipe ' + port
63 | : 'Port ' + port;
64 |
65 | // handle specific listen errors with friendly messages
66 | switch (error.code) {
67 | case 'EACCES':
68 | console.error(bind + ' requires elevated privileges');
69 | process.exit(1);
70 | break;
71 | case 'EADDRINUSE':
72 | console.error(bind + ' is already in use');
73 | process.exit(1);
74 | break;
75 | default:
76 | throw error;
77 | }
78 | }
79 |
80 | /**
81 | * Event listener for HTTP server "listening" event.
82 | */
83 |
84 | function onListening() {
85 | var addr = server.address();
86 | var bind = typeof addr === 'string'
87 | ? 'pipe ' + addr
88 | : 'port ' + addr.port;
89 | debug('Listening on ' + bind);
90 | }
91 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/public/images/logo_opendaylight.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Open-Network-Models-and-Interfaces-ONMI/onmi-iisomi-xhaul-uml-yang/a783869a46ad572f58b14637c45c8be09691cc28/test/test-automation-project/test-automation/ux/public/images/logo_opendaylight.gif
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/public/stylesheets/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 50px;
3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
4 | }
5 |
6 | a {
7 | color: #00B7FF;
8 | }
9 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/routes/configxml.js:
--------------------------------------------------------------------------------
1 | /*
2 | * getconfigxml.js - Web Service - to retrive topology information from config.json file.
3 | *
4 | * Copyright (C) 2016 HCL Tecnologies
5 | *
6 | * Authors: HCL SDN & NFV CoE Team
7 | *
8 | * Contact: paolo.spallaccini@hcl.com
9 | *
10 | */
11 | var express = require('express');
12 | var router = express.Router();
13 | var fs = require("fs");
14 | var sync = require('synchronize');
15 | var test_case = require('../../automated_tests/input/test-cases.json');
16 | var parseString = require('xml2js').parseString;
17 |
18 | /* GET users listing. */
19 | router.get('/', function(req, res, next) {
20 | var operation = req.query['operation'];
21 | if(operation == 'get'){
22 | try{
23 |
24 | var data = fs.readFileSync(__dirname+'/../../automated_tests'+test_case['NetConfDataXml'], 'utf8');
25 | res.json({jsonData: data.toString()});
26 | }catch(e){
27 | res.json({jsonData: e.toString()});
28 | }
29 | }else if(operation == 'set'){
30 |
31 | }
32 |
33 |
34 |
35 | });
36 |
37 | router.post('/post', function(req, res, next){
38 | var xmlData = req.body['xmlData'];
39 | var operation = req.body['operation'];
40 |
41 |
42 |
43 | parseString(xmlData, function (err, result) {
44 | if(err != null){
45 | res.json({responseData: "xml_invalid"});
46 | return console.log(err);
47 | }
48 | var xml_special_to_escaped_one_map = {
49 | '&': '&',
50 | '"': '"',
51 | '<': '<',
52 | '>': '>'
53 | };
54 |
55 | var escaped_one_to_xml_special_map = {
56 | '&': '&',
57 | '"': '"',
58 | '<': '<',
59 | '>': '>'
60 | };
61 |
62 | function encodeXml(string) {
63 | return string.replace(/([\&"<>])/g, function(str, item) {
64 | return xml_special_to_escaped_one_map[item];
65 | });
66 | };
67 |
68 | function decodeXml(string) {
69 | return string.replace(/("|<|>|&)/g,
70 | function(str, item) {
71 | return escaped_one_to_xml_special_map[item];
72 | });
73 | }
74 | if(operation == 'set'){
75 |
76 | fs.writeFile(__dirname+'/../../automated_tests'+test_case['NetConfUserDataXml'], decodeXml(xmlData), function(err) {
77 | if(err) {
78 | res.json({responseData: "error"});
79 | return console.log(err);
80 | }
81 |
82 | res.json({responseData: "OK"});
83 | });
84 |
85 | }
86 | });
87 |
88 |
89 |
90 |
91 | });
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | module.exports = router;
101 |
102 |
103 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/routes/executescript.js:
--------------------------------------------------------------------------------
1 | /*
2 | * executescript.js - Web Service - to execute javascript via shell
3 | *
4 | * Copyright (C) 2016 HCL Tecnologies
5 | *
6 | * Authors: HCL SDN & NFV CoE Team
7 | *
8 | * Contact: paolo.spallaccini@hcl.com
9 | *
10 | */
11 | var express = require('express');
12 | var fs = require('fs');
13 | var router = express.Router();
14 | var spawn = require("child_process").exec;
15 | var sync = require('synchronize');
16 | /*var test_case = require('../../automated_tests/input/test-cases.json');*/
17 | var basescriptDir = './automated_tests/';
18 | var processId = null;
19 | /* GET users listing. */
20 | router.get('/', function(req, res, next) {
21 | var jsfile = req.query['jsfile'];
22 | var mediatorNameandId = req.query['mediatorNameandId'];
23 | var execute = req.query['execute'];
24 | var mediator_arr = mediatorNameandId.split("keyvalue:");
25 | var mediator_name = mediator_arr[0];
26 | var mediator_index = mediator_arr[1];
27 |
28 | sync.fiber(function() {
29 | var test_case_string = fs.readFileSync(__dirname+"/../../automated_tests/input/test-cases.json", 'utf8');
30 | var test_case = JSON.parse(test_case_string);
31 | test_case.nodeName = mediator_name;
32 | fs.writeFileSync(__dirname+"/../../automated_tests/input/test-cases.json", JSON.stringify(test_case, null, 2));
33 | });
34 | if(jsfile == '01-standalone-YANG-parser.js'){
35 | var cmd = "node "+basescriptDir+jsfile + " " + mediator_index;
36 | }else if(jsfile == '04-netconfserver-YANG.js' && execute == "true"){
37 | var cmd = "node "+basescriptDir + '04.2-netconf-YANG-ConfigurableData.js'+ " " + mediator_index;
38 | }else if(jsfile == '04-netconfserver-YANG.js'){
39 | var cmd = "node "+basescriptDir + '04.1-netconf-YANG-ConfigurableData.js'+ " " + mediator_index;
40 | }else{
41 | var cmd = "node "+basescriptDir+jsfile+ " " + mediator_index;
42 | }
43 | console.log(cmd);
44 |
45 | if(processId != null){
46 | var killCmd = "kill -9 "+processId + " " +(processId+1);
47 | console.log(killCmd);
48 | spawn(killCmd, function(error, stdout, stderr){
49 | if(error !== null){
50 | console.log("process not killed" + error);
51 | }
52 | console.log("process killed !"+ killCmd);
53 |
54 | });
55 | }
56 |
57 | var proObj = spawn(cmd, function(error, stdout, stderr){
58 | if(error !== null){
59 | res.json({status: true, messageObj : [error, stdout, stderr]});
60 | return;
61 |
62 | }
63 | res.json({status: true, messageObj : stdout});
64 | processId = null;
65 | });
66 |
67 | processId = proObj.pid;
68 | console.log(processId);
69 |
70 |
71 | });
72 |
73 | module.exports = router;
74 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/routes/getjsonFile.js:
--------------------------------------------------------------------------------
1 | /*
2 | * getjsonFile.js - Web Service - to retrive log from TestResult.log file
3 | *
4 | * Copyright (C) 2016 HCL Tecnologies
5 | *
6 | * Authors: HCL SDN & NFV CoE Team
7 | *
8 | * Contact: paolo.spallaccini@hcl.com
9 | *
10 | */
11 | var express = require('express');
12 | var router = express.Router();
13 | var fs = require("fs");
14 | var sync = require('synchronize');
15 | var test_case = require('../../automated_tests/input/test-cases.json');
16 | /* GET users listing. */
17 | router.get('/', function(req, res, next) {
18 | try{
19 | var jsonfile = req.query['jsonfile'];
20 | var data = fs.readFileSync(__dirname+'/../../automated_tests'+test_case[jsonfile], 'utf8');
21 | res.json({jsonData: data.toString()});
22 | }catch(e){
23 | res.json({jsonData: e.toString()});
24 | }
25 | });
26 |
27 | module.exports = router;
28 |
29 |
30 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/routes/getlog.js:
--------------------------------------------------------------------------------
1 | /*
2 | * getlog.js - Web Service - to retrive log from TestResult.log file
3 | *
4 | * Copyright (C) 2016 HCL Tecnologies
5 | *
6 | * Authors: HCL SDN & NFV CoE Team
7 | *
8 | * Contact: paolo.spallaccini@hcl.com
9 | *
10 | */
11 | var express = require('express');
12 | var router = express.Router();
13 | var fs = require("fs");
14 | var sync = require('synchronize');
15 | var test_case = require('../../automated_tests/input/test-cases.json');
16 | /* GET users listing. */
17 | router.get('/', function(req, res, next) {
18 | try{
19 | var data = fs.readFileSync(__dirname+'/../../automated_tests'+test_case.TestResultFile, 'utf8');
20 | res.json({message: data.toString()});
21 | }catch(e){
22 | res.json({message: e.toString()});
23 | }
24 | });
25 |
26 | module.exports = router;
27 |
28 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/routes/gettopology.js:
--------------------------------------------------------------------------------
1 | /*
2 | * gettopology.js - Web Service - to retrive topology information from config.json file.
3 | *
4 | * Copyright (C) 2016 HCL Tecnologies
5 | *
6 | * Authors: HCL SDN & NFV CoE Team
7 | *
8 | * Contact: paolo.spallaccini@hcl.com
9 | *
10 | */
11 | var express = require('express');
12 | var router = express.Router();
13 | var fs = require("fs");
14 | var sync = require('synchronize');
15 | var configJson = require('../../config.json');
16 | /* GET users listing. */
17 | router.get('/', function(req, res, next) {
18 | try{
19 | var data = JSON.stringify(configJson.topology);
20 | res.json({jsonData: data.toString()});
21 | }catch(e){
22 | res.json({jsonData: e.toString()});
23 | }
24 | });
25 |
26 | module.exports = router;
27 |
28 |
29 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/routes/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * index.js - Index page of ONF-POC3 Test Automation Framework
3 | *
4 | * Copyright (C) 2016 HCL Tecnologies
5 | *
6 | * Authors: HCL SDN & NFV CoE Team
7 | *
8 | * Contact: paolo.spallaccini@hcl.com
9 | *
10 | */
11 | var express = require('express');
12 | var router = express.Router();
13 | var configJson = require('../../config.json');
14 | /* GET home page. */
15 | router.get('/', function(req, res, next) {
16 | res.render('index', { title: 'ONF-POC3 Test Automation Framework', mediatorData : JSON.stringify(configJson.topology) } );
17 | });
18 |
19 | module.exports = router;
20 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/views/error.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | h1= message
5 | h2= error.status
6 | pre #{error.stack}
7 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/views/index.jade:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | h2 Welcome to #{title}
5 | script.
6 | var mediatorData = !{mediatorData};
7 | p Execute Javascript File
8 | div
9 | label Select Mediator :
10 | select#mediatorList
11 | br
12 | div
13 | label Select Script :
14 | select#scriptList
15 | option(value='01-standalone-YANG-parser.js') 01-standalone-YANG-parser.js
16 | option(value='02-netconfserver-YANG-parser.js') 02-netconfserver-YANG-parser.js
17 | option(value='03-netconfserver-YANG.js') 03-netconfserver-YANG.js
18 | script.
19 | for(var i =0; i < mediatorData.length; i++){
20 | var element = mediatorData[i];
21 | if(element['type'] != "controller-wipro"){
22 | $("#mediatorList").append('');
23 | }
24 | }
25 | var myVar = null;
26 | var ajaxexe = null;
27 | var onClickBtn1 = function(){$("#shellresult").html("Executing script....");$('#btn1').prop('disabled', true);$('#resultLog').val("");$("#reset").html("Stop");
28 | var getLog = function () {
29 | $.get("getlog", function (data, status) {
30 | $('#resultLog').val(data.message);var textarea = document.getElementById('resultLog');textarea.scrollTop = textarea.scrollHeight;
31 |
32 |
33 | });
34 | };
35 | var mediator_dropdown = document.getElementById('mediatorList');
36 | var script_dropdown = document.getElementById('scriptList');
37 | myVar = setInterval(function(){ getLog() }, 3000);
38 | ajaxexe = $.get("executescript?jsfile=" + script_dropdown.value+"&mediatorNameandId=" + $( "#mediatorList" ).val(), function (data, status) {
39 | console.log(data.message); $("#shellresult").html(data.messageObj);$('#btn1').prop('disabled', false);
40 | clearInterval(myVar);getLog();$("#reset").html("Reset"); ajaxexe= null;
41 | });
42 |
43 |
44 | };
45 | var onClickreset = function(){
46 | if(myVar != null){
47 | clearInterval(myVar);
48 | }
49 | if(ajaxexe != null){
50 | ajaxexe.abort();
51 | ajaxexe= null;
52 | }else{
53 | $("#shellresult").html("");$('#resultLog').val("");
54 | }
55 |
56 | $('#btn1').prop('disabled', false);$("#reset").html("Reset");
57 |
58 | }
59 |
60 | br
61 | button#btn1(onclick = 'onClickBtn1()') Execute
62 | button#reset(style='', onclick = 'onClickreset()') Reset
63 | #shellresult
64 | br
65 | p Result Log
66 | div
67 | textarea#resultLog(rows='18', cols='100')
68 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-automation/ux/views/layout.jade:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title= title
5 | link(rel='stylesheet', href='/stylesheets/style.css')
6 | script(src='/javascripts/jquery-3.1.1.min.js')
7 | body
8 | block content
9 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/README.md:
--------------------------------------------------------------------------------
1 | # Java based Test Client
2 |
3 | This project implements a [Apache HttpClient](https://hc.apache.org/httpcomponents-client-ga/index.html) based RestConf Test Client to verify the ONF Wireless Model (TR 532) against an [Opendaylight](www.opendaylight.org) SDN Controller.
4 |
5 | Please follow the instruction to install and setup Opendaylight and a Default Value Mediator:
6 | * [https://github.com/OpenNetworkingFoundation/CENTENNIAL/tree/master/code](https://github.com/OpenNetworkingFoundation/CENTENNIAL/tree/master/code)
7 | * [https://github.com/OpenNetworkingFoundation/CENTENNIAL/tree/master/code/Default_Values_Mediator](https://github.com/OpenNetworkingFoundation/CENTENNIAL/tree/master/code/Default_Values_Mediator)
8 |
9 | ## Usage
10 |
11 | Please see the [example implementation](https://github.com/OpenNetworkingFoundation/CENTENNIAL/blob/master/test/test-client/test-cases/example/src/main/java/com/highstreet/technologies/test/testCase/example/TestExample.java) for a simple test case, which configures an "airInterfaceName".
12 |
13 | Create a Test Client:
14 | ```
15 | TestClient validationClient = new TestClientBuilder(restConfServer, node).build();
16 | ```
17 |
18 | Perform a GET request:
19 | ```
20 | Result getResult = validationClient.get(attribute);
21 | ```
22 |
23 | Perform a GET request:
24 | ```
25 | Result setResult = validationClient.set(attribute, value);
26 | ```
27 | Please not the a set() will perform a HTTP-PUT.
28 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 |
6 | parent
7 | com.highstreet.technologies.test
8 | 0.4.0-SNAPSHOT
9 | ..
10 |
11 |
12 | client
13 | jar
14 |
15 | ${prefix} ${project.artifactId}
16 | http://maven.apache.org
17 |
18 |
19 | UTF-8
20 |
21 |
22 |
23 |
24 | javax.ws.rs
25 | javax.ws.rs-api
26 | 2.0-m02
27 |
28 |
29 | org.json
30 | json
31 | 20160810
32 |
33 |
34 | com.fasterxml.jackson.core
35 | jackson-databind
36 | 2.9.10.3
37 |
38 |
39 | org.apache.httpcomponents
40 | httpcore
41 | 4.4.5
42 |
43 |
44 | org.apache.httpcomponents
45 | httpclient
46 | 4.5.2
47 |
48 |
49 | junit
50 | junit
51 | 3.8.1
52 | test
53 |
54 |
55 |
56 |
57 |
58 |
59 | org.apache.maven.plugins
60 | maven-compiler-plugin
61 | 3.6.0
62 |
63 | 1.8
64 | 1.8
65 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/api/Attribute.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.api;
10 |
11 | import com.highstreet.technologies.test.client.enums.AttributeNames;
12 | import com.highstreet.technologies.test.client.enums.ConditionalPackage;
13 | import com.highstreet.technologies.test.client.enums.SubObjectClass;
14 |
15 | public interface Attribute {
16 |
17 | public ConditionalPackage getConditionalPackage();
18 |
19 | public String getLayerProtocol();
20 |
21 | public SubObjectClass getSubObjectClass();
22 |
23 | public String getAttribute();
24 |
25 | public String toJsonString();
26 |
27 | }
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/api/Builder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.api;
10 |
11 | public interface Builder {
12 | T build();
13 | }
14 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/api/Node.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.api;
10 |
11 | import java.util.List;
12 |
13 | public interface Node {
14 |
15 | public String getNodeId();
16 |
17 | public String getIpAddress();
18 |
19 | public int getPort();
20 |
21 | public String getUser();
22 |
23 | public String getPassword();
24 |
25 | public List getExpectedNetconfCapabilities();
26 |
27 | public String toJsonString();
28 |
29 | }
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/api/RestConfServer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.api;
10 |
11 | import com.highstreet.technologies.test.client.enums.Protocol;
12 |
13 | public interface RestConfServer {
14 |
15 | public String getIpAddress();
16 |
17 | public int getPort();
18 |
19 | public Protocol getScheme();
20 |
21 | public String getUser();
22 |
23 | public String getPassword();
24 |
25 | public String toJsonString();
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/api/Result.java:
--------------------------------------------------------------------------------
1 | package com.highstreet.technologies.test.client.api;
2 |
3 | public interface Result {
4 |
5 | public int getStatus();
6 |
7 | public String getMessage();
8 |
9 | public Value> getValue();
10 |
11 | public String toJsonString();
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/api/TestClient.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.api;
10 |
11 |
12 | import javax.ws.rs.core.MultivaluedHashMap;
13 |
14 | import com.highstreet.technologies.test.client.enums.Layer;
15 |
16 | public interface TestClient {
17 |
18 | public Result get(Attribute attribute);
19 |
20 | public Result set(Attribute attribute, Value> value);
21 |
22 | public RestConfServer getRestConfServer();
23 |
24 | public Node getNode();
25 |
26 | public MultivaluedHashMap getLayerProtocolIds();
27 | }
28 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/api/Value.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.api;
10 |
11 | public interface Value {
12 |
13 | public T getValue();
14 |
15 | public String toJsonString();
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/enums/ConditionalPackage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.enums;
10 |
11 | public enum ConditionalPackage {
12 | MW_AirInterfaceDiversity_Pac,
13 | MW_AirInterfaceHsbEndPoint_Pac,
14 | MW_AirInterfaceHsbFcSwitch_Pac,
15 | MW_AirInterface_Pac,
16 | MW_EthernetContainer_Pac,
17 | MW_HybridMwStructure_Pac,
18 | MW_PureEthernetStructure_Pac,
19 | MW_TdmContainer_Pac
20 | }
21 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/enums/Layer.java:
--------------------------------------------------------------------------------
1 | package com.highstreet.technologies.test.client.enums;
2 |
3 | public enum Layer {
4 | AIRINTERFACE("MWPS"), STRUCTURE("MWS"), CONTAINER("ETH-CTP");
5 |
6 | private final String text;
7 |
8 | /**
9 | * @param text
10 | */
11 | private Layer(final String text) {
12 | this.text = text;
13 | }
14 |
15 | /*
16 | * (non-Javadoc)
17 | *
18 | * @see java.lang.Enum#toString()
19 | */
20 | @Override
21 | public String toString() {
22 | return text;
23 | }
24 | }
25 |
26 | /*
27 | * MWPS-TTP: AirInterface
28 | * MWS-TTP: Structure (PureEthernetSturcture, HybridStructure)
29 | * ETH-CTP: Container (EthernetContainer, TdmConainer)
30 | */
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/enums/Protocol.java:
--------------------------------------------------------------------------------
1 | package com.highstreet.technologies.test.client.enums;
2 |
3 | public enum Protocol {
4 | http, https, ssh
5 | }
6 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/enums/SubObjectClass.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.enums;
10 |
11 | public enum SubObjectClass {
12 | airInterfaceCapability,
13 | airInterfaceConfiguration,
14 | airInterfaceCurrentPerformance,
15 | airInterfaceCurrentProblems,
16 | airInterfaceDiversityCapability,
17 | airInterfaceDiversityConfiguration,
18 | airInterfaceDiversityCurrentPerformance,
19 | airInterfaceDiversityCurrentProblems,
20 | airInterfaceDiversityHistoricalPerformances,
21 | airInterfaceDiversityStatus,
22 | airInterfaceHistoricalPerformances,
23 | airInterfaceStatus,
24 | ethernetContainerCapability,
25 | ethernetContainerConfiguration,
26 | ethernetContainerCurrentPerformance,
27 | ethernetContainerCurrentProblems,
28 | ethernetContainerHistoricalPerformances,
29 | ethernetContainerStatus,
30 | hybridMwStructureCapability,
31 | hybridMwStructureConfiguration,
32 | hybridMwStructureCurrentPerformance,
33 | hybridMwStructureCurrentProblems,
34 | hybridMwStructureHistoricalPerformances,
35 | hybridMwStructureStatus,
36 | pureEthernetStructureCapability,
37 | pureEthernetStructureConfiguration,
38 | pureEthernetStructureCurrentPerformance,
39 | pureEthernetStructureCurrentProblems,
40 | pureEthernetStructureHistoricalPerformances,
41 | pureEthernetStructureStatus,
42 | tdmContainerCapability,
43 | tdmContainerConfiguration,
44 | tdmContainerCurrentPerformance,
45 | tdmContainerCurrentProblems,
46 | tdmContainerHistoricalPerformances,
47 | tdmContainerStatus
48 | }
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/impl/AttributeBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.impl;
10 |
11 | import com.fasterxml.jackson.core.JsonProcessingException;
12 | import com.fasterxml.jackson.databind.ObjectMapper;
13 | import com.highstreet.technologies.test.client.api.Attribute;
14 | import com.highstreet.technologies.test.client.api.Builder;
15 | import com.highstreet.technologies.test.client.enums.AttributeNames;
16 | import com.highstreet.technologies.test.client.enums.ConditionalPackage;
17 | import com.highstreet.technologies.test.client.enums.SubObjectClass;
18 |
19 | public class AttributeBuilder implements Builder {
20 |
21 | private final ConditionalPackage conditionalPackage; // required
22 | private final String layerProtocol; // required
23 | private final SubObjectClass subObjectClass; // required
24 | private String attribute; // optional
25 |
26 | public AttributeBuilder(ConditionalPackage conditionalPackage,
27 | String layerProtocol,
28 | SubObjectClass subObjectClass) {
29 | this.conditionalPackage = conditionalPackage;
30 | this.layerProtocol = layerProtocol;
31 | this.subObjectClass = subObjectClass;
32 | }
33 |
34 | public AttributeBuilder setAttribute(AttributeNames attributeName) {
35 | this.attribute = attributeName.getLabelId();
36 | return this;
37 | }
38 |
39 | private void validateAttributeObject(AttributeImpl attribute) {
40 | // Do some basic validations to check
41 | // if Attribute object does not break any assumption of system
42 | if (attribute.getLayerProtocol() == "" || attribute.getLayerProtocol() == null) {
43 | throw new IllegalStateException("Invalid IP Address");
44 | }
45 |
46 | // TODO Check, whether subObjectClass and conditionalPackage fit
47 | }
48 |
49 | @Override
50 | public Attribute build() {
51 | AttributeImpl Attribute = new AttributeImpl(this);
52 | validateAttributeObject(Attribute);
53 | return Attribute;
54 | }
55 |
56 | private static final class AttributeImpl implements Attribute {
57 |
58 | // All final attributes
59 | private final ConditionalPackage conditionalPackage; // required
60 | private final String layerProtocol; // required
61 | private final SubObjectClass subObjectClass; // required
62 | private final String attribute; // optional
63 |
64 | private AttributeImpl(AttributeBuilder builder) {
65 | this.conditionalPackage = builder.conditionalPackage;
66 | this.layerProtocol = builder.layerProtocol;
67 | this.subObjectClass = builder.subObjectClass;
68 | this.attribute = builder.attribute;
69 | }
70 |
71 | @Override
72 | public ConditionalPackage getConditionalPackage() {
73 | return this.conditionalPackage;
74 | }
75 |
76 | @Override
77 | public String getLayerProtocol() {
78 | return this.layerProtocol;
79 | }
80 |
81 | @Override
82 | public SubObjectClass getSubObjectClass() {
83 | return this.subObjectClass;
84 | }
85 |
86 | @Override
87 | public String getAttribute() {
88 | return this.attribute;
89 | }
90 |
91 | @Override
92 | public String toJsonString() {
93 | ObjectMapper mapper = new ObjectMapper();
94 | try {
95 | return mapper.writeValueAsString(this);
96 | } catch (JsonProcessingException e) {
97 | e.printStackTrace();
98 | }
99 | return "{'error':'No JSON representation for a Attribute object.'}";
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/impl/RestConfServerBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.impl;
10 |
11 | import com.fasterxml.jackson.core.JsonProcessingException;
12 | import com.fasterxml.jackson.databind.ObjectMapper;
13 | import com.highstreet.technologies.test.client.api.Builder;
14 | import com.highstreet.technologies.test.client.api.RestConfServer;
15 | import com.highstreet.technologies.test.client.enums.Protocol;
16 |
17 | public class RestConfServerBuilder implements Builder {
18 |
19 | private final String ipAddress; // required
20 | private final int port; // required
21 | private Protocol scheme; // optional
22 | private String user; // optional
23 | private String password; // optional
24 |
25 | public RestConfServerBuilder(String ipAddress, int port) {
26 | this.ipAddress = ipAddress;
27 | this.scheme = Protocol.http;
28 | this.port = port;
29 | this.user = "admin";
30 | this.password = "admin";
31 | }
32 |
33 | public RestConfServerBuilder(RestConfServer rcs) {
34 | this.ipAddress = rcs.getIpAddress();
35 | this.scheme = rcs.getScheme();
36 | this.port = rcs.getPort();
37 | this.user = rcs.getUser();
38 | this.password = rcs.getPassword();
39 | }
40 |
41 | public RestConfServerBuilder setScheme(Protocol scheme) {
42 | this.scheme = scheme;
43 | return this;
44 | }
45 |
46 | public RestConfServerBuilder setUser(String user) {
47 | this.user = user;
48 | return this;
49 | }
50 |
51 | public RestConfServerBuilder setPassword(String password) {
52 | this.user = password;
53 | return this;
54 | }
55 |
56 | private void validateRestConfServerObject(RestConfServerImpl restConfServer) {
57 | // Do some basic validations to check
58 | // if restConfServer object does not break any assumption of system
59 | if (restConfServer.ipAddress == "") {
60 | throw new IllegalStateException("Invalid IP Address");
61 | }
62 | if (restConfServer.port < 1) {
63 | throw new IllegalStateException("Port out of range");
64 | }
65 | if (restConfServer.user == "" || restConfServer.user == null || restConfServer.password == "" || restConfServer.password == null) {
66 | throw new IllegalStateException("Invalid user or password");
67 | }
68 | }
69 |
70 | @Override
71 | public RestConfServer build() {
72 | RestConfServerImpl restConfServer = new RestConfServerImpl(this);
73 | validateRestConfServerObject(restConfServer);
74 | return restConfServer;
75 | }
76 |
77 | private static final class RestConfServerImpl implements RestConfServer {
78 |
79 | // All final attributes
80 | private final String ipAddress; // required
81 | private final int port; // required
82 | private final Protocol scheme; // required
83 | private final String user; // required
84 | private final String password; // required
85 |
86 | private RestConfServerImpl(RestConfServerBuilder builder) {
87 | this.ipAddress = builder.ipAddress;
88 | this.port = builder.port;
89 | this.scheme = builder.scheme;
90 | this.user = builder.user;
91 | this.password = builder.password;
92 | }
93 |
94 | @Override
95 | public String getIpAddress() {
96 | return this.ipAddress;
97 | }
98 |
99 | @Override
100 | public int getPort() {
101 | return this.port;
102 | }
103 |
104 | @Override
105 | public Protocol getScheme() {
106 | return this.scheme;
107 | }
108 |
109 | @Override
110 | public String getUser() {
111 | return this.user;
112 | }
113 |
114 | @Override
115 | public String getPassword() {
116 | return this.password;
117 | }
118 |
119 | @Override
120 | public String toJsonString() {
121 | ObjectMapper mapper = new ObjectMapper();
122 | try {
123 | return mapper.writeValueAsString(this);
124 | } catch (JsonProcessingException e) {
125 | e.printStackTrace();
126 | }
127 | return "{'error':'No JSON representation for a RestConfServer object.'}";
128 | }
129 | }
130 | }
131 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/impl/ResultBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.impl;
10 |
11 | import com.fasterxml.jackson.core.JsonProcessingException;
12 | import com.fasterxml.jackson.databind.ObjectMapper;
13 | import com.highstreet.technologies.test.client.api.Builder;
14 | import com.highstreet.technologies.test.client.api.Result;
15 | import com.highstreet.technologies.test.client.api.Value;
16 |
17 | public class ResultBuilder implements Builder {
18 |
19 | private int status;
20 | private String message;
21 | private Value> value;
22 |
23 | public ResultBuilder() {
24 | this.status = 500;
25 | this.message = "Internal Server Error";
26 | }
27 |
28 | public ResultBuilder(Result result) {
29 | this.status = result.getStatus();
30 | this.message = result.getMessage();
31 | this.value = result.getValue();
32 | }
33 |
34 | public ResultBuilder setStatus(int status) {
35 | this.status = status;
36 | return this;
37 | }
38 |
39 | public ResultBuilder setMessage(String message) {
40 | this.message = message;
41 | return this;
42 | }
43 |
44 | public ResultBuilder setValue(Value> value) {
45 | this.value = value;
46 | return this;
47 | }
48 |
49 | private void validateResultObject(ResultImpl result) {
50 | // Do some basic validations to check
51 | // if Result object does not break any assumption of system
52 | if (result.status < 1) {
53 | throw new IllegalStateException("Invalid status");
54 | }
55 | }
56 |
57 | @Override
58 | public Result build() {
59 | ResultImpl result = new ResultImpl(this);
60 | validateResultObject(result);
61 | return result;
62 | }
63 | private static final class ResultImpl implements Result {
64 |
65 | // All final attributes
66 | private final int status;
67 | private final String message;
68 | private final Value> value;
69 |
70 | private ResultImpl(ResultBuilder builder) {
71 | this.status = builder.status;
72 | this.message = builder.message;
73 | this.value = builder.value;
74 | }
75 |
76 | @Override
77 | public int getStatus() {
78 | return this.status;
79 | }
80 |
81 | @Override
82 | public String getMessage() {
83 | return this.message;
84 | }
85 |
86 | @Override
87 | public Value> getValue() {
88 | return this.value;
89 | }
90 |
91 | @Override
92 | public String toJsonString() {
93 | ObjectMapper mapper = new ObjectMapper();
94 | try {
95 | return mapper.writeValueAsString(this);
96 | } catch (JsonProcessingException e) {
97 | e.printStackTrace();
98 | }
99 | return "{'error':'No JSON representation for a Result object.'}";
100 | }
101 |
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/test/test-automation-project/test-client/client/src/main/java/com/highstreet/technologies/test/client/impl/ValueBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 highstreet technologies GmbH and others. All rights reserved.
3 | *
4 | * This program and the accompanying materials are made available under the
5 | * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 | * and is available at http://www.eclipse.org/legal/epl-v10.html
7 | */
8 |
9 | package com.highstreet.technologies.test.client.impl;
10 |
11 | import com.fasterxml.jackson.core.JsonProcessingException;
12 | import com.fasterxml.jackson.databind.ObjectMapper;
13 | import com.highstreet.technologies.test.client.api.Builder;
14 | import com.highstreet.technologies.test.client.api.Value;
15 |
16 | public class ValueBuilder implements Builder> {
17 |
18 | private final Object value; // required
19 |
20 | public ValueBuilder(Object value) {
21 | this.value = value;
22 | }
23 |
24 | public ValueBuilder(Value> value) {
25 | this.value = value.getValue();
26 | }
27 |
28 | private void validateValueObject(ValueImpl value) {
29 | // Do some basic validations to check
30 | // if Value object does not break any assumption of system
31 | }
32 |
33 | @Override
34 | public Value> build() {
35 | ValueImpl value = new ValueImpl(this);
36 | validateValueObject(value);
37 | return value;
38 | }
39 |
40 | private static final class ValueImpl implements Value