YangCatalog / backend

YANG Catalog's REST API and internal module processing pipeline
https://yangcatalog.org
Apache License 2.0
2 stars 11 forks source link

Script for automatic push of new RFCs #740

Closed SlavomirMazurPantheon closed 1 year ago

SlavomirMazurPantheon commented 1 year ago

If new RFC is introduced we are informed by an email, and it is necessary to manually extract module from RFC document and create PR to YangModels/yang repo. This can be done automatically as we are already making automatic PRs to this repo. Name of the new script: rfc_push.py Directory: automatic_push These are steps to do it manually which should be transferred into script:

  1. Install latest xym tool version locally

    • pip install --upgrade xym
  2. Search RFC document by module name

  3. Run following command to extract the modules

    • xym https://datatracker.ietf.org/doc/html/rfcXXXX
  4. Fork YangModels/yang repo to yourself and then clone forked repository

  5. Copy extracted .yang files to cloned repo - into folder yang/standard/ietf/RFC

  6. Create symlink for each extracted yang module

    • ln -s <src> <dst>
    • Example:
      • ln -s ietf-l2-topology@2020-11-15.yang ietf-l2-topology.yang
  7. Create commit with message and push:

    • Commit message: Add new IETF RFC file
  8. Push changes to the yang-catalog/yang