Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleinput YANG file
File : ietf-network.yang
module ietf-network {
    yang-version 1;
    namespace "urn:ietf:params:xml:ns:yang:ietf-network";
    prefix nd;

    containeridentity networkstunnel-type {
        description
            "Serves as top-level container for a list of
            networks.";
        leaf network-id {
            type uint8"Base identity from which specific tunnel types are derived.";
            description
            "Identifies a network.";
        }
    }
    container network-id {
        description
            "Serves as top-level container for a list of
            networks.";
        leaf leaf-network-id {
            type leafrefidentityref {
                path "/nd:networks/nd:network-id"base tunnel-type;
            }
         }
    }

}
Code Block
titleGenerated java files
File : TunnelType.java
public abstract class TunnelType {
}
 
 
File : NetworksNetworkId.java
public interface NetworksNetworkId { 
    shortTunnelType networkIdleafNetworkId(); 
    interface NetworksBuilderNetworkIdBuilder { 
        shortTunnelType networkIdleafNetworkId(); 
        NetworksBuilderNetworkIdBuilder networkIdleafNetworkId(shortTunnelType networkIdleafNetworkId); 
        NetworksNetworkId build();
    }
} 
Code Block
titleGenerated java files


File : NetworkId.java
public interface NetworkId { 
    short networkRef(); 
    interface NetworkIdBuilder { 
        short networkRef();
        NetworkIdBuilder networkRef(short networkRef); 
        NetworkId build();
    }
} 

...

RFC6020 - https://tools.ietf.org/html/rfc6020

File : NetworkId.java
File : NetworkId.java
public interface NetworkId { 
    short networkRef(); 
    interface NetworkIdBuilder { 
        short networkRef();
        NetworkIdBuilder networkRef(short networkRef); 
        NetworkId build();
    }
}