Commit Graph
100 Commits
Author SHA1 Message Date
Zaid Abdulla ac9cb818ae Update .gitignore and .npmignore 2017-03-08 01:38:25 -08:00
Zaid Abdulla acaebc729c Recognize _instance DB field from v1.0 2017-03-07 21:39:42 -08:00
Zaid Abdulla 9199691903 Add sample extension 2017-03-07 15:33:45 -08:00
Zaid Abdulla 21816ed8ef Fix duplicate logs from scripts when ext is used 2017-03-07 15:08:23 -08:00
Zaid Abdulla 38e83d8544 Rename some config options
Original names are still supported for compatibility.
2017-03-07 11:38:56 -08:00
Zaid Abdulla 848894d3e3 Fix sneaky bug causing declaration leakage
Resolves: #211
2017-03-04 06:03:38 -08:00
Zaid Abdulla 0788b93350 Simplify implementation of auth header parsing 2017-03-04 01:38:32 -08:00
Zaid Abdulla ab26ff2058 Fix a few digest authentication issues
Resolves: #181
2017-03-02 13:01:17 -08:00
Zaid Abdulla d06d59e342 Fix regression bug in sandbox 2017-03-02 12:56:25 -08:00
Zaid Abdulla a9c8bbe21b Fix crash if invalid UDPConnectionRequestAddress 2017-02-26 17:11:10 -08:00
Zaid Abdulla cf01cce443 Fix bug when calling commit before declare 2017-02-26 15:18:17 -08:00
Zaid Abdulla c435a5e8db Add logging function for scripts 2017-02-26 15:13:00 -08:00
Zaid Abdulla d92ca4c2bf Pass sessionContext to sandbox 2017-02-26 05:34:18 -08:00
Zaid Abdulla 59d412155b Unify currentRequest and sessionData structures 2017-02-25 16:24:53 -08:00
Zaid Abdulla bdcb856655 Validate scripts before saving 2017-02-22 16:50:21 -08:00
Zaid Abdulla b342cfd159 Fix linking sessions to sockets when using SSL 2017-02-22 04:22:26 -08:00
Zaid Abdulla 5aec919a4e Worker count defaults to CPU core count 2017-02-19 15:06:49 -08:00
Zaid Abdulla 0097a75cab Better logging
Separated log streams for access log (defaults to stdout) and general
log (defaults to stderr). Added support for writing logs to a file.
Improved formatting and added support for JSON formatted logs.
2017-02-19 10:22:50 -08:00
Zaid Abdulla 8a33d6934a Avoid "Unsupported let compound assignment"
This Crankshift bailout reason prevents optimizing add() function.
2017-02-17 01:02:37 -08:00
Zaid Abdulla 2d66da7e9b Remove deprecated MongoClient connection options 2017-02-15 12:01:42 -08:00
Zaid Abdulla 3223e9733a Optimize PathSet for V8
PathSet.find has been rewritten without using ES6 generators in order
to avoid V8's TurboFan/Crankshift optimization bailout.
2017-02-15 02:19:02 -08:00
Zaid Abdulla a48984b909 Remove old data migration tool 2017-02-12 13:13:44 -08:00
Zaid Abdulla d2d1ab0a0d Silently ignore unrecognized TransferComplete 2017-02-12 12:03:25 -08:00
Zaid Abdulla 396a687fa2 Data model dump tool for genieacs-sim 2017-02-12 11:53:56 -08:00
Zaid Abdulla 1e9aff2fdc Remove simulator code
It's now a separate project: https://github.com/zaidka/genieacs-sim
2017-02-12 11:49:16 -08:00
Zaid Abdulla 595c318720 Configurable connection request timeout 2017-02-12 02:37:00 -08:00
Zaid Abdulla 8e34c6a2f6 Support using a callback in auth.js config file 2017-02-12 02:34:55 -08:00
Zaid Abdulla 340016813c Implicit timestamp when declare()ing values 2017-01-30 07:35:48 -08:00
Zaid Abdulla e2fb00c38a Fix bug in passing provision arguments 2017-01-30 07:33:17 -08:00
Zaid Abdulla 5a5fe0bf19 Fix bug in fetching 1_BOOT event from DB 2017-01-30 07:32:21 -08:00
Zaid Abdulla cd8d217550 Don't remove nonexisting parameters from tasks 2017-01-17 15:11:08 -08:00
Zaid Abdulla 9dd8b26d53 Fix maximum call stack size exceeded error 2017-01-17 13:13:50 -08:00
Zaid Abdulla 2e40ef8622 Better preset loop detection
The RPC and iteration counts are now reset for every cycle.
2017-01-12 23:30:27 -08:00
Zaid Abdulla 310114a500 Some fixes in tasks 2017-01-10 01:54:04 -08:00
Zaid Abdulla c940bba4a3 Trim exception stack trace in faults 2017-01-06 12:50:59 -08:00
Zaid Abdulla 12aa43c379 Better implementation for async loop control 2017-01-05 18:22:24 -08:00
Zaid Abdulla 7d30ffd176 Remove unnecessary properties in fault object 2017-01-05 17:36:20 -08:00
Zaid Abdulla 06fdca9536 Fix bug in precondition testing 2017-01-05 17:35:01 -08:00
Zaid Abdulla 133d9ebc99 A few bug fixes 2017-01-04 13:55:20 -08:00
Zaid Abdulla f00d62437f I missed a spot in the previous commit 2017-01-04 01:23:15 -08:00
Zaid Abdulla 771917a7a6 Clean up old unused code 2017-01-03 21:18:20 -08:00
Zaid Abdulla 4b5dc25010 Load distribution in refresh provision 2017-01-03 18:58:57 -08:00
Zaid Abdulla 7620628e52 New XML config options
Removed unnecessary config options and added new ones for configuring
XML output.
2017-01-03 03:18:00 -08:00
Zaid Abdulla b11ae252bf Update package.json 2017-01-02 18:36:40 -08:00
Zaid Abdulla 31ea17177b Update dependencies 2017-01-02 17:46:25 -08:00
Zaid Abdulla 7862117758 Support for UDP connection requests 2017-01-02 04:59:01 -08:00
Zaid Abdulla 4cb480dbd9 Response header for version number in API 2017-01-02 04:06:09 -08:00
Zaid Abdulla bf0cd2af72 Support for intermediate certificates in SSL 2017-01-01 17:36:42 -08:00
Zaid Abdulla d82c2bb350 Do not attempt to close server before it's up 2017-01-01 17:31:31 -08:00
Zaid Abdulla 7644d46f6b Make Math.random() deterministic in provisions
Replace Math.random() in sandbox with a seedable implementation so that
the script remains deterministic.
2017-01-01 05:50:43 -08:00
Zaid Abdulla 3e4f4b29ab Read connection request creds from parameters 2017-01-01 00:14:19 -08:00
Zaid Abdulla 33b01d68ca Support add/remove objects from presets and tasks 2016-12-29 13:04:11 -08:00
Zaid Abdulla 179211ce53 A couple of bug fixes 2016-12-28 16:21:04 -08:00
Zaid Abdulla 2ca3ec86a8 Move default provisions to a separate file
And reuse the same set of default provisions for presets and tasks.
2016-12-28 16:14:54 -08:00
Zaid Abdulla ee40a44339 Remove use of domains for error handling 2016-12-23 17:32:08 -08:00
Zaid Abdulla eb6d107b8d Fix possible maximum call stack error 2016-12-23 17:29:36 -08:00
Zaid Abdulla 63407be19b Generate faults in precondition testing stage
Also, queue applicable provisions to any existing fault in order to
be processed later.
2016-12-21 19:44:56 -08:00
Zaid Abdulla c4880b636b Fault when provisions repeat indefinitely 2016-12-10 16:01:25 -08:00
Zaid Abdulla bc1f6311a0 Better CWMP fault structure
Resolves: #78
2016-12-07 13:01:31 -08:00
Zaid Abdulla 34de9c7e7d Handle SIGINT and SIGTERM to exit gracefully 2016-12-04 19:07:03 -08:00
Zaid Abdulla 9f85ead558 Turn errors from scripts and extensions into faults 2016-12-04 19:04:22 -08:00
Zaid Abdulla 7ac94a5304 Resolve CONFIG_DIR to absolute path 2016-12-04 18:14:35 -08:00
Zaid Abdulla e0c1245062 Pass config to extensions as env vars 2016-11-30 21:52:48 -08:00
Zaid Abdulla 68798b5b12 Add missing new keyword 2016-11-30 16:38:22 -08:00
Zaid Abdulla b3a3c1c9fc Use file name as ID when uploading files in NBI 2016-11-30 16:35:27 -08:00
Zaid Abdulla 3d221afc27 Implement support for download RPC
This uses special parameters (Downloads.) to trigger file download
making it poossible to use from scripts declaratively.

