fix(pipelined): Use correct ip-addr value to get hash entry#7526
fix(pipelined): Use correct ip-addr value to get hash entry#7526pshelar merged 1 commit intomagma:masterfrom
Conversation
|
Thanks for opening a PR! 💯 Please note that all commits must be signed off. This is enforced by the Howto
More infoPlease take a moment to read through the Magma project's
If this is your first Magma PR, also consider reading
|
Codecov Report
@@ Coverage Diff @@
## master #7526 +/- ##
===========================================
+ Coverage 34.02% 64.43% +30.41%
===========================================
Files 1132 680 -452
Lines 99654 47024 -52630
Branches 1307 1323 +16
===========================================
- Hits 33908 30301 -3607
+ Misses 62404 13267 -49137
- Partials 3342 3456 +114
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| encoded_imsi = encode_imsi(imsi) | ||
| if ip_addr is None or ip_addr.address is None: | ||
| ip_addr_str = "" | ||
| ip_addr_str = None |
There was a problem hiding this comment.
Can you keep it "", when saving I used the empty str (helps with cwf compat)
Signed-off-by: Pravin B Shelar <[email protected]>
3f76e5f to
f6b0bfa
Compare
| _, imsi, ip_addr_str, _ = SubscriberRuleKey(*json.loads(k)) | ||
| if imsi == encoded_imsi and ip_addr_str == ip_addr_str: | ||
| _, cur_imsi, cur_ip_addr_str, _ = SubscriberRuleKey(*json.loads(k)) | ||
| if cur_imsi == encoded_imsi and (ip_addr_str == "" or |
There was a problem hiding this comment.
I think its better to do cur_imsi == encoded_imsi and ip_addr_str== cur_ip_addr_str (we don't want this check to pass when ip_addr_str is "" but cur_ip_addr_str is some ip addr)
There was a problem hiding this comment.
this function needs to update version for all rules for given IMSI when IP address is not specified.
if the ip_addr_str == "" match is dropped it would not match any rule with valid IP address. Am I missing something?
There was a problem hiding this comment.
it updates all version when rule_id is not given/ip address is assumed to be available
Signed-off-by: Pravin B Shelar <[email protected]>
Signed-off-by: Pravin B Shelar <[email protected]>
Signed-off-by: Pravin B Shelar <[email protected]> Signed-off-by: Ramon Melero <[email protected]>
Signed-off-by: Pravin B Shelar <[email protected]>
Signed-off-by: Pravin B Shelar <[email protected]>
Signed-off-by: Pravin B Shelar [email protected]
Summary
Test Plan
make testAdditional Information