Skip to content
Ladislav Lhotka edited this page Nov 3, 2014 · 2 revisions

Populating the Project Repository

Add YANG modules, I-D source, example XML instance of the data model and figures (if any) and push them into the forked project repository. Put everything into the main directory, do not create any subdirectories.

Edit the file README.md: remove the part above three dashes (---) and use the remaining template to add information about the project.

The Makefile has to be updated as follows:

  • Set the I_D variable to the name of the Internet-Draft (without the revision number), and REVNO to the current revision number. The I-D source then should be in a file whose name is the value of I_D concatenated with the extension .xml.

  • The MODULES variable should contain a space separated list of YANG modules and submodules that comprise the data model. Use only module names without the .yang extension.

  • The FIGURES variable should contain names of files with figures, including tree diagrams, code snippets or other ascii art.

  • The variables EXAMPLE_BASE and EXAMPLE_TYPE together determine the file name and type of an example XML instance of the data model that is typically included in an appendix of the Internet-Draft. For example, if the XML document is a reply to the message, the value of EXAMPLE_TYPE should be get-reply, and then, if the EXAMPLE_BASE is example, the XML document should be stored in the file example-get-reply.xml, or otherwise its name should be given as the value of the EXAMPLE_INST variable.

In general, Makefile variables with uppercase names may be adjusted while those with lowercase names should not be changed (unless you know what you are doing).

The Makefile may be extended with new rules, e.g. for generating tree diagrams from the data model.

Quite often, other YANG modules that are not part of the current project have to be added to the data model. Typically, if the current project's modules augment other modules that already exist, then the latter modules have to be added. This is accomplished by appending their capability string to the file hello-external.ent. The correct capability string can be generated by the capability output plugin of pyang. For example, the capability string for the ietf-ip module can be generated this way:

$ pyang -f capability --capability-entity ietf-ip.yang 
  urn:ietf:params:xml:ns:yang:ietf-ip?module=ietf-ip&revision=2014-03-28
  &features=ipv4-non-contiguous-netmasks,ipv6-privacy-autoconf

The capability string should then be appended to the hello-external.ent file enclosed in <capability>...</capability>.

Clone this wiki locally