Comments (6)
Hey @dnaiga
When you try to replace at a leaf level. It just updates the leaf value. But when you try to replace at a container level with leaf value then it will replace whole container config, and you will be left with only leaf value.
gnmiclient.set(prefix="openconfig-system://",replace=[("openconfig-system:system/config",{"hostname":"test"})])
The above one just replaces the leaf config
gnmiclient.set(prefix="openconfig-system://",replace=[("openconfig-system:system",{"config":{"hostname":"test",}})])
But the above statement replaces everything at node level to default values and sets the hostname to test
from pygnmi.
Thanks @sai1274 for examples and explanation.
@dnaiga could you please test and confirm?
from pygnmi.
Hi Sai,
Thanks for your response, Yes the above config works for me . But i want to know more on , how can we replace the container with empty value so the config is removed from testbed.
As of now , though we don't send the any particular container in the json request (eg:openconfig-system:system), expecting the running config should be replaced with sent json request so that particular container (openconfig-system:system) which is not present in the json request is replaced (removed) from testbed.
currently which not happening , json request (openconfig-system:system) still remains on the testbed not removed .
Please let us know if anyway we can achieve it .
Thanks ,
Divya
from pygnmi.
Hey @dnaiga
So your saying that
gnmiclient.set(prefix="openconfig-system://",replace=[("openconfig-system:system",{})])
is not replacing the whole configuration right?
If it's not working in ur case instead of replaces you can delete the container config itself
gnmiclient.set(prefix="openconfig-system://",delete=["openconfig-system:system"])
something like this
from pygnmi.
@dnaiga gNMI replace operation is not the same as a commit replace operation. gNMI replace only replaces the configuration under the origin you have provided, not the whole running configuration.
from pygnmi.
Thank you Sai and AscendedEntity, got it clarified taht "gNMI replace operation is not the same as a commit replace operation."
Yes able to delete the config via delete operation !!.
Thanks ,
Divya
from pygnmi.
Related Issues (20)
- Diff action not showing add related changes
- Add option to hide prefix in the diff output HOT 1
- How to send set request with proto encoding? HOT 2
- FR: Add ability to set the auth scheme for targets HOT 3
- timeout or gnmi-timeout doesn't seem to work HOT 1
- subscribe not working to Juniper device HOT 6
- nornir example for subscribe stream mode HOT 1
- Missing minimum grpcio version in requirements HOT 1
- Invalid Path error HOT 4
- Release new version HOT 2
- Issue with pygnmi not returning value for get on leaf level for presence container HOT 2
- Feature: Distribute the whl file when publishing to pypi HOT 1
- Issue with Thread Termination in gNMI Client Subscription HOT 2
- Proper certificate usage with pygnmi HOT 3
- gNMI Master Arbitration Extension HOT 2
- pygnmi/pygnmic no longer working with Cisco IOS-XR 7.10.2 unified-model HOT 4
- Didn't find any infrastructure support to do master arbitration for performing Set operation HOT 1
- Support for "origin" field
- Create a new release HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygnmi.