Sy Protocol Implementation#57
Sy Protocol Implementation#57aferreiraguido wants to merge 17 commits intoRestComm:masterfrom aferreiraguido:master
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.
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/>
*/
| 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.
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.
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.
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.
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.
| 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; |
| 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.
Same comment as above, regarding using generic SpendingLimitRequest/SpendingLimitAnswer.
There was a problem hiding this comment.
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.
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.
my fault, should be doSpendingStatusNotificationRequest()
| void sendSpendingLimitReportRequest(SpendingNotificationRequest request) | ||
| throws InternalException, IllegalDiameterStateException, RouteException, OverloadException; | ||
|
|
||
| } |
There was a problem hiding this comment.
Same comments as in Client.
| */ | ||
| public interface ClientSySession extends AppSession, StateMachine { | ||
|
|
||
| void sendInitialSpendingLimitReportRequest(SpendingLimitRequest request) |
There was a problem hiding this comment.
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.
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.
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.
.. 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; | ||
|
|
||
| } No newline at end of file |
There was a problem hiding this comment.
- same comments as in Client.
| @@ -0,0 +1,62 @@ | |||
| /* | |||
There was a problem hiding this comment.
| @@ -0,0 +1,62 @@ | |||
| /* | |||
There was a problem hiding this comment.
| <filtering>true</filtering> | ||
| </resource> | ||
| </resources> | ||
| <plugins> |
There was a problem hiding this comment.
Please don't enforce this here, we have added similar @ https://github.com/RestComm/jdiameter/blob/master/pom.xml#L194-L201
|
|
||
| <!-- ************************ END 3GPP S13/S13' AVPS ******************* --> | ||
|
|
||
| <!-- ***************************** 3GPP Sy AVPS ************************ --> |
There was a problem hiding this comment.
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.