Commit graph

59 commits

Author SHA1 Message Date
Lex Berezhny e02e2a249a fix wallet component 2018-10-16 17:09:21 -04:00
Lex Berezhny 5eac4247e1 working integration tests 2018-10-16 17:09:21 -04:00
Jack Robison 2dd0221711
[API] support ssl, add use_https setting 2018-09-26 09:56:26 -04:00
Victor Shyba 1c2849235c send startup event right after setup 2018-09-25 17:49:23 -04:00
Victor Shyba 03415415ed improve error message when daemon is already running 2018-09-18 23:09:43 -04:00
Lex Berezhny 4a8776be10
wallet integration tests fixed 2018-08-24 11:42:35 -04:00
hackrush 2b5e3204c0
Refactor client, cli and test_cli, fix delayedCalls not expiring 2018-08-24 11:42:35 -04:00
Lex Berezhny cbc98e72a7
pylint fixes 2018-08-24 11:42:35 -04:00
Lex Berezhny 3686b1d970
changes from jacks review 2018-08-24 11:42:35 -04:00
hackrush 2590523fa1
Rename client and add test_cli to tox.ini 2018-08-24 11:42:08 -04:00
hackrush 08b4fd6942
stop listening port only if it is not None 2018-08-24 11:42:08 -04:00
hackrush 6a8963d807
Added Authenticated API Client Integration Test 2018-08-24 11:42:08 -04:00
hackrush 083bf4f61d
aiohttp based Async Authenticated API Client 2018-08-24 11:42:08 -04:00
hackrush 4165881d5f
Authenticated CLI works again 2018-08-24 11:40:43 -04:00
Lex Berezhny da8e09846d
pylint fixed 2018-08-24 11:40:43 -04:00
hackrush a7ef8889dd
Unified CLI, python 3(WIP) (#1330)
* Added new custom cli class using aiohttp
* Proper error handling in CLI based on RPC error codes(PoC)
* Auth API working
* UnitTests
2018-08-24 11:40:43 -04:00
Lex Berezhny 10b34d6b33
unnecessary list() added during py3 port
instead of recursive bytes2unicode use a proper JSONEncoder to conver bytes->unicode for json.dumps()
removing excessive isinstance(data, bytes) checks
py3: / -> // and list() around .items() that gets modified in loop
moved lbrynet.undecorated to where its actually used and hopefully we can delete it eventually
removed build/upload_assets.py, travis can do all this now
2018-08-24 11:40:43 -04:00
hackrush 3f7091cbf2
Make curl work in py3 again 2018-08-24 11:37:53 -04:00
hackrush a95f791215
Make daemon work in py3 again 2018-08-24 11:37:53 -04:00
Lex Berezhny 5597d45aed
got integration tests to work again with rebased branch 2018-08-24 11:37:53 -04:00
hackrush 473d2eabfa
curl works with python3 now 2018-08-24 11:37:53 -04:00
Lex Berezhny 693a3346d2
pylint fixes 2018-08-24 11:37:53 -04:00
Lex Berezhny 4ece422f48
No longer inheriting from object and added proper use of super(). 2018-08-24 11:37:53 -04:00
Lex Berezhny 971252d5d1
undo simplejson commit 2018-08-24 11:37:53 -04:00
hackrush c01716a6c0
Using simplejson and fixed some encodes and decodes 2018-08-24 11:37:53 -04:00
hackrush 4bd0806e58
Fix metaclass not registering objects 2018-08-24 11:37:53 -04:00
Lex Berezhny 69446491b8
pylint and unit test fixes 2018-08-24 11:37:50 -04:00
Lex Berezhny cc970c499b
daemon/auth py3 conversion, this breaks the client for now 2018-08-24 11:37:25 -04:00
Jack Robison a3de065c93
use txupnp instead of miniupnpc 2018-08-03 11:37:07 -04:00
hackrush 9ab256df30 fixed improper error handling when data is not valid JSON (#1326) 2018-07-30 09:38:36 -04:00
Jack Robison 5d9a187659
refactor required conditions and @requires decorator 2018-07-24 20:01:38 -04:00
Jack Robison a9c94ca22d
move setup and _shutdown to AuthJSONRPCServer 2018-07-24 20:01:38 -04:00
Jack Robison b06dcf0a0d
cancel starting components if the reactor is stopped before startup has finished
-don't block starting the dht component on having found enough peers, only on setting up the protocol
2018-07-24 20:01:38 -04:00
Jack Robison a89306b6bf
reorganize daemon startup
-fix loggly not using the share usage setting

-delete more
2018-07-24 20:01:38 -04:00
Jack Robison defe9506bb
set daemon attribute for each component as they start 2018-07-24 20:01:38 -04:00
hackrush 2d61ba629f
add requires decorator 2018-07-24 20:01:38 -04:00
Jack Robison 7e8ca842a2
change ComponentManager to use instance methods rather than class methods
-add get_component method to ComponentManager

-add override_components kwargs to ComponentManager

-add skip_components to ComponentManager

-change component_manager attribute to exist on the AuthJSONRPCServer instance instead of the class
2018-07-24 20:01:38 -04:00
Jack Robison 68b31a09b4
add daemon Component and ComponentManager classes 2018-07-24 20:01:38 -04:00
Lex Berezhny 6952c2c07e
Revert "refactor lbrynet-daemon into modular components" (#1286)
* Revert "fix reflector test"

This reverts commit 6a15b51ac3.

* Revert "refactor lbrynet-daemon into modular components (#1164)"

This reverts commit 75a6ff269e.
2018-07-05 19:05:48 -04:00
Jack Robison 75a6ff269e refactor lbrynet-daemon into modular components (#1164)
* add daemon Component and ComponentManager classes

* convert directory and SQLiteStorage setup to be a Component

* support callbacks to component setups

* Fixed typo in ComponentManager

* convert wallet to be Component

* Use storage from session.

* Remove create_session internal function and PEP8

* Starting to convert session to its own component. Removed ref to `self.storage` from Daemon.py

* Making DHT component(broken)

* Refactored classes to reduce redundancy in getting config setting

* DHT is now it's own component

* Fixed `test_streamify` test

* Fixed regression caused by removing `peer_manager` from session

* refactor ComponentManager and Component to use instance instead of class methods

* Hash announcer, file manager, stream identifier components

* Query Handler and server components

* Reflector Component

* Fixed test_streamify(well Jack did, but ¯\_(ツ)_/¯)

* All tests now passing

* Pylint fixes

* Oops(That's all you're gonna get :-P)

* Making decorators(WIP, commit so that I don't lose work)

* Decorator made and decorating of functions done(some other changes)

* import fixes and removed temporary test function

* Fixed new broken tests from daemon refactor

* Sanitization of modules

* Reworded errors

* wallet unlock condition checks, fixed breaking changes

* Rebased on amster and other crazy stuff

* Started writing tests

* Tests for component manager

* Fix Daemon Tests

* Fixed passing mutable args in init

* Using constants instead of strings. Added CHANGELOG.md

* Now components can be skipped by setting relevant config in file.

* P-Y-L-I-N-T #angry_emoji
2018-07-05 15:21:52 -04:00
Jack Robison 9b1e687b9b
pylint 2018-05-29 14:36:00 -04:00
Jack Robison 187f920961
disable Daemon headers check for now 2018-05-28 10:57:48 -04:00
Jack Robison 450bed6350
fix kwargs bug 2018-04-19 11:00:44 -04:00
Jack Robison eae97a8133
off by one 2018-04-03 13:08:36 -04:00
Jack Robison 4e7bdafdcf
fix positional and keyword args 2018-04-03 12:27:49 -04:00
Jack Robison 743ae59d54
fix lbrynet-cli when using authentication
-add explanation of daemon authentication to AuthJSONRPCServer docstring
-remove auth_required decorator, use auth for all api methods if use_authentication is true
-fix issues with the command line --http-auth flag to lbrynet-daemon and the use_http_auth setting in the config file
2018-04-01 18:31:03 -04:00
Jack Robison 8c2b626f97
fix cli kwargs 2018-03-29 12:19:41 -04:00
hackrush f7f6770120 Removed flags decorator as short flags are no longer used. 2018-03-18 16:11:19 +05:30
Jack Robison b7503f8b61
log traceback info for failed api requests 2017-12-06 19:52:29 -05:00
Jack Robison 8fdd8d8c43
fix api error responses 2017-12-06 13:25:58 -05:00