From 4a9124e13f6096da9e0aee065d3536b0963112f2 Mon Sep 17 00:00:00 2001 From: Ken Zangelin Date: Mon, 14 Oct 2024 18:28:42 +0200 Subject: [PATCH 1/2] dds option now under -wip --- src/app/orionld/orionld.cpp | 10 ++-------- .../cases/0000_cli/bool_option_with_value.test | 3 --- .../cases/0000_cli/command_line_options.test | 3 --- .../cases/0000_dds/dds_notifications.test | 4 ++-- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/app/orionld/orionld.cpp b/src/app/orionld/orionld.cpp index 3dc0ce9df4..e57ec303eb 100644 --- a/src/app/orionld/orionld.cpp +++ b/src/app/orionld/orionld.cpp @@ -252,8 +252,6 @@ bool noArrayReduction = false; char subordinateEndpoint[256]; char defaultUserContextUrl[256]; bool ddsSupport = false; -char ddsSubsTopics[512]; -char ddsTopicType[512]; char configFile[512]; @@ -349,9 +347,6 @@ char configFile[512]; #define CORE_CONTEXT_DESC "core context version (v1.0|v1.3|v1.4|v1.5|v1.6|v1.7) - v1.6 is default" #define NO_PROM_DESC "run without Prometheus metrics" #define NO_ARR_REDUCT_DESC "skip JSON-LD Array Reduction" -#define USE_DDS_DESC "turn on DDS support" -#define DDS_SUBS_TOPICS_DESC "topics to subscribe to on DDS" -#define DDS_TOPIC_TYPE_DESC "DDS topic type" #define CONFIG_FILE_DESC "Path to configuration file" #define SUBORDINATE_ENDPOINT_DESC "endpoint URL for reception of notificatiopns from subordinate subscriptions (distributed subscriptions)" #define PAGE_SIZE_DESC "default page size (no of entities, subscriptions, registrations)" @@ -462,9 +457,6 @@ PaArgument paArgs[] = { "-noArrayReduction", &noArrayReduction, "NO_ARRAY_REDUCTION", PaBool, PaHid, false, false, true, NO_ARR_REDUCT_DESC }, { "-subordinateEndpoint", &subordinateEndpoint, "SUBORDINATE_ENDPOINT", PaStr, PaOpt, _i "", PaNL, PaNL, SUBORDINATE_ENDPOINT_DESC }, { "-pageSize", &pageSize, "PAGE_SIZE", PaInt, PaOpt, 20, 1, 1000, PAGE_SIZE_DESC }, - { "-dds", &ddsSupport, "DDS", PaBool, PaOpt, false, false, true, USE_DDS_DESC }, - { "-ddsSubsTopics", ddsSubsTopics, "DDS_SUBS_TOPICS", PaString, PaOpt, _i "", PaNL, PaNL, DDS_SUBS_TOPICS_DESC }, - { "-ddsTopicType", ddsTopicType, "DDS_TOPIC_TYPE", PaString, PaOpt, _i "NGSI-LD", PaNL, PaNL, DDS_TOPIC_TYPE_DESC }, { "-configFile", configFile, "CONFIG_FILE", PaString, PaOpt, _i "", PaNL, PaNL, CONFIG_FILE_DESC }, { "-duc", defaultUserContextUrl, "DUC_URL", PaString, PaOpt, _i "", PaNL, PaNL, DUC_URL_DESC }, @@ -1129,6 +1121,8 @@ int main(int argC, char* argV[]) entityMapsEnabled = true; else if (strcmp(wipV[ix], "distSubs") == 0) distSubsEnabled = true; + else if (strcmp(wipV[ix], "dds") == 0) + ddsSupport = true; else LM_X(1, ("Invalid value for -wip comma-separated list (allowed: 'entityMaps', 'distSubs')")); } diff --git a/test/functionalTest/cases/0000_cli/bool_option_with_value.test b/test/functionalTest/cases/0000_cli/bool_option_with_value.test index 2207552b71..a13ca1a508 100644 --- a/test/functionalTest/cases/0000_cli/bool_option_with_value.test +++ b/test/functionalTest/cases/0000_cli/bool_option_with_value.test @@ -116,9 +116,6 @@ Usage: orionld [option '-U' (extended usage)] [option '-brokerId' ] [option '-subordinateEndpoint' ] [option '-pageSize' ] - [option '-dds' (turn on DDS support)] - [option '-ddsSubsTopics' ] - [option '-ddsTopicType' ] [option '-configFile' ] [option '-duc' ] diff --git a/test/functionalTest/cases/0000_cli/command_line_options.test b/test/functionalTest/cases/0000_cli/command_line_options.test index eabadca47c..b11034c2f7 100644 --- a/test/functionalTest/cases/0000_cli/command_line_options.test +++ b/test/functionalTest/cases/0000_cli/command_line_options.test @@ -105,9 +105,6 @@ Usage: orionld [option '-U' (extended usage)] [option '-brokerId' ] [option '-subordinateEndpoint' ] [option '-pageSize' ] - [option '-dds' (turn on DDS support)] - [option '-ddsSubsTopics' ] - [option '-ddsTopicType' ] [option '-configFile' ] [option '-duc' ] diff --git a/test/functionalTest/cases/0000_dds/dds_notifications.test b/test/functionalTest/cases/0000_dds/dds_notifications.test index aaf60ddf36..c987819914 100644 --- a/test/functionalTest/cases/0000_dds/dds_notifications.test +++ b/test/functionalTest/cases/0000_dds/dds_notifications.test @@ -27,7 +27,7 @@ the test client publishes on DDS, the broker receives DDS notifications and crea $REPO_HOME/scripts/configFile.sh "P1,Camera,urn:ngsi-ld:camera:cam1,shutterSpeed" "P2,Arm,urn:ngsi-ld:arm:arm1,armReach" > $HOME/.orionld $REPO_HOME/scripts/configFile.sh "P1,Camera,urn:ngsi-ld:camera:cam1,shutterSpeed" "P2,Arm,urn:ngsi-ld:arm:arm1,armReach" > $HOME/.ftClient dbInit CB -orionldStart CB -mongocOnly -dds +orionldStart CB -mongocOnly -wip dds ftClientStart -t 0-5000 --SHELL-- @@ -97,7 +97,7 @@ echo # echo "=========================================================================" # brokerStop # dbInit CB > /dev/null -# orionldStart CB -mongocOnly -dds -ddsConfigFile /tmp/ddsConfig > /dev/null +# orionldStart CB -mongocOnly -wip dds -ddsConfigFile /tmp/ddsConfig > /dev/null # echo Orion-LD is running again # echo # echo From 6f4336e3f5c217a241a0896b97e8f523ba7a1c54 Mon Sep 17 00:00:00 2001 From: Ken Zangelin Date: Mon, 14 Oct 2024 18:29:45 +0200 Subject: [PATCH 2/2] CHANGES_NEXT_RELEASE --- CHANGES_NEXT_RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index c0c375efd9..4877065ca8 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -4,7 +4,7 @@ #1682: Default User Context ## New Features: - * Native support for DDS + * Native support for DDS (off by default - to activate use CLI: -wip dds) * Distributed subscriptions: subordinate subscriptions are DELETED when their "father" is deleted. * Support for the URL parameter 'csf' in GET /ngsi-ld/v1/csourceRegistrations * Support for the URL parameter 'orderBy' (must be an attribute) in GET /ngsi-ld/v1/entities, but only if 'local' is set. (This is not NGSI-LD standard. Yet ...)