Table of Contents

Model Creator? Add Model Metadata

If you are a Standard Development Organization (SDO), an open source project or an organization (e.g., a vendor that creates proprietary models), and you want to add your models and related metadata to the Catalog, do the following:

  1. Check your modules into GitHub. Ideally submit your modules directly to the https://github.com/YangModels/yang repository via a pull request. Alternatively, you can use any public repository, and then also add a git sub-module to the https://github.com/YangModels/yang repository via a pull request.
  2. Request a new YANG Catalog API account if you do not have one already.
  3. Once the account is requested, wait until confirmation before proceeding.
  4. Use an HTTP PUT request to https://yangcatalog.org:8443/modules with a JSON payload modeled after the model-metadata.yang model (current revision: 2017-07-15). Note, his module requires the yang-catalog module. This model looks like the following:
      module: module-metadata
          +--rw modules
             +--rw module* [name revision]
                +--rw generated-from?                   enumeration
                +--rw maturity-level?                   enumeration
                +--rw document-name?                    string
                +--rw author-email?                     yc:email-address
                +--rw reference?                        inet:uri
                +--rw name                              yang:yang-identifier
                +--rw revision                          union
                +--rw organization                      string
                +--rw source-file
                |  +--rw owner         string
                |  +--rw repository    string
                |  +--rw path          path
                |  +--rw branch?       string
                +--rw organization-specific-metadata
                   +--rw ietf
                      +--rw ietf-wg?   string
    
    For example:
    PUT https://yangcatalog.org:8443/modules
    Content-type: application/json
    
    {
          "modules": {
             "module":[
           {
             "module": "example-jukebox",
             "revision": "2014-01-20",
             "organization": "example",
             "maturity-level": "bar",
             "author-email": "foo@bar.com",
             "source-file":{
                 "repository": "foo",
                 "owner": "bar",
                 "path": "standard/ietf/DRAFT/example-jukebox.yang"
             }
           }
         ]
       }
     }
    
  5. Test the result by querying http://yangcatalog.org:8008/api/config/catalog?deep using the credentials oper / oper.
  6. Contact info@yangcatalog.org if you run into problems.

While some metadata can be extracted from models by the API backend (these are called extractable fields), metadata such as maturity-level and conformance-type must be provided by the model creator (these are the non-extractable fields). The reason the module-metadata model is broken out from the main yang-catalog module is to focus more on the non-extractable fields. The more metadata from the module-metadata model that can be included the more robust and detailed the Catalog will be.

Vendor? Add Implementation Metadata

If you are a vendor that implements YANG models in your product, then you can upload platform metadata to the Catalog in order to specify what platforms (and software releases) implement which YANG models. This is done using the following steps:

  1. Request a new YANG Catalog API account if you do not have one already.
  2. Once the account is requested, wait until confirmation before proceeding.
  3. Use an HTTP PUT request to https://yangcatalog.org:8443/platforms with a JSON payload modeled after the platform-implementation-metadata.yang model (current revision: 2017-07-07). Note, his module requires the yang-catalog module. This model looks like the following:
           module: platform-implementation-metadata
               +--rw platforms* [vendor name software-version software-flavor]
                  +--rw vendor               string
                  +--rw name                 string
                  +--rw models*              string
                  +--rw software-flavor      string
                  +--rw software-version     string
                  +--rw os-type?             string
                  +--rw capabilities-file
                     +--rw owner?        string
                     +--rw repository?   url
                     +--rw path?         path
         
    For example:
         PUT https://yangcatalog.org:8443/platforms
         Content-type: application/json
    
         {
           "platforms": [
                {
                  "vendor": "example",
                  "name": "baz",
                  "capabilities_file":{
                     "repository": "foo",
                     "owner": "bar",
                     "path": "vendor/example/baz/baz-netconf-capability.xml"
                 },
                  "models": [
                              "BAZ"
                  ],
                  "software-flavor": "ALL",
                  "software-version": "1.2.3",
                  "os-type": "bazOS"
                }
              ]
         }
         
  4. Test the result by querying http://yangcatalog.org:8008/api/config/catalog?deep using the credentials oper / oper.
  5. Contact info@yangcatalog.org if you run into problems.
Hacking Yangcatalog.org

All of the code behind yangcatalog.org is Open Source. However, it is spread out across multiple GitHub repositories. If you are interested in hacking the code that directly drives the YANG Catalog, pick your repository from the list below:

In order to contribute back to YANG Catalog, checkout one of the repositories, make your changes, and then create a pull request to have your code merged.

To get updates about changes with YANG Catalog, subscribe to announce@yangcatalog.org.