Skip to content

No support for mutiple bases for identityref type. #70

Closed
@davidmat50

Description

As per RFC https://datatracker.ietf.org/doc/html/rfc7950#section-9.10.2, we can have mutiple bases for identityref type.
But after laoding the yang file, only one of the bases is possible to be retriived from the strutucres.

The loading of the file with a leaf with identityref type which has mutiple bases is successfull, but only one the bases is being is stored after loading.

func (y *Type) Base() *Identity {
    return y.identity
}

File used:

module type_identityref_mutiple {

	namespace "urn:netcracker:params:type_identityref_mutiple";
	prefix type_identityref_mutiple;
	
	yang-version 1.1;
	
	
	identity init_i {
		description "Some initial identity";
	}
	identity identity-B {
		base "init_i";
	}
	identity identity-E {
		base "identity-B";
	}
	identity identity-F {
		base "identity-B";
	}
	identity identity-G {
		base "identity-E";
	}
	identity identity-H {
		base "identity-F";
	}
	identity identity-K {
		base "identity-F";
	}
		
	container root-container {
		
		leaf leaf-several-bases-1 {
			type identityref {
				base "identity-B";
				base "identity-E";
			}
		}
		leaf leaf-several-bases-2 {
			type identityref {
				base "identity-E";
				base "identity-B";
			}
		}
	}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions