Difference: YangExamplesExecdRoutes (1 vs. 2)

Revision 22008-11-04 - MartinBjoerklund

Line: 1 to 1
 
META TOPICPARENT name="YangExamples"
Changed:
<
<
submodule execd-routes {

>
>
submodule execd-routes {

 
Changed:
<
<
belongs-to execd;
>
>
belongs-to execd { prefix execd; }
  import inet-types { prefix inet; }
Line: 18 to 17
  'inet6' (in the actual Linux implementation, these both map to the 'main' routing table).";

Added:
>
>
revision "2008-11-04" { description "draft-ietf-netmod-yang-02 compatible."; }
  grouping routes { container inet { list route {

Revision 12007-11-19 - MartinBjoerklund

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="YangExamples"
submodule execd-routes {

    belongs-to execd;

    import inet-types { prefix inet; }

    include execd-types;

    description
        "The 'routes' component provides support for configuring static routes
         (IPv4 and IPv6).

         The data model is loosely based on (a subset of) Juniper's, there
         is support for two 'conceptual' routing tables named 'inet' and
         'inet6' (in the actual Linux implementation, these both map to
         the 'main' routing table).";
    
    grouping routes {
        container inet {
            list route {
                key "name prefix-length";
                leaf name {
                    type inet:ipv4-address;
                }
                leaf prefix-length {
                    type prefixLengthIPv4;
                }
                leaf description {
                    type string;
                }
                leaf enabled {
                    type boolean;
                    default true;
                }
                leaf type {
                    type enumeration {
                        enum "next-hop";
                        enum "reject";
                        enum "discard";
                        enum "prohibit";
                    }
                    must "$this != 'next-hop' or ../next-hop" {
                        error-message "No next-hop specified for type " +
                                      "'next-hop'";
                    }
                    default next-hop;
                }
                list next-hop {
                    key name;
                    unique metric;
                    max-elements 16;
                    leaf name {
                        type inet:ipv4-address;
                        description "must not be a multicast address";
                    }
                    leaf metric {
                        type int32;
                        default 0;
                    }
                }
            }
        }
        container inet6 {
            list route {
                key "name prefix-length";
                leaf name {
                    type inet:ipv6-address;
                }
                leaf prefix-length {
                    type prefixLengthIPv6;
                }
                leaf description {
                    type string;
                }
                leaf enabled {
                    type boolean;
                    default true;
                }
                leaf type {
                    type enumeration {
                        enum "next-hop";
                        enum "reject";
                    }
                    must "$this != 'next-hop' or ../next-hop" {
                        error-message "No next-hop specified for type " +
                                      "'next-hop'";
                    }
                    must "$this == 'next-hop' or not(../next-hop)" {
                        error-message "Must not specify next-hop with " +
                                      "type '$value'";
                    }
                    default "next-hop";
                }
                list next-hop {
                    key name;
                    unique metric;
                    max-elements 16;
                    leaf name {
                        type inet:ipv6-address;
                        description "must not be a multicast address";
                    }
                    leaf metric {
                        type int32;
                        default 1024;
                    }
                    leaf interface {
                        type interfaceName;
                    }
                    leaf unit {
                        type interfaceLogicalUnit;
                    }
                }
            }
        }
    }
}
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback