diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE
index e69de29bb2..5ff9e28073 100644
--- a/CHANGES_NEXT_RELEASE
+++ b/CHANGES_NEXT_RELEASE
@@ -0,0 +1 @@
+- Fix: registrations with more than one contextRegistration element (not possible in NGSIv2) are logged as Runtime Errors
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c922231cf..3feac647f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -187,20 +187,18 @@ ENDIF()
SET (ORION_LIBS
common
+ rest # verbName(Verb) from setExtendedHttpInfo@MongoCommonSubscription.cpp.o; jsonRequestTreat from payloadParse@RestService.cpp.o;
serviceRoutinesV2
serviceRoutines
ngsiNotify
- rest # verbName(Verb) from setExtendedHttpInfo@MongoCommonSubscription.cpp.o; jsonRequestTreat from payloadParse@RestService.cpp.o;
- jsonParse
jsonParseV2
rest # this is repeated for linking str2Verb from parseSubscription@parseSubscription.cpp.o;
# verbName(Verb) from setExtendedHttpInfo@MongoCommonSubscription.cpp.o
- convenience
- ngsi9
+ mongoBackend
ngsi10
ngsi
cache
- mongoBackend
+ mongoBackend # repeated (probably due to some circular dependency between mongoBackend and ngsi)
mongoDriver
parse
apiTypesV2
@@ -325,13 +323,10 @@ if (error EQUAL 0)
ADD_SUBDIRECTORY(src/lib/ngsi)
ADD_SUBDIRECTORY(src/lib/serviceRoutines)
ADD_SUBDIRECTORY(src/lib/serviceRoutinesV2)
- ADD_SUBDIRECTORY(src/lib/convenience)
- ADD_SUBDIRECTORY(src/lib/ngsi9)
ADD_SUBDIRECTORY(src/lib/ngsi10)
ADD_SUBDIRECTORY(src/lib/ngsiNotify)
ADD_SUBDIRECTORY(src/lib/apiTypesV2)
ADD_SUBDIRECTORY(src/lib/parse)
- ADD_SUBDIRECTORY(src/lib/jsonParse)
ADD_SUBDIRECTORY(src/lib/jsonParseV2)
ADD_SUBDIRECTORY(src/lib/rest)
ADD_SUBDIRECTORY(src/lib/mongoBackend)
diff --git a/doc/manuals.jp/admin/cli.md b/doc/manuals.jp/admin/cli.md
index bdc50ba14a..1d20fcb7ca 100644
--- a/doc/manuals.jp/admin/cli.md
+++ b/doc/manuals.jp/admin/cli.md
@@ -94,9 +94,6 @@ broker はデフォルトでバックグラウンドで実行されるため、
- **-logLineMaxSize** : ログ行の最大長 (超過すると、Orion は `LINE TOO LONG` をログ・トレースとして出力します)。最小許容値:100バイト。デフォルト値:32キロバイト。Orion の起動後に [log admin REST API](management_api.md#log-configs-and-trace-levels) の `lineMaxSize` フィールドで変更できます
- **-logInfoPayloadMaxSize** : リクエストおよび/またはレスポンス・ペイロードを出力する INFO レベルのログ・トレースの場合、これはそれらのペイロードに許可される最大サイズです。ペイロード・サイズがこの設定より大きい場合、最初の `-logInfoPayloadMaxSize` バイトのみが含まれます (そして、`(...)` の形式の省略記号がトレースに表示されます)。デフォルト値:5キロバイト。Orion の起動後に [log admin REST API](management_api.md#log-configs-and-trace-levels) で `infoPayloadMaxSize` フィールドを使用して変更できます。
- **-disableMetrics** : 'metrics' 機能をオフにします。メトリックの収集は、システムコールやセマフォが関与するため、少しコストがかかります。メトリックオーバーヘッドなしで broker を起動するには、このパラメータを使用します
-- **-disableNgsiv1** : NGSIv1 操作をオフにします。 API エンドポイントのみが無効になることに注意してください。
- [`"attrsFormat": "legacy"`](../orion-api.md#subscriptionnotification) を使用する通知や、
- [`"legacyForwarding": true`](../orion-api.md#registrationprovider) を使用するレジストレーションに対応するリクエスト転送は機能します
- **-insecureNotif** : 既知の CA 証明書で認証できないピアへの HTTPS 通知を許可する。これは、curl コマンドのパラメータ `-k` または `--insecureparameteres` に似ています
- **-mqttMaxAge** : 未使用の MQTT 接続が保持される最大時間 (分単位)。デフォルト値: 60
- **-logDeprecate** : 非推奨の使用法を警告として記録します。詳細については、[ドキュメントのこのセクション](../deprecated.md#log-deprecation-warnings) を参照してください。デフォルトは false です。これは、Orion の起動後に [log admin REST API](management_api.md#log-configs-and-trace-levels) を使用して `deprecated` フィールドを使用して変更できます
@@ -160,14 +157,11 @@ Orion は、環境変数を使用した引数の受け渡しをサポートし
| ORION_STAT_NOTIF_QUEUE | statNotifQueue |
| ORION_LOG_SUMMARY_PERIOD | logSummary |
| ORION_RELOG_ALARMS | relogAlarms |
-| ORION_CHECK_ID_V1 | strictNgsiv1Ids |
| ORION_DISABLE_CUSTOM_NOTIF | disableCustomNotifications |
| ORION_DISABLE_FILE_LOG | disableFileLog |
| ORION_LOG_FOR_HUMANS | logForHumans |
| ORION_LOG_LINE_MAX_SIZE | logLineMaxSize |
| ORION_LOG_INFO_PAYLOAD_MAX_SIZE | logInfoPayloadMaxSize |
| ORION_DISABLE_METRICS | disableMetrics |
-| ORION_DISABLE_NGSIV1 | disableNgsiv1 |
| ORION_INSECURE_NOTIF | insecureNotif |
-| ORION_NGSIV1_AUTOCAST | ngsiv1Autocast |
| ORION_MQTT_MAX_AGE | mqttMaxAge |
diff --git a/doc/manuals.jp/admin/logs.md b/doc/manuals.jp/admin/logs.md
index 37962c15a4..da892c6ea9 100644
--- a/doc/manuals.jp/admin/logs.md
+++ b/doc/manuals.jp/admin/logs.md
@@ -351,8 +351,6 @@ time=2020-10-26T15:06:14.642Z | lvl=INFO | corr=c4a3192e-179c-11eb-ac8f-000c29df
```
time=2024-01-11T13:57:13.537Z | lvl=WARN | corr=527378d8-b089-11ee-875d-080027cd35f1 | trans=1704981432-655-00000000006 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=mongoRegistrationCreate.cpp[235]:mongoRegistrationCreate | msg=Deprecated usage of legacyForwarding mode in registration creation (regId: 659ff3b9691855f16d00ec5a)
time=2024-01-11T13:57:13.565Z | lvl=WARN | corr=52778eaa-b089-11ee-861c-080027cd35f1 | trans=1704981432-655-00000000007 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=mongoRegistrationGet.cpp[93]:setProvider | msg=Deprecated usage of legacyForwarding mode detected in existing registration (regId: 659ff3b9691855f16d00ec5a)
-time=2024-01-11T13:57:13.595Z | lvl=WARN | corr=527c0912-b089-11ee-bb8c-080027cd35f1 | trans=1704981432-655-00000000008 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=postQueryContext.cpp[191]:queryForward | msg=Deprecated usage of legacyForwarding mode in query forwarding operation (regId: 659ff3b9691855f16d00ec5a)
-time=2024-01-11T13:57:13.624Z | lvl=WARN | corr=52808938-b089-11ee-9835-080027cd35f1 | trans=1704981432-655-00000000010 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=postUpdateContext.cpp[163]:updateForward | msg=Deprecated usage of legacyForwarding mode in update forwarding operation (regId: 659ff3b9691855f16d00ec5a)
```
* `geo:point`, `geo:line`, `geo:box` また `geo:line` の使用
diff --git a/doc/manuals.jp/admin/statistics.md b/doc/manuals.jp/admin/statistics.md
index 2aa42f09e7..72fed7025b 100644
--- a/doc/manuals.jp/admin/statistics.md
+++ b/doc/manuals.jp/admin/statistics.md
@@ -44,8 +44,7 @@ Orion Context broker は、`GET /statistics` と `GET /cache/statistics` を介
"counters": {
"deprecatedFeatures": {
"geoFormat": 2,
- "ngsiv1Forwarding": 4,
- "ngsiv1Requests": 4
+ "ngsiv1Forwarding": 4
},
"invalidRequests": 2,
"jsonRequests": 4,
@@ -113,7 +112,6 @@ SemWait ブロックは、メインの内部セマフォの累積待ち時間を
...
"timing": {
"accumulated": {
- "jsonV1Parse": 7.860908311,
"jsonV2Parse": 120.680244446,
"mongoBackend": 12778.52734375,
"mongoReadWait": 7532.301757812,
@@ -143,7 +141,6 @@ SemWait ブロックは、メインの内部セマフォの累積待ち時間を
特定のカウンタは次のとおりです :
* `total` : HTTP ライブラリがリクエスト/レスポンス・ディスパッチ (擬似エンド・ツー・エンド時間) にかかる時間を除く、リクエスト全体の処理時間です
-* `jsonV1Parse` : NGSIv1 JSON パース・モジュールで渡された時間です (疑似セルフタイム)
* `jsonV2Parse` : NGSIv2 JSON パース・モジュールで渡された時間です (疑似セルフタイム)
* `mongoBackend` : mongoBackend モジュールで渡された時間です (疑似セルフタイム)
* `render` : レンダリングモジュールに渡された時間です (擬似セルフタイム)
diff --git a/doc/manuals.jp/devel/ServiceRoutines.txt b/doc/manuals.jp/devel/ServiceRoutines.txt
index 100340df28..f63c23057f 100644
--- a/doc/manuals.jp/devel/ServiceRoutines.txt
+++ b/doc/manuals.jp/devel/ServiceRoutines.txt
@@ -76,242 +76,6 @@ API V2:
* /v2/op/update badVerbPostOnly
-V0 STANDARD REGISTRY REQUESTS:
-====================================================================================================
- POST /ngsi9/registerContext postRegisterContext ------------------------------------------------------------------------------------------------------> mongoRegisterContext
- * /ngsi9/registerContext badVerbPostOnly
-
- POST /ngsi9/discoverContextAvailability postDiscoverContextAvailability ------------------------------------------------------------------------------------------> mongoDiscoverContextAvailability
- * /ngsi9/discoverContextAvailability badVerbPostOnly
-
-
-V1 STANDARD REGISTRY REQUESTS:
-====================================================================================================
- POST /v1/registerContext postRegisterContext ------------------------------------------------------------------------------------------------------> mongoRegisterContext
- * /v1/registerContext badVerbPostOnly
-
- POST /v1/discoverContextAvailability postDiscoverContextAvailability ------------------------------------------------------------------------------------------> mongoDiscoverContextAvailability
- * /v1/discoverContextAvailability badVerbPostOnly
-
-
-V0 STANDARD REQUESTS:
-====================================================================================================
- POST /ngsi10/updateContext postUpdateContext --------------------------------------------------------------------------------------------------------> mongoUpdateContext
- * /ngsi10/updateContext badVerbPostOnly
-
- POST /ngsi10/queryContext postQueryContext ---------------------------------------------------------------------------------------------------------> mongoQueryContext
- * /ngsi10/queryContext badVerbPostOnly
-
- POST /ngsi10/subscribeContext postSubscribeContext -----------------------------------------------------------------------------------------------------> mongoSubscribeContext
- * /ngsi10/subscribeContext badVerbPostOnly
-
- POST /ngsi10/unsubscribeContext postUnsubscribeContext ---------------------------------------------------------------------------------------------------> mongoUnsubscribeContext
- * /ngsi10/unsubscribeContext badVerbPostOnly
-
- POST /ngsi10/updateContextSubscription postUpdateContextSubscription --------------------------------------------------------------------------------------------> mongoUpdateContextSubscription
- * /ngsi10/updateContextSubscription badVerbPostOnly
-
- POST /ngsi10/notifyContext postNotifyContext --------------------------------------------------------------------------------------------------------> mongoNotifyContext
- * /ngsi10/notifyContext badVerbPostOnly
-
-
-V1 STANDARD REQUESTS:
-====================================================================================================
- POST /v1/updateContext postUpdateContext --------------------------------------------------------------------------------------------------------> mongoUpdateContext
- * /v1/updateContext badVerbPostOnly
-
- POST /v1/queryContext postQueryContext ---------------------------------------------------------------------------------------------------------> mongoQueryContext
- * /v1/queryContext badVerbPostOnly
-
- POST /v1/subscribeContext postSubscribeContext -----------------------------------------------------------------------------------------------------> mongoSubscribeContext
- * /v1/subscribeContext badVerbPostOnly
-
- POST /v1/unsubscribeContext postUnsubscribeContext ---------------------------------------------------------------------------------------------------> mongoUnsubscribeContext
- * /v1/unsubscribeContext badVerbPostOnly
-
- POST /v1/updateContextSubscription postUpdateContextSubscription --------------------------------------------------------------------------------------------> mongoUpdateContextSubscription
- * /v1/updateContextSubscription badVerbPostOnly
-
- POST /v1/notifyContext postNotifyContext --------------------------------------------------------------------------------------------------------> mongoNotifyContext
- * /v1/notifyContext badVerbPostOnly
-
-
-V0 REGISTRY CONVENIENCE OPERATIONS:
-====================================================================================================
- GET /ngsi9/contextEntities/{EID} getContextEntitiesByEntityId ------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntities/{EID} postContextEntitiesByEntityId -----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntities/{EID} badVerbGetPostOnly
-
- GET /ngsi9/contextEntities/{EID}/attributes getContextEntityAttributes --------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntities/{EID}/attributes postContextEntityAttributes -------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntities/{EID}/attributes badVerbGetPostOnly
-
- GET /ngsi9/contextEntities/{EID}/attributes/{ATTRNAME} getEntityByIdAttributeByName ------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntities/{EID}/attributes/{ATTRNAME} postEntityByIdAttributeByName -----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntities/{EID}/attributes/{ATTRNAME} badVerbGetPostOnly
-
- GET /ngsi9/contextEntityTypes/{ETYPE} getContextEntityTypes -------------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntityTypes/{ETYPE} postContextEntityTypes ------------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntityTypes/{ETYPE} badVerbGetPostOnly
-
- GET /ngsi9/contextEntityTypes/{ETYPE}/attributes getContextEntityTypes -------------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntityTypes/{ETYPE}/attributes postContextEntityTypes ------------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntityTypes/{ETYPE}/attributes badVerbGetPostOnly
-
- GET /ngsi9/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} getContextEntityTypeAttribute -----------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} postContextEntityTypeAttribute ----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} badVerbGetPostOnly
-
-
-V1 REGISTRY CONVENIENCE OPERATIONS:
-====================================================================================================
- GET /v1/registry/contextEntities/{EID} getContextEntitiesByEntityId ------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntities/{EID} postContextEntitiesByEntityId -----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntities/{EID} badVerbGetPostOnly
-
- GET /v1/registry/contextEntities/{EID}/attributes getContextEntityAttributes --------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntities/{EID}/attributes postContextEntityAttributes -------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntities/{EID}/attributes badVerbGetPostOnly
-
- GET /v1/registry/contextEntities/{EID}/attributes/{ATTRNAME} getEntityByIdAttributeByName ------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntities/{EID}/attributes/{ATTRNAME} postEntityByIdAttributeByName -----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntities/{EID}/attributes/{ATTRNAME} badVerbGetPostOnly
-
- GET /v1/registry/contextEntityTypes/{ETYPE} getContextEntityTypes -------------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntityTypes/{ETYPE} postContextEntityTypes ------------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntityTypes/{ETYPE} badVerbGetPostOnly
-
- GET /v1/registry/contextEntityTypes/{ETYPE}/attributes getContextEntityTypes -------------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntityTypes/{ETYPE}/attributes postContextEntityTypes ------------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntityTypes/{ETYPE}/attributes badVerbGetPostOnly
-
- GET /v1/registry/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} getContextEntityTypeAttribute -----------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} postContextEntityTypeAttribute ----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} badVerbGetPostOnly
-
-V0 CONVENIENCE OPERATIONS:
-====================================================================================================
- GET /ngsi10/contextEntities/{EID} getIndividualContextEntity --------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /ngsi10/contextEntities/{EID} putIndividualContextEntity --------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /ngsi10/contextEntities/{EID} postIndividualContextEntity -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /ngsi10/contextEntities/{EID} deleteIndividualContextEntity -----------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /ngsi10/contextEntities/{EID} badVerbAllFour
-
- GET /ngsi10/contextEntities/{EID}/attributes getIndividualContextEntity --------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /ngsi10/contextEntities/{EID}/attributes putIndividualContextEntity --------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /ngsi10/contextEntities/{EID}/attributes postIndividualContextEntity -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /ngsi10/contextEntities/{EID}/attributes deleteIndividualContextEntity -----------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /ngsi10/contextEntities/{EID}/attributes badVerbAllFour
-
- GET /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME} getIndividualContextEntityAttribute -----------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME} putIndividualContextEntityAttribute -----------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME} postIndividualContextEntityAttribute ----------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME} deleteIndividualContextEntityAttribute --------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME} badVerbAllFour
-
- GET /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} getAttributeValueInstance ---------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} putAttributeValueInstance ---------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} deleteAttributeValueInstance ------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} badVerbGetPutDeleteOnly
-
- GET /ngsi10/contextEntityTypes/{ETYPE} getNgsi10ContextEntityTypes -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /ngsi10/contextEntityTypes/{ETYPE} badVerbGetOnly
-
- GET /ngsi10/contextEntityTypes/{ETYPE}/attributes getNgsi10ContextEntityTypes -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /ngsi10/contextEntityTypes/{ETYPE}/attributes badVerbGetOnlyy
-
- GET /ngsi10/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} getNgsi10ContextEntityTypesAttribute ----------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /ngsi10/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} badVerbGetOnly
-
- POST /ngsi10/contextSubscriptions postSubscribeContextConvOp --------------------------------> postSubscribeContext ----------------------------------------> mongoSubscribeContext
- * /ngsi10/contextSubscriptions badVerbPostOnly
-
- PUT /ngsi10/contextSubscriptions/{SUBID} putSubscriptionConvOp -------------------------------------> postUpdateContextSubscription -------------------------------> mongoUpdateContextSubscription
- DELETE /ngsi10/contextSubscriptions/{SUBID} deleteSubscriptionConvOp ----------------------------------> postUnsubscribeContext --------------------------------------> mongoUnsubscribeContext
- * /ngsi10/contextSubscriptions/{SUBID} badVerbPutDeleteOnly
-
-
-V1 CONVENIENCE OPERATIONS:
-====================================================================================================
- GET /v1/contextEntities/{EID} getIndividualContextEntity --------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /v1/contextEntities/{EID} putIndividualContextEntity --------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /v1/contextEntities/{EID} postIndividualContextEntity -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/{EID} deleteIndividualContextEntity -----------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/{EID} badVerbAllFour
-
- GET /v1/contextEntities/{EID}/attributes getIndividualContextEntity --------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /v1/contextEntities/{EID}/attributes putIndividualContextEntity --------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /v1/contextEntities/{EID}/attributes postIndividualContextEntity -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/{EID}/attributes deleteIndividualContextEntity -----------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/{EID}/attributes badVerbAllFour
-
- GET /v1/contextEntities/{EID}/attributes/{ATTRNAME} getIndividualContextEntityAttribute -----------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /v1/contextEntities/{EID}/attributes/{ATTRNAME} putIndividualContextEntityAttribute -----------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /v1/contextEntities/{EID}/attributes/{ATTRNAME} postIndividualContextEntityAttribute ----------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/{EID}/attributes/{ATTRNAME} deleteIndividualContextEntityAttribute --------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/{EID}/attributes/{ATTRNAME} badVerbAllFour
-
- GET /v1/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} getAttributeValueInstance ---------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /v1/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} putAttributeValueInstance ---------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} deleteAttributeValueInstance ------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} badVerbGetPutDeleteOnly
-
- GET /v1/contextEntityTypes/{ETYPE} getNgsi10ContextEntityTypes -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /v1/contextEntityTypes/{ETYPE} badVerbGetOnly
-
- GET /v1/contextEntityTypes/{ETYPE}/attributes getNgsi10ContextEntityTypes -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /v1/contextEntityTypes/{ETYPE}/attributes badVerbGetOnlyy
-
- GET /v1/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} getNgsi10ContextEntityTypesAttribute ----------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /v1/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} badVerbGetOnly
-
- POST /v1/contextSubscriptions postSubscribeContextConvOp --------------------------------> postSubscribeContext ----------------------------------------> mongoSubscribeContext
- * /v1/contextSubscriptions badVerbPostOnly
-
- PUT /v1/contextSubscriptions/{SUBID} putSubscriptionConvOp -------------------------------------> postUpdateContextSubscription -------------------------------> mongoUpdateContextSubscription
- DELETE /v1/contextSubscriptions/{SUBID} deleteSubscriptionConvOp ----------------------------------> postUnsubscribeContext --------------------------------------> mongoUnsubscribeContext
- * /v1/contextSubscriptions/{SUBID} badVerbPutDeleteOnly
-
-
-TID CONVENIENCE OPERATIONS:
-====================================================================================================
- GET /v1/contextTypes getEntityTypes -----------------------------------------------------------------------------------------------------------> mongoEntityTypes
- * /v1/contextTypes badVerbGetOnly
-
- GET /v1/contextTypes/{ETYPE} getAttributesForEntityType ----------------------------------------------------------------------------------------------> mongoAttributesForEntityType
- * /v1/contextTypes/{ETYPE} badVerbGetOnly
-
- GET /v1/contextEntities getAllContextEntities -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- POST /v1/contextEntities postIndividualContextEntity -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities badVerbGetPostOnly
-
- GET /v1/contextEntities/type/{ETYPE}/id/{EID} getAllEntitiesWithTypeAndId -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- POST /v1/contextEntities/type/{ETYPE}/id/{EID} postAllEntitiesWithTypeAndId ------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- PUT /v1/contextEntities/type/{ETYPE}/id/{EID} putAllEntitiesWithTypeAndId -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/type/{ETYPE}/id/{EID} deleteAllEntitiesWithTypeAndId ----------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/type/{ETYPE}/id/{EID} badVerbAllFour
-
- GET /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME} getIndividualContextEntityAttributeWithTypeAndId -------> postQueryContext --------------------------------------------> mongoQueryContext
- POST /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME} postIndividualContextEntityAttributeWithTypeAndId -------> postUpdateContext -------------------------------------------> mongoUpdateContext
- PUT /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME} putIndividualContextEntityAttributeWithTypeAndId -------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME} deleteIndividualContextEntityAttributeWithTypeAndId -------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME} badVerbAllFour
-
- GET /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME}/{ID} getAttributeValueInstanceWithTypeAndId -----------------> postQueryContext --------------------------------------------> mongoQueryContext
- POST /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME}/{ID} postAttributeValueInstanceWithTypeAndId -----------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- PUT /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME}/{ID} putAttributeValueInstanceWithTypeAndId -----------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME}/{ID} deleteAttributeValueInstanceWithTypeAndId -----------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME}/{ID} badVerbAllFour
-
- GET /v1/registry/contextEntities/type/{ETYPE}/id/{ID} getContextEntitiesByEntityIdAndType -----------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntities/type/{ETYPE}/id/{ID} postContextEntitiesByEntityIdAndType -----------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntities/type/{ETYPE}/id/{ID} badVerbGetPostOnly
-
- GET /v1/registry/contextEntities/type/{ETYPE}/id/{ID}/attributes/{ATTRNAME} getEntityByIdAttributeByNameWithTypeAndId ----------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntities/type/{ETYPE}/id/{ID}/attributes/{ATTRNAME} postEntityByIdAttributeByNameWithTypeAndId ----------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntities/type/{ETYPE}/id/{ID}/attributes/{ATTRNAME} badVerbGetPostOnly
-
-
MISC REQUESTS:
====================================================================================================
GET /log/trace logTraceTreat
@@ -330,38 +94,14 @@ MISC REQUESTS:
DELETE /log/traceLevel/{TRACELEVEL} logTraceTreat
* /log/traceLevel/{TRACELEVEL} badVerbPutDeleteOnly
- GET /v1/admin/log/trace logTraceTreat
- DELETE /v1/admin/log/trace logTraceTreat
- * /v1/admin/log/trace badVerbGetDeleteOnly
-
- PUT /v1/admin/log/trace/{TRACELEVEL} logTraceTreat
- DELETE /v1/admin/log/trace/{TRACELEVEL} logTraceTreat
- * /v1/admin/log/trace/{TRACELEVEL} badVerbPutDeleteOnly
-
- GET /v1/admin/log/traceLevel logTraceTreat
- DELETE /v1/admin/log/traceLevel logTraceTreat
- * /v1/admin/log/traceLevel badVerbGetDeleteOnly
-
- PUT /v1/admin/log/traceLevel/{TRACELEVEL} logTraceTreat
- DELETE /v1/admin/log/traceLevel/{TRACELEVEL} logTraceTreat
- * /v1/admin/log/traceLevel/{TRACELEVEL} badVerbPutDeleteOnly
-
GET /statistics statisticsTreat
DELETE /statistics statisticsTreat
* /statistics badVerbGetDeleteOnly
- GET /v1/admin/statistics statisticsTreat
- DELETE /v1/admin/statistics statisticsTreat
- * /v1/admin/statistics badVerbGetDeleteOnly
-
GET /cache/statistics statisticsCacheTreat
DELETE /cache/statistics statisticsCacheTreat
* /cache/statistics badVerbGetDeleteOnly
- GET /v1/admin/cache/statistics statisticsCacheTreat
- DELETE /v1/admin/cache/statistics statisticsCacheTreat
- * /v1/admin/cache/statistics badVerbGetDeleteOnly
-
GET /version versionTreat
OPTIONS /version optionsVersionRequest
* /version badVerbGetOnly
diff --git a/doc/manuals/admin/cli.md b/doc/manuals/admin/cli.md
index 0159a4e1a8..b96a3a84d4 100644
--- a/doc/manuals/admin/cli.md
+++ b/doc/manuals/admin/cli.md
@@ -157,9 +157,6 @@ The list of available options is the following:
- **-logInfoPayloadMaxSize**. For those log traces at INFO level that print request and/or response payloads, this is the maximum allowed size for those payloads. If the payload size is greater than this setting, then only the first `-logInfoPayloadMaxSize` bytes are included (and an ellipsis in the form of `(...)` is shown in trace). Default value: 5 KBytes. It can be changed after Orion startup with the [log admin REST API](management_api.md#log-configs-and-trace-levels), with the `infoPayloadMaxSize` field.
- **-disableMetrics**. To turn off the 'metrics' feature. Gathering of metrics is a bit costly, as system calls and semaphores are involved.
Use this parameter to start the broker without metrics overhead.
-- **-disableNgsiv1**. To turn off NGSIv1 operations. Note that only API endpoints are disabled, notifications using
- [`"attrsFormat": "legacy"`](../orion-api.md#subscriptionnotification) or forward requests corresponding to registrations
- using [`"legacyForwarding": true`](../orion-api.md#registrationprovider) will work.
- **-insecureNotif**. Allow HTTPS notifications to peers which certificate cannot be authenticated with known CA certificates. This is similar
to the `-k` or `--insecure` parameteres of the curl command.
- **-mqttMaxAge**. Max time (in minutes) that an unused MQTT connection is kept. Default: 60
@@ -224,15 +221,12 @@ Two facts have to be taken into account:
| ORION_STAT_NOTIF_QUEUE | statNotifQueue |
| ORION_LOG_SUMMARY_PERIOD | logSummary |
| ORION_RELOG_ALARMS | relogAlarms |
-| ORION_CHECK_ID_V1 | strictNgsiv1Ids |
| ORION_DISABLE_CUSTOM_NOTIF | disableCustomNotifications |
| ORION_DISABLE_FILE_LOG | disableFileLog |
| ORION_LOG_FOR_HUMANS | logForHumans |
| ORION_LOG_LINE_MAX_SIZE | logLineMaxSize |
| ORION_LOG_INFO_PAYLOAD_MAX_SIZE | logInfoPayloadMaxSize |
| ORION_DISABLE_METRICS | disableMetrics |
-| ORION_DISABLE_NGSIV1 | disableNgsiv1 |
| ORION_INSECURE_NOTIF | insecureNotif |
-| ORION_NGSIV1_AUTOCAST | ngsiv1Autocast |
| ORION_MQTT_MAX_AGE | mqttMaxAge |
| ORION_LOG_DEPRECATE | logDeprecate |
diff --git a/doc/manuals/admin/logs.md b/doc/manuals/admin/logs.md
index ae145c427c..9624d7760f 100644
--- a/doc/manuals/admin/logs.md
+++ b/doc/manuals/admin/logs.md
@@ -411,8 +411,6 @@ following WARN traces are generated:
```
time=2024-01-11T13:57:13.537Z | lvl=WARN | corr=527378d8-b089-11ee-875d-080027cd35f1 | trans=1704981432-655-00000000006 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=mongoRegistrationCreate.cpp[235]:mongoRegistrationCreate | msg=Deprecated usage of legacyForwarding mode in registration creation (regId: 659ff3b9691855f16d00ec5a)
time=2024-01-11T13:57:13.565Z | lvl=WARN | corr=52778eaa-b089-11ee-861c-080027cd35f1 | trans=1704981432-655-00000000007 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=mongoRegistrationGet.cpp[93]:setProvider | msg=Deprecated usage of legacyForwarding mode detected in existing registration (regId: 659ff3b9691855f16d00ec5a)
-time=2024-01-11T13:57:13.595Z | lvl=WARN | corr=527c0912-b089-11ee-bb8c-080027cd35f1 | trans=1704981432-655-00000000008 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=postQueryContext.cpp[191]:queryForward | msg=Deprecated usage of legacyForwarding mode in query forwarding operation (regId: 659ff3b9691855f16d00ec5a)
-time=2024-01-11T13:57:13.624Z | lvl=WARN | corr=52808938-b089-11ee-9835-080027cd35f1 | trans=1704981432-655-00000000010 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=postUpdateContext.cpp[163]:updateForward | msg=Deprecated usage of legacyForwarding mode in update forwarding operation (regId: 659ff3b9691855f16d00ec5a)
```
* Usages of `geo:point`, `geo:line`, `geo:box` or `geo:line`.
diff --git a/doc/manuals/admin/statistics.md b/doc/manuals/admin/statistics.md
index 2f8bf60f17..804f3c1ab9 100644
--- a/doc/manuals/admin/statistics.md
+++ b/doc/manuals/admin/statistics.md
@@ -56,8 +56,7 @@ The counter block provides information about counters for the times a particular
"counters": {
"deprecatedFeatures": {
"geoFormat": 2,
- "ngsiv1Forwarding": 4,
- "ngsiv1Requests": 4
+ "ngsiv1Forwarding": 4
},
"invalidRequests": 2,
"jsonRequests": 4,
@@ -127,7 +126,6 @@ Provides timing information, i.e. the time that CB passes executing in different
...
"timing": {
"accumulated": {
- "jsonV1Parse": 7.860908311,
"jsonV2Parse": 120.680244446,
"mongoBackend": 12778.52734375,
"mongoReadWait": 7532.301757812,
@@ -159,7 +157,6 @@ The particular counters are as follows:
* `total`: processing time for the whole request, excluding the time that the HTTP library
takes for request/response dispatching (pseudo end-to-end time)
-* `jsonV1Parse`: time passed in NGSIv1 JSON parsing module (pseudo self-time)
* `jsonV2Parse`: time passed in NGSIv2 JSON parsing module (pseudo self-time)
* `mongoBackend`: time passed in mongoBackend module (pseduo self-time)
* `render`: time passed in rendering module (pseudo self-time)
diff --git a/doc/manuals/devel/ServiceRoutines.txt b/doc/manuals/devel/ServiceRoutines.txt
index f43c05a97f..a9710186eb 100644
--- a/doc/manuals/devel/ServiceRoutines.txt
+++ b/doc/manuals/devel/ServiceRoutines.txt
@@ -76,243 +76,6 @@ API V2:
* /v2/op/update badVerbPostOnly
-V0 STANDARD REGISTRY REQUESTS:
-====================================================================================================
- POST /ngsi9/registerContext postRegisterContext ------------------------------------------------------------------------------------------------------> mongoRegisterContext
- * /ngsi9/registerContext badVerbPostOnly
-
- POST /ngsi9/discoverContextAvailability postDiscoverContextAvailability ------------------------------------------------------------------------------------------> mongoDiscoverContextAvailability
- * /ngsi9/discoverContextAvailability badVerbPostOnly
-
-
-V1 STANDARD REGISTRY REQUESTS:
-====================================================================================================
- POST /v1/registerContext postRegisterContext ------------------------------------------------------------------------------------------------------> mongoRegisterContext
- * /v1/registerContext badVerbPostOnly
-
- POST /v1/discoverContextAvailability postDiscoverContextAvailability ------------------------------------------------------------------------------------------> mongoDiscoverContextAvailability
- * /v1/discoverContextAvailability badVerbPostOnly
-
-
-V0 STANDARD REQUESTS:
-====================================================================================================
- POST /ngsi10/updateContext postUpdateContext --------------------------------------------------------------------------------------------------------> mongoUpdateContext
- * /ngsi10/updateContext badVerbPostOnly
-
- POST /ngsi10/queryContext postQueryContext ---------------------------------------------------------------------------------------------------------> mongoQueryContext
- * /ngsi10/queryContext badVerbPostOnly
-
- POST /ngsi10/subscribeContext postSubscribeContext -----------------------------------------------------------------------------------------------------> mongoSubscribeContext
- * /ngsi10/subscribeContext badVerbPostOnly
-
- POST /ngsi10/unsubscribeContext postUnsubscribeContext ---------------------------------------------------------------------------------------------------> mongoUnsubscribeContext
- * /ngsi10/unsubscribeContext badVerbPostOnly
-
- POST /ngsi10/updateContextSubscription postUpdateContextSubscription --------------------------------------------------------------------------------------------> mongoUpdateContextSubscription
- * /ngsi10/updateContextSubscription badVerbPostOnly
-
- POST /ngsi10/notifyContext postNotifyContext --------------------------------------------------------------------------------------------------------> mongoNotifyContext
- * /ngsi10/notifyContext badVerbPostOnly
-
-
-V1 STANDARD REQUESTS:
-====================================================================================================
- POST /v1/updateContext postUpdateContext --------------------------------------------------------------------------------------------------------> mongoUpdateContext
- * /v1/updateContext badVerbPostOnly
-
- POST /v1/queryContext postQueryContext ---------------------------------------------------------------------------------------------------------> mongoQueryContext
- * /v1/queryContext badVerbPostOnly
-
- POST /v1/subscribeContext postSubscribeContext -----------------------------------------------------------------------------------------------------> mongoSubscribeContext
- * /v1/subscribeContext badVerbPostOnly
-
- POST /v1/unsubscribeContext postUnsubscribeContext ---------------------------------------------------------------------------------------------------> mongoUnsubscribeContext
- * /v1/unsubscribeContext badVerbPostOnly
-
- POST /v1/updateContextSubscription postUpdateContextSubscription --------------------------------------------------------------------------------------------> mongoUpdateContextSubscription
- * /v1/updateContextSubscription badVerbPostOnly
-
- POST /v1/notifyContext postNotifyContext --------------------------------------------------------------------------------------------------------> mongoNotifyContext
- * /v1/notifyContext badVerbPostOnly
-
-
-V0 REGISTRY CONVENIENCE OPERATIONS:
-====================================================================================================
- GET /ngsi9/contextEntities/{EID} getContextEntitiesByEntityId ------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntities/{EID} postContextEntitiesByEntityId -----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntities/{EID} badVerbGetPostOnly
-
- GET /ngsi9/contextEntities/{EID}/attributes getContextEntityAttributes --------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntities/{EID}/attributes postContextEntityAttributes -------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntities/{EID}/attributes badVerbGetPostOnly
-
- GET /ngsi9/contextEntities/{EID}/attributes/{ATTRNAME} getEntityByIdAttributeByName ------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntities/{EID}/attributes/{ATTRNAME} postEntityByIdAttributeByName -----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntities/{EID}/attributes/{ATTRNAME} badVerbGetPostOnly
-
- GET /ngsi9/contextEntityTypes/{ETYPE} getContextEntityTypes -------------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntityTypes/{ETYPE} postContextEntityTypes ------------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntityTypes/{ETYPE} badVerbGetPostOnly
-
- GET /ngsi9/contextEntityTypes/{ETYPE}/attributes getContextEntityTypes -------------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntityTypes/{ETYPE}/attributes postContextEntityTypes ------------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntityTypes/{ETYPE}/attributes badVerbGetPostOnly
-
- GET /ngsi9/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} getContextEntityTypeAttribute -----------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /ngsi9/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} postContextEntityTypeAttribute ----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /ngsi9/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} badVerbGetPostOnly
-
-
-V1 REGISTRY CONVENIENCE OPERATIONS:
-====================================================================================================
- GET /v1/registry/contextEntities/{EID} getContextEntitiesByEntityId ------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntities/{EID} postContextEntitiesByEntityId -----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntities/{EID} badVerbGetPostOnly
-
- GET /v1/registry/contextEntities/{EID}/attributes getContextEntityAttributes --------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntities/{EID}/attributes postContextEntityAttributes -------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntities/{EID}/attributes badVerbGetPostOnly
-
- GET /v1/registry/contextEntities/{EID}/attributes/{ATTRNAME} getEntityByIdAttributeByName ------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntities/{EID}/attributes/{ATTRNAME} postEntityByIdAttributeByName -----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntities/{EID}/attributes/{ATTRNAME} badVerbGetPostOnly
-
- GET /v1/registry/contextEntityTypes/{ETYPE} getContextEntityTypes -------------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntityTypes/{ETYPE} postContextEntityTypes ------------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntityTypes/{ETYPE} badVerbGetPostOnly
-
- GET /v1/registry/contextEntityTypes/{ETYPE}/attributes getContextEntityTypes -------------------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntityTypes/{ETYPE}/attributes postContextEntityTypes ------------------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntityTypes/{ETYPE}/attributes badVerbGetPostOnly
-
- GET /v1/registry/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} getContextEntityTypeAttribute -----------------------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} postContextEntityTypeAttribute ----------------------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} badVerbGetPostOnly
-
-
-V0 CONVENIENCE OPERATIONS:
-====================================================================================================
- GET /ngsi10/contextEntities/{EID} getIndividualContextEntity --------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /ngsi10/contextEntities/{EID} putIndividualContextEntity --------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /ngsi10/contextEntities/{EID} postIndividualContextEntity -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /ngsi10/contextEntities/{EID} deleteIndividualContextEntity -----------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /ngsi10/contextEntities/{EID} badVerbAllFour
-
- GET /ngsi10/contextEntities/{EID}/attributes getIndividualContextEntity --------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /ngsi10/contextEntities/{EID}/attributes putIndividualContextEntity --------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /ngsi10/contextEntities/{EID}/attributes postIndividualContextEntity -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /ngsi10/contextEntities/{EID}/attributes deleteIndividualContextEntity -----------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /ngsi10/contextEntities/{EID}/attributes badVerbAllFour
-
- GET /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME} getIndividualContextEntityAttribute -----------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME} putIndividualContextEntityAttribute -----------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME} postIndividualContextEntityAttribute ----------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME} deleteIndividualContextEntityAttribute --------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME} badVerbAllFour
-
- GET /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} getAttributeValueInstance ---------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} putAttributeValueInstance ---------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} deleteAttributeValueInstance ------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /ngsi10/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} badVerbGetPutDeleteOnly
-
- GET /ngsi10/contextEntityTypes/{ETYPE} getNgsi10ContextEntityTypes -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /ngsi10/contextEntityTypes/{ETYPE} badVerbGetOnly
-
- GET /ngsi10/contextEntityTypes/{ETYPE}/attributes getNgsi10ContextEntityTypes -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /ngsi10/contextEntityTypes/{ETYPE}/attributes badVerbGetOnlyy
-
- GET /ngsi10/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} getNgsi10ContextEntityTypesAttribute ----------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /ngsi10/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} badVerbGetOnly
-
- POST /ngsi10/contextSubscriptions postSubscribeContextConvOp --------------------------------> postSubscribeContext ----------------------------------------> mongoSubscribeContext
- * /ngsi10/contextSubscriptions badVerbPostOnly
-
- PUT /ngsi10/contextSubscriptions/{SUBID} putSubscriptionConvOp -------------------------------------> postUpdateContextSubscription -------------------------------> mongoUpdateContextSubscription
- DELETE /ngsi10/contextSubscriptions/{SUBID} deleteSubscriptionConvOp ----------------------------------> postUnsubscribeContext --------------------------------------> mongoUnsubscribeContext
- * /ngsi10/contextSubscriptions/{SUBID} badVerbPutDeleteOnly
-
-
-V1 CONVENIENCE OPERATIONS:
-====================================================================================================
- GET /v1/contextEntities/{EID} getIndividualContextEntity --------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /v1/contextEntities/{EID} putIndividualContextEntity --------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /v1/contextEntities/{EID} postIndividualContextEntity -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/{EID} deleteIndividualContextEntity -----------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/{EID} badVerbAllFour
-
- GET /v1/contextEntities/{EID}/attributes getIndividualContextEntity --------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /v1/contextEntities/{EID}/attributes putIndividualContextEntity --------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /v1/contextEntities/{EID}/attributes postIndividualContextEntity -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/{EID}/attributes deleteIndividualContextEntity -----------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/{EID}/attributes badVerbAllFour
-
- GET /v1/contextEntities/{EID}/attributes/{ATTRNAME} getIndividualContextEntityAttribute -----------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /v1/contextEntities/{EID}/attributes/{ATTRNAME} putIndividualContextEntityAttribute -----------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- POST /v1/contextEntities/{EID}/attributes/{ATTRNAME} postIndividualContextEntityAttribute ----------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/{EID}/attributes/{ATTRNAME} deleteIndividualContextEntityAttribute --------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/{EID}/attributes/{ATTRNAME} badVerbAllFour
-
- GET /v1/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} getAttributeValueInstance ---------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- PUT /v1/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} putAttributeValueInstance ---------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} deleteAttributeValueInstance ------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/{EID}/attributes/{ATTRNAME}/{ID} badVerbGetPutDeleteOnly
-
- GET /v1/contextEntityTypes/{ETYPE} getNgsi10ContextEntityTypes -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /v1/contextEntityTypes/{ETYPE} badVerbGetOnly
-
- GET /v1/contextEntityTypes/{ETYPE}/attributes getNgsi10ContextEntityTypes -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /v1/contextEntityTypes/{ETYPE}/attributes badVerbGetOnlyy
-
- GET /v1/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} getNgsi10ContextEntityTypesAttribute ----------------------> postQueryContext --------------------------------------------> mongoQueryContext
- * /v1/contextEntityTypes/{ETYPE}/attributes/{ATTRNAME} badVerbGetOnly
-
- POST /v1/contextSubscriptions postSubscribeContextConvOp --------------------------------> postSubscribeContext ----------------------------------------> mongoSubscribeContext
- * /v1/contextSubscriptions badVerbPostOnly
-
- PUT /v1/contextSubscriptions/{SUBID} putSubscriptionConvOp -------------------------------------> postUpdateContextSubscription -------------------------------> mongoUpdateContextSubscription
- DELETE /v1/contextSubscriptions/{SUBID} deleteSubscriptionConvOp ----------------------------------> postUnsubscribeContext --------------------------------------> mongoUnsubscribeContext
- * /v1/contextSubscriptions/{SUBID} badVerbPutDeleteOnly
-
-
-TID CONVENIENCE OPERATIONS:
-====================================================================================================
- GET /v1/contextTypes getEntityTypes -----------------------------------------------------------------------------------------------------------> mongoEntityTypes
- * /v1/contextTypes badVerbGetOnly
-
- GET /v1/contextTypes/{ETYPE} getAttributesForEntityType ----------------------------------------------------------------------------------------------> mongoAttributesForEntityType
- * /v1/contextTypes/{ETYPE} badVerbGetOnly
-
- GET /v1/contextEntities getAllContextEntities -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- POST /v1/contextEntities postIndividualContextEntity -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities badVerbGetPostOnly
-
- GET /v1/contextEntities/type/{ETYPE}/id/{EID} getAllEntitiesWithTypeAndId -------------------------------> postQueryContext --------------------------------------------> mongoQueryContext
- POST /v1/contextEntities/type/{ETYPE}/id/{EID} postAllEntitiesWithTypeAndId ------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- PUT /v1/contextEntities/type/{ETYPE}/id/{EID} putAllEntitiesWithTypeAndId -------------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/type/{ETYPE}/id/{EID} deleteAllEntitiesWithTypeAndId ----------------------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/type/{ETYPE}/id/{EID} badVerbAllFour
-
- GET /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME} getIndividualContextEntityAttributeWithTypeAndId -------> postQueryContext --------------------------------------------> mongoQueryContext
- POST /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME} postIndividualContextEntityAttributeWithTypeAndId -------> postUpdateContext -------------------------------------------> mongoUpdateContext
- PUT /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME} putIndividualContextEntityAttributeWithTypeAndId -------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME} deleteIndividualContextEntityAttributeWithTypeAndId -------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME} badVerbAllFour
-
- GET /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME}/{ID} getAttributeValueInstanceWithTypeAndId -----------------> postQueryContext --------------------------------------------> mongoQueryContext
- POST /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME}/{ID} postAttributeValueInstanceWithTypeAndId -----------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- PUT /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME}/{ID} putAttributeValueInstanceWithTypeAndId -----------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- DELETE /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME}/{ID} deleteAttributeValueInstanceWithTypeAndId -----------------> postUpdateContext -------------------------------------------> mongoUpdateContext
- * /v1/contextEntities/type/{ETYPE}/id/{EID}/attributes/{ATTRNAME}/{ID} badVerbAllFour
-
- GET /v1/registry/contextEntities/type/{ETYPE}/id/{ID} getContextEntitiesByEntityIdAndType -----------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntities/type/{ETYPE}/id/{ID} postContextEntitiesByEntityIdAndType -----------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntities/type/{ETYPE}/id/{ID} badVerbGetPostOnly
-
- GET /v1/registry/contextEntities/type/{ETYPE}/id/{ID}/attributes/{ATTRNAME} getEntityByIdAttributeByNameWithTypeAndId ----------------> postDiscoverContextAvailability -----------------------------> mongoDiscoverContextAvailability
- POST /v1/registry/contextEntities/type/{ETYPE}/id/{ID}/attributes/{ATTRNAME} postEntityByIdAttributeByNameWithTypeAndId ----------------> postRegisterContext -----------------------------------------> mongoRegisterContext
- * /v1/registry/contextEntities/type/{ETYPE}/id/{ID}/attributes/{ATTRNAME} badVerbGetPostOnly
-
-
MISC REQUESTS:
====================================================================================================
GET /log/trace logTraceTreat
@@ -331,37 +94,15 @@ MISC REQUESTS:
DELETE /log/traceLevel/{TRACELEVEL} logTraceTreat
* /log/traceLevel/{TRACELEVEL} badVerbPutDeleteOnly
- GET /v1/admin/log/trace logTraceTreat
- DELETE /v1/admin/log/trace logTraceTreat
- * /v1/admin/log/trace badVerbGetDeleteOnly
-
- PUT /v1/admin/log/trace/{TRACELEVEL} logTraceTreat
- DELETE /v1/admin/log/trace/{TRACELEVEL} logTraceTreat
- * /v1/admin/log/trace/{TRACELEVEL} badVerbPutDeleteOnly
-
- GET /v1/admin/log/traceLevel logTraceTreat
- DELETE /v1/admin/log/traceLevel logTraceTreat
- * /v1/admin/log/traceLevel badVerbGetDeleteOnly
-
- PUT /v1/admin/log/traceLevel/{TRACELEVEL} logTraceTreat
- DELETE /v1/admin/log/traceLevel/{TRACELEVEL} logTraceTreat
- * /v1/admin/log/traceLevel/{TRACELEVEL} badVerbPutDeleteOnly
-
GET /statistics statisticsTreat
DELETE /statistics statisticsTreat
* /statistics badVerbGetDeleteOnly
- GET /v1/admin/statistics statisticsTreat
- DELETE /v1/admin/statistics statisticsTreat
- * /v1/admin/statistics badVerbGetDeleteOnly
GET /cache/statistics statisticsCacheTreat
DELETE /cache/statistics statisticsCacheTreat
* /cache/statistics badVerbGetDeleteOnly
- GET /v1/admin/cache/statistics statisticsCacheTreat
- DELETE /v1/admin/cache/statistics statisticsCacheTreat
- * /v1/admin/cache/statistics badVerbGetDeleteOnly
GET /version versionTreat
OPTIONS /version optionsVersionRequest
@@ -378,8 +119,4 @@ MISC REQUESTS:
DELETE /admin/metrics deleteMetrics
* /admin/metrics badVerbGetDeleteOnly
- * /ngsi9/{ANYTHING} badNgsi9Request
-
- * /ngsi10/{ANYTHING} badNgsi10Request
-
* {ANYTHING} badRequest
diff --git a/doc/manuals/devel/architecture.md b/doc/manuals/devel/architecture.md
index b62183d6de..86e9f95a8b 100644
--- a/doc/manuals/devel/architecture.md
+++ b/doc/manuals/devel/architecture.md
@@ -14,11 +14,7 @@ _Current Orion internal architecture_
* The `connectionTreat()` function is the entry point for new requests (see [RQ-01 diagram](sourceCode.md#flow-rq-01) for details). Depending on the version of the NGSI API to which the request belongs (basically, depending whether the request URL prefix is `/v1` or `/v2`) the execution flow goes in one "branch" or another, of the execution logic.
-* In the case of NGSIv1 requests (deprecated), the logic is as follows:
- * First, the [**jsonParse** library](sourceCode.md#srclibjsonparse) takes the request payload as input and generates a set of objects. The NGSIv1 parsing logic is based on the [Boost library property_tree](https://theboostcpplibraries.com/boost.propertytree).
- * Next, a request servicing function is invoked to process the request. Each request type (in terms of HTTP and URL pattern) has a separate function. We call these functions "service routines" and they reside in the library [**serviceRoutines**](sourceCode.md#srclibserviceroutines). Note that some "high level" service routines may call other "low level" service routines.
- * At the end (either in one or two hops, see [the mapping document](ServiceRoutines.txt) for details), the service routine calls the **mongoBackend** library.
-* In the case of NGSIv2 requests, the logic is as follows:
+* The logic is as follows:
* First, the [**jsonParseV2** library](sourceCode.md#srclibjsonparsev2) takes the request payload as input and generates a set of objects. The NGSIv2 parsing logic is based in [rapidjson](http://rapidjson.org).
* Next, similar to NGSIv1, a service routine is called to process the request. Each request type (in terms of HTTP and URL pattern) has a service routine. These "NGSIv2 service routines" reside in the library [**serviceRoutinesV2**](sourceCode.md#srclibserviceroutinesv2). Note that some V2 service routines may call NGSIv1 service routines (see [the mapping document](ServiceRoutines.txt) for details).
* At the end, the **mongoBackend** library is invoked. Depending on the case, this can be done directly from a V2 service routine or indirectly via a V1 service routine, as shown in the figure above.
diff --git a/doc/manuals/devel/cprs.md b/doc/manuals/devel/cprs.md
index 26d1a31f8c..be3c17fa81 100644
--- a/doc/manuals/devel/cprs.md
+++ b/doc/manuals/devel/cprs.md
@@ -55,7 +55,7 @@ _FW-02: `updateForward()` function detail_
* Parse the context provider string to extract IP, port, URI path, etc. (step 1)
* The request to forward has to be built (step 2). In the case of NGSIv1, we need to extract information of the binary object into text to be able to send the REST request (plain text) to the Context Provider using `POST /v1/updateContext`. In the case of NGSIv2, `POST /v2/op/updated` is used.
* The request to forward is sent with the help of `httpRequestSend()` (step 3), that in its turn uses [libcurl](https://curl.haxx.se/libcurl/) (step 4). libcurl sends in sequence the request to the Context Provider (step 5).
-* The textual response from the Context Provider is parsed and an `UpdateContextResponse` object is created (step 6). Parsing details are provided in diagram [PP-01](jsonParse.md#flow-pp-01).
+* The textual response from the Context Provider is parsed and an `UpdateContextResponse` object is created (step 6). Parsing details are provided in diagram [PP-01](jsonParse.md#flow-pp-01). - FIXME PR: review this
[Top](#top)
@@ -91,7 +91,7 @@ _FW-04: `queryForward()` function detail_
* Parse the context provider string to extract IP, port, URI path, etc. (step 1).
* The request to forward has to be built (step 2). In the case of NGSIv1, we need to extract information of the binary object into text to be able to send the REST request (plain text) to the Context Provider using `POST /v1/queryContext`. In the case of NGSIv2, `POST /v2/op/query` is used.
* The request to forward is sent with the help of `httpRequestSend()` (step 3) which uses [libcurl](https://curl.haxx.se/libcurl/) to forward the request (step 4). libcurl sends in sequence the request to the Context Provider (step 5).
-* The textual response from the Context Provider is parsed and an `QueryContextResponse` object is created (step 6). Parsing details are provided in diagram [PP-01](jsonParse.md#flow-pp-01).
+* The textual response from the Context Provider is parsed and an `QueryContextResponse` object is created (step 6). Parsing details are provided in diagram [PP-01](jsonParse.md#flow-pp-01). - FIXME PR: review this
## A Caveat about shadowing of entities
The Context Provider mechanism is implemented using standard registration requests and this might lead to unwanted situations.
diff --git a/doc/manuals/devel/flowsIndex.md b/doc/manuals/devel/flowsIndex.md
index 0d84d85cda..5a84dc395b 100644
--- a/doc/manuals/devel/flowsIndex.md
+++ b/doc/manuals/devel/flowsIndex.md
@@ -16,7 +16,7 @@ Related to request management (RQ management):
Related to parsing (PP prefix):
-* [PP-01: Parsing an NGSIv1 payload](jsonParse.md#flow-pp-01)
+* [PP-01: Parsing an NGSIv1 payload](jsonParse.md#flow-pp-01) - FIXME PR: review this
* Continues from RQ-02, FW-02 or FW-04
* [PP-02: Parsing a text payload](sourceCode.md#flow-pp-02)
* Continues from RQ-02
@@ -78,15 +78,15 @@ Related to mongoBackend logic (MB and MD prefixes):
* Continues from RQ-02
* [MB-15: mongoUnsbuscribeContext](mongoBackend.md#flow-mb-15)
* Continues from RQ-02
-* [MB-16: mongoSubscribeContext](mongoBackend.md#flow-mb-16)
+* [MB-16: mongoSubscribeContext](mongoBackend.md#flow-mb-16) - FIXME PR: probably deleted
* Continues from RQ-02
* Continues in MB-11
-* [MB-17: mongoUpdateContextSubscription](mongoBackend.md#flow-mb-17)
+* [MB-17: mongoUpdateContextSubscription](mongoBackend.md#flow-mb-17) - FIXME PR: probably deleted
* Continues from RQ-02
* Continues in MB-12
-* [MB-18: mongoRegisterContext](mongoBackend.md#flow-mb-18)
+* [MB-18: mongoRegisterContext](mongoBackend.md#flow-mb-18) - FIXME PR: probably deleted
* Continues from RQ-02
-* [MB-19: mongoDiscoverContextAvailability](mongoBackend.md#flow-mb-19)
+* [MB-19: mongoDiscoverContextAvailability](mongoBackend.md#flow-mb-19) - FIXME PR: probably deleted
* Continues from RQ-02
* [MB-23: mongoRegistrationGet](mongoBackend.md#flow-mb-23)
* Continues from RQ-02
diff --git a/doc/manuals/devel/jsonParse.md b/doc/manuals/devel/jsonParse.md
deleted file mode 100644
index 76a4d36382..0000000000
--- a/doc/manuals/devel/jsonParse.md
+++ /dev/null
@@ -1,389 +0,0 @@
-# JSON Parse NGSIv1
-
-* [Introduction](#introduction)
-* [Parsing process](#parsing-process)
- * [Implementation details](#implementation-details)
-* [Top-level `jsonParse()`](#top-level-jsonparse)
-* [Low-level `jsonParse()`](#low-level-jsonparse)
-
-## Introduction
-
-Orion Context Broker contains not one but **two** libraries for JSON parsing. The reason for this is that the external library that was originally selected for parsing of NGSIv1 JSON cannot distinguish between JSON value types such as String, Number, Boolean, Null but **treats all values as strings**. This was unacceptable for NGSIv2 and so, another external JSON library ([rapidjson](http://rapidjson.org/)) was chosen. The two JSON libraries of Orion implement the necessary adaption of the external libraries to be usable by Orion.
-
-This document describes NGSIv1 parsing details (note that NGSIv1 has been deprecated). NGSIv2 parsing details are described in a [separate document](jsonParseV2.md).
-
-In general, the NGSIv1 parsing logic is more complex than NGSIv2 logic. The good news is that you will probably not need to change anything in NGSIv1 parsing as this is the old version of the Orion API and the work should now concentrate in evolving NGSIv2, not NGSIv1.
-
-The purpose of the parse step is to transform a text buffer, JSON in this case, to an instance of a class/struct in C++. The external library takes care of parsing the JSON string while the Orion library extracts the information and populates the approipriate instance of the class/struct in C++.
-
-A very simple but illustrative example:
-
-The following payload (for `POST /v1/queryContext`) ... :
-```
-{
- "entities": [
- {
- "type": "Room",
- "id": "ConferenceRoom"
- }
- ],
- "attributes": [ "temperature" ]
-}
-```
-
-... would be transformed into a C++ instance of the class `QueryContextRequest` something like this:
-```
-QueryContextRequest* qprP = new QueryContextRequest();
-EntityId* eP = new EntityId();
-
-eP->id = "ConferenceRoom";
-eP->type = "Room";
-
-qprP->entityIdVector.push_back(eP);
-qprP->attributeList.push_back("temperature");
-```
-
-This instance of `QueryContextRequest` is created by the **jsonParse** library and the service routine `postQueryContext()` passes it to the [**mongoBackend**](sourceCode.md#srclibmongobackend) function `mongoQueryContext()`.
-
-[Top](#top)
-
-## Parsing process
-The library **jsonParse** contains two overloaded functions with the name `jsonParse()`:
-
-* The first one is the toplevel function that is called only once per request. See [dedicated section on top-level jsonParse()](#top-level-jsonparse).
-* The second `jsonParse()` is invoked by the **toplevel** `jsonParse()` once per node in the parsed tree that is output from [boost property_tree](https://theboostcpplibraries.com/boost.propertytree) and it *calls itself recursively* following the output tree (we will use `jsonParse()*` from now on to distinguish this second, lower level `jsonParse()` from the top level `jsonParse()` function). See its full explanation in the [dedicated section on low level jsonParse()](#low-level-jsonparse).
-
-The concrete example used for the following image is the parsing of payload for `POST /v1/updateContextRequest`.
-
-
-![Parsing an NGSIv1 payload](images/Flow-PP-01.png)
-
-_PP-01: Parsing an NGSIv1 payload_
-
-* `payloadParse()` calls the NGSIv1 parse function for JSON payloads (which is one of three possible parse functions to call: parsing of NGSIv1 JSON, NGSIv2 JSON and text) (step 1).
-* `jsonTreat()` looks up the type of the request by calling `jsonRequestGet()` (step 2), which returns a pointer to a `JsonRequest` struct that is needed to parse the payload.
- * Each type of payload needs different input to the common parsing routines. A vector of `JsonRequest` structs contains this information and `jsonRequestGet()` looks up the corresponding `JsonRequest` struct in the vector and returns it. More on the `JsonRequest` struct later.
-* Knowing the specific information for the request type, `jsonTreat()` calls the toplevel `jsonParse()`, whose responsibility is to start the parsing of the payload (step 3). `jsonParse()` reads in the payload into a `stringstream` and calls the function `read_json()` that takes care of the parsing of the payload and converts the payload into a property tree.
-* After that, `jsonParse()*` (the lower level) is invoked on the resulting tree to convert the boost property tree into an Orion structure (step 4). In fact, `jsonParse()*` is invoked at this point as many times as there are top level keys in the JSON to process.
- * Example: for `{ "a": ..., "b": ..., "c:"... }`, `jsonParse()*` will be invoked three times (once for `"a"`, once for `"b"` and once for `"c"`).
-* `jsonParse()*` calls the `treat()` function on each node (step 5) and if the node is not a leaf, it does an recursive call to itself for each child of the node.
-* The `treat()` function checks for forbidden characters in the payload and then calls the specific Parse-Function for the node in question (step 6). A pointer to this specific Parse-Function is found in the struct `JsonRequest`, as well as the path to each node, which is how the struct is found.
-* The Parse-Function simply extracts the information from the tree node and adds it to the resulting Orion struct that is the result of the entire parse. Note that each node in the tree has its own Parse-Function and that in this image just a few selected Parse-Functions are shown. In fact, to parse this `UpdateContextRequest` payload, there are no less than 19 Parse-Functions (see `jsonParse/jsonUpdateContextRequest.cpp`).
-
-[Top](#top)
-
-### Implementation Details
-As earlier stated, `jsonTreat()` in `src/lib/jsonParse/jsonRequest.cpp` is invoked by `payloadParse()` in `src/lib/rest/RestService.cpp`. Before diving into `jsonTreat()`, let's take a look at the struct `JsonRequest` that has a very important role in the function:
-
-```
-typedef struct JsonRequest
-{
- RequestType type; // Type of request (URI PATH translated to enum)
- std::string method; // HTTP Method (POST/PUT/PATCH ...)
- std::string keyword; // Old reminiscent from XML parsing
- JsonNode* parseVector; // Path and pointer to entry function for parsing
- RequestInit init; // pointer to function for parse initialization
- RequestCheck check; // pointer to function for checking of the parse result
- RequestPresent present; // pointer to function for presenting the parse result in log file
- RequestRelease release; // pointer to function that frees up memory after the parse result has been used
-} JsonRequest;
-```
-
-See also the variable `jsonRequest`, which is a vector of `JsonRequest`, in `src/lib/jsonParse/jsonRequest.cpp` for a full list of the supported requests with payload.
-
-The first thing that `jsonTreat()` does is to call `jsonRequestGet()` to look up an item in the vector `jsonRequest`. The search criteria to look up the vector item is the **RequestType** (which depends on the URL PATH of the request) and the **HTTP Method** used.
-
-If the combination of URL PATH and HTTP Method is not found in the `JsonRequest` vector (`jsonRequest`), then the request is not valid and an error is returned. If found, then the vector item contains all the information needed to parse the payload and build the corresponding raw structure.
-
-#### Adding a new request with payload
-
-To add a request in NGSIv1, with payload to parse, an item **must be added** to the vector `jsonRequest`.
-
-Now, after finding the vector item for the request, `jsonTreat()` does the following:
-
-* `init()`
-* `parse()`
-* `check()`
-
-`release()` cannot be called until the result of the parse has been used. that is, if no error has been detected. In case of errors, the `release()` function is called right after the call to payloadParse, as the result is garbage and cannot be used. Normally the parse works just fine and the resulting instance from the parse step is passed to mongoBackend for processing and the release function cannot be called until mongoBackend is done with its processing. The corresponding service routine calls mongoBackend and `restService()` calls the service routine:
-
-```
-std::string response = serviceV[ix].treat(ciP, components, compV, &parseData);
-```
-
-After returning from the service routine, the result of the parse can be released without risk.
-
-[Top](#top)
-
-## Top-level `jsonParse()`
-As mentioned, there are two different functions called `jsonParse()` in `src/lib/jsonParse/jsonParse.cpp`. One top level and one lower level. The top level `jsonParse()` is the entry function and it is visible from outside of `src/lib/jsonParse/jsonParse.cpp`:
-
-```
-std::string jsonParse
-(
- ConnectionInfo* ciP, // Connection Info valid for the life span of the request
- const char* content, // Payload as a string
- const std::string& requestType, // The type of request (URL PATH)
- JsonNode* parseVector, // Function pointers etc for treatment of the nodes
- ParseData* parseDataP // Output pointer to C++ classes for the result of the the parse
-)
-```
-
-This function is called by `jsonTreat()` in `src/lib/jsonParse/jsonRequest.cpp`, which in its turn in called by `payloadParse()` in `src/lib/rest/RestService.cpp`.
-
-The purpose of the function is to initiate the parsing of the content (JSON string in the parameter `content`) with the help of `boost::property_tree::ptree`, by:
-
-* Get start-time for timing statistics, if requested
-* Fix *escaped chars*, i.e remove backslash preceding a slash: `"\/"` => `"/"`
-* Load the `content` in the `ptree` variable `tree`
-* Call the low-level `jsonParse()` for each first level node of the tree. The low-level `jsonTreat()` dives deeper.
-* Return **Error** if low-level `jsonTreat()` fails
-* Get end-time for timing statistics, if requested, and save diff-time for later use
-
-[Top](#top)
-
-## Low-level `jsonParse()`
-The low-level `jsonParse` is static in `src/lib/jsonParse/jsonParse.cpp` and **only** called by the high-level `jsonParse()` (except for the recursive calls it makes itself).
-
-Its signature:
-
-```
-static std::string jsonParse
-(
- ConnectionInfo* ciP, // "Global" info about the current request
- boost::property_tree::ptree::value_type& v, // The node-in-the-tree
- const std::string& _path, // The path to the node-in-the-tree
- JsonNode* parseVector, // Function pointers etc for treatment of the nodes
- ParseData* parseDataP // Output pointer to C++ classes for the result of the the parse
-)
-```
-
-Let's describe the different parameters one by one.
-
-### `ConnectionInfo* ciP`
-This pointer to `ConnectionInfo` is created by the function that MHD (libmicrohttpd) uses for the callbacks while reading the request (`connectionTreat` in `src/lib/rest/rest.cpp`). `ciP` contains information about the request such as:
-
-* HTTP Method/Verb
-* HTTP Headers
-* URI Parameters (E.g. `?a=1&b=2`)
-* URI Path (E.g. `/v1/queryRequest`) ...
-* ... and much more. See `src/lib/rest/ConnectionInfo.h`
-
-The pointer to `ConnectionInfo` is passed to many functions in the libraries **jsonParse**, **jsonParseV2**, **rest**, **serviceRoutines** and **serviceRoutinesV2**.
-
-### `boost::property_tree::ptree::value_type& v`
-
-This is a reference to the currently treated node in the tree. Not much more to say about it. See the [boost property_tree documentation](https://theboostcpplibraries.com/boost.propertytree) for more information on this.
-
-### `const std::string& _path`
-
-`jsonParse()` keeps the path to the node as a string, to know exactly which node in the tree is treated. E.g.:
-
-```
-{
- "entities": [
- {
- "type": "Room",
- "id": "ConferenceRoom"
- }
- ],
- "attributes": [ "temperature" ]
-}
-```
-
-The node `type` would have the path `/entities/entity/type`. The middle name `entity` is because `entities` is a vector. More on this later.
-
-### `JsonNode* parseVector`
-`JsonNode` is a struct defined in `src/lib/jsonParse/JsonNode.h`:
-
-```
-typedef std::string (*JsonNodeTreat)(const std::string& path, const std::string& value, ParseData* reqDataP);
-
-typedef struct JsonNode
-{
- std::string path;
- JsonNodeTreat treat;
-} JsonNode;
-```
-
-Instances of `JsonNode` contain the path of a node (e.g. `/entities/entity/type`) and a reference to the corresponding treat-function for a node with that very path. This is how `jsonTreat` knows which treat-function to call for each node in the tree. As illustration, see `src/lib/jsonParse/jsonQueryContextRequest.cpp`, variable `jsonQcrParseVector`:
-
-```
-JsonNode jsonQcrParseVector[] =
-{
- { "/entities", jsonNullTreat },
- { "/entities/entity", entityId },
- { "/entities/entity/id", entityIdId },
- { "/entities/entity/type", entityIdType },
- { "/entities/entity/isPattern", entityIdIsPattern },
- ...
-```
-
-As explained, this is a vector of **path-in-the-tree** and corresponding **treat-function** and this is how the low-level `jsonParse()` knows which treat-function to call for each node in the tree.
-
-This vector and the other vectors (one per type of payload) is used by the variable `jsonRequest` in `src/lib/jsonParse/jsonRequest.cpp` of type `JsonRequest`:
-```
-typedef struct JsonRequest
-{
- RequestType type;
- std::string method;
- std::string keyword;
- JsonNode* parseVector;
- RequestInit init;
- RequestCheck check;
- RequestPresent present;
- RequestRelease release;
-} JsonRequest;
-```
-
-`jsonRequest` is a vector of `JsonRequest` and it defines all payloads that are to be parsed by `jsonParse`, see [Implementation Details](#implementation-details) for more info on `jsonRequest`.
-
-The JsonRequest vector is declared in `src/lib/jsonParse/jsonRequest.cpp`:
-
-```
-static JsonRequest jsonRequest[] =
-{
- // NGSI9
- { RegisterContext, "POST", "registerContextRequest", FUNCS(Rcr) },
- { DiscoverContextAvailability, "POST", "discoverContextAvailabilityRequest", FUNCS(Dcar) },
-
- // NGSI10
- { QueryContext, "POST", "queryContextRequest", FUNCS(Qcr) },
- { UpdateContext, "POST", "updateContextRequest", FUNCS(Upcr) },
- ...
-};
-```
-
-The macro `FUNCS()` is to make the lines a bit shorter and it looks like this:
-
-```
-#define FUNCS(prefix) json##prefix##ParseVector, json##prefix##Init, \
- json##prefix##Check, json##prefix##Present, \
- json##prefix##Release
-```
-
-I.e., all the "methods" for the parsing of a type of payload. These functions reside in one module per type of payload, such as:
-
-* `src/lib/jsonParse/jsonQueryContextRequest.cpp`
-* `src/lib/jsonParse/jsonUpdateContextRequest.cpp`
-* etc
-
-The "methods" are for:
-
-* `init()`,
-* `check()`,
-* `present()`, and
-* `release()`
-
-and there is one set of "methods" for each type of payload.
-
-So, the modules called `jsonXxxRequest` or `jsonXxxResponse` (`Xxx` being the name of the payload, e.g. `QueryContent` or `UpdateContent`) all contain:
-
-* this set of methods (`init()`, `check()`, `present()` and `release()`),
-* the *Parse-Vector* that contains the path and treat methods for each node,
-* all treat methods for the nodes
-
-which is the entire set of functions and variables that `jsonParse()` needs to convert the JSON input payload string into a C++ class instance.
-
-Now some example of treat-methods, they are all pretty simple:
-
-```
-/* ****************************************************************************
-*
-* entityId -
-*/
-static std::string entityId(const std::string& path, const std::string& value, ParseData* reqDataP)
-{
- reqDataP->qcr.entityIdP = new EntityId();
-
- reqDataP->qcr.entityIdP->id = "";
- reqDataP->qcr.entityIdP->type = "";
- reqDataP->qcr.entityIdP->isPattern = "false";
-
- reqDataP->qcr.res.entityIdVector.push_back(reqDataP->qcr.entityIdP);
-
- return "OK";
-}
-
-
-
-/* ****************************************************************************
-*
-* entityIdId -
-*/
-static std::string entityIdId(const std::string& path, const std::string& value, ParseData* reqDataP)
-{
- reqDataP->qcr.entityIdP->id = value;
-
- return "OK";
-}
-```
-
-Also, lets have a look at the Parse-Vector where these two treat-functions reside:
-
-```
-/* ****************************************************************************
-*
-* qcrParseVector -
-*/
-JsonNode jsonQcrParseVector[] =
-{
- { "/entities", jsonNullTreat },
- { "/entities/entity", entityId },
- { "/entities/entity/id", entityIdId },
- ...
-```
-
-The treat-function `entityId` is called when a node `/entities/entity` is found. `entities` is a vector inside the payload for `QueryContextRequest`:
-```
-{
- "entities": [
- {
- "id": "",
- "type": "",
- ...
- }
-}
-```
-
-As vectors items have no key-name in JSON, we decided to use the singular word of the name of the vector (which is always in plural), i.e. an instance of **entities** is called **entity**. So, when the node `/entities/entity` is found (an item of the entities vector), the treat-function `entityId()` is called and it allocates room for an `EntityId` (`class EntityId` resides in the module `src/lib/ngsi/EntityId.h/cpp`) and pushes the `EntityId` pointer to the vector `reqDataP->qcr.res.entityIdVector`.
-
-The treat-function `entityId()` also sets `reqDataP->qcr.entityIdP` to reference this latest instance of `EntityId` so that consequent treat-functions can reach it. For example, `entityIdId()` needs it, to set the `id` field of the entity, which is all `entityIdId()` does. Pointers of this type are needed during the parse/extraction and these pointers are the reason for the ParseData structs (see `src/lib/ngsi/ParseData.h` - one "XxxData" struct per payload type, with an output class instance and these help pointers).
-
-### `ParseData* parseDataP`
-
-As the parsing of NGSI v1 payload is strongly centralized, and function pointers are needed, there is a need for a unique type for **all** types of payload. The types for storing the result of the parse (the C++ class instances are different for each type of payload) are all collected into a big struct contaning all types of payload. Then each treat-function picks which field to operate on.
-
-A pointer to this structure is passed as parameter to low-level `jsonParse()`.
-
-`ParseData` is found in `src/lib/ngsi/ParseData.h`:
-
-```
-typedef struct ParseData
-{
- std::string errorString;
- ContextAttribute* lastContextAttribute;
-
- RegisterContextData rcr;
- DiscoverContextAvailabilityData dcar;
- ...
-} ParseData;
-```
-
-For example, parsing of an NGSI10 query operates on `ParseData::qcr` which is of the type `QueryContextData`. `QueryContextData` in its turn contains an instance of `QueryContextRequest` which is where the result of the parse is stored. But, as help variables are needed during the parse, these "XxxData structs" are used and they contain the output instance (`QueryContextRequest` in the case of `QueryContextData`) **and** the help variables needed for the parsing of a `QueryContextRequest`:
-
-```
-struct QueryContextData
-{
- QueryContextRequest res; // Output/Result of the parse
- EntityId* entityIdP; // Pointer to the current EntityId
- Scope* scopeP; // Pointer to the current Scope
- orion::Point* vertexP; // Pointer to the current Point
- int pointNo; // Index of the current Point
- int coords; // Number of coordinates
-};
-```
-
-Each XxxData struct has a different set of help variables.
-
-[Top](#top)
diff --git a/doc/manuals/devel/jsonParseV2.md b/doc/manuals/devel/jsonParseV2.md
index e0b42f8b13..f52462763e 100644
--- a/doc/manuals/devel/jsonParseV2.md
+++ b/doc/manuals/devel/jsonParseV2.md
@@ -1,6 +1,6 @@
# JSON Parse NGSIv2
-NGSIv2 payloads are parsed in a very different manner than NGSIv1 payloads. This document describes NGSIv2 parsing details. NGSIv1 parsing details are described in a [separate document](jsonParse.md).
+This document describes NGSIv2 parsing details.
Instead of the centralized approach of NGSIv1 parse, an individual approach is used.
The advantage of this approach is that the code is much easier to understand and to reuse, while the inconvenience is that some tasks, e.g. checks for unsupported fields are spread out in many different functions and this way it is easy for some of these checks to be forgotten.
diff --git a/doc/manuals/devel/mongoBackend.md b/doc/manuals/devel/mongoBackend.md
index a7093010f7..196576ff47 100644
--- a/doc/manuals/devel/mongoBackend.md
+++ b/doc/manuals/devel/mongoBackend.md
@@ -9,10 +9,10 @@
* [`mongoUpdateSubscription` (SR2)](#mongoupdatesubscription-sr2)
* [`mongoGetSubscriptions` (SR2)](#mongogetsubscriptions-sr2)
* [`mongoUnsubscribeContext` (SR and SR2)](#mongounsubscribecontext-sr-and-sr2)
- * [`mongoSubscribeContext` (SR)](#mongosubscribecontext-sr)
- * [`mongoUpdateContextSubscription` (SR)](#mongoupdatecontextsubscription-sr)
- * [`mongoRegisterContext` (SR)](#mongoregistercontext-sr)
- * [`mongoDiscoverContextAvailability` (SR)](#mongodiscovercontextavailability-sr)
+ * [`mongoSubscribeContext` (SR)](#mongosubscribecontext-sr) - FIXME PR: probably deleted
+ * [`mongoUpdateContextSubscription` (SR)](#mongoupdatecontextsubscription-sr) - FIXME PR: probably deleted
+ * [`mongoRegisterContext` (SR)](#mongoregistercontext-sr) - FIXME PR: probably deleted
+ * [`mongoDiscoverContextAvailability` (SR)](#mongodiscovercontextavailability-sr) - FIXME PR: probably deleted
* [`mongoRegistrationGet` (SR2)](#mongoregistrationget-sr2)
* [`mongoRegistrationCreate` (SR2)](#mongoregistrationcreate-sr2)
* [Low-level modules related to DB interaction](#low-level-modules-related-to-db-interaction)
@@ -50,7 +50,7 @@ These modules implement the different Context Broker requests. They are called d
This section also describes the `MongoCommonRegister` and `MongoCommonUpdate` modules which provide common functionality highly coupled with several other request processing modules. In particular:
-* `MongoCommonRegister` provides common functionality for the `mongoRegisterContext` modules.
+* `MongoCommonRegister` provides common functionality for the `mongoRegisterContext` modules. - FIXME PR: probably deleted
* `MongoCommonUpdate` provides common functionality for the `mongoUpdateContext` and `mongoNotifyContext` modules.
[Top](#top)
@@ -283,7 +283,7 @@ The detail for `mongoEntityTypes()` is as shown in the following diagram.
_MB-08: mongoEntityTypes_
-* `mongoEntityTypes()` is invoked from a service routine (step 1). This can be from either `getEntityTypes()` (which resides in `lib/serviceRoutines/getEntityTypes.cpp`) or `getEntityAllTypes()` (which resides in `lib/serviceRoutinesV2/getEntityAllTypes.cpp`).
+* `mongoEntityTypes()` is invoked from a service routine (step 1). This is from `getEntityAllTypes()` (which resides in `lib/serviceRoutinesV2/getEntityAllTypes.cpp`).
* Depending on `-reqMutexPolicy`, the request semaphore may be taken (read mode) (step 2). See [this document for details](semaphores.md#mongo-request-semaphore).
* A list of entity types and of attributes belonging to each of those entity types is retrieved from the database, using `runCollectionCommand()` in the `connectionOperations` module, to run an aggregation command (steps 3 and 4).
* If attribute detail is enabled (i.e. `noAttrDetail` set to `false`) a loop iterates on every attribute of every entity type, in order to:
@@ -310,7 +310,7 @@ The detail for `mongoAttributesForEntityType()` is as shown in the following dia
_MB-10: mongoAttributesForEntityType_
-* `mongoAttributesForEntityType()` is invoked from a service routine (step 1). This can be from either `getEntityType()` (which resides in `lib/serviceRoutinesV2/getEntityType.cpp`) or `getAttributesForEntityType()` (which resides in `lib/serviceRoutines/getAttributesForEntityType.cpp`).
+* `mongoAttributesForEntityType()` is invoked from a service routine (step 1). This can be from either `getEntityType()` (which resides in `lib/serviceRoutinesV2/getEntityType.cpp`).
* Depending on `-reqMutexPolicy`, the request semaphore may be taken (read mode) (step 2). See [this document for details](semaphores.md#mongo-request-semaphore).
* A list of entity attributes corresponding to the entity type is retrieved from the database, using `runCollectionCommand()` in the `connectionOperations` module to run an aggregation command (steps 3 and 4).
* If attribute detail is enabled (i.e. `noAttrDetail` set to `false`) a loop iterates on every attribute in order to:
@@ -337,7 +337,7 @@ The header file contains only the function `mongoCreateSubscription()` whose wor
_MB-11: mongoCreateSubscription_
-* `mongoCreateSubscription()` is invoked from a service routine (step 1). This can be from either `postSubscriptions()` (which resides in `lib/serviceRoutinesV2/postSubscriptions.cpp`) or `mongoSubscribeContext()` (which resides in `lib/mongoBackend/mongoSubscribeContext.cpp`).
+* `mongoCreateSubscription()` is invoked from a service routine (step 1). This is `postSubscriptions()` (which resides in `lib/serviceRoutinesV2/postSubscriptions.cpp`).
* Depending on `-reqMutexPolicy`, the request semaphore may be taken (write mode) (step 2). See [this document for details](semaphores.md#mongo-request-semaphore).
* This function builds a BSON object that will be at the end the one to be persisted in the database, using different `set*()` functions (`setExpiration()`, `setHttpInfo()`, etc.) (step 3).
* The BSON object corresponding to the new subscription is inserted in the database using `collectionInsert()` in the `connectionOperations` module (steps 4 and 5).
@@ -359,7 +359,7 @@ The header file contains only a function named `mongoUpdateSubscription()` whose
_MB-12: mongoUpdateSubscription_
-* `mongoUpdateSubscription()` is invoked from a service routine (step 1). This can be from either `patchSubscription()` (which resides in `lib/serviceRoutinesV2/patchSubscription.cpp`) or `mongoUpdateContextSubscription()` (which resides in `lib/mongoBackend/mongoUpdateContextSubscription.cpp`).
+* `mongoUpdateSubscription()` is invoked from a service routine (step 1). This is from `patchSubscription()` (which resides in `lib/serviceRoutinesV2/patchSubscription.cpp`).
* Depending on `-reqMutexPolicy`, the request semaphore may be taken (write mode) (step 2). See [this document for details](semaphores.md#mongo-request-semaphore).
* The subscription is updated in DB using MongoDB `$set`/`$unset` operators. This operation is done in the function `colletionFindAndModify()` in the `connectionOperations` module (steps 3 and 4).
* In case the subscription cache is enabled (i.e. `noCache` set to `false`) the subscription is updated in the subscription cache based in the result from `collectionFindAndModify()` in the previous step (step 5). `updateInCache()` uses the subscription cache semaphore internally.
@@ -423,7 +423,7 @@ Its work is to remove from the database the document associated to the subscript
_MB-15: mongoUnsubscribeContext_
-* `mongoUnsubscribeContext()` is invoked from a service routine (step 1). This can be from either `postUnsubscribeContext()` (which resides in `lib/serviceRoutines/postUnsubscribeContext.cpp`) or `mongoUpdateContextSubscription()` (which resides in `lib/serviceRoutinesV2/deleteSubscription.cpp`).
+* `mongoUnsubscribeContext()` is invoked from a service routine (step 1). This is from `mongoUnsubscribeContext()` (which resides in `lib/serviceRoutinesV2/deleteSubscription.cpp`).
* Depending on `-reqMutexPolicy`, the request semaphore may be taken (write mode) (step 2). See [this document for details](semaphores.md#mongo-request-semaphore).
* The subscription is retrieved from the database using `collectionFindOne()` in the `connectionOperations` module (steps 3 and 4).
* The subscription is removed from the database using `collectionRemove()` in the `connectionOperations` module (steps 5 and 6).
@@ -436,6 +436,8 @@ Note that steps 6 and 7 are done no matter the value of `noCache`. This works bu
#### `mongoSubscribeContext` (SR)
+FIXME PR: probably deleted
+
`mongoSubscribeContext` encapsulates the logic for subscribe context (NGSIv1) operation.
The header file contains only a function named `mongoSubscribeContext()` which uses a `SubscribeContextRequest` object as input parameter and a `SubscribeContextResponse` as output parameter.
@@ -454,6 +456,8 @@ _MB-16: mongoSubscribeContext_
#### `mongoUpdateContextSubscription` (SR)
+FIXME PR: probably deleted
+
`mongoUpdateContextSubscription` encapsulates the logic for update context subscription (NGSIv1) operation.
The header file contains only a function named `mongoUpdateContextSubscription()` which uses an `UpdateContextSubscriptionRequest` object as input parameter and an `UpdateContextSubscriptionResponse` as output parameter.
@@ -472,6 +476,8 @@ _MB-17: mongoUpdateContextSubscription_
#### `mongoRegisterContext` (SR)
+FIXME PR: probably deleted
+
The `mongoRegisterContext` module provides the entry point for the register context operation processing logic (by means of `mongoRegisterContext()` defined in its header file).
@@ -490,6 +496,8 @@ _MB-18: mongoRegisterContext_
#### `mongoDiscoverContextAvailability` (SR)
+FIXME PR: probably deleted
+
`mongoDiscoverContextAvailability` encapsulates the logic for the context availability discovery (NGSIv1) operation.
The header file contains only a function named `mongoDiscoverContextAvailability()` which uses a `DiscoverContextAvailabilityRequest` object as input parameter and a `DiscoverContextAvailabilityResponse` as output parameter. Its work is to build a response object based on the input request object and the registration existing in the database.
@@ -633,7 +641,7 @@ This function basically searches for existing registrations in the (`registratio
It is used by several functions:
-* `mongoDiscoverContextAvailability()` (in the `mongoDiscoverContextAvailability` module), as "core" of the discovery operation.
+* `mongoDiscoverContextAvailability()` (in the `mongoDiscoverContextAvailability` module), as "core" of the discovery operation. - FIXME PR: probably deleted
* `mongoQueryContext()` in the `mongoQueryContext` module, in order to locate Context Providers for forwarding of the query. Note that the forwarding is not done within the **mongoBackend** library, but from the calling **serviceRoutine**.
* `searchContextProviders()` in the `MongoCommonUpdate` module, in order to locate Context Providers for forwarding of the update. Note that the forwarding is not done within the **mongoBackend** library, but from the calling **serviceRoutine**.
diff --git a/doc/manuals/devel/sourceCode.md b/doc/manuals/devel/sourceCode.md
index a829aa1f41..b75e4ca338 100644
--- a/doc/manuals/devel/sourceCode.md
+++ b/doc/manuals/devel/sourceCode.md
@@ -8,14 +8,11 @@
* [src/lib/rest/](#srclibrest) (REST interface, using external library microhttpd)
* [src/lib/ngsi/](#srclibngsi) (Common NGSI types)
* [src/lib/ngsi10/](#srclibngsi10) (Common NGSI10 types, NGSI10 = context management)
-* [src/lib/ngsi9/](#srclibngsi9) (Common NGSI9 types, NGSI9 = context management availability)
* [src/lib/apiTypesV2/](#srclibapitypesv2) (NGSIv2 types)
* [src/lib/parse/](#srclibparse) (Common functions and types for payload parsing)
-* [src/lib/jsonParse/](#srclibjsonparse) (Parsing of JSON payload for NGSIv1 requests, using external library Boost property_tree)
* [src/lib/jsonParseV2/](#srclibjsonparsev2) (Parsing of JSON payload for NGSIv2 requests, using external library rapidjson)
* [src/lib/serviceRoutines/](#srclibserviceroutines) (Service routines for NGSIv1)
* [src/lib/serviceRoutinesV2/](#srclibserviceroutinesv2) (Service routines for NGSIv2)
-* [src/lib/convenience/](#srclibconvenience) (Convenience operations in NGSIv1)
* [src/lib/mongoBackend/](#srclibmongobackend) (Database operations implementation)
* [src/lib/mongoDriver/](#srclibmongodriver) (Database interface to MongoDB)
* [src/lib/ngsiNotify/](#srclibngsinotify) (NGSI notifications)
@@ -200,6 +197,8 @@ The JSON parse implementations reside in dedicated libraries while the text pars
## src/lib/ngsi/
The **ngsi** library contains a collection of classes for the different payloads that constitutes the common part of the ngsi9 and ngsi10 protocols. Here you find basic classes like:
+FIXME PR: no point in aving ngsi/ and ngsi10/ separately (now that ngsi9/ has been removed)
+
* `EntityId`
* `EntityIdVector`
* `ContextAttribute`
@@ -209,12 +208,11 @@ The **ngsi** library contains a collection of classes for the different payloads
### Methods and hierarchy
-These classes (as well as the classes in the libraries `ngsi9`, `ngsi10`, `convenience`) all have a standard set of methods:
+These classes (as well as the classes in the library `ngsi10`) all have a standard set of methods:
-* `toJson()`, to render the object to a JSON string (for NGSIv2). This method levarages `JsonObjectHelper` and `JsonVectorHelper`
+* `toJson()`, to render the object to a JSON string. This method levarages `JsonObjectHelper` and `JsonVectorHelper`
in order to simplify the rendering process. This way you just add the elements you needs to print using `add*()` methods and don't
need to bother with starting/ending brackets, quotes and comma control.
-* `toJsonV1()`, to render the object to a JSON string (for NGSIv1)
* `present()`, for debugging (the object is dumped as text to the log file)
* `release()`, to release all allocated resources of the object
* `check()`, to make sure the object follows the rules, i.e. about no forbidden characters, or mandatory fields missing, etc.
@@ -250,8 +248,8 @@ The **ngsi10** library contains the top hierarchy classes for NGSI10 (NGSIv1) re
* `QueryContextResponse`
* `SubscribeContextRequest`
* `SubscribeContextResponse`
-* `UpdateContextSubscriptionRequest`
-* `UpdateContextSubscriptionResponse`
+* `UpdateContextSubscriptionRequest` - FIXME PR: removed
+* `UpdateContextSubscriptionResponse` - FIXME PR: removed
* `UnsubscribeContextRequest`
* `UnsubscribeContextResponse`
* `NotifyContextRequest` (outgoing request, sent by Orion, to notify subscribers)
@@ -262,21 +260,8 @@ See the explanation of methods and hierarchy of the [**ngsi** library](#methods-
[Top](#top)
-## src/lib/ngsi9/
-Just like the ngsi10 library, the **ngsi9** library contains the top hierarchy classes for NGSI9 (NGSIv1) requests:
-
-* `RegisterContextRequest`
-* `RegisterContextResponse`
-* `DiscoverContextAvailabilityRequest`
-* `DiscoverContextAvailabilityResponse`
-
-See the explanation of methods and hierarchy of the [**ngsi** library](#methods-and-hierarchy).
-
-[Top](#top)
-
-
## src/lib/apiTypesV2/
-The **apiTypesV2** library, just like the ngsi* libraries, contains classes; both basic classes (like the library **ngsi**) and top hierarchy classes (like the libraries **ngsi9** and **ngsi10**), for NGSIv2, the improved NGSI protocol.
+The **apiTypesV2** library, just like the ngsi* libraries, contains classes; both basic classes (like the library **ngsi**) and top hierarchy classes (like the library **ngsi10**), for NGSIv2, the improved NGSI protocol.
The hierarchical methods `release()`, `toJson()`, `check()`, etc. are found in these classes as well.
@@ -300,16 +285,6 @@ _PP-02: Parsing a text payload_
[Top](#top)
-## src/lib/jsonParse/
-This library takes care of the JSON parsing of payload for NGSIv1 requests. It depends on the [Boost library property_tree](https://theboostcpplibraries.com/boost.propertytree) and uses SAX to translate the incoming JSON text into the ngsi classes.
-
-This library contains a vector of the type `JsonRequest`, that defines how to parse the different requests. The function `jsonTreat()` picks the parsing method and `jsonParse()` takes care of the parsing, with help from the Boost property_tree library.
-
-See detailed explanation of the V1 JSON parse implementation in its [dedicated document](jsonParse.md).
-
-[Top](#top)
-
-
## src/lib/jsonParseV2/
This is where the newer NGSIv2 request payloads are parsed, using DOM. The [rapidjson](http://rapidjson.org/) library is used to parse the JSON payload, while the purpose of **jsonParseV2** (apart from invoking rapidjson) is to build a tree of objects representing the JSON payload.
@@ -375,14 +350,6 @@ Some NGSIv2 service routines invoke [**mongoBackend**](#srclibmongobackend) dire
[Top](#top)
-## src/lib/convenience/
-The **convenience** library contains top hierarchy classes for the NGSIv1 convenience operations. For a complete list of these requests (and the service routines in which they are based), kindly see [the service routines mapping document](ServiceRoutines.txt).
-
-This library is similar to the [**ngsi9**](#srclibngsi9) and [**ngsi10**](#srclibngsi10) libraries.
-
-[Top](#top)
-
-
## src/lib/mongoBackend/
The most important of all libraries of the broker, the **mongoBackend** library is where all the database interaction takes place (through the "wrapping" library **mongoDriver**). This library is described in detail in [a separate document](mongoBackend.md).
diff --git a/docker/Dockerfile b/docker/Dockerfile
index aac4d0b52f..5c4eb8c651 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -157,7 +157,7 @@ RUN --mount=type=secret,id=repo_token,dst=/run/secrets/repo_token \
WORKDIR /
# Note we disable log file as docker container will output by stdout
-ENTRYPOINT ["/usr/bin/contextBroker","-fg", "-multiservice", "-ngsiv1Autocast", "-disableFileLog" ]
+ENTRYPOINT ["/usr/bin/contextBroker","-fg", "-multiservice", "-disableFileLog" ]
EXPOSE 1026
LABEL "maintainer"="Orion Team. Telefónica I+D"
diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine
index 884c9cf1ef..07d63a291e 100644
--- a/docker/Dockerfile.alpine
+++ b/docker/Dockerfile.alpine
@@ -170,7 +170,7 @@ RUN --mount=type=secret,id=repo_token,dst=/run/secrets/repo_token \
WORKDIR /
# Note we disable log file as docker container will output by stdout
-ENTRYPOINT ["/usr/bin/contextBroker","-fg", "-multiservice", "-ngsiv1Autocast", "-disableFileLog" ]
+ENTRYPOINT ["/usr/bin/contextBroker","-fg", "-multiservice", "-disableFileLog" ]
EXPOSE 1026
LABEL "maintainer"="Orion Team. Telefónica I+D"
diff --git a/makefile b/makefile
index 8ce9dd233b..10a87d369d 100644
--- a/makefile
+++ b/makefile
@@ -204,6 +204,7 @@ clean:
rm -rf BUILD_DEBUG
rm -rf BUILD_COVERAGE
rm -rf BUILD_UNITTEST
+ rm -rf BUILD_FUNCTIONAL
style:
./scripts/style_check_in_makefile.sh
diff --git a/scripts/accumulator-server.py b/scripts/accumulator-server.py
index c08b893bd0..48a8095706 100755
--- a/scripts/accumulator-server.py
+++ b/scripts/accumulator-server.py
@@ -458,6 +458,207 @@ def record_2871():
'''
return r
+
+# In NGSIv1 the response for queryContext and updateContext has the same structure, so we reuse
+# this function for boths
+@app.route("/cpr/queryContext", methods=['POST'])
+@app.route("/cpr/updateContext", methods=['POST'])
+def cpr_simulation():
+
+ # Store request
+ record_request(request)
+
+ if send_continue(request):
+ return Response(status=100)
+ else:
+ # Ad hoc response to test new NGSIv1 parsing logic in PR #4603
+ r = Response(status=200)
+ r.data = '''
+ {
+ "contextResponses": [
+ {
+ "contextElement": {
+ "attributes": [
+ {
+ "name": "lightstatus",
+ "type": "light",
+ "value": {
+ "x": 1,
+ "y": 2
+ }
+ },
+ {
+ "name": "pressure",
+ "type": "clima",
+ "value": [ "a", "b", "c" ]
+ },
+ {
+ "name": "temperature",
+ "type": "degree",
+ "value": "14",
+ "metadatas": [
+ {
+ "name": "ID1",
+ "type": "Text",
+ "value": {
+ "x": 1,
+ "y": 2
+ }
+ },
+ {
+ "name": "ID2",
+ "type": "Text",
+ "value": [ "a", "b", "c" ]
+ },
+ {
+ "name": "ID3",
+ "type": "Text",
+ "value": "ThisIsID"
+ }
+ ]
+ }
+ ],
+ "id": "ConferenceRoom",
+ "isPattern": "false",
+ "type": "Room"
+ },
+ "statusCode": {
+ "code": "200",
+ "reasonPhrase": "OK"
+ }
+ },
+ {
+ "contextElement": {
+ "attributes": [
+ {
+ "name": "temperature",
+ "type": "degree",
+ "value": "14"
+ }
+ ],
+ "id": "ConferenceRoom2",
+ "isPattern": "false",
+ "type": "Room"
+ },
+ "statusCode": {
+ "code": "200",
+ "reasonPhrase": "OK"
+ }
+ },
+ {
+ "contextElement": {
+ "attributes": [
+ {
+ "name": "pressure",
+ "type": "degree",
+ "value": "14"
+ }
+ ],
+ "id": "ConferenceRoom3",
+ "isPattern": "false",
+ "type": "Room"
+ },
+ "statusCode": {
+ "code": "200",
+ "reasonPhrase": "OK"
+ }
+ }
+ ]
+ }
+ '''
+ return r
+
+
+
+@app.route("/cprfail/updateContext", methods=['POST'])
+def cpr_simulation_fail():
+
+ # Store request
+ record_request(request)
+
+ if send_continue(request):
+ return Response(status=100)
+ else:
+ # Ad hoc response to test new NGSIv1 parsing logic in PR #4603
+ r = Response(status=200)
+ r.data = '''
+ {
+ "contextResponses": [
+ {
+ "contextElement": {
+ "attributes": [
+ {
+ "name": "lightstatus",
+ "type": "light",
+ "value": {
+ "x": 1,
+ "y": 2
+ }
+ },
+ {
+ "name": "pressure",
+ "type": "clima",
+ "value": [ "a", "b", "c" ]
+ },
+ {
+ "name": "temperature",
+ "type": "degree",
+ "value": "14",
+ "metadatas": [
+ {
+ "name": "ID1",
+ "type": "Text",
+ "value": {
+ "x": 1,
+ "y": 2
+ }
+ },
+ {
+ "name": "ID2",
+ "type": "Text",
+ "value": [ "a", "b", "c" ]
+ },
+ {
+ "name": "ID3",
+ "type": "Text",
+ "value": "ThisIsID"
+ }
+ ]
+ }
+ ],
+ "id": "ConferenceRoom",
+ "isPattern": "false",
+ "type": "Room"
+ },
+ "statusCode": {
+ "code": "200",
+ "reasonPhrase": "OK"
+ }
+ },
+ {
+ "contextElement": {
+ "attributes": [
+ {
+ "name": "temperature",
+ "type": "degree",
+ "value": "14"
+ }
+ ],
+ "id": "ConferenceRoom2",
+ "isPattern": "false",
+ "type": "Room"
+ },
+ "statusCode": {
+ "code": "422",
+ "reasonPhrase": "this is a fail"
+ }
+ }
+ ]
+ }
+ '''
+ return r
+
+
# Next 6 ones are for testing subscription status and failure logic. They are used by test
# 1126_GET_v2_subscriptions/lastsuccesscode_and_lastfailurereason.test
diff --git a/scripts/style_check_in_makefile.sh b/scripts/style_check_in_makefile.sh
index 109b0c67f0..df8fa8ed39 100755
--- a/scripts/style_check_in_makefile.sh
+++ b/scripts/style_check_in_makefile.sh
@@ -59,8 +59,6 @@ style_check src/lib/alarmMgr
style_check src/lib/metricsMgr
style_check src/lib/expressions
style_check test/unittests
-style_check test/unittests/orionTypes
-style_check test/unittests/jsonParse
style_check test/unittests/apiTypesV2
style_check test/unittests/cache
style_check test/unittests/mongoBackend
@@ -75,18 +73,13 @@ style_check test/unittests/serviceRoutines
# style_check src/lib/rest (3 files)
# style_check src/lib/common (6 files)
# style_check src/lib/orionTypes (9 files)
-# style_check src/lib/convenience (17 files)
-# style_check src/lib/jsonParse (19 files)
# style_check src/lib/ngsi10 (24 files)
-# style_check src/lib/ngsi9 (24 files)
# style_check src/lib/serviceRoutines (46 files)
# style_check src/lib/ngsi (74 files)
# style_check test/unittests/common (1 file)
# style_check test/unittests/parse (2 files)
-# style_check test/unittests/convenience (8 files)
# style_check test/unittests/ngsi10 (9 files)
-# style_check test/unittests/ngsi9 (10 files)
# style_check test/unittests/ngsi (32 files)
#
# style_check test/unittests (1 file, but already done)
@@ -109,8 +102,6 @@ style_check test/unittests/serviceRoutines
# o common/string.h (haderding/remove_ngsiv1_indent: 1 include, 1 external declaration)
# o common/globals.h (feature/mqtt_notifications_poc: 1 external declaration)
# o common/globals.h (haderding/remove_ngsiv1_indent: 1 new external declaration)
-# o common/tag.cpp (haderding/remove_ngsiv1_indent: 'indent' removed from 6 signatures, slight change in 6 functions)
-# o common/tag.h (haderding/remove_ngsiv1_indent: 'indent' removed from 6 signatures)
# o common/macroSubstitute.cpp (haderding/remove_ngsiv1_indent: 2 lines: a param added to toJson())
#
# o rest/httpRequestSend.cpp (feature/mqtt_notifications_poc: 1 include, 1 new function, addition in httpRequestSendWithCurl())
@@ -170,16 +161,6 @@ style_check test/unittests/serviceRoutines
# o ngsi/ContextElementResponseVector.h (haderding/remove_ngsiv1_indent: 7 lines)
# o ngsi/ContextElementVector.cpp (haderding/remove_ngsiv1_indent: 13 lines)
# o ngsi/ContextElementVector.h (haderding/remove_ngsiv1_indent: 8 lines)
-# o ngsi/ContextRegistration.cpp (haderding/remove_ngsiv1_indent: 10 lines)
-# o ngsi/ContextRegistration.h (haderding/remove_ngsiv1_indent: 2 lines)
-# o ngsi/ContextRegistrationAttribute.cpp (haderding/remove_ngsiv1_indent: 7 lines)
-# o ngsi/ContextRegistrationAttribute.h (haderding/remove_ngsiv1_indent: 1 line)
-# o ngsi/ContextRegistrationAttributeVector.cpp (haderding/remove_ngsiv1_indent: 4 lines)
-# o ngsi/ContextRegistrationAttributeVector.h (haderding/remove_ngsiv1_indent: 1 line)
-# o ngsi/ContextRegistrationResponse.cpp (haderding/remove_ngsiv1_indent: 7 lines)
-# o ngsi/ContextRegistrationResponse.h (haderding/remove_ngsiv1_indent: 2 lines)
-# o ngsi/ContextRegistrationResponseVector.cpp (haderding/remove_ngsiv1_indent: 6 lines)
-# o ngsi/ContextRegistrationResponseVector.h (haderding/remove_ngsiv1_indent: 2 lines)
# o ngsi/ContextRegistrationVector.cpp (haderding/remove_ngsiv1_indent: 6 lines)
# o ngsi/ContextRegistrationVector.h (haderding/remove_ngsiv1_indent: 2 lines)
# o ngsi/Duration.cpp (haderding/remove_ngsiv1_indent: 9 lines)
@@ -198,8 +179,6 @@ style_check test/unittests/serviceRoutines
# o ngsi/NotifyConditionVector.h (haderding/remove_ngsiv1_indent: 2 lines)
# o ngsi/Originator.cpp (haderding/remove_ngsiv1_indent: 9 lines)
# o ngsi/Originator.h (haderding/remove_ngsiv1_indent: 5 lines)
-# o ngsi/ProvidingApplication.cpp (haderding/remove_ngsiv1_indent: 9 lines)
-# o ngsi/ProvidingApplication.h (haderding/remove_ngsiv1_indent: 5 lines)
# o ngsi/Reference.cpp (haderding/remove_ngsiv1_indent: 9 lines)
# o ngsi/Reference.h (haderding/remove_ngsiv1_indent: 5 lines)
# o ngsi/RegistrationId.cpp (haderding/remove_ngsiv1_indent: 9 lines)
@@ -281,45 +260,10 @@ style_check test/unittests/serviceRoutines
# alt exec-part in restReply(),
# 'indent' removed from 13 calls to render())
#
-# o serviceRoutines/deleteAllEntitiesWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 3 TIMED_RENDER)
-# o serviceRoutines/deleteAttributeValueInstance.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/deleteAttributeValueInstanceWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 2 TIMED_RENDER)
-# o serviceRoutines/deleteIndividualContextEntity.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/deleteIndividualContextEntityAttribute.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/deleteIndividualContextEntityAttributeWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 3 TIMED_RENDER)
-# o serviceRoutines/getAllEntitiesWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/getAttributeValueInstance.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/getAttributeValueInstanceWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/getAttributesForEntityType.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/getContextEntitiesByEntityIdAndType.cpp (haderding/remove_ngsiv1_indent: 2 TIMED_RENDER)
-# o serviceRoutines/getEntityByIdAttributeByNameWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 2 TIMED_RENDER)
-# o serviceRoutines/getEntityTypes.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/getIndividualContextEntity.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/getIndividualContextEntityAttribute.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/getIndividualContextEntityAttributeWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/getNgsi10ContextEntityTypes.cpp (haderding/remove_ngsiv1_indent: 3 TIMED_RENDER)
-# o serviceRoutines/getNgsi10ContextEntityTypesAttribute.cpp (haderding/remove_ngsiv1_indent: 3 TIMED_RENDER)
-# o serviceRoutines/postAllEntitiesWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 4 TIMED_RENDER)
-# o serviceRoutines/postAttributeValueInstanceWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 3 TIMED_RENDER)
-# o serviceRoutines/postContextEntitiesByEntityIdAndType.cpp (haderding/remove_ngsiv1_indent: 2 TIMED_RENDER)
-# o serviceRoutines/postDiscoverContextAvailability.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/postEntityByIdAttributeByNameWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 2 TIMED_RENDER)
-# o serviceRoutines/postIndividualContextEntity.cpp (haderding/remove_ngsiv1_indent: 5 TIMED_RENDER)
-# o serviceRoutines/postIndividualContextEntityAttribute.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/postIndividualContextEntityAttributeWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
+
# o serviceRoutines/postNotifyContext.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
# o serviceRoutines/postQueryContext.cpp (haderding/remove_ngsiv1_indent: 3 includes, 2 TIMED_RENDER, 35 lines in queryForward())
-# o serviceRoutines/postRegisterContext.cpp (haderding/remove_ngsiv1_indent: 3 TIMED_RENDER)
-# o serviceRoutines/postSubscribeContext.cpp (haderding/remove_ngsiv1_indent: 2 TIMED_RENDER)
-# o serviceRoutines/postUnsubscribeContext.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
# o serviceRoutines/postUpdateContext.cpp (haderding/remove_ngsiv1_indent: 3 includes, 5 TIMED_RENDER, 35 lines in updateForward)
-# o serviceRoutines/postUpdateContextSubscription.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/putAllEntitiesWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 3 TIMED_RENDER)
-# o serviceRoutines/putAttributeValueInstance.cpp (haderding/remove_ngsiv1_indent: 2 TIMED_RENDER)
-# o serviceRoutines/putAttributeValueInstanceWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 3 TIMED_RENDER)
-# o serviceRoutines/putIndividualContextEntity.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/putIndividualContextEntityAttribute.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
-# o serviceRoutines/putIndividualContextEntityAttributeWithTypeAndId.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
# o serviceRoutines/versionTreat.cpp (haderding/remove_ngsiv1_indent: 8 lines in versionTreat())
# o serviceRoutinesV2/getEntityAttributeValue.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
# o serviceRoutinesV2/postSubscriptions.cpp (haderding/remove_ngsiv1_indent: 1 TIMED_RENDER)
@@ -327,8 +271,6 @@ style_check test/unittests/serviceRoutines
#
# o unittests/main_UnitTest.cpp (haderding/remove_ngsiv1_indent: 1 variable)
#
-# o unittests/common/commonTag_test.cpp (haderding/remove_ngsiv1_indent: 24 lineas)
-#
# o unittests/convenience/AppendContextElementRequest_test.cpp (haderding/remove_ngsiv1_indent: 1 render(), 4 check())
# o unittests/convenience/AppendContextElementResponse_test.cpp (haderding/remove_ngsiv1_indent: 2 render(), 3 check())
# o unittests/convenience/ContextAttributeResponseVector_test.cpp (haderding/remove_ngsiv1_indent: 2 render(), 3 check())
@@ -348,8 +290,6 @@ style_check test/unittests/serviceRoutines
# o unittests/ngsi/ContextElement_test.cpp (haderding/remove_ngsiv1_indent: 8 check())
# o unittests/ngsi/ContextRegistrationAttributeVector_test.cpp (haderding/remove_ngsiv1_indent: 4 render()
# o unittests/ngsi/ContextRegistrationAttribute_test.cpp (haderding/remove_ngsiv1_indent: 1 render()
-# o unittests/ngsi/ContextRegistrationResponseVector_test.cpp (haderding/remove_ngsiv1_indent: 1 render(), 3 check())
-# o unittests/ngsi/ContextRegistrationResponse_test.cpp (haderding/remove_ngsiv1_indent: 2 render(), 1 check())
# o unittests/ngsi/ContextRegistrationVector_test.cpp (haderding/remove_ngsiv1_indent: 1 render()
# o unittests/ngsi/Duration_test.cpp (haderding/remove_ngsiv1_indent: 3 check())
# o unittests/ngsi/EntityId_test.cpp (haderding/remove_ngsiv1_indent: 1 render()
diff --git a/src/app/contextBroker/contextBroker.cpp b/src/app/contextBroker/contextBroker.cpp
index 4edaa8a84f..9d7d2294ea 100644
--- a/src/app/contextBroker/contextBroker.cpp
+++ b/src/app/contextBroker/contextBroker.cpp
@@ -80,7 +80,6 @@
#include "logMsg/logMsg.h"
#include "logMsg/traceLevels.h"
-#include "jsonParse/jsonRequest.h"
#include "rest/ConnectionInfo.h"
#include "rest/RestService.h"
#include "rest/restReply.h"
@@ -180,17 +179,14 @@ bool statTiming;
bool statNotifQueue;
int lsPeriod;
bool relogAlarms;
-bool strictIdv1;
bool disableCusNotif;
bool logForHumans;
unsigned long logLineMaxSize;
unsigned long logInfoPayloadMaxSize;
bool disableMetrics;
-bool disableNgsiv1;
bool disableFileLog;
int reqTimeout;
bool insecureNotif;
-bool ngsiv1Autocast;
bool fcEnabled;
double fcGauge;
@@ -256,17 +252,14 @@ bool logDeprecate;
#define STAT_NOTIF_QUEUE "enable thread pool notifications queue statistics"
#define LOG_SUMMARY_DESC "log summary period in seconds (defaults to 0, meaning 'off')"
#define RELOGALARMS_DESC "log messages for existing alarms beyond the raising alarm log message itself"
-#define CHECK_v1_ID_DESC "additional checks for id fields in the NGSIv1 API"
#define DISABLE_CUSTOM_NOTIF "disable NGSIv2 custom notifications"
#define DISABLE_FILE_LOG "disable logging into file"
#define LOG_FOR_HUMANS_DESC "human readible log to screen"
#define LOG_LINE_MAX_SIZE_DESC "log line maximum size (in bytes)"
#define LOG_INFO_PAYLOAD_MAX_SIZE_DESC "maximum length for request or response payload in INFO log level (in bytes)"
#define DISABLE_METRICS_DESC "turn off the 'metrics' feature"
-#define DISABLE_NGSIV1_DESC "turn off NGSIv1 request endpoints"
#define REQ_TMO_DESC "connection timeout for REST requests (in seconds)"
#define INSECURE_NOTIF_DESC "allow HTTPS notifications to peers which certificate cannot be authenticated with known CA certificates"
-#define NGSIV1_AUTOCAST_DESC "automatic cast for number, booleans and dates in NGSIv1 update/create attribute operations"
#define MQTT_MAX_AGE_DESC "max time (in minutes) that an unused MQTT connection is kept, default: 60"
#define LOG_DEPRECATE_DESC "log deprecation usages as warnings"
#define DBURI_DESC "complete URI for database connection"
@@ -335,7 +328,6 @@ PaArgument paArgs[] =
{ "-logSummary", &lsPeriod, "LOG_SUMMARY_PERIOD", PaInt, PaOpt, 0, 0, ONE_MONTH_PERIOD, LOG_SUMMARY_DESC },
{ "-relogAlarms", &relogAlarms, "RELOG_ALARMS", PaBool, PaOpt, false, false, true, RELOGALARMS_DESC },
- { "-strictNgsiv1Ids", &strictIdv1, "CHECK_ID_V1", PaBool, PaOpt, false, false, true, CHECK_v1_ID_DESC },
{ "-disableCustomNotifications", &disableCusNotif, "DISABLE_CUSTOM_NOTIF", PaBool, PaOpt, false, false, true, DISABLE_CUSTOM_NOTIF },
{ "-disableFileLog", &disableFileLog, "DISABLE_FILE_LOG", PaBool, PaOpt, false, false, true, DISABLE_FILE_LOG },
@@ -344,12 +336,9 @@ PaArgument paArgs[] =
{ "-logInfoPayloadMaxSize", &logInfoPayloadMaxSize, "LOG_INFO_PAYLOAD_MAX_SIZE",PaLong, PaOpt, (5 * 1024), 0, PaNL, LOG_INFO_PAYLOAD_MAX_SIZE_DESC },
{ "-disableMetrics", &disableMetrics, "DISABLE_METRICS", PaBool, PaOpt, false, false, true, DISABLE_METRICS_DESC },
- { "-disableNgsiv1", &disableNgsiv1, "DISABLE_NGSIV1", PaBool, PaOpt, false, false, true, DISABLE_NGSIV1_DESC },
{ "-insecureNotif", &insecureNotif, "INSECURE_NOTIF", PaBool, PaOpt, false, false, true, INSECURE_NOTIF_DESC },
- { "-ngsiv1Autocast", &ngsiv1Autocast, "NGSIV1_AUTOCAST", PaBool, PaOpt, false, false, true, NGSIV1_AUTOCAST_DESC },
-
{ "-mqttMaxAge", &mqttMaxAge, "MQTT_MAX_AGE", PaInt, PaOpt, 60, PaNL, PaNL, MQTT_MAX_AGE_DESC },
{ "-logDeprecate", &logDeprecate, "LOG_DEPRECATE", PaBool, PaOpt, false, false, true, LOG_DEPRECATE_DESC },
@@ -384,8 +373,8 @@ static const char* validLogLevels[] =
* to treat the incoming request.
*
* The URL path is divided into components (Using '/' as field separator) so that the URL
-* "/ngsi9/registerContext" becomes a component vector of the two components
-* "ngsi9" and "registerContext".
+* "/v2/entities" becomes a component vector of the two components
+* "v2" and "entities".
*
* Each line contains the necessary information for ONE service:
* RequestType request - The type of the request
@@ -1206,7 +1195,7 @@ int main(int argC, char* argV[])
alarmMgr.init(relogAlarms);
mqttMgr.init(mqttTimeout);
exprMgr.init();
- orionInit(orionExit, ORION_VERSION, policy, statCounters, statSemWait, statTiming, statNotifQueue, strictIdv1);
+ orionInit(orionExit, ORION_VERSION, policy, statCounters, statSemWait, statTiming, statNotifQueue);
mongoInit(dbURI, dbName, pwd, mtenant, writeConcern, dbPoolSize, statSemWait);
metricsMgr.init(!disableMetrics, statSemWait);
logSummaryInit(&lsPeriod);
@@ -1284,7 +1273,6 @@ int main(int argC, char* argV[])
allowedOrigin,
maxAge,
reqTimeout,
- disableNgsiv1,
httpsPrivateServerKey,
httpsCertificate);
@@ -1303,7 +1291,6 @@ int main(int argC, char* argV[])
allowedOrigin,
maxAge,
reqTimeout,
- disableNgsiv1,
NULL,
NULL);
}
diff --git a/src/app/contextBroker/orionRestServices.cpp b/src/app/contextBroker/orionRestServices.cpp
index cf4eafc048..926020d495 100644
--- a/src/app/contextBroker/orionRestServices.cpp
+++ b/src/app/contextBroker/orionRestServices.cpp
@@ -22,81 +22,29 @@
*
* Author: Ken Zangelin
*/
+
+
#include "serviceRoutines/logTraceTreat.h"
-#include "serviceRoutines/getEntityTypes.h"
-#include "serviceRoutines/getAttributesForEntityType.h"
-#include "serviceRoutines/getAllContextEntities.h"
#include "serviceRoutines/versionTreat.h"
#include "serviceRoutines/statisticsTreat.h"
#include "serviceRoutines/exitTreat.h"
#include "serviceRoutines/leakTreat.h"
-
-#include "serviceRoutines/postDiscoverContextAvailability.h"
-/// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
-///#include "serviceRoutines/postQueryContext.h"
-#include "serviceRoutines/postRegisterContext.h"
-#include "serviceRoutines/postSubscribeContext.h"
-/// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
-///#include "serviceRoutines/postUpdateContext.h"
-#include "serviceRoutines/postUpdateContextSubscription.h"
-#include "serviceRoutines/postUnsubscribeContext.h"
-#include "serviceRoutines/postNotifyContext.h"
-#include "serviceRoutines/postSubscribeContextConvOp.h"
-#include "serviceRoutines/getContextEntitiesByEntityId.h"
-#include "serviceRoutines/postContextEntitiesByEntityId.h"
-#include "serviceRoutines/getContextEntityAttributes.h"
-#include "serviceRoutines/postContextEntityAttributes.h"
-#include "serviceRoutines/getEntityByIdAttributeByName.h"
-#include "serviceRoutines/postEntityByIdAttributeByName.h"
-#include "serviceRoutines/getContextEntityTypes.h"
-#include "serviceRoutines/postContextEntityTypes.h"
-#include "serviceRoutines/getContextEntityTypeAttribute.h"
-#include "serviceRoutines/postContextEntityTypeAttribute.h"
-#include "serviceRoutines/getIndividualContextEntity.h"
-#include "serviceRoutines/putIndividualContextEntity.h"
+#include "serviceRoutines/optionsVersionRequest.h"
#include "serviceRoutines/badVerbPostOnly.h"
#include "serviceRoutines/badVerbPutDeleteOnly.h"
#include "serviceRoutines/badVerbGetPostOnly.h"
#include "serviceRoutines/badVerbGetDeleteOnly.h"
-#include "serviceRoutines/postIndividualContextEntity.h"
-#include "serviceRoutines/deleteIndividualContextEntity.h"
-#include "serviceRoutines/badVerbAllFour.h"
-#include "serviceRoutines/badVerbAllFive.h"
#include "serviceRoutines/badVerbPutOnly.h"
-#include "serviceRoutines/putIndividualContextEntityAttribute.h"
-#include "serviceRoutines/getIndividualContextEntityAttribute.h"
-#include "serviceRoutines/getNgsi10ContextEntityTypes.h"
-#include "serviceRoutines/getNgsi10ContextEntityTypesAttribute.h"
-#include "serviceRoutines/postIndividualContextEntityAttribute.h"
-#include "serviceRoutines/deleteIndividualContextEntityAttribute.h"
-#include "serviceRoutines/putSubscriptionConvOp.h"
-#include "serviceRoutines/deleteSubscriptionConvOp.h"
-#include "serviceRoutines/getAllEntitiesWithTypeAndId.h"
-#include "serviceRoutines/postAllEntitiesWithTypeAndId.h"
-#include "serviceRoutines/putAllEntitiesWithTypeAndId.h"
-#include "serviceRoutines/deleteAllEntitiesWithTypeAndId.h"
-#include "serviceRoutines/getIndividualContextEntityAttributeWithTypeAndId.h"
-#include "serviceRoutines/postIndividualContextEntityAttributeWithTypeAndId.h"
-#include "serviceRoutines/putIndividualContextEntityAttributeWithTypeAndId.h"
-#include "serviceRoutines/deleteIndividualContextEntityAttributeWithTypeAndId.h"
-#include "serviceRoutines/getContextEntitiesByEntityIdAndType.h"
-#include "serviceRoutines/postContextEntitiesByEntityIdAndType.h"
-#include "serviceRoutines/getEntityByIdAttributeByNameWithTypeAndId.h"
-#include "serviceRoutines/postEntityByIdAttributeByNameWithTypeAndId.h"
#include "serviceRoutines/badVerbGetPutDeleteOnly.h"
-#include "serviceRoutines/badVerbGetPostDeleteOnly.h"
#include "serviceRoutines/badVerbGetOnly.h"
-#include "serviceRoutines/badVerbGetDeleteOnly.h"
+#include "serviceRoutines/badRequest.h"
+
+// FIXME PR: postNotifyContext.h should be in serviceRoutinesV2 as it is for a v2 operation
+#include "serviceRoutines/postNotifyContext.h"
+
#include "serviceRoutinesV2/badVerbGetPutOnly.h"
#include "serviceRoutinesV2/badVerbGetDeletePatchOnly.h"
-// FIXME: disable NGSI9 API routes in Orion 3.8.0, to be definetively removed at some point of the future
-// (along with badNgsi9Request.h|cpp files themselves)
-//#include "serviceRoutines/badNgsi9Request.h"
-/// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
-///#include "serviceRoutines/badNgsi10Request.h"
-#include "serviceRoutines/badRequest.h"
#include "serviceRoutinesV2/badVerbAllNotDelete.h"
-
#include "serviceRoutinesV2/getEntities.h"
#include "serviceRoutinesV2/entryPointsTreat.h"
#include "serviceRoutinesV2/getEntity.h"
@@ -130,7 +78,6 @@
#include "serviceRoutinesV2/optionsGetPutDeleteOnly.h"
#include "serviceRoutinesV2/optionsGetDeletePatchOnly.h"
#include "serviceRoutinesV2/optionsPostOnly.h"
-#include "serviceRoutines/optionsVersionRequest.h"
#include "serviceRoutinesV2/getRegistration.h"
#include "serviceRoutinesV2/deleteRegistration.h"
@@ -179,79 +126,6 @@ static RestService getServiceV[] =
ORION_REST_SERVICE_END
};
-static RestService getServiceVlegacy[] =
-{
- { EntryPointsRequest, 1, { "v2" }, entryPointsTreat },
- { EntitiesRequest, 2, { "v2", "entities" }, getEntities },
- { EntityRequest, 3, { "v2", "entities", "*" }, getEntity },
- { EntityRequest, 4, { "v2", "entities", "*", "attrs" }, getEntity },
- { EntityAttributeValueRequest, 6, { "v2", "entities", "*", "attrs", "*", "value" }, getEntityAttributeValue },
- { EntityAttributeRequest, 5, { "v2", "entities", "*", "attrs", "*" }, getEntityAttribute },
- { EntityTypeRequest, 3, { "v2", "types", "*" }, getEntityType },
- { EntityAllTypesRequest, 2, { "v2", "types" }, getEntityAllTypes },
- { SubscriptionsRequest, 2, { "v2", "subscriptions" }, getAllSubscriptions },
- { SubscriptionRequest, 3, { "v2", "subscriptions", "*" }, getSubscription },
- { RegistrationRequest, 3, { "v2", "registrations", "*" }, getRegistration },
- { RegistrationsRequest, 2, { "v2", "registrations" }, getRegistrations },
- // FIXME: disable NGSI9 API routes in Orion 3.8.0, to be definetively removed at some point of the future
- //{ ContextEntitiesByEntityId, 3, { "ngsi9", "contextEntities", "*" }, getContextEntitiesByEntityId },
- //{ ContextEntityAttributes, 4, { "ngsi9", "contextEntities", "*", "attributes" }, getContextEntityAttributes },
- //{ EntityByIdAttributeByName, 5, { "ngsi9", "contextEntities", "*", "attributes", "*" }, getEntityByIdAttributeByName },
- //{ ContextEntityTypes, 3, { "ngsi9", "contextEntityTypes", "*" }, getContextEntityTypes },
- //{ ContextEntityTypeAttributeContainer, 4, { "ngsi9", "contextEntityTypes", "*", "attributes" }, getContextEntityTypes },
- //{ ContextEntityTypeAttribute, 5, { "ngsi9", "contextEntityTypes", "*", "attributes", "*" }, getContextEntityTypeAttribute },
- // FIXME: disable unused NGSv1 API routes in Orion 3.9.0, to be definetively removed at some point of the future
- //{ ContextEntitiesByEntityId, 4, { "v1", "registry", "contextEntities", "*" }, getContextEntitiesByEntityId },
- //{ ContextEntityAttributes, 5, { "v1", "registry", "contextEntities", "*", "attributes" }, getContextEntityAttributes },
- //{ EntityByIdAttributeByName, 6, { "v1", "registry", "contextEntities", "*", "attributes", "*" }, getEntityByIdAttributeByName },
- //{ ContextEntityTypes, 4, { "v1", "registry", "contextEntityTypes", "*" }, getContextEntityTypes },
- //{ ContextEntityTypeAttributeContainer, 5, { "v1", "registry", "contextEntityTypes", "*", "attributes" }, getContextEntityTypes },
- //{ ContextEntityTypeAttribute, 6, { "v1", "registry", "contextEntityTypes", "*", "attributes", "*" }, getContextEntityTypeAttribute },
- //{ IndividualContextEntity, 3, { "ngsi10", "contextEntities", "*" }, getIndividualContextEntity },
- //{ IndividualContextEntityAttributes, 4, { "ngsi10", "contextEntities", "*", "attributes" }, getIndividualContextEntity },
- //{ IndividualContextEntityAttribute, 5, { "ngsi10", "contextEntities", "*", "attributes", "*" }, getIndividualContextEntityAttribute },
- //{ Ngsi10ContextEntityTypes, 3, { "ngsi10", "contextEntityTypes", "*" }, getNgsi10ContextEntityTypes },
- //{ Ngsi10ContextEntityTypesAttributeContainer, 4, { "ngsi10", "contextEntityTypes", "*", "attributes" }, getNgsi10ContextEntityTypes },
- //{ Ngsi10ContextEntityTypesAttribute, 5, { "ngsi10", "contextEntityTypes", "*", "attributes", "*" }, getNgsi10ContextEntityTypesAttribute },
- //{ IndividualContextEntity, 3, { "v1", "contextEntities", "*" }, getIndividualContextEntity },
- //{ IndividualContextEntityAttributes, 4, { "v1", "contextEntities", "*", "attributes" }, getIndividualContextEntity },
- /// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
- ///{ IndividualContextEntityAttribute, 5, { "v1", "contextEntities", "*", "attributes", "*" }, getIndividualContextEntityAttribute },
- //{ Ngsi10ContextEntityTypes, 3, { "v1", "contextEntityTypes", "*" }, getNgsi10ContextEntityTypes },
- //{ Ngsi10ContextEntityTypesAttributeContainer, 4, { "v1", "contextEntityTypes", "*", "attributes" }, getNgsi10ContextEntityTypes },
- //{ Ngsi10ContextEntityTypesAttribute, 5, { "v1", "contextEntityTypes", "*", "attributes", "*" }, getNgsi10ContextEntityTypesAttribute },
- //{ EntityTypes, 2, { "v1", "contextTypes" }, getEntityTypes },
- //{ AttributesForEntityType, 3, { "v1", "contextTypes", "*" }, getAttributesForEntityType },
- //{ AllContextEntities, 2, { "v1", "contextEntities" }, getAllContextEntities },
- //{ AllEntitiesWithTypeAndId, 6, { "v1", "contextEntities", "type", "*", "id", "*" }, getAllEntitiesWithTypeAndId },
- //{ IndividualContextEntityAttributeWithTypeAndId, 8, { "v1", "contextEntities", "type", "*", "id", "*", "attributes", "*" }, getIndividualContextEntityAttributeWithTypeAndId },
- //{ ContextEntitiesByEntityIdAndType, 7, { "v1", "registry", "contextEntities", "type", "*", "id", "*" }, getContextEntitiesByEntityIdAndType },
- //{ EntityByIdAttributeByNameIdAndType, 9, { "v1", "registry", "contextEntities", "type", "*", "id", "*", "attributes", "*" }, getEntityByIdAttributeByNameWithTypeAndId },
- { LogTraceRequest, 2, { "log", "trace" }, logTraceTreat },
- // FIXME: disable administrative API routes not aligned with documentation in Orion 3.8.0,
- // to be definetively removed at some point of the future
- //{ LogTraceRequest, 2, { "log", "traceLevel" }, logTraceTreat },
- //{ LogTraceRequest, 4, { "v1", "admin", "log", "trace" }, logTraceTreat },
- //{ LogTraceRequest, 4, { "v1", "admin", "log", "traceLevel" }, logTraceTreat },
- { StatisticsRequest, 1, { "statistics" }, statisticsTreat },
- //{ StatisticsRequest, 3, { "v1", "admin", "statistics" }, statisticsTreat },
- { StatisticsRequest, 2, { "cache", "statistics" }, statisticsCacheTreat },
- //{ StatisticsRequest, 4, { "v1", "admin", "cache", "statistics" }, statisticsCacheTreat },
- { VersionRequest, 1, { "version" }, versionTreat },
- { LogLevelRequest, 2, { "admin", "log" }, getLogConfig },
- { SemStateRequest, 2, { "admin", "sem" }, semStateTreat },
- { MetricsRequest, 2, { "admin", "metrics" }, getMetrics },
-
-#ifdef DEBUG
- { ExitRequest, 2, { "exit", "*" }, exitTreat },
- { ExitRequest, 1, { "exit" }, exitTreat },
- { LeakRequest, 2, { "leak", "*" }, leakTreat },
- { LeakRequest, 1, { "leak" }, leakTreat },
-#endif
-
- ORION_REST_SERVICE_END
-};
-
/* ****************************************************************************
@@ -271,70 +145,6 @@ static RestService postServiceV[] =
ORION_REST_SERVICE_END
};
-static RestService postServiceVlegacy[] =
-{
- { EntitiesRequest, 2, { "v2", "entities" }, postEntities },
- { EntityRequest, 4, { "v2", "entities", "*", "attrs" }, postEntity },
- { NotifyContext, 3, { "v2", "op", "notify" }, postNotifyContext },
- { BatchQueryRequest, 3, { "v2", "op", "query" }, postBatchQuery },
- { BatchUpdateRequest, 3, { "v2", "op", "update" }, postBatchUpdate },
- { SubscriptionsRequest, 2, { "v2", "subscriptions" }, postSubscriptions },
- { RegistrationsRequest, 2, { "v2", "registrations" }, postRegistration },
- // FIXME: disable NGSI9 API routes in Orion 3.8.0, to be definetively removed at some point of the future
- //{ RegisterContext, 2, { "ngsi9", "registerContext" }, postRegisterContext },
- //{ DiscoverContextAvailability, 2, { "ngsi9", "discoverContextAvailability" }, postDiscoverContextAvailability },
- // FIXME: disable NGSI9 API routes in Orion 3.8.0, to be definetively removed at some point of the future
- //{ RegisterContext, 3, { "v1", "registry", "registerContext" }, postRegisterContext },
- //{ DiscoverContextAvailability, 3, { "v1", "registry", "discoverContextAvailability" }, postDiscoverContextAvailability },
- // FIXME: disable NGSI9 API routes in Orion 3.8.0, to be definetively removed at some point of the future
- //{ RegisterContext, 2, { "ngsi9", "registerContext" }, postRegisterContext },
- //{ DiscoverContextAvailability, 2, { "ngsi9", "discoverContextAvailability" }, postDiscoverContextAvailability },
- /// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
- ///{ UpdateContext, 2, { "v1", "updateContext" }, (RestTreat) postUpdateContext },
- ///{ QueryContext, 2, { "v1", "queryContext" }, postQueryContext },
- // FIXME: disable unused NGSv1 API routes in Orion 3.9.0, to be definetively removed at some point of the future
- //{ SubscribeContext, 2, { "v1", "subscribeContext" }, postSubscribeContext },
- //{ UpdateContextSubscription, 2, { "v1", "updateContextSubscription" }, postUpdateContextSubscription },
- //{ UnsubscribeContext, 2, { "v1", "unsubscribeContext" }, postUnsubscribeContext },
- //{ NotifyContext, 2, { "v1", "notifyContext" }, postNotifyContext },
- // FIXME: disable NGSI9 API routes in Orion 3.8.0, to be definetively removed at some point of the future
- //{ ContextEntitiesByEntityId, 3, { "ngsi9", "contextEntities", "*" }, postContextEntitiesByEntityId },
- //{ ContextEntityAttributes, 4, { "ngsi9", "contextEntities", "*", "attributes" }, postContextEntityAttributes },
- //{ EntityByIdAttributeByName, 5, { "ngsi9", "contextEntities", "*", "attributes", "*" }, postEntityByIdAttributeByName },
- //{ ContextEntityTypes, 3, { "ngsi9", "contextEntityTypes", "*" }, postContextEntityTypes },
- //{ ContextEntityTypeAttributeContainer, 4, { "ngsi9", "contextEntityTypes", "*", "attributes" }, postContextEntityTypes },
- //{ ContextEntityTypeAttribute, 5, { "ngsi9", "contextEntityTypes", "*", "attributes", "*" }, postContextEntityTypeAttribute },
- // FIXME: disable unused NGSv1 API routes in Orion 3.9.0, to be definetively removed at some point of the future
- //{ ContextEntitiesByEntityId, 4, { "v1", "registry", "contextEntities", "*" }, postContextEntitiesByEntityId },
- //{ ContextEntityAttributes, 5, { "v1", "registry", "contextEntities", "*", "attributes" }, postContextEntityAttributes },
- //{ EntityByIdAttributeByName, 6, { "v1", "registry", "contextEntities", "*", "attributes", "*" }, postEntityByIdAttributeByName },
- //{ ContextEntityTypes, 4, { "v1", "registry", "contextEntityTypes", "*" }, postContextEntityTypes },
- //{ ContextEntityTypeAttributeContainer, 5, { "v1", "registry", "contextEntityTypes", "*", "attributes" }, postContextEntityTypes },
- //{ ContextEntityTypeAttribute, 6, { "v1", "registry", "contextEntityTypes", "*", "attributes", "*" }, postContextEntityTypeAttribute },
- //{ IndividualContextEntity, 3, { "ngsi10", "contextEntities", "*" }, postIndividualContextEntity },
- //{ IndividualContextEntityAttributes, 4, { "ngsi10", "contextEntities", "*", "attributes" }, postIndividualContextEntity },
- //{ IndividualContextEntityAttribute, 5, { "ngsi10", "contextEntities", "*", "attributes", "*" }, postIndividualContextEntityAttribute },
- //{ SubscribeContext, 2, { "ngsi10", "contextSubscriptions" }, postSubscribeContextConvOp },
- //{ IndividualContextEntity, 3, { "v1", "contextEntities", "*" }, postIndividualContextEntity },
- //{ IndividualContextEntityAttributes, 4, { "v1", "contextEntities", "*", "attributes" }, postIndividualContextEntity },
- //{ IndividualContextEntityAttribute, 5, { "v1", "contextEntities", "*", "attributes", "*" }, postIndividualContextEntityAttribute },
- //{ SubscribeContext, 2, { "v1", "contextSubscriptions" }, postSubscribeContextConvOp },
- //{ AllContextEntities, 2, { "v1", "contextEntities" }, postIndividualContextEntity },
- //{ AllEntitiesWithTypeAndId, 6, { "v1", "contextEntities", "type", "*", "id", "*" }, postAllEntitiesWithTypeAndId },
- //{ IndividualContextEntityAttributeWithTypeAndId, 8, { "v1", "contextEntities", "type", "*", "id", "*", "attributes", "*" }, postIndividualContextEntityAttributeWithTypeAndId },
- //{ ContextEntitiesByEntityIdAndType, 7, { "v1", "registry", "contextEntities", "type", "*", "id", "*" }, postContextEntitiesByEntityIdAndType },
- //{ EntityByIdAttributeByNameIdAndType, 9, { "v1", "registry", "contextEntities", "type", "*", "id", "*", "attributes", "*" }, postEntityByIdAttributeByNameWithTypeAndId },
- /// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
- ///{ UpdateContext, 2, { "ngsi10", "updateContext" }, (RestTreat) postUpdateContext },
- ///{ QueryContext, 2, { "ngsi10", "queryContext" }, postQueryContext },
- //{ SubscribeContext, 2, { "ngsi10", "subscribeContext" }, postSubscribeContext },
- //{ UpdateContextSubscription, 2, { "ngsi10", "updateContextSubscription" }, postUpdateContextSubscription },
- //{ UnsubscribeContext, 2, { "ngsi10", "unsubscribeContext" }, postUnsubscribeContext },
- //{ NotifyContext, 2, { "ngsi10", "notifyContext" }, postNotifyContext },
-
- ORION_REST_SERVICE_END
-};
-
/* ****************************************************************************
*
@@ -351,34 +161,6 @@ static RestService putServiceV[] =
ORION_REST_SERVICE_END
};
-static RestService putServiceVlegacy[] =
-{
- { EntityRequest, 4, { "v2", "entities", "*", "attrs" }, putEntity },
- { EntityAttributeValueRequest, 6, { "v2", "entities", "*", "attrs", "*", "value" }, putEntityAttributeValue },
- { EntityAttributeRequest, 5, { "v2", "entities", "*", "attrs", "*" }, putEntityAttribute },
- // FIXME: disable unused NGSv1 API routes in Orion 3.9.0, to be definetively removed at some point of the future
- //{ IndividualContextEntity, 3, { "ngsi10", "contextEntities", "*" }, putIndividualContextEntity },
- //{ IndividualContextEntityAttributes, 4, { "ngsi10", "contextEntities", "*", "attributes" }, putIndividualContextEntity },
- //{ IndividualContextEntityAttribute, 5, { "ngsi10", "contextEntities", "*", "attributes", "*" }, putIndividualContextEntityAttribute },
- //{ Ngsi10SubscriptionsConvOp, 3, { "ngsi10", "contextSubscriptions", "*" }, putSubscriptionConvOp },
- /// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
- ///{ IndividualContextEntity, 3, { "v1", "contextEntities", "*" }, putIndividualContextEntity },
- //{ IndividualContextEntityAttributes, 4, { "v1", "contextEntities", "*", "attributes" }, putIndividualContextEntity },
- //{ IndividualContextEntityAttribute, 5, { "v1", "contextEntities", "*", "attributes", "*" }, putIndividualContextEntityAttribute },
- //{ Ngsi10SubscriptionsConvOp, 3, { "v1", "contextSubscriptions", "*" }, putSubscriptionConvOp },
- //{ AllEntitiesWithTypeAndId, 6, { "v1", "contextEntities", "type", "*", "id", "*" }, putAllEntitiesWithTypeAndId },
- //{ IndividualContextEntityAttributeWithTypeAndId, 8, { "v1", "contextEntities", "type", "*", "id", "*", "attributes", "*" }, putIndividualContextEntityAttributeWithTypeAndId },
- // FIXME: disable administrative API routes not aligned with documentation in Orion 3.8.0,
- // to be definetively removed at some point of the future
- { LogTraceRequest, 3, { "log", "trace", "*" }, logTraceTreat },
- //{ LogTraceRequest, 3, { "log", "traceLevel", "*" }, logTraceTreat },
- //{ LogTraceRequest, 5, { "v1", "admin", "log", "trace", "*" }, logTraceTreat },
- //{ LogTraceRequest, 5, { "v1", "admin", "log", "traceLevel", "*" }, logTraceTreat },
- { LogLevelRequest, 2, { "admin", "log" }, changeLogConfig },
-
- ORION_REST_SERVICE_END
-};
-
/* ****************************************************************************
*
@@ -412,43 +194,6 @@ static RestService deleteServiceV[] =
ORION_REST_SERVICE_END
};
-static RestService deleteServiceVlegacy[] =
-{
- { EntityRequest, 3, { "v2", "entities", "*" }, deleteEntity },
- { EntityAttributeRequest, 5, { "v2", "entities", "*", "attrs", "*" }, deleteEntity },
- { SubscriptionRequest, 3, { "v2", "subscriptions", "*" }, deleteSubscription },
- { RegistrationRequest, 3, { "v2", "registrations", "*" }, deleteRegistration },
- // FIXME: disable unused NGSv1 API routes in Orion 3.9.0, to be definetively removed at some point of the future
- //{ IndividualContextEntity, 3, { "ngsi10", "contextEntities", "*" }, deleteIndividualContextEntity },
- //{ IndividualContextEntityAttributes, 4, { "ngsi10", "contextEntities", "*", "attributes" }, deleteIndividualContextEntity },
- //{ IndividualContextEntityAttribute, 5, { "ngsi10", "contextEntities", "*", "attributes", "*" }, deleteIndividualContextEntityAttribute },
- //{ Ngsi10SubscriptionsConvOp, 3, { "ngsi10", "contextSubscriptions", "*" }, deleteSubscriptionConvOp },
- /// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
- ///{ IndividualContextEntity, 3, { "v1", "contextEntities", "*" }, deleteIndividualContextEntity },
- //{ IndividualContextEntityAttributes, 4, { "v1", "contextEntities", "*", "attributes" }, deleteIndividualContextEntity },
- //{ IndividualContextEntityAttribute, 5, { "v1", "contextEntities", "*", "attributes", "*" }, deleteIndividualContextEntityAttribute },
- //{ Ngsi10SubscriptionsConvOp, 3, { "v1", "contextSubscriptions", "*" }, deleteSubscriptionConvOp },
- //{ AllEntitiesWithTypeAndId, 6, { "v1", "contextEntities", "type", "*", "id", "*" }, deleteAllEntitiesWithTypeAndId },
- //{ IndividualContextEntityAttributeWithTypeAndId, 8, { "v1", "contextEntities", "type", "*", "id", "*", "attributes", "*" }, deleteIndividualContextEntityAttributeWithTypeAndId },
- // FIXME: disable administrative API routes not aligned with documentation in Orion 3.8.0,
- // to be definetively removed at some point of the future
- { LogTraceRequest, 2, { "log", "trace" }, logTraceTreat },
- { LogTraceRequest, 3, { "log", "trace", "*" }, logTraceTreat },
- //{ LogTraceRequest, 2, { "log", "traceLevel" }, logTraceTreat },
- //{ LogTraceRequest, 3, { "log", "traceLevel", "*" }, logTraceTreat },
- //{ LogTraceRequest, 4, { "v1", "admin", "log", "trace" }, logTraceTreat },
- //{ LogTraceRequest, 5, { "v1", "admin", "log", "trace", "*" }, logTraceTreat },
- //{ LogTraceRequest, 4, { "v1", "admin", "log", "traceLevel" }, logTraceTreat },
- //{ LogTraceRequest, 5, { "v1", "admin", "log", "traceLevel", "*" }, logTraceTreat },
- { StatisticsRequest, 1, { "statistics" }, statisticsTreat },
- //{ StatisticsRequest, 3, { "v1", "admin", "statistics" }, statisticsTreat },
- { StatisticsRequest, 2, { "cache", "statistics" }, statisticsCacheTreat },
- //{ StatisticsRequest, 4, { "v1", "admin", "cache", "statistics" }, statisticsCacheTreat },
- { MetricsRequest, 2, { "admin", "metrics" }, deleteMetrics },
-
- ORION_REST_SERVICE_END
-};
-
/* ****************************************************************************
*
@@ -485,111 +230,6 @@ static RestService badVerbV[] =
ORION_REST_SERVICE_END
};
-static RestService badVerbVlegacy[] =
-{
- { EntryPointsRequest, 1, { "v2" }, badVerbGetOnly },
- { EntitiesRequest, 2, { "v2", "entities" }, badVerbGetPostOnly },
- { EntityRequest, 3, { "v2", "entities", "*" }, badVerbGetDeleteOnly },
- { EntityRequest, 4, { "v2", "entities", "*", "attrs" }, badVerbAllNotDelete },
- { EntityAttributeValueRequest, 6, { "v2", "entities", "*", "attrs", "*", "value" }, badVerbGetPutOnly },
- { EntityAttributeRequest, 5, { "v2", "entities", "*", "attrs", "*" }, badVerbGetPutDeleteOnly },
- { EntityTypeRequest, 3, { "v2", "types", "*" }, badVerbGetOnly },
- { EntityAllTypesRequest, 2, { "v2", "types" }, badVerbGetOnly },
- { SubscriptionsRequest, 2, { "v2", "subscriptions" }, badVerbGetPostOnly },
- { SubscriptionRequest, 3, { "v2", "subscriptions", "*" }, badVerbGetDeletePatchOnly },
- { BatchQueryRequest, 3, { "v2", "op", "query" }, badVerbPostOnly },
- { BatchUpdateRequest, 3, { "v2", "op", "update" }, badVerbPostOnly },
- { RegistrationRequest, 3, { "v2", "registrations", "*" }, badVerbGetDeleteOnly },
- { RegistrationsRequest, 2, { "v2", "registrations" }, badVerbGetPostOnly },
- // FIXME: disable NGSI9 API routes in Orion 3.8.0, to be definetively removed at some point of the future
- //{ RegisterContext, 2, { "ngsi9", "registerContext" }, badVerbPostOnly },
- //{ DiscoverContextAvailability, 2, { "ngsi9", "discoverContextAvailability" }, badVerbPostOnly },
- /// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
- ///{ RegisterContext, 3, { "v1", "registry", "registerContext" }, badVerbPostOnly },
- ///{ DiscoverContextAvailability, 3, { "v1", "registry", "discoverContextAvailability" }, badVerbPostOnly },
- // FIXME: disable NGSI9 API routes in Orion 3.8.0, to be definetively removed at some point of the future
- //{ RegisterContext, 2, { "ngsi9", "registerContext" }, badVerbPostOnly },
- //{ DiscoverContextAvailability, 2, { "ngsi9", "discoverContextAvailability" }, badVerbPostOnly },
- /// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
- ///{ UpdateContext, 2, { "v1", "updateContext" }, badVerbPostOnly },
- ///{ QueryContext, 2, { "v1", "queryContext" }, badVerbPostOnly },
- ///{ SubscribeContext, 2, { "v1", "subscribeContext" }, badVerbPostOnly },
- ///{ UpdateContextSubscription, 2, { "v1", "updateContextSubscription" }, badVerbPostOnly },
- ///{ UnsubscribeContext, 2, { "v1", "unsubscribeContext" }, badVerbPostOnly },
- ///{ NotifyContext, 2, { "v1", "notifyContext" }, badVerbPostOnly },
- // FIXME: disable NGSI9 API routes in Orion 3.8.0, to be definetively removed at some point of the future
- //{ ContextEntitiesByEntityId, 3, { "ngsi9", "contextEntities", "*" }, badVerbGetPostOnly },
- //{ ContextEntityAttributes, 4, { "ngsi9", "contextEntities", "*", "attributes" }, badVerbGetPostOnly },
- //{ EntityByIdAttributeByName, 5, { "ngsi9", "contextEntities", "*", "attributes", "*" }, badVerbGetPostOnly },
- //{ ContextEntityTypes, 3, { "ngsi9", "contextEntityTypes", "*" }, badVerbGetPostOnly },
- //{ ContextEntityTypeAttributeContainer, 4, { "ngsi9", "contextEntityTypes", "*", "attributes" }, badVerbGetPostOnly },
- //{ ContextEntityTypeAttribute, 5, { "ngsi9", "contextEntityTypes", "*", "attributes", "*" }, badVerbGetPostOnly },
- /// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
- ///{ ContextEntitiesByEntityId, 4, { "v1", "registry", "contextEntities", "*" }, badVerbGetPostOnly },
- ///{ ContextEntityAttributes, 5, { "v1", "registry", "contextEntities", "*", "attributes" }, badVerbGetPostOnly },
- ///{ EntityByIdAttributeByName, 6, { "v1", "registry", "contextEntities", "*", "attributes", "*" }, badVerbGetPostOnly },
- ///{ ContextEntityTypes, 4, { "v1", "registry", "contextEntityTypes", "*" }, badVerbGetPostOnly },
- ///{ ContextEntityTypeAttributeContainer, 5, { "v1", "registry", "contextEntityTypes", "*", "attributes" }, badVerbGetPostOnly },
- ///{ ContextEntityTypeAttribute, 6, { "v1", "registry", "contextEntityTypes", "*", "attributes", "*" }, badVerbGetPostOnly },
- ///{ IndividualContextEntity, 3, { "ngsi10", "contextEntities", "*" }, badVerbAllFour },
- ///{ IndividualContextEntityAttributes, 4, { "ngsi10", "contextEntities", "*", "attributes" }, badVerbAllFour },
- ///{ IndividualContextEntityAttribute, 5, { "ngsi10", "contextEntities", "*", "attributes", "*" }, badVerbAllFour },
- ///{ Ngsi10ContextEntityTypes, 3, { "ngsi10", "contextEntityTypes", "*" }, badVerbGetOnly },
- ///{ Ngsi10ContextEntityTypesAttributeContainer, 4, { "ngsi10", "contextEntityTypes", "*", "attributes" }, badVerbGetOnly },
- ///{ Ngsi10ContextEntityTypesAttribute, 5, { "ngsi10", "contextEntityTypes", "*", "attributes", "*" }, badVerbGetOnly },
- ///{ SubscribeContext, 2, { "ngsi10", "contextSubscriptions" }, badVerbPostOnly },
- ///{ Ngsi10SubscriptionsConvOp, 3, { "ngsi10", "contextSubscriptions", "*" }, badVerbPutDeleteOnly },
- ///{ IndividualContextEntity, 3, { "v1", "contextEntities", "*" }, badVerbAllFour },
- ///{ IndividualContextEntityAttributes, 4, { "v1", "contextEntities", "*", "attributes" }, badVerbAllFour },
- ///{ IndividualContextEntityAttribute, 5, { "v1", "contextEntities", "*", "attributes", "*" }, badVerbAllFour },
- ///{ Ngsi10ContextEntityTypes, 3, { "v1", "contextEntityTypes", "*" }, badVerbGetOnly },
- ///{ Ngsi10ContextEntityTypesAttributeContainer, 4, { "v1", "contextEntityTypes", "*", "attributes" }, badVerbGetOnly },
- ///{ Ngsi10ContextEntityTypesAttribute, 5, { "v1", "contextEntityTypes", "*", "attributes", "*" }, badVerbGetOnly },
- ///{ SubscribeContext, 2, { "v1", "contextSubscriptions" }, badVerbPostOnly },
- ///{ Ngsi10SubscriptionsConvOp, 3, { "v1", "contextSubscriptions", "*" }, badVerbPutDeleteOnly },
- ///{ EntityTypes, 2, { "v1", "contextTypes" }, badVerbGetOnly },
- ///{ AttributesForEntityType, 3, { "v1", "contextTypes", "*" }, badVerbGetOnly },
- ///{ AllContextEntities, 2, { "v1", "contextEntities" }, badVerbGetPostOnly },
- ///{ AllEntitiesWithTypeAndId, 6, { "v1", "contextEntities", "type", "*", "id", "*" }, badVerbAllFour },
- ///{ IndividualContextEntityAttributeWithTypeAndId, 8, { "v1", "contextEntities", "type", "*", "id", "*", "attributes", "*" }, badVerbAllFour },
- ///{ ContextEntitiesByEntityIdAndType, 7, { "v1", "registry", "contextEntities", "type", "*", "id", "*" }, badVerbGetPostOnly },
- ///{ EntityByIdAttributeByNameIdAndType, 9, { "v1", "registry", "contextEntities", "type", "*", "id", "*", "attributes", "*" }, badVerbGetPostOnly },
- // FIXME: disable administrative API routes not aligned with documentation in Orion 3.8.0,
- // to be definetively removed at some point of the future
- { LogTraceRequest, 2, { "log", "trace" }, badVerbGetDeleteOnly },
- { LogTraceRequest, 3, { "log", "trace", "*" }, badVerbPutDeleteOnly },
- //{ LogTraceRequest, 2, { "log", "traceLevel" }, badVerbGetDeleteOnly },
- //{ LogTraceRequest, 3, { "log", "traceLevel", "*" }, badVerbPutDeleteOnly },
- //{ LogTraceRequest, 4, { "v1", "admin", "log", "trace" }, badVerbGetDeleteOnly },
- //{ LogTraceRequest, 5, { "v1", "admin", "log", "trace", "*" }, badVerbPutDeleteOnly },
- //{ LogTraceRequest, 4, { "v1", "admin", "log", "traceLevel" }, badVerbGetDeleteOnly },
- //{ LogTraceRequest, 5, { "v1", "admin", "log", "traceLevel", "*" }, badVerbPutDeleteOnly },
- { StatisticsRequest, 1, { "statistics" }, badVerbGetDeleteOnly },
- //{ StatisticsRequest, 3, { "v1", "admin", "statistics" }, badVerbGetDeleteOnly },
- { StatisticsRequest, 2, { "cache", "statistics" }, badVerbGetDeleteOnly },
- //{ StatisticsRequest, 4, { "v1", "admin", "cache", "statistics" }, badVerbGetDeleteOnly },
- { VersionRequest, 1, { "version" }, badVerbGetOnly },
- { LogLevelRequest, 2, { "admin", "log" }, badVerbPutOnly },
- { SemStateRequest, 2, { "admin", "sem" }, badVerbGetOnly },
- { MetricsRequest, 2, { "admin", "metrics" }, badVerbGetDeleteOnly },
- /// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
- ///{ UpdateContext, 2, { "ngsi10", "updateContext" }, badVerbPostOnly },
- ///{ QueryContext, 2, { "ngsi10", "queryContext" }, badVerbPostOnly },
- ///{ SubscribeContext, 2, { "ngsi10", "subscribeContext" }, badVerbPostOnly },
- ///{ UpdateContextSubscription, 2, { "ngsi10", "updateContextSubscription" }, badVerbPostOnly },
- ///{ UnsubscribeContext, 2, { "ngsi10", "unsubscribeContext" }, badVerbPostOnly },
- ///{ NotifyContext, 2, { "ngsi10", "notifyContext" }, badVerbPostOnly },
- // FIXME: disable NGSI9 API routes in Orion 3.8.0, to be definetively removed at some point of the future
- //{ InvalidRequest, 2, { "ngsi9", "*" }, badNgsi9Request },
- /// FIXME: disable unused NGSIv1 API (last batch) in Orion 4.0.0, to be definetively removed at some point of the future
- ///{ InvalidRequest, 2, { "ngsi10", "*" }, badNgsi10Request },
- { InvalidRequest, 0, { "*", "*", "*", "*", "*", "*" }, badRequest },
- { InvalidRequest, 0, { }, NULL },
-
- ORION_REST_SERVICE_END
-};
-
-
/* ****************************************************************************
*
@@ -635,7 +275,6 @@ void orionRestServicesInit
const char* allowedOrigin,
int corsMaxAge,
int mhdTimeoutInSeconds,
- bool disableNgsiv1,
const char* httpsKey,
const char* httpsCert
)
@@ -643,47 +282,23 @@ void orionRestServicesInit
// Use options service vector (optionsServiceV) only when CORS is enabled
RestService* optionsServiceV = (strlen(allowedOrigin) > 0) ? optionsV : NULL;
- if (disableNgsiv1)
- {
- restInit(getServiceV,
- putServiceV,
- postServiceV,
- patchServiceV,
- deleteServiceV,
- optionsServiceV,
- badVerbV,
- ipVersion,
- bindAddress,
- port,
- multitenant,
- connectionMemory,
- maxConnections,
- mhdThreadPoolSize,
- allowedOrigin,
- corsMaxAge,
- mhdTimeoutInSeconds,
- httpsKey,
- httpsCert);
- }
- else
- {
- restInit(getServiceVlegacy,
- putServiceVlegacy,
- postServiceVlegacy,
- patchServiceV,
- deleteServiceVlegacy,
- optionsServiceV,
- badVerbVlegacy,
- ipVersion,
- bindAddress,
- port,
- multitenant,
- connectionMemory,
- maxConnections,
- mhdThreadPoolSize,
- allowedOrigin,
- corsMaxAge,
- mhdTimeoutInSeconds,
- httpsKey,
- httpsCert); }
+ restInit(getServiceV,
+ putServiceV,
+ postServiceV,
+ patchServiceV,
+ deleteServiceV,
+ optionsServiceV,
+ badVerbV,
+ ipVersion,
+ bindAddress,
+ port,
+ multitenant,
+ connectionMemory,
+ maxConnections,
+ mhdThreadPoolSize,
+ allowedOrigin,
+ corsMaxAge,
+ mhdTimeoutInSeconds,
+ httpsKey,
+ httpsCert);
}
diff --git a/src/app/contextBroker/orionRestServices.h b/src/app/contextBroker/orionRestServices.h
index 038ffdcbb5..2f2ff2c4cd 100644
--- a/src/app/contextBroker/orionRestServices.h
+++ b/src/app/contextBroker/orionRestServices.h
@@ -53,7 +53,6 @@ extern void orionRestServicesInit
const char* _allowedOrigin,
int _corsMaxAge,
int _mhdTimeoutInSeconds,
- bool _disableNgsiv1,
const char* _httpsKey,
const char* _httpsCert
);
diff --git a/src/lib/apiTypesV2/Attribute.cpp b/src/lib/apiTypesV2/Attribute.cpp
deleted file mode 100644
index a90e1b47f7..0000000000
--- a/src/lib/apiTypesV2/Attribute.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
-*
-* Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U
-*
-* This file is part of Orion Context Broker.
-*
-* Orion Context Broker is free software: you can redistribute it and/or
-* modify it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* Orion Context Broker is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
-* General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with Orion Context Broker. If not, see http://www.gnu.org/licenses/.
-*
-* For those usages not covered by this license please contact with
-* iot_support at tid dot es
-*
-* Author: Orion dev team
-*/
-#include
-#include
-
-#include "common/tag.h"
-#include "common/errorMessages.h"
-#include "common/RenderFormat.h"
-#include "common/string.h"
-#include "common/JsonHelper.h"
-#include "logMsg/logMsg.h"
-#include "ngsi10/QueryContextResponse.h"
-#include "apiTypesV2/Attribute.h"
-#include "rest/OrionError.h"
-
-
-
-
-/* ****************************************************************************
-*
-* Attribute::toJson -
-*/
-std::string Attribute::toJson
-(
- bool acceptedTextPlain, // in parameter (pass-through)
- bool acceptedJson, // in parameter (pass-through)
- MimeType outFormatSelection, // in parameter (pass-through)
- MimeType* outMimeTypeP, // out parameter (pass-through)
- HttpStatusCode* scP, // out parameter (pass-through)
- bool keyValues, // in parameter
- const std::vector& metadataFilter, // in parameter
- RequestType requestType // in parameter
-)
-{
- if (contextAttributeP == NULL) {
- LM_E(("Runtime Error (NULL contextAttributeP)"));
- return "";
- }
-
- RenderFormat renderFormat = (keyValues == true)? NGSI_V2_KEYVALUES : NGSI_V2_NORMALIZED;
-
- std::string out;
-
- if (requestType == EntityAttributeValueRequest)
- {
- out = contextAttributeP->toJsonAsValue(V2,
- acceptedTextPlain,
- acceptedJson,
- outFormatSelection,
- outMimeTypeP,
- scP);
- }
- else
- {
- if (renderFormat == NGSI_V2_KEYVALUES)
- {
- JsonObjectHelper jh;
- jh.addRaw(contextAttributeP->name, contextAttributeP->toJsonValue());
- out = jh.str();
- }
- else // NGSI_V2_NORMALIZED
- {
- out = contextAttributeP->toJson(metadataFilter);
- }
- }
-
- return out;
-}
-
-
-
-
-/* ****************************************************************************
-*
-* Attribute::fill -
-*
-* CAUTION
-* The Query should be for an indvidual entity
-*
-*/
-void Attribute::fill(const QueryContextResponse& qcrs, const std::string& attrName, OrionError* oeP)
-{
- if (qcrs.errorCode.code == SccContextElementNotFound)
- {
- oeP->fill(SccContextElementNotFound, ERROR_DESC_NOT_FOUND_ENTITY, ERROR_NOT_FOUND);
- }
- else if (qcrs.errorCode.code != SccOk)
- {
- //
- // any other error distinct from Not Found
- //
- oeP->fill(qcrs.errorCode.code, qcrs.errorCode.details, qcrs.errorCode.reasonPhrase);
- }
- else if (qcrs.contextElementResponseVector.size() > 1) // qcrs.errorCode.code == SccOk
- {
- //
- // If there are more than one entity, we return an error
- //
- oeP->fill(SccConflict, ERROR_DESC_TOO_MANY_ENTITIES, ERROR_TOO_MANY);
- }
- else
- {
- contextAttributeP = NULL;
- // Look for the attribute by name
-
- ContextElementResponse* cerP = qcrs.contextElementResponseVector[0];
-
- for (std::size_t i = 0; i < cerP->entity.attributeVector.size(); ++i)
- {
- if (cerP->entity.attributeVector[i]->name == attrName)
- {
- contextAttributeP = cerP->entity.attributeVector[i];
- break;
- }
- }
-
- if (contextAttributeP == NULL)
- {
- oeP->fill(SccContextElementNotFound, ERROR_DESC_NOT_FOUND_ATTRIBUTE, ERROR_NOT_FOUND);
- }
- }
-}
diff --git a/src/lib/apiTypesV2/Attribute.h b/src/lib/apiTypesV2/Attribute.h
deleted file mode 100644
index 4242f5cbae..0000000000
--- a/src/lib/apiTypesV2/Attribute.h
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef SRC_LIB_APITYPESV2_ATTRIBUTE_H_
-#define SRC_LIB_APITYPESV2_ATTRIBUTE_H_
-
-/*
-*
-* Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U
-*
-* This file is part of Orion Context Broker.
-*
-* Orion Context Broker is free software: you can redistribute it and/or
-* modify it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* Orion Context Broker is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
-* General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with Orion Context Broker. If not, see http://www.gnu.org/licenses/.
-*
-* For those usages not covered by this license please contact with
-* iot_support at tid dot es
-*
-* Author: Orion dev team
-*/
-#include
-#include
-#include
-
-#include "ngsi/ContextAttributeVector.h"
-#include "ngsi/ContextAttribute.h"
-#include "rest/OrionError.h"
-
-
-
-/* ****************************************************************************
-*
-* To avoid a problematic and not necessary include
-*/
-struct QueryContextResponse;
-
-
-
-/* ****************************************************************************
-*
-* Attribute -
-*/
-class Attribute
-{
- public:
- ContextAttribute* contextAttributeP; // Mandatory
-
- Attribute(): contextAttributeP(0) {}
-
- std::string toJson(bool acceptedTextPlain,
- bool acceptedJson,
- MimeType outFormatSelection,
- MimeType* outMimeTypeP,
- HttpStatusCode* scP,
- bool keyValues,
- const std::vector& metadataFilter,
- RequestType requestType);
-
- void fill(const QueryContextResponse& qcrs, const std::string& attrName, OrionError* oeP);
-};
-
-#endif // SRC_LIB_APITYPESV2_ATTRIBUTE_H_
diff --git a/src/lib/apiTypesV2/BatchQuery.h b/src/lib/apiTypesV2/BatchQuery.h
index 48a3b5df64..74ca63a318 100644
--- a/src/lib/apiTypesV2/BatchQuery.h
+++ b/src/lib/apiTypesV2/BatchQuery.h
@@ -31,7 +31,8 @@
#include "ngsi/StringList.h"
#include "ngsi/Request.h"
#include "ngsi/ScopeVector.h"
-#include "apiTypesV2/Entities.h"
+
+#include "apiTypesV2/EntityVector.h"
@@ -42,7 +43,7 @@
class BatchQuery
{
public:
- Entities entities;
+ EntityVector entities;
StringList attributeV; // Deprecated
StringList attrsV;
ScopeVector scopeV;
diff --git a/src/lib/apiTypesV2/BatchUpdate.h b/src/lib/apiTypesV2/BatchUpdate.h
index 2d2282d6d0..26215d23a4 100644
--- a/src/lib/apiTypesV2/BatchUpdate.h
+++ b/src/lib/apiTypesV2/BatchUpdate.h
@@ -30,7 +30,8 @@
#include "orionTypes/UpdateActionType.h"
#include "ngsi/Request.h"
-#include "apiTypesV2/Entities.h"
+
+#include "apiTypesV2/EntityVector.h"
@@ -42,7 +43,7 @@ class BatchUpdate
{
public:
ActionType updateActionType; // Mandatory
- Entities entities; // Mandatory
+ EntityVector entities; // Mandatory
BatchUpdate();
~BatchUpdate();
diff --git a/src/lib/apiTypesV2/CMakeLists.txt b/src/lib/apiTypesV2/CMakeLists.txt
index 18be8b1975..33f68bc7d5 100644
--- a/src/lib/apiTypesV2/CMakeLists.txt
+++ b/src/lib/apiTypesV2/CMakeLists.txt
@@ -23,11 +23,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
SET (SOURCES
Entity.cpp
EntityVector.cpp
- Entities.cpp
- Attribute.cpp
Subscription.cpp
Registration.cpp
- EntID.cpp
BatchQuery.cpp
BatchUpdate.cpp
HttpInfo.cpp
@@ -37,11 +34,8 @@ SET (SOURCES
SET (HEADERS
Entity.h
EntityVector.h
- Entities.h
- Attribute.h
Subscription.h
Registration.h
- EntID.h
BatchQuery.h
BatchUpdate.h
CustomPayloadType.h
diff --git a/src/lib/apiTypesV2/EntID.cpp b/src/lib/apiTypesV2/EntID.cpp
deleted file mode 100644
index 9968585ab0..0000000000
--- a/src/lib/apiTypesV2/EntID.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-*
-* Copyright 2017 Telefonica Investigacion y Desarrollo, S.A.U
-*
-* This file is part of Orion Context Broker.
-*
-* Orion Context Broker is free software: you can redistribute it and/or
-* modify it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* Orion Context Broker is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
-* General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with Orion Context Broker. If not, see http://www.gnu.org/licenses/.
-*
-* For those usages not covered by this license please contact with
-* iot_support at tid dot es
-*
-* Author: Fermín Galán Márquez
-*/
-
-#include
-
-#include "apiTypesV2/EntID.h"
-
-#include "common/JsonHelper.h"
-
-namespace ngsiv2
-{
-/* ****************************************************************************
-*
-* EntID::toJson -
-*/
-std::string EntID::toJson()
-{
- JsonObjectHelper jh;
-
- if (!this->id.empty())
- {
- jh.addString("id", this->id);
- }
-
- if (!this->idPattern.empty())
- {
- jh.addString("idPattern", this->idPattern);
- }
-
- if (!this->type.empty())
- {
- jh.addString("type", this->type);
- }
-
- if (!this->typePattern.empty())
- {
- jh.addString("typePattern", this->typePattern);
- }
-
- return jh.str();
-}
-}
diff --git a/src/lib/apiTypesV2/EntID.h b/src/lib/apiTypesV2/EntID.h
deleted file mode 100644
index d47444f5b1..0000000000
--- a/src/lib/apiTypesV2/EntID.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef SRC_LIB_APITYPESV2_ENTID_H_
-#define SRC_LIB_APITYPESV2_ENTID_H_
-
-/*
-*
-* Copyright 2017 Telefonica Investigacion y Desarrollo, S.A.U
-*
-* This file is part of Orion Context Broker.
-*
-* Orion Context Broker is free software: you can redistribute it and/or
-* modify it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* Orion Context Broker is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
-* General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with Orion Context Broker. If not, see http://www.gnu.org/licenses/.
-*
-* For those usages not covered by this license please contact with
-* iot_support at tid dot es
-*
-* Author: Fermín Galán Márquez
-*/
-#include
-
-
-namespace ngsiv2
-{
-/* ****************************************************************************
-*
-* EntID -
-*/
-struct EntID
-{
- std::string id;
- std::string idPattern;
- std::string type;
- std::string typePattern;
- std::string toJson();
-
- EntID(const std::string& idA, const std::string& idPatternA,
- const std::string& typeA, const std::string& typePatternA):
- id(idA),
- idPattern(idPatternA),
- type(typeA),
- typePattern(typePatternA)
- {}
-
- EntID() {}
-
- bool operator==(const EntID& e)
- {
- return (id == e.id) &&
- (idPattern == e.idPattern) &&
- (type == e.type) &&
- (typePattern == e.typePattern);
- }
-
- bool operator!=(const EntID& e)
- {
- return (id != e.id) ||
- (idPattern != e.idPattern) ||
- (type != e.type) ||
- (typePattern != e.typePattern);
- }
-};
-
-} // end namespace
-
-#endif // SRC_LIB_APITYPESV2_ENTID_H_
diff --git a/src/lib/apiTypesV2/Entities.cpp b/src/lib/apiTypesV2/Entities.cpp
deleted file mode 100644
index d8c08d6d4f..0000000000
--- a/src/lib/apiTypesV2/Entities.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
-*
-* Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U
-*
-* This file is part of Orion Context Broker.
-*
-* Orion Context Broker is free software: you can redistribute it and/or
-* modify it under the terms of the GNU Affero General Public License as
-* published by the Free Software Foundation, either version 3 of the
-* License, or (at your option) any later version.
-*
-* Orion Context Broker is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
-* General Public License for more details.
-*
-* You should have received a copy of the GNU Affero General Public License
-* along with Orion Context Broker. If not, see http://www.gnu.org/licenses/.
-*
-* For those usages not covered by this license please contact with
-* iot_support at tid dot es
-*
-* Author: Ken Zangelin
-*/
-#include
-#include
-#include