Comments (1)
After analyzing the current code-base such pinning of the VRF key won't be possible without changing the current implementation of ref_key
processing.
The proposal in this issue is to allow to use multi ref_keys like that:
"$*$.peers.$*$.*.*.[accepted_prefixes,received_prefixes,sent_prefixes]"
|-------------^
One for vrf
one for peer IPs, but look where the peers key is pinned ... and yes this is a very intuitive way IMO.
However when you look at our unittest, for the same data structure when we want to assign the ref_key
for peer IPs it's currently done like that:
"global.$peers$.*.*.ipv4.[accepted_prefixes,received_prefixes,sent_prefixes]"
|-----------^
Which returns this data:
[{'10.1.0.0': {'accepted_prefixes': 1000,
'received_prefixes': 1000,
'sent_prefixes': 1000}},
{'10.2.0.0': {'accepted_prefixes': 1000,
'received_prefixes': 1000,
'sent_prefixes': 1000}},
{'10.64.207.255': {'accepted_prefixes': 1000,
'received_prefixes': 1000,
'sent_prefixes': 1000}},
{'7.7.7.7': {'accepted_prefixes': 1000,
'received_prefixes': 1000,
'sent_prefixes': 1000}}]
Conclusion:
Current implementation to pin the ref_key
for peer IPs expects that the $$
markers are used on the preceding key/path element "peers"
and not on the exact key location, like proposed in this issue.
If you look at vrf
in this case global
, that's the first key in the data structure and there is no preceding key to pin it.
To implement multi-ref_key support we need to change the current behavior.
The process would look like this:
- re-implement
ref_key
processing to stick to the element which in fact needs to be pinned. - update
ref_key
s in unittests, output data should not change, only theref_key
markers will be moved right.
from jdiff.
Related Issues (20)
- Create test for Check Type Assertion
- Refine `validate` method for existing checks HOT 1
- Move regex`regex` to `params` for consistency HOT 4
- Write test for each `validate` method HOT 2
- Implement typing for all methods/classes/functions
- Update README.md HOT 1
- Reference key get overwritten by hardcoded default key. HOT 4
- Parameter Match does not return correct result HOT 1
- To have `jmspath` arg mandatory HOT 4
- Strip inner `bool` from `operator` check result
- Update README.md as per OSRB request HOT 1
- Code review feedback HOT 15
- Update operator logic `gt` and `lt` to `gte` and `lte`
- Fix `mypy` errors HOT 1
- `get_value` method raises exception for JMESPath expression with no results HOT 4
- Rename lib in jdiff
- Add `all_same` argument for operator check. HOT 1
- jdiff not ble to catch reference key in dict of dicts HOT 5
- Single value not supported in expression HOT 2
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 jdiff.