diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE
index 41cd0bf2ad..9cede1192c 100644
--- a/CHANGES_NEXT_RELEASE
+++ b/CHANGES_NEXT_RELEASE
@@ -6,3 +6,4 @@
- Fix: lighter operation to get databases list from MongoDB (#4517)
- Hardening: compile code using C++14 standard
- Remove: `-dbhost`, `-rplSet`, `-dbTimeout`, `-dbuser`, `-dbAuthMech`, `-dbAuthDb`, `-dbSSL` and `-dbDisableRetryWrites` CLI parameters along with associated env vars, already deprecated in Orion 3.12.0 (use `-dbURI` instead`)
+- Remove: legacy subscription format
diff --git a/doc/manuals/admin/database_model.md b/doc/manuals/admin/database_model.md
index ae438dbef6..f11c762b4c 100644
--- a/doc/manuals/admin/database_model.md
+++ b/doc/manuals/admin/database_model.md
@@ -304,8 +304,7 @@ Fields:
fields: q, mq, georel, geometry and/or coords (optional)
- **count**: the number of notifications sent associated to
the subscription.
-- **format**: the format to use to send notification, possible values are **JSON**
- (meaning JSON notifications in NGSIv1 legacy format), **normalized**, **keyValues**, **simplifiedNormalized**, **simplifiedKeyValues** and **values** (the last five used in NGSIv2 format).
+- **format**: the format to use to send notification, possible values are **normalized**, **keyValues**, **simplifiedNormalized**, **simplifiedKeyValues** and **values**.
- **status**: either `active` (for active subscriptions), `inactive` (for inactive subscriptions) or
`oneshot` (for [oneshot subscriptions](../orion-api.md#oneshot-subscriptions)). Note that Orion API consider additional states (e.g. `expired`)
but they never hit the DB (they are managed by Orion).
diff --git a/doc/manuals/admin/logs.md b/doc/manuals/admin/logs.md
index f88223e73b..bf711aba94 100644
--- a/doc/manuals/admin/logs.md
+++ b/doc/manuals/admin/logs.md
@@ -422,15 +422,6 @@ time=2024-01-11T13:57:13.595Z | lvl=WARN | corr=527c0912-b089-11ee-bb8c-080027cd
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 [`"attrsFormat": "legacy"`](../orion-api.md#subscriptionnotification). For instance:
-
-```
-time=2024-01-11T16:23:24.646Z | lvl=WARN | corr=be709034-b09d-11ee-b5d1-080027cd35f1 | trans=1704990203-652-00000000012 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=MongoCommonSubscription.cpp[598]:setFormat | msg=Deprecated usage of notification legacy format in subscription creation (subId: 65a015fcda947708d30425eb)
-time=2024-01-11T16:23:24.675Z | lvl=WARN | corr=be74dc98-b09d-11ee-b2d6-080027cd35f1 | trans=1704990203-652-00000000013 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=mongoGetSubscriptions.cpp[217]:setNotification | msg=Deprecated usage of notification legacy format detected in existing subscription (subId: 65a015fcda947708d30425eb)
-time=2024-01-11T16:23:24.701Z | lvl=WARN | corr=be709034-b09d-11ee-b5d1-080027cd35f1 | trans=1704990203-652-00000000012 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=MongoCommonSubscription.cpp[598]:setFormat | msg=Deprecated usage of notification legacy format in subscription modification (subId: 65a015fcda947708d30425eb)
-time=2024-01-11T16:23:24.716Z | lvl=WARN | corr=be7ae5ac-b09d-11ee-98c8-080027cd35f1 | trans=1704990203-652-00000000015 | from=127.0.0.1 | srv=s1 | subsrv=/A | comp=Orion | op=Notifier.cpp[680]:buildSenderParams | msg=Deprecated usage of notification legacy format in notification (subId: 65a015fcda947708d30425eb)
-```
-
* 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 a44bafcb74..2f8bf60f17 100644
--- a/doc/manuals/admin/statistics.md
+++ b/doc/manuals/admin/statistics.md
@@ -57,7 +57,6 @@ The counter block provides information about counters for the times a particular
"deprecatedFeatures": {
"geoFormat": 2,
"ngsiv1Forwarding": 4,
- "ngsiv1NotifFormat": 4,
"ngsiv1Requests": 4
},
"invalidRequests": 2,
diff --git a/doc/manuals/deprecated.md b/doc/manuals/deprecated.md
index cef27a61bf..0725fbf734 100644
--- a/doc/manuals/deprecated.md
+++ b/doc/manuals/deprecated.md
@@ -39,6 +39,7 @@ A list of deprecated features and the version in which they were deprecated foll
* `POST /NGSI10/updateContext`
* `POST /v1/queryContext`
* `POST /NGSI10/queryContext`
+ * NGSIv1 format in subscription notifications (`notification.atttrsFormat` set to `legacy`) removed in Orion 4.0.0
* `attributes` field in `POST /v2/op/query` is in Orion 1.15.0. It is a combination of `attrs` (to select
which attributes to include in the response to the query) and unary attribute filter in `q` within
`expression` (to return only entities which have these attributes). Use them instead.
diff --git a/doc/manuals/orion-api.md b/doc/manuals/orion-api.md
index 294fdd7dce..3b2951b08c 100644
--- a/doc/manuals/orion-api.md
+++ b/doc/manuals/orion-api.md
@@ -1993,40 +1993,7 @@ If `attrsFormat` is `values` then values partial entity representation mode is u
}
```
-If `attrsFormat` is `legacy` then subscription representation follows NGSIv1 format. This way, users
-can benefit from the enhancements of Orion subscriptions (e.g. filtering) with NGSIv1 legacy notification receivers.
-
-Note that NGSIv1 is deprecated. Thus, we don't recommend to use `legacy` notification format any longer.
-
-```json
-{
- "subscriptionId": "56e2ad4e8001ff5e0a5260ec",
- "originator": "localhost",
- "contextResponses": [{
- "contextElement": {
- "type": "Car",
- "isPattern": "false",
- "id": "Car1",
- "attributes": [{
- "name": "temperature",
- "type": "centigrade",
- "value": "26.5",
- "metadatas": [{
- "name": "TimeInstant",
- "type": "recvTime",
- "value": "2015-12-12 11:11:11.123"
- }]
- }]
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }]
-}
-```
-
-Notifications must include the `Ngsiv2-AttrsFormat` (expect when `attrsFormat` is `legacy`)
+Notifications must include the `Ngsiv2-AttrsFormat`
HTTP header with the value of the format of the associated subscription, so that notification receivers
are aware of the format without needing to process the notification payload.
@@ -4712,7 +4679,7 @@ A `notification` object contains the following subfields:
|--------------------|-------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `attrs` or `exceptAttrs` | | array | Both cannot be used at the same time.
attrs
: List of attributes to be included in notification messages. It also defines the order in which attributes must appear in notifications when attrsFormat
value
is used (see [Notification Messages](#notification-messages) section). An empty list means that all attributes are to be included in notifications. See [Filtering out attributes and metadata](#filtering-out-attributes-and-metadata) section for more detail.exceptAttrs
: List of attributes to be excluded from the notification message, i.e. a notification message includes all entity attributes except the ones listed in this field. It must be a non-empty list.- If neither
attrs
nor exceptAttrs
is specified, all attributes are included in notifications.
|
| [`http`](#subscriptionnotificationhttp), [`httpCustom`](#subscriptionnotificationhttpcustom), [`mqtt`](#subscriptionnotificationmqtt) or [`mqttCustom`](#subscriptionnotificationmqttcustom)| ✓ | object | One of them must be present, but not more than one at the same time. It is used to convey parameters for notifications delivered through the transport protocol. |
-| `attrsFormat` | ✓ | string | Specifies how the entities are represented in notifications. Accepted values are `normalized` (default), `simplifiedNormalized`, `keyValues`, `simplifiedKeyValues`, `values` or `legacy`.
If `attrsFormat` takes any value different than those, an error is raised. See detail in [Notification Messages](#notification-messages) section. |
+| `attrsFormat` | ✓ | string | Specifies how the entities are represented in notifications. Accepted values are `normalized` (default), `simplifiedNormalized`, `keyValues`, `simplifiedKeyValues`, or `values`.
If `attrsFormat` takes any value different than those, an error is raised. See detail in [Notification Messages](#notification-messages) section. |
| `metadata` | ✓ | string | List of metadata to be included in notification messages. See [Filtering out attributes and metadata](#filtering-out-attributes-and-metadata) section for more detail. |
| `onlyChangedAttrs` | ✓ | boolean | If `true` then notifications will include only attributes that changed in the triggering update request, in combination with the `attrs` or `exceptAttrs` field. (default is `false` if the field is omitted)) |
| `covered` | ✓ | boolean | If `true` then notifications will include all the attributes defined in `attrs` field, even if they are not present in the entity (in this, case, with `null` value). (default value is false). For further information see [Covered subscriptions](#covered-subscriptions) section |
diff --git a/src/lib/common/RenderFormat.cpp b/src/lib/common/RenderFormat.cpp
index e65c009203..9c29536216 100644
--- a/src/lib/common/RenderFormat.cpp
+++ b/src/lib/common/RenderFormat.cpp
@@ -41,7 +41,6 @@ const char* renderFormatToString(RenderFormat format, bool noDefault, bool useLe
{
switch (format)
{
- case NGSI_V1_LEGACY: return useLegacyWord ? "legacy" : "JSON";
case NGSI_V2_NORMALIZED: return "normalized";
case NGSI_V2_KEYVALUES: return "keyValues";
case NGSI_V2_VALUES: return "values";
@@ -71,8 +70,6 @@ const char* renderFormatToString(RenderFormat format, bool noDefault, bool useLe
*/
RenderFormat stringToRenderFormat(const std::string& s, bool noDefault)
{
- if (s == "JSON") { return NGSI_V1_LEGACY; } // DB content for NGSIv1 rendering due to legacy reasons
- if (s == "legacy") { return NGSI_V1_LEGACY; }
if (s == "normalized") { return NGSI_V2_NORMALIZED; }
if (s == "keyValues") { return NGSI_V2_KEYVALUES; }
if (s == "values") { return NGSI_V2_VALUES; }
diff --git a/src/lib/common/RenderFormat.h b/src/lib/common/RenderFormat.h
index 8d6d8f1660..8307896052 100644
--- a/src/lib/common/RenderFormat.h
+++ b/src/lib/common/RenderFormat.h
@@ -44,14 +44,13 @@
typedef enum RenderFormat
{
NO_FORMAT = 0,
- NGSI_V1_LEGACY = 1,
- NGSI_V2_NORMALIZED = 2,
- NGSI_V2_KEYVALUES = 3,
- NGSI_V2_VALUES = 4,
- NGSI_V2_UNIQUE_VALUES = 5,
- NGSI_V2_CUSTOM = 6,
- NGSI_V2_SIMPLIFIEDNORMALIZED = 7,
- NGSI_V2_SIMPLIFIEDKEYVALUES = 8
+ NGSI_V2_NORMALIZED = 1,
+ NGSI_V2_KEYVALUES = 2,
+ NGSI_V2_VALUES = 3,
+ NGSI_V2_UNIQUE_VALUES = 4,
+ NGSI_V2_CUSTOM = 5,
+ NGSI_V2_SIMPLIFIEDNORMALIZED = 6,
+ NGSI_V2_SIMPLIFIEDKEYVALUES = 7
} RenderFormat;
diff --git a/src/lib/common/errorMessages.h b/src/lib/common/errorMessages.h
index a638981806..d50bf8acf7 100644
--- a/src/lib/common/errorMessages.h
+++ b/src/lib/common/errorMessages.h
@@ -62,7 +62,7 @@
#define ERROR_DESC_BAD_REQUEST_INVALID_JTYPE_ENTID "Invalid JSON type for entity id"
#define ERROR_DESC_BAD_REQUEST_INVALID_JTYPE_ENTTYPE "Invalid JSON type for entity type"
#define ERROR_DESC_BAD_REQUEST_INVALID_JTYPE_SCOPE "invalid JSON type for scope value: must be string"
-#define ERROR_DESC_BAD_REQUEST_INVALID_ATTRSFORMAT "invalid attrsFormat, accepted values: legacy, normalized, simplifiedNormalized, keyValues, simplifiedkeyValues, values"
+#define ERROR_DESC_BAD_REQUEST_INVALID_ATTRSFORMAT "invalid attrsFormat, accepted values: normalized, simplifiedNormalized, keyValues, simplifiedkeyValues, values"
#define ERROR_DESC_BAD_REQUEST_INVALID_STATUS "status is not valid: it has to be either active, inactive or oneshot"
#define ERROR_DESC_BAD_REQUEST_INVALID_RANGE "ranges only valid for equal and not equal ops"
#define ERROR_DESC_BAD_REQUEST_INVALID_LIST "lists only valid for equal and not equal ops"
diff --git a/src/lib/common/statistics.cpp b/src/lib/common/statistics.cpp
index 10dd8b1631..1a6dd710ff 100644
--- a/src/lib/common/statistics.cpp
+++ b/src/lib/common/statistics.cpp
@@ -152,7 +152,6 @@ int noOfSimulatedNotifications = -1;
// Deprecated features
int noOfDprNgsiv1Request = -1;
int noOfDprLegacyForwarding = -1;
-int noOfDprLegacyNotif = -1;
int noOfDprGeoformat = -1;
diff --git a/src/lib/mongoBackend/mongoCreateSubscription.cpp b/src/lib/mongoBackend/mongoCreateSubscription.cpp
index 91192349f5..d5579884bb 100644
--- a/src/lib/mongoBackend/mongoCreateSubscription.cpp
+++ b/src/lib/mongoBackend/mongoCreateSubscription.cpp
@@ -198,15 +198,6 @@ std::string mongoCreateSubscription
return "";
}
- if (sub.attrsFormat == NGSI_V1_LEGACY)
- {
- __sync_fetch_and_add(&noOfDprLegacyNotif, 1);
- if (logDeprecate)
- {
- LM_W(("Deprecated usage of notification legacy format in subscription creation (subId: %s)", subId.c_str()));
- }
- }
-
reqSemGive(__FUNCTION__, "ngsiv2 create subscription request", reqSemTaken);
return subId;
diff --git a/src/lib/mongoBackend/mongoGetSubscriptions.cpp b/src/lib/mongoBackend/mongoGetSubscriptions.cpp
index c682955d0b..c14866017c 100644
--- a/src/lib/mongoBackend/mongoGetSubscriptions.cpp
+++ b/src/lib/mongoBackend/mongoGetSubscriptions.cpp
@@ -210,17 +210,7 @@ static void setNotification(Subscription* subP, const orion::BSONObj& r, const s
nP->lastSuccessCode = r.hasField(CSUB_LASTSUCCESSCODE)? getIntOrLongFieldAsLongF(r, CSUB_LASTSUCCESSCODE) : -1;
// Attributes format
- subP->attrsFormat = r.hasField(CSUB_FORMAT)? stringToRenderFormat(getStringFieldF(r, CSUB_FORMAT)) : NGSI_V1_LEGACY;
-
- if (subP->attrsFormat == NGSI_V1_LEGACY)
- {
- __sync_fetch_and_add(&noOfDprLegacyNotif, 1);
- if (logDeprecate)
- {
- LM_W(("Deprecated usage of notification legacy format detected in existing subscription (subId: %s)", subP->id.c_str()));
- }
- }
-
+ subP->attrsFormat = r.hasField(CSUB_FORMAT)? stringToRenderFormat(getStringFieldF(r, CSUB_FORMAT)) : NGSI_V2_NORMALIZED;
//
// Check values from subscription cache, update object from cache-values if necessary
diff --git a/src/lib/mongoBackend/mongoUpdateSubscription.cpp b/src/lib/mongoBackend/mongoUpdateSubscription.cpp
index 93d71ccb2b..134a9910e4 100644
--- a/src/lib/mongoBackend/mongoUpdateSubscription.cpp
+++ b/src/lib/mongoBackend/mongoUpdateSubscription.cpp
@@ -370,15 +370,6 @@ std::string mongoUpdateSubscription
if (subUp.notifyOnMetadataChangeProvided) setNotifyOnMetadataChange(subUp, &setB);
if (subUp.attrsFormatProvided) setFormat(subUp, &setB);
- if (subUp.attrsFormat == NGSI_V1_LEGACY)
- {
- __sync_fetch_and_add(&noOfDprLegacyNotif, 1);
- if (logDeprecate)
- {
- LM_W(("Deprecated usage of notification legacy format in subscription modification (subId: %s)", subUp.id.c_str()));
- }
- }
-
// Description is special, as "" value removes the field
if (subUp.descriptionProvided)
{
diff --git a/src/lib/ngsi10/SubscribeContextRequest.cpp b/src/lib/ngsi10/SubscribeContextRequest.cpp
index 5038ef83ec..a0e2b19022 100644
--- a/src/lib/ngsi10/SubscribeContextRequest.cpp
+++ b/src/lib/ngsi10/SubscribeContextRequest.cpp
@@ -180,7 +180,7 @@ void SubscribeContextRequest::toNgsiv2Subscription(Subscription* sub)
// description and expression are not touched, so default empty string provided by constructor will be used
sub->status = STATUS_ACTIVE;
sub->descriptionProvided = false;
- sub->attrsFormat = NGSI_V1_LEGACY;
+ sub->attrsFormat = NGSI_V2_NORMALIZED;
sub->notification.blacklist = false;
sub->notification.httpInfo.custom = false;
diff --git a/src/lib/ngsiNotify/Notifier.cpp b/src/lib/ngsiNotify/Notifier.cpp
index e26fc31e37..14724c9a1e 100644
--- a/src/lib/ngsiNotify/Notifier.cpp
+++ b/src/lib/ngsiNotify/Notifier.cpp
@@ -151,20 +151,7 @@ static bool setPayload
ncr.subscriptionId = subscriptionId;
ncr.contextElementResponseVector.push_back(&cer);
- if (*renderFormatP == NGSI_V1_LEGACY)
- {
- __sync_fetch_and_add(&noOfDprLegacyNotif, 1);
- if (logDeprecate)
- {
- LM_W(("Deprecated usage of notification legacy format in notification (subId: %s)", subscriptionId.c_str()));
- }
-
- *payloadP = ncr.toJsonV1(false, attrsFilter, blacklist, metadataFilter);
- }
- else
- {
- *payloadP = ncr.toJson(*renderFormatP, attrsFilter, blacklist, metadataFilter);
- }
+ *payloadP = ncr.toJson(*renderFormatP, attrsFilter, blacklist, metadataFilter);
*mimeTypeP = "application/json";
}
@@ -681,22 +668,7 @@ SenderThreadParams* Notifier::buildSenderParams
ci.outMimeType = JSON;
- std::string payloadString;
- if (renderFormat == NGSI_V1_LEGACY)
- {
- __sync_fetch_and_add(&noOfDprLegacyNotif, 1);
- if (logDeprecate)
- {
- LM_W(("Deprecated usage of notification legacy format in notification (subId: %s)", subId.c_str()));
- }
-
- bool asJsonObject = (ci.uriParam[URI_PARAM_ATTRIBUTE_FORMAT] == "object" && ci.outMimeType == JSON);
- payloadString = ncr.toJsonV1(asJsonObject, attrsFilter, blacklist, metadataFilter);
- }
- else
- {
- payloadString = ncr.toJson(renderFormat, attrsFilter, blacklist, metadataFilter);
- }
+ std::string payloadString = ncr.toJson(renderFormat, attrsFilter, blacklist, metadataFilter);
/* Parse URL */
std::string host;
diff --git a/src/lib/serviceRoutines/statisticsTreat.cpp b/src/lib/serviceRoutines/statisticsTreat.cpp
index a0a003a874..ec734f51a9 100644
--- a/src/lib/serviceRoutines/statisticsTreat.cpp
+++ b/src/lib/serviceRoutines/statisticsTreat.cpp
@@ -93,7 +93,6 @@ static void resetStatistics(void)
noOfDprNgsiv1Request = -1;
noOfDprLegacyForwarding = -1;
- noOfDprLegacyNotif = -1;
noOfDprGeoformat = -1;
statisticsTime = getCurrentTime();
@@ -221,7 +220,6 @@ std::string renderCounterStats(bool fullCounters)
JsonObjectHelper jsDeprecated;
renderUsedCounter(&jsDeprecated, "ngsiv1Requests", noOfDprNgsiv1Request, fullCounters);
renderUsedCounter(&jsDeprecated, "ngsiv1Forwarding", noOfDprLegacyForwarding, fullCounters);
- renderUsedCounter(&jsDeprecated, "ngsiv1NotifFormat", noOfDprLegacyNotif, fullCounters);
renderUsedCounter(&jsDeprecated, "geoFormat", noOfDprGeoformat, fullCounters);
std::string deprecation = jsDeprecated.str();
diff --git a/test/functionalTest/cases/0000_deprecated_checkings/log_deprecate_warning.test b/test/functionalTest/cases/0000_deprecated_checkings/log_deprecate_warning.test
index 31092ef852..0d75384406 100644
--- a/test/functionalTest/cases/0000_deprecated_checkings/log_deprecate_warning.test
+++ b/test/functionalTest/cases/0000_deprecated_checkings/log_deprecate_warning.test
@@ -41,12 +41,8 @@ brokerStart CB 0 IPV4 -logDeprecate -statCounters
# 06. Retrieve registrations (which uses legacyForwarding mode)
# 07. Forwarded query using legacyForwarding mode
# 08. Update query using legacyForwarding mode
-# 09. Create subscription using attrsFormat legacy
-# 10. Retrieve subscriptions (which uses attrsFormat legacy)
-# 11. Update subscription using attrsFormat legacy
-# 12. Trigger notification using attrsFormat legacy
-# 13. Get WARNING trace in logs
-# 14. Get statistics and see deprecatedFeatures counters
+# 09. Get WARNING trace in logs
+# 10. Get statistics and see deprecatedFeatures counters
#
echo "01. Query E1-T1"
@@ -163,77 +159,14 @@ echo
echo
-echo "09. Create subscription using attrsFormat legacy"
-echo "================================================"
-payload='{
- "subject": {
- "entities": [
- {
- "id": "E2",
- "type": "T2"
- }
- ]
- },
- "notification": {
- "http": {
- "url": "http://localhost:1234"
- },
- "attrsFormat": "legacy"
- }
-}'
-orionCurl --url /v2/subscriptions --payload "$payload"
-echo
-echo
-
-
-SUB_ID=$(echo "$_responseHeaders" | grep Location | awk -F/ '{ print $4 }' | tr -d "\r\n")
-
-
-echo "10. Retrieve subscriptions (which uses attrsFormat legacy)"
-echo "=========================================================="
-orionCurl --url /v2/subscriptions
-echo
-echo
-
-
-echo "11. Update subscription using attrsFormat legacy"
-echo "================================================"
-payload='{
- "notification": {
- "http": {
- "url": "http://localhost:1234"
- },
- "attrsFormat": "legacy"
- }
-}'
-orionCurl --url /v2/subscriptions/$SUB_ID -X PATCH --payload "$payload"
-echo
-echo
-
-
-echo "12. Trigger notification using attrsFormat legacy"
-echo "================================================="
-payload='{
- "id": "E2",
- "type": "T2",
- "A": {
- "value": 1,
- "type": "Number"
- }
-}'
-orionCurl --url /v2/entities --payload "$payload"
-echo
-echo
-
-
-echo "13. Get WARNING trace in logs"
+echo "09. Get WARNING trace in logs"
echo "============================="
-cat /tmp/contextBroker.log | grep 'WARN' | awk -F 'msg=' '{print $2}' | sed -e "s/$REG_ID/REG_ID/g" | sed -e "s/$SUB_ID/SUB_ID/g"
+cat /tmp/contextBroker.log | grep 'WARN' | awk -F 'msg=' '{print $2}' | sed -e "s/$REG_ID/REG_ID/g"
echo
echo
-echo "14. Get statistics and see deprecatedFeatures counters"
+echo "10. Get statistics and see deprecatedFeatures counters"
echo "======================================================"
orionCurl --url /statistics
echo
@@ -388,72 +321,7 @@ Content-Length: 95
}
-09. Create subscription using attrsFormat legacy
-================================================
-HTTP/1.1 201 Created
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Location: /v2/subscriptions/REGEX([0-9a-f\-]{24})
-Content-Length: 0
-
-
-
-10. Retrieve subscriptions (which uses attrsFormat legacy)
-==========================================================
-HTTP/1.1 200 OK
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Content-Type: application/json
-Content-Length: 288
-
-[
- {
- "id": "REGEX([0-9a-f\-]{24})",
- "notification": {
- "attrs": [],
- "attrsFormat": "legacy",
- "covered": false,
- "http": {
- "url": "http://localhost:1234"
- },
- "onlyChangedAttrs": false
- },
- "status": "active",
- "subject": {
- "condition": {
- "attrs": [],
- "notifyOnMetadataChange": true
- },
- "entities": [
- {
- "id": "E2",
- "type": "T2"
- }
- ]
- }
- }
-]
-
-
-11. Update subscription using attrsFormat legacy
-================================================
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-12. Trigger notification using attrsFormat legacy
-=================================================
-HTTP/1.1 201 Created
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Location: /v2/entities/E2?type=T2
-Content-Length: 0
-
-
-
-13. Get WARNING trace in logs
+09. Get WARNING trace in logs
=============================
Deprecated NGSIv1 request received: POST /v1/queryContext, request payload (48 bytes): { "entities": [ { "type": "T1", "id": "E1" } ] }, response code: 200
Deprecated NGSIv1 request received: GET /v1/contextEntities/E/attributes/A, response code: 200
@@ -467,38 +335,31 @@ Raising alarm ForwardingError localhost:9801/v2/queryContext: forwarding failure
Deprecated usage of legacyForwarding mode in update forwarding operation (regId: REG_ID)
Raising alarm ForwardingError localhost:9801/v2/updateContext: forwarding failure for sender-thread: Couldn't connect to server
Raising alarm BadInput 127.0.0.1: The requested entity has not been found. Check type and id
-Releasing alarm BadInput 127.0.0.1
-Deprecated usage of notification legacy format in subscription creation (subId: SUB_ID)
-Deprecated usage of notification legacy format detected in existing subscription (subId: SUB_ID)
-Deprecated usage of notification legacy format in subscription modification (subId: SUB_ID)
-Deprecated usage of notification legacy format in notification (subId: SUB_ID)
-Raising alarm NotificationError localhost:1234/: notification failure for queue worker: Couldn't connect to server
-14. Get statistics and see deprecatedFeatures counters
+10. Get statistics and see deprecatedFeatures counters
======================================================
HTTP/1.1 200 OK
Date: REGEX(.*)
Fiware-Correlator: REGEX([0-9a-f\-]{36})
Content-Type: application/json
-Content-Length: 566
+Content-Length: 468
{
"counters": {
"deprecatedFeatures": {
"geoFormat": 2,
"ngsiv1Forwarding": 4,
- "ngsiv1NotifFormat": 4,
"ngsiv1Requests": 3
},
- "jsonRequests": 8,
- "noPayloadRequests": 5,
+ "jsonRequests": 5,
+ "noPayloadRequests": 4,
"requests": {
"/statistics": {
"GET": 1
},
"/v2/entities": {
- "POST": 2
+ "POST": 1
},
"/v2/entities/{id}/attrs/{name}": {
"GET": 1,
@@ -507,13 +368,6 @@ Content-Length: 566
"/v2/registrations": {
"GET": 1,
"POST": 1
- },
- "/v2/subscriptions": {
- "GET": 1,
- "POST": 1
- },
- "/v2/subscriptions/{id}": {
- "PATCH": 1
}
},
"requestsLegacy": {
diff --git a/test/functionalTest/cases/0000_large_requests/notification_different_sizes.test b/test/functionalTest/cases/0000_large_requests/notification_different_sizes.test
index 79b31be3bd..3c50b6e889 100644
--- a/test/functionalTest/cases/0000_large_requests/notification_different_sizes.test
+++ b/test/functionalTest/cases/0000_large_requests/notification_different_sizes.test
@@ -63,7 +63,6 @@ payload='{
]
},
"notification": {
- "attrsFormat": "legacy",
"http": {
"url": "http://127.0.0.1:'${LISTENER_PORT}'/notify"
},
@@ -87,7 +86,6 @@ payload='{
]
},
"notification": {
- "attrsFormat": "legacy",
"http": {
"url": "http://127.0.0.1:'${LISTENER_PORT}'/notify"
},
@@ -111,7 +109,6 @@ payload='{
]
},
"notification": {
- "attrsFormat": "legacy",
"http": {
"url": "http://127.0.0.1:'${LISTENER_PORT}'/notify"
},
@@ -135,7 +132,6 @@ payload='{
]
},
"notification": {
- "attrsFormat": "legacy",
"http": {
"url": "http://127.0.0.1:'${LISTENER_PORT}'/notify"
},
@@ -298,9 +294,9 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36})
08. Check notification sizes
============================
-Sending message 1 to HTTP server: sending message of REGEX((19496|19501|19497|19502)) bytes to HTTP server
-Sending message 2 to HTTP server: sending message of REGEX((21496|21501|21497|21502)) bytes to HTTP server
-Sending message 3 to HTTP server: sending message of REGEX((8100498|8100503|8100499|8100504)) bytes to HTTP server
+Sending message 1 to HTTP server: sending message of REGEX((19400|19401|19405|19406)) bytes to HTTP server
+Sending message 2 to HTTP server: sending message of REGEX((21400|21401|21405|21406)) bytes to HTTP server
+Sending message 3 to HTTP server: sending message of REGEX((8100402|8100403|8100407|8100408)) bytes to HTTP server
--TEARDOWN--
diff --git a/test/functionalTest/cases/0000_statistics_operation/statistics_with_full_counters.test b/test/functionalTest/cases/0000_statistics_operation/statistics_with_full_counters.test
index 403721e557..dfc021a52d 100644
--- a/test/functionalTest/cases/0000_statistics_operation/statistics_with_full_counters.test
+++ b/test/functionalTest/cases/0000_statistics_operation/statistics_with_full_counters.test
@@ -31,7 +31,7 @@ brokerStart CB 0 IPv4 -statCounters
#
# This test is special and doesn't follow the typical steps pattern
-# Instead of that, we just stimulate some possible API rute (without output)
+# Instead of that, we just stimulate some possible API routes (without output)
# and do GET /statistics after that
#
@@ -46,14 +46,13 @@ HTTP/1.1 200 OK
Date: REGEX(.*)
Fiware-Correlator: REGEX([0-9a-f\-]{36})
Content-Type: application/json
-Content-Length: 1624
+Content-Length: 1602
{
"counters": {
"deprecatedFeatures": {
"geoFormat": 0,
"ngsiv1Forwarding": 0,
- "ngsiv1NotifFormat": 0,
"ngsiv1Requests": 0
},
"discoveryErrors": 0,
diff --git a/test/functionalTest/cases/2507_csub_metadata_field/previous_value_with_compounds_ngsiv1.test b/test/functionalTest/cases/2507_csub_metadata_field/previous_value_with_compounds_ngsiv1.test
deleted file mode 100644
index 5e8d90fb59..0000000000
--- a/test/functionalTest/cases/2507_csub_metadata_field/previous_value_with_compounds_ngsiv1.test
+++ /dev/null
@@ -1,403 +0,0 @@
-# Copyright 2016 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
-
-# VALGRIND_READY - to mark the test ready for valgrindTestSuite.sh
-
---NAME--
-previousValue with compound cases
-
---SHELL-INIT--
-dbInit CB
-brokerStart CB
-accumulatorStart --pretty-print
-
---SHELL--
-
-#
-# Same script as previous_value_with_compounds.test but using "legacy" as attrsFormat
-#
-# 01. Create subscription with previousValue as metadata
-# 02. Create E1 with attributes A: 1
-# 03. Dump and reset: see notification A:1 and no previousValue
-# 04. Update A: [1, {b: foo} ]
-# 05. Dump and reset: see notification A: [1, {b: foo} ], previousValue: 1
-# 06. Update A: {x: 1, y: [true, foo] }
-# 07. Dump and reset: see notification A: {x: 1, y: [true: foo] }, previousValue: [1, {b: foo} ]
-# 08. Update A: x
-# 09. Dump and reset: see notification A: x, previousValue: {x: 1, y: [true, foo] }
-#
-
-echo "01. Create subscription with previousValue as metadata"
-echo "======================================================"
-payload='{
- "subject": {
- "entities": [
- {
- "id": "E1",
- "type": "T"
- }
- ],
- "condition": {
- "attrs": [ ]
- }
- },
- "notification": {
- "http": {
- "url": "http://localhost:'$LISTENER_PORT'/notify"
- },
- "attrs": [ ],
- "attrsFormat": "legacy",
- "metadata": [ "previousValue" ]
- }
-}'
-orionCurl --url /v2/subscriptions --payload "$payload"
-echo
-echo
-
-
-echo "02. Create E1 with attributes A: 1"
-echo "=================================="
-payload='{
- "type": "T",
- "id": "E1",
- "A": {
- "type": "Number",
- "value": 1
- }
-}'
-orionCurl --url /v2/entities --payload "$payload"
-echo
-echo
-
-
-echo "03. Dump and reset: see notification A:1 and no previousValue"
-echo "============================================================="
-accumulatorDump
-accumulatorReset
-echo
-echo
-
-
-echo "04. Update A: [1, {b: foo} ]"
-echo "============================"
-payload='{
- "A": {
- "type": "ComplexVector",
- "value": [1, {"b": "foo"} ]
- }
-}'
-orionCurl --url /v2/entities/E1/attrs -X PATCH --payload "$payload"
-echo
-echo
-
-
-echo "05. Dump and reset: see notification A: [1, {b: foo} ], previousValue: 1"
-echo "========================================================================"
-accumulatorDump
-accumulatorReset
-echo
-echo
-
-
-echo "06. Update A: {x: 1, y: [true, foo] }"
-echo "====================================="
-payload='{
- "A": {
- "type": "ComplexObject",
- "value": {"x": 1, "y": [true, "foo"] }
- }
-}'
-orionCurl --url /v2/entities/E1/attrs -X PATCH --payload "$payload"
-echo
-echo
-
-
-echo "07. Dump and reset: see notification A: {x: 1, y: [true: foo] }, previousValue: [1, {b: foo} ]"
-echo "=============================================================================================="
-accumulatorDump
-accumulatorReset
-echo
-echo
-
-echo "08. Update A: x"
-echo "==============="
-payload='{
- "A": {
- "type": "Text",
- "value": "x"
- }
-}'
-orionCurl --url /v2/entities/E1/attrs -X PATCH --payload "$payload"
-echo
-echo
-
-
-echo "09. Dump and reset: see notification A: x, previousValue: {x: 1, y: [true, foo] }"
-echo "================================================================================="
-accumulatorDump
-accumulatorReset
-echo
-echo
-
-
---REGEXPECT--
-01. Create subscription with previousValue as metadata
-======================================================
-HTTP/1.1 201 Created
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Location: /v2/subscriptions/REGEX([0-9a-f]{24})
-Content-Length: 0
-
-
-
-02. Create E1 with attributes A: 1
-==================================
-HTTP/1.1 201 Created
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Location: /v2/entities/E1?type=T
-Content-Length: 0
-
-
-
-03. Dump and reset: see notification A:1 and no previousValue
-=============================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 255
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "name": "A",
- "type": "Number",
- "value": 1
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
-04. Update A: [1, {b: foo} ]
-============================
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-05. Dump and reset: see notification A: [1, {b: foo} ], previousValue: 1
-========================================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 341
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "metadatas": [
- {
- "name": "previousValue",
- "type": "Number",
- "value": 1
- }
- ],
- "name": "A",
- "type": "ComplexVector",
- "value": [
- 1,
- {
- "b": "foo"
- }
- ]
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
-06. Update A: {x: 1, y: [true, foo] }
-=====================================
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-07. Dump and reset: see notification A: {x: 1, y: [true: foo] }, previousValue: [1, {b: foo} ]
-==============================================================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 371
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "metadatas": [
- {
- "name": "previousValue",
- "type": "ComplexVector",
- "value": [
- 1,
- {
- "b": "foo"
- }
- ]
- }
- ],
- "name": "A",
- "type": "ComplexObject",
- "value": {
- "x": 1,
- "y": [
- true,
- "foo"
- ]
- }
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
-08. Update A: x
-===============
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-09. Dump and reset: see notification A: x, previousValue: {x: 1, y: [true, foo] }
-=================================================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 350
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "metadatas": [
- {
- "name": "previousValue",
- "type": "ComplexObject",
- "value": {
- "x": 1,
- "y": [
- true,
- "foo"
- ]
- }
- }
- ],
- "name": "A",
- "type": "Text",
- "value": "x"
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
---TEARDOWN--
-brokerStop CB
-accumulatorStop $LISTENER_PORT
-dbDrop CB
diff --git a/test/functionalTest/cases/2507_csub_metadata_field/special_metadata_in_notifications_ngsiv1.test b/test/functionalTest/cases/2507_csub_metadata_field/special_metadata_in_notifications_ngsiv1.test
deleted file mode 100644
index d04b13c74c..0000000000
--- a/test/functionalTest/cases/2507_csub_metadata_field/special_metadata_in_notifications_ngsiv1.test
+++ /dev/null
@@ -1,943 +0,0 @@
-# Copyright 2016 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
-
-# VALGRIND_READY - to mark the test ready for valgrindTestSuite.sh
-
---NAME--
-Special metadata in NGSIv1 notifications
-
---SHELL-INIT--
-dbInit CB
-brokerStart CB
-accumulatorStart --pretty-print
-
---SHELL--
-
-#
-# Same script as special_metadata_in_notifications_ngsiv1.test but using "legacy" as attrsFormat
-#
-# 01. Subscribe to E.* for A, B and C; triggered by B, C or D
-# 02. Create E1 with attributes A:1, B:2, C:3, D:4
-# 03. Dump and reset: see notification with A, B and C
-# 04. Update B:20
-# 05. Dump and reset: see notification with actionType=update and previousValue=2 for B
-# 06. Update B:20, C:30
-# 07. Dump and reset: see notification with actionType=update for B and C, previousValue=20 for B, previousValue=3 for C
-# 08. Update A:1, D:40
-# 09. Dump and reset: see notification with actionType=update and previousValue=1 for A
-# 10. Update A:10, D:41
-# 11. Dump and reset: see notification with actionType=update and previousValue=10 for A
-# 12. Create E2 with attributes A:x, B:y, C:z, D:u
-# 13. Dump and reset: see notification with actionType=append for A, B, C
-# 14. Update subscription conditions
-# 15. Update E1 A:10, D:41 (forced)
-# 16. Update E2 A:x, B:y, C:z, D:u (forced)
-# 15. Dump and reset: see notification with 2 entities with A, B and C
-#
-
-
-echo "01. Subscribe to E.* for A, B and C; triggered by B, C or D"
-echo "==========================================================="
-payload='{
- "subject": {
- "entities": [
- {
- "idPattern": "E.*",
- "type": "T"
- }
- ],
- "condition": {
- "attrs": [ "B", "C", "D" ]
- }
- },
- "notification": {
- "http": {
- "url": "http://localhost:'$LISTENER_PORT'/notify"
- },
- "attrs": [ "A", "B", "C" ],
- "attrsFormat": "legacy",
- "metadata": [ "actionType", "previousValue" ]
- }
-}'
-orionCurl --url /v2/subscriptions --payload "$payload"
-echo
-echo
-
-SUB_ID=$(echo "$_responseHeaders" | grep Location | awk -F/ '{ print $4 }' | tr -d "\r\n")
-
-
-echo "02. Create E1 with attributes A:1, B:2, C:3, D:4"
-echo "================================================"
-payload='{
- "type": "T",
- "id": "E1",
- "A": {
- "type": "Number",
- "value": 1
- },
- "B": {
- "type": "Number",
- "value": 2
- },
- "C": {
- "type": "Number",
- "value": 3
- },
- "D": {
- "type": "Number",
- "value": 4
- }
-}'
-orionCurl --url /v2/entities --payload "$payload"
-echo
-echo
-
-
-echo "03. Dump and reset: see notification with A, B and C"
-echo "===================================================="
-accumulatorDump
-accumulatorReset
-echo
-echo
-
-
-echo "04. Update B:20"
-echo "==============="
-payload='{
- "B": {
- "type": "Number",
- "value": 20
- }
-}'
-orionCurl --url /v2/entities/E1/attrs -X PATCH --payload "$payload"
-echo
-echo
-
-
-echo "05. Dump and reset: see notification with actionType=update and previousValue=2 for B"
-echo "====================================================================================="
-accumulatorDump
-accumulatorReset
-echo
-echo
-
-
-echo "06. Update B:20, C:30"
-echo "====================="
-payload='{
- "B": {
- "type": "Number",
- "value": 20
- },
- "C": {
- "type": "Number",
- "value": 30
- }
-}'
-orionCurl --url /v2/entities/E1/attrs -X PATCH --payload "$payload"
-echo
-echo
-
-
-echo "07. Dump and reset: see notification with actionType=update for B and C, previousValue=20 for B, previousValue=3 for C"
-echo "======================================================================================================================"
-accumulatorDump
-accumulatorReset
-echo
-echo
-
-echo "08. Update A:1, D:40"
-echo "===================="
-payload='{
- "A": {
- "type": "Number",
- "value": 1
- },
- "D": {
- "type": "Number",
- "value": 40
- }
-}'
-orionCurl --url /v2/entities/E1/attrs -X PATCH --payload "$payload"
-echo
-echo
-
-
-echo "09. Dump and reset: see notification with actionType=update and previousValue=1 for A"
-echo "====================================================================================="
-accumulatorDump
-accumulatorReset
-echo
-echo
-
-
-echo "10. Update A:10, D:41"
-echo "====================="
-payload='{
- "A": {
- "type": "Number",
- "value": 10
- },
- "D": {
- "type": "Number",
- "value": 41
- }
-}'
-orionCurl --url /v2/entities/E1/attrs -X PATCH --payload "$payload"
-echo
-echo
-
-
-echo "11. Dump and reset: see notification with actionType=update and previousValue=10 for A"
-echo "======================================================================================"
-accumulatorDump
-accumulatorReset
-echo
-echo
-
-
-echo "12. Create E2 with attributes A:x, B:y, C:z, D:u"
-echo "================================================"
-payload='{
- "type": "T",
- "id": "E2",
- "A": {
- "type": "Text",
- "value": "x"
- },
- "B": {
- "type": "Text",
- "value": "y"
- },
- "C": {
- "type": "Text",
- "value": "z"
- },
- "D": {
- "type": "Text",
- "value": "u"
- }
-}'
-orionCurl --url /v2/entities --payload "$payload"
-echo
-echo
-
-
-echo "13. Dump and reset: see notification with actionType=append for A, B, C"
-echo "======================================================================="
-accumulatorDump
-accumulatorReset
-echo
-echo
-echo
-
-
-echo "14. Update subscription conditions"
-echo "=================================="
-payload='{
- "subject": {
- "entities": [
- {
- "idPattern": "E.*",
- "type": "T"
- }
- ],
- "condition": {
- "attrs": [ "B", "C", "D" ]
- }
- }
-}'
-orionCurl --url /v2/subscriptions/$SUB_ID -X PATCH --payload "$payload"
-echo
-echo
-
-
-echo "15. Update E1 A:10, D:41 (forced)"
-echo "================================="
-payload='{
- "A": {
- "type": "Number",
- "value": 10
- },
- "D": {
- "type": "Number",
- "value": 41
- }
-}'
-orionCurl --url /v2/entities/E1/attrs?options=forcedUpdate -X PATCH --payload "$payload"
-echo
-echo
-
-
-echo "16. Update E2 A:x, B:y, C:z, D:u (forced)"
-echo "========================================="
-payload='{
- "A": {
- "type": "Text",
- "value": "x"
- },
- "B": {
- "type": "Text",
- "value": "y"
- },
- "C": {
- "type": "Text",
- "value": "z"
- },
- "D": {
- "type": "Text",
- "value": "u"
- }
-}'
-orionCurl --url /v2/entities/E2/attrs?options=forcedUpdate --payload "$payload"
-echo
-echo
-
-
-echo "17. Dump and reset: see notification with 2 entities with A, B and C"
-echo "===================================================================="
-accumulatorDump
-accumulatorReset
-echo
-echo
-
-
---REGEXPECT--
-01. Subscribe to E.* for A, B and C; triggered by B, C or D
-===========================================================
-HTTP/1.1 201 Created
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Location: /v2/subscriptions/REGEX([0-9a-f]{24})
-Content-Length: 0
-
-
-
-02. Create E1 with attributes A:1, B:2, C:3, D:4
-================================================
-HTTP/1.1 201 Created
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Location: /v2/entities/E1?type=T
-Content-Length: 0
-
-
-
-03. Dump and reset: see notification with A, B and C
-====================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 534
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "append"
- }
- ],
- "name": "A",
- "type": "Number",
- "value": 1
- },
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "append"
- }
- ],
- "name": "B",
- "type": "Number",
- "value": 2
- },
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "append"
- }
- ],
- "name": "C",
- "type": "Number",
- "value": 3
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
-04. Update B:20
-===============
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-05. Dump and reset: see notification with actionType=update and previousValue=2 for B
-=====================================================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 452
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "name": "A",
- "type": "Number",
- "value": 1
- },
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "update"
- },
- {
- "name": "previousValue",
- "type": "Number",
- "value": 2
- }
- ],
- "name": "B",
- "type": "Number",
- "value": 20
- },
- {
- "name": "C",
- "type": "Number",
- "value": 3
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
-06. Update B:20, C:30
-=====================
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-07. Dump and reset: see notification with actionType=update for B and C, previousValue=20 for B, previousValue=3 for C
-======================================================================================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 572
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "name": "A",
- "type": "Number",
- "value": 1
- },
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "update"
- },
- {
- "name": "previousValue",
- "type": "Number",
- "value": 20
- }
- ],
- "name": "B",
- "type": "Number",
- "value": 20
- },
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "update"
- },
- {
- "name": "previousValue",
- "type": "Number",
- "value": 3
- }
- ],
- "name": "C",
- "type": "Number",
- "value": 30
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
-08. Update A:1, D:40
-====================
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-09. Dump and reset: see notification with actionType=update and previousValue=1 for A
-=====================================================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 453
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "update"
- },
- {
- "name": "previousValue",
- "type": "Number",
- "value": 1
- }
- ],
- "name": "A",
- "type": "Number",
- "value": 1
- },
- {
- "name": "B",
- "type": "Number",
- "value": 20
- },
- {
- "name": "C",
- "type": "Number",
- "value": 30
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
-10. Update A:10, D:41
-=====================
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-11. Dump and reset: see notification with actionType=update and previousValue=10 for A
-======================================================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 454
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "update"
- },
- {
- "name": "previousValue",
- "type": "Number",
- "value": 1
- }
- ],
- "name": "A",
- "type": "Number",
- "value": 10
- },
- {
- "name": "B",
- "type": "Number",
- "value": 20
- },
- {
- "name": "C",
- "type": "Number",
- "value": 30
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
-12. Create E2 with attributes A:x, B:y, C:z, D:u
-================================================
-HTTP/1.1 201 Created
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Location: /v2/entities/E2?type=T
-Content-Length: 0
-
-
-
-13. Dump and reset: see notification with actionType=append for A, B, C
-=======================================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 534
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "append"
- }
- ],
- "name": "A",
- "type": "Text",
- "value": "x"
- },
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "append"
- }
- ],
- "name": "B",
- "type": "Text",
- "value": "y"
- },
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "append"
- }
- ],
- "name": "C",
- "type": "Text",
- "value": "z"
- }
- ],
- "id": "E2",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
-
-14. Update subscription conditions
-==================================
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-15. Update E1 A:10, D:41 (forced)
-=================================
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-16. Update E2 A:x, B:y, C:z, D:u (forced)
-=========================================
-HTTP/1.1 204 No Content
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-
-
-
-17. Dump and reset: see notification with 2 entities with A, B and C
-====================================================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 455
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "update"
- },
- {
- "name": "previousValue",
- "type": "Number",
- "value": 10
- }
- ],
- "name": "A",
- "type": "Number",
- "value": 10
- },
- {
- "name": "B",
- "type": "Number",
- "value": 20
- },
- {
- "name": "C",
- "type": "Number",
- "value": 30
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 687
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}); cbnotif=1
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "update"
- },
- {
- "name": "previousValue",
- "type": "Text",
- "value": "x"
- }
- ],
- "name": "A",
- "type": "Text",
- "value": "x"
- },
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "update"
- },
- {
- "name": "previousValue",
- "type": "Text",
- "value": "y"
- }
- ],
- "name": "B",
- "type": "Text",
- "value": "y"
- },
- {
- "metadatas": [
- {
- "name": "actionType",
- "type": "Text",
- "value": "update"
- },
- {
- "name": "previousValue",
- "type": "Text",
- "value": "z"
- }
- ],
- "name": "C",
- "type": "Text",
- "value": "z"
- }
- ],
- "id": "E2",
- "isPattern": "false",
- "type": "T"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": "OK"
- }
- }
- ],
- "originator": "localhost",
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-
-
---TEARDOWN--
-brokerStop CB
-accumulatorStop $LISTENER_PORT
-dbDrop CB
diff --git a/test/functionalTest/cases/2647_patch_subscription_bugfix/patch_subscription_bugfix_to_attrs.test b/test/functionalTest/cases/2647_patch_subscription_bugfix/patch_subscription_bugfix_to_attrs.test
index c9277dbbae..762a14683a 100644
--- a/test/functionalTest/cases/2647_patch_subscription_bugfix/patch_subscription_bugfix_to_attrs.test
+++ b/test/functionalTest/cases/2647_patch_subscription_bugfix/patch_subscription_bugfix_to_attrs.test
@@ -67,8 +67,7 @@ payload='{
"url": "http://localhost:1234"
},
"exceptAttrs": ["temperature", "humidity"],
- "metadata": [ "previousValue", "actionType" , "*"],
- "attrsFormat": "legacy"
+ "metadata": [ "previousValue", "actionType" , "*"]
},
"throttling": 5,
"expires": "2016-04-05T14:00:00.00Z",
@@ -128,14 +127,14 @@ HTTP/1.1 200 OK
Date: REGEX(.*)
Fiware-Correlator: REGEX([0-9a-f\-]{36})
Content-Type: application/json
-Content-Length: 670
+Content-Length: 674
{
"description": "One subscription to rule them all",
"expires": "2016-04-05T14:00:00.000Z",
"id": "REGEX([0-9a-f]{24})",
"notification": {
- "attrsFormat": "legacy",
+ "attrsFormat": "normalized",
"covered": false,
"exceptAttrs": [
"temperature",
diff --git a/test/functionalTest/cases/2647_patch_subscription_bugfix/patch_subscription_bugfix_to_except_attr.test b/test/functionalTest/cases/2647_patch_subscription_bugfix/patch_subscription_bugfix_to_except_attr.test
index bc90656ff9..2f59d462b8 100644
--- a/test/functionalTest/cases/2647_patch_subscription_bugfix/patch_subscription_bugfix_to_except_attr.test
+++ b/test/functionalTest/cases/2647_patch_subscription_bugfix/patch_subscription_bugfix_to_except_attr.test
@@ -67,8 +67,7 @@ payload='{
"url": "http://localhost:1234"
},
"attrs": ["temperature", "humidity"],
- "metadata": [ "previousValue", "actionType" , "*"],
- "attrsFormat": "legacy"
+ "metadata": [ "previousValue", "actionType" , "*"]
},
"throttling": 5,
"expires": "2016-04-05T14:00:00.00Z",
@@ -128,7 +127,7 @@ HTTP/1.1 200 OK
Date: REGEX(.*)
Fiware-Correlator: REGEX([0-9a-f\-]{36})
Content-Type: application/json
-Content-Length: 664
+Content-Length: 668
{
"description": "One subscription to rule them all",
@@ -139,7 +138,7 @@ Content-Length: 664
"temperature",
"humidity"
],
- "attrsFormat": "legacy",
+ "attrsFormat": "normalized",
"covered": false,
"http": {
"url": "http://localhost:1234"
diff --git a/test/functionalTest/cases/3154_notification_problem_with_custom_header/notification_problem_with_custom_header.test b/test/functionalTest/cases/3154_notification_problem_with_custom_header/notification_problem_with_custom_header.test
deleted file mode 100644
index b4e9cc5695..0000000000
--- a/test/functionalTest/cases/3154_notification_problem_with_custom_header/notification_problem_with_custom_header.test
+++ /dev/null
@@ -1,295 +0,0 @@
-# Copyright 2018 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
-
-# VALGRIND_READY - to mark the test ready for valgrindTestSuite.sh
-
---NAME--
-Notification Templates, with refresh of the subscription cache
-
---SHELL-INIT--
-dbInit CB
-brokerStart CB 0
-accumulatorStart --pretty-print
-
---SHELL--
-
-#
-# 01. Create custom subscription
-# 02. Create custom subscription with payload inside httpCustom and with "attrsFormat" == "legacy"
-# 03. Create entity to trigger the subscriptions
-# 04. GET the subscriptions
-# 05. Dump accumulator and see first notification in legacy mode, second notification not in legacy mode, as custom payload overrides
-#
-
-echo "01. Create custom subscription"
-echo "=============================="
-payload='{
- "description": "not custom",
- "expires": "2040-01-01T14:00:00.00Z",
- "subject": {
- "entities": [
- {
- "idPattern" : ".*"
- }
- ],
- "condition": {
- "attrs": []
- }
- },
- "notification": {
- "attrs": [],
- "attrsFormat": "legacy",
- "httpCustom": {
- "url": "http://localhost:'${LISTENER_PORT}'/notify"
- }
- }
-}'
-orionCurl --url /v2/subscriptions --payload "$payload"
-echo
-echo
-
-
-echo '02. Create custom subscription with payload inside httpCustom and with "attrsFormat" == "legacy"'
-echo "================================================================================================"
-payload='{
- "description": "custom",
- "expires": "2040-01-01T14:00:00.00Z",
- "subject": {
- "entities": [
- {
- "idPattern" : ".*"
- }
- ],
- "condition": {
- "attrs": []
- }
- },
- "notification": {
- "attrs": [],
- "attrsFormat": "legacy",
- "httpCustom": {
- "url": "http://localhost:'${LISTENER_PORT}'/notify",
- "payload": "{ %22A1%22: %22Value of A1: ${A1}%22 }"
- }
- }
-}'
-orionCurl --url /v2/subscriptions --payload "$payload"
-echo
-echo
-
-
-echo "03. Create entity to trigger the subscriptions"
-echo "=============================================="
-payload='{
- "id": "E1",
- "A1": "a1",
- "A2": "a2",
- "A3": 13
-}'
-orionCurl --url /v2/entities?options=keyValues --payload "$payload"
-echo
-echo
-
-
-echo "04. GET the subscriptions"
-echo "========================="
-orionCurl --url /v2/subscriptions
-echo
-echo
-
-
-echo "05. Dump accumulator and see first notification in legacy mode, second notification not in legacy mode, as custom payload overrides"
-echo "==================================================================================================================================="
-accumulatorDump
-echo
-echo
-
-
---REGEXPECT--
-01. Create custom subscription
-==============================
-HTTP/1.1 201 Created
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Location: /v2/subscriptions/REGEX([0-9a-f]{24})
-Content-Length: 0
-
-
-
-02. Create custom subscription with payload inside httpCustom and with "attrsFormat" == "legacy"
-================================================================================================
-HTTP/1.1 201 Created
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Location: /v2/subscriptions/REGEX([0-9a-f]{24})
-Content-Length: 0
-
-
-
-03. Create entity to trigger the subscriptions
-==============================================
-HTTP/1.1 201 Created
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Location: /v2/entities/E1?type=Thing
-Content-Length: 0
-
-
-
-04. GET the subscriptions
-=========================
-HTTP/1.1 200 OK
-Date: REGEX(.*)
-Fiware-Correlator: REGEX([0-9a-f\-]{36})
-Content-Type: application/json
-Content-Length: 1012
-
-[
- {
- "description": "not custom",
- "expires": "2040-01-01T14:00:00.000Z",
- "id": "REGEX([0-9a-f]{24})",
- "notification": {
- "attrs": [],
- "attrsFormat": "legacy",
- "covered": false,
- "httpCustom": {
- "url": "http://localhost:9997/notify"
- },
- "lastNotification": "REGEX(.*)",
- "lastSuccess": "REGEX(.*)",
- "lastSuccessCode": 200,
- "onlyChangedAttrs": false,
- "timesSent": 1
- },
- "status": "active",
- "subject": {
- "condition": {
- "attrs": [],
- "notifyOnMetadataChange": true
- },
- "entities": [
- {
- "idPattern": ".*"
- }
- ]
- }
- },
- {
- "description": "custom",
- "expires": "2040-01-01T14:00:00.000Z",
- "id": "REGEX([0-9a-f]{24})",
- "notification": {
- "attrs": [],
- "attrsFormat": "legacy",
- "covered": false,
- "httpCustom": {
- "payload": "{ %22A1%22: %22Value of A1: ${A1}%22 }",
- "url": "http://localhost:9997/notify"
- },
- "lastNotification": "REGEX(.*)",
- "lastSuccess": "REGEX(.*)",
- "lastSuccessCode": 200,
- "onlyChangedAttrs": false,
- "timesSent": 1
- },
- "status": "active",
- "subject": {
- "condition": {
- "attrs": [],
- "notifyOnMetadataChange": true
- },
- "entities": [
- {
- "idPattern": ".*"
- }
- ]
- }
- }
-]
-
-
-05. Dump accumulator and see first notification in legacy mode, second notification not in legacy mode, as custom payload overrides
-===================================================================================================================================
-#SORT_START
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 316
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: application/json; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}; cbnotif=[12])
-
-{
- "contextResponses": [
- {
- "contextElement": {
- "attributes": [
- {
- "name": "A1",
- "type": "Text",
- "value": "a1"
- },
- {
- "name": "A2",
- "type": "Text",
- "value": "a2"
- },
- {
- "name": "A3",
- "type": "Number",
- "value": 13
- }
- ],
- "id": "E1",
- "isPattern": "false",
- "type": "Thing"
- },
- "statusCode": {
- "code": "200",
- "reasonPhrase": ""
- }
- }
- ],
- "subscriptionId": "REGEX([0-9a-f]{24})"
-}
-=======================================
-POST http://localhost:REGEX(\d+)/notify
-Fiware-Servicepath: /
-Content-Length: 27
-User-Agent: orion/REGEX(\d+\.\d+\.\d+.*)
-Ngsiv2-Attrsformat: custom
-Host: localhost:REGEX(\d+)
-Accept: application/json
-Content-Type: text/plain; charset=utf-8
-Fiware-Correlator: REGEX([0-9a-f\-]{36}; cbnotif=[12])
-
-{
- "A1": "Value of A1: a1"
-}
-=======================================
-#SORT_END
-
-
---TEARDOWN--
-brokerStop CB
-dbDrop CB
-accumulatorStop
diff --git a/test/unittests/mongoBackend/mongoSubscribeContext_test.cpp b/test/unittests/mongoBackend/mongoSubscribeContext_test.cpp
index d3e00359c3..314969b4d3 100644
--- a/test/unittests/mongoBackend/mongoSubscribeContext_test.cpp
+++ b/test/unittests/mongoBackend/mongoSubscribeContext_test.cpp
@@ -1366,7 +1366,7 @@ TEST(mongoSubscribeContext, matchEnt1_Attr0_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -1470,7 +1470,7 @@ TEST(mongoSubscribeContext, matchEnt1_Attr0_C1_JSON)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -1575,7 +1575,7 @@ TEST(mongoSubscribeContext, matchEnt1_AttrN_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1684,7 +1684,7 @@ TEST(mongoSubscribeContext, matchEnt1_AttrN_C1_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1809,7 +1809,7 @@ TEST(mongoSubscribeContext, matchEnt1NoType_AttrN_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1934,7 +1934,7 @@ TEST(mongoSubscribeContext, matchEnt1NoType_AttrN_C1_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2051,7 +2051,7 @@ TEST(mongoSubscribeContext, matchEnt1Pattern_AttrN_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2168,7 +2168,7 @@ TEST(mongoSubscribeContext, matchEnt1Pattern_AttrN_C1_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2299,7 +2299,7 @@ TEST(mongoSubscribeContext, matchEnt1PatternNoType_AttrN_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2430,7 +2430,7 @@ TEST(mongoSubscribeContext, matchEnt1PatternNoType_AttrN_C1_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2537,7 +2537,7 @@ TEST(mongoSubscribeContext, matchEnt1_Attr0_CN)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2644,7 +2644,7 @@ TEST(mongoSubscribeContext, matchEnt1_Attr0_CN_partial)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2752,7 +2752,7 @@ TEST(mongoSubscribeContext, matchEnt1_Attr0_CNbis)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2858,7 +2858,7 @@ TEST(mongoSubscribeContext, matchEnt1_AttrN_CN_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2971,7 +2971,7 @@ TEST(mongoSubscribeContext, matchEnt1_AttrN_CN_partial)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3084,7 +3084,7 @@ TEST(mongoSubscribeContext, matchEnt1_AttrN_CN_partial_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3197,7 +3197,7 @@ TEST(mongoSubscribeContext, matchEnt1_AttrN_CNbis)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3310,7 +3310,7 @@ TEST(mongoSubscribeContext, matchEnt1_AttrN_CN)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3433,7 +3433,7 @@ TEST(mongoSubscribeContext, matchEntN_Attr0_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3551,7 +3551,7 @@ TEST(mongoSubscribeContext, matchEntN_AttrN_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3673,7 +3673,7 @@ TEST(mongoSubscribeContext, matchEntN_Attr0_CN)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3796,7 +3796,7 @@ TEST(mongoSubscribeContext, matchEntN_Attr0_CNbis)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3916,7 +3916,7 @@ TEST(mongoSubscribeContext, matchEntN_AttrN_CN)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -4040,7 +4040,7 @@ TEST(mongoSubscribeContext, matchEntN_AttrN_CNbis)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
diff --git a/test/unittests/mongoBackend/mongoUpdateContextSubscription_test.cpp b/test/unittests/mongoBackend/mongoUpdateContextSubscription_test.cpp
index 0559c70094..6e26762847 100644
--- a/test/unittests/mongoBackend/mongoUpdateContextSubscription_test.cpp
+++ b/test/unittests/mongoBackend/mongoUpdateContextSubscription_test.cpp
@@ -1737,7 +1737,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_Attr0_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -1836,7 +1836,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_Attr0_C1_JSON)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -1933,7 +1933,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_AttrN_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2033,7 +2033,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_AttrN_C1_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2148,7 +2148,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1NoType_AttrN_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2263,7 +2263,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1NoType_AttrN_C1_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2370,7 +2370,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1Pattern_AttrN_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2477,7 +2477,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1Pattern_AttrN_C1_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2598,7 +2598,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1PatternNoType_AttrN_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2719,7 +2719,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1PatternNoType_AttrN_C1_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2821,7 +2821,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_Attr0_CN)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -2925,7 +2925,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_Attr0_CN_partial)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3030,7 +3030,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_Attr0_CNbis)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3130,7 +3130,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_AttrN_CN_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3234,7 +3234,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_AttrN_CN_partial)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3338,7 +3338,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_AttrN_CN_partial_disjoint)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3442,7 +3442,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_AttrN_CNbis)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3546,7 +3546,7 @@ TEST(mongoUpdateContextSubscription, matchEnt1_AttrN_CN)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3663,7 +3663,7 @@ TEST(mongoUpdateContextSubscription, matchEntN_Attr0_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3772,7 +3772,7 @@ TEST(mongoUpdateContextSubscription, matchEntN_AttrN_C1)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -3887,7 +3887,7 @@ TEST(mongoUpdateContextSubscription, matchEntN_Attr0_CN)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -4004,7 +4004,7 @@ TEST(mongoUpdateContextSubscription, matchEntN_Attr0_CNbis)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -4115,7 +4115,7 @@ TEST(mongoUpdateContextSubscription, matchEntN_AttrN_CN)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
@@ -4228,7 +4228,7 @@ TEST(mongoUpdateContextSubscription, matchEntN_AttrN_CNbis)
"",
"no correlator",
0,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(1);
diff --git a/test/unittests/mongoBackend/mongoUpdateContext_withOnchangeSubscriptionsNoCache_test.cpp b/test/unittests/mongoBackend/mongoUpdateContext_withOnchangeSubscriptionsNoCache_test.cpp
index 88d1d0ed18..65e84375cd 100644
--- a/test/unittests/mongoBackend/mongoUpdateContext_withOnchangeSubscriptionsNoCache_test.cpp
+++ b/test/unittests/mongoBackend/mongoUpdateContext_withOnchangeSubscriptionsNoCache_test.cpp
@@ -447,7 +447,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_updateMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -521,7 +521,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_appendMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -591,7 +591,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_appendMatch_type
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -660,7 +660,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_appendMatch_idAn
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -729,7 +729,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_deleteMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -805,7 +805,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_updateMatch_noTy
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -816,7 +816,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_updateMatch_noTy
"",
"",
2,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -894,7 +894,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_appendMatch_noTy
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -905,7 +905,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_appendMatch_noTy
"",
"",
2,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -978,7 +978,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_deleteMatch_noTy
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -989,7 +989,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_deleteMatch_noTy
"",
"",
2,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1060,7 +1060,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_updateMatch_patt
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1132,7 +1132,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_appendMatch_patt
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1200,7 +1200,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_deleteMatch_patt
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1270,7 +1270,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_updateMatch_patt
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1342,7 +1342,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_appendMatch_patt
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1410,7 +1410,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_deleteMatch_patt
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1480,7 +1480,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_updateMatchDisjo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1550,7 +1550,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_appendMatchDisjo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1620,7 +1620,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_deleteMatchDisjo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1858,7 +1858,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_updateMixMatchNo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1932,7 +1932,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_appendMixMatchNo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2002,7 +2002,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_deleteMixMatchNo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2074,7 +2074,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_update2Matches1N
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2148,7 +2148,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_append2Matches1N
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2218,7 +2218,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, Cond1_delete2Matches1N
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2288,7 +2288,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_updateMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2361,7 +2361,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_appendMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2429,7 +2429,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_deleteMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2499,7 +2499,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_updateMatchDisjo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2569,7 +2569,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_appendMatchDisjo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2639,7 +2639,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_deleteMatchDisjo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2877,7 +2877,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_updateMixMatchNo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2951,7 +2951,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_appendMixMatchNo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3021,7 +3021,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_deleteMixMatchNo
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3093,7 +3093,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_update2Matches1N
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3167,7 +3167,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_append2Matches1N
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3237,7 +3237,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptionsNoCache, CondN_delete2Matches1N
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
diff --git a/test/unittests/mongoBackend/mongoUpdateContext_withOnchangeSubscriptions_test.cpp b/test/unittests/mongoBackend/mongoUpdateContext_withOnchangeSubscriptions_test.cpp
index aec62730c8..402b725eac 100644
--- a/test/unittests/mongoBackend/mongoUpdateContext_withOnchangeSubscriptions_test.cpp
+++ b/test/unittests/mongoBackend/mongoUpdateContext_withOnchangeSubscriptions_test.cpp
@@ -402,7 +402,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_updateMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -477,7 +477,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_appendMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -547,7 +547,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_deleteMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -624,7 +624,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_updateMatch_noType)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -635,7 +635,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_updateMatch_noType)
"",
"",
2,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -720,7 +720,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_appendMatch_noType)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -731,7 +731,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_appendMatch_noType)
"",
"",
2,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -812,7 +812,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_deleteMatch_noType)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -823,7 +823,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_deleteMatch_noType)
"",
"",
2,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -902,7 +902,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_updateMatch_pattern)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -980,7 +980,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_appendMatch_pattern)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1052,7 +1052,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_deleteMatch_pattern)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1126,7 +1126,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_updateMatch_pattern_noT
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1202,7 +1202,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_appendMatch_pattern_noT
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1274,7 +1274,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_deleteMatch_pattern_noT
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1348,7 +1348,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_updateMatchDisjoint)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1422,7 +1422,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_appendMatchDisjoint)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1496,7 +1496,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_deleteMatchDisjoint)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1553,7 +1553,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_updateNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
_,
_,
_)).Times(0);
@@ -1610,7 +1610,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_appendNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
_,
_,
_)).Times(0);
@@ -1666,7 +1666,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_deleteNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
_,
_,
_)).Times(0);
@@ -1723,7 +1723,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_updateMatchWithoutChang
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(0);
@@ -1796,7 +1796,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_updateMixMatchNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -1868,7 +1868,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_appendMixMatchNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
_,
_,
_)).Times(1);
@@ -1936,7 +1936,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_deleteMixMatchNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
_,
_,
_)).Times(1);
@@ -2013,7 +2013,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_update2Matches1Notifica
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2093,7 +2093,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_append2Matches1Notifica
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2168,7 +2168,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, Cond1_delete2Matches1Notifica
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2242,7 +2242,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_updateMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2319,7 +2319,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_appendMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2391,7 +2391,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_deleteMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2465,7 +2465,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_updateMatchDisjoint)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2540,7 +2540,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_appendMatchDisjoint)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2614,7 +2614,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_deleteMatchDisjoint)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2671,7 +2671,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_updateNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
_,
_,
_)).Times(0);
@@ -2727,7 +2727,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_appendNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
_,
_,
_)).Times(0);
@@ -2783,7 +2783,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_deleteNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
_,
_,
_)).Times(0);
@@ -2840,7 +2840,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_updateMatchWithoutChang
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
emptyV,
false,
emptyV)).Times(0);
@@ -2913,7 +2913,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_updateMixMatchNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -2991,7 +2991,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_appendMixMatchNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3065,7 +3065,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_deleteMixMatchNoMatch)
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3141,7 +3141,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_update2Matches1Notifica
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3220,7 +3220,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_append2Matches1Notifica
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);
@@ -3295,7 +3295,7 @@ TEST(mongoUpdateContext_withOnchangeSubscriptions, CondN_delete2Matches1Notifica
"",
"",
1,
- NGSI_V1_LEGACY,
+ NGSI_V2_NORMALIZED,
attrsFilter,
false,
emptyV)).Times(1);