Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation issue with sequencing of leaf elements within multiple groupings #253

Open
akshay-raut opened this issue Jan 13, 2017 · 0 comments

Comments

@akshay-raut
Copy link

Hi,
I have observed validation issue with the sequence of leaf elements within grouping.
To keep things simple I used bellow dummy yang model to reporduce the issue.

$ cat a.yang

module a {
    namespace urn:yang:a;
    prefix a;

    grouping group_1 {
        leaf g1_config_1 {
            type uint32;
        }

        leaf g1_config_2 {
            type uint32;
        }
    }

    grouping group_2 {
        leaf g2_config_1 {
            type uint32;
        }

        leaf g2_config_2 {
            type uint32;
        }
    }

    container container_a {
        uses group_1;
        uses group_2;
    }
}

Configuration that passes validation:

<a:container_a xmlns:a="urn:yang:a">
	<a:g1_config_1>1</a:g1_config_1>
	<a:g1_config_2>2</a:g1_config_2>
	<a:g2_config_1>3</a:g2_config_1>
	<a:g2_config_2>4</a:g2_config_2>
</a:container_a>

Configuration that fails validation:

<a:container_a xmlns:a="urn:yang:a">
	<a:g1_config_1>1</a:g1_config_1>
	<a:g2_config_1>3</a:g2_config_1>
	<a:g1_config_2>2</a:g1_config_2>
	<a:g2_config_2>4</a:g2_config_2>
</a:container_a>

In the failed configuration the sequence of config leaf elements is scrambled. This is even worst when grouping has more elements.
I guess the sequence should not matter for validation.

Regards
AKSHAY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant