Open bpchoi opened 1 year ago
@bpchoi How would you see deletion to work with a cli origin? The semantics of deletion should be part of the cli command. There is not much sense into using a gNMI Set delete for that.
Hi Karim, In case of Juniper, would you check the following doc if it makes any sense? https://www.juniper.net/documentation/us/en/software/junos/junos-xml-protocol/topics/task/junos-xml-protocol-configuration-data-elements-deleting.html Thanks, Phil
As noted above, gnmi specification doesn't define delete operations with CLI origin.
I understand there is no gnmi spec, but I see Get operation works with cli origin path in somehow. I think if it would make the utility complete and useful if it support delete cli instead of using Replace operation with bulk of cli config as the workaround.
For reference,
gnmic -a sup-tb3-geodc3-4-scapa1:50051 -u regress -p MaRtInI --insecure --timeout 120s get --encoding ascii --path "cli:/chassis/aggregated-devices/ethernet" --log --debug 2023/05/18 15:18:12.608762 /home/runner/work/gnmic/gnmic/app/app.go:216: [gnmic] version=0.30.0, commit=0acd332, date=2023-04-18T17:56:21Z, gitURL=https://github.com/openconfig/gnmic, docs=https://gnmic.openconfig.net 2023/05/18 15:18:12.608819 /home/runner/work/gnmic/gnmic/app/app.go:221: [gnmic] using config file "" 2023/05/18 15:18:12.610768 /home/runner/work/gnmic/gnmic/app/app.go:259: [gnmic] set flags/config: address:
- sup-tb3-geodc3-4-scapa1:50051 api: "" capabilities-version: false cluster-name: default-cluster config: "" debug: true diff-compare: [] diff-model: [] diff-path: [] diff-prefix: "" diff-qos: "0" diff-ref: "" diff-set-to-notifs-full: false diff-set-to-notifs-response: "" diff-set-to-notifs-setrequest: "" diff-setrequest-full: false diff-setrequest-new: "" diff-setrequest-ref: "" diff-sub: false diff-target: "" diff-type: ALL dir: [] encoding: ascii exclude: [] file: [] format: "" generate-camel-case: false generate-config-only: false generate-path: "" generate-snake-case: false get-model: [] get-path:
- cli:/chassis/aggregated-devices/ethernet get-prefix: "" get-processor: [] get-target: "" get-type: ALL get-values-only: false getset-condition: any([true]) getset-delete: "" getset-get: "" getset-model: [] getset-prefix: "" getset-replace: "" getset-target: "" getset-type: ALL getset-update: "" getset-value: "" gzip: false insecure: true instance-name: "" listen-max-concurrent-streams: "256" listen-prometheus-address: "" log: true log-file: "" log-tls-secret: false max-msg-size: 536870912 no-prefix: false password: MaRtInI path-config-only: false path-descr: false path-path-type: xpath path-search: false path-state-only: false path-types: false path-with-non-leaves: false path-with-prefix: false port: "57400" print-request: false prompt-description-bg-color: dark_gray prompt-description-with-prefix: false prompt-description-with-types: false prompt-max-suggestions: "10" prompt-prefix-color: dark_blue prompt-suggest-all-flags: false prompt-suggest-with-origin: false prompt-suggestions-bg-color: dark_blue proto-dir: [] proto-file: [] proxy-from-env: false retry: 10s set-delete: [] set-delimiter: ':::' set-dry-run: false set-prefix: "" set-replace: [] set-replace-cli: [] set-replace-cli-file: "" set-replace-file: [] set-replace-path: [] set-replace-value: [] set-request-file: [] set-request-replace: [] set-request-update: [] set-request-vars: "" set-target: "" set-update: [] set-update-cli: [] set-update-cli-file: "" set-update-file: [] set-update-path: [] set-update-value: [] skip-verify: false subscribe-backoff: 0s subscribe-heartbeat-interval: 0s subscribe-history-end: "" subscribe-history-snapshot: "" subscribe-history-start: "" subscribe-lock-retry: 5s subscribe-mode: stream subscribe-model: [] subscribe-name: [] subscribe-output: [] subscribe-path: [] subscribe-prefix: "" subscribe-qos: "0" subscribe-quiet: false subscribe-sample-interval: 0s subscribe-set-target: false subscribe-stream-mode: target-defined subscribe-suppress-redundant: false subscribe-target: "" subscribe-updates-only: false subscribe-watch-config: false targets-file: "" timeout: 2m0s tls-ca: "" tls-cert: "" tls-key: "" tls-max-version: "" tls-min-version: "" tls-version: "" token: "" upgrade-use-pkg: false use-tunnel-server: false username: regress
2023/05/18 15:18:12.611284 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] address='[sup-tb3-geodc3-4-scapa1:50051]'([]string)
2023/05/18 15:18:12.611313 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] debug='true'(bool)
2023/05/18 15:18:12.611360 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] encoding='ascii'(string)
2023/05/18 15:18:12.611402 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] get-path='[cli:/chassis/aggregated-devices/ethernet]'([]string)
2023/05/18 15:18:12.611451 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] insecure='true'(bool)
2023/05/18 15:18:12.611471 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] log='true'(bool)
2023/05/18 15:18:12.611492 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] password='MaRtInI'(string)
2023/05/18 15:18:12.611639 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] timeout='2m0s'(string)
2023/05/18 15:18:12.611669 /home/runner/work/gnmic/gnmic/app/app.go:269: [gnmic] username='regress'(string)
2023/05/18 15:18:12.611742 /home/runner/work/gnmic/gnmic/config/config.go:374: [config] cmd=get, flagName=help, changed=false, isSetInFile=false
2023/05/18 15:18:12.611781 /home/runner/work/gnmic/gnmic/config/config.go:374: [config] cmd=get, flagName=model, changed=false, isSetInFile=false
2023/05/18 15:18:12.611802 /home/runner/work/gnmic/gnmic/config/config.go:374: [config] cmd=get, flagName=path, changed=true, isSetInFile=true
2023/05/18 15:18:12.611817 /home/runner/work/gnmic/gnmic/config/config.go:374: [config] cmd=get, flagName=prefix, changed=false, isSetInFile=false
2023/05/18 15:18:12.611833 /home/runner/work/gnmic/gnmic/config/config.go:374: [config] cmd=get, flagName=processor, changed=false, isSetInFile=false
2023/05/18 15:18:12.611849 /home/runner/work/gnmic/gnmic/config/config.go:374: [config] cmd=get, flagName=target, changed=false, isSetInFile=false
2023/05/18 15:18:12.611866 /home/runner/work/gnmic/gnmic/config/config.go:374: [config] cmd=get, flagName=type, changed=false, isSetInFile=false
2023/05/18 15:18:12.611882 /home/runner/work/gnmic/gnmic/config/config.go:374: [config] cmd=get, flagName=values-only, changed=false, isSetInFile=false
2023/05/18 15:18:12.612108 /home/runner/work/gnmic/gnmic/config/targets.go:45: [config] targets: map[sup-tb3-geodc3-4-scapa1:50051:{"name":"sup-tb3-geodc3-4-scapa1:50051","address":"sup-tb3-geodc3-4-scapa1:50051","username":"regress","password":"****","timeout":120000000000,"insecure":true,"skip-verify":false,"buffer-size":100,"retry-timer":10000000000,"log-tls-secret":false,"gzip":false,"token":""}]
2023/05/18 15:18:12.612140 /home/runner/work/gnmic/gnmic/config/actions.go:49: [config] actions: map[]
2023/05/18 15:18:12.612159 /home/runner/work/gnmic/gnmic/config/processors.go:45: [config] processors: map[]
2023/05/18 15:18:12.612819 /home/runner/work/gnmic/gnmic/app/get.go:125: [gnmic] sending gNMI GetRequest: prefix='
chassis aggregated-devices ethernet text juniper ]]>]]>
May 18 15:18:12 [NETCONF] - [13047] Outgoing:
This issue is stale because it has been open for 12 months with no activity.
Hi,
I'm trying to find a way to use delete operation for CLI origin, but couldn't find. Would you advise how gnmic can do delete operation for CLI origin?
Thanks in advance, Phil