-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sy Protocol Implementation #57
base: master
Are you sure you want to change the base?
Conversation
+ jdiameter-api/sy interfaces
+ jdiameter-api/sy interfaces
+ jdiameter-parent/examples/resources/dictionary.xml + defined OC-Supported-Features codes + added AVP definitions
+ jdiameter-parent/examples/resources/dictionary.xml + defined OC-Supported-Features codes + added AVP definitions
+ jdiameter-parent/examples/resources/dictionary.xml + fixed OC-Supported-Features codes + added AVP definitions for Sy + added DRMP
+ jdiameter-parent/examples/resources/dictionary.xml + fixed OC-Supported-Features codes + added AVP definitions for Sy + added DRMP
Related to issue #44 |
Thanks @aferreiraguido ! @brainslog @FerUy can you review ? |
Hi @deruelle, work is not finished yet, right @aferreiraguido ? |
actually not. there was added api interfaces and AVP definitions to dictionary.xml.- Yet to be implemented is Common, Client and Server java code. |
Understood. Thanks for the feedback @aferreiraguido |
Please see this is not a request for a merge, the Sy implementation is missing, I thought this pull will allow @brainslog to review the work done until now, as I need some feedback to be sure about the implementation on Server, Client and Common classes as well. |
@@ -0,0 +1,78 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use TeleStax only license for new files:
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2016, Telestax Inc and individual contributors
* by the @authors tag.
*
* This program is free software: you can redistribute it and/or modify
* under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
import org.jdiameter.api.app.StateMachine; | ||
|
||
import org.jdiameter.api.sy.events.SpendingLimitRequest; | ||
import org.jdiameter.api.sy.events.SpendingTerminationRequest; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class doesn't seem to be present in the commits..
void sendIntermediateSpendingLimitReportRequest(SpendingLimitRequest request) | ||
throws InternalException, IllegalDiameterStateException, RouteException, OverloadException; | ||
|
||
void sendFinalSpendingLimitReportRequest(SpendingTerminationRequest request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a different event type for the Termination ? Why can't we just use the generic SpendingLimitRequest
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nop, you're right. I will reuse org.jdiameter.api.auth.events.SessionTermRequest on method sendFinalSpendingLimitRequest(), as this is not a SpendingLimitRequest but a termination session request.
void sendFinalSpendingLimitReportRequest(SpendingTerminationRequest request) | ||
throws InternalException, IllegalDiameterStateException, RouteException, OverloadException; | ||
|
||
void sendSpendingLimitReportAnswer(SpendingNotificationAnswer answer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this method be sendSpendingStatusNotificationAnswer
?
Also, the event class name should also be SpendingStatusNotificationAnswer
instead of SpendingNotificationAnswer
, IMO, to be according with the spec message name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, my fault.
import org.jdiameter.api.sy.events.SpendingLimitRequest; | ||
import org.jdiameter.api.sy.events.SpendingLimitAnswer; | ||
import org.jdiameter.api.sy.events.SpendingTerminationRequest; | ||
import org.jdiameter.api.sy.events.SpendingTerminationAnswer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
void doIntermediateSpendingLimitReportAnswer(ClientSySession session, SpendingLimitRequest request, SpendingLimitAnswer answer) | ||
throws InternalException, IllegalDiameterStateException, RouteException, OverloadException; | ||
|
||
void doFinalSpendingLimitReportAnswer(ClientSySession session, SpendingTerminationRequest request, SpendingTerminationAnswer answer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above, regarding using generic SpendingLimitRequest
/SpendingLimitAnswer
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noted and fixed as well.
void doFinalSpendingLimitReportAnswer(ClientSySession session, SpendingTerminationRequest request, SpendingTerminationAnswer answer) | ||
throws InternalException, IllegalDiameterStateException, RouteException, OverloadException; | ||
|
||
void doSpendingLimitReportRequest(ClientSySession session, SpendingNotificationAnswer answer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void doSpendingLimitReportRequest(ClientSySession session, SpendingStatusNotificationRequest request)
?
- method name should be
doSpendingLimitReportRequest
; - 2nd parameter should be a Request and not an Answer;
- event name should be
SpendingStatusNotificationRequest
;
Right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my fault, should be doSpendingStatusNotificationRequest()
void sendSpendingLimitReportRequest(SpendingNotificationRequest request) | ||
throws InternalException, IllegalDiameterStateException, RouteException, OverloadException; | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments as in Client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes fixed
*/ | ||
public interface ClientSySession extends AppSession, StateMachine { | ||
|
||
void sendInitialSpendingLimitReportRequest(SpendingLimitRequest request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the method name should not follow the event name, ie sendInitialSpendingLimitRequest
.. I see that the spec often refers to it as you've used:
(...) uses the Initial Spending Limit Report Request procedure.
(...) trigger the PCRF sending the Initial/Intermediate/Final Spending Limit Report Request to the OCS (...)
WDYT ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right! INITIAL and INTERMEDIATE comes in AVP.SL-Request-Type
*/ | ||
public interface ServerSySessionListener { | ||
|
||
void doInitialSpendingLimitReportRequest(ClientSySession session, SpendingLimitRequest request, SpendingLimitAnswer answer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do*Request
methods only take the Request
object as parameter, since those are the methods that will handle a received request, where we'll have no answer yet.
void doFinalSpendingLimitReportRequest(ClientSySession session, SpendingTerminationRequest request, SpendingTerminationAnswer answer) | ||
throws InternalException, IllegalDiameterStateException, RouteException, OverloadException; | ||
|
||
void doSpendingLimitReportAnswer(ClientSySession session, SpendingNotificationAnswer answer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. and do*Answer
methods take the Request
and Answer
objects as parameters, as we have both at this time and can pass them to the listener.
void doSpendingLimitReportAnswer(ClientSySession session, SpendingNotificationAnswer answer) | ||
throws InternalException, IllegalDiameterStateException, RouteException, OverloadException; | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- same comments as in Client.
@@ -0,0 +1,62 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,62 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -67,6 +67,16 @@ | |||
<filtering>true</filtering> | |||
</resource> | |||
</resources> | |||
<plugins> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't enforce this here, we have added similar @ https://github.com/RestComm/jdiameter/blob/master/pom.xml#L194-L201
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oks
@@ -7616,4 +7615,199 @@ | |||
|
|||
<!-- ************************ END 3GPP S13/S13' AVPS ******************* --> | |||
|
|||
<!-- ***************************** 3GPP Sy AVPS ************************ --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be modified in all the instances of the dictionary.xml
file, I understand it's not worth to propagate while not finished, but we should not forget about it. Main file is https://github.com/RestComm/jdiameter/blob/master/core/mux/common/config/dictionary.xml
@aferreiraguido, good job so far! Thanks for the hard work. I have made some inline comments in the changes, please review them and let me know your thoughts and/or fix where applicable. |
Hi @aferreiraguido! Sorry for the late review, but here are some of my notes. I thought about doing them inline, but I think it's easier to follow on a single comment, let me know if you have any doubts regarding what I am referring to!
Overall it looks like this is still unfinished work, are you still open to finish this work ? I will be more active now on Diameter and able to provide feedback and help you quicker. |
No description provided.