Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[yang-models] Validating 'services' exist if ACL type is 'CTRLPLANE' (#…
…9295) #### Why I did it Fixing issue #9294 #### How I did it Updating ACL yang model #### How to verify it Validating issue with `config patch-apply` is fixed. - Start a KVM - Add file `add-ctrl-plane-tbl.json-patch ` with content: ```json [ { "op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": { "policy_desc": "ACTRLPLANETABLE", "services": [ "SSH" ], "stage": "ingress", "type": "CTRLPLANE" } } ] ``` - Run `sudo config apply-patch add-ctrl-plane-tbl.json-patch` Before: ``` Patch Applier: The patch was sorted into 4 changes: Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": {"type": "CTRLPLANE"}}] Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/policy_desc", "value": "ACTRLPLANETABLE"}] Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/services", "value": ["SSH"]}] Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE/stage", "value": "ingress"}] ``` After: ``` Patch Applier: The patch was sorted into 1 change: Patch Applier: * [{"op": "add", "path": "/ACL_TABLE/ACTRLPLANETABLE", "value": {"policy_desc": "ACTRLPLANETABLE", "services": ["SSH"], "stage": "ingress", "type": "CTRLPLANE"}}] ``` #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> #### A picture of a cute animal (not mandatory but encouraged)
- Loading branch information