Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

dev: support AppRoute policy #836

Merged
merged 7 commits into from
Oct 10, 2024
Merged

dev: support AppRoute policy #836

merged 7 commits into from
Oct 10, 2024

Conversation

sbasan
Copy link
Contributor

@sbasan sbasan commented Oct 7, 2024

Pull Request summary:

  • add: API support for appRoute policy definition
  • fix: traffic-policy parcel dscp match field
  • add: missing builder methods for traffic-policy actions

Checklist:

  • Make sure to run pre-commit before committing changes
  • Make sure all checks have passed
  • PR description is clear and comprehensive
  • Mentioned the issue that this PR solves (if applicable)
  • Make sure you test the changes

@sbasan sbasan changed the title draft: model dev: support AppRoute policy Oct 7, 2024
@sbasan sbasan marked this pull request as ready for review October 9, 2024 15:49
@sbasan sbasan requested a review from jpkrajewski October 9, 2024 15:57
preferred_color_group: Optional[UUID] = None,
) -> None:
if preferred_color is not None:
action = SlaClassAction().from_params(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
action = SlaClassAction().from_params(
action = SlaClassAction.from_params(

Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: from_params is static method

Comment on lines 1054 to 1059
if not_met_action is not None:
action.parameter.append(SlaNotMet(field=not_met_action))
if preferred_color is not None:
action.parameter.append(SlaPreferredColor(value=preferred_color))
if preferred_color_group is not None:
action.parameter.append(SlaPreferredColorGroup(ref=preferred_color_group))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if not_met_action is not None:
action.parameter.append(SlaNotMet(field=not_met_action))
if preferred_color is not None:
action.parameter.append(SlaPreferredColor(value=preferred_color))
if preferred_color_group is not None:
action.parameter.append(SlaPreferredColorGroup(ref=preferred_color_group))
if not_met_action:
action.parameter.append(SlaNotMet(field=not_met_action))
if preferred_color:
action.parameter.append(SlaPreferredColor(value=preferred_color))
if preferred_color_group:
action.parameter.append(SlaPreferredColorGroup(ref=preferred_color_group))

Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: Can just check for truthiness

@sbasan sbasan merged commit b827534 into dev Oct 10, 2024
11 checks passed
@sbasan sbasan deleted the fr/approute branch October 10, 2024 10:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants