Skip to content

Commit

Permalink
top level testing script
Browse files Browse the repository at this point in the history
  • Loading branch information
tnadeau committed Sep 21, 2017
1 parent c9acd95 commit 1488851
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 44 deletions.
117 changes: 73 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,131 @@
[![Build Status](https://travis-ci.org/YangModels/yang.svg)](https://travis-ci.org/YangModels/yang)

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [YANG](#yang)
- [Contribution Procedures](#contribution-procedures)
- [Direct Contributions](#direct-contributions)
- [Contributions Via Submodules](#contributions-via-submodules)
- [Travis CI Jobs](#travis-ci-jobs)
- [Slack Group and Channels](#slack-group-and-channels)
- [Models Directory Structure](#models-directory-structure)
- [Tools Directory Structure](#tools-directory-structure)
- [License Notes](#license-notes)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

YANG
=====

This repository contains a collection of YANG modules:

* IETF standards-track YANG modules
* Open Daylight open source YANG modules
* OpenDaylight open source YANG modules
* IEEE experimental YANG modules
* Broadband Forum standard YANG modules
* Vendor specific YANG modules
* Vendor-specific YANG modules
* Open source YANG tools

***
## Slack Group and Channels
[To Subscribe and Browse Click Here](https://yangmodels.slack.com)
# Contribution Procedures

## Models Directory Structure
## Direct Contributions

The following directories are maintained for YANG models [license note in brackets]:

**yang/experimental**: contains experimental YANG modules [any]
This is the preferred method of contribution. With this approach you pick where your models will reside in the directory hierarchy, and manage the files mainly in your own fork of the main repository, submitting a pull request when you wish to make public updated models.

**yang/experimental/ieee**: experimental modules intended for IEEE submission [3]
By convention, there should also be a `check.sh` script provided by the contributors, which should be referenced from the [`travis.yml`](https://github.com/YangModels/yang/blob/master/.travis.yml) file for CI builds. Multiple examples are already in place to copy and modify as required.

**yang/experimental/ietf**: experimental modules intended for IETF submission [1]
## Contributions Via Submodules

**yang/experimental/odp**: experimental modules intended for OpenDaylight submission [2]
Standards bodies or vendors may also provide models to the main repository via a git submodule. Examples of this can be see under [https://github.com/YangModels/yang/tree/master/standard](https://github.com/YangModels/yang/tree/master/standard), with the BBF and MEF submodules. By convention, if a submodule is used, there should also be an equivalent `check.sh` provided by the contributors, which should be referenced from the [`travis.yml`](https://github.com/YangModels/yang/blob/master/.travis.yml) file for CI builds. An example of this may be found [in the BBF's submodule](https://github.com/BroadbandForum/yang), and a sample invocation [here](https://github.com/YangModels/yang/blob/b8ad913fb4cc20ca21b59da1bd8df5cc2927a8e1/.travis.yml#L17).

**yang/standard**: contains standards-track YANG modules [any]
A summary of the suggested process is:

**yang/standard/ietf**: standard IETF YANG modules [1]
1. Create a fork of [https://github.com/YangModels/yang](https://github.com/YangModels/yang)
1. Enable Travis on your fork
1. Add your source git repository as a submodule to your fork:
- Clone your fork
- cd into vendor or standards directory (depending on the source of your models)
- `git submodule add https://github.com/<owner>/<repository>.git <name>`
1. Add appropriate entry to the `.travis.yml` file to check your models.
1. Commit changes to your fork
1. Test the Travis CI run of your fork as well as test it by running the testall.sh script from the top level directory.

After you've verified that the submodule addition and module checking is working ok, submit a PR to the main repository. This will take the latest commit from your repository and make it available as a submodule.

**yang/standard/ietf/DRAFT**: work-in-progress IETF YANG modules [1]
Subsequently, when an updated set of models needs to be released, fork, clone, update submodule, commit and submit PR, also ensuring that Travis is again enabled on your fork to allow pre-pull request checks.

**yang/standard/ietf/RFC**: completed IETF YANG modules [1]

**yang/standard/odp**: published modules for OpenDaylight [2]
## Travis CI Jobs

**yang/standard/bbf/draft**: draft Broadband Forum YANG modules [6]
In general, pull requests will not be accepted without `check.sh` scripts being in place and a clean Travis CI build being achieved. As can be seen from existing check scipts, all of which use `pyang` today, the bar is set fairly low. The minimum requirement is that the models contributed compile correctly such that `pyang` plugins such as the tree plugin will function correctly, and the schema tree is available for interrogation and tasks such as code generation.

**yang/standard/bbf/standard**: standard Broadband Forum YANG modules [6]
As noted above, the check scripts today depend on `pyang`, and, as of writing, this tool does not support validation of content such as regular expressions or XPath constraints. **As such, models available in this repository may not be accepted by tools that perform more complete semantic validation.** An example of such a tool is the OpenDaylight controller.

**yang/vendor**: contains vendor-specific YANG modules [any]
# Slack Group and Channels

**yang/vendor/brocade**: Brocade YANG modules [4]

**yang/vendor/cisco**: Cisco YANG modules [4]
[To Subscribe and Browse Click Here](https://yangmodels.slack.com)

**yang/vendor/netconfcentral**: Netconf Central YANG modules [4]
# Models Directory Structure

**yang/vendor/yumaworks**: YumaWorks YANG modules [4]
The following directories are maintained for YANG models [license note in brackets]:

## Tools Directory Structure
- **yang/experimental**: contains experimental YANG modules [any]
- **yang/experimental/ieee**: experimental modules intended for IEEE submission [3]
- **yang/experimental/ietf**: experimental modules intended for IETF submission [1]
- **yang/experimental/odp**: experimental modules intended for OpenDaylight submission [2]
- **yang/standard**: contains standards-track YANG modules [any]
- **yang/standard/ietf**: standard IETF YANG modules [1]
- **yang/standard/ietf/DRAFT**: work-in-progress IETF YANG modules [1]
- **yang/standard/ietf/RFC**: completed IETF YANG modules [1]
- **yang/standard/odp**: published modules for OpenDaylight [2]
- **yang/standard/bbf/draft**: draft Broadband Forum YANG modules [6]
- **yang/standard/bbf/standard**: standard Broadband Forum YANG modules [6]
- **yang/vendor**: contains vendor-specific YANG modules [any]
- **yang/vendor/cisco**: Cisco YANG modules [4]
- **yang/vendor/netconfcentral**: Netconf Central YANG modules [4]
- **yang/vendor/yumaworks**: YumaWorks YANG modules [4]

# Tools Directory Structure

The following directories are maintained for tools [license note in brackets]:

**yang/tools**: open source software tools [any]
- **yang/tools**: open source software tools [any]
- **yang/tools/xym**: YANG model extractor tool, submodule (```git clone --resursive``` to include) [5]
- **yang/tools/yang_viewer**: YANG browser written in Java [2]

**yang/tools/xym**: YANG model extractor tool, submodule (```git clone --resursive``` to include) [5]

**yang/tools/yang_viewer**: YANG browser written in Java [2]
# License Notes


## License Information

### [1] IETF Trust License (Note Well):
**[1] IETF Trust License (Note Well):**

* All files contained within this sub-directory are considered to be IETF Contributions.
* All issues entered into the trouble ticket system for this directory are considered to be IETF Contributions.
* All pull requests submitted for this directory are considered to be IETF Contributions.
* All IETF Contributions are submitted under the terms of the [IETF Note Well statement](http://www.ietf.org/about/note-well.html)
* All IETF Contributions are subject to the requirements and provisions of [BCP 78](http://tools.ietf.org/rfc/bcp/bcp78.txt) and [BCP 79](http://tools.ietf.org/rfc/bcp/bcp79.txt).

### [2] OpenDaylight Eclipse License:
**[2] OpenDaylight Eclipse License:**

* All files contained within this sub-directory are provided under the terms of the [Eclipse Public License](https://www.eclipse.org/legal/epl-v10.html):

### [3] IEEE License:
**[3] IEEE License:**

* All files contained within this sub-directory are considered to be intended as IEEE Contributions.
* All issues entered into the trouble ticket system for this directory are considered to be intended as IEEE Contributions.
* All pull requests submitted for this directory are considered to be intended as IEEE Contributions.
* All contributions to IEEE standards development (whether for an individual or entity standard) shall meet the requirements outlined in the [IEEE-SA Copyright Policy](https://standards.ieee.org/develop/policies/bylaws/sect6-7.html#7)
* Copyright release for YANG modules: Users may freely reproduce the YANG modules contained under /experimental/ieee/ so that they can be used for their intended purpose.

### [4] Vendor Specific License:
**[4] Vendor Specific License:**

* All files contained within this sub-directory are provided under the terms of a license specified by the vendor that owns the YANG modules.

### [5] Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

### [6] Broadband Forum License:
**[5]**

* All files contained within this sub-directory are provided under the terms of the Broadband Forum Software license (see Appendix C, Section 3, of https://www.broadband-forum.org/ipr-policy).

## Submission Procedure
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Send us a git pull request with latest changes. When doing a pull request, please post the pyang output to show that your changes build cleanly.
**[6] Broadband Forum License:**

If there are any issues, send email to tnadeau at brocade.com or tnadeau at lucidvision dot com
* All files contained within this sub-directory are provided under the terms of the Broadband Forum Software license (see Appendix C, Section 3, of https://www.broadband-forum.org/ipr-policy).
12 changes: 12 additions & 0 deletions testall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
#
# Use this script to compile the entire repository
# when doing local development
#

./vendor/cisco/check.sh
./standard/ietf/check.sh
./standard/bbf/check.sh
./experimental/ieee/check.sh
./standard/ieee/check.sh

0 comments on commit 1488851

Please sign in to comment.