{"action":"created","comment":{"url":"https://api.github.com/repos/OSGP/Platform/pulls/comments/84684555","pull_request_review_id":5445818,"id":84684555,"diff_hunk":"@@ -529,4 +539,82 @@ public void handleGetFirmwareVersionResponse(DeviceMessageMetadata deviceMessage\n                 deviceMessageMetadata.getMessageType());\n \n     }\n+\n+    public void requestUpdateFirmware(final DeviceMessageMetadata deviceMessageMetadata, final String firewareIdentifier)\n+            throws FunctionalException {\n+\n+        LOGGER.info(\"requestUpdateFirmware for organisationIdentification: {} for deviceIdentification: {}\",\n+                deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification());\n+\n+        final SmartMeter smartMeteringDevice = this.domainHelperService.findSmartMeter(deviceMessageMetadata\n+                .getDeviceIdentification());\n+\n+        LOGGER.info(SENDING_REQUEST_MESSAGE_TO_CORE_LOG_MSG);\n+\n+        this.osgpCoreRequestMessageSender.send(new RequestMessage(deviceMessageMetadata.getCorrelationUid(),\n+                deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification(),\n+                smartMeteringDevice.getIpAddress(), firewareIdentifier), deviceMessageMetadata.getMessageType(),\n+                deviceMessageMetadata.getMessagePriority(), deviceMessageMetadata.getScheduleTime());\n+    }\n+\n+    public void handleUpdateFirmwareResponse(final DeviceMessageMetadata deviceMessageMetadata,\n+            final ResponseMessageResultType deviceResult, final OsgpException exception,\n+            final List<FirmwareVersionDto> firmwareVersionList) throws FunctionalException {\n+\n+        LOGGER.info(\"handleUpdateFirmwareResponse for MessageType: {}\", deviceMessageMetadata.getMessageType());\n+\n+        ResponseMessageResultType result = deviceResult;\n+        if (exception != null) {\n+            LOGGER.error(\"Update firmware response not ok. Unexpected Exception\", exception);\n+            result = ResponseMessageResultType.NOT_OK;\n+        }\n+\n+        final List<FirmwareVersion> firmwareVersions = this.configurationMapper.mapAsList(firmwareVersionList,\n+                FirmwareVersion.class);\n+        final SmartMeter smartMeteringDevice = this.domainHelperService.findSmartMeter(deviceMessageMetadata\n+                .getDeviceIdentification());\n+\n+        this.storeFirmware(smartMeteringDevice, firmwareVersions, deviceMessageMetadata.getOrganisationIdentification());\n+\n+        final UpdateFirmwareResponse updateFirmwareResponse = new UpdateFirmwareResponse(firmwareVersions);\n+\n+        this.webServiceResponseMessageSender.send(new ResponseMessage(deviceMessageMetadata.getCorrelationUid(),\n+                deviceMessageMetadata.getOrganisationIdentification(), deviceMessageMetadata.getDeviceIdentification(),\n+                result, exception, updateFirmwareResponse, deviceMessageMetadata.getMessagePriority()),\n+                deviceMessageMetadata.getMessageType());\n+    }\n+\n+    private void storeFirmware(final SmartMeter smartMeteringDevice, final List<FirmwareVersion> firmwareVersions,\n+            final String organisationIdentification) throws FunctionalException {\n+        if (firmwareVersions.size() != 3) {","path":"osgp-adapter-domain-smartmetering/src/main/java/com/alliander/osgp/adapter/domain/smartmetering/application/services/ConfigurationService.java","position":153,"original_position":153,"commit_id":"a7b10ff9821228b10a01b74af33d6b8060b72224","original_commit_id":"a7b10ff9821228b10a01b74af33d6b8060b72224","user":{"login":"rudidevries","id":5311277,"avatar_url":"https://avatars.githubusercontent.com/u/5311277?v=3","gravatar_id":"","url":"https://api.github.com/users/rudidevries","html_url":"https://github.com/rudidevries","followers_url":"https://api.github.com/users/rudidevries/followers","following_url":"https://api.github.com/users/rudidevries/following{/other_user}","gists_url":"https://api.github.com/users/rudidevries/gists{/gist_id}","starred_url":"https://api.github.com/users/rudidevries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rudidevries/subscriptions","organizations_url":"https://api.github.com/users/rudidevries/orgs","repos_url":"https://api.github.com/users/rudidevries/repos","events_url":"https://api.github.com/users/rudidevries/events{/privacy}","received_events_url":"https://api.github.com/users/rudidevries/received_events","type":"User","site_admin":false},"body":"I do not know either... There is no scenario specified for this problem. I have discussed it with @phoutman and he said that in such a case the system should clearly indicate something serious is wrong. I think throwing an exception is the only tool we have for that now.\r\n\r\nThere are other problems with the story, such as storing the response from a bundle, that we have decided to leave out now because it will all have to be refactored when moved to the core webservices. I think that would be the time to better define and implement these scenarios.","created_at":"2016-10-24T13:17:41Z","updated_at":"2016-10-24T13:17:41Z","html_url":"https://github.com/OSGP/Platform/pull/508#discussion_r84684555","pull_request_url":"https://api.github.com/repos/OSGP/Platform/pulls/508","_links":{"self":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/comments/84684555"},"html":{"href":"https://github.com/OSGP/Platform/pull/508#discussion_r84684555"},"pull_request":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/508"}}},"pull_request":{"url":"https://api.github.com/repos/OSGP/Platform/pulls/508","id":90162663,"html_url":"https://github.com/OSGP/Platform/pull/508","diff_url":"https://github.com/OSGP/Platform/pull/508.diff","patch_url":"https://github.com/OSGP/Platform/pull/508.patch","issue_url":"https://api.github.com/repos/OSGP/Platform/issues/508","number":508,"state":"open","locked":false,"title":"SLIM-268 update firmware","user":{"login":"rudidevries","id":5311277,"avatar_url":"https://avatars.githubusercontent.com/u/5311277?v=3","gravatar_id":"","url":"https://api.github.com/users/rudidevries","html_url":"https://github.com/rudidevries","followers_url":"https://api.github.com/users/rudidevries/followers","following_url":"https://api.github.com/users/rudidevries/following{/other_user}","gists_url":"https://api.github.com/users/rudidevries/gists{/gist_id}","starred_url":"https://api.github.com/users/rudidevries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rudidevries/subscriptions","organizations_url":"https://api.github.com/users/rudidevries/orgs","repos_url":"https://api.github.com/users/rudidevries/repos","events_url":"https://api.github.com/users/rudidevries/events{/privacy}","received_events_url":"https://api.github.com/users/rudidevries/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-20T09:23:36Z","updated_at":"2016-10-24T13:17:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"135a08ebb54631fea1c5b5bbb88daf54643def74","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OSGP/Platform/pulls/508/commits","review_comments_url":"https://api.github.com/repos/OSGP/Platform/pulls/508/comments","review_comment_url":"https://api.github.com/repos/OSGP/Platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OSGP/Platform/issues/508/comments","statuses_url":"https://api.github.com/repos/OSGP/Platform/statuses/a7b10ff9821228b10a01b74af33d6b8060b72224","head":{"label":"OSGP:SLIM-268-Update_Firmware","ref":"SLIM-268-Update_Firmware","sha":"a7b10ff9821228b10a01b74af33d6b8060b72224","user":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"repo":{"id":32739388,"name":"Platform","full_name":"OSGP/Platform","owner":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OSGP/Platform","description":"The main components of OSGP.","fork":false,"url":"https://api.github.com/repos/OSGP/Platform","forks_url":"https://api.github.com/repos/OSGP/Platform/forks","keys_url":"https://api.github.com/repos/OSGP/Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OSGP/Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OSGP/Platform/teams","hooks_url":"https://api.github.com/repos/OSGP/Platform/hooks","issue_events_url":"https://api.github.com/repos/OSGP/Platform/issues/events{/number}","events_url":"https://api.github.com/repos/OSGP/Platform/events","assignees_url":"https://api.github.com/repos/OSGP/Platform/assignees{/user}","branches_url":"https://api.github.com/repos/OSGP/Platform/branches{/branch}","tags_url":"https://api.github.com/repos/OSGP/Platform/tags","blobs_url":"https://api.github.com/repos/OSGP/Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OSGP/Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OSGP/Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/OSGP/Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OSGP/Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/OSGP/Platform/languages","stargazers_url":"https://api.github.com/repos/OSGP/Platform/stargazers","contributors_url":"https://api.github.com/repos/OSGP/Platform/contributors","subscribers_url":"https://api.github.com/repos/OSGP/Platform/subscribers","subscription_url":"https://api.github.com/repos/OSGP/Platform/subscription","commits_url":"https://api.github.com/repos/OSGP/Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/OSGP/Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/OSGP/Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/OSGP/Platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/OSGP/Platform/contents/{+path}","compare_url":"https://api.github.com/repos/OSGP/Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OSGP/Platform/merges","archive_url":"https://api.github.com/repos/OSGP/Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OSGP/Platform/downloads","issues_url":"https://api.github.com/repos/OSGP/Platform/issues{/number}","pulls_url":"https://api.github.com/repos/OSGP/Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/OSGP/Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/OSGP/Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OSGP/Platform/labels{/name}","releases_url":"https://api.github.com/repos/OSGP/Platform/releases{/id}","deployments_url":"https://api.github.com/repos/OSGP/Platform/deployments","created_at":"2015-03-23T15:05:40Z","updated_at":"2016-10-13T14:35:53Z","pushed_at":"2016-10-24T12:09:33Z","git_url":"git://github.com/OSGP/Platform.git","ssh_url":"git@github.com:OSGP/Platform.git","clone_url":"https://github.com/OSGP/Platform.git","svn_url":"https://github.com/OSGP/Platform","homepage":"http://www.opensmartgridplatform.org/","size":28200,"stargazers_count":11,"watchers_count":11,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":11,"default_branch":"development"}},"base":{"label":"OSGP:development","ref":"development","sha":"4e3ef4c153b8bff16380f85c54cbe3b625c8ad6e","user":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"repo":{"id":32739388,"name":"Platform","full_name":"OSGP/Platform","owner":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OSGP/Platform","description":"The main components of OSGP.","fork":false,"url":"https://api.github.com/repos/OSGP/Platform","forks_url":"https://api.github.com/repos/OSGP/Platform/forks","keys_url":"https://api.github.com/repos/OSGP/Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OSGP/Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OSGP/Platform/teams","hooks_url":"https://api.github.com/repos/OSGP/Platform/hooks","issue_events_url":"https://api.github.com/repos/OSGP/Platform/issues/events{/number}","events_url":"https://api.github.com/repos/OSGP/Platform/events","assignees_url":"https://api.github.com/repos/OSGP/Platform/assignees{/user}","branches_url":"https://api.github.com/repos/OSGP/Platform/branches{/branch}","tags_url":"https://api.github.com/repos/OSGP/Platform/tags","blobs_url":"https://api.github.com/repos/OSGP/Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OSGP/Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OSGP/Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/OSGP/Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OSGP/Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/OSGP/Platform/languages","stargazers_url":"https://api.github.com/repos/OSGP/Platform/stargazers","contributors_url":"https://api.github.com/repos/OSGP/Platform/contributors","subscribers_url":"https://api.github.com/repos/OSGP/Platform/subscribers","subscription_url":"https://api.github.com/repos/OSGP/Platform/subscription","commits_url":"https://api.github.com/repos/OSGP/Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/OSGP/Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/OSGP/Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/OSGP/Platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/OSGP/Platform/contents/{+path}","compare_url":"https://api.github.com/repos/OSGP/Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OSGP/Platform/merges","archive_url":"https://api.github.com/repos/OSGP/Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OSGP/Platform/downloads","issues_url":"https://api.github.com/repos/OSGP/Platform/issues{/number}","pulls_url":"https://api.github.com/repos/OSGP/Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/OSGP/Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/OSGP/Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OSGP/Platform/labels{/name}","releases_url":"https://api.github.com/repos/OSGP/Platform/releases{/id}","deployments_url":"https://api.github.com/repos/OSGP/Platform/deployments","created_at":"2015-03-23T15:05:40Z","updated_at":"2016-10-13T14:35:53Z","pushed_at":"2016-10-24T12:09:33Z","git_url":"git://github.com/OSGP/Platform.git","ssh_url":"git@github.com:OSGP/Platform.git","clone_url":"https://github.com/OSGP/Platform.git","svn_url":"https://github.com/OSGP/Platform","homepage":"http://www.opensmartgridplatform.org/","size":28200,"stargazers_count":11,"watchers_count":11,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":11,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/508"},"html":{"href":"https://github.com/OSGP/Platform/pull/508"},"issue":{"href":"https://api.github.com/repos/OSGP/Platform/issues/508"},"comments":{"href":"https://api.github.com/repos/OSGP/Platform/issues/508/comments"},"review_comments":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/508/comments"},"review_comment":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OSGP/Platform/pulls/508/commits"},"statuses":{"href":"https://api.github.com/repos/OSGP/Platform/statuses/a7b10ff9821228b10a01b74af33d6b8060b72224"}}}}
{"actor":{"display_login":"rudidevries"}}