freeconf / yang

Standards-based management for Golang microservices
Apache License 2.0
38 stars 14 forks source link

Issue in fetching 'unique' for list #59

Closed davidmat50 closed 1 year ago

davidmat50 commented 1 year ago

Yang file with a 'list' statement and 'unique' susbstatement was laoded succesfully. But the method to fetch the unique() info was NOT returning any valid values.

func (m *List) Unique() [][]string

Tested yang: listUniqueTest

module listUniqueTest {
    namespace urn:x;
    prefix x;
    revision 2023-01-01;
    list user {
        //key "name employee-id";
        unique "employee-id full-name";
        leaf name {
            type string;
        }
        leaf employee-id {
            type uint32;
        }
        leaf full-name {
            type string;
        }
        leaf class {
            type string;
            mandatory true;
        }
        description "Employee Information";
    }
}
dhubler commented 1 year ago

fixed