-
Notifications
You must be signed in to change notification settings - Fork 4
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
hubclientinfo PUSH requests #3
Comments
Original comment by John Henderson (Bitbucket: [John Henderson](https://bitbucket.org/John Henderson), GitHub: jrhender). This may be complex in OCN’s case due there being both connections on both the local OCPI platform as well as remote OCPI connections through OCN. (Perhaps this is why this wasn’t implemented already). I am thinking though that it would be valuable just to start with push to local OCPI, with a view to possibly extending to pushing to remote connections in the future. I am considering implementing this using Spring Data @DomainEvents (https://www.baeldung.com/spring-data-ddd). My thinking is that an observer/pub-sub of some kind will make it easier to implement this with minimal coupling/changes to the other OCPI module implementations. Any thoughts on this? |
Original comment by Adam Staveley (Bitbucket: [Adam Staveley](https://bitbucket.org/Adam Staveley), GitHub: adamstaveley). Yes, you are right, we have not yet implemented this due to the complexity. It is in our internal backlog and scheduled for around January time. If you wish to submit a first implementation you are very welcome! |
Original comment by Adam Staveley (Bitbucket: [Adam Staveley](https://bitbucket.org/Adam Staveley), GitHub: adamstaveley). https://github.com/ocpi/ocpi/blob/master/releases/2.2/mod_hub_client_info.asciidoc for reference |
Original comment by John Henderson (Bitbucket: [John Henderson](https://bitbucket.org/John Henderson), GitHub: jrhender). @{5c0e56819aeccc769f3342d4} Hi Adam, a couple questions for you when you have a moment. Both are in the context of HubClientInfo push model.
Apologies if you’re not the correct person to ask or unsure. It should be easy to change to change this behaviour later, but I thought it would be good to get the questions out there. |
Original comment by Adam Staveley (Bitbucket: [Adam Staveley](https://bitbucket.org/Adam Staveley), GitHub: adamstaveley). Hi John, I would say:
|
Original comment by Adam Staveley (Bitbucket: [Adam Staveley](https://bitbucket.org/Adam Staveley), GitHub: adamstaveley). The solution, from John Henderson, has been included in v1.1.0 RC0, which can be found in the develop branch. |
1.0.0 * enable pipelines * Initial Bitbucket Pipelines configuration * deploy broker to test environment * fix bitbucket-pipelines.yml * Squashed commit of the following: commit cd5c0531eb5cdc96d7975938a4dc8fba05dd5b7d Author: Adam Staveley <[email protected]> Date: Fri Jun 14 00:55:56 2019 0200 implement AdminController and AdminControllerTest; setup JPA * Squashed commit of the following: commit 2c2d41703ccf30fbeae153272f107361e90e66d8 Author: Adam Staveley <[email protected]> Date: Fri Jun 14 15:18:15 2019 0200 add 2.2 version details endpoint commit a0189b9b1f4875ea05827656ae17f2dc2b387445 Author: Adam Staveley <[email protected]> Date: Fri Jun 14 14:30:59 2019 0200 add ToolsTest commit 3617ed2675625901082d71226ad5fc8bb0f5e212 Author: Adam Staveley <[email protected]> Date: Fri Jun 14 14:26:04 2019 0200 implement versions information endpoint * Squashed commit of the following: commit 15ceca3fd2c89266071ed482346233b91b6c7e83 Author: Adam Staveley <[email protected]> Date: Fri Jun 14 18:15:00 2019 0200 build documentation using spring rest docs * fix api doc filepaths in README * move built documentation to static bitbucket site * iterable party by auth return type * Squashed commit of the following: commit 3b3078b76f302069edf3ea7a117fe7fa8a9c414a Author: Adam Staveley <[email protected]> Date: Thu Jun 20 17:47:09 2019 0200 make GET credentials error message consistent with PUT and DELETE commit b7c9c03ef96f50130299c553659e07237a2deb62 Author: Adam Staveley <[email protected]> Date: Thu Jun 20 17:42:07 2019 0200 add DELETE handler commit cb96220f892d0fb1e360abde7df45539fc317075 Author: Adam Staveley <[email protected]> Date: Wed Jun 19 09:48:41 2019 0200 add PUT handler commit a046097770193b20e3c354fd90fd7948d2eaa03d Author: Adam Staveley <[email protected]> Date: Tue Jun 18 16:56:45 2019 0200 remodel repositories into hierarchical organization -> credentials structure commit be542296ff9ed347b50ad53e8aaaeda74b3fe75e Author: Adam Staveley <[email protected]> Date: Mon Jun 17 18:37:54 2019 0200 add POST credentials commit 8c6844619244c81e4983f3e33e5bf61acf264eec Author: Adam Staveley <[email protected]> Date: Mon Jun 17 14:10:35 2019 0200 add GET credentials * Squashed merge with feature/locations-controller branch * rework pipelines for testing and building using different profiles * merge sqaush with feature/sessions-controller * merge squash with improvements branch * merge squash of feature/cdrs-controller branch * add tariffs controller and tests * merge squash of feature/tokens-controller * fix tariffs controller mappings * run setup script from inside host * fix tokens controller mappings * merge squash with feature/commands-controller * add basic hubclientinfo sender interface * move develop pipeline to open-testing * add psql driver and example properties file * skip tests on remote host build * replace old interface roles with sender and receiver * squash merge branch open-testing * merge squash with documentation-improvements * README.md edited online with Bitbucket * README.md edited online with Bitbucket * add initial usage examples/tutorial * remove properties import from RoutingServiceTest * fix pipelines to run build by default * merge squash with documentation/ocpi-usage-examples * fix incorrect parameters in party_id/country_code check * merge squash with feature/client-to-client-auth * add develop deployment and example service file * remove typo in bitbucket-pipelines * update volta registry contract address * add /admin/connection-status * add new test2 deployment host * fix typo in pipelines * upgrade gradle plugins and project dependencies * downgrade asciidoctor plugin * make tariff type nullable * reorder tutorial steps * refactor GET cdrs - remove routing logic from request handler * rewrite cdr receiver interfaces and add generic proxying of resources * rewrite commands sender interface and add commands controller tests * temporarily remove default pipeline action * refactor back to controller method having more control over routing * OCN-292: disallow OCPI connection without OCN Registry entry first * add cdrs receiver tests and concat local/proxy preparation functions in routing service * clean cdrs controller/test * clean cdrs controller/test * proxy paginated cdr request and provide empty get cdr page mapping * add paginated cdr endpoint * add command receiver interfaces and sender test * create new proxy body in commands receiver interface * remaining commands receiver endpoints tests with proxy body * commands controller clean up * locations sender interface and tests; moduleID enum rename * locations receiver plus tests * add locations page request and rename cdrs page request * sessions sender interface and tests * sessions receiver interface and tests * tariffs sender interface and tests * simpler proxyPaginationHeaders interface; tariffs receiver interface and tests * tokens controller and tests * change response type back to enum; routing service preparation function tests * routing service proxyResource helper tests, clean up * extract sign/verify functions to credential service; remaining routing service tests; document service functions * add hubclientinfo service tests * message controller and tests; rename htttpRequestService and makeRequest * fix proxy resource entity and add repo tests * fix circular dependencies in config/credentails service * rename credentials service to wallet service to avoid confusion with ocpi credentials module * add client-info endpoint in postman collection; readme typo * extract next url from link http header * combine OcpiRequestVariables with OcnMessageBody; include request data type in ocn message request; various renaming * no type information in request variables * simplify http service for caller and provide mockable makeOcpiRequest overload * remove lambda makeOcpiRequest parameter for easier testing * post ocn message sends request vars as string data * set resource to be proxied by remote client * switch sender and receiver on proxy response_url requests * remove logs * update tutorial and remove open-testing information in README * tutorial step 4 headers * re-enable default pipeline step * add rsync TODO item * clean up todo items * clean up models; change name of data class encode methods to toMap * Merged in misc/improve-config-defaults (pull request #1) db and logging config changes * Merged in feature/OCN-286-https (pull request #3) made a test case for HTTPS request Approved-by: Arzon Barua <[email protected]> * Merged in feature/OCN-286-revert-changes (pull request #5) revert the changes of test case Approved-by: Adam Staveley <[email protected]> * Merged in bugfix/OCN-384-read-data-from-registry (pull request #2) Bugfix/OCN-384 read data from registry * log registry info and improve registry api * remove belongsToMe debug prints * check for client url OR address on ocn/registry/client endpoint Approved-by: Ali Askari <[email protected]> * Merged in jrhender/ocn-client/httpServiceTests (pull request #7) HttpServiceTests * initial working getVersions HttpServiceTest * minor improvements to HtpServiceTest getVersions Approved-by: Adam Staveley <[email protected]> * Merged in license-update (pull request #8) Update copyright license holder * Merged in handle-socket-timeout (pull request #6) add SocketTimeoutException handler * add SocketTimeoutException handler * add ConnectException too Approved-by: Arzon Barua <[email protected]> * Merged in bug/versions-token-c (pull request #9) Bugfix: versions controller allows token c authorization * Update copyright license holder * /versions and /2.2 allow token C authorization Approved-by: Arzon Barua <[email protected]> * Merged in name-change (pull request #11) Name change * Update copyright license holder * rename all client references to node * update registry facade * update to new contract * update readme with rename info Approved-by: Arzon Barua <[email protected]> * README.md edited online with Bitbucket * Merged in feature/https-warning (pull request #10) Feature/https warning * Update copyright license holder * upgrade gradle and plugins * dev/prod toggle * add initial URL checker on application start event * moved public URL test to its own component and run application context test on defined port * updated README with public URL and dev/prod mode information * fix readme informatoin regarding default runtime mode Approved-by: Arzon Barua <[email protected]> * Merged in ocn-288/message-signing (pull request #12) Message Signing * signature toggle and node info logging * refactor core controllers to use request handler builder; rewrite CdrsControllerTest * CommandsControllerTest rewrite * rewrite LocationsControllerTest * rewrite and enable remaining tests; use RequestHandler in OcnMessage Controller * request handler null safety and tests * proxy remote request body reorder changes; debug commands over remote node * fix ocn message test by creating request handler with string body * remove debug logs * update examples with postman environment * add notary dependency; add signature to request headers; rename ocpi request headers to ocn headers * add validateSender tests and move request handler to services * add ocn message with signature test * rewrite signature on command receiver request * add javadoc comments to the RequestHandler/Builder * updated readme with message signing information * exclude junit-vintage-engine dependency from spring-boot-starter-test Approved-by: Arzon Barua <[email protected]> * Merged in feature/ocpi_v2_2 (pull request #13) reviewed and change according to ocpi 2.2 final release * reviewed and change according to ocpi 2.2 final release * remove extra exclude in gradle build deps * renamed variable to endDateTime and fixed the restrictions spelling * fix versions data format * update examples readme Approved-by: Adam Staveley <[email protected]> * Merged in feature/chargingprofiles (pull request #14) Feature/chargingprofiles * sender POST method * sender PUT method * change PublishTokenType.type to TokenType * GET receiver method; changed urlEncodedParams type map * PUT receiver method and correct request mappings * DELETE receiver method * rework docker-compose setup to reduce build times in container * fix readme example build step * docker-compose make registry-deploy depend on ganache Approved-by: Arzon Barua <[email protected]> * hotfix to url-encoded parameters incorrectly mapped to String * Merged in license-change (pull request #16) source code file headers changed to apache; GPLv3 COPYING changed to Apache LICENSE file Approved-by: Christopher Burgahn <[email protected]> * Merged in ocn-612/white-blacklisting (pull request #19) Ocn 612/white blacklisting * initial ocnrules controller * add ocnrules to versions detail endpoint (plus chargingprofiles) * add rules list entity and repository * set default rules on credentials handshake Signed-off-by: Adam Staveley <[email protected]> * add update whitelist function Signed-off-by: Adam Staveley <[email protected]> * add ocn rules POST and DELETE methods; enforce signatures rule Signed-off-by: Adam Staveley <[email protected]> * PUT /ocnrules/signatures to toggle on/off Signed-off-by: Adam Staveley <[email protected]> * validate whitelisted sender Signed-off-by: Adam Staveley <[email protected]> * update readme with dco/contributing guidelines Signed-off-by: Adam Staveley [email protected] * add api descriptions for registry and OcnRules Signed-off-by: Adam Staveley [email protected] * Merged in feature/blacklisting (pull request #18) Feature/blacklisting * added feature for the blacklist * added feature for the blacklist Signed-off-by: Arzon <arzon> Approved-by: Adam Staveley <[email protected]> * expand HTTP API documentation in readme Signed-off-by: Adam Staveley <[email protected]> * set platform rules list active after deletion Signed-off-by: Adam Staveley <[email protected]> * set default rules to false for db migration Signed-off-by: Adam Staveley <[email protected]> Approved-by: Arzon Barua <[email protected]> * upgrade web3j and registry contract facade * node private key verification Signed-off-by: Adam Staveley <[email protected]> * Merged in feature/module-whitelist (pull request #20) ocn-734,ocn-735 * ocn-734,ocn-735 Signed-off-by: Arzon <arzon> * check modules Signed-off-by: Arzon <arzon> * remove comments Signed-off-by: Arzon <arzon> * updated Documentation Signed-off-by: Arzon <arzon> * updated put method example Signed-off-by: Arzon <arzon> Approved-by: Adam Staveley <[email protected]> * use configured private key; remove wallet repository Signed-off-by: Adam Staveley <[email protected]> * update examples readme with new registry information * update examples readme with new registry information Signed-off-by: Adam Staveley <[email protected]> * update registry address Signed-off-by: Adam Staveley <[email protected]> * ocn_signature goes in response body Signed-off-by: Adam Staveley <[email protected]> * verify and rewrite response signature Signed-off-by: Adam Staveley <[email protected]> * test response signatures Signed-off-by: Adam Staveley <[email protected]> * support roles with same party_id; only strip res sig if modifying; check if sender is known before looking up OcnRules Signed-off-by: Adam Staveley <[email protected]> * consistent ocn credentials; fix bad restful links; start integration tests for signatures * add gaanche task and deploy registry before integration test Signed-off-by: Adam Staveley <[email protected]> * register cpo parties to test nodes * javalin auth handling * Merged in feature/black-white-list (pull request #22) Feature/black white list * check modules, get rules, update blacklist whitelist Signed-off-by: Arzon <arzon> * updated single update and blacklist Signed-off-by: Arzon <arzon> * changed code for check single module Signed-off-by: Arzon <arzon> * updated documentation Signed-off-by: Arzon <arzon> * changed according to feedback Signed-off-by: Arzon <arzon> Approved-by: Adam Staveley <[email protected]> * add get location integration tests Signed-off-by: Adam Staveley <[email protected]> * set signatures on for test and upgrade notary to 0.4.0 beta Signed-off-by: Adam Staveley <[email protected]> * (failing) paginated integration test - requires notary fix; added pagination params to proxy endpoints Signed-off-by: Adam Staveley <[email protected]> * fix private key not being passed into notary rewrite sign function Signed-off-by: Adam Staveley <[email protected]> * restful post request integration test and setup async command test Signed-off-by: Adam Staveley <[email protected]> * async commands request integration test Signed-off-by: Adam Staveley <[email protected]> * remove overriding set paginated headers and configure test tasks in gradle config * change pipeline config to use ganache for integration tests Signed-off-by: Adam Staveley <[email protected]> * fix pipeline cache naming Signed-off-by: Adam Staveley <[email protected]> * just install ganache manually Signed-off-by: Adam Staveley <[email protected]> * ganache output goes to /dev/null Signed-off-by: Adam Staveley <[email protected]> * ganache mnemonic without string literal escapes Signed-off-by: Adam Staveley <[email protected]> * just do unit tests in pipelines Signed-off-by: Adam Staveley <[email protected]> * try pipeline integrationTest task again with fixed mnemonic Signed-off-by: Adam Staveley <[email protected]> * fix pipeline dependency Signed-off-by: Adam Staveley <[email protected]> * install ganache in pipeline Signed-off-by: Adam Staveley <[email protected]> * update README, include prod properties, remove hubclientinfo Signed-off-by: Adam Staveley <[email protected]> * Merged in ocn-746/migrate-to-new-registry (pull request #21) Update to registry v2 * upgrade web3j and registry contract facade * node private key verification Signed-off-by: Adam Staveley <[email protected]> * use configured private key; remove wallet repository Signed-off-by: Adam Staveley <[email protected]> * update examples readme with new registry information * update examples readme with new registry information Signed-off-by: Adam Staveley <[email protected]> * update registry address Signed-off-by: Adam Staveley <[email protected]> Approved-by: Arzon Barua <[email protected]> * update default properties with test/prod details Signed-off-by: Adam Staveley <[email protected]> * minor readme typos fixed Signed-off-by: Adam Staveley <[email protected]> * upgrade version to 1.0.0 Signed-off-by: Adam Staveley <[email protected]> * exclude test from build step in readme Signed-off-by: Adam Staveley <[email protected]> * Merged in ocn-675/signed-repsonses (pull request #23) Ocn 675/signed repsonses * upgrade web3j and registry contract facade * node private key verification Signed-off-by: Adam Staveley <[email protected]> * use configured private key; remove wallet repository Signed-off-by: Adam Staveley <[email protected]> * update examples readme with new registry information * update examples readme with new registry information Signed-off-by: Adam Staveley <[email protected]> * update registry address Signed-off-by: Adam Staveley <[email protected]> * ocn_signature goes in response body Signed-off-by: Adam Staveley <[email protected]> * verify and rewrite response signature Signed-off-by: Adam Staveley <[email protected]> * test response signatures Signed-off-by: Adam Staveley <[email protected]> * support roles with same party_id; only strip res sig if modifying; check if sender is known before looking up OcnRules Signed-off-by: Adam Staveley <[email protected]> * consistent ocn credentials; fix bad restful links; start integration tests for signatures * add gaanche task and deploy registry before integration test Signed-off-by: Adam Staveley <[email protected]> * register cpo parties to test nodes * javalin auth handling * add get location integration tests Signed-off-by: Adam Staveley <[email protected]> * set signatures on for test and upgrade notary to 0.4.0 beta Signed-off-by: Adam Staveley <[email protected]> * (failing) paginated integration test - requires notary fix; added pagination params to proxy endpoints Signed-off-by: Adam Staveley <[email protected]> * fix private key not being passed into notary rewrite sign function Signed-off-by: Adam Staveley <[email protected]> * restful post request integration test and setup async command test Signed-off-by: Adam Staveley <[email protected]> * async commands request integration test Signed-off-by: Adam Staveley <[email protected]> * remove overriding set paginated headers and configure test tasks in gradle config * change pipeline config to use ganache for integration tests Signed-off-by: Adam Staveley <[email protected]> * fix pipeline cache naming Signed-off-by: Adam Staveley <[email protected]> * just install ganache manually Signed-off-by: Adam Staveley <[email protected]> * ganache output goes to /dev/null Signed-off-by: Adam Staveley <[email protected]> * ganache mnemonic without string literal escapes Signed-off-by: Adam Staveley <[email protected]> * just do unit tests in pipelines Signed-off-by: Adam Staveley <[email protected]> * try pipeline integrationTest task again with fixed mnemonic Signed-off-by: Adam Staveley <[email protected]> * fix pipeline dependency Signed-off-by: Adam Staveley <[email protected]> * install ganache in pipeline Signed-off-by: Adam Staveley <[email protected]> * update README, include prod properties, remove hubclientinfo Signed-off-by: Adam Staveley <[email protected]> * update default properties with test/prod details Signed-off-by: Adam Staveley <[email protected]> * minor readme typos fixed Signed-off-by: Adam Staveley <[email protected]> * upgrade version to 1.0.0 Signed-off-by: Adam Staveley <[email protected]> * exclude test from build step in readme Signed-off-by: Adam Staveley <[email protected]> Approved-by: Arzon Barua <[email protected]> * bitbucket-pipelines.yml edited online with Bitbucket * fix whitelist and rename enableWhitelist to block-all Signed-off-by: Adam Staveley <[email protected]> * small README fixes Signed-off-by: Adam Staveley <[email protected]>
Original report by John Henderson (Bitbucket: [John Henderson](https://bitbucket.org/John Henderson), GitHub: jrhender).
As per section 15.2.1 of OCPI 2.2, the HubClientInfo module contains a Push model. In order to provide all of the functionality of OCPU, the ocn-client should implement this Push model.
The text was updated successfully, but these errors were encountered: