Commit 37d298f6 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

* updated examples

parent 1ec8dd0f
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
Package generated_from_acme_yang {
    Type String
    Type TODO_RESOLVE_REFERENCED
    Use "acme.yang" as SOURCE_MAPPING
    Structure system (
        system___host_name host_name,
        string_collection domain_search,
        system___login login
    )
    Type system___host_name
    Type string
    Collection string_collection of string
    Structure system___login (
        login___message message,
        login___user_collection user
    )
    Type login___message
    Structure login___user (
        user___name ^name,
        user___full_name full_name,
        user___class class
    )
    Type user___name
    Type user___full_name
    Type user___class
    Collection login___user_collection of login___user
}
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
Package generated_from_example_yang {
    Type String
    Type TODO_RESOLVE_REFERENCED
    Use "example.yang" as SOURCE_MAPPING
    Structure parent_container (
        parent_container___child_container child_container
    )
    Structure parent_container___child_container (
        child_container___parent_ordered_list_collection parent_ordered_list
    )
    Structure child_container___parent_ordered_list (
        parent_ordered_list___parent_key_leaf parent_key_leaf,
        parent_ordered_list___parent_ordinary_leaf parent_ordinary_leaf,
        parent_ordered_list___child_ordered_list_collection child_ordered_list
    )
    Type parent_ordered_list___parent_key_leaf
    Type parent_ordered_list___parent_ordinary_leaf
    Structure parent_ordered_list___child_ordered_list (
        child_ordered_list___child_key_leaf child_key_leaf,
        child_ordered_list___child_ordinary_leaf child_ordinary_leaf
    )
    Type child_ordered_list___child_key_leaf
    Type child_ordered_list___child_ordinary_leaf
    Collection parent_ordered_list___child_ordered_list_collection of parent_ordered_list___child_ordered_list
    Collection child_container___parent_ordered_list_collection of child_container___parent_ordered_list
}
 No newline at end of file
+111 −0
Original line number Diff line number Diff line
module links {
    namespace "http://example.com/ns/link";
    prefix link;

    import ietf-yang-types {
        prefix yang;
    }


    grouping LinkFlagsType {
        leaf UP {
            type empty;
        }
        leaf NOARP {
            type empty;
        }
        leaf BROADCAST {
            type empty;
        }
        leaf MULTICAST {
            type empty;
        }
        leaf LOOPBACK {
            type empty;
      }
        leaf NOTRAILERS {
            type empty;
        }
    }

    typedef QueueDisciplineType {
        type enumeration {
            enum pfifo_fast;
            enum noqueue;
            enum noop;
            enum htb;
        }
    }
    container config {
        container links {
            list link {
                key name;
                unique addr;
                max-elements 1024;
                leaf name {
                    type string;
                }
                container flags {
                    uses LinkFlagsType;
                }
                leaf addr {
                    type yang:mac-address;
                    mandatory true;
                }
                leaf brd {
                    type yang:mac-address;
                    mandatory true;
                }
                leaf mtu {
                    type uint32;
                    default 1500;
                }
            }
        }
        container queueDisciplines {
            list queueDiscipline {
                key linkName;
                max-elements 1024;
                leaf linkName {
                    type leafref {
                        path "/config/links/link/name";
                    }
                }
                leaf type {
                    type QueueDisciplineType;
                    mandatory true;
                }
                leaf length {
                    type uint32;
                }
            }
        }
        container linkLimitations {
            list linkLimitation {
                key linkName;
                leaf linkName {
                    type leafref {
                        path "/config/links/link/name";
                    }
                }
                container limitations {
                    leaf only10Mbps {
                        type boolean;
                        default false;
                    }
                    leaf onlyHalfDuplex {
                        type boolean;
                        default false;
                    }
                }
            }
        }
        container defaultLink {
            leaf linkName {
                type leafref {
                    path "/config/links/link/name";
                }
            }
        }
    }
}
 No newline at end of file
+66 −0
Original line number Diff line number Diff line
Package generated_from_links_yang {
    Type String
    Type TODO_RESOLVE_REFERENCED
    Use "links.yang" as SOURCE_MAPPING
    Structure config (
        config___link_collection links,
        config___queueDiscipline_collection queueDisciplines,
        config___linkLimitation_collection linkLimitations,
        config___defaultLink defaultLink
    )
    Structure config___link (
        link___name ^name,
        link___flags flags,
        link___addr addr,
        link___brd brd,
        link___mtu mtu
    )
    Type link___name
    Structure link___flags (
        flags___UP UP,
        flags___NOARP NOARP,
        flags___BROADCAST BROADCAST,
        flags___MULTICAST MULTICAST,
        flags___LOOPBACK LOOPBACK,
        flags___NOTRAILERS NOTRAILERS
    )
    Type flags___UP
    Type flags___NOARP
    Type flags___BROADCAST
    Type flags___MULTICAST
    Type flags___LOOPBACK
    Type flags___NOTRAILERS
    Type link___addr extends string
    Type string
    Type link___brd extends string
    Type link___mtu extends uint32
    Type uint32
    Collection config___link_collection of config___link
    Structure config___queueDiscipline (
        queueDiscipline___linkName linkName,
        queueDiscipline___type ^type,
        queueDiscipline___length length
    )
    Type queueDiscipline___linkName
    Type queueDiscipline___type extends enumeration
    Type enumeration
    Type queueDiscipline___length
    Collection config___queueDiscipline_collection of config___queueDiscipline
    Structure config___linkLimitation (
        linkLimitation___linkName linkName,
        linkLimitation___limitations limitations
    )
    Type linkLimitation___linkName
    Structure linkLimitation___limitations (
        limitations___only10Mbps only10Mbps,
        limitations___onlyHalfDuplex onlyHalfDuplex
    )
    Type limitations___only10Mbps extends boolean
    Type boolean
    Type limitations___onlyHalfDuplex extends boolean
    Collection config___linkLimitation_collection of config___linkLimitation
    Structure config___defaultLink (
        defaultLink___linkName linkName
    )
    Type defaultLink___linkName
}
 No newline at end of file
Loading