[FeG][Orc8r] Add charging characteristics filter for Virtual APN#4164
Merged
themarwhal merged 1 commit intomagma:masterfrom Dec 24, 2020
Merged
[FeG][Orc8r] Add charging characteristics filter for Virtual APN#4164themarwhal merged 1 commit intomagma:masterfrom
themarwhal merged 1 commit intomagma:masterfrom
Conversation
a31f2f4 to
987d42d
Compare
uri200
approved these changes
Dec 23, 2020
| } | ||
| virtualApnConfigs = append(virtualApnConfigs, apnRule) | ||
| log.Printf("Virtual APN Rule Activated filter: %s, Overwrite: %s", virtualApnlCfg.GetApnFilter(), virtualApnlCfg.GetApnOverwrite()) | ||
| glog.Infof("Virtual APN Rule Activated filter: %s, Overwrite: %s", pVirtualApnCfg.GetApnFilter(), pVirtualApnCfg.GetApnOverwrite()) |
Contributor
There was a problem hiding this comment.
not sure if GenerateVirtualApnRules is triggered per each request or just at init. But if this is per request, then we should be setting this as V(2)
Member
Author
There was a problem hiding this comment.
This is done everytime the service starts. So Info is probably OK. :)
987d42d to
29133bd
Compare
hcgatewood
approved these changes
Dec 24, 2020
| } | ||
|
|
||
| message VirtualApnRule { | ||
| // Regex to match APN values |
Contributor
There was a problem hiding this comment.
Here and elsewhere -- prefer golang-style doc comments, i.e. start the comment with // apn_filter is a regex ...
| TgppContext tgpp_ctx = 15; | ||
| CommonSessionContext common_context = 16; | ||
| RatSpecificContext rat_specific_context = 17; | ||
| string charging_characteristics = 18; |
Contributor
There was a problem hiding this comment.
Not for this PR but: the lack of doc comments in this proto file is a bit sad 😥
| } | ||
|
|
||
| // getAPNfromConfig returns a new apn value to overwrite the one in the request based on list of regex definied in Gx config. | ||
| // getAPNFromConfig returns a new apn value to overwrite the one in the request based on list of regex definied in Gx config. |
Contributor
There was a problem hiding this comment.
Golang convention (in Magma codebase and in stdlib) is to wrap comments to 79 chars
Signed-off-by: Marie Bremner <[email protected]>
29133bd to
9519d01
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Marie Bremner [email protected]
Summary
Our current VirtualAPN config is the following:
where SessionProxy replaces any APNs that match the APNFilter (RegEx) with the ApnOverwrite value.
This is not sufficient as we want to be able to also case on the charging characteristics as well.
The goal of this issue is to extend this configuration to include a
ChargingCharacteristicsFilter(RegEx) to also case on the incoming session context.The new logic will be: any session with APN that satisfies
ApnFilterand Charging Characteristics that satisfiesChargingCharacteristicsFilterwill have its APN replaced withApnOverwrite.NEW
Test Plan
FeG precommit, Orc8r precommit
Local Orc8r API testing
Some hacky testing with the CWF integ test setup to test CCR creations from a static gateway.mconfig
Additional Information