Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

Can I create a custom field in yang

I wanted to know if we could define a custom field or attribute in one of the elements leaf,list etc. For eg: Is this possible? How can we define such fields if its possible.

model Animal{

 leaf amphibian{
  type String;
  custom "Frog";     // Custom field which has a value "Frog"
 }
}

Can I create a custom field in yang

I wanted to know if we could define a custom field or attribute in one of the elements leaf,list etc. For eg: Is this possible? How can we define such fields if its possible.

model Animal{

 leaf amphibian{
FROG{
  type String;
  custom "Frog"; species "amphibian";     // Custom field which has a value "Frog"
 }
}

Can I create a custom field in yang

I wanted to know if we could define a custom field or attribute in one of the elements leaf,list etc. For eg: Is this possible? How can we define such fields if its possible.

model Animal{

 leaf FROG{
  type String;
  species "amphibian";     // Custom field species which has a value "Frog"
"amphibian"
 }
}