Resolves: #171
2016-11-30 16:27:01 -08:00
Zaid Abdulla 5cade39ba2 Fix bug causing repeating reboot RPC 2016-11-10 15:12:22 -08:00
Zaid Abdulla f9c5272ce0 A number of fixes in sandbox and declaration processing 2016-11-10 07:07:51 -08:00
Zaid Abdulla 3b987cc0cc Avoid generating RPCs for parameters that don't exist 2016-11-07 00:31:37 -08:00
Zaid Abdulla b4bbd8f58c Simplify declare function in scripts
Using declare function is made easier by accept a single path and returning
a promise to read parameter attributes.
2016-11-07 00:29:38 -08:00
Zaid Abdulla 044734b567 Some events related fixes 2016-11-03 14:42:38 -07:00
Zaid Abdulla f9e96fe7f4 Workaround for missing parameters in GPN response
Some clients don't report certain parameters in GPN response but report
their descendants only. This patch attemps to add those missing
parameters assuming writable attribute being false.
2016-11-01 18:53:34 -07:00
Zaid Abdulla 60931e2b68 Fix bug where preset preconditions cause unnecessary GPN RPC
s
2016-11-01 18:22:35 -07:00
Zaid Abdulla 737266eae5 Replace Mongo query in preset precondition with flat filters 2016-11-01 18:20:19 -07:00
Zaid Abdulla d50fd3d614 Read/write tags in scripts 2016-11-01 18:14:48 -07:00
Zaid Abdulla 1bbef345e0 Fix bugs related to tracking changes 2016-10-28 16:29:34 -07:00
Zaid Abdulla 7b0ea61596 Load available timestamp for parameters that don't exist 2016-10-28 16:27:40 -07:00
Zaid Abdulla 600ca58b99 Major restructuring and optimization 2016-10-24 18:26:19 -07:00
Zaid Abdulla 6e9bf5a027 Fix exception when generating MongoDB projection from query 2016-10-24 17:31:17 -07:00
Zaid Abdulla b01f3d394e Add values iterator in InstanceSet 2016-10-24 17:30:08 -07:00
Zaid Abdulla 15437361e1 Add iterator in PathSet for superset and subset combination 2016-10-24 17:21:46 -07:00
Zaid Abdulla f24e05b7b6 Performance improvement in PathSet 2016-10-24 17:21:09 -07:00
Zaid Abdulla 739d215a92 Improve paramter set and load routines 2016-09-21 17:26:21 -07:00
Zaid Abdulla de1a62b481 Remove some old code 2016-09-21 16:52:15 -07:00
Zaid Abdulla bb55231cbd Remove obsolete custom commands sample files 2016-09-15 21:55:59 -07:00
Zaid Abdulla 036368172c Remove obsolete aliasing feature 2016-09-15 20:52:28 -07:00
Zaid Abdulla b9e17c9add Some bug fixes in extensions 2016-09-13 13:51:45 -07:00
Zaid Abdulla f6ad84c885 Some bug fixes in session 2016-09-12 02:28:15 -07:00
Zaid Abdulla a254ebbe0c Fix bug where faults in new devices never get saved 2016-09-12 02:26:04 -07:00
Zaid Abdulla b7370a6fb9 Reimplement and optimize device.set 2016-09-12 02:22:25 -07:00
Zaid Abdulla f0b7fb3ec0 Some more bug fixes 2016-09-07 01:26:08 -07:00
Zaid Abdulla 942d929476 Implement support for reboot and factory reset methods 2016-09-07 00:07:04 -07:00
Zaid Abdulla 46870db18d Some bug fixes 2016-09-06 23:53:46 -07:00
Zaid Abdulla 5134f8419c Use relative depth in refresh task 2016-09-06 03:21:32 -07:00
Zaid Abdulla b60682bf80 Fix bug in marking params to load on GPN reponse 2016-09-06 02:48:54 -07:00
Zaid Abdulla 7655ffefd9 Fix bug when determining NextLevel in GPN 2016-09-06 02:46:16 -07:00
Zaid Abdulla ad38a7ccb1 Restructuring and optimization in provision processing 2016-09-06 02:38:08 -07:00
Zaid Abdulla 8e450f6ad0 Save _object field when _value is not available
When saving device, some parameters may not have _value field. In
such cases, save _object field (false) to avoid type ambiguity.
2016-09-06 01:55:24 -07:00
Zaid Abdulla 82596ad1fe Fix occasional duplicate results in PathSet iterator 2016-09-06 01:50:29 -07:00
Zaid Abdulla 67d08ca1ff Fix potential bug when saving session 2016-08-31 00:31:34 -07:00