Skip to content

Instantly share code, notes, and snippets.

@icarocamelo
Created November 5, 2015 22:41
Show Gist options
  • Save icarocamelo/bd0ade3396f21dcf256a to your computer and use it in GitHub Desktop.
Save icarocamelo/bd0ade3396f21dcf256a to your computer and use it in GitHub Desktop.
module mappings {
//The yang version - today only 1 version exists. If omitted defaults to 1.
yang-version 1;
//a unique namespace for this toaster module, to uniquely identify it from other modules that may have the same name.
namespace
"http://netconfcentral.org/ns/fw";
//a shorter prefix that represents the namespace for references used below
prefix mappingservice;
//Defines the organization which defined / owns this .yang file.
organization "Inocybe Technologies";
//defines the primary contact of this yang file.
contact
"Icaro Camelo <icamelo@inocybe.com>";
//provides a description of this .yang file.
description
"YANG version of the Mapping Service.";
//defines the dates of revisions for this yang file
revision "2015-11-05" {
description
"Mapping module.";
}
grouping map {
list outer-map {
key "id";
leaf id {
type uuid;
}
list inner-map {
key "inner-key";
leaf inner-key {
type string;
}
leaf value {
type somedata;
}
}
}
}
container mappings {
uses map;
}
}
@raphaelamorim
Copy link

understood, but you most probably are going to use the inner-map as a list, because you don't know the key anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment