Victor Seva
51a8be0b69
MT#12025 code refactoring with luacheck help
...
- don't leak globals, libs should return metatable
- fix requires
- remove unnecessary declarations of variables
- split mocks/sr
- remove unused tests
- fix tests
Change-Id: I2bda46410cf62c61c38ce1a9bf4b96f1a7a961bc
10 years ago
Victor Seva
7a52fc6ad5
MT#12025 clean luacheck error
...
Change-Id: I247be4018189e393c1a8d7ee9fa7b455cc38f1a7
10 years ago
Victor Seva
6f8b67f4d5
MT#9067 use one MySQL connection only on NGCP
...
Don't close the connection, just the cursor.
We may need a ping function to test the connection.
https://github.com/keplerproject/luasql/pull/12
11 years ago
Victor Seva
12a5e3c6fb
replace uuid parameter for domain. This was confusing.
12 years ago
Victor Seva
97e9453a69
Added copyright in all lua. Removed unused script.
12 years ago
Victor Seva
e6439d5a18
Fixing default prefs.
...
default dict has only peer, dom and usr keys.
You should check for a default on real level always. It is always
created even if you load only dom prefs.
12 years ago
Victor Seva
0abf856f7d
Remove creation of avps. Fix default creation.
12 years ago
Victor Seva
9a3a80834a
Added __tostring() properly to ngcp, xavp and prefs
13 years ago
Victor Seva
4acb0d5131
Initializate dummy vars just in the creation.
...
On clear... create them.
13 years ago
Victor Seva
0cb72f63e7
Return empty table instead of error if load is called with empty params
13 years ago
Victor Seva
4101e6ada0
Test empty parameters on load.
13 years ago
Victor Seva
a3908d5456
No index
13 years ago
Victor Seva
8c747edaec
Call NGCPXAvp:new from load even if result is empty
13 years ago
Victor Seva
c735d1692e
Fix clean. Test it.
13 years ago
Victor Seva
d93e7d2a04
return keys when in load functions.
...
Don't use internal key for xavp
13 years ago
Victor Seva
52e55ef7a0
Use new API.
...
Fix tests.
13 years ago
Victor Seva
73f44636e9
Using new API.
...
Fix dp tests.
13 years ago
Victor Seva
d10eb3a14b
Fixed load preferences from DDBB.
...
Added logging.
Fixed test
13 years ago
Victor Seva
b99b5803c3
Fetch is wrong. WIP
13 years ago
Victor Seva
a93fc95c37
Added log for NGCPDomainPrefs, NGCP
...
Fix lemock use on test for NGCPDomainPrefs
13 years ago
Victor Seva
86ff015f82
using xavps.
...
using lemock the right way
13 years ago
Victor Seva
4f4f571709
- Added lemock library ( Debian package needed )
...
- Added Mock for kamailio sr module
- Added NGCP, NGCPPrefs, NGCPConfig, NGCPPeerPrefs and NGCPDomainPref classes.
This is just a playground to figure out how can we organize the code. WIP
13 years ago