From 221b6f657e5124a389197f71d93a362e67a681e0 Mon Sep 17 00:00:00 2001 From: Gabriele Cerfoglio Date: Wed, 12 Jun 2019 10:42:02 +0200 Subject: [PATCH 1/2] Added lazy, commands, static and internal attributes to the payload sent to the IoT Agent Manager * Added lazy, commands, static and internal attributes to the payload sent to the IoT Agent Manager * updated tests --- lib/services/common/iotManagerService.js | 2 ++ .../iotamRequests/registrationWithGroups.json | 13 ++++++++++++- .../registrationWithGroupsWithoutCB.json | 13 ++++++++++++- .../iotamRequests/registrationWithStaticGroups.json | 7 ++++++- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/lib/services/common/iotManagerService.js b/lib/services/common/iotManagerService.js index ad61a6108..93053b1f9 100644 --- a/lib/services/common/iotManagerService.js +++ b/lib/services/common/iotManagerService.js @@ -50,6 +50,8 @@ function register(callback) { service_path: service.subservice, attributes: service.attributes, static_attributes: service.staticAttributes, + internal_attributes: service.internalAttributes, + lazy: service.lazy, commands: service.commands, description: service.description, timezone: service.timezone, diff --git a/test/unit/examples/iotamRequests/registrationWithGroups.json b/test/unit/examples/iotamRequests/registrationWithGroups.json index 9fd0a7a29..97804d160 100644 --- a/test/unit/examples/iotamRequests/registrationWithGroups.json +++ b/test/unit/examples/iotamRequests/registrationWithGroups.json @@ -18,7 +18,18 @@ "type": "Boolean" } ], - "commands":[{"name":"wheel1","type":"Wheel"}] + "lazy": [ + { + "name": "luminescence", + "type": "Lumens" + } + ], + "commands":[ + { + "name": "wheel1", + "type": "Wheel" + } + ] } ] } diff --git a/test/unit/examples/iotamRequests/registrationWithGroupsWithoutCB.json b/test/unit/examples/iotamRequests/registrationWithGroupsWithoutCB.json index c0afb7fd7..75957ea55 100644 --- a/test/unit/examples/iotamRequests/registrationWithGroupsWithoutCB.json +++ b/test/unit/examples/iotamRequests/registrationWithGroupsWithoutCB.json @@ -17,7 +17,18 @@ "type": "Boolean" } ], - "commands":[{"name":"wheel1","type":"Wheel"}] + "commands": [ + { + "name": "wheel1", + "type": "Wheel" + } + ], + "lazy": [ + { + "name": "luminescence", + "type": "Lumens" + } + ] } ] } diff --git a/test/unit/examples/iotamRequests/registrationWithStaticGroups.json b/test/unit/examples/iotamRequests/registrationWithStaticGroups.json index 4baaf459b..e135b54a8 100644 --- a/test/unit/examples/iotamRequests/registrationWithStaticGroups.json +++ b/test/unit/examples/iotamRequests/registrationWithStaticGroups.json @@ -25,7 +25,12 @@ "values": "123,12" } ], - "commands":[{"name":"wheel1","type":"Wheel"}] + "commands": [ + { + "name": "wheel1", + "type": "Wheel" + } + ] } ] } From 048df3108bc39db63b98f0def613ef03170c795e Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Thu, 19 Nov 2020 18:40:33 +0100 Subject: [PATCH 2/2] Update CHANGES_NEXT_RELEASE --- CHANGES_NEXT_RELEASE | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 400c995c7..f16206736 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -5,3 +5,4 @@ Update codebase to use ES6 - Fix or disable eslint errors Add prettier code formatting Add husky and lint-staged +Fix: Add support for lazy and internal_attributes in service notifications to Manager (#768) \ No newline at end of file