SelfResolutionGroupingWithMultipleUses.yang 1.41 KB
module Test {
    yang-version 1;
    namespace http://huawei.com;
    prefix Ant;
    container valid {
    	grouping endpoint {
             leaf zip-code {
                 type string;
             }
             uses first;
             container design {
	         uses second;
	         container correct {
                     leaf newone {
                         type string;
                     }
                     uses third;
                 }
	     }
             uses fourth;
             uses fifth;
    	}
        uses endpoint;
        grouping first {
	    list valid {
        	    key invalid-interval;
    	            reference "RFC 6020";
    		    leaf invalid-interval {
        	    type "uint16";
        	    units "seconds";
        	    status current;
        	    reference "RFC 6020";
    		    }
	     }
        }
        grouping second {
            leaf ink {
                type int32;
            }
        }
        grouping third {
            container value {
                leaf zip-code {
                    type string;
                }
            }
        }
        grouping fourth {
            typedef my-type {
                status deprecated;
                type int32;
            }
            leaf correct {
                type my-type;
            }
        }
        grouping fifth {
            leaf abc {
                type string;
            }
        }
    }
}