Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[generic_config_updater] Logging (#1864)
#### What I did Add some logs to generic_updater #### How I did it #### How to verify it #### Previous command output (if the output of a command-line utility has changed) #### New command output (if the output of a command-line utility has changed) Empty patch ``` admin@vlab-01:~$ sudo config apply-patch empty.json-patch Patch Applier: Patch application starting. Patch Applier: Patch: [] Patch Applier: Validating patch is not making changes to tables without YANG models. Patch Applier: Getting current config db. Patch Applier: Simulating the target full config after applying the patch. Patch Applier: Validating target config according to YANG models. ... [logs from sonic-yang-mgmt framework] Patch Applier: Sorting patch updates. Patch Applier: The patch was sorted into 0 changes. Patch Applier: Applying changes in order. Patch Applier: Verifying patch updates are reflected on ConfigDB. Patch Applier: Patch application completed. Patch applied successfully. admin@vlab-01:~$ ``` Single change patch ``` admin@vlab-01:~$ sudo config apply-patch dhcp_add.json-patch Patch Applier: Patch application starting. Patch Applier: Patch: [{"op": "add", "path": "/VLAN/Vlan1000/dhcp_servers/4", "value": "192.0.0.5"}] Patch Applier: Validating patch is not making changes to tables without YANG models. Patch Applier: Getting current config db. Patch Applier: Simulating the target full config after applying the patch. Patch Applier: Validating target config according to YANG models. ... [logs from sonic-yang-mgmt framework] Patch Applier: The patch was sorted into 1 change: Patch Applier: * [{"op": "add", "path": "/VLAN/Vlan1000/dhcp_servers/4", "value": "192.0.0.5"}] Patch Applier: Applying changes in order. Failed to apply patch Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH Try "config apply-patch -h" for help. Error: ChangeApplier.apply(change) is not implemented yet admin@vlab-01:~$ ``` Multi change patch: ``` admin@vlab-01:~$ sudo config apply-patch update_lanes.json-patch Patch Applier: Patch application starting. Patch Applier: Patch: [{"op": "replace", "path": "/PORT/Ethernet100/lanes", "value": "121,122,123"}] Patch Applier: Validating patch is not making changes to tables without YANG models. Patch Applier: Getting current config db. Patch Applier: Simulating the target full config after applying the patch. Patch Applier: Validating target config according to YANG models. ... [logs from sonic-yang-mgmt framework] Patch Applier: Sorting patch updates. ... [logs from sonic-yang-mgmt framework] Patch Applier: The patch was sorted into 2 changes: Patch Applier: * [{"op": "remove", "path": "/PORT/Ethernet100"}] Patch Applier: * [{"op": "add", "path": "/PORT/Ethernet100", "value": {"alias": "fortyGigE0/100", "description": "fortyGigE0/100", "index": "25", "lanes": "121,122,123", "mtu": "9100", "pfc_asym": "off", "speed": "40000", "tpid": "0x8100"}}] Patch Applier: Applying changes in order. Failed to apply patch Usage: config apply-patch [OPTIONS] PATCH_FILE_PATH Try "config apply-patch -h" for help. Error: ChangeApplier.apply(change) is not implemented yet admin@vlab-01:~$ ```
- Loading branch information