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

yang: Corrected range format in YANG #17768

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

y-bharath14
Copy link
Contributor

The range statement should specify a continuous range of values

The range statement should specify a continuous range of values

Signed-off-by: y-bharath14 <[email protected]>
@donaldsharp
Copy link
Member

The range of values is 0 or 10000-max. so the original is correct. 0 means use the default and 10000...max is the allowed range for configuration. This change seems wrong

@y-bharath14
Copy link
Contributor Author

The range of values is 0 or 10000-max. so the original is correct. 0 means use the default and 10000...max is the allowed range for configuration. This change seems wrong

Hello Donald Sharp,

How about including the below change..

leaf required-echo-receive-interval {
  type uint32 {
      range "10000..max"; <---- Allow user to configure in the range.
  }
  default 0;   <---- Default value is set it to 0.

}

Thanks & Regards,
Bharath

@mjstapp
Copy link
Contributor

mjstapp commented Jan 8, 2025

I ... don't think that would work: the "default" value would be out of the valid range, and it would be impossible ever to revert the config to the default value - right?

Hello Donald Sharp,

How about including the below change..

leaf required-echo-receive-interval {
  type uint32 {
      range "10000..max"; <---- Allow user to configure in the range.
  }
  default 0;   <---- Default value is set it to 0.

}

Thanks & Regards, Bharath

@y-bharath14
Copy link
Contributor Author

I ... don't think that would work: the "default" value would be out of the valid range, and it would be impossible ever to revert the config to the default value - right?

Hello Donald Sharp,
How about including the below change..

leaf required-echo-receive-interval {
  type uint32 {
      range "10000..max"; <---- Allow user to configure in the range.
  }
  default 0;   <---- Default value is set it to 0.

}
Thanks & Regards, Bharath

Hello Mark Stapp, Donald Sharp

Yes, you are correct . '0' should be part of range(Original one).
If the default value for "required-echo-receive-interval" is "0", then default 0 can be used. Otherwise, we can discard this PR.

Thanks & Regards,
Bharath

Copy link
Contributor

@choppsv1 choppsv1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@choppsv1
Copy link
Contributor

I don't think the problem is understood here. Rather than talk about a solution, can you state what the problem you are seeing is?

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

Successfully merging this pull request may close these issues.

5 participants