-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add 'preference' attribute to aci_l3out_static_routes_nexthop (DCNE-303) #722
base: master
Are you sure you want to change the base?
Add 'preference' attribute to aci_l3out_static_routes_nexthop (DCNE-303) #722
Conversation
preference: | ||
description: | ||
- The administrative preference value for the nexthop | ||
type: int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you document the default value apic sets when not provided and the allowed integer range, think it is 1-255 if not mistaken. Could you validate this and adjust the docs suggestion below.
preference: | |
description: | |
- The administrative preference value for the nexthop | |
type: int | |
preference: | |
description: | |
- The administrative preference value for the nexthop. | |
- The APIC defaults to 0 when unset during creation. | |
- The value must be between 1 and 255. | |
type: int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback!
After further investigation, I found that the UI tooltip confirms that 0
is also a permitted value, along with "defaultValue"
and "unspecified"
. Additionally, in actual testing, specifying 0 worked without issues, while 256 resulted in an error.
Based on this, I will update the documentation to reflect that 0 is a valid option, in addition to 1-255. Please let me know if you have any concerns about this approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking. Sure 0-255 is fine, if you can adjust that it is good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Please confirm. Thank you!
- name: Verify default preference | ||
ansible.builtin.assert: | ||
that: | ||
- add_nh_no_pref.is_changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason to use is_changed? could you keep consistent with the rest?
- add_nh_no_pref.is_changed | |
- add_nh_no_pref is changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your confirmation. It's my mistake. I will correct it as you pointed out. excuse me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Please confirm. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
This PR adds a new attribute,
preference
, to theaci_l3out_static_routes_nexthop
module, enabling the configuration of a preference value for next-hop IP addresses in static routes. This change addresses a common use case where routing preferences need to be explicitly set for better control over routing decisions.Changes
preference
attribute toaci_l3out_static_routes_nexthop
Notes
preference
attribute is optional. If omitted, the API will use the default value of0
.preference
value.