From a554ae449b470a269cddfe68a5ce578fe34c25a4 Mon Sep 17 00:00:00 2001 From: Fermin Galan Marquez Date: Thu, 27 Sep 2018 20:55:29 +0200 Subject: [PATCH 1/6] FIX remove isDomain and metadata structures in context registrations --- CHANGES_NEXT_RELEASE | 1 + doc/manuals/admin/database_model.md | 9 +- .../convenience/RegisterProviderRequest.cpp | 30 +--- src/lib/convenience/RegisterProviderRequest.h | 5 +- .../jsonNotifyContextAvailabilityRequest.cpp | 138 ---------------- .../jsonParse/jsonRegisterContextRequest.cpp | 150 ------------------ .../jsonParse/jsonRegisterProviderRequest.cpp | 63 -------- src/lib/mongoBackend/MongoCommonRegister.cpp | 13 +- src/lib/mongoBackend/MongoGlobal.cpp | 18 +-- src/lib/mongoBackend/MongoGlobal.h | 2 +- src/lib/mongoBackend/dbConstants.h | 1 - .../mongoBackend/mongoRegistrationCreate.cpp | 2 +- src/lib/ngsi/ContextElementResponse.cpp | 40 +---- src/lib/ngsi/ContextRegistration.cpp | 7 - src/lib/ngsi/ContextRegistration.h | 1 - src/lib/ngsi/ContextRegistrationAttribute.cpp | 46 +----- src/lib/ngsi/ContextRegistrationAttribute.h | 5 +- .../ContextRegistrationAttributeVector.cpp | 1 - src/lib/ngsi9/RegisterContextRequest.cpp | 3 +- 19 files changed, 33 insertions(+), 502 deletions(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index e69de29bb2..8dff2b740b 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -0,0 +1 @@ +- Remove: isDomain field in NGSIv1 registrations (it was never used) diff --git a/doc/manuals/admin/database_model.md b/doc/manuals/admin/database_model.md index e3c1913b80..e239369509 100644 --- a/doc/manuals/admin/database_model.md +++ b/doc/manuals/admin/database_model.md @@ -212,8 +212,7 @@ Fields: reasons, **isPattern** may be `"true"` or `"false"` (text) while **isTypePattern** may be `true` or `false` (boolean). - **attrs**: an array containing a list of attributes (optional). - The JSON for each attribute contains **name**, **type** and - **isDomain**. + The JSON for each attribute contains **name** and **type**. - **providingApplication**: the URL of the providing application for this registration (mandatory) @@ -241,13 +240,11 @@ Example document: "attrs": [ { "name": "A1", - "type": "TA1", - "isDomain": "false" + "type": "TA1" }, { "name": "A2", - "type": "TA2", - "isDomain": "true" + "type": "TA2" } ], "providingApplication": "http://foo.bar/notif" diff --git a/src/lib/convenience/RegisterProviderRequest.cpp b/src/lib/convenience/RegisterProviderRequest.cpp index 02fb9ad483..4a1c8cb366 100755 --- a/src/lib/convenience/RegisterProviderRequest.cpp +++ b/src/lib/convenience/RegisterProviderRequest.cpp @@ -55,24 +55,20 @@ RegisterProviderRequest::RegisterProviderRequest() /* **************************************************************************** * -* RegisterProviderRequest::render - +* RegisterProviderRequest::toJsonV1 - */ -std::string RegisterProviderRequest::render(void) +std::string RegisterProviderRequest::toJsonV1(void) { std::string out = ""; - //bool durationRendered = duration.get() != ""; bool providingApplicationRendered = providingApplication.get() != ""; bool registrationIdRendered = registrationId.get() != ""; - bool commaAfterRegistrationId = false; // Last element bool commaAfterProvidingApplication = registrationIdRendered; bool commaAfterDuration = commaAfterProvidingApplication || providingApplicationRendered; - //bool commaAfterMetadataVector = commaAfterDuration || durationRendered; out += startTag(); - // out += metadataVector.render(commaAfterMetadataVector); //FIXME #1298 remove context registration metadata - out += duration.render(commaAfterDuration); - out += providingApplication.render(commaAfterProvidingApplication); - out += registrationId.render(RegisterContext, commaAfterRegistrationId); + out += duration.toJsonV1(commaAfterDuration); + out += providingApplication.toJsonV1(commaAfterProvidingApplication); + out += registrationId.toJsonV1(RegisterContext, false); out += endTag(false); return out; @@ -98,8 +94,7 @@ std::string RegisterProviderRequest::check { response.errorCode.fill(SccBadRequest, predetectedError); } - else if (((res = metadataVector.check(apiVersion)) != "OK") || - ((res = duration.check()) != "OK") || + else if (((res = duration.check()) != "OK") || ((res = providingApplication.check()) != "OK") || ((res = registrationId.check()) != "OK")) { @@ -113,16 +108,5 @@ std::string RegisterProviderRequest::check std::string details = std::string("RegisterProviderRequest Error: '") + res + "'"; alarmMgr.badInput(clientIp, details); - return response.render(); -} - - - -/* **************************************************************************** -* -* RegisterProviderRequest::release - -*/ -void RegisterProviderRequest::release(void) -{ - metadataVector.release(); + return response.toJsonV1(); } diff --git a/src/lib/convenience/RegisterProviderRequest.h b/src/lib/convenience/RegisterProviderRequest.h index 1f62a44cfe..297a6eff20 100644 --- a/src/lib/convenience/RegisterProviderRequest.h +++ b/src/lib/convenience/RegisterProviderRequest.h @@ -41,16 +41,15 @@ */ typedef struct RegisterProviderRequest { - MetadataVector metadataVector; // Optional Duration duration; // Optional ProvidingApplication providingApplication; // Mandatory RegistrationId registrationId; // Optional RegisterProviderRequest(); - std::string render(void); + std::string toJsonV1(void); std::string check(ApiVersion apiVersion, RequestType requestType, const std::string& preError); - void release(); + } RegisterProviderRequest; #endif // SRC_LIB_CONVENIENCE_REGISTERPROVIDERREQUEST_H_ diff --git a/src/lib/jsonParse/jsonNotifyContextAvailabilityRequest.cpp b/src/lib/jsonParse/jsonNotifyContextAvailabilityRequest.cpp index 0a5dcfecbc..2c22d4b592 100755 --- a/src/lib/jsonParse/jsonNotifyContextAvailabilityRequest.cpp +++ b/src/lib/jsonParse/jsonNotifyContextAvailabilityRequest.cpp @@ -168,131 +168,6 @@ static std::string attributeType(const std::string& path, const std::string& val -/* **************************************************************************** -* -* attributeIsDomain - -*/ -static std::string attributeIsDomain(const std::string& path, const std::string& value, ParseData* parseDataP) -{ - LM_T(LmtParse, ("got an attributeIsDomain: '%s'", value.c_str())); - - parseDataP->ncar.craP->isDomain = value; - return "OK"; -} - - - -/* **************************************************************************** -* -* attributeMetadata - -*/ -static std::string attributeMetadata(const std::string& path, const std::string& value, ParseData* parseDataP) -{ - LM_T(LmtParse, ("Got an attributeMetadata: '%s'", value.c_str())); - - parseDataP->ncar.attributeMetadataP = new Metadata(); - parseDataP->ncar.craP->metadataVector.push_back(parseDataP->ncar.attributeMetadataP); - - return "OK"; -} - - - -/* **************************************************************************** -* -* attributeMetadataName - -*/ -static std::string attributeMetadataName(const std::string& path, const std::string& value, ParseData* parseDataP) -{ - LM_T(LmtParse, ("Got an attributeMetadataName: '%s'", value.c_str())); - parseDataP->ncar.attributeMetadataP->name = value; - return "OK"; -} - - - -/* **************************************************************************** -* -* attributeMetadataType - -*/ -static std::string attributeMetadataType(const std::string& path, const std::string& value, ParseData* parseDataP) -{ - LM_T(LmtParse, ("Got an attributeMetadataType: '%s'", value.c_str())); - parseDataP->ncar.attributeMetadataP->type = value; - return "OK"; -} - - - -/* **************************************************************************** -* -* attributeMetadataValue - -*/ -static std::string attributeMetadataValue(const std::string& path, const std::string& value, ParseData* parseDataP) -{ - LM_T(LmtParse, ("Got an attributeMetadataValue: '%s'", value.c_str())); - parseDataP->ncar.attributeMetadataP->stringValue = value; - parseDataP->ncar.attributeMetadataP->valueType = orion::ValueTypeString; - return "OK"; -} - - - -/* **************************************************************************** -* -* registrationMetadata - -*/ -static std::string registrationMetadata(const std::string& path, const std::string& value, ParseData* parseDataP) -{ - LM_T(LmtParse, ("Got a registrationMetadata: '%s'", value.c_str())); - parseDataP->ncar.regMetadataP = new Metadata(); - parseDataP->ncar.crrP->contextRegistration.registrationMetadataVector.push_back(parseDataP->ncar.regMetadataP); - - return "OK"; -} - - - -/* **************************************************************************** -* -* registrationMetadataName - -*/ -static std::string registrationMetadataName(const std::string& path, const std::string& value, ParseData* parseDataP) -{ - LM_T(LmtParse, ("Got a registrationMetadataName: '%s'", value.c_str())); - parseDataP->ncar.regMetadataP->name = value; - return "OK"; -} - - - -/* **************************************************************************** -* -* registrationMetadataType - -*/ -static std::string registrationMetadataType(const std::string& path, const std::string& value, ParseData* parseDataP) -{ - LM_T(LmtParse, ("Got a registrationMetadataType: '%s'", value.c_str())); - parseDataP->ncar.regMetadataP->type = value; - return "OK"; -} - - - -/* **************************************************************************** -* -* registrationMetadataValue - -*/ -static std::string registrationMetadataValue(const std::string& path, const std::string& value, ParseData* parseDataP) -{ - LM_T(LmtParse, ("Got a registrationMetadataValue: '%s'", value.c_str())); - parseDataP->ncar.regMetadataP->stringValue = value; - parseDataP->ncar.regMetadataP->valueType = orion::ValueTypeString; - return "OK"; -} - - - /* **************************************************************************** * * providingApplication - @@ -329,19 +204,6 @@ JsonNode jsonNcarParseVector[] = { CRR "/contextRegistration/attributes/attribute", attribute }, { CRR "/contextRegistration/attributes/attribute/name", attributeName }, { CRR "/contextRegistration/attributes/attribute/type", attributeType }, - { CRR "/contextRegistration/attributes/attribute/isDomain", attributeIsDomain }, - - { CRR "/contextRegistration/attributes/attribute/metadatas", jsonNullTreat }, - { CRR "/contextRegistration/attributes/attribute/metadatas/metadata", attributeMetadata }, - { CRR "/contextRegistration/attributes/attribute/metadatas/metadata/name", attributeMetadataName }, - { CRR "/contextRegistration/attributes/attribute/metadatas/metadata/type", attributeMetadataType }, - { CRR "/contextRegistration/attributes/attribute/metadatas/metadata/value", attributeMetadataValue }, - - { CRR "/contextRegistration/metadatas", jsonNullTreat }, - { CRR "/contextRegistration/metadatas/metadata", registrationMetadata }, - { CRR "/contextRegistration/metadatas/metadata/name", registrationMetadataName }, - { CRR "/contextRegistration/metadatas/metadata/type", registrationMetadataType }, - { CRR "/contextRegistration/metadatas/metadata/value", registrationMetadataValue }, { CRR "/contextRegistration/providingApplication", providingApplication }, diff --git a/src/lib/jsonParse/jsonRegisterContextRequest.cpp b/src/lib/jsonParse/jsonRegisterContextRequest.cpp index a824f0579a..98795165bb 100755 --- a/src/lib/jsonParse/jsonRegisterContextRequest.cpp +++ b/src/lib/jsonParse/jsonRegisterContextRequest.cpp @@ -175,143 +175,6 @@ static std::string craType(const std::string& path, const std::string& value, Pa -/* **************************************************************************** -* -* craIsDomain - -*/ -static std::string craIsDomain(const std::string& path, const std::string& value, ParseData* reqDataP) -{ - if (!isTrue(value) && !isFalse(value)) - { - return "invalid isDomain value for context registration attribute: /" + value + "/"; - } - - reqDataP->rcr.attributeP->isDomain = value; - LM_T(LmtParse, ("Set 'isDomain' to '%s' for a contextRegistrationAttribute", - reqDataP->rcr.attributeP->isDomain.c_str())); - - return "OK"; -} - - - -/* **************************************************************************** -* -* craMetadata - -*/ -static std::string craMetadata(const std::string& path, const std::string& value, ParseData* reqDataP) -{ - LM_T(LmtParse, ("Creating a metadata")); - - reqDataP->rcr.attributeMetadataP = new Metadata(); - reqDataP->rcr.attributeP->metadataVector.push_back(reqDataP->rcr.attributeMetadataP); - - return "OK"; -} - - - -/* **************************************************************************** -* -* craMetadataName - -*/ -static std::string craMetadataName(const std::string& path, const std::string& value, ParseData* reqDataP) -{ - LM_T(LmtParse, ("Got a metadata name: '%s'", value.c_str())); - reqDataP->rcr.attributeMetadataP->name = value; - - return "OK"; -} - - - -/* **************************************************************************** -* -* craMetadataType - -*/ -static std::string craMetadataType(const std::string& path, const std::string& value, ParseData* reqDataP) -{ - LM_T(LmtParse, ("Got a metadata type: '%s'", value.c_str())); - reqDataP->rcr.attributeMetadataP->type = value; - - return "OK"; -} - - - -/* **************************************************************************** -* -* craMetadataValue - -*/ -static std::string craMetadataValue(const std::string& path, const std::string& value, ParseData* reqDataP) -{ - LM_T(LmtParse, ("Got a metadata value: '%s'", value.c_str())); - reqDataP->rcr.attributeMetadataP->stringValue = value; - reqDataP->rcr.attributeMetadataP->valueType = orion::ValueTypeString; - - return "OK"; -} - - - -/* **************************************************************************** -* -* regMetadata - -*/ -static std::string regMetadata(const std::string& path, const std::string& value, ParseData* reqDataP) -{ - LM_T(LmtParse, ("Creating a reg metadata")); - - reqDataP->rcr.registrationMetadataP = new Metadata(); - reqDataP->rcr.crP->registrationMetadataVector.push_back(reqDataP->rcr.registrationMetadataP); - - return "OK"; -} - - - -/* **************************************************************************** -* -* regMetadataName - -*/ -static std::string regMetadataName(const std::string& path, const std::string& value, ParseData* reqDataP) -{ - LM_T(LmtParse, ("Got a reg metadata name: '%s'", value.c_str())); - reqDataP->rcr.registrationMetadataP->name = value; - - return "OK"; -} - - - -/* **************************************************************************** -* -* regMetadataType - -*/ -static std::string regMetadataType(const std::string& path, const std::string& value, ParseData* reqDataP) -{ - LM_T(LmtParse, ("Got a reg metadata type: '%s'", value.c_str())); - reqDataP->rcr.registrationMetadataP->type = value; - - return "OK"; -} - - - -/* **************************************************************************** -* -* regMetadataValue - -*/ -static std::string regMetadataValue(const std::string& path, const std::string& value, ParseData* reqDataP) -{ - LM_T(LmtParse, ("Got a reg metadata value: '%s'", value.c_str())); - reqDataP->rcr.registrationMetadataP->stringValue = value; - reqDataP->rcr.registrationMetadataP->valueType = orion::ValueTypeString; - return "OK"; -} - - - /* **************************************************************************** * * providingApplication - @@ -373,19 +236,6 @@ JsonNode jsonRcrParseVector[] = { CR "/contextRegistration/attributes/attribute", crAttribute }, { CR "/contextRegistration/attributes/attribute/name", craName }, { CR "/contextRegistration/attributes/attribute/type", craType }, - { CR "/contextRegistration/attributes/attribute/isDomain", craIsDomain }, - - { CR "/contextRegistration/attributes/attribute/metadatas", jsonNullTreat }, - { CR "/contextRegistration/attributes/attribute/metadatas/metadata", craMetadata }, - { CR "/contextRegistration/attributes/attribute/metadatas/metadata/name", craMetadataName }, - { CR "/contextRegistration/attributes/attribute/metadatas/metadata/type", craMetadataType }, - { CR "/contextRegistration/attributes/attribute/metadatas/metadata/value", craMetadataValue }, - - { CR "/contextRegistration/metadatas", jsonNullTreat }, - { CR "/contextRegistration/metadatas/metadata", regMetadata }, - { CR "/contextRegistration/metadatas/metadata/name", regMetadataName }, - { CR "/contextRegistration/metadatas/metadata/type", regMetadataType }, - { CR "/contextRegistration/metadatas/metadata/value", regMetadataValue }, { CR "/contextRegistration/providingApplication", providingApplication }, { "/duration", duration }, diff --git a/src/lib/jsonParse/jsonRegisterProviderRequest.cpp b/src/lib/jsonParse/jsonRegisterProviderRequest.cpp index e138a8cb3d..dfbb39ada8 100644 --- a/src/lib/jsonParse/jsonRegisterProviderRequest.cpp +++ b/src/lib/jsonParse/jsonRegisterProviderRequest.cpp @@ -40,62 +40,6 @@ -/* **************************************************************************** -* -* contextMetadata - -*/ -static std::string contextMetadata(const std::string& path, const std::string& value, ParseData* reqData) -{ - LM_T(LmtParse, ("Got a metadata")); - reqData->rpr.metadataP = new Metadata(); - reqData->rpr.res.metadataVector.push_back(reqData->rpr.metadataP); - return "OK"; -} - - - - -/* **************************************************************************** -* -* contextMetadataName - -*/ -static std::string contextMetadataName(const std::string& path, const std::string& value, ParseData* reqData) -{ - LM_T(LmtParse, ("Got a metadata name '%s'", value.c_str())); - reqData->rpr.metadataP->name = value; - return "OK"; -} - - - -/* **************************************************************************** -* -* contextMetadataType - -*/ -static std::string contextMetadataType(const std::string& path, const std::string& value, ParseData* reqData) -{ - LM_T(LmtParse, ("Got a metadata type '%s'", value.c_str())); - reqData->rpr.metadataP->type = value; - return "OK"; -} - - - - -/* **************************************************************************** -* -* contextMetadataValue - -*/ -static std::string contextMetadataValue(const std::string& path, const std::string& value, ParseData* reqData) -{ - LM_T(LmtParse, ("Got a metadata value '%s'", value.c_str())); - reqData->rpr.metadataP->stringValue = value; - reqData->rpr.metadataP->valueType = orion::ValueTypeString; - return "OK"; -} - - - /* **************************************************************************** * * duration - @@ -140,12 +84,6 @@ static std::string registrationId(const std::string& path, const std::string& va */ JsonNode jsonRprParseVector[] = { - { "/metadatas", jsonNullTreat }, - { "/metadatas/metadata", contextMetadata }, - { "/metadatas/metadata/name", contextMetadataName }, - { "/metadatas/metadata/type", contextMetadataType }, - { "/metadatas/metadata/value", contextMetadataValue }, - { "/duration", duration }, { "/providingApplication", providingApplication }, { "/registrationId", registrationId }, @@ -176,7 +114,6 @@ void jsonRprInit(ParseData* reqData) */ void jsonRprRelease(ParseData* reqData) { - reqData->rpr.res.release(); } diff --git a/src/lib/mongoBackend/MongoCommonRegister.cpp b/src/lib/mongoBackend/MongoCommonRegister.cpp index 3d8827488a..b14bf9ffc8 100644 --- a/src/lib/mongoBackend/MongoCommonRegister.cpp +++ b/src/lib/mongoBackend/MongoCommonRegister.cpp @@ -394,17 +394,10 @@ HttpStatusCode processRegisterContext { ContextRegistrationAttribute* cra = cr->contextRegistrationAttributeVector[jx]; - attrs.append(BSON(REG_ATTRS_NAME << cra->name << REG_ATTRS_TYPE << cra->type << "isDomain" << cra->isDomain)); - LM_T(LmtMongo, ("Attribute registration: {name: %s, type: %s, isDomain: %s}", + attrs.append(BSON(REG_ATTRS_NAME << cra->name << REG_ATTRS_TYPE << cra->type)); + LM_T(LmtMongo, ("Attribute registration: {name: %s, type: %s}", cra->name.c_str(), - cra->type.c_str(), - cra->isDomain.c_str())); - - unsigned int size = requestP->contextRegistrationVector[ix]->contextRegistrationAttributeVector[jx]->metadataVector.size(); - for (unsigned int kx = 0; kx < size; ++kx) - { - // FIXME: metadata not supported at the moment - } + cra->type.c_str())); } contextRegistration.append( diff --git a/src/lib/mongoBackend/MongoGlobal.cpp b/src/lib/mongoBackend/MongoGlobal.cpp index 7a61c32ed4..361b3f362c 100644 --- a/src/lib/mongoBackend/MongoGlobal.cpp +++ b/src/lib/mongoBackend/MongoGlobal.cpp @@ -786,20 +786,20 @@ bool includedEntity(EntityId en, const EntityIdVector& entityIdV) * * includedAttribute - */ -bool includedAttribute(const ContextRegistrationAttribute& attr, const StringList& attrsV) +bool includedAttribute(const std::string& attrName, const StringList& attrsV) { // - // This is the case in which the discoverAvailabilityRequest doesn't include attributes, + // attrsV.size() == 0 is the case in which the query request doesn't include attributes, // so all the attributes are included in the response // - if (attrsV.size() == 0) + if ((attrsV.size() == 0) || attrsV.lookup(ALL_ATTRS)) { return true; } for (unsigned int ix = 0; ix < attrsV.size(); ++ix) { - if (attrsV[ix] == attr.name) + if (attrsV[ix] == attrName) { return true; } @@ -1909,15 +1909,11 @@ static void processAttribute(ContextRegistrationResponse* crr, const StringList& { ContextRegistrationAttribute attr( getStringFieldF(attribute, REG_ATTRS_NAME), - getStringFieldF(attribute, REG_ATTRS_TYPE), - getStringFieldF(attribute, REG_ATTRS_ISDOMAIN)); + getStringFieldF(attribute, REG_ATTRS_TYPE)); - // FIXME: we don't take metadata into account at the moment - // attr.metadataV = .. - - if (includedAttribute(attr, attrL)) + if (includedAttribute(attr.name, attrL)) { - ContextRegistrationAttribute* attrP = new ContextRegistrationAttribute(attr.name, attr.type, attr.isDomain); + ContextRegistrationAttribute* attrP = new ContextRegistrationAttribute(attr.name, attr.type); crr->contextRegistration.contextRegistrationAttributeVector.push_back(attrP); } } diff --git a/src/lib/mongoBackend/MongoGlobal.h b/src/lib/mongoBackend/MongoGlobal.h index 8c5fa45db4..80333b57ef 100644 --- a/src/lib/mongoBackend/MongoGlobal.h +++ b/src/lib/mongoBackend/MongoGlobal.h @@ -309,7 +309,7 @@ extern bool includedEntity(EntityId en, const EntityIdVector& entityIdV); * * includedAttribute - */ -extern bool includedAttribute(const ContextRegistrationAttribute& attr, const StringList& attrsV); +extern bool includedAttribute(const std::string& attrName, const StringList& attrsV); diff --git a/src/lib/mongoBackend/dbConstants.h b/src/lib/mongoBackend/dbConstants.h index 57a7ecbfc6..8932cf470c 100644 --- a/src/lib/mongoBackend/dbConstants.h +++ b/src/lib/mongoBackend/dbConstants.h @@ -55,7 +55,6 @@ #define REG_ENTITY_ISTYPEPATTERN "isTypePattern" #define REG_ATTRS_NAME "name" #define REG_ATTRS_TYPE "type" -#define REG_ATTRS_ISDOMAIN "isDomain" #define REG_SERVICE_PATH "servicePath" #define REG_FORMAT "format" #define REG_DESCRIPTION "description" diff --git a/src/lib/mongoBackend/mongoRegistrationCreate.cpp b/src/lib/mongoBackend/mongoRegistrationCreate.cpp index b8c92b8405..4a507c13af 100644 --- a/src/lib/mongoBackend/mongoRegistrationCreate.cpp +++ b/src/lib/mongoBackend/mongoRegistrationCreate.cpp @@ -128,7 +128,7 @@ static void setContextRegistrationVector(ngsiv2::Registration* regP, mongo::BSON for (unsigned int aIx = 0; aIx < regP->dataProvided.attributes.size(); ++aIx) { - attrs.append(BSON(REG_ATTRS_NAME << regP->dataProvided.attributes[aIx] << REG_ATTRS_TYPE << "" << REG_ATTRS_ISDOMAIN << "false")); + attrs.append(BSON(REG_ATTRS_NAME << regP->dataProvided.attributes[aIx] << REG_ATTRS_TYPE << "")); } contextRegistration.append( diff --git a/src/lib/ngsi/ContextElementResponse.cpp b/src/lib/ngsi/ContextElementResponse.cpp index 57e3297fbf..24599fe0ef 100644 --- a/src/lib/ngsi/ContextElementResponse.cpp +++ b/src/lib/ngsi/ContextElementResponse.cpp @@ -38,6 +38,7 @@ #include "mongoBackend/safeMongo.h" #include "mongoBackend/dbFieldEncoding.h" #include "mongoBackend/compoundResponses.h" +#include "mongoBackend/MongoGlobal.h" // includedAttribute using namespace mongo; @@ -85,43 +86,6 @@ ContextElementResponse::ContextElementResponse(ContextElementResponse* cerP) -/* **************************************************************************** -* -* includedAttribute - -* -* FIXME: note that in the current implementation, in which we only use 'name' to -* compare, this function is equal to the one for ContextRegistrationAttrribute. -* However, we keep them separated, as isDomain (present in ContextRegistrationAttribute -* but not in ContextRegistration could mean a difference). To review once domain attributes -* get implemented. -* -* FIXME #1298: domain is not going to be implemented. Unify functions -* -*/ -static bool includedAttribute(const ContextAttribute& attr, const StringList& attrsV) -{ - // - // This is the case in which the queryContextRequest doesn't include attributes, - // so all the attributes are included in the response - // - if (attrsV.size() == 0 || attrsV.lookup(ALL_ATTRS)) - { - return true; - } - - for (unsigned int ix = 0; ix < attrsV.size(); ++ix) - { - if (attrsV[ix] == attr.name) - { - return true; - } - } - - return false; -} - - - /* **************************************************************************** * * ContextElementResponse::ContextElementResponse - @@ -179,7 +143,7 @@ ContextElementResponse::ContextElementResponse ca.type = getStringFieldF(attr, ENT_ATTRS_TYPE); // Skip attribute if the attribute is in the list (or attrL is empty or includes "*") - if (!includedAttribute(ca, attrL)) + if (!includedAttribute(ca.name, attrL)) { continue; } diff --git a/src/lib/ngsi/ContextRegistration.cpp b/src/lib/ngsi/ContextRegistration.cpp index 837fc01c90..84e78da504 100644 --- a/src/lib/ngsi/ContextRegistration.cpp +++ b/src/lib/ngsi/ContextRegistration.cpp @@ -65,7 +65,6 @@ std::string ContextRegistration::render(bool comma, bool isInVector) out += startTag(!isInVector? "contextRegistration" : ""); out += entityIdVector.render(true); out += contextRegistrationAttributeVector.render(true); - //out += registrationMetadataVector.render(true); // FIXME #1298: remove registration metadata stuff out += providingApplication.render(false); out += endTag(comma); @@ -98,11 +97,6 @@ std::string ContextRegistration::check return res; } - if ((res = registrationMetadataVector.check(apiVersion)) != "OK") - { - return res; - } - if ((res = providingApplication.check()) != "OK") { return res; @@ -126,6 +120,5 @@ void ContextRegistration::release(void) { entityIdVector.release(); contextRegistrationAttributeVector.release(); - registrationMetadataVector.release(); providingApplication.release(); } diff --git a/src/lib/ngsi/ContextRegistration.h b/src/lib/ngsi/ContextRegistration.h index a70e6b5a84..1782ac509d 100644 --- a/src/lib/ngsi/ContextRegistration.h +++ b/src/lib/ngsi/ContextRegistration.h @@ -43,7 +43,6 @@ typedef struct ContextRegistration { EntityIdVector entityIdVector; // Optional ContextRegistrationAttributeVector contextRegistrationAttributeVector; // Optional - MetadataVector registrationMetadataVector; // Optional ProvidingApplication providingApplication; // Mandatory bool entityIdVectorPresent; // entityIdList present during parsing diff --git a/src/lib/ngsi/ContextRegistrationAttribute.cpp b/src/lib/ngsi/ContextRegistrationAttribute.cpp index d9d64f6776..003f53fe88 100644 --- a/src/lib/ngsi/ContextRegistrationAttribute.cpp +++ b/src/lib/ngsi/ContextRegistrationAttribute.cpp @@ -42,7 +42,6 @@ ContextRegistrationAttribute::ContextRegistrationAttribute() { name = ""; type = ""; - isDomain = ""; } @@ -54,13 +53,11 @@ ContextRegistrationAttribute::ContextRegistrationAttribute() ContextRegistrationAttribute::ContextRegistrationAttribute ( const std::string& _name, - const std::string& _type, - const std::string& _isDomain + const std::string& _type ) { name = _name; - type = _type; - isDomain = _isDomain; + type = _type; } /* **************************************************************************** @@ -71,18 +68,9 @@ std::string ContextRegistrationAttribute::render(bool comma) { std::string out = ""; - // - // About JSON commas: - // The field isDomain is mandatory, so all field before that will - // have the comma set to true for the render methods. - // The only doubt here is whether isDomain should have the comma or not, - // that depends on whether the metadataVector is empty or not. - // out += startTag(); - out += valueTag("name", name, true); - out += valueTag("type", type, true); - out += valueTag("isDomain", isDomain, false /*metadataVector.size() != 0*/); // FIXME #1298 remove isDomain stuff - //out += metadataVector.render(false); // FIXME #1298 remove registration metadata stuff + out += valueTag("name", name, true); + out += valueTag("type", type, false); out += endTag(comma); return out; @@ -102,32 +90,6 @@ std::string ContextRegistrationAttribute::check(ApiVersion apiVersion) return "missing name for registration attribute"; } - if (isDomain == "") - { - return "missing isDomain value for registration attribute"; - } - - if (!isTrue(isDomain) && !isFalse(isDomain)) - { - return std::string("invalid isDomain value for registration attribute: /") + isDomain + "/"; - } - - std::string res; - if ((res = metadataVector.check(apiVersion)) != "OK") - { - return res; - } - return "OK"; } - - -/* **************************************************************************** -* -* ContextRegistrationAttribute::release - -*/ -void ContextRegistrationAttribute::release(void) -{ - metadataVector.release(); -} diff --git a/src/lib/ngsi/ContextRegistrationAttribute.h b/src/lib/ngsi/ContextRegistrationAttribute.h index 65636c00c8..fba30f4e26 100644 --- a/src/lib/ngsi/ContextRegistrationAttribute.h +++ b/src/lib/ngsi/ContextRegistrationAttribute.h @@ -43,13 +43,10 @@ typedef struct ContextRegistrationAttribute { std::string name; // Mandatory std::string type; // Optional - std::string isDomain; // Mandatory - MetadataVector metadataVector; // Optional ContextRegistrationAttribute(); - ContextRegistrationAttribute(const std::string& _name, const std::string& _type, const std::string& _isDomain = ""); + ContextRegistrationAttribute(const std::string& _name, const std::string& _type); std::string render(bool comma); - void release(void); std::string check(ApiVersion apiVersion); } ContextRegistrationAttribute; diff --git a/src/lib/ngsi/ContextRegistrationAttributeVector.cpp b/src/lib/ngsi/ContextRegistrationAttributeVector.cpp index 14d942dac8..90d96642f5 100644 --- a/src/lib/ngsi/ContextRegistrationAttributeVector.cpp +++ b/src/lib/ngsi/ContextRegistrationAttributeVector.cpp @@ -126,7 +126,6 @@ void ContextRegistrationAttributeVector::release(void) { for (unsigned int ix = 0; ix < vec.size(); ++ix) { - vec[ix]->release(); delete(vec[ix]); } diff --git a/src/lib/ngsi9/RegisterContextRequest.cpp b/src/lib/ngsi9/RegisterContextRequest.cpp index 9bba720f79..88d348e4bb 100644 --- a/src/lib/ngsi9/RegisterContextRequest.cpp +++ b/src/lib/ngsi9/RegisterContextRequest.cpp @@ -125,7 +125,6 @@ void RegisterContextRequest::fill(RegisterProviderRequest& rpr, const std::strin duration = rpr.duration; registrationId = rpr.registrationId; - crP->registrationMetadataVector.fill((MetadataVector*) &rpr.metadataVector); crP->providingApplication = rpr.providingApplication; crP->entityIdVector.push_back(entityIdP); @@ -133,7 +132,7 @@ void RegisterContextRequest::fill(RegisterProviderRequest& rpr, const std::strin if (attributeName != "") { - ContextRegistrationAttribute* attributeP = new ContextRegistrationAttribute(attributeName, "", "false"); + ContextRegistrationAttribute* attributeP = new ContextRegistrationAttribute(attributeName, ""); crP->contextRegistrationAttributeVector.push_back(attributeP); } From 063ff011dde32cd702c578c989f98027b38a2db5 Mon Sep 17 00:00:00 2001 From: Fermin Galan Marquez Date: Mon, 1 Oct 2018 13:13:02 +0200 Subject: [PATCH 2/6] RENAME render() -> toJsonV1() --- doc/manuals/devel/sourceCode.md | 4 +-- src/lib/apiTypesV2/Attribute.cpp | 4 +-- src/lib/apiTypesV2/Attribute.h | 2 +- src/lib/apiTypesV2/Entities.cpp | 6 ++--- src/lib/apiTypesV2/Entities.h | 2 +- src/lib/apiTypesV2/Entity.cpp | 4 +-- src/lib/apiTypesV2/EntityVector.cpp | 4 +-- src/lib/apiTypesV2/EntityVector.h | 8 +++--- .../AppendContextElementRequest.cpp | 10 +++---- .../convenience/AppendContextElementRequest.h | 2 +- .../AppendContextElementResponse.cpp | 12 ++++----- .../AppendContextElementResponse.h | 3 +-- .../convenience/ContextAttributeResponse.cpp | 10 +++---- .../convenience/ContextAttributeResponse.h | 3 +-- .../ContextAttributeResponseVector.cpp | 6 ++--- .../ContextAttributeResponseVector.h | 3 +-- .../UpdateContextAttributeRequest.cpp | 8 +++--- .../UpdateContextAttributeRequest.h | 2 +- .../UpdateContextElementRequest.cpp | 8 +++--- .../convenience/UpdateContextElementRequest.h | 2 +- .../UpdateContextElementResponse.cpp | 10 +++---- .../UpdateContextElementResponse.h | 3 +-- src/lib/jsonParseV2/jsonRequestTreat.cpp | 2 +- src/lib/ngsi/AttributeExpression.cpp | 4 +-- src/lib/ngsi/AttributeExpression.h | 2 +- src/lib/ngsi/ConditionValueList.cpp | 4 +-- src/lib/ngsi/ConditionValueList.h | 2 +- src/lib/ngsi/ContextAttribute.cpp | 26 +++++++++---------- src/lib/ngsi/ContextAttribute.h | 19 +++++++++----- src/lib/ngsi/ContextAttributeVector.cpp | 14 +++++----- src/lib/ngsi/ContextAttributeVector.h | 14 +++++----- src/lib/ngsi/ContextElementResponse.cpp | 6 ++--- src/lib/ngsi/ContextElementResponse.h | 16 +++++++----- src/lib/ngsi/ContextElementResponseVector.cpp | 6 ++--- src/lib/ngsi/ContextElementResponseVector.h | 14 +++++----- src/lib/ngsi/ContextElementVector.cpp | 10 +++---- src/lib/ngsi/ContextElementVector.h | 2 +- src/lib/ngsi/ContextRegistration.cpp | 10 +++---- src/lib/ngsi/ContextRegistration.h | 2 +- src/lib/ngsi/ContextRegistrationAttribute.cpp | 4 +-- src/lib/ngsi/ContextRegistrationAttribute.h | 2 +- .../ContextRegistrationAttributeVector.cpp | 6 ++--- .../ngsi/ContextRegistrationAttributeVector.h | 2 +- src/lib/ngsi/ContextRegistrationResponse.cpp | 8 +++--- src/lib/ngsi/ContextRegistrationResponse.h | 2 +- .../ContextRegistrationResponseVector.cpp | 6 ++--- .../ngsi/ContextRegistrationResponseVector.h | 2 +- src/lib/ngsi/ContextRegistrationVector.cpp | 6 ++--- src/lib/ngsi/ContextRegistrationVector.h | 2 +- src/lib/ngsi/Duration.cpp | 4 +-- src/lib/ngsi/Duration.h | 2 +- src/lib/ngsi/EntityId.cpp | 4 +-- src/lib/ngsi/EntityId.h | 2 +- src/lib/ngsi/EntityIdVector.cpp | 6 ++--- src/lib/ngsi/EntityIdVector.h | 2 +- src/lib/ngsi/Metadata.cpp | 4 +-- src/lib/ngsi/Metadata.h | 2 +- src/lib/ngsi/MetadataVector.cpp | 6 ++--- src/lib/ngsi/MetadataVector.h | 2 +- src/lib/ngsi/NotifyCondition.cpp | 8 +++--- src/lib/ngsi/NotifyCondition.h | 2 +- src/lib/ngsi/NotifyConditionVector.cpp | 6 ++--- src/lib/ngsi/NotifyConditionVector.h | 2 +- src/lib/ngsi/Originator.cpp | 4 +-- src/lib/ngsi/Originator.h | 2 +- src/lib/ngsi/ProvidingApplication.cpp | 4 +-- src/lib/ngsi/ProvidingApplication.h | 2 +- src/lib/ngsi/Reference.cpp | 4 +-- src/lib/ngsi/Reference.h | 2 +- src/lib/ngsi/RegistrationId.cpp | 4 +-- src/lib/ngsi/RegistrationId.h | 2 +- src/lib/ngsi/Restriction.cpp | 8 +++--- src/lib/ngsi/Restriction.h | 2 +- src/lib/ngsi/RestrictionString.cpp | 4 +-- src/lib/ngsi/RestrictionString.h | 2 +- src/lib/ngsi/Scope.cpp | 4 +-- src/lib/ngsi/Scope.h | 2 +- src/lib/ngsi/ScopeVector.cpp | 6 ++--- src/lib/ngsi/ScopeVector.h | 2 +- src/lib/ngsi/StatusCode.cpp | 2 +- src/lib/ngsi/StatusCode.h | 2 +- src/lib/ngsi/StringList.cpp | 4 +-- src/lib/ngsi/StringList.h | 2 +- src/lib/ngsi/SubscribeError.cpp | 10 +++---- src/lib/ngsi/SubscribeError.h | 2 +- src/lib/ngsi/SubscribeResponse.cpp | 10 +++---- src/lib/ngsi/SubscribeResponse.h | 2 +- src/lib/ngsi/SubscriptionId.cpp | 4 +-- src/lib/ngsi/SubscriptionId.h | 2 +- src/lib/ngsi/Throttling.cpp | 4 +-- src/lib/ngsi/Throttling.h | 2 +- src/lib/ngsi10/NotifyContextRequest.cpp | 12 ++++----- src/lib/ngsi10/NotifyContextRequest.h | 8 +++--- src/lib/ngsi10/NotifyContextResponse.cpp | 4 +-- src/lib/ngsi10/NotifyContextResponse.h | 2 +- src/lib/ngsi10/QueryContextRequest.cpp | 12 ++++----- src/lib/ngsi10/QueryContextRequest.h | 2 +- src/lib/ngsi10/QueryContextResponse.cpp | 12 ++++----- src/lib/ngsi10/QueryContextResponse.h | 2 +- src/lib/ngsi10/SubscribeContextRequest.cpp | 2 +- src/lib/ngsi10/SubscribeContextResponse.cpp | 12 +++++---- src/lib/ngsi10/SubscribeContextResponse.h | 2 +- src/lib/ngsi10/UnsubscribeContextRequest.cpp | 8 +++--- src/lib/ngsi10/UnsubscribeContextRequest.h | 2 +- src/lib/ngsi10/UnsubscribeContextResponse.cpp | 8 +++--- src/lib/ngsi10/UnsubscribeContextResponse.h | 2 +- src/lib/ngsi10/UpdateContextRequest.cpp | 10 +++---- src/lib/ngsi10/UpdateContextRequest.h | 2 +- src/lib/ngsi10/UpdateContextResponse.cpp | 12 ++++----- src/lib/ngsi10/UpdateContextResponse.h | 2 +- .../UpdateContextSubscriptionRequest.cpp | 2 +- .../UpdateContextSubscriptionResponse.cpp | 8 +++--- .../UpdateContextSubscriptionResponse.h | 2 +- .../DiscoverContextAvailabilityRequest.cpp | 2 +- .../DiscoverContextAvailabilityResponse.cpp | 10 +++---- .../DiscoverContextAvailabilityResponse.h | 2 +- .../NotifyContextAvailabilityRequest.cpp | 10 +++---- .../ngsi9/NotifyContextAvailabilityRequest.h | 2 +- .../NotifyContextAvailabilityResponse.cpp | 6 ++--- .../ngsi9/NotifyContextAvailabilityResponse.h | 2 +- src/lib/ngsi9/RegisterContextRequest.cpp | 12 ++++----- src/lib/ngsi9/RegisterContextRequest.h | 2 +- src/lib/ngsi9/RegisterContextResponse.cpp | 14 +++++----- src/lib/ngsi9/RegisterContextResponse.h | 4 +-- .../SubscribeContextAvailabilityRequest.cpp | 16 ++++++------ .../SubscribeContextAvailabilityRequest.h | 2 +- .../SubscribeContextAvailabilityResponse.cpp | 10 ++++--- .../SubscribeContextAvailabilityResponse.h | 2 +- .../UnsubscribeContextAvailabilityRequest.cpp | 2 +- ...UnsubscribeContextAvailabilityResponse.cpp | 8 +++--- .../UnsubscribeContextAvailabilityResponse.h | 2 +- ...ContextAvailabilitySubscriptionRequest.cpp | 16 ++++++------ ...teContextAvailabilitySubscriptionRequest.h | 2 +- ...ontextAvailabilitySubscriptionResponse.cpp | 14 +++++----- ...eContextAvailabilitySubscriptionResponse.h | 2 +- src/lib/ngsiNotify/Notifier.cpp | 6 ++--- src/lib/orionTypes/EntityType.cpp | 8 +++--- src/lib/orionTypes/EntityType.h | 10 +++---- src/lib/orionTypes/EntityTypeResponse.cpp | 16 ++++++------ src/lib/orionTypes/EntityTypeResponse.h | 6 ++--- src/lib/orionTypes/EntityTypeVector.cpp | 6 ++--- src/lib/orionTypes/EntityTypeVector.h | 8 +++--- .../orionTypes/EntityTypeVectorResponse.cpp | 10 +++---- src/lib/orionTypes/EntityTypeVectorResponse.h | 7 ++--- .../orionTypes/QueryContextResponseVector.cpp | 6 ++--- .../orionTypes/QueryContextResponseVector.h | 2 +- src/lib/rest/OrionError.cpp | 6 ++--- src/lib/rest/OrionError.h | 2 +- src/lib/rest/RestService.cpp | 2 +- src/lib/rest/rest.cpp | 2 +- src/lib/rest/restReply.cpp | 24 ++++++++--------- .../deleteAllEntitiesWithTypeAndId.cpp | 6 ++--- .../deleteAttributeValueInstance.cpp | 2 +- ...eteAttributeValueInstanceWithTypeAndId.cpp | 4 +-- .../deleteIndividualContextEntity.cpp | 2 +- ...deleteIndividualContextEntityAttribute.cpp | 2 +- ...ualContextEntityAttributeWithTypeAndId.cpp | 6 ++--- src/lib/serviceRoutines/exitTreat.cpp | 6 ++--- .../getAllEntitiesWithTypeAndId.cpp | 2 +- .../getAttributeValueInstance.cpp | 2 +- ...getAttributeValueInstanceWithTypeAndId.cpp | 2 +- .../getAttributesForEntityType.cpp | 6 ++--- .../getContextEntitiesByEntityIdAndType.cpp | 4 +-- ...EntityByIdAttributeByNameWithTypeAndId.cpp | 4 +-- src/lib/serviceRoutines/getEntityTypes.cpp | 6 ++--- .../getIndividualContextEntity.cpp | 2 +- .../getIndividualContextEntityAttribute.cpp | 2 +- ...ualContextEntityAttributeWithTypeAndId.cpp | 2 +- .../getNgsi10ContextEntityTypes.cpp | 6 ++--- .../getNgsi10ContextEntityTypesAttribute.cpp | 6 ++--- src/lib/serviceRoutines/leakTreat.cpp | 8 +++--- src/lib/serviceRoutines/logTraceTreat.cpp | 2 +- .../postAllEntitiesWithTypeAndId.cpp | 8 +++--- ...ostAttributeValueInstanceWithTypeAndId.cpp | 6 ++--- .../postContextEntitiesByEntityId.cpp | 1 - .../postContextEntitiesByEntityIdAndType.cpp | 9 ++----- .../postContextEntityAttributes.cpp | 1 - .../postContextEntityTypeAttribute.cpp | 1 - .../postContextEntityTypes.cpp | 1 - .../postDiscoverContextAvailability.cpp | 2 +- .../postEntityByIdAttributeByName.cpp | 1 - ...EntityByIdAttributeByNameWithTypeAndId.cpp | 5 ++-- .../postIndividualContextEntity.cpp | 10 +++---- .../postIndividualContextEntityAttribute.cpp | 2 +- ...ualContextEntityAttributeWithTypeAndId.cpp | 2 +- src/lib/serviceRoutines/postNotifyContext.cpp | 2 +- .../postNotifyContextAvailability.cpp | 6 ++--- src/lib/serviceRoutines/postQueryContext.cpp | 8 +++--- .../serviceRoutines/postRegisterContext.cpp | 8 +++--- .../serviceRoutines/postSubscribeContext.cpp | 4 +-- .../postSubscribeContextAvailability.cpp | 2 +- .../postUnsubscribeContext.cpp | 2 +- .../postUnsubscribeContextAvailability.cpp | 2 +- src/lib/serviceRoutines/postUpdateContext.cpp | 14 +++++----- ...tUpdateContextAvailabilitySubscription.cpp | 2 +- .../postUpdateContextSubscription.cpp | 2 +- .../putAllEntitiesWithTypeAndId.cpp | 6 ++--- .../putAttributeValueInstance.cpp | 4 +-- ...putAttributeValueInstanceWithTypeAndId.cpp | 6 ++--- .../putIndividualContextEntity.cpp | 2 +- .../putIndividualContextEntityAttribute.cpp | 2 +- ...ualContextEntityAttributeWithTypeAndId.cpp | 2 +- src/lib/serviceRoutinesV2/getEntities.cpp | 2 +- .../serviceRoutinesV2/getEntityAttribute.cpp | 2 +- .../getEntityAttributeValue.cpp | 2 +- src/lib/serviceRoutinesV2/postBatchQuery.cpp | 2 +- 206 files changed, 532 insertions(+), 533 deletions(-) diff --git a/doc/manuals/devel/sourceCode.md b/doc/manuals/devel/sourceCode.md index 4c33a0075b..ab343dabeb 100644 --- a/doc/manuals/devel/sourceCode.md +++ b/doc/manuals/devel/sourceCode.md @@ -208,8 +208,8 @@ The **ngsi** library contains a collection of classes for the different payloads These classes (as well as the classes in the libraries `ngsi9`, `ngsi10`, `convenience`) all have a standard set of methods: -* `render()`, to render the object to a JSON string (mainly for NGSIv1) * `toJson()`, to render the object to a JSON string (for NGSIv2) +* `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. @@ -222,7 +222,7 @@ The classes follow a hierarchy, e.g. `UpdateContextRequest` (top hierarchy class * `ContextAttributeVector` * `MetadataVector` (this field `MetadataVector domainMetadataVector` is part of NGSIv1 but Orion doesn't make use of it) -The methods `render()`, `check()`, `release()`, etc. are called in a tree-like fashion, starting from the top hierarchy class, e.g. `UpdateContextRequest`: +The methods `toJson()`, `check()`, `release()`, etc. are called in a tree-like fashion, starting from the top hierarchy class, e.g. `UpdateContextRequest`: * `UpdateContextRequest::check()` calls: * `ContextElementVector::check()` calls (for each item in the vector): diff --git a/src/lib/apiTypesV2/Attribute.cpp b/src/lib/apiTypesV2/Attribute.cpp index f587bde2a6..9eb2cf5145 100644 --- a/src/lib/apiTypesV2/Attribute.cpp +++ b/src/lib/apiTypesV2/Attribute.cpp @@ -38,9 +38,9 @@ /* **************************************************************************** * -* Attribute::render - +* Attribute::toJson - */ -std::string Attribute::render +std::string Attribute::toJson ( bool acceptedTextPlain, // in parameter (pass-through) bool acceptedJson, // in parameter (pass-through) diff --git a/src/lib/apiTypesV2/Attribute.h b/src/lib/apiTypesV2/Attribute.h index 04aec28130..628fde40d2 100644 --- a/src/lib/apiTypesV2/Attribute.h +++ b/src/lib/apiTypesV2/Attribute.h @@ -55,7 +55,7 @@ class Attribute Attribute(): pcontextAttribute(0) {} - std::string render(bool acceptedTextPlain, + std::string toJson(bool acceptedTextPlain, bool acceptedJson, MimeType outFormatSelection, MimeType* outMimeTypeP, diff --git a/src/lib/apiTypesV2/Entities.cpp b/src/lib/apiTypesV2/Entities.cpp index fdf19e967f..af361782ce 100644 --- a/src/lib/apiTypesV2/Entities.cpp +++ b/src/lib/apiTypesV2/Entities.cpp @@ -57,10 +57,10 @@ Entities::~Entities() /* **************************************************************************** * -* Entities::render - +* Entities::toJson - * */ -std::string Entities::render +std::string Entities::toJson ( RenderFormat renderFormat, const std::vector& attrsFilter, @@ -68,7 +68,7 @@ std::string Entities::render const std::vector& metadataFilter ) { - return vec.render(renderFormat, attrsFilter, blacklist, metadataFilter); + return vec.toJson(renderFormat, attrsFilter, blacklist, metadataFilter); } diff --git a/src/lib/apiTypesV2/Entities.h b/src/lib/apiTypesV2/Entities.h index dd3f09058d..d294074b00 100644 --- a/src/lib/apiTypesV2/Entities.h +++ b/src/lib/apiTypesV2/Entities.h @@ -55,7 +55,7 @@ class Entities Entities(); ~Entities(); - std::string render(RenderFormat renderFormat, + std::string toJson(RenderFormat renderFormat, const std::vector& attrsFilter, bool blacklist, const std::vector& metadataFilter); diff --git a/src/lib/apiTypesV2/Entity.cpp b/src/lib/apiTypesV2/Entity.cpp index 0a302b3c43..aff8f1d1c4 100644 --- a/src/lib/apiTypesV2/Entity.cpp +++ b/src/lib/apiTypesV2/Entity.cpp @@ -239,8 +239,8 @@ std::string Entity::toJsonV1 filterAndOrderAttrs(attrsFilter, blacklist, &orderedAttrs); EntityId en(id, type, isPattern); - out += en.render(contextAttributeVectorRendered, false); - out += attributeVector.render(asJsonObject, requestType, orderedAttrs, metadataFilter, false, omitAttributeValues); + out += en.toJsonV1(contextAttributeVectorRendered, false); + out += attributeVector.toJsonV1(asJsonObject, requestType, orderedAttrs, metadataFilter, false, omitAttributeValues); out += endTag(comma, false); diff --git a/src/lib/apiTypesV2/EntityVector.cpp b/src/lib/apiTypesV2/EntityVector.cpp index da8097c41d..1bc2d655a2 100644 --- a/src/lib/apiTypesV2/EntityVector.cpp +++ b/src/lib/apiTypesV2/EntityVector.cpp @@ -42,9 +42,9 @@ /* **************************************************************************** * -* EntityVector::render - +* EntityVector::toJson - */ -std::string EntityVector::render +std::string EntityVector::toJson ( RenderFormat renderFormat, const std::vector& attrsFilter, diff --git a/src/lib/apiTypesV2/EntityVector.h b/src/lib/apiTypesV2/EntityVector.h index 57f7ffc2f2..619cbeca48 100644 --- a/src/lib/apiTypesV2/EntityVector.h +++ b/src/lib/apiTypesV2/EntityVector.h @@ -41,10 +41,10 @@ typedef struct EntityVector { std::vector vec; - std::string render(RenderFormat renderFormat, - const std::vector& attrsFilter, - bool blacklist, - const std::vector& metadataFilter); + std::string toJson(RenderFormat renderFormat, + const std::vector& attrsFilter, + bool blacklist, + const std::vector& metadataFilter); std::string check(RequestType requestType); diff --git a/src/lib/convenience/AppendContextElementRequest.cpp b/src/lib/convenience/AppendContextElementRequest.cpp index 0d6211b738..4b7eb5b075 100644 --- a/src/lib/convenience/AppendContextElementRequest.cpp +++ b/src/lib/convenience/AppendContextElementRequest.cpp @@ -46,9 +46,9 @@ AppendContextElementRequest::AppendContextElementRequest() /* **************************************************************************** * -* render - +* toJsonV1 - */ -std::string AppendContextElementRequest::render +std::string AppendContextElementRequest::toJsonV1 ( bool asJsonObject, RequestType requestType @@ -60,14 +60,14 @@ std::string AppendContextElementRequest::render if (entity.id != "") { - out += entity.render(false); + out += entity.toJsonV1(false); } // No metadata filter in this case, an empty vector is used to fulfil method signature. // For attribute filter, we use the ContextAttributeVector itself std::vector emptyMdV; - out += contextAttributeVector.render(asJsonObject, requestType, contextAttributeVector.vec, emptyMdV); + out += contextAttributeVector.toJsonV1(asJsonObject, requestType, contextAttributeVector.vec, emptyMdV); out += endTag(); return out; @@ -104,7 +104,7 @@ std::string AppendContextElementRequest::check return "OK"; } - return response.render(asJsonObject, requestType); + return response.toJsonV1(asJsonObject, requestType); } diff --git a/src/lib/convenience/AppendContextElementRequest.h b/src/lib/convenience/AppendContextElementRequest.h index fa08972e66..1b497a17ab 100644 --- a/src/lib/convenience/AppendContextElementRequest.h +++ b/src/lib/convenience/AppendContextElementRequest.h @@ -53,7 +53,7 @@ typedef struct AppendContextElementRequest AppendContextElementRequest(); - std::string render(bool asJsonObject, RequestType requestType); + std::string toJsonV1(bool asJsonObject, RequestType requestType); void release(); std::string check(ApiVersion apiVersion, bool asJsonObject, diff --git a/src/lib/convenience/AppendContextElementResponse.cpp b/src/lib/convenience/AppendContextElementResponse.cpp index 4ca7c9e089..f5dee360fd 100644 --- a/src/lib/convenience/AppendContextElementResponse.cpp +++ b/src/lib/convenience/AppendContextElementResponse.cpp @@ -50,9 +50,9 @@ AppendContextElementResponse::AppendContextElementResponse() : errorCode("errorC /* **************************************************************************** * -* AppendContextElementResponse::render - +* AppendContextElementResponse::toJsonV1 - */ -std::string AppendContextElementResponse::render +std::string AppendContextElementResponse::toJsonV1 ( bool asJsonObject, RequestType requestType @@ -64,16 +64,16 @@ std::string AppendContextElementResponse::render if ((errorCode.code != SccNone) && (errorCode.code != SccOk)) { - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } else { if (entity.id != "") { - out += entity.render(true); + out += entity.toJsonV1(true); } - out += contextAttributeResponseVector.render(asJsonObject, requestType); + out += contextAttributeResponseVector.toJsonV1(asJsonObject, requestType); } out += endTag(); @@ -110,7 +110,7 @@ std::string AppendContextElementResponse::check return "OK"; } - return render(asJsonObject, requestType); + return toJsonV1(asJsonObject, requestType); } diff --git a/src/lib/convenience/AppendContextElementResponse.h b/src/lib/convenience/AppendContextElementResponse.h index 1e7e563fa9..7d2310c6bd 100644 --- a/src/lib/convenience/AppendContextElementResponse.h +++ b/src/lib/convenience/AppendContextElementResponse.h @@ -71,8 +71,7 @@ typedef struct AppendContextElementResponse AppendContextElementResponse(); - std::string render(bool asJsonObject, - RequestType requestType); + std::string toJsonV1(bool asJsonObject, RequestType requestType); void release(void); std::string check(ApiVersion apiVersion, bool asJsonObject, diff --git a/src/lib/convenience/ContextAttributeResponse.cpp b/src/lib/convenience/ContextAttributeResponse.cpp index 944142a403..0ee47e4c7c 100644 --- a/src/lib/convenience/ContextAttributeResponse.cpp +++ b/src/lib/convenience/ContextAttributeResponse.cpp @@ -40,9 +40,9 @@ /* **************************************************************************** * -* render - +* toJsonV1 - */ -std::string ContextAttributeResponse::render +std::string ContextAttributeResponse::toJsonV1 ( bool asJsonObject, RequestType request @@ -55,8 +55,8 @@ std::string ContextAttributeResponse::render std::vector emptyMdV; out += startTag(); - out += contextAttributeVector.render(asJsonObject, request, contextAttributeVector.vec, emptyMdV, true); - out += statusCode.render(false); + out += contextAttributeVector.toJsonV1(asJsonObject, request, contextAttributeVector.vec, emptyMdV, true); + out += statusCode.toJsonV1(false); out += endTag(); return out; @@ -102,7 +102,7 @@ std::string ContextAttributeResponse::check return "OK"; } - return render(asJsonObject, requestType); + return toJsonV1(asJsonObject, requestType); } diff --git a/src/lib/convenience/ContextAttributeResponse.h b/src/lib/convenience/ContextAttributeResponse.h index 486abf1ff1..3ac18cb6fd 100644 --- a/src/lib/convenience/ContextAttributeResponse.h +++ b/src/lib/convenience/ContextAttributeResponse.h @@ -51,8 +51,7 @@ typedef struct ContextAttributeResponse ContextAttributeVector contextAttributeVector; // Mandatory StatusCode statusCode; // Mandatory - std::string render(bool asJsonObject, - RequestType request); + std::string toJsonV1(bool asJsonObject, RequestType request); void release(void); std::string check(ApiVersion apiVersion, bool asJsonObject, diff --git a/src/lib/convenience/ContextAttributeResponseVector.cpp b/src/lib/convenience/ContextAttributeResponseVector.cpp index fac561791d..953937effc 100755 --- a/src/lib/convenience/ContextAttributeResponseVector.cpp +++ b/src/lib/convenience/ContextAttributeResponseVector.cpp @@ -36,9 +36,9 @@ /* **************************************************************************** * -* ContextAttributeResponseVector::render - +* ContextAttributeResponseVector::toJsonV1 - */ -std::string ContextAttributeResponseVector::render +std::string ContextAttributeResponseVector::toJsonV1 ( bool asJsonObject, RequestType request @@ -55,7 +55,7 @@ std::string ContextAttributeResponseVector::render out += startTag(key, true); for (unsigned int ix = 0; ix < vec.size(); ++ix) { - out += vec[ix]->render(asJsonObject, request); + out += vec[ix]->toJsonV1(asJsonObject, request); } out += endTag(false, true); diff --git a/src/lib/convenience/ContextAttributeResponseVector.h b/src/lib/convenience/ContextAttributeResponseVector.h index 698b920e67..3f31c85cb9 100644 --- a/src/lib/convenience/ContextAttributeResponseVector.h +++ b/src/lib/convenience/ContextAttributeResponseVector.h @@ -41,8 +41,7 @@ typedef struct ContextAttributeResponseVector { std::vector vec; - std::string render(bool asJsonObject, - RequestType request); + std::string toJsonV1(bool asJsonObject, RequestType request); void push_back(ContextAttributeResponse* item); unsigned int size(void); void release(void); diff --git a/src/lib/convenience/UpdateContextAttributeRequest.cpp b/src/lib/convenience/UpdateContextAttributeRequest.cpp index 94abda83fd..32397558cc 100755 --- a/src/lib/convenience/UpdateContextAttributeRequest.cpp +++ b/src/lib/convenience/UpdateContextAttributeRequest.cpp @@ -51,9 +51,9 @@ UpdateContextAttributeRequest::UpdateContextAttributeRequest() /* **************************************************************************** * -* render - +* toJsonV1 - */ -std::string UpdateContextAttributeRequest::render(void) +std::string UpdateContextAttributeRequest::toJsonV1(void) { std::string out = ""; @@ -69,7 +69,7 @@ std::string UpdateContextAttributeRequest::render(void) out += JSON_STR("value") + ":" + compoundValueP->toJson(true); } - out += metadataVector.render(metadataVector.vec, false); + out += metadataVector.toJsonV1(metadataVector.vec, false); out += endTag(); return out; @@ -103,7 +103,7 @@ std::string UpdateContextAttributeRequest::check return "OK"; } - std::string out = response.render(false); + std::string out = response.toJsonV1(false); out = "{" + out + "}"; diff --git a/src/lib/convenience/UpdateContextAttributeRequest.h b/src/lib/convenience/UpdateContextAttributeRequest.h index f6acd0d122..2534c6e5a9 100644 --- a/src/lib/convenience/UpdateContextAttributeRequest.h +++ b/src/lib/convenience/UpdateContextAttributeRequest.h @@ -49,7 +49,7 @@ typedef struct UpdateContextAttributeRequest orion::CompoundValueNode* compoundValueP; UpdateContextAttributeRequest(); - std::string render(void); + std::string toJsonV1(void); std::string check(ApiVersion apiVersion, const std::string& preError); void release(); } UpdateContextAttributeRequest; diff --git a/src/lib/convenience/UpdateContextElementRequest.cpp b/src/lib/convenience/UpdateContextElementRequest.cpp index d2b03245c3..73eb3a7a83 100644 --- a/src/lib/convenience/UpdateContextElementRequest.cpp +++ b/src/lib/convenience/UpdateContextElementRequest.cpp @@ -36,10 +36,10 @@ /* **************************************************************************** * -* render - +* toJsonV1 - * */ -std::string UpdateContextElementRequest::render(bool asJsonObject, RequestType requestType) +std::string UpdateContextElementRequest::toJsonV1(bool asJsonObject, RequestType requestType) { std::string out = ""; @@ -48,7 +48,7 @@ std::string UpdateContextElementRequest::render(bool asJsonObject, RequestType r std::vector emptyMdV; out += startTag(); - out += contextAttributeVector.render(asJsonObject, requestType, contextAttributeVector.vec, emptyMdV); + out += contextAttributeVector.toJsonV1(asJsonObject, requestType, contextAttributeVector.vec, emptyMdV); out += endTag(); return out; @@ -85,7 +85,7 @@ std::string UpdateContextElementRequest::check return "OK"; } - return response.render(asJsonObject, requestType); + return response.toJsonV1(asJsonObject, requestType); } diff --git a/src/lib/convenience/UpdateContextElementRequest.h b/src/lib/convenience/UpdateContextElementRequest.h index 25a9e42453..5e9a3872a8 100644 --- a/src/lib/convenience/UpdateContextElementRequest.h +++ b/src/lib/convenience/UpdateContextElementRequest.h @@ -41,7 +41,7 @@ typedef struct UpdateContextElementRequest { ContextAttributeVector contextAttributeVector; // Optional - std::string render(bool asJsonObject, RequestType requestType); + std::string toJsonV1(bool asJsonObject, RequestType requestType); void release(void); std::string check(ApiVersion apiVersion, bool asJsonObject, diff --git a/src/lib/convenience/UpdateContextElementResponse.cpp b/src/lib/convenience/UpdateContextElementResponse.cpp index 6202e757a1..dd21717d8e 100644 --- a/src/lib/convenience/UpdateContextElementResponse.cpp +++ b/src/lib/convenience/UpdateContextElementResponse.cpp @@ -48,9 +48,9 @@ UpdateContextElementResponse::UpdateContextElementResponse() /* **************************************************************************** * -* render - +* toJsonV1 - */ -std::string UpdateContextElementResponse::render +std::string UpdateContextElementResponse::toJsonV1 ( bool asJsonObject, RequestType requestType @@ -62,11 +62,11 @@ std::string UpdateContextElementResponse::render if ((errorCode.code != SccNone) && (errorCode.code != SccOk)) { - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } else { - out += contextAttributeResponseVector.render(asJsonObject, requestType); + out += contextAttributeResponseVector.toJsonV1(asJsonObject, requestType); } out += endTag(); @@ -103,7 +103,7 @@ std::string UpdateContextElementResponse::check return "OK"; } - return render(asJsonObject, requestType); + return toJsonV1(asJsonObject, requestType); } diff --git a/src/lib/convenience/UpdateContextElementResponse.h b/src/lib/convenience/UpdateContextElementResponse.h index 2180cf97d8..a9a2d05997 100644 --- a/src/lib/convenience/UpdateContextElementResponse.h +++ b/src/lib/convenience/UpdateContextElementResponse.h @@ -58,8 +58,7 @@ typedef struct UpdateContextElementResponse UpdateContextElementResponse(); - std::string render(bool asJsonObject, - RequestType requestType); + std::string toJsonV1(bool asJsonObject, RequestType requestType); void release(); std::string check(ApiVersion apiVersion, bool asJsonObject, diff --git a/src/lib/jsonParseV2/jsonRequestTreat.cpp b/src/lib/jsonParseV2/jsonRequestTreat.cpp index db0e5470f1..9816af3b01 100644 --- a/src/lib/jsonParseV2/jsonRequestTreat.cpp +++ b/src/lib/jsonParseV2/jsonRequestTreat.cpp @@ -174,7 +174,7 @@ std::string jsonRequestTreat default: OrionError error(SccNotImplemented, "Request Treat function not implemented"); - answer = error.render(); + answer = error.toJsonV1(); ciP->httpStatusCode = SccNotImplemented; break; } diff --git a/src/lib/ngsi/AttributeExpression.cpp b/src/lib/ngsi/AttributeExpression.cpp index 3a9bcc3b67..68d60aecac 100644 --- a/src/lib/ngsi/AttributeExpression.cpp +++ b/src/lib/ngsi/AttributeExpression.cpp @@ -84,9 +84,9 @@ std::string AttributeExpression::get(void) /* **************************************************************************** * -* AttributeExpression::render - +* AttributeExpression::toJsonV1 - */ -std::string AttributeExpression::render(bool comma) +std::string AttributeExpression::toJsonV1(bool comma) { if (string == "") { diff --git a/src/lib/ngsi/AttributeExpression.h b/src/lib/ngsi/AttributeExpression.h index f854f4efb5..5a642607b1 100644 --- a/src/lib/ngsi/AttributeExpression.h +++ b/src/lib/ngsi/AttributeExpression.h @@ -42,7 +42,7 @@ typedef struct AttributeExpression void set(const std::string& value); std::string get(void); bool isEmpty(void); - std::string render(bool comma); + std::string toJsonV1(bool comma); const char* c_str(); void release(void); diff --git a/src/lib/ngsi/ConditionValueList.cpp b/src/lib/ngsi/ConditionValueList.cpp index 0dff23c32b..815b58f596 100644 --- a/src/lib/ngsi/ConditionValueList.cpp +++ b/src/lib/ngsi/ConditionValueList.cpp @@ -37,9 +37,9 @@ /* **************************************************************************** * -* render - +* toJsonV1 - */ -std::string ConditionValueList::render(bool comma) +std::string ConditionValueList::toJsonV1(bool comma) { std::string out = ""; diff --git a/src/lib/ngsi/ConditionValueList.h b/src/lib/ngsi/ConditionValueList.h index ad04c1e87e..c3fd9cd8fb 100644 --- a/src/lib/ngsi/ConditionValueList.h +++ b/src/lib/ngsi/ConditionValueList.h @@ -41,7 +41,7 @@ typedef struct ConditionValueList { std::vector vec; - std::string render(bool comma); + std::string toJsonV1(bool comma); void release(void); void push_back(const std::string& attributeName); unsigned int size(void); diff --git a/src/lib/ngsi/ContextAttribute.cpp b/src/lib/ngsi/ContextAttribute.cpp index e33a9fc65f..593002481c 100644 --- a/src/lib/ngsi/ContextAttribute.cpp +++ b/src/lib/ngsi/ContextAttribute.cpp @@ -601,14 +601,14 @@ std::string ContextAttribute::getLocation(ApiVersion apiVersion) const /* **************************************************************************** * -* renderAsJsonObject - +* toJsonV1AsJsonObject - */ -std::string ContextAttribute::renderAsJsonObject +std::string ContextAttribute::toJsonV1AsJsonObject ( - RequestType request, - const std::vector& orderedMetadata, - bool comma, - bool omitValue + RequestType request, + const std::vector& orderedMetadata, + bool comma, + bool omitValue ) { std::string out = ""; @@ -678,7 +678,7 @@ std::string ContextAttribute::renderAsJsonObject if (omitValue == false) { - out += metadataVector.render(orderedMetadata, false); + out += metadataVector.toJsonV1(orderedMetadata, false); } out += endTag(comma); @@ -690,9 +690,9 @@ std::string ContextAttribute::renderAsJsonObject /* **************************************************************************** * -* renderAsNameString - +* toJsonV1AsNameString - */ -std::string ContextAttribute::renderAsNameString(bool comma) +std::string ContextAttribute::toJsonV1AsNameString(bool comma) { std::string out = ""; @@ -713,9 +713,9 @@ std::string ContextAttribute::renderAsNameString(bool comma) /* **************************************************************************** * -* render - +* toJsonV1 - */ -std::string ContextAttribute::render +std::string ContextAttribute::toJsonV1 ( bool asJsonObject, RequestType request, @@ -735,7 +735,7 @@ std::string ContextAttribute::render if (asJsonObject) { - return renderAsJsonObject(request, orderedMetadata, comma, omitValue); + return toJsonV1AsJsonObject(request, orderedMetadata, comma, omitValue); } out += startTag(); @@ -807,7 +807,7 @@ std::string ContextAttribute::render } } - out += metadataVector.render(orderedMetadata, false); + out += metadataVector.toJsonV1(orderedMetadata, false); out += endTag(comma); return out; diff --git a/src/lib/ngsi/ContextAttribute.h b/src/lib/ngsi/ContextAttribute.h index e0ebd6ebaf..08da7931c7 100644 --- a/src/lib/ngsi/ContextAttribute.h +++ b/src/lib/ngsi/ContextAttribute.h @@ -94,13 +94,18 @@ typedef struct ContextAttribute std::string getId() const; std::string getLocation(ApiVersion apiVersion = V1) const; - std::string render(bool asJsonObject, - RequestType request, - const std::vector& metadataFilter, - bool comma = false, - bool omitValue = false); - std::string renderAsJsonObject(RequestType request, const std::vector& orderedMetadata, bool comma, bool omitValue = false); - std::string renderAsNameString(bool comma); + std::string toJsonV1(bool asJsonObject, + RequestType request, + const std::vector& metadataFilter, + bool comma = false, + bool omitValue = false); + + std::string toJsonV1AsJsonObject(RequestType request, + const std::vector& orderedMetadata, + bool comma, + bool omitValue = false); + + std::string toJsonV1AsNameString(bool comma); std::string toJson(const std::vector& metadataFilter); diff --git a/src/lib/ngsi/ContextAttributeVector.cpp b/src/lib/ngsi/ContextAttributeVector.cpp index 837cf7ed40..ffa0a3faca 100644 --- a/src/lib/ngsi/ContextAttributeVector.cpp +++ b/src/lib/ngsi/ContextAttributeVector.cpp @@ -140,12 +140,12 @@ std::string ContextAttributeVector::toJsonTypes(void) /* **************************************************************************** * -* ContextAttributeVector::render - +* ContextAttributeVector::toJsonV1 - * * FIXME P5: this method doesn't depend on the class object. Should be moved out of the class? * Maybe included in the Entiy class render logic. */ -std::string ContextAttributeVector::render +std::string ContextAttributeVector::toJsonV1 ( bool asJsonObject, RequestType request, @@ -182,11 +182,11 @@ std::string ContextAttributeVector::render added.push_back(orderedAttrs[ix]->name); if (attrsAsName) { - out += orderedAttrs[ix]->renderAsNameString(true); + out += orderedAttrs[ix]->toJsonV1AsNameString(true); } else { - out += orderedAttrs[ix]->render(asJsonObject, request, metadataFilter, true, omitValue); + out += orderedAttrs[ix]->toJsonV1(asJsonObject, request, metadataFilter, true, omitValue); } } else @@ -196,7 +196,7 @@ std::string ContextAttributeVector::render } // Remove final comma, as the addedLookup() check doesn't allow us to predict which the - // last invocation to orderedAttrs[ix]->render(...) and setting the comma paramter properly + // last invocation to orderedAttrs[ix]->toJsonV1(...) and setting the comma paramter properly out = out.substr(0, out.length() - 1 ); out += endTag(comma, attrsAsName); @@ -208,11 +208,11 @@ std::string ContextAttributeVector::render { if (attrsAsName) { - out += orderedAttrs[ix]->renderAsNameString(ix != orderedAttrs.size() - 1); + out += orderedAttrs[ix]->toJsonV1AsNameString(ix != orderedAttrs.size() - 1); } else { - out += orderedAttrs[ix]->render(asJsonObject, request, metadataFilter, ix != orderedAttrs.size() - 1, omitValue); + out += orderedAttrs[ix]->toJsonV1(asJsonObject, request, metadataFilter, ix != orderedAttrs.size() - 1, omitValue); } } out += endTag(comma, true); diff --git a/src/lib/ngsi/ContextAttributeVector.h b/src/lib/ngsi/ContextAttributeVector.h index c99230682f..3550528d98 100644 --- a/src/lib/ngsi/ContextAttributeVector.h +++ b/src/lib/ngsi/ContextAttributeVector.h @@ -57,13 +57,13 @@ typedef struct ContextAttributeVector std::string check(ApiVersion apiVersion, RequestType requestType); - std::string render(bool asJsonObject, - RequestType requestType, - const std::vector& orderedAttrs, - const std::vector& metadataFilter, - bool comma = false, - bool omitValue = false, - bool attrsAsName = false); + std::string toJsonV1(bool asJsonObject, + RequestType requestType, + const std::vector& orderedAttrs, + const std::vector& metadataFilter, + bool comma = false, + bool omitValue = false, + bool attrsAsName = false); std::string toJsonTypes(void); diff --git a/src/lib/ngsi/ContextElementResponse.cpp b/src/lib/ngsi/ContextElementResponse.cpp index 24599fe0ef..28dbb068a8 100644 --- a/src/lib/ngsi/ContextElementResponse.cpp +++ b/src/lib/ngsi/ContextElementResponse.cpp @@ -291,9 +291,9 @@ ContextElementResponse::ContextElementResponse(Entity* eP, bool useDefaultType) /* **************************************************************************** * -* ContextElementResponse::render - +* ContextElementResponse::toJsonV1 - */ -std::string ContextElementResponse::render +std::string ContextElementResponse::toJsonV1 ( bool asJsonObject, RequestType requestType, @@ -308,7 +308,7 @@ std::string ContextElementResponse::render out += startTag(); out += entity.toJsonV1(asJsonObject, requestType, attrsFilter, blacklist, metadataFilter, true, omitAttributeValues); - out += statusCode.render(false); + out += statusCode.toJsonV1(false); out += endTag(comma, false); return out; diff --git a/src/lib/ngsi/ContextElementResponse.h b/src/lib/ngsi/ContextElementResponse.h index 028f636fbd..1699a85f0c 100644 --- a/src/lib/ngsi/ContextElementResponse.h +++ b/src/lib/ngsi/ContextElementResponse.h @@ -66,17 +66,19 @@ typedef struct ContextElementResponse ApiVersion apiVersion = V1); ContextElementResponse(Entity* eP, bool useDefaultType = false); - std::string render(bool asJsonObject, - RequestType requestType, - const std::vector& attrsFilter, - bool blacklist, - const std::vector& metadataFilter, - bool comma = false, - bool omitAttributeValues = false); + std::string toJsonV1(bool asJsonObject, + RequestType requestType, + const std::vector& attrsFilter, + bool blacklist, + const std::vector& metadataFilter, + bool comma = false, + bool omitAttributeValues = false); + std::string toJson(RenderFormat renderFormat, const std::vector& attrsFilter, bool blacklist, const std::vector& metadataFilter); + void release(void); std::string check(ApiVersion apiVersion, diff --git a/src/lib/ngsi/ContextElementResponseVector.cpp b/src/lib/ngsi/ContextElementResponseVector.cpp index 9723f56f47..6a0130cf55 100644 --- a/src/lib/ngsi/ContextElementResponseVector.cpp +++ b/src/lib/ngsi/ContextElementResponseVector.cpp @@ -38,9 +38,9 @@ /* **************************************************************************** * -* ContextElementResponseVector::render - +* ContextElementResponseVector::toJsonV1 - */ -std::string ContextElementResponseVector::render +std::string ContextElementResponseVector::toJsonV1 ( bool asJsonObject, RequestType requestType, @@ -62,7 +62,7 @@ std::string ContextElementResponseVector::render for (unsigned int ix = 0; ix < vec.size(); ++ix) { - out += vec[ix]->render(asJsonObject, requestType, attrsFilter, blacklist, metadataFilter, ix < (vec.size() - 1), omitAttributeValues); + out += vec[ix]->toJsonV1(asJsonObject, requestType, attrsFilter, blacklist, metadataFilter, ix < (vec.size() - 1), omitAttributeValues); } out += endTag(comma, true); diff --git a/src/lib/ngsi/ContextElementResponseVector.h b/src/lib/ngsi/ContextElementResponseVector.h index 126b060cc3..41f1599ee8 100644 --- a/src/lib/ngsi/ContextElementResponseVector.h +++ b/src/lib/ngsi/ContextElementResponseVector.h @@ -41,13 +41,13 @@ typedef struct ContextElementResponseVector { std::vector vec; - std::string render(bool asJsonObject, - RequestType requestType, - const std::vector& attrsFilter, - bool blacklist, - const std::vector& metadataFilter, - bool comma = false, - bool omitAttributeValues = false); + std::string toJsonV1(bool asJsonObject, + RequestType requestType, + const std::vector& attrsFilter, + bool blacklist, + const std::vector& metadataFilter, + bool comma = false, + bool omitAttributeValues = false); std::string toJson(RenderFormat renderFormat, const std::vector& attrsFilter, diff --git a/src/lib/ngsi/ContextElementVector.cpp b/src/lib/ngsi/ContextElementVector.cpp index 7b896ae495..77f2f21772 100644 --- a/src/lib/ngsi/ContextElementVector.cpp +++ b/src/lib/ngsi/ContextElementVector.cpp @@ -47,13 +47,13 @@ void ContextElementVector::push_back(Entity* item) /* **************************************************************************** * -* ContextElementVector::render - +* ContextElementVector::toJsonV1 - */ -std::string ContextElementVector::render +std::string ContextElementVector::toJsonV1 ( - bool asJsonObject, - RequestType requestType, - bool comma + bool asJsonObject, + RequestType requestType, + bool comma ) { std::string out = ""; diff --git a/src/lib/ngsi/ContextElementVector.h b/src/lib/ngsi/ContextElementVector.h index f687a155c3..d25bfa3b3e 100644 --- a/src/lib/ngsi/ContextElementVector.h +++ b/src/lib/ngsi/ContextElementVector.h @@ -44,7 +44,7 @@ typedef struct ContextElementVector void push_back(Entity* item); unsigned int size(void); - std::string render(bool asJsonObject, RequestType requestType,bool comma); + std::string toJsonV1(bool asJsonObject, RequestType requestType,bool comma); void release(void); Entity* lookup(Entity* eP); Entity* operator[](unsigned int ix) const; diff --git a/src/lib/ngsi/ContextRegistration.cpp b/src/lib/ngsi/ContextRegistration.cpp index 84e78da504..bd7ec0a79e 100644 --- a/src/lib/ngsi/ContextRegistration.cpp +++ b/src/lib/ngsi/ContextRegistration.cpp @@ -49,9 +49,9 @@ ContextRegistration::ContextRegistration() /* **************************************************************************** * -* ContextRegistration::render - +* ContextRegistration::toJsonV1 - */ -std::string ContextRegistration::render(bool comma, bool isInVector) +std::string ContextRegistration::toJsonV1(bool comma, bool isInVector) { std::string out = ""; @@ -63,9 +63,9 @@ std::string ContextRegistration::render(bool comma, bool isInVector) // out += startTag(!isInVector? "contextRegistration" : ""); - out += entityIdVector.render(true); - out += contextRegistrationAttributeVector.render(true); - out += providingApplication.render(false); + out += entityIdVector.toJsonV1(true); + out += contextRegistrationAttributeVector.toJsonV1(true); + out += providingApplication.toJsonV1(false); out += endTag(comma); return out; diff --git a/src/lib/ngsi/ContextRegistration.h b/src/lib/ngsi/ContextRegistration.h index 1782ac509d..7df39196c5 100644 --- a/src/lib/ngsi/ContextRegistration.h +++ b/src/lib/ngsi/ContextRegistration.h @@ -48,7 +48,7 @@ typedef struct ContextRegistration bool entityIdVectorPresent; // entityIdList present during parsing ContextRegistration(); - std::string render(bool comma, bool isInVector); + std::string toJsonV1(bool comma, bool isInVector); void release(); std::string check(ApiVersion apiVersion, diff --git a/src/lib/ngsi/ContextRegistrationAttribute.cpp b/src/lib/ngsi/ContextRegistrationAttribute.cpp index 003f53fe88..e75da42d10 100644 --- a/src/lib/ngsi/ContextRegistrationAttribute.cpp +++ b/src/lib/ngsi/ContextRegistrationAttribute.cpp @@ -62,9 +62,9 @@ ContextRegistrationAttribute::ContextRegistrationAttribute /* **************************************************************************** * -* ContextRegistrationAttribute::render - +* ContextRegistrationAttribute::toJsonV1 - */ -std::string ContextRegistrationAttribute::render(bool comma) +std::string ContextRegistrationAttribute::toJsonV1(bool comma) { std::string out = ""; diff --git a/src/lib/ngsi/ContextRegistrationAttribute.h b/src/lib/ngsi/ContextRegistrationAttribute.h index fba30f4e26..8f02d62efb 100644 --- a/src/lib/ngsi/ContextRegistrationAttribute.h +++ b/src/lib/ngsi/ContextRegistrationAttribute.h @@ -46,7 +46,7 @@ typedef struct ContextRegistrationAttribute ContextRegistrationAttribute(); ContextRegistrationAttribute(const std::string& _name, const std::string& _type); - std::string render(bool comma); + std::string toJsonV1(bool comma); std::string check(ApiVersion apiVersion); } ContextRegistrationAttribute; diff --git a/src/lib/ngsi/ContextRegistrationAttributeVector.cpp b/src/lib/ngsi/ContextRegistrationAttributeVector.cpp index 90d96642f5..842e177b35 100644 --- a/src/lib/ngsi/ContextRegistrationAttributeVector.cpp +++ b/src/lib/ngsi/ContextRegistrationAttributeVector.cpp @@ -37,9 +37,9 @@ /* **************************************************************************** * -* ContextRegistrationAttributeVector::render - +* ContextRegistrationAttributeVector::toJsonV1 - */ -std::string ContextRegistrationAttributeVector::render(bool comma) +std::string ContextRegistrationAttributeVector::toJsonV1(bool comma) { std::string out = ""; @@ -51,7 +51,7 @@ std::string ContextRegistrationAttributeVector::render(bool comma) out += startTag("attributes", true); for (unsigned int ix = 0; ix < vec.size(); ++ix) { - out += vec[ix]->render(ix != vec.size() - 1); + out += vec[ix]->toJsonV1(ix != vec.size() - 1); } out += endTag(comma, true); diff --git a/src/lib/ngsi/ContextRegistrationAttributeVector.h b/src/lib/ngsi/ContextRegistrationAttributeVector.h index 8f5cf9b3a8..7e171f100c 100644 --- a/src/lib/ngsi/ContextRegistrationAttributeVector.h +++ b/src/lib/ngsi/ContextRegistrationAttributeVector.h @@ -40,7 +40,7 @@ typedef struct ContextRegistrationAttributeVector { std::vector vec; - std::string render(bool comma); + std::string toJsonV1(bool comma); void push_back(ContextRegistrationAttribute* item); unsigned int size(void); void release(); diff --git a/src/lib/ngsi/ContextRegistrationResponse.cpp b/src/lib/ngsi/ContextRegistrationResponse.cpp index 7c4299f654..f319b7c9ed 100644 --- a/src/lib/ngsi/ContextRegistrationResponse.cpp +++ b/src/lib/ngsi/ContextRegistrationResponse.cpp @@ -44,20 +44,20 @@ ContextRegistrationResponse::ContextRegistrationResponse() /* **************************************************************************** * -* ContextRegistrationResponse::render - +* ContextRegistrationResponse::toJsonV1 - */ -std::string ContextRegistrationResponse::render(bool comma) +std::string ContextRegistrationResponse::toJsonV1(bool comma) { std::string out = ""; bool errorCodeRendered = errorCode.code != SccNone; out += startTag(); - out += contextRegistration.render(errorCodeRendered, false); + out += contextRegistration.toJsonV1(errorCodeRendered, false); if (errorCodeRendered) { - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } out += endTag(comma); diff --git a/src/lib/ngsi/ContextRegistrationResponse.h b/src/lib/ngsi/ContextRegistrationResponse.h index 0c96dd4074..0a19022ccc 100644 --- a/src/lib/ngsi/ContextRegistrationResponse.h +++ b/src/lib/ngsi/ContextRegistrationResponse.h @@ -44,7 +44,7 @@ typedef struct ContextRegistrationResponse ContextRegistrationResponse(); - std::string render(bool comma); + std::string toJsonV1(bool comma); void release(void); std::string check(ApiVersion apiVersion, diff --git a/src/lib/ngsi/ContextRegistrationResponseVector.cpp b/src/lib/ngsi/ContextRegistrationResponseVector.cpp index faeef3f505..ca92bc4d7e 100644 --- a/src/lib/ngsi/ContextRegistrationResponseVector.cpp +++ b/src/lib/ngsi/ContextRegistrationResponseVector.cpp @@ -47,9 +47,9 @@ void ContextRegistrationResponseVector::push_back(ContextRegistrationResponse* i /* **************************************************************************** * -* ContextRegistrationResponseVector::render - +* ContextRegistrationResponseVector::toJsonV1 - */ -std::string ContextRegistrationResponseVector::render(bool comma) +std::string ContextRegistrationResponseVector::toJsonV1(bool comma) { std::string out = ""; @@ -62,7 +62,7 @@ std::string ContextRegistrationResponseVector::render(bool comma) for (unsigned int ix = 0; ix < vec.size(); ++ix) { - out += vec[ix]->render((ix != vec.size() - 1)); + out += vec[ix]->toJsonV1((ix != vec.size() - 1)); } out += endTag(comma, true); diff --git a/src/lib/ngsi/ContextRegistrationResponseVector.h b/src/lib/ngsi/ContextRegistrationResponseVector.h index 2a8d29c997..d1cc49d097 100644 --- a/src/lib/ngsi/ContextRegistrationResponseVector.h +++ b/src/lib/ngsi/ContextRegistrationResponseVector.h @@ -42,7 +42,7 @@ typedef struct ContextRegistrationResponseVector void push_back(ContextRegistrationResponse* item); unsigned int size(void) const; - std::string render(bool comma); + std::string toJsonV1(bool comma); void release(void); ContextRegistrationResponse* operator[](unsigned int ix) const; diff --git a/src/lib/ngsi/ContextRegistrationVector.cpp b/src/lib/ngsi/ContextRegistrationVector.cpp index 7bb61985ae..e8725f5557 100644 --- a/src/lib/ngsi/ContextRegistrationVector.cpp +++ b/src/lib/ngsi/ContextRegistrationVector.cpp @@ -47,9 +47,9 @@ void ContextRegistrationVector::push_back(ContextRegistration* item) /* **************************************************************************** * -* ContextRegistrationVector::render - +* ContextRegistrationVector::toJsonV1 - */ -std::string ContextRegistrationVector::render(bool comma) +std::string ContextRegistrationVector::toJsonV1(bool comma) { std::string out = ""; @@ -62,7 +62,7 @@ std::string ContextRegistrationVector::render(bool comma) for (unsigned int ix = 0; ix < vec.size(); ++ix) { - out += vec[ix]->render(ix != vec.size() - 1, true); + out += vec[ix]->toJsonV1(ix != vec.size() - 1, true); } out += endTag(comma, comma); diff --git a/src/lib/ngsi/ContextRegistrationVector.h b/src/lib/ngsi/ContextRegistrationVector.h index fd668a1681..3fef835503 100644 --- a/src/lib/ngsi/ContextRegistrationVector.h +++ b/src/lib/ngsi/ContextRegistrationVector.h @@ -42,7 +42,7 @@ typedef struct ContextRegistrationVector void push_back(ContextRegistration* item); unsigned int size(void); - std::string render(bool comma); + std::string toJsonV1(bool comma); void release(void); std::string check(ApiVersion apiVersion, diff --git a/src/lib/ngsi/Duration.cpp b/src/lib/ngsi/Duration.cpp index d5b119f545..1a12488b25 100644 --- a/src/lib/ngsi/Duration.cpp +++ b/src/lib/ngsi/Duration.cpp @@ -136,9 +136,9 @@ int64_t Duration::parse(void) /* **************************************************************************** * -* Duration::render - +* Duration::toJsonV1 - */ -std::string Duration::render(bool comma) +std::string Duration::toJsonV1(bool comma) { if (string == "") { diff --git a/src/lib/ngsi/Duration.h b/src/lib/ngsi/Duration.h index 3b12418d11..9a87c2fe8d 100644 --- a/src/lib/ngsi/Duration.h +++ b/src/lib/ngsi/Duration.h @@ -53,7 +53,7 @@ class Duration void set(const std::string& value); std::string get(void); bool isEmpty(void); - std::string render(bool comma); + std::string toJsonV1(bool comma); int64_t parse(void); void release(void); diff --git a/src/lib/ngsi/EntityId.cpp b/src/lib/ngsi/EntityId.cpp index dc70d418ad..99ab224dd9 100644 --- a/src/lib/ngsi/EntityId.cpp +++ b/src/lib/ngsi/EntityId.cpp @@ -78,10 +78,10 @@ EntityId::EntityId /* **************************************************************************** * -* EntityId::render - +* EntityId::toJsonV1 - * */ -std::string EntityId::render(bool comma, bool isInVector) +std::string EntityId::toJsonV1(bool comma, bool isInVector) { std::string out = ""; char* isPatternEscaped = htmlEscape(isPattern.c_str()); diff --git a/src/lib/ngsi/EntityId.h b/src/lib/ngsi/EntityId.h index a5b01b9967..caf3291b62 100644 --- a/src/lib/ngsi/EntityId.h +++ b/src/lib/ngsi/EntityId.h @@ -64,7 +64,7 @@ class EntityId bool equal(EntityId* eP); bool isPatternIsTrue(void); - std::string render(bool comma, bool isInVector = false); + std::string toJsonV1(bool comma, bool isInVector = false); std::string check(RequestType requestType); diff --git a/src/lib/ngsi/EntityIdVector.cpp b/src/lib/ngsi/EntityIdVector.cpp index a10e74b1f9..aba8af49a0 100644 --- a/src/lib/ngsi/EntityIdVector.cpp +++ b/src/lib/ngsi/EntityIdVector.cpp @@ -41,9 +41,9 @@ /* **************************************************************************** * -* EntityIdVector::render - +* EntityIdVector::toJsonV1 - */ -std::string EntityIdVector::render(bool comma) +std::string EntityIdVector::toJsonV1(bool comma) { std::string out = ""; @@ -55,7 +55,7 @@ std::string EntityIdVector::render(bool comma) out += startTag("entities", true); for (unsigned int ix = 0; ix < vec.size(); ++ix) { - out += vec[ix]->render(ix != vec.size() - 1, true); + out += vec[ix]->toJsonV1(ix != vec.size() - 1, true); } out += endTag(comma, true); diff --git a/src/lib/ngsi/EntityIdVector.h b/src/lib/ngsi/EntityIdVector.h index bf9b522d5b..257779d08b 100644 --- a/src/lib/ngsi/EntityIdVector.h +++ b/src/lib/ngsi/EntityIdVector.h @@ -49,7 +49,7 @@ typedef struct EntityIdVector { std::vector vec; - std::string render(bool comma); + std::string toJsonV1(bool comma); void push_back(EntityId* item); bool push_back_if_absent(EntityId* item); unsigned int size(void) const; diff --git a/src/lib/ngsi/Metadata.cpp b/src/lib/ngsi/Metadata.cpp index 93ec87896e..6239cbef88 100644 --- a/src/lib/ngsi/Metadata.cpp +++ b/src/lib/ngsi/Metadata.cpp @@ -232,9 +232,9 @@ Metadata::Metadata(const std::string& _name, const BSONObj& mdB) /* **************************************************************************** * -* Metadata::render - +* Metadata::toJsonV1 - */ -std::string Metadata::render(bool comma) +std::string Metadata::toJsonV1(bool comma) { std::string out = ""; std::string xValue = toStringValue(); diff --git a/src/lib/ngsi/Metadata.h b/src/lib/ngsi/Metadata.h index 5b0786bfca..960dd8486f 100644 --- a/src/lib/ngsi/Metadata.h +++ b/src/lib/ngsi/Metadata.h @@ -92,7 +92,7 @@ typedef struct Metadata Metadata(const std::string& _name, const mongo::BSONObj& mdB); ~Metadata(); - std::string render(bool comma); + std::string toJsonV1(bool comma); std::string toJson(void); void release(void); void fill(const struct Metadata& md); diff --git a/src/lib/ngsi/MetadataVector.cpp b/src/lib/ngsi/MetadataVector.cpp index fc90946209..225f1ec72b 100644 --- a/src/lib/ngsi/MetadataVector.cpp +++ b/src/lib/ngsi/MetadataVector.cpp @@ -50,11 +50,11 @@ MetadataVector::MetadataVector(void) /* **************************************************************************** * -* MetadataVector::render - +* MetadataVector::toJsonV1 - * * FIXME P5: this method doesn't depend on the class object. Should be moved out of the class? */ -std::string MetadataVector::render(const std::vector& orderedMetadata, bool comma) +std::string MetadataVector::toJsonV1(const std::vector& orderedMetadata, bool comma) { std::string out = ""; @@ -66,7 +66,7 @@ std::string MetadataVector::render(const std::vector& orderedMetadata out += startTag("metadatas", true); for (unsigned int ix = 0; ix < orderedMetadata.size(); ++ix) { - out += orderedMetadata[ix]->render(ix != orderedMetadata.size() - 1); + out += orderedMetadata[ix]->toJsonV1(ix != orderedMetadata.size() - 1); } out += endTag(comma, true); diff --git a/src/lib/ngsi/MetadataVector.h b/src/lib/ngsi/MetadataVector.h index 13ef0ea43b..1459efe412 100644 --- a/src/lib/ngsi/MetadataVector.h +++ b/src/lib/ngsi/MetadataVector.h @@ -45,7 +45,7 @@ typedef struct MetadataVector MetadataVector(void); - std::string render(const std::vector& orderedMetadata, bool comma); + std::string toJsonV1(const std::vector& orderedMetadata, bool comma); std::string toJson(const std::vector& orderedMetadata); std::string check(ApiVersion apiVersion); diff --git a/src/lib/ngsi/NotifyCondition.cpp b/src/lib/ngsi/NotifyCondition.cpp index d43481025f..ebdc639e2c 100644 --- a/src/lib/ngsi/NotifyCondition.cpp +++ b/src/lib/ngsi/NotifyCondition.cpp @@ -61,9 +61,9 @@ NotifyCondition::NotifyCondition(NotifyCondition* ncP) /* **************************************************************************** * -* NotifyCondition::render - +* NotifyCondition::toJsonV1 - */ -std::string NotifyCondition::render(bool notLastInVector) +std::string NotifyCondition::toJsonV1(bool notLastInVector) { std::string out = ""; @@ -75,8 +75,8 @@ std::string NotifyCondition::render(bool notLastInVector) out += startTag(); out += valueTag("type", type, commaAfterType); - out += condValueList.render(commaAfterCondValueList); - out += restriction.render(commaAfterRestriction); + out += condValueList.toJsonV1(commaAfterCondValueList); + out += restriction.toJsonV1(commaAfterRestriction); out += endTag(); return out; diff --git a/src/lib/ngsi/NotifyCondition.h b/src/lib/ngsi/NotifyCondition.h index 857534ac59..8b44308005 100644 --- a/src/lib/ngsi/NotifyCondition.h +++ b/src/lib/ngsi/NotifyCondition.h @@ -48,7 +48,7 @@ typedef struct NotifyCondition NotifyCondition(); NotifyCondition(NotifyCondition* ncP); - std::string render(bool notLastInVector); + std::string toJsonV1(bool notLastInVector); void release(void); std::string check(RequestType requestType, diff --git a/src/lib/ngsi/NotifyConditionVector.cpp b/src/lib/ngsi/NotifyConditionVector.cpp index 0dbc88c53e..5f9799c521 100644 --- a/src/lib/ngsi/NotifyConditionVector.cpp +++ b/src/lib/ngsi/NotifyConditionVector.cpp @@ -47,9 +47,9 @@ NotifyConditionVector::NotifyConditionVector() /* **************************************************************************** * -* NotifyConditionVector::render - +* NotifyConditionVector::toJsonV1 - */ -std::string NotifyConditionVector::render(bool comma) +std::string NotifyConditionVector::toJsonV1(bool comma) { std::string out = ""; @@ -61,7 +61,7 @@ std::string NotifyConditionVector::render(bool comma) out += startTag("notifyConditions", true); for (unsigned int ix = 0; ix < vec.size(); ++ix) { - out += vec[ix]->render(ix != vec.size() - 1); + out += vec[ix]->toJsonV1(ix != vec.size() - 1); } out += endTag(comma, true); diff --git a/src/lib/ngsi/NotifyConditionVector.h b/src/lib/ngsi/NotifyConditionVector.h index b7dd29f098..0a77d6e231 100644 --- a/src/lib/ngsi/NotifyConditionVector.h +++ b/src/lib/ngsi/NotifyConditionVector.h @@ -42,7 +42,7 @@ typedef struct NotifyConditionVector NotifyConditionVector(); - std::string render(bool comma); + std::string toJsonV1(bool comma); void push_back(NotifyCondition* item); unsigned int size(void) const; void release(void); diff --git a/src/lib/ngsi/Originator.cpp b/src/lib/ngsi/Originator.cpp index cfacfd9fb4..ea94bcb2bb 100644 --- a/src/lib/ngsi/Originator.cpp +++ b/src/lib/ngsi/Originator.cpp @@ -80,9 +80,9 @@ std::string Originator::get(void) /* **************************************************************************** * -* Originator::render - +* Originator::toJsonV1 - */ -std::string Originator::render(bool comma) +std::string Originator::toJsonV1(bool comma) { if (string == "") { diff --git a/src/lib/ngsi/Originator.h b/src/lib/ngsi/Originator.h index 8b2eb96fac..fa6e67d01a 100644 --- a/src/lib/ngsi/Originator.h +++ b/src/lib/ngsi/Originator.h @@ -42,7 +42,7 @@ typedef struct Originator void set(const std::string& value); std::string get(void); bool isEmpty(void); - std::string render(bool comma); + std::string toJsonV1(bool comma); const char* c_str(); std::string check(void); diff --git a/src/lib/ngsi/ProvidingApplication.cpp b/src/lib/ngsi/ProvidingApplication.cpp index 80d6426814..e523209c48 100644 --- a/src/lib/ngsi/ProvidingApplication.cpp +++ b/src/lib/ngsi/ProvidingApplication.cpp @@ -120,9 +120,9 @@ MimeType ProvidingApplication::getMimeType(void) /* **************************************************************************** * -* ProvidingApplication::render - +* ProvidingApplication::toJsonV1 - */ -std::string ProvidingApplication::render(bool comma) +std::string ProvidingApplication::toJsonV1(bool comma) { if (string == "") { diff --git a/src/lib/ngsi/ProvidingApplication.h b/src/lib/ngsi/ProvidingApplication.h index ef10570821..300b657658 100644 --- a/src/lib/ngsi/ProvidingApplication.h +++ b/src/lib/ngsi/ProvidingApplication.h @@ -47,7 +47,7 @@ typedef struct ProvidingApplication std::string get(void); MimeType getMimeType(void); bool isEmpty(void); - std::string render(bool comma); + std::string toJsonV1(bool comma); const char* c_str(void); void release(void); diff --git a/src/lib/ngsi/Reference.cpp b/src/lib/ngsi/Reference.cpp index 831fd89531..2cf97a5da5 100644 --- a/src/lib/ngsi/Reference.cpp +++ b/src/lib/ngsi/Reference.cpp @@ -100,9 +100,9 @@ std::string Reference::get(void) /* **************************************************************************** * -* Reference::render - +* Reference::toJsonV1 - */ -std::string Reference::render(bool comma) +std::string Reference::toJsonV1(bool comma) { if (string == "") { diff --git a/src/lib/ngsi/Reference.h b/src/lib/ngsi/Reference.h index 48718d19ac..0e8b24b294 100644 --- a/src/lib/ngsi/Reference.h +++ b/src/lib/ngsi/Reference.h @@ -42,7 +42,7 @@ typedef struct Reference void set(const std::string& value); std::string get(void); bool isEmpty(void); - std::string render(bool comma); + std::string toJsonV1(bool comma); const char* c_str(); std::string check(RequestType requestType); diff --git a/src/lib/ngsi/RegistrationId.cpp b/src/lib/ngsi/RegistrationId.cpp index ec0aa9c23d..b3628503d6 100644 --- a/src/lib/ngsi/RegistrationId.cpp +++ b/src/lib/ngsi/RegistrationId.cpp @@ -108,9 +108,9 @@ std::string RegistrationId::get(void) const /* **************************************************************************** * -* RegistrationId::render - +* RegistrationId::toJsonV1 - */ -std::string RegistrationId::render(RequestType requestType, bool comma) +std::string RegistrationId::toJsonV1(RequestType requestType, bool comma) { if (string == "") { diff --git a/src/lib/ngsi/RegistrationId.h b/src/lib/ngsi/RegistrationId.h index 7d5e5bb53a..6a9ba149e0 100644 --- a/src/lib/ngsi/RegistrationId.h +++ b/src/lib/ngsi/RegistrationId.h @@ -45,7 +45,7 @@ typedef struct RegistrationId void set(const std::string& value); std::string get(void) const; bool isEmpty(void); - std::string render(RequestType requestType, bool comma); + std::string toJsonV1(RequestType requestType, bool comma); void release(void); std::string check(void); diff --git a/src/lib/ngsi/Restriction.cpp b/src/lib/ngsi/Restriction.cpp index d82eb3cb8c..4f5cdf4374 100644 --- a/src/lib/ngsi/Restriction.cpp +++ b/src/lib/ngsi/Restriction.cpp @@ -73,9 +73,9 @@ std::string Restriction::check(int counter) /* **************************************************************************** * -* Restriction::render - +* Restriction::toJsonV1 - */ -std::string Restriction::render(int restrictions, bool comma) +std::string Restriction::toJsonV1(int restrictions, bool comma) { std::string tag = "restriction"; std::string out = ""; @@ -87,8 +87,8 @@ std::string Restriction::render(int restrictions, bool comma) } out += startTag(tag); - out += attributeExpression.render(scopeVectorRendered); - out += scopeVector.render(false); + out += attributeExpression.toJsonV1(scopeVectorRendered); + out += scopeVector.toJsonV1(false); out += endTag(comma); return out; diff --git a/src/lib/ngsi/Restriction.h b/src/lib/ngsi/Restriction.h index 891228b5d9..c27c7dbdb7 100644 --- a/src/lib/ngsi/Restriction.h +++ b/src/lib/ngsi/Restriction.h @@ -43,7 +43,7 @@ typedef struct Restriction AttributeExpression attributeExpression; // Optional (FI-WARE changes - MANDATORY in OMA spec) ScopeVector scopeVector; // Optional - std::string render(int restrictions, bool comma); + std::string toJsonV1(int restrictions, bool comma); void release(); void fill(Restriction* rP); diff --git a/src/lib/ngsi/RestrictionString.cpp b/src/lib/ngsi/RestrictionString.cpp index 0fafef7395..1c86f487eb 100644 --- a/src/lib/ngsi/RestrictionString.cpp +++ b/src/lib/ngsi/RestrictionString.cpp @@ -80,9 +80,9 @@ std::string RestrictionString::get(void) /* **************************************************************************** * -* RestrictionString::render - +* RestrictionString::toJsonV1 - */ -std::string RestrictionString::render(bool comma) +std::string RestrictionString::toJsonV1(bool comma) { if (string == "") { diff --git a/src/lib/ngsi/RestrictionString.h b/src/lib/ngsi/RestrictionString.h index 306faedeee..3a7fc72cf3 100644 --- a/src/lib/ngsi/RestrictionString.h +++ b/src/lib/ngsi/RestrictionString.h @@ -42,7 +42,7 @@ typedef struct RestrictionString void set(const std::string& value); std::string get(void); bool isEmpty(void); - std::string render(bool comma); + std::string toJsonV1(bool comma); const char* c_str(); std::string check(void); diff --git a/src/lib/ngsi/Scope.cpp b/src/lib/ngsi/Scope.cpp index 84f19f1f2b..ec1dea4822 100644 --- a/src/lib/ngsi/Scope.cpp +++ b/src/lib/ngsi/Scope.cpp @@ -384,9 +384,9 @@ int Scope::fill /* **************************************************************************** * -* Scope::render - +* Scope::toJsonV1 - */ -std::string Scope::render(bool notLastInVector) +std::string Scope::toJsonV1(bool notLastInVector) { std::string out = ""; const char* tTag = "type"; diff --git a/src/lib/ngsi/Scope.h b/src/lib/ngsi/Scope.h index 804395a0b0..904209bb81 100644 --- a/src/lib/ngsi/Scope.h +++ b/src/lib/ngsi/Scope.h @@ -82,7 +82,7 @@ typedef struct Scope const std::string& georelString, std::string* errorString); - std::string render(bool notLastInVector); + std::string toJsonV1(bool notLastInVector); void release(void); std::string check(void); diff --git a/src/lib/ngsi/ScopeVector.cpp b/src/lib/ngsi/ScopeVector.cpp index 9716387f38..a83e58e1e6 100644 --- a/src/lib/ngsi/ScopeVector.cpp +++ b/src/lib/ngsi/ScopeVector.cpp @@ -39,9 +39,9 @@ /* **************************************************************************** * -* ScopeVector::render - +* ScopeVector::toJsonV1 - */ -std::string ScopeVector::render(bool comma) +std::string ScopeVector::toJsonV1(bool comma) { std::string out = ""; @@ -53,7 +53,7 @@ std::string ScopeVector::render(bool comma) out += startTag("scope", true); for (unsigned int ix = 0; ix < vec.size(); ++ix) { - out += vec[ix]->render(ix != vec.size() - 1); + out += vec[ix]->toJsonV1(ix != vec.size() - 1); } out += endTag(comma, true); diff --git a/src/lib/ngsi/ScopeVector.h b/src/lib/ngsi/ScopeVector.h index bde708b5ab..d092c1c362 100644 --- a/src/lib/ngsi/ScopeVector.h +++ b/src/lib/ngsi/ScopeVector.h @@ -40,7 +40,7 @@ typedef struct ScopeVector { std::vector vec; - std::string render(bool comma); + std::string toJsonV1(bool comma); void push_back(Scope* item); unsigned int size(void) const; void release(); diff --git a/src/lib/ngsi/StatusCode.cpp b/src/lib/ngsi/StatusCode.cpp index d318ce1e56..cc7b7b4ba0 100644 --- a/src/lib/ngsi/StatusCode.cpp +++ b/src/lib/ngsi/StatusCode.cpp @@ -87,7 +87,7 @@ StatusCode::StatusCode(HttpStatusCode _code, const std::string& _details, const * * StatusCode::render - */ -std::string StatusCode::render(bool comma, bool showKey) +std::string StatusCode::toJsonV1(bool comma, bool showKey) { std::string out = ""; diff --git a/src/lib/ngsi/StatusCode.h b/src/lib/ngsi/StatusCode.h index 47e005363c..89a072aeb8 100644 --- a/src/lib/ngsi/StatusCode.h +++ b/src/lib/ngsi/StatusCode.h @@ -56,7 +56,7 @@ typedef struct StatusCode StatusCode(const std::string& _keyName); StatusCode(HttpStatusCode _code, const std::string& _details, const std::string& _keyName = "statusCode"); - std::string render(bool comma, bool showKey = true); + std::string toJsonV1(bool comma, bool showKey = true); std::string toJson(bool isLastElement); void fill(HttpStatusCode _code, const std::string& _details = ""); void fill(StatusCode* scP); diff --git a/src/lib/ngsi/StringList.cpp b/src/lib/ngsi/StringList.cpp index 033177acec..01352dbef9 100644 --- a/src/lib/ngsi/StringList.cpp +++ b/src/lib/ngsi/StringList.cpp @@ -63,9 +63,9 @@ void StringList::fill(const std::string& commaSeparatedList) /* **************************************************************************** * -* render - +* StringList::toJsonV1 - */ -std::string StringList::render(bool comma, const std::string& fieldName) +std::string StringList::toJsonV1(bool comma, const std::string& fieldName) { std::string out = ""; diff --git a/src/lib/ngsi/StringList.h b/src/lib/ngsi/StringList.h index 208d482d6e..73e22fd20c 100644 --- a/src/lib/ngsi/StringList.h +++ b/src/lib/ngsi/StringList.h @@ -43,7 +43,7 @@ typedef struct StringList void fill(const std::vector& aVec); void fill(const std::string& commaSeparatedList); - std::string render(bool comma, const std::string& fieldName); + std::string toJsonV1(bool comma, const std::string& fieldName); std::string toString(void); void release(void); bool lookup(const std::string& string) const; diff --git a/src/lib/ngsi/SubscribeError.cpp b/src/lib/ngsi/SubscribeError.cpp index 5ff8ddd2e1..1d17cbc7e3 100644 --- a/src/lib/ngsi/SubscribeError.cpp +++ b/src/lib/ngsi/SubscribeError.cpp @@ -83,9 +83,9 @@ std::string SubscribeError::toJson(RequestType requestType, bool comma) /* **************************************************************************** * -* SubscribeError::render - +* SubscribeError::toJsonV1 - */ -std::string SubscribeError::render(RequestType requestType, bool comma) +std::string SubscribeError::toJsonV1(RequestType requestType, bool comma) { std::string out = ""; @@ -103,16 +103,16 @@ std::string SubscribeError::render(RequestType requestType, bool comma) { subscriptionId.set("000000000000000000000000"); } - out += subscriptionId.render(requestType, true); + out += subscriptionId.toJsonV1(requestType, true); } else if ((requestType == SubscribeContext) && (subscriptionId.get() != "000000000000000000000000") && (subscriptionId.get() != "")) { - out += subscriptionId.render(requestType, true); + out += subscriptionId.toJsonV1(requestType, true); } - out += errorCode.render(false); + out += errorCode.toJsonV1(false); out += endTag(comma); diff --git a/src/lib/ngsi/SubscribeError.h b/src/lib/ngsi/SubscribeError.h index f3196d6946..7d0c7dc951 100644 --- a/src/lib/ngsi/SubscribeError.h +++ b/src/lib/ngsi/SubscribeError.h @@ -43,7 +43,7 @@ typedef struct SubscribeError StatusCode errorCode; // Mandatory SubscribeError(); - std::string render(RequestType requestType, bool comma); + std::string toJsonV1(RequestType requestType, bool comma); std::string toJson(RequestType requestType, bool comma); std::string check(void); } SubscribeError; diff --git a/src/lib/ngsi/SubscribeResponse.cpp b/src/lib/ngsi/SubscribeResponse.cpp index 5c0f0dc116..d105282ff5 100644 --- a/src/lib/ngsi/SubscribeResponse.cpp +++ b/src/lib/ngsi/SubscribeResponse.cpp @@ -42,9 +42,9 @@ SubscribeResponse::SubscribeResponse() /* **************************************************************************** * -* SubscribeResponse::render - +* SubscribeResponse::toJsonV1 - */ -std::string SubscribeResponse::render(bool comma) +std::string SubscribeResponse::toJsonV1(bool comma) { std::string out = ""; std::string tag = "subscribeResponse"; @@ -52,9 +52,9 @@ std::string SubscribeResponse::render(bool comma) bool throttlingRendered = !throttling.isEmpty(); out += startTag(tag); - out += subscriptionId.render(RtSubscribeResponse, durationRendered || throttlingRendered); - out += duration.render(throttlingRendered); - out += throttling.render(false); + out += subscriptionId.toJsonV1(RtSubscribeResponse, durationRendered || throttlingRendered); + out += duration.toJsonV1(throttlingRendered); + out += throttling.toJsonV1(false); out += endTag(comma); return out; diff --git a/src/lib/ngsi/SubscribeResponse.h b/src/lib/ngsi/SubscribeResponse.h index 1dac624e99..56179a4b07 100644 --- a/src/lib/ngsi/SubscribeResponse.h +++ b/src/lib/ngsi/SubscribeResponse.h @@ -45,7 +45,7 @@ typedef struct SubscribeResponse SubscribeResponse(); - std::string render(bool comma); + std::string toJsonV1(bool comma); } SubscribeResponse; #endif // SRC_LIB_NGSI_SUBSCRIBERESPONSE_H_ diff --git a/src/lib/ngsi/SubscriptionId.cpp b/src/lib/ngsi/SubscriptionId.cpp index a5fdfb3f32..e10d6ba019 100644 --- a/src/lib/ngsi/SubscriptionId.cpp +++ b/src/lib/ngsi/SubscriptionId.cpp @@ -155,9 +155,9 @@ std::string SubscriptionId::toJson(RequestType container, bool comma) /* **************************************************************************** * -* SubscriptionId::render - +* SubscriptionId::toJsonV1 - */ -std::string SubscriptionId::render(RequestType container, bool comma) +std::string SubscriptionId::toJsonV1(RequestType container, bool comma) { std::string xString = string; diff --git a/src/lib/ngsi/SubscriptionId.h b/src/lib/ngsi/SubscriptionId.h index 2fe83db15b..82673a925c 100644 --- a/src/lib/ngsi/SubscriptionId.h +++ b/src/lib/ngsi/SubscriptionId.h @@ -46,7 +46,7 @@ typedef struct SubscriptionId std::string get(void) const; const char* c_str(void) const; bool isEmpty(void); - std::string render(RequestType container, bool comma); + std::string toJsonV1(RequestType container, bool comma); std::string toJson(RequestType container, bool comma); void release(void); bool rendered(RequestType container); diff --git a/src/lib/ngsi/Throttling.cpp b/src/lib/ngsi/Throttling.cpp index f4fe1fa2fd..e2ef63eb6d 100644 --- a/src/lib/ngsi/Throttling.cpp +++ b/src/lib/ngsi/Throttling.cpp @@ -104,9 +104,9 @@ const std::string Throttling::get(void) /* **************************************************************************** * -* Throttling::render - +* Throttling::toJsonV1 - */ -std::string Throttling::render(bool comma) +std::string Throttling::toJsonV1(bool comma) { if (string == "") { diff --git a/src/lib/ngsi/Throttling.h b/src/lib/ngsi/Throttling.h index dc3d93f011..a06ea794ea 100644 --- a/src/lib/ngsi/Throttling.h +++ b/src/lib/ngsi/Throttling.h @@ -46,7 +46,7 @@ typedef struct Throttling void set(const std::string& value); const std::string get(void); bool isEmpty(void); - std::string render(bool comma); + std::string toJsonV1(bool comma); std::string check(void); diff --git a/src/lib/ngsi10/NotifyContextRequest.cpp b/src/lib/ngsi10/NotifyContextRequest.cpp index 986d42e276..3308974192 100644 --- a/src/lib/ngsi10/NotifyContextRequest.cpp +++ b/src/lib/ngsi10/NotifyContextRequest.cpp @@ -36,9 +36,9 @@ /* **************************************************************************** * -* NotifyContextRequest::render - +* NotifyContextRequest::toJsonV1 - */ -std::string NotifyContextRequest::render +std::string NotifyContextRequest::toJsonV1 ( bool asJsonObject, const std::vector& attrsFilter, @@ -56,9 +56,9 @@ std::string NotifyContextRequest::render // This doubt is taken care of by the variable 'contextElementResponseVectorRendered' // out += startTag(); - out += subscriptionId.render(NotifyContext, true); - out += originator.render(contextElementResponseVectorRendered); - out += contextElementResponseVector.render(asJsonObject, NotifyContext, attrsFilter, blacklist, metadataFilter, false); + out += subscriptionId.toJsonV1(NotifyContext, true); + out += originator.toJsonV1(contextElementResponseVectorRendered); + out += contextElementResponseVector.toJsonV1(asJsonObject, NotifyContext, attrsFilter, blacklist, metadataFilter, false); out += endTag(); return out; @@ -127,7 +127,7 @@ std::string NotifyContextRequest::check(ApiVersion apiVersion, const std::string return "OK"; } - return response.render(); + return response.toJsonV1(); } diff --git a/src/lib/ngsi10/NotifyContextRequest.h b/src/lib/ngsi10/NotifyContextRequest.h index 791a1c2841..437e9779e8 100644 --- a/src/lib/ngsi10/NotifyContextRequest.h +++ b/src/lib/ngsi10/NotifyContextRequest.h @@ -45,10 +45,10 @@ typedef struct NotifyContextRequest Originator originator; // Mandatory ContextElementResponseVector contextElementResponseVector; // Optional - std::string render(bool asJsonObject, - const std::vector& attrsFilter, - bool blacklist, - const std::vector& metadataFilter); + std::string toJsonV1(bool asJsonObject, + const std::vector& attrsFilter, + bool blacklist, + const std::vector& metadataFilter); std::string toJson(RenderFormat renderFormat, const std::vector& attrsFilter, bool blacklist, diff --git a/src/lib/ngsi10/NotifyContextResponse.cpp b/src/lib/ngsi10/NotifyContextResponse.cpp index 4777f02673..e432549354 100644 --- a/src/lib/ngsi10/NotifyContextResponse.cpp +++ b/src/lib/ngsi10/NotifyContextResponse.cpp @@ -62,14 +62,14 @@ NotifyContextResponse::NotifyContextResponse(StatusCode& sc) * * NotifyContextResponse::render - */ -std::string NotifyContextResponse::render(void) +std::string NotifyContextResponse::toJsonV1(void) { std::string out = ""; responseCode.keyNameSet("responseCode"); out += startTag(); - out += responseCode.render(false); + out += responseCode.toJsonV1(false); out += endTag(); return out; diff --git a/src/lib/ngsi10/NotifyContextResponse.h b/src/lib/ngsi10/NotifyContextResponse.h index 944795ecde..88848dc84e 100644 --- a/src/lib/ngsi10/NotifyContextResponse.h +++ b/src/lib/ngsi10/NotifyContextResponse.h @@ -44,7 +44,7 @@ typedef struct NotifyContextResponse NotifyContextResponse(); NotifyContextResponse(StatusCode& sc); - std::string render(void); + std::string toJsonV1(void); void release(void); } NotifyContextResponse; diff --git a/src/lib/ngsi10/QueryContextRequest.cpp b/src/lib/ngsi10/QueryContextRequest.cpp index 54abd1a32a..0ab6db3e12 100644 --- a/src/lib/ngsi10/QueryContextRequest.cpp +++ b/src/lib/ngsi10/QueryContextRequest.cpp @@ -92,9 +92,9 @@ QueryContextRequest::QueryContextRequest(const std::string& _contextProvider, En /* **************************************************************************** * -* QueryContextRequest::render - +* QueryContextRequest::toJsonV1 - */ -std::string QueryContextRequest::render(void) +std::string QueryContextRequest::toJsonV1(void) { std::string out = ""; bool attributeListRendered = attributeList.size() != 0; @@ -103,9 +103,9 @@ std::string QueryContextRequest::render(void) bool commaAfterEntityIdVector = attributeListRendered || restrictionRendered; out += startTag(); - out += entityIdVector.render(commaAfterEntityIdVector); - out += attributeList.render(commaAfterAttributeList, "attributes"); - out += restriction.render(restrictions, false); + out += entityIdVector.toJsonV1(commaAfterEntityIdVector); + out += attributeList.toJsonV1(commaAfterAttributeList, "attributes"); + out += restriction.toJsonV1(restrictions, false); out += endTag(); return out; @@ -138,7 +138,7 @@ std::string QueryContextRequest::check(ApiVersion apiVersion, bool asJsonObject, return "OK"; } - return response.render(asJsonObject); + return response.toJsonV1(asJsonObject); } diff --git a/src/lib/ngsi10/QueryContextRequest.h b/src/lib/ngsi10/QueryContextRequest.h index 90ebdd601e..842daf4280 100644 --- a/src/lib/ngsi10/QueryContextRequest.h +++ b/src/lib/ngsi10/QueryContextRequest.h @@ -61,7 +61,7 @@ typedef struct QueryContextRequest QueryContextRequest(const std::string& _contextProvider, EntityId* eP, const std::string& attributeName); QueryContextRequest(const std::string& _contextProvider, EntityId* eP, const StringList& attributeList); - std::string render(void); + std::string toJsonV1(void); std::string check(ApiVersion apiVersion, bool asJsonObject, const std::string& predetectedError); void release(void); void fill(const std::string& entityId, const std::string& entityType, const std::string& attributeName); diff --git a/src/lib/ngsi10/QueryContextResponse.cpp b/src/lib/ngsi10/QueryContextResponse.cpp index 6e6f11e358..1b9073cf0f 100644 --- a/src/lib/ngsi10/QueryContextResponse.cpp +++ b/src/lib/ngsi10/QueryContextResponse.cpp @@ -92,9 +92,9 @@ QueryContextResponse::~QueryContextResponse() /* **************************************************************************** * -* QueryContextResponse::render - +* QueryContextResponse::toJsonV1 - */ -std::string QueryContextResponse::render(bool asJsonObject) +std::string QueryContextResponse::toJsonV1(bool asJsonObject) { std::string out = ""; bool errorCodeRendered = false; @@ -131,12 +131,12 @@ std::string QueryContextResponse::render(bool asJsonObject) if (contextElementResponseVector.size() > 0) { - out += contextElementResponseVector.render(asJsonObject, QueryContext, emptyV, false, emptyV, errorCodeRendered); + out += contextElementResponseVector.toJsonV1(asJsonObject, QueryContext, emptyV, false, emptyV, errorCodeRendered); } if (errorCodeRendered == true) { - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } @@ -150,7 +150,7 @@ std::string QueryContextResponse::render(bool asJsonObject) { LM_W(("Internal Error (Both error-code and response vector empty)")); errorCode.fill(SccReceiverInternalError, "Both the error-code structure and the response vector were empty"); - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } out += endTag(); @@ -182,7 +182,7 @@ std::string QueryContextResponse::check(ApiVersion apiVersion, bool asJsonObject return "OK"; } - return render(asJsonObject); + return toJsonV1(asJsonObject); } diff --git a/src/lib/ngsi10/QueryContextResponse.h b/src/lib/ngsi10/QueryContextResponse.h index 64a67e543c..bd29c88e6b 100644 --- a/src/lib/ngsi10/QueryContextResponse.h +++ b/src/lib/ngsi10/QueryContextResponse.h @@ -52,7 +52,7 @@ typedef struct QueryContextResponse QueryContextResponse(StatusCode& _errorCode); ~QueryContextResponse(); - std::string render(bool asJsonObject); + std::string toJsonV1(bool asJsonObject); std::string check(ApiVersion apiVersion, bool asJsonObject, const std::string& predetectedError); void release(void); void fill(QueryContextResponse* qcrsP); diff --git a/src/lib/ngsi10/SubscribeContextRequest.cpp b/src/lib/ngsi10/SubscribeContextRequest.cpp index f12113b694..5038ef83ec 100644 --- a/src/lib/ngsi10/SubscribeContextRequest.cpp +++ b/src/lib/ngsi10/SubscribeContextRequest.cpp @@ -61,7 +61,7 @@ std::string SubscribeContextRequest::check(const std::string& predetectedError, { alarmMgr.badInput(clientIp, res); response.subscribeError.errorCode.fill(SccBadRequest, std::string("invalid payload: ") + res); - return response.render(); + return response.toJsonV1(); } return "OK"; diff --git a/src/lib/ngsi10/SubscribeContextResponse.cpp b/src/lib/ngsi10/SubscribeContextResponse.cpp index a871fa4879..b13d874267 100644 --- a/src/lib/ngsi10/SubscribeContextResponse.cpp +++ b/src/lib/ngsi10/SubscribeContextResponse.cpp @@ -70,7 +70,9 @@ std::string SubscribeContextResponse::toJson(void) if (subscribeError.errorCode.code == SccNone) { - out += subscribeResponse.render(false); + // FIXME P5: it is a bit weird to call a toJsonV1() method from a toJson() method. However, + // SubscribeResponse doesn't have another option. This should be looked into detail. + out += subscribeResponse.toJsonV1(false); } else { @@ -84,9 +86,9 @@ std::string SubscribeContextResponse::toJson(void) /* **************************************************************************** * -* SubscribeContextResponse::render - +* SubscribeContextResponse::toJsonV1 - */ -std::string SubscribeContextResponse::render(void) +std::string SubscribeContextResponse::toJsonV1(void) { std::string out = ""; @@ -94,11 +96,11 @@ std::string SubscribeContextResponse::render(void) if (subscribeError.errorCode.code == SccNone) { - out += subscribeResponse.render(false); + out += subscribeResponse.toJsonV1(false); } else { - out += subscribeError.render(SubscribeContext, false); + out += subscribeError.toJsonV1(SubscribeContext, false); } out += endTag(false); diff --git a/src/lib/ngsi10/SubscribeContextResponse.h b/src/lib/ngsi10/SubscribeContextResponse.h index 1e08fbc2aa..dc795040dc 100644 --- a/src/lib/ngsi10/SubscribeContextResponse.h +++ b/src/lib/ngsi10/SubscribeContextResponse.h @@ -46,7 +46,7 @@ typedef struct SubscribeContextResponse SubscribeContextResponse(StatusCode& errorCode); ~SubscribeContextResponse(); - std::string render(void); + std::string toJsonV1(void); std::string toJson(void); } SubscribeContextResponse; diff --git a/src/lib/ngsi10/UnsubscribeContextRequest.cpp b/src/lib/ngsi10/UnsubscribeContextRequest.cpp index 49caa8946e..af727ad495 100644 --- a/src/lib/ngsi10/UnsubscribeContextRequest.cpp +++ b/src/lib/ngsi10/UnsubscribeContextRequest.cpp @@ -33,14 +33,14 @@ /* **************************************************************************** * -* UnsubscribeContextRequest::render - +* UnsubscribeContextRequest::toJsonV1 - */ -std::string UnsubscribeContextRequest::render(void) +std::string UnsubscribeContextRequest::toJsonV1(void) { std::string out = ""; out += startTag(); - out += subscriptionId.render(UnsubscribeContext, false); + out += subscriptionId.toJsonV1(UnsubscribeContext, false); out += endTag(); return out; @@ -60,7 +60,7 @@ std::string UnsubscribeContextRequest::check() if ((res = subscriptionId.check()) != "OK") { response.statusCode.fill(SccBadRequest, std::string("Invalid Subscription Id: /") + subscriptionId.get() + "/: " + res); - return response.render(); + return response.toJsonV1(); } return "OK"; diff --git a/src/lib/ngsi10/UnsubscribeContextRequest.h b/src/lib/ngsi10/UnsubscribeContextRequest.h index 52f50be4ce..d8b9d2a101 100644 --- a/src/lib/ngsi10/UnsubscribeContextRequest.h +++ b/src/lib/ngsi10/UnsubscribeContextRequest.h @@ -39,7 +39,7 @@ typedef struct UnsubscribeContextRequest { SubscriptionId subscriptionId; // Mandatory - std::string render(void); + std::string toJsonV1(void); std::string check(void); void release(void); } UnsubscribeContextRequest; diff --git a/src/lib/ngsi10/UnsubscribeContextResponse.cpp b/src/lib/ngsi10/UnsubscribeContextResponse.cpp index 7618d15a45..1e8b80d37c 100644 --- a/src/lib/ngsi10/UnsubscribeContextResponse.cpp +++ b/src/lib/ngsi10/UnsubscribeContextResponse.cpp @@ -64,15 +64,15 @@ UnsubscribeContextResponse::~UnsubscribeContextResponse() /* **************************************************************************** * -* UnsubscribeContextResponse::render - +* UnsubscribeContextResponse::toJsonV1 - */ -std::string UnsubscribeContextResponse::render(void) +std::string UnsubscribeContextResponse::toJsonV1(void) { std::string out = ""; out += startTag(); - out += subscriptionId.render(RtUnsubscribeContextResponse, true); - out += statusCode.render(false); + out += subscriptionId.toJsonV1(RtUnsubscribeContextResponse, true); + out += statusCode.toJsonV1(false); out += endTag(); return out; diff --git a/src/lib/ngsi10/UnsubscribeContextResponse.h b/src/lib/ngsi10/UnsubscribeContextResponse.h index e3570deffd..732e12280d 100644 --- a/src/lib/ngsi10/UnsubscribeContextResponse.h +++ b/src/lib/ngsi10/UnsubscribeContextResponse.h @@ -49,7 +49,7 @@ typedef struct UnsubscribeContextResponse UnsubscribeContextResponse(StatusCode& statusCode); ~UnsubscribeContextResponse(); - std::string render(void); + std::string toJsonV1(void); void release(void); } UnsubscribeContextResponse; diff --git a/src/lib/ngsi10/UpdateContextRequest.cpp b/src/lib/ngsi10/UpdateContextRequest.cpp index e8781841a8..2aab00682b 100644 --- a/src/lib/ngsi10/UpdateContextRequest.cpp +++ b/src/lib/ngsi10/UpdateContextRequest.cpp @@ -62,9 +62,9 @@ UpdateContextRequest::UpdateContextRequest(const std::string& _contextProvider, /* **************************************************************************** * -* UpdateContextRequest::render - +* UpdateContextRequest::toJsonV1 - */ -std::string UpdateContextRequest::render(bool asJsonObject) +std::string UpdateContextRequest::toJsonV1(bool asJsonObject) { std::string out = ""; @@ -72,7 +72,7 @@ std::string UpdateContextRequest::render(bool asJsonObject) // Both fields are MANDATORY, so, comma after "contextElementVector" // out += startTag(); - out += contextElementVector.render(asJsonObject, UpdateContext, true); + out += contextElementVector.toJsonV1(asJsonObject, UpdateContext, true); out += valueTag("updateAction", actionTypeString(V1, updateActionType), false); out += endTag(false); @@ -92,13 +92,13 @@ std::string UpdateContextRequest::check(ApiVersion apiVersion, bool asJsonObject if (predetectedError != "") { response.errorCode.fill(SccBadRequest, predetectedError); - return response.render(asJsonObject); + return response.toJsonV1(asJsonObject); } if ((res = contextElementVector.check(apiVersion, UpdateContext)) != "OK") { response.errorCode.fill(SccBadRequest, res); - return response.render(asJsonObject); + return response.toJsonV1(asJsonObject); } return "OK"; diff --git a/src/lib/ngsi10/UpdateContextRequest.h b/src/lib/ngsi10/UpdateContextRequest.h index 0466e4fadf..c0d9b9997c 100644 --- a/src/lib/ngsi10/UpdateContextRequest.h +++ b/src/lib/ngsi10/UpdateContextRequest.h @@ -59,7 +59,7 @@ typedef struct UpdateContextRequest UpdateContextRequest(); UpdateContextRequest(const std::string& _contextProvider, Entity* eP); - std::string render(bool asJsonObject); + std::string toJsonV1(bool asJsonObject); std::string check(ApiVersion apiVersion, bool asJsonObject, const std::string& predetectedError); void release(void); ContextAttribute* attributeLookup(Entity* eP, const std::string& attributeName); diff --git a/src/lib/ngsi10/UpdateContextResponse.cpp b/src/lib/ngsi10/UpdateContextResponse.cpp index 3a980043a5..b0893fbd6c 100644 --- a/src/lib/ngsi10/UpdateContextResponse.cpp +++ b/src/lib/ngsi10/UpdateContextResponse.cpp @@ -78,9 +78,9 @@ UpdateContextResponse::~UpdateContextResponse() /* **************************************************************************** * -* UpdateContextResponse::render - +* UpdateContextResponse::toJsonV1 - */ -std::string UpdateContextResponse::render(bool asJsonObject) +std::string UpdateContextResponse::toJsonV1(bool asJsonObject) { std::string out = ""; @@ -88,21 +88,21 @@ std::string UpdateContextResponse::render(bool asJsonObject) if ((errorCode.code != SccNone) && (errorCode.code != SccOk)) { - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } else { if (contextElementResponseVector.size() == 0) { errorCode.fill(SccContextElementNotFound, errorCode.details); - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } else { // No attribute or metadata filter in this case, an empty vector is used to fulfil method signature std::vector emptyV; - out += contextElementResponseVector.render(asJsonObject, RtUpdateContextResponse, emptyV, false, emptyV, false); + out += contextElementResponseVector.toJsonV1(asJsonObject, RtUpdateContextResponse, emptyV, false, emptyV, false); } } @@ -140,7 +140,7 @@ std::string UpdateContextResponse::check return "OK"; } - return render(asJsonObject); + return toJsonV1(asJsonObject); } diff --git a/src/lib/ngsi10/UpdateContextResponse.h b/src/lib/ngsi10/UpdateContextResponse.h index f97461f679..8232e5247e 100644 --- a/src/lib/ngsi10/UpdateContextResponse.h +++ b/src/lib/ngsi10/UpdateContextResponse.h @@ -50,7 +50,7 @@ typedef struct UpdateContextResponse UpdateContextResponse(StatusCode& _errorCode); ~UpdateContextResponse(); - std::string render(bool asJsonObject); + std::string toJsonV1(bool asJsonObject); std::string check(ApiVersion apiVersion, bool asJsonObject, const std::string& predetectedError); void release(void); void fill(UpdateContextResponse* upcrsP); diff --git a/src/lib/ngsi10/UpdateContextSubscriptionRequest.cpp b/src/lib/ngsi10/UpdateContextSubscriptionRequest.cpp index 41a40e3552..f9ae2c3714 100644 --- a/src/lib/ngsi10/UpdateContextSubscriptionRequest.cpp +++ b/src/lib/ngsi10/UpdateContextSubscriptionRequest.cpp @@ -76,7 +76,7 @@ std::string UpdateContextSubscriptionRequest::check(const std::string& predetect else return "OK"; - return response.render(); + return response.toJsonV1(); } diff --git a/src/lib/ngsi10/UpdateContextSubscriptionResponse.cpp b/src/lib/ngsi10/UpdateContextSubscriptionResponse.cpp index 8d93858b2b..8acf4835ab 100644 --- a/src/lib/ngsi10/UpdateContextSubscriptionResponse.cpp +++ b/src/lib/ngsi10/UpdateContextSubscriptionResponse.cpp @@ -61,9 +61,9 @@ UpdateContextSubscriptionResponse::~UpdateContextSubscriptionResponse() { /* **************************************************************************** * -* UpdateContextSubscriptionResponse::render - +* UpdateContextSubscriptionResponse::toJsonV1 - */ -std::string UpdateContextSubscriptionResponse::render(void) +std::string UpdateContextSubscriptionResponse::toJsonV1(void) { std::string out = ""; @@ -71,11 +71,11 @@ std::string UpdateContextSubscriptionResponse::render(void) if (subscribeError.errorCode.code == SccNone) { - out += subscribeResponse.render(false); + out += subscribeResponse.toJsonV1(false); } else { - out += subscribeError.render(UpdateContextSubscription, false); + out += subscribeError.toJsonV1(UpdateContextSubscription, false); } out += endTag(); diff --git a/src/lib/ngsi10/UpdateContextSubscriptionResponse.h b/src/lib/ngsi10/UpdateContextSubscriptionResponse.h index b1c2c82e9c..2a01fc4379 100644 --- a/src/lib/ngsi10/UpdateContextSubscriptionResponse.h +++ b/src/lib/ngsi10/UpdateContextSubscriptionResponse.h @@ -46,7 +46,7 @@ typedef struct UpdateContextSubscriptionResponse UpdateContextSubscriptionResponse(StatusCode& errorCode); ~UpdateContextSubscriptionResponse(); - std::string render(void); + std::string toJsonV1(void); } UpdateContextSubscriptionResponse; #endif // SRC_LIB_NGSI10_UPDATECONTEXTSUBSCRIPTIONRESPONSE_H_ diff --git a/src/lib/ngsi9/DiscoverContextAvailabilityRequest.cpp b/src/lib/ngsi9/DiscoverContextAvailabilityRequest.cpp index c7ba1f99ff..6d5774ed39 100644 --- a/src/lib/ngsi9/DiscoverContextAvailabilityRequest.cpp +++ b/src/lib/ngsi9/DiscoverContextAvailabilityRequest.cpp @@ -85,7 +85,7 @@ std::string DiscoverContextAvailabilityRequest::check(const std::string& predete else return "OK"; - return response.render(); + return response.toJsonV1(); } diff --git a/src/lib/ngsi9/DiscoverContextAvailabilityResponse.cpp b/src/lib/ngsi9/DiscoverContextAvailabilityResponse.cpp index 804a67d521..30a8fbd61a 100644 --- a/src/lib/ngsi9/DiscoverContextAvailabilityResponse.cpp +++ b/src/lib/ngsi9/DiscoverContextAvailabilityResponse.cpp @@ -68,9 +68,9 @@ DiscoverContextAvailabilityResponse::DiscoverContextAvailabilityResponse(StatusC /* **************************************************************************** * -* DiscoverContextAvailabilityResponse::render - +* DiscoverContextAvailabilityResponse::toJsonV1 - */ -std::string DiscoverContextAvailabilityResponse::render(void) +std::string DiscoverContextAvailabilityResponse::toJsonV1(void) { std::string out = ""; @@ -84,19 +84,19 @@ std::string DiscoverContextAvailabilityResponse::render(void) if (responseVector.size() > 0) { bool commaNeeded = (errorCode.code != SccNone); - out += responseVector.render(commaNeeded); + out += responseVector.toJsonV1(commaNeeded); } if (errorCode.code != SccNone) { - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } /* Safety check: neither errorCode nor CER vector was filled by mongoBackend */ if (errorCode.code == SccNone && responseVector.size() == 0) { errorCode.fill(SccReceiverInternalError, "Both the error-code structure and the response vector were empty"); - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } out += endTag(); diff --git a/src/lib/ngsi9/DiscoverContextAvailabilityResponse.h b/src/lib/ngsi9/DiscoverContextAvailabilityResponse.h index f836291e5a..c8e86c4f5b 100644 --- a/src/lib/ngsi9/DiscoverContextAvailabilityResponse.h +++ b/src/lib/ngsi9/DiscoverContextAvailabilityResponse.h @@ -47,7 +47,7 @@ typedef struct DiscoverContextAvailabilityResponse ~DiscoverContextAvailabilityResponse(); DiscoverContextAvailabilityResponse(StatusCode& _errorCode); - std::string render(void); + std::string toJsonV1(void); void release(void); } DiscoverContextAvailabilityResponse; diff --git a/src/lib/ngsi9/NotifyContextAvailabilityRequest.cpp b/src/lib/ngsi9/NotifyContextAvailabilityRequest.cpp index 33c9163444..c654cf9901 100644 --- a/src/lib/ngsi9/NotifyContextAvailabilityRequest.cpp +++ b/src/lib/ngsi9/NotifyContextAvailabilityRequest.cpp @@ -44,9 +44,9 @@ NotifyContextAvailabilityRequest::NotifyContextAvailabilityRequest() /* **************************************************************************** * -* NotifyContextAvailabilityRequest::render - +* NotifyContextAvailabilityRequest::toJsonV1 - */ -std::string NotifyContextAvailabilityRequest::render(void) +std::string NotifyContextAvailabilityRequest::toJsonV1(void) { std::string out = ""; @@ -57,8 +57,8 @@ std::string NotifyContextAvailabilityRequest::render(void) // With an empty contextRegistrationResponseVector there would be no notification // out += startTag(); - out += subscriptionId.render(NotifyContextAvailability, true); - out += contextRegistrationResponseVector.render(false); + out += subscriptionId.toJsonV1(NotifyContextAvailability, true); + out += contextRegistrationResponseVector.toJsonV1(false); out += endTag(); return out; @@ -89,7 +89,7 @@ std::string NotifyContextAvailabilityRequest::check(ApiVersion apiVersion, const return "OK"; } - return response.render(); + return response.toJsonV1(); } diff --git a/src/lib/ngsi9/NotifyContextAvailabilityRequest.h b/src/lib/ngsi9/NotifyContextAvailabilityRequest.h index d6a45f6533..d0e9ee4d55 100644 --- a/src/lib/ngsi9/NotifyContextAvailabilityRequest.h +++ b/src/lib/ngsi9/NotifyContextAvailabilityRequest.h @@ -43,7 +43,7 @@ typedef struct NotifyContextAvailabilityRequest NotifyContextAvailabilityRequest(); - std::string render(void); + std::string toJsonV1(void); std::string check(ApiVersion apiVersion, const std::string& predetectedError); void release(void); } NotifyContextAvailabilityRequest; diff --git a/src/lib/ngsi9/NotifyContextAvailabilityResponse.cpp b/src/lib/ngsi9/NotifyContextAvailabilityResponse.cpp index cfe9a5c2b3..a9770d9f18 100644 --- a/src/lib/ngsi9/NotifyContextAvailabilityResponse.cpp +++ b/src/lib/ngsi9/NotifyContextAvailabilityResponse.cpp @@ -60,16 +60,16 @@ NotifyContextAvailabilityResponse::NotifyContextAvailabilityResponse(StatusCode& /* **************************************************************************** * -* NotifyContextAvailabilityResponse::render - +* NotifyContextAvailabilityResponse::toJsonV1 - */ -std::string NotifyContextAvailabilityResponse::render(void) +std::string NotifyContextAvailabilityResponse::toJsonV1(void) { std::string out = ""; responseCode.keyNameSet("responseCode"); out += startTag(); - out += responseCode.render(false); + out += responseCode.toJsonV1(false); out += endTag(); return out; diff --git a/src/lib/ngsi9/NotifyContextAvailabilityResponse.h b/src/lib/ngsi9/NotifyContextAvailabilityResponse.h index 8fbdfbe209..f5bda61218 100644 --- a/src/lib/ngsi9/NotifyContextAvailabilityResponse.h +++ b/src/lib/ngsi9/NotifyContextAvailabilityResponse.h @@ -43,7 +43,7 @@ typedef struct NotifyContextAvailabilityResponse NotifyContextAvailabilityResponse(); NotifyContextAvailabilityResponse(StatusCode& sc); - std::string render(void); + std::string toJsonV1(void); void release(void); } NotifyContextAvailabilityResponse; diff --git a/src/lib/ngsi9/RegisterContextRequest.cpp b/src/lib/ngsi9/RegisterContextRequest.cpp index 88d348e4bb..763fe9f3aa 100644 --- a/src/lib/ngsi9/RegisterContextRequest.cpp +++ b/src/lib/ngsi9/RegisterContextRequest.cpp @@ -40,9 +40,9 @@ /* **************************************************************************** * -* RegisterContextRequest::render - +* RegisterContextRequest::toJsonV1 - */ -std::string RegisterContextRequest::render(void) +std::string RegisterContextRequest::toJsonV1(void) { std::string out = ""; bool durationRendered = duration.get() != ""; @@ -53,9 +53,9 @@ std::string RegisterContextRequest::render(void) out += startTag(); - out += contextRegistrationVector.render( commaAfterContextRegistrationVector); - out += duration.render( commaAfterDuration); - out += registrationId.render(RegisterContext, commaAfterRegistrationId); + out += contextRegistrationVector.toJsonV1( commaAfterContextRegistrationVector); + out += duration.toJsonV1( commaAfterDuration); + out += registrationId.toJsonV1(RegisterContext, commaAfterRegistrationId); out += endTag(false); @@ -95,7 +95,7 @@ std::string RegisterContextRequest::check(ApiVersion apiVersion, const std::stri return "OK"; } - return response.render(); + return response.toJsonV1(); } diff --git a/src/lib/ngsi9/RegisterContextRequest.h b/src/lib/ngsi9/RegisterContextRequest.h index ce585ba828..9879d4a952 100644 --- a/src/lib/ngsi9/RegisterContextRequest.h +++ b/src/lib/ngsi9/RegisterContextRequest.h @@ -47,7 +47,7 @@ typedef struct RegisterContextRequest std::string servicePath; // Not part of payload, just an internal field - std::string render(void); + std::string toJsonV1(void); std::string check(ApiVersion apiVersion, const std::string& predetectedError, int counter); void release(void); void fill(RegisterProviderRequest& rpr, const std::string& entityId, const std::string& entityType, const std::string& attributeName); diff --git a/src/lib/ngsi9/RegisterContextResponse.cpp b/src/lib/ngsi9/RegisterContextResponse.cpp index f057eed22c..dd131db97e 100644 --- a/src/lib/ngsi9/RegisterContextResponse.cpp +++ b/src/lib/ngsi9/RegisterContextResponse.cpp @@ -97,9 +97,9 @@ RegisterContextResponse::RegisterContextResponse(const std::string& _registratio /* **************************************************************************** * -* RegisterContextResponse::render - +* RegisterContextResponse::toJsonV1 - */ -std::string RegisterContextResponse::render(void) +std::string RegisterContextResponse::toJsonV1(void) { std::string out = ""; bool errorCodeRendered = (errorCode.code != SccNone) && (errorCode.code != SccOk); @@ -108,14 +108,14 @@ std::string RegisterContextResponse::render(void) if (!errorCodeRendered) { - out += duration.render(true); + out += duration.toJsonV1(true); } - out += registrationId.render(RegisterResponse, errorCodeRendered); + out += registrationId.toJsonV1(RegisterResponse, errorCodeRendered); if (errorCodeRendered) { - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } out += endTag(); @@ -129,7 +129,7 @@ std::string RegisterContextResponse::render(void) * * RegisterContextResponse::check - */ -std::string RegisterContextResponse::check(const std::string& predetectedError, int counter) +std::string RegisterContextResponse::check(const std::string& predetectedError) { RegisterContextResponse response; std::string res; @@ -146,7 +146,7 @@ std::string RegisterContextResponse::check(const std::string& predetectedError, else return "OK"; - return response.render(); + return response.toJsonV1(); } diff --git a/src/lib/ngsi9/RegisterContextResponse.h b/src/lib/ngsi9/RegisterContextResponse.h index 05b1ba53e4..15c7134d6e 100644 --- a/src/lib/ngsi9/RegisterContextResponse.h +++ b/src/lib/ngsi9/RegisterContextResponse.h @@ -50,8 +50,8 @@ typedef struct RegisterContextResponse RegisterContextResponse(const std::string& _registrationId, const std::string& _duration); RegisterContextResponse(const std::string& _registrationId, StatusCode& _errorCode); - std::string render(void); - std::string check(const std::string& predetectedError, int counter); + std::string toJsonV1(void); + std::string check(const std::string& predetectedError); void release(void); } RegisterContextResponse; diff --git a/src/lib/ngsi9/SubscribeContextAvailabilityRequest.cpp b/src/lib/ngsi9/SubscribeContextAvailabilityRequest.cpp index e9c3ee21ab..437c0da7d0 100644 --- a/src/lib/ngsi9/SubscribeContextAvailabilityRequest.cpp +++ b/src/lib/ngsi9/SubscribeContextAvailabilityRequest.cpp @@ -50,9 +50,9 @@ SubscribeContextAvailabilityRequest::SubscribeContextAvailabilityRequest() /* **************************************************************************** * -* SubscribeContextAvailabilityRequest::render - +* SubscribeContextAvailabilityRequest::toJsonV1 - */ -std::string SubscribeContextAvailabilityRequest::render(void) +std::string SubscribeContextAvailabilityRequest::toJsonV1(void) { std::string out = ""; bool commaAfterEntityIdVector = (restrictions > 0) || !duration.isEmpty() || !reference.isEmpty() || (attributeList.size() != 0); @@ -61,11 +61,11 @@ std::string SubscribeContextAvailabilityRequest::render(void) bool commaAfterDuration = restrictions > 0; out += startTag(); - out += entityIdVector.render(commaAfterEntityIdVector); - out += attributeList.render(commaAfterAttributeList, "attributes"); - out += reference.render(commaAfterReference); - out += duration.render(commaAfterDuration); - out += restriction.render(restrictions, true); + out += entityIdVector.toJsonV1(commaAfterEntityIdVector); + out += attributeList.toJsonV1(commaAfterAttributeList, "attributes"); + out += reference.toJsonV1(commaAfterReference); + out += duration.toJsonV1(commaAfterDuration); + out += restriction.toJsonV1(restrictions, true); out += endTag(); return out; @@ -97,7 +97,7 @@ std::string SubscribeContextAvailabilityRequest::check(const std::string& predet else return "OK"; - return response.render(); + return response.toJsonV1(); } diff --git a/src/lib/ngsi9/SubscribeContextAvailabilityRequest.h b/src/lib/ngsi9/SubscribeContextAvailabilityRequest.h index ae25d52121..3c8d59d8da 100644 --- a/src/lib/ngsi9/SubscribeContextAvailabilityRequest.h +++ b/src/lib/ngsi9/SubscribeContextAvailabilityRequest.h @@ -64,7 +64,7 @@ typedef struct SubscribeContextAvailabilityRequest int restrictions; SubscribeContextAvailabilityRequest(); - std::string render(void); + std::string toJsonV1(void); std::string check(const std::string& predetectedError); void release(void); diff --git a/src/lib/ngsi9/SubscribeContextAvailabilityResponse.cpp b/src/lib/ngsi9/SubscribeContextAvailabilityResponse.cpp index 97e745e31b..0ade812dd0 100644 --- a/src/lib/ngsi9/SubscribeContextAvailabilityResponse.cpp +++ b/src/lib/ngsi9/SubscribeContextAvailabilityResponse.cpp @@ -82,7 +82,7 @@ SubscribeContextAvailabilityResponse::SubscribeContextAvailabilityResponse(const * * SubscribeContextAvailabilityResponse::render - */ -std::string SubscribeContextAvailabilityResponse::render(void) +std::string SubscribeContextAvailabilityResponse::toJsonV1(void) { std::string out = ""; bool durationRendered = !duration.isEmpty(); @@ -90,11 +90,13 @@ std::string SubscribeContextAvailabilityResponse::render(void) out += startTag(); - out += subscriptionId.render(RtSubscribeContextAvailabilityResponse, durationRendered || errorCodeRendered); - out += duration.render(errorCodeRendered); + out += subscriptionId.toJsonV1(RtSubscribeContextAvailabilityResponse, durationRendered || errorCodeRendered); + out += duration.toJsonV1(errorCodeRendered); if (errorCodeRendered) - out += errorCode.render(false); + { + out += errorCode.toJsonV1(false); + } out += endTag(); diff --git a/src/lib/ngsi9/SubscribeContextAvailabilityResponse.h b/src/lib/ngsi9/SubscribeContextAvailabilityResponse.h index 4693f4ced6..cc3e5af293 100644 --- a/src/lib/ngsi9/SubscribeContextAvailabilityResponse.h +++ b/src/lib/ngsi9/SubscribeContextAvailabilityResponse.h @@ -48,7 +48,7 @@ typedef struct SubscribeContextAvailabilityResponse SubscribeContextAvailabilityResponse(const std::string& _subscriptionId, const std::string& _duration); SubscribeContextAvailabilityResponse(const std::string& _subscriptionId, StatusCode& _errorCode); - std::string render(void); + std::string toJsonV1(void); } SubscribeContextAvailabilityResponse; #endif // SRC_LIB_NGSI9_SUBSCRIBECONTEXTAVAILABILITYRESPONSE_H_ diff --git a/src/lib/ngsi9/UnsubscribeContextAvailabilityRequest.cpp b/src/lib/ngsi9/UnsubscribeContextAvailabilityRequest.cpp index b79667bcdd..623e8c9502 100644 --- a/src/lib/ngsi9/UnsubscribeContextAvailabilityRequest.cpp +++ b/src/lib/ngsi9/UnsubscribeContextAvailabilityRequest.cpp @@ -72,7 +72,7 @@ std::string UnsubscribeContextAvailabilityRequest::check(const std::string& pred else return "OK"; - return response.render(); + return response.toJsonV1(); } diff --git a/src/lib/ngsi9/UnsubscribeContextAvailabilityResponse.cpp b/src/lib/ngsi9/UnsubscribeContextAvailabilityResponse.cpp index 37e576d6da..b43993719a 100644 --- a/src/lib/ngsi9/UnsubscribeContextAvailabilityResponse.cpp +++ b/src/lib/ngsi9/UnsubscribeContextAvailabilityResponse.cpp @@ -72,16 +72,16 @@ UnsubscribeContextAvailabilityResponse::~UnsubscribeContextAvailabilityResponse( /* **************************************************************************** * -* UnsubscribeContextAvailabilityResponse::render - +* UnsubscribeContextAvailabilityResponse::toJsonV1 - */ -std::string UnsubscribeContextAvailabilityResponse::render(void) +std::string UnsubscribeContextAvailabilityResponse::toJsonV1(void) { std::string out = ""; out += startTag(); - out += subscriptionId.render(RtUnsubscribeContextAvailabilityResponse, true); // always json comma - statusCode is mandatory - out += statusCode.render(false); + out += subscriptionId.toJsonV1(RtUnsubscribeContextAvailabilityResponse, true); // always json comma - statusCode is mandatory + out += statusCode.toJsonV1(false); out += endTag(); diff --git a/src/lib/ngsi9/UnsubscribeContextAvailabilityResponse.h b/src/lib/ngsi9/UnsubscribeContextAvailabilityResponse.h index af7dabf9a7..b8c6dc1294 100644 --- a/src/lib/ngsi9/UnsubscribeContextAvailabilityResponse.h +++ b/src/lib/ngsi9/UnsubscribeContextAvailabilityResponse.h @@ -46,7 +46,7 @@ typedef struct UnsubscribeContextAvailabilityResponse UnsubscribeContextAvailabilityResponse(SubscriptionId _subscriptionId); ~UnsubscribeContextAvailabilityResponse(); - std::string render(void); + std::string toJsonV1(void); } UnsubscribeContextAvailabilityResponse; #endif // SRC_LIB_NGSI9_UNSUBSCRIBECONTEXTAVAILABILITYRESPONSE_H_ diff --git a/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionRequest.cpp b/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionRequest.cpp index a9f9e150d8..15fde92151 100644 --- a/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionRequest.cpp +++ b/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionRequest.cpp @@ -47,9 +47,9 @@ UpdateContextAvailabilitySubscriptionRequest::UpdateContextAvailabilitySubscript /* **************************************************************************** * -* UpdateContextAvailabilitySubscriptionRequest::render - +* UpdateContextAvailabilitySubscriptionRequest::toJsonV1 - */ -std::string UpdateContextAvailabilitySubscriptionRequest::render(void) +std::string UpdateContextAvailabilitySubscriptionRequest::toJsonV1(void) { std::string out = ""; bool subscriptionRendered = subscriptionId.rendered(UpdateContextAvailabilitySubscription); @@ -63,11 +63,11 @@ std::string UpdateContextAvailabilitySubscriptionRequest::render(void) bool commaAfterEntityIdVector = attributeListRendered || durationRendered || restrictionRendered || subscriptionRendered; out += startTag(); - out += entityIdVector.render(commaAfterEntityIdVector); - out += attributeList.render(commaAfterAttributeList, "attributes"); - out += duration.render(commaAfterDuration); - out += restriction.render(restrictions, commaAfterRestriction); - out += subscriptionId.render(UpdateContextAvailabilitySubscription, commaAfterSubscriptionId); + out += entityIdVector.toJsonV1(commaAfterEntityIdVector); + out += attributeList.toJsonV1(commaAfterAttributeList, "attributes"); + out += duration.toJsonV1(commaAfterDuration); + out += restriction.toJsonV1(restrictions, commaAfterRestriction); + out += subscriptionId.toJsonV1(UpdateContextAvailabilitySubscription, commaAfterSubscriptionId); out += endTag(); return out; @@ -101,7 +101,7 @@ std::string UpdateContextAvailabilitySubscriptionRequest::check(const std::strin else return "OK"; - return response.render(); + return response.toJsonV1(); } diff --git a/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionRequest.h b/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionRequest.h index 2d1290729f..68f2b7812e 100644 --- a/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionRequest.h +++ b/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionRequest.h @@ -54,7 +54,7 @@ typedef struct UpdateContextAvailabilitySubscriptionRequest UpdateContextAvailabilitySubscriptionRequest(); - std::string render(void); + std::string toJsonV1(void); std::string check(const std::string& predetectedError, int counter); void release(void); } UpdateContextAvailabilitySubscriptionRequest; diff --git a/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionResponse.cpp b/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionResponse.cpp index 2bf41e4bcb..cfca0a5664 100644 --- a/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionResponse.cpp +++ b/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionResponse.cpp @@ -70,9 +70,9 @@ UpdateContextAvailabilitySubscriptionResponse::~UpdateContextAvailabilitySubscri /* **************************************************************************** * -* UpdateContextAvailabilitySubscriptionResponse::render - +* UpdateContextAvailabilitySubscriptionResponse::toJsonV1 - */ -std::string UpdateContextAvailabilitySubscriptionResponse::render(void) +std::string UpdateContextAvailabilitySubscriptionResponse::toJsonV1(void) { std::string out = ""; bool durationRendered = !duration.isEmpty(); @@ -80,12 +80,12 @@ std::string UpdateContextAvailabilitySubscriptionResponse::render(void) out += startTag(); - out += subscriptionId.render(RtUpdateContextAvailabilitySubscriptionResponse, errorCodeRendered || durationRendered); - out += duration.render(errorCodeRendered); + out += subscriptionId.toJsonV1(RtUpdateContextAvailabilitySubscriptionResponse, errorCodeRendered || durationRendered); + out += duration.toJsonV1(errorCodeRendered); if (errorCodeRendered) { - out += errorCode.render(false); + out += errorCode.toJsonV1(false); } out += endTag(); @@ -111,7 +111,9 @@ std::string UpdateContextAvailabilitySubscriptionResponse::check(const std::stri errorCode.fill(SccBadRequest, res); } else + { return "OK"; + } - return render(); + return toJsonV1(); } diff --git a/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionResponse.h b/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionResponse.h index 1fc58d75ea..867e89759c 100644 --- a/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionResponse.h +++ b/src/lib/ngsi9/UpdateContextAvailabilitySubscriptionResponse.h @@ -49,7 +49,7 @@ typedef struct UpdateContextAvailabilitySubscriptionResponse UpdateContextAvailabilitySubscriptionResponse(StatusCode& _errorCode); ~UpdateContextAvailabilitySubscriptionResponse(); - std::string render(void); + std::string toJsonV1(void); std::string check(const std::string& predetectedError); } UpdateContextAvailabilitySubscriptionResponse; diff --git a/src/lib/ngsiNotify/Notifier.cpp b/src/lib/ngsiNotify/Notifier.cpp index f1655f0941..3c8cba4a4c 100644 --- a/src/lib/ngsiNotify/Notifier.cpp +++ b/src/lib/ngsiNotify/Notifier.cpp @@ -124,7 +124,7 @@ void Notifier::sendNotifyContextAvailabilityRequest ) { /* Render NotifyContextAvailabilityRequest */ - std::string payload = ncar->render(); + std::string payload = ncar->toJsonV1(); /* Parse URL */ std::string host; @@ -249,7 +249,7 @@ static std::vector* buildSenderParamsCustom if (renderFormat == NGSI_V1_LEGACY) { - payload = ncr.render(false, attrsFilter, blacklist, metadataFilter); + payload = ncr.toJsonV1(false, attrsFilter, blacklist, metadataFilter); } else { @@ -483,7 +483,7 @@ std::vector* Notifier::buildSenderParams if (renderFormat == NGSI_V1_LEGACY) { bool asJsonObject = (ci.uriParam[URI_PARAM_ATTRIBUTE_FORMAT] == "object" && ci.outMimeType == JSON); - payloadString = ncr.render(asJsonObject, attrsFilter, blacklist, metadataFilter); + payloadString = ncr.toJsonV1(asJsonObject, attrsFilter, blacklist, metadataFilter); } else { diff --git a/src/lib/orionTypes/EntityType.cpp b/src/lib/orionTypes/EntityType.cpp index c7e4dcac01..d50aa3c8d1 100755 --- a/src/lib/orionTypes/EntityType.cpp +++ b/src/lib/orionTypes/EntityType.cpp @@ -60,7 +60,7 @@ EntityType::EntityType(std::string _type): type(_type), count(0) /* **************************************************************************** * -* EntityType::render - +* EntityType::toJsonV1 - * * This method is used by: * o EntityTypeVector @@ -68,7 +68,7 @@ EntityType::EntityType(std::string _type): type(_type), count(0) * * 'typeNameBefore' is set to TRUE when called from EntityTypeResponse */ -std::string EntityType::render +std::string EntityType::toJsonV1 ( bool asJsonObject, bool asJsonOut, @@ -86,7 +86,7 @@ std::string EntityType::render if (typeNameBefore && asJsonOut) { out += valueTag("name", type, true); - out += contextAttributeVector.render(asJsonObject, EntityTypes, contextAttributeVector.vec, emptyMdV, true, true, true); + out += contextAttributeVector.toJsonV1(asJsonObject, EntityTypes, contextAttributeVector.vec, emptyMdV, true, true, true); } else { @@ -99,7 +99,7 @@ std::string EntityType::render else { out += valueTag("name", type, true); - out += contextAttributeVector.render(asJsonObject, EntityTypes, contextAttributeVector.vec, emptyMdV, false, true, true); + out += contextAttributeVector.toJsonV1(asJsonObject, EntityTypes, contextAttributeVector.vec, emptyMdV, false, true, true); } out += endTag(comma, false); diff --git a/src/lib/orionTypes/EntityType.h b/src/lib/orionTypes/EntityType.h index 9e69bacfd6..b2ed1da00f 100644 --- a/src/lib/orionTypes/EntityType.h +++ b/src/lib/orionTypes/EntityType.h @@ -46,11 +46,11 @@ class EntityType explicit EntityType(std::string _type); std::string check(ApiVersion apiVersion, const std::string& predetectedError); - std::string render(bool asJsonObject, - bool asJsonOut, - bool collapsed, - bool comma = false, - bool typeNameBefore = false); + std::string toJsonV1(bool asJsonObject, + bool asJsonOut, + bool collapsed, + bool comma = false, + bool typeNameBefore = false); void release(void); std::string toJson(bool includeType = false); }; diff --git a/src/lib/orionTypes/EntityTypeResponse.cpp b/src/lib/orionTypes/EntityTypeResponse.cpp index a616280738..8a3697a540 100755 --- a/src/lib/orionTypes/EntityTypeResponse.cpp +++ b/src/lib/orionTypes/EntityTypeResponse.cpp @@ -42,21 +42,21 @@ /* **************************************************************************** * -* EntityTypeResponse::render - +* EntityTypeResponse::toJsonV1 - */ -std::string EntityTypeResponse::render +std::string EntityTypeResponse::toJsonV1 ( - bool asJsonObject, - bool asJsonOut, - bool collapsed + bool asJsonObject, + bool asJsonOut, + bool collapsed ) { std::string out = ""; out += startTag(); - out += entityType.render(asJsonObject, asJsonOut, collapsed, true, true); - out += statusCode.render(false); + out += entityType.toJsonV1(asJsonObject, asJsonOut, collapsed, true, true); + out += statusCode.toJsonV1(false); out += endTag(); @@ -92,7 +92,7 @@ std::string EntityTypeResponse::check else return "OK"; - return render(asJsonObject, asJsonOut, collapsed); + return toJsonV1(asJsonObject, asJsonOut, collapsed); } diff --git a/src/lib/orionTypes/EntityTypeResponse.h b/src/lib/orionTypes/EntityTypeResponse.h index a9505b250f..5b53cde387 100644 --- a/src/lib/orionTypes/EntityTypeResponse.h +++ b/src/lib/orionTypes/EntityTypeResponse.h @@ -44,9 +44,9 @@ class EntityTypeResponse EntityType entityType; StatusCode statusCode; - std::string render(bool asJsonObject, - bool asJsonOut, - bool collapsed); + std::string toJsonV1(bool asJsonObject, + bool asJsonOut, + bool collapsed); std::string toJson(void); std::string check(ApiVersion apiVersion, bool asJsonObject, diff --git a/src/lib/orionTypes/EntityTypeVector.cpp b/src/lib/orionTypes/EntityTypeVector.cpp index fa687e4840..04d8194bb4 100755 --- a/src/lib/orionTypes/EntityTypeVector.cpp +++ b/src/lib/orionTypes/EntityTypeVector.cpp @@ -50,9 +50,9 @@ EntityTypeVector::EntityTypeVector() /* **************************************************************************** * -* EntityTypeVector::render - +* EntityTypeVector::toJsonV1 - */ -std::string EntityTypeVector::render +std::string EntityTypeVector::toJsonV1 ( bool asJsonObject, bool asJsonOut, @@ -68,7 +68,7 @@ std::string EntityTypeVector::render for (unsigned int ix = 0; ix < vec.size(); ++ix) { - out += vec[ix]->render(asJsonObject, asJsonOut, collapsed, ix != vec.size() - 1); + out += vec[ix]->toJsonV1(asJsonObject, asJsonOut, collapsed, ix != vec.size() - 1); } out += endTag(comma, true); } diff --git a/src/lib/orionTypes/EntityTypeVector.h b/src/lib/orionTypes/EntityTypeVector.h index 73cc28b9b9..145306dfff 100644 --- a/src/lib/orionTypes/EntityTypeVector.h +++ b/src/lib/orionTypes/EntityTypeVector.h @@ -47,10 +47,10 @@ class EntityTypeVector unsigned int size(void); void release(void); std::string check(ApiVersion apiVersion, const std::string& predetectedError); - std::string render(bool asJsonObject, - bool asJsonOut, - bool collapsed, - bool comma = false); + std::string toJsonV1(bool asJsonObject, + bool asJsonOut, + bool collapsed, + bool comma = false); EntityType* operator[] (unsigned int ix) const; diff --git a/src/lib/orionTypes/EntityTypeVectorResponse.cpp b/src/lib/orionTypes/EntityTypeVectorResponse.cpp index c7c9c47a61..c809630029 100755 --- a/src/lib/orionTypes/EntityTypeVectorResponse.cpp +++ b/src/lib/orionTypes/EntityTypeVectorResponse.cpp @@ -40,9 +40,9 @@ /* **************************************************************************** * -* EntityTypeVectorResponse::render - +* EntityTypeVectorResponse::toJsonV1 - */ -std::string EntityTypeVectorResponse::render +std::string EntityTypeVectorResponse::toJsonV1 ( bool asJsonObject, bool asJsonOut, @@ -55,10 +55,10 @@ std::string EntityTypeVectorResponse::render if (entityTypeVector.size() > 0) { - out += entityTypeVector.render(asJsonObject, asJsonOut, collapsed, true); + out += entityTypeVector.toJsonV1(asJsonObject, asJsonOut, collapsed, true); } - out += statusCode.render(false); + out += statusCode.toJsonV1(false); out += endTag(); @@ -95,7 +95,7 @@ std::string EntityTypeVectorResponse::check return "OK"; } - return render(asJsonObject, asJsonOut, collapsed); + return toJsonV1(asJsonObject, asJsonOut, collapsed); } diff --git a/src/lib/orionTypes/EntityTypeVectorResponse.h b/src/lib/orionTypes/EntityTypeVectorResponse.h index 9984eed333..bfcca6f9f3 100644 --- a/src/lib/orionTypes/EntityTypeVectorResponse.h +++ b/src/lib/orionTypes/EntityTypeVectorResponse.h @@ -44,9 +44,10 @@ class EntityTypeVectorResponse EntityTypeVector entityTypeVector; StatusCode statusCode; - std::string render(bool asJsonObject, - bool asJsonOut, - bool collapsed); + std::string toJsonV1(bool asJsonObject, + bool asJsonOut, + bool collapsed); + std::string check(ApiVersion apiVersion, bool asJsonObject, bool asJsonOut, diff --git a/src/lib/orionTypes/QueryContextResponseVector.cpp b/src/lib/orionTypes/QueryContextResponseVector.cpp index 280f3a9ef5..4c73b9b7e9 100644 --- a/src/lib/orionTypes/QueryContextResponseVector.cpp +++ b/src/lib/orionTypes/QueryContextResponseVector.cpp @@ -86,9 +86,9 @@ void QueryContextResponseVector::release(void) /* **************************************************************************** * -* QueryContextResponseVector::render - +* QueryContextResponseVector::toJsonV1 - */ -std::string QueryContextResponseVector::render(bool asJsonObject, bool details, const std::string& detailsString) +std::string QueryContextResponseVector::toJsonV1(bool asJsonObject, bool details, const std::string& detailsString) { QueryContextResponse* responseP = new QueryContextResponse(); std::string answer; @@ -196,7 +196,7 @@ std::string QueryContextResponseVector::render(bool asJsonObject, bool details, } } - answer = responseP->render(asJsonObject); + answer = responseP->toJsonV1(asJsonObject); responseP->release(); delete responseP; diff --git a/src/lib/orionTypes/QueryContextResponseVector.h b/src/lib/orionTypes/QueryContextResponseVector.h index e4417b365a..beeca40b2e 100644 --- a/src/lib/orionTypes/QueryContextResponseVector.h +++ b/src/lib/orionTypes/QueryContextResponseVector.h @@ -43,7 +43,7 @@ typedef struct QueryContextResponseVector unsigned int size(void); void push_back(QueryContextResponse* item); void release(void); - std::string render(bool asJsonObject, bool details, const std::string& detailsString); + std::string toJsonV1(bool asJsonObject, bool details, const std::string& detailsString); void populate(QueryContextResponse* responseP); QueryContextResponse* operator[](unsigned int ix) const; diff --git a/src/lib/rest/OrionError.cpp b/src/lib/rest/OrionError.cpp index e6a48acef3..04f2a17ba8 100644 --- a/src/lib/rest/OrionError.cpp +++ b/src/lib/rest/OrionError.cpp @@ -105,7 +105,7 @@ std::string OrionError::smartRender(ApiVersion apiVersion) { if (apiVersion == V1 || apiVersion == NO_VERSION) { - return render(); + return toJsonV1(); } else // admin or v2 { @@ -156,10 +156,10 @@ std::string OrionError::toJson(void) /* **************************************************************************** * -* OrionError::render - +* OrionError::toJsonV1 - * */ -std::string OrionError::render(void) +std::string OrionError::toJsonV1(void) { std::string out = "{"; diff --git a/src/lib/rest/OrionError.h b/src/lib/rest/OrionError.h index f8379acc79..47833a0dac 100644 --- a/src/lib/rest/OrionError.h +++ b/src/lib/rest/OrionError.h @@ -52,7 +52,7 @@ typedef struct OrionError std::string smartRender(ApiVersion apiVersion); std::string setStatusCodeAndSmartRender(ApiVersion apiVersion, HttpStatusCode* scP); std::string toJson(void); - std::string render(void); + std::string toJsonV1(void); void fill(HttpStatusCode _code, const std::string& _details, const std::string& _reasonPhrase = ""); void fill(const StatusCode& sc); diff --git a/src/lib/rest/RestService.cpp b/src/lib/rest/RestService.cpp index 4ebea6401a..ec3052ee6f 100644 --- a/src/lib/rest/RestService.cpp +++ b/src/lib/rest/RestService.cpp @@ -543,7 +543,7 @@ static std::string restService(ConnectionInfo* ciP, RestService* serviceV) if ((ciP->url.length() == 0) || ((ciP->url.length() == 1) && (ciP->url.c_str()[0] == '/'))) { OrionError error(SccBadRequest, "The Orion Context Broker is a REST service, not a 'web page'"); - std::string response = error.render(); + std::string response = error.toJsonV1(); alarmMgr.badInput(clientIp, "The Orion Context Broker is a REST service, not a 'web page'"); restReply(ciP, response); diff --git a/src/lib/rest/rest.cpp b/src/lib/rest/rest.cpp index 59d6a11e31..374307abf7 100644 --- a/src/lib/rest/rest.cpp +++ b/src/lib/rest/rest.cpp @@ -862,7 +862,7 @@ int servicePathSplit(ConnectionInfo* ciP) if (servicePaths > SERVICE_PATH_MAX_COMPONENTS) { OrionError e(SccBadRequest, "too many service paths - a maximum of ten service paths is allowed"); - ciP->answer = e.render(); + ciP->answer = e.toJsonV1(); if (servicePathCopy != NULL) { diff --git a/src/lib/rest/restReply.cpp b/src/lib/rest/restReply.cpp index 2e53e3e682..ea2369cb04 100644 --- a/src/lib/rest/restReply.cpp +++ b/src/lib/rest/restReply.cpp @@ -174,64 +174,64 @@ void restErrorReplyGet(ConnectionInfo* ciP, HttpStatusCode code, const std::stri if (ciP->restServiceP->request == RegisterContext) { RegisterContextResponse rcr("000000000000000000000000", errorCode); - *outStringP = rcr.render(); + *outStringP = rcr.toJsonV1(); } else if (ciP->restServiceP->request == DiscoverContextAvailability) { DiscoverContextAvailabilityResponse dcar(errorCode); - *outStringP = dcar.render(); + *outStringP = dcar.toJsonV1(); } else if (ciP->restServiceP->request == SubscribeContextAvailability) { SubscribeContextAvailabilityResponse scar("000000000000000000000000", errorCode); - *outStringP = scar.render(); + *outStringP = scar.toJsonV1(); } else if ((ciP->restServiceP->request == UpdateContextAvailabilitySubscription) || (ciP->restServiceP->request == Ngsi9SubscriptionsConvOp)) { UpdateContextAvailabilitySubscriptionResponse ucas(errorCode); - *outStringP = ucas.render(); + *outStringP = ucas.toJsonV1(); } else if (ciP->restServiceP->request == UnsubscribeContextAvailability) { UnsubscribeContextAvailabilityResponse ucar(errorCode); - *outStringP = ucar.render(); + *outStringP = ucar.toJsonV1(); } else if (ciP->restServiceP->request == NotifyContextAvailability) { NotifyContextAvailabilityResponse ncar(errorCode); - *outStringP = ncar.render(); + *outStringP = ncar.toJsonV1(); } else if (ciP->restServiceP->request == QueryContext) { QueryContextResponse qcr(errorCode); bool asJsonObject = (ciP->uriParam[URI_PARAM_ATTRIBUTE_FORMAT] == "object" && ciP->outMimeType == JSON); - *outStringP = qcr.render(asJsonObject); + *outStringP = qcr.toJsonV1(asJsonObject); } else if (ciP->restServiceP->request == SubscribeContext) { SubscribeContextResponse scr(errorCode); - *outStringP = scr.render(); + *outStringP = scr.toJsonV1(); } else if ((ciP->restServiceP->request == UpdateContextSubscription) || (ciP->restServiceP->request == Ngsi10SubscriptionsConvOp)) { UpdateContextSubscriptionResponse ucsr(errorCode); - *outStringP = ucsr.render(); + *outStringP = ucsr.toJsonV1(); } else if (ciP->restServiceP->request == UnsubscribeContext) { UnsubscribeContextResponse uncr(errorCode); - *outStringP = uncr.render(); + *outStringP = uncr.toJsonV1(); } else if (ciP->restServiceP->request == UpdateContext) { UpdateContextResponse ucr(errorCode); bool asJsonObject = (ciP->uriParam[URI_PARAM_ATTRIBUTE_FORMAT] == "object" && ciP->outMimeType == JSON); - *outStringP = ucr.render(asJsonObject); + *outStringP = ucr.toJsonV1(asJsonObject); } else if (ciP->restServiceP->request == NotifyContext) { NotifyContextResponse ncr(errorCode); - *outStringP = ncr.render(); + *outStringP = ncr.toJsonV1(); } else { diff --git a/src/lib/serviceRoutines/deleteAllEntitiesWithTypeAndId.cpp b/src/lib/serviceRoutines/deleteAllEntitiesWithTypeAndId.cpp index 6d30edc568..f4ee205dfc 100644 --- a/src/lib/serviceRoutines/deleteAllEntitiesWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/deleteAllEntitiesWithTypeAndId.cpp @@ -97,7 +97,7 @@ std::string deleteAllEntitiesWithTypeAndId response.fill(SccBadRequest, "entity::type cannot be empty for this request"); - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); return answer; } @@ -107,7 +107,7 @@ std::string deleteAllEntitiesWithTypeAndId response.fill(SccBadRequest, "non-matching entity::types in URL"); - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); return answer; } @@ -126,7 +126,7 @@ std::string deleteAllEntitiesWithTypeAndId // 06. Cleanup and return result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); parseDataP->upcr.res.release(); response.release(); diff --git a/src/lib/serviceRoutines/deleteAttributeValueInstance.cpp b/src/lib/serviceRoutines/deleteAttributeValueInstance.cpp index 368cbdbf6b..285840b1f8 100644 --- a/src/lib/serviceRoutines/deleteAttributeValueInstance.cpp +++ b/src/lib/serviceRoutines/deleteAttributeValueInstance.cpp @@ -93,7 +93,7 @@ std::string deleteAttributeValueInstance // 05. Cleanup and return result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); response.release(); parseDataP->upcr.res.release(); diff --git a/src/lib/serviceRoutines/deleteAttributeValueInstanceWithTypeAndId.cpp b/src/lib/serviceRoutines/deleteAttributeValueInstanceWithTypeAndId.cpp index dcebe43d92..0589c5f9e3 100644 --- a/src/lib/serviceRoutines/deleteAttributeValueInstanceWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/deleteAttributeValueInstanceWithTypeAndId.cpp @@ -89,7 +89,7 @@ std::string deleteAttributeValueInstanceWithTypeAndId response.fill(SccBadRequest, "non-matching entity::types in URL"); - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); return answer; } @@ -108,7 +108,7 @@ std::string deleteAttributeValueInstanceWithTypeAndId // 06. Cleanup and return result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); response.release(); parseDataP->upcr.res.release(); diff --git a/src/lib/serviceRoutines/deleteIndividualContextEntity.cpp b/src/lib/serviceRoutines/deleteIndividualContextEntity.cpp index a85ef7328b..d96b7e302c 100644 --- a/src/lib/serviceRoutines/deleteIndividualContextEntity.cpp +++ b/src/lib/serviceRoutines/deleteIndividualContextEntity.cpp @@ -93,7 +93,7 @@ std::string deleteIndividualContextEntity } // 05. Cleanup and return result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); response.release(); parseDataP->upcr.res.release(); diff --git a/src/lib/serviceRoutines/deleteIndividualContextEntityAttribute.cpp b/src/lib/serviceRoutines/deleteIndividualContextEntityAttribute.cpp index 88160b601e..b5af8d9159 100644 --- a/src/lib/serviceRoutines/deleteIndividualContextEntityAttribute.cpp +++ b/src/lib/serviceRoutines/deleteIndividualContextEntityAttribute.cpp @@ -91,7 +91,7 @@ std::string deleteIndividualContextEntityAttribute // 4. Cleanup and return result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); response.release(); parseDataP->upcr.res.release(); diff --git a/src/lib/serviceRoutines/deleteIndividualContextEntityAttributeWithTypeAndId.cpp b/src/lib/serviceRoutines/deleteIndividualContextEntityAttributeWithTypeAndId.cpp index f5ec361d65..c8f588df74 100644 --- a/src/lib/serviceRoutines/deleteIndividualContextEntityAttributeWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/deleteIndividualContextEntityAttributeWithTypeAndId.cpp @@ -95,14 +95,14 @@ std::string deleteIndividualContextEntityAttributeWithTypeAndId { alarmMgr.badInput(clientIp, "entity::type cannot be empty for this request"); response.fill(SccBadRequest, "entity::type cannot be empty for this request"); - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); return answer; } else if ((typeNameFromUriParam != entityType) && (typeNameFromUriParam != "")) { alarmMgr.badInput(clientIp, "non-matching entity::types in URL"); response.fill(SccBadRequest, "non-matching entity::types in URL"); - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); return answer; } @@ -120,7 +120,7 @@ std::string deleteIndividualContextEntityAttributeWithTypeAndId // 06. Cleanup and return result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); parseDataP->upcr.res.release(); diff --git a/src/lib/serviceRoutines/exitTreat.cpp b/src/lib/serviceRoutines/exitTreat.cpp index 72a179faa2..c4da0c0c61 100644 --- a/src/lib/serviceRoutines/exitTreat.cpp +++ b/src/lib/serviceRoutines/exitTreat.cpp @@ -60,7 +60,7 @@ std::string exitTreat OrionError orionError(SccBadRequest, "no such service"); ciP->httpStatusCode = SccOk; - out = orionError.render(); + out = orionError.toJsonV1(); return out; } @@ -73,13 +73,13 @@ std::string exitTreat { OrionError orionError(SccBadRequest, "Password requested"); ciP->httpStatusCode = SccOk; - out = orionError.render(); + out = orionError.toJsonV1(); } else if (password != "harakiri") { OrionError orionError(SccBadRequest, "Request denied - password erroneous"); ciP->httpStatusCode = SccOk; - out = orionError.render(); + out = orionError.toJsonV1(); } else { diff --git a/src/lib/serviceRoutines/getAllEntitiesWithTypeAndId.cpp b/src/lib/serviceRoutines/getAllEntitiesWithTypeAndId.cpp index f128e91aa5..94a4a8b0c5 100644 --- a/src/lib/serviceRoutines/getAllEntitiesWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/getAllEntitiesWithTypeAndId.cpp @@ -139,7 +139,7 @@ std::string getAllEntitiesWithTypeAndId std::vector emptyV; response.fill(&parseDataP->qcrs.res, entityId, entityType); - TIMED_RENDER(answer = response.render(asJsonObject, RtContextElementResponse, emptyV, false, emptyV)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, RtContextElementResponse, emptyV, false, emptyV)); // 07. Cleanup and return result parseDataP->qcr.res.release(); diff --git a/src/lib/serviceRoutines/getAttributeValueInstance.cpp b/src/lib/serviceRoutines/getAttributeValueInstance.cpp index 4e83471e28..41d3901bf4 100644 --- a/src/lib/serviceRoutines/getAttributeValueInstance.cpp +++ b/src/lib/serviceRoutines/getAttributeValueInstance.cpp @@ -157,7 +157,7 @@ std::string getAttributeValueInstance // 5. Render the ContextAttributeResponse - TIMED_RENDER(answer = response.render(asJsonObject, IndividualContextEntityAttribute)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, IndividualContextEntityAttribute)); // 6. Cleanup and return result diff --git a/src/lib/serviceRoutines/getAttributeValueInstanceWithTypeAndId.cpp b/src/lib/serviceRoutines/getAttributeValueInstanceWithTypeAndId.cpp index 6b966a048d..31bd9bc1cd 100644 --- a/src/lib/serviceRoutines/getAttributeValueInstanceWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/getAttributeValueInstanceWithTypeAndId.cpp @@ -124,7 +124,7 @@ std::string getAttributeValueInstanceWithTypeAndId response.fill(&parseDataP->qcrs.res, entityId, entityTypeFromPath, attributeName, metaID); } - TIMED_RENDER(answer = response.render(asJsonObject, AttributeValueInstance)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, AttributeValueInstance)); parseDataP->qcr.res.release(); parseDataP->qcrs.res.release(); diff --git a/src/lib/serviceRoutines/getAttributesForEntityType.cpp b/src/lib/serviceRoutines/getAttributesForEntityType.cpp index 85f1ba4ec5..fd02925ebd 100644 --- a/src/lib/serviceRoutines/getAttributesForEntityType.cpp +++ b/src/lib/serviceRoutines/getAttributesForEntityType.cpp @@ -75,9 +75,9 @@ std::string getAttributesForEntityType TIMED_MONGO(mongoAttributesForEntityType(entityTypeName, &response, ciP->tenant, ciP->servicePathV, ciP->uriParam, true, ciP->apiVersion)); std::string rendered; - TIMED_RENDER(rendered = response.render(asJsonObject, - ciP->outMimeType == JSON, - ciP->uriParam[URI_PARAM_COLLAPSE] == "true")); + TIMED_RENDER(rendered = response.toJsonV1(asJsonObject, + ciP->outMimeType == JSON, + ciP->uriParam[URI_PARAM_COLLAPSE] == "true")); response.release(); diff --git a/src/lib/serviceRoutines/getContextEntitiesByEntityIdAndType.cpp b/src/lib/serviceRoutines/getContextEntitiesByEntityIdAndType.cpp index 22115b8afe..83df3de550 100644 --- a/src/lib/serviceRoutines/getContextEntitiesByEntityIdAndType.cpp +++ b/src/lib/serviceRoutines/getContextEntitiesByEntityIdAndType.cpp @@ -98,14 +98,14 @@ std::string getContextEntitiesByEntityIdAndType parseDataP->dcars.res.errorCode.fill(SccBadRequest, "entity::type cannot be empty for this request"); alarmMgr.badInput(clientIp, "entity::type cannot be empty for this request"); - TIMED_RENDER(answer = parseDataP->dcars.res.render()); + TIMED_RENDER(answer = parseDataP->dcars.res.toJsonV1()); } else if ((entityTypeFromUriParam != entityType) && (entityTypeFromUriParam != "")) { parseDataP->dcars.res.errorCode.fill(SccBadRequest, "non-matching entity::types in URL"); alarmMgr.badInput(clientIp, "non-matching entity::types in URL"); - TIMED_RENDER(answer = parseDataP->dcars.res.render()); + TIMED_RENDER(answer = parseDataP->dcars.res.toJsonV1()); } else { diff --git a/src/lib/serviceRoutines/getEntityByIdAttributeByNameWithTypeAndId.cpp b/src/lib/serviceRoutines/getEntityByIdAttributeByNameWithTypeAndId.cpp index a53cfe43e7..cca95d9114 100644 --- a/src/lib/serviceRoutines/getEntityByIdAttributeByNameWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/getEntityByIdAttributeByNameWithTypeAndId.cpp @@ -101,14 +101,14 @@ std::string getEntityByIdAttributeByNameWithTypeAndId parseDataP->dcars.res.errorCode.fill(SccBadRequest, "entity::type cannot be empty for this request"); alarmMgr.badInput(clientIp, "entity::type cannot be empty for this request"); - TIMED_RENDER(answer = parseDataP->dcars.res.render()); + TIMED_RENDER(answer = parseDataP->dcars.res.toJsonV1()); } else if ((entityTypeFromUriParam != entityType) && (entityTypeFromUriParam != "")) { parseDataP->dcars.res.errorCode.fill(SccBadRequest, "non-matching entity::types in URL"); alarmMgr.badInput(clientIp, "non-matching entity::types in URL"); - TIMED_RENDER(answer = parseDataP->dcars.res.render()); + TIMED_RENDER(answer = parseDataP->dcars.res.toJsonV1()); } else { diff --git a/src/lib/serviceRoutines/getEntityTypes.cpp b/src/lib/serviceRoutines/getEntityTypes.cpp index 1c66d068b4..3ade4bcda6 100644 --- a/src/lib/serviceRoutines/getEntityTypes.cpp +++ b/src/lib/serviceRoutines/getEntityTypes.cpp @@ -80,9 +80,9 @@ std::string getEntityTypes TIMED_MONGO(mongoEntityTypes(&response, ciP->tenant, ciP->servicePathV, ciP->uriParam, ciP->apiVersion, totalTypesP, true)); std::string rendered; - TIMED_RENDER(rendered = response.render(asJsonObject, - ciP->outMimeType == JSON, - ciP->uriParam[URI_PARAM_COLLAPSE] == "true")); + TIMED_RENDER(rendered = response.toJsonV1(asJsonObject, + ciP->outMimeType == JSON, + ciP->uriParam[URI_PARAM_COLLAPSE] == "true")); response.release(); diff --git a/src/lib/serviceRoutines/getIndividualContextEntity.cpp b/src/lib/serviceRoutines/getIndividualContextEntity.cpp index bc5c48f2e2..18296eacd1 100644 --- a/src/lib/serviceRoutines/getIndividualContextEntity.cpp +++ b/src/lib/serviceRoutines/getIndividualContextEntity.cpp @@ -119,7 +119,7 @@ std::string getIndividualContextEntity // No attribute or metadata filter in this case, an empty vector is used to fulfil method signature std::vector emptyV; - TIMED_RENDER(answer = response.render(asJsonObject, IndividualContextEntity, emptyV, false, emptyV)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, IndividualContextEntity, emptyV, false, emptyV)); // 6. Cleanup and return result diff --git a/src/lib/serviceRoutines/getIndividualContextEntityAttribute.cpp b/src/lib/serviceRoutines/getIndividualContextEntityAttribute.cpp index 776acf3369..4f46d69b48 100644 --- a/src/lib/serviceRoutines/getIndividualContextEntityAttribute.cpp +++ b/src/lib/serviceRoutines/getIndividualContextEntityAttribute.cpp @@ -122,7 +122,7 @@ std::string getIndividualContextEntityAttribute // 5. Render the ContextAttributeResponse - TIMED_RENDER(answer = response.render(asJsonObject, IndividualContextEntityAttribute)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, IndividualContextEntityAttribute)); // 6. Cleanup and return result diff --git a/src/lib/serviceRoutines/getIndividualContextEntityAttributeWithTypeAndId.cpp b/src/lib/serviceRoutines/getIndividualContextEntityAttributeWithTypeAndId.cpp index ab16d0fd83..a5f466ad7b 100644 --- a/src/lib/serviceRoutines/getIndividualContextEntityAttributeWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/getIndividualContextEntityAttributeWithTypeAndId.cpp @@ -135,7 +135,7 @@ std::string getIndividualContextEntityAttributeWithTypeAndId // 07. Cleanup and return result - TIMED_RENDER(answer = response.render(asJsonObject, RtContextAttributeResponse)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, RtContextAttributeResponse)); parseDataP->qcr.res.release(); diff --git a/src/lib/serviceRoutines/getNgsi10ContextEntityTypes.cpp b/src/lib/serviceRoutines/getNgsi10ContextEntityTypes.cpp index 2c61621421..8f6d550fcf 100644 --- a/src/lib/serviceRoutines/getNgsi10ContextEntityTypes.cpp +++ b/src/lib/serviceRoutines/getNgsi10ContextEntityTypes.cpp @@ -97,7 +97,7 @@ std::string getNgsi10ContextEntityTypes parseDataP->qcrs.res.errorCode.fill(SccBadRequest, "entity::type cannot be empty for this request"); alarmMgr.badInput(clientIp, "entity::type cannot be empty for this request"); - TIMED_RENDER(answer = parseDataP->qcrs.res.render(asJsonObject)); + TIMED_RENDER(answer = parseDataP->qcrs.res.toJsonV1(asJsonObject)); parseDataP->qcr.res.release(); return answer; @@ -107,7 +107,7 @@ std::string getNgsi10ContextEntityTypes parseDataP->qcrs.res.errorCode.fill(SccBadRequest, "non-matching entity::types in URL"); alarmMgr.badInput(clientIp, "non-matching entity::types in URL"); - TIMED_RENDER(answer = parseDataP->qcrs.res.render(asJsonObject)); + TIMED_RENDER(answer = parseDataP->qcrs.res.toJsonV1(asJsonObject)); parseDataP->qcr.res.release(); return answer; @@ -127,7 +127,7 @@ std::string getNgsi10ContextEntityTypes { parseDataP->qcrs.res.errorCode.details = std::string("entityId::type /") + typeName + "/ non-existent"; - TIMED_RENDER(answer = parseDataP->qcrs.res.render(asJsonObject)); + TIMED_RENDER(answer = parseDataP->qcrs.res.toJsonV1(asJsonObject)); } diff --git a/src/lib/serviceRoutines/getNgsi10ContextEntityTypesAttribute.cpp b/src/lib/serviceRoutines/getNgsi10ContextEntityTypesAttribute.cpp index cb0f33ab0f..919ba63743 100644 --- a/src/lib/serviceRoutines/getNgsi10ContextEntityTypesAttribute.cpp +++ b/src/lib/serviceRoutines/getNgsi10ContextEntityTypesAttribute.cpp @@ -98,7 +98,7 @@ std::string getNgsi10ContextEntityTypesAttribute parseDataP->qcrs.res.errorCode.fill(SccBadRequest, "entity::type cannot be empty for this request"); alarmMgr.badInput(clientIp, "entity::type cannot be empty for this request"); - TIMED_RENDER(answer = parseDataP->qcrs.res.render(asJsonObject)); + TIMED_RENDER(answer = parseDataP->qcrs.res.toJsonV1(asJsonObject)); parseDataP->qcr.res.release(); return answer; } @@ -107,7 +107,7 @@ std::string getNgsi10ContextEntityTypesAttribute parseDataP->qcrs.res.errorCode.fill(SccBadRequest, "non-matching entity::types in URL"); alarmMgr.badInput(clientIp, "non-matching entity::types in URL"); - TIMED_RENDER(answer = parseDataP->qcrs.res.render(asJsonObject)); + TIMED_RENDER(answer = parseDataP->qcrs.res.toJsonV1(asJsonObject)); parseDataP->qcr.res.release(); return answer; } @@ -126,7 +126,7 @@ std::string getNgsi10ContextEntityTypesAttribute { parseDataP->qcrs.res.errorCode.details = "entityId::type/attribute::name pair not found"; - TIMED_RENDER(answer = parseDataP->qcrs.res.render(asJsonObject)); + TIMED_RENDER(answer = parseDataP->qcrs.res.toJsonV1(asJsonObject)); } diff --git a/src/lib/serviceRoutines/leakTreat.cpp b/src/lib/serviceRoutines/leakTreat.cpp index 1c94be22dc..24fcd54183 100644 --- a/src/lib/serviceRoutines/leakTreat.cpp +++ b/src/lib/serviceRoutines/leakTreat.cpp @@ -61,7 +61,7 @@ std::string leakTreat OrionError orionError(SccBadRequest, "no such service"); ciP->httpStatusCode = SccOk; - TIMED_RENDER(out = orionError.render()); + TIMED_RENDER(out = orionError.toJsonV1()); return out; } @@ -75,14 +75,14 @@ std::string leakTreat OrionError orionError(SccBadRequest, "Password requested"); ciP->httpStatusCode = SccOk; - TIMED_RENDER(out = orionError.render()); + TIMED_RENDER(out = orionError.toJsonV1()); } else if (password != "harakiri") { OrionError orionError(SccBadRequest, "Request denied - password erroneous"); ciP->httpStatusCode = SccOk; - TIMED_RENDER(out = orionError.render()); + TIMED_RENDER(out = orionError.toJsonV1()); } else { @@ -90,7 +90,7 @@ std::string leakTreat std::string pwd = strdup("Leak test done"); OrionError orionError(SccOk, "Leak test: " + pwd); - TIMED_RENDER(out = orionError.render()); + TIMED_RENDER(out = orionError.toJsonV1()); } return out; diff --git a/src/lib/serviceRoutines/logTraceTreat.cpp b/src/lib/serviceRoutines/logTraceTreat.cpp index ffb855972c..4a49199d5a 100644 --- a/src/lib/serviceRoutines/logTraceTreat.cpp +++ b/src/lib/serviceRoutines/logTraceTreat.cpp @@ -100,7 +100,7 @@ std::string logTraceTreat { OrionError error(SccBadRequest, std::string("bad URL/Verb: ") + ciP->method + " " + path); - TIMED_RENDER(out = error.render()); + TIMED_RENDER(out = error.toJsonV1()); } return out; diff --git a/src/lib/serviceRoutines/postAllEntitiesWithTypeAndId.cpp b/src/lib/serviceRoutines/postAllEntitiesWithTypeAndId.cpp index 849fd3c3bc..ce3e4581c4 100644 --- a/src/lib/serviceRoutines/postAllEntitiesWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/postAllEntitiesWithTypeAndId.cpp @@ -107,7 +107,7 @@ std::string postAllEntitiesWithTypeAndId alarmMgr.badInput(clientIp, "unknown field"); response.errorCode.fill(SccBadRequest, "invalid payload: unknown fields"); - TIMED_RENDER(out = response.render(asJsonObject, IndividualContextEntity)); + TIMED_RENDER(out = response.toJsonV1(asJsonObject, IndividualContextEntity)); return out; } @@ -121,7 +121,7 @@ std::string postAllEntitiesWithTypeAndId response.errorCode.fill(SccBadRequest, "entity::type cannot be empty for this request"); response.entity.fill(entityId, entityType, "false"); - TIMED_RENDER(answer = response.render(asJsonObject, AllEntitiesWithTypeAndId)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, AllEntitiesWithTypeAndId)); parseDataP->acer.res.release(); return answer; @@ -133,7 +133,7 @@ std::string postAllEntitiesWithTypeAndId response.errorCode.fill(SccBadRequest, "non-matching entity::types in URL"); response.entity.fill(entityId, entityType, "false"); - TIMED_RENDER(answer = response.render(asJsonObject, AllEntitiesWithTypeAndId)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, AllEntitiesWithTypeAndId)); parseDataP->acer.res.release(); return answer; @@ -156,7 +156,7 @@ std::string postAllEntitiesWithTypeAndId // 07. Cleanup and return result - TIMED_RENDER(answer = response.render(asJsonObject, IndividualContextEntity)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, IndividualContextEntity)); parseDataP->upcr.res.release(); response.release(); diff --git a/src/lib/serviceRoutines/postAttributeValueInstanceWithTypeAndId.cpp b/src/lib/serviceRoutines/postAttributeValueInstanceWithTypeAndId.cpp index b8db4d321a..fa2fd3569f 100644 --- a/src/lib/serviceRoutines/postAttributeValueInstanceWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/postAttributeValueInstanceWithTypeAndId.cpp @@ -95,7 +95,7 @@ std::string postAttributeValueInstanceWithTypeAndId response.fill(SccBadRequest, "non-matching entity::types in URL"); - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); parseDataP->upcar.res.release(); return answer; @@ -111,7 +111,7 @@ std::string postAttributeValueInstanceWithTypeAndId response.fill(SccBadRequest, details); - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); parseDataP->upcar.res.release(); @@ -132,7 +132,7 @@ std::string postAttributeValueInstanceWithTypeAndId // 07. Render result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); // 08. Cleanup and return result diff --git a/src/lib/serviceRoutines/postContextEntitiesByEntityId.cpp b/src/lib/serviceRoutines/postContextEntitiesByEntityId.cpp index 6e29b78ca4..0f90ab151e 100644 --- a/src/lib/serviceRoutines/postContextEntitiesByEntityId.cpp +++ b/src/lib/serviceRoutines/postContextEntitiesByEntityId.cpp @@ -62,7 +62,6 @@ std::string postContextEntitiesByEntityId parseDataP->rcr.res.fill(parseDataP->rpr.res, entityId, "", ""); answer = postRegisterContext(ciP, components, compV, parseDataP); - parseDataP->rpr.res.release(); parseDataP->rcr.res.release(); return answer; diff --git a/src/lib/serviceRoutines/postContextEntitiesByEntityIdAndType.cpp b/src/lib/serviceRoutines/postContextEntitiesByEntityIdAndType.cpp index a15a69d239..34c1c1c58e 100644 --- a/src/lib/serviceRoutines/postContextEntitiesByEntityIdAndType.cpp +++ b/src/lib/serviceRoutines/postContextEntitiesByEntityIdAndType.cpp @@ -96,9 +96,7 @@ std::string postContextEntitiesByEntityIdAndType response.errorCode.fill(SccBadRequest, "entity::type cannot be empty for this request"); response.registrationId.set("000000000000000000000000"); - TIMED_RENDER(answer = response.render()); - - parseDataP->rpr.res.release(); + TIMED_RENDER(answer = response.toJsonV1()); return answer; } @@ -109,9 +107,7 @@ std::string postContextEntitiesByEntityIdAndType response.errorCode.fill(SccBadRequest, "non-matching entity::types in URL"); response.registrationId.set("000000000000000000000000"); - TIMED_RENDER(answer = response.render()); - - parseDataP->rpr.res.release(); + TIMED_RENDER(answer = response.toJsonV1()); return answer; } @@ -126,7 +122,6 @@ std::string postContextEntitiesByEntityIdAndType // 05. Cleanup and return answer - parseDataP->rpr.res.release(); parseDataP->rcr.res.release(); return answer; diff --git a/src/lib/serviceRoutines/postContextEntityAttributes.cpp b/src/lib/serviceRoutines/postContextEntityAttributes.cpp index d5787ac1d8..4bacc80b06 100644 --- a/src/lib/serviceRoutines/postContextEntityAttributes.cpp +++ b/src/lib/serviceRoutines/postContextEntityAttributes.cpp @@ -62,7 +62,6 @@ std::string postContextEntityAttributes parseDataP->rcr.res.fill(parseDataP->rpr.res, entityId, "", ""); answer = postRegisterContext(ciP, components, compV, parseDataP); - parseDataP->rpr.res.release(); parseDataP->rcr.res.release(); return answer; diff --git a/src/lib/serviceRoutines/postContextEntityTypeAttribute.cpp b/src/lib/serviceRoutines/postContextEntityTypeAttribute.cpp index 9c1ae77d2d..cff9bb3cc3 100644 --- a/src/lib/serviceRoutines/postContextEntityTypeAttribute.cpp +++ b/src/lib/serviceRoutines/postContextEntityTypeAttribute.cpp @@ -63,7 +63,6 @@ std::string postContextEntityTypeAttribute parseDataP->rcr.res.fill(parseDataP->rpr.res, "", entityIdType, attributeName); answer = postRegisterContext(ciP, components, compV, parseDataP); - parseDataP->rpr.res.release(); parseDataP->rcr.res.release(); return answer; diff --git a/src/lib/serviceRoutines/postContextEntityTypes.cpp b/src/lib/serviceRoutines/postContextEntityTypes.cpp index 585aa3eee5..d2b373c964 100644 --- a/src/lib/serviceRoutines/postContextEntityTypes.cpp +++ b/src/lib/serviceRoutines/postContextEntityTypes.cpp @@ -67,7 +67,6 @@ std::string postContextEntityTypes parseDataP->rcr.res.fill(parseDataP->rpr.res, "", entityType, ""); answer = postRegisterContext(ciP, components, compV, parseDataP); - parseDataP->rpr.res.release(); parseDataP->rcr.res.release(); return answer; diff --git a/src/lib/serviceRoutines/postDiscoverContextAvailability.cpp b/src/lib/serviceRoutines/postDiscoverContextAvailability.cpp index abfa9efd6c..9c726b7250 100644 --- a/src/lib/serviceRoutines/postDiscoverContextAvailability.cpp +++ b/src/lib/serviceRoutines/postDiscoverContextAvailability.cpp @@ -56,7 +56,7 @@ std::string postDiscoverContextAvailability std::string answer; TIMED_MONGO(ciP->httpStatusCode = mongoDiscoverContextAvailability(&parseDataP->dcar.res, dcarP, ciP->tenant, ciP->uriParam, ciP->servicePathV)); - TIMED_RENDER(answer = dcarP->render()); + TIMED_RENDER(answer = dcarP->toJsonV1()); return answer; } diff --git a/src/lib/serviceRoutines/postEntityByIdAttributeByName.cpp b/src/lib/serviceRoutines/postEntityByIdAttributeByName.cpp index d1767f3301..643cd91f66 100644 --- a/src/lib/serviceRoutines/postEntityByIdAttributeByName.cpp +++ b/src/lib/serviceRoutines/postEntityByIdAttributeByName.cpp @@ -63,7 +63,6 @@ std::string postEntityByIdAttributeByName parseDataP->rcr.res.fill(parseDataP->rpr.res, entityId, "", attributeName); answer = postRegisterContext(ciP, components, compV, parseDataP); - parseDataP->rpr.res.release(); parseDataP->rcr.res.release(); return answer; diff --git a/src/lib/serviceRoutines/postEntityByIdAttributeByNameWithTypeAndId.cpp b/src/lib/serviceRoutines/postEntityByIdAttributeByNameWithTypeAndId.cpp index 8c8bed76bc..1b449d0021 100644 --- a/src/lib/serviceRoutines/postEntityByIdAttributeByNameWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/postEntityByIdAttributeByNameWithTypeAndId.cpp @@ -100,14 +100,14 @@ std::string postEntityByIdAttributeByNameWithTypeAndId parseDataP->rcrs.res.errorCode.fill(SccBadRequest, "entity::type cannot be empty for this request"); alarmMgr.badInput(clientIp, "entity::type cannot be empty for this request"); - TIMED_RENDER(answer = parseDataP->rcrs.res.render()); + TIMED_RENDER(answer = parseDataP->rcrs.res.toJsonV1()); } else if ((entityTypeFromUriParam != entityType) && (entityTypeFromUriParam != "")) { parseDataP->rcrs.res.errorCode.fill(SccBadRequest, "non-matching entity::types in URL"); alarmMgr.badInput(clientIp, "non-matching entity::types in URL"); - TIMED_RENDER(answer = parseDataP->rcrs.res.render()); + TIMED_RENDER(answer = parseDataP->rcrs.res.toJsonV1()); } else { @@ -120,7 +120,6 @@ std::string postEntityByIdAttributeByNameWithTypeAndId // 05. Cleanup and return result - parseDataP->rpr.res.release(); parseDataP->rcr.res.release(); return answer; diff --git a/src/lib/serviceRoutines/postIndividualContextEntity.cpp b/src/lib/serviceRoutines/postIndividualContextEntity.cpp index 34e7d0ce18..0032eab30b 100644 --- a/src/lib/serviceRoutines/postIndividualContextEntity.cpp +++ b/src/lib/serviceRoutines/postIndividualContextEntity.cpp @@ -112,7 +112,7 @@ std::string postIndividualContextEntity alarmMgr.badInput(clientIp, error); response.errorCode.fill(SccBadRequest, error); - TIMED_RENDER(out = response.render(asJsonObject, IndividualContextEntity)); + TIMED_RENDER(out = response.toJsonV1(asJsonObject, IndividualContextEntity)); return out; } entityId = (entityIdFromPayload != "")? entityIdFromPayload : entityIdFromURL; @@ -125,7 +125,7 @@ std::string postIndividualContextEntity alarmMgr.badInput(clientIp, error); response.errorCode.fill(SccBadRequest, error); - TIMED_RENDER(out = response.render(asJsonObject, IndividualContextEntity)); + TIMED_RENDER(out = response.toJsonV1(asJsonObject, IndividualContextEntity)); return out; } entityType = (entityTypeFromPayload != "")? entityTypeFromPayload :entityTypeFromURL; @@ -139,7 +139,7 @@ std::string postIndividualContextEntity alarmMgr.badInput(clientIp, error); response.errorCode.fill(SccBadRequest, error); - TIMED_RENDER(out = response.render(asJsonObject, IndividualContextEntity)); + TIMED_RENDER(out = response.toJsonV1(asJsonObject, IndividualContextEntity)); return out; } @@ -151,7 +151,7 @@ std::string postIndividualContextEntity alarmMgr.badInput(clientIp, error); response.errorCode.fill(SccBadRequest, error); - TIMED_RENDER(out = response.render(asJsonObject, IndividualContextEntity)); + TIMED_RENDER(out = response.toJsonV1(asJsonObject, IndividualContextEntity)); return out; } @@ -173,7 +173,7 @@ std::string postIndividualContextEntity response.fill(&parseDataP->upcrs.res); // 05. Cleanup and return result - TIMED_RENDER(answer = response.render(asJsonObject, IndividualContextEntity)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, IndividualContextEntity)); response.release(); parseDataP->upcr.res.release(); diff --git a/src/lib/serviceRoutines/postIndividualContextEntityAttribute.cpp b/src/lib/serviceRoutines/postIndividualContextEntityAttribute.cpp index f72d753bb3..6b7334cf03 100644 --- a/src/lib/serviceRoutines/postIndividualContextEntityAttribute.cpp +++ b/src/lib/serviceRoutines/postIndividualContextEntityAttribute.cpp @@ -90,7 +90,7 @@ std::string postIndividualContextEntityAttribute // 4. Cleanup and return result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); response.release(); parseDataP->upcr.res.release(); diff --git a/src/lib/serviceRoutines/postIndividualContextEntityAttributeWithTypeAndId.cpp b/src/lib/serviceRoutines/postIndividualContextEntityAttributeWithTypeAndId.cpp index 55adc72519..afdd618185 100644 --- a/src/lib/serviceRoutines/postIndividualContextEntityAttributeWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/postIndividualContextEntityAttributeWithTypeAndId.cpp @@ -122,7 +122,7 @@ std::string postIndividualContextEntityAttributeWithTypeAndId // 06. Cleanup and return result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); parseDataP->upcar.res.release(); parseDataP->upcrs.res.release(); diff --git a/src/lib/serviceRoutines/postNotifyContext.cpp b/src/lib/serviceRoutines/postNotifyContext.cpp index a56d04af4b..5a1ec9a8ab 100644 --- a/src/lib/serviceRoutines/postNotifyContext.cpp +++ b/src/lib/serviceRoutines/postNotifyContext.cpp @@ -62,7 +62,7 @@ std::string postNotifyContext ciP->servicePathV, ciP->httpHeaders.correlator, ciP->httpHeaders.ngsiv2AttrsFormat)); - TIMED_RENDER(answer = ncr.render()); + TIMED_RENDER(answer = ncr.toJsonV1()); return answer; } diff --git a/src/lib/serviceRoutines/postNotifyContextAvailability.cpp b/src/lib/serviceRoutines/postNotifyContextAvailability.cpp index 6e1951d368..c7609f0457 100644 --- a/src/lib/serviceRoutines/postNotifyContextAvailability.cpp +++ b/src/lib/serviceRoutines/postNotifyContextAvailability.cpp @@ -68,7 +68,7 @@ std::string postNotifyContextAvailability ncar.responseCode.fill(SccBadRequest, "more than one service path for notification"); alarmMgr.badInput(clientIp, "more than one service path for a notification"); - TIMED_RENDER(answer = ncar.render()); + TIMED_RENDER(answer = ncar.toJsonV1()); return answer; } @@ -82,13 +82,13 @@ std::string postNotifyContextAvailability { ncar.responseCode.fill(SccBadRequest, res); - TIMED_RENDER(answer = ncar.render()); + TIMED_RENDER(answer = ncar.toJsonV1()); return answer; } TIMED_MONGO(ciP->httpStatusCode = mongoNotifyContextAvailability(&parseDataP->ncar.res, &ncar, ciP->uriParam, ciP->httpHeaders.correlator, ciP->tenant, ciP->servicePathV[0])); - TIMED_RENDER(answer = ncar.render()); + TIMED_RENDER(answer = ncar.toJsonV1()); return answer; } diff --git a/src/lib/serviceRoutines/postQueryContext.cpp b/src/lib/serviceRoutines/postQueryContext.cpp index 85dddfbdc6..07173fdb37 100644 --- a/src/lib/serviceRoutines/postQueryContext.cpp +++ b/src/lib/serviceRoutines/postQueryContext.cpp @@ -104,7 +104,7 @@ static bool queryForward(ConnectionInfo* ciP, QueryContextRequest* qcrP, QueryCo // 2. Render the string of the request we want to forward // std::string payload; - TIMED_RENDER(payload = qcrP->render()); + TIMED_RENDER(payload = qcrP->toJsonV1()); char* cleanPayload = (char*) payload.c_str();; @@ -322,7 +322,7 @@ std::string postQueryContext // Bad Input detected by Mongo Backend - request ends here ! OrionError oe(qcrsP->errorCode); - TIMED_RENDER(answer = oe.render()); + TIMED_RENDER(answer = oe.toJsonV1()); qcrP->release(); return answer; } @@ -354,7 +354,7 @@ std::string postQueryContext // if (forwardsPending(qcrsP) == false) { - TIMED_RENDER(answer = qcrsP->render(asJsonObject)); + TIMED_RENDER(answer = qcrsP->toJsonV1(asJsonObject)); qcrP->release(); return answer; @@ -530,7 +530,7 @@ std::string postQueryContext std::string detailsString = ciP->uriParam[URI_PARAM_PAGINATION_DETAILS]; bool details = (strcasecmp("on", detailsString.c_str()) == 0)? true : false; - TIMED_RENDER(answer = responseV.render(asJsonObject, details, qcrsP->errorCode.details)); + TIMED_RENDER(answer = responseV.toJsonV1(asJsonObject, details, qcrsP->errorCode.details)); // diff --git a/src/lib/serviceRoutines/postRegisterContext.cpp b/src/lib/serviceRoutines/postRegisterContext.cpp index be9f1b9c67..297684cfe2 100644 --- a/src/lib/serviceRoutines/postRegisterContext.cpp +++ b/src/lib/serviceRoutines/postRegisterContext.cpp @@ -76,7 +76,7 @@ std::string postRegisterContext alarmMgr.badInput(clientIp, details); ciP->httpStatusCode = SccBadRequest; - return oe.render(); + return oe.toJsonV1(); } } } @@ -91,7 +91,7 @@ std::string postRegisterContext alarmMgr.badInput(clientIp, "more than one service path for a registration"); rcr.errorCode.fill(SccBadRequest, "more than one service path for notification"); - TIMED_RENDER(answer = rcr.render()); + TIMED_RENDER(answer = rcr.toJsonV1()); return answer; } @@ -105,12 +105,12 @@ std::string postRegisterContext { rcr.errorCode.fill(SccBadRequest, res); - TIMED_RENDER(answer = rcr.render()); + TIMED_RENDER(answer = rcr.toJsonV1()); return answer; } TIMED_MONGO(ciP->httpStatusCode = mongoRegisterContext(&parseDataP->rcr.res, &rcr, ciP->uriParam, ciP->httpHeaders.correlator, ciP->tenant, ciP->servicePathV[0])); - TIMED_RENDER(answer = rcr.render()); + TIMED_RENDER(answer = rcr.toJsonV1()); return answer; } diff --git a/src/lib/serviceRoutines/postSubscribeContext.cpp b/src/lib/serviceRoutines/postSubscribeContext.cpp index 130833ded8..1c092b5d19 100644 --- a/src/lib/serviceRoutines/postSubscribeContext.cpp +++ b/src/lib/serviceRoutines/postSubscribeContext.cpp @@ -78,12 +78,12 @@ std::string postSubscribeContext scr.subscribeError.errorCode.fill(SccBadRequest, "max one service-path allowed for subscriptions"); - TIMED_RENDER(answer = scr.render()); + TIMED_RENDER(answer = scr.toJsonV1()); return answer; } TIMED_MONGO(ciP->httpStatusCode = mongoSubscribeContext(&parseDataP->scr.res, &scr, ciP->tenant, ciP->httpHeaders.xauthToken, ciP->servicePathV, ciP->httpHeaders.correlator)); - TIMED_RENDER(answer = scr.render()); + TIMED_RENDER(answer = scr.toJsonV1()); parseDataP->scr.res.release(); diff --git a/src/lib/serviceRoutines/postSubscribeContextAvailability.cpp b/src/lib/serviceRoutines/postSubscribeContextAvailability.cpp index 03c8c9c22e..54efcdff0f 100644 --- a/src/lib/serviceRoutines/postSubscribeContextAvailability.cpp +++ b/src/lib/serviceRoutines/postSubscribeContextAvailability.cpp @@ -57,7 +57,7 @@ std::string postSubscribeContextAvailability ciP->uriParam, ciP->httpHeaders.correlator, ciP->tenant)); - TIMED_RENDER(answer = scar.render()); + TIMED_RENDER(answer = scar.toJsonV1()); return answer; } diff --git a/src/lib/serviceRoutines/postUnsubscribeContext.cpp b/src/lib/serviceRoutines/postUnsubscribeContext.cpp index a844701f4e..8189f6f930 100644 --- a/src/lib/serviceRoutines/postUnsubscribeContext.cpp +++ b/src/lib/serviceRoutines/postUnsubscribeContext.cpp @@ -52,7 +52,7 @@ std::string postUnsubscribeContext std::string answer; TIMED_MONGO(ciP->httpStatusCode = mongoUnsubscribeContext(&parseDataP->uncr.res, &uncr, ciP->tenant)); - TIMED_RENDER(answer = uncr.render()); + TIMED_RENDER(answer = uncr.toJsonV1()); return answer; } diff --git a/src/lib/serviceRoutines/postUnsubscribeContextAvailability.cpp b/src/lib/serviceRoutines/postUnsubscribeContextAvailability.cpp index 2ede2059a0..86304bf1a6 100644 --- a/src/lib/serviceRoutines/postUnsubscribeContextAvailability.cpp +++ b/src/lib/serviceRoutines/postUnsubscribeContextAvailability.cpp @@ -52,7 +52,7 @@ std::string postUnsubscribeContextAvailability std::string answer; TIMED_MONGO(ciP->httpStatusCode = mongoUnsubscribeContextAvailability(&parseDataP->ucar.res, &ucar, ciP->tenant)); - TIMED_RENDER(answer = ucar.render()); + TIMED_RENDER(answer = ucar.toJsonV1()); return answer; } diff --git a/src/lib/serviceRoutines/postUpdateContext.cpp b/src/lib/serviceRoutines/postUpdateContext.cpp index b0a9092185..56c01248b3 100644 --- a/src/lib/serviceRoutines/postUpdateContext.cpp +++ b/src/lib/serviceRoutines/postUpdateContext.cpp @@ -140,10 +140,10 @@ static void updateForward(ConnectionInfo* ciP, UpdateContextRequest* upcrP, Upda // // FIXME: Forwards are done using NGSIv1 only, for now // This will hopefully change soon ... - // Once we implement forwards in NGSIv2, this render() should be like this: - // TIMED_RENDER(payload = upcrP->render(ciP->apiVersion, asJsonObject, "")); + // Once we implement forwards in NGSIv2, this toJsonV1() should be like this: + // TIMED_RENDER(payload = upcrP->toJson()); // - TIMED_RENDER(payload = upcrP->render(asJsonObject)); + TIMED_RENDER(payload = upcrP->toJsonV1(asJsonObject)); ciP->outMimeType = outMimeType; cleanPayload = (char*) payload.c_str(); @@ -466,7 +466,7 @@ std::string postUpdateContext upcrsP->errorCode.fill(SccBadRequest, "more than one service path in context update request"); alarmMgr.badInput(clientIp, "more than one service path for an update request"); - TIMED_RENDER(answer = upcrsP->render(asJsonObject)); + TIMED_RENDER(answer = upcrsP->toJsonV1(asJsonObject)); upcrP->release(); return answer; @@ -481,7 +481,7 @@ std::string postUpdateContext { upcrsP->errorCode.fill(SccBadRequest, res); - TIMED_RENDER(answer = upcrsP->render(asJsonObject)); + TIMED_RENDER(answer = upcrsP->toJsonV1(asJsonObject)); upcrP->release(); return answer; @@ -523,7 +523,7 @@ std::string postUpdateContext bool forwarding = forwardsPending(upcrsP); if (forwarding == false) { - TIMED_RENDER(answer = upcrsP->render(asJsonObject)); + TIMED_RENDER(answer = upcrsP->toJsonV1(asJsonObject)); upcrP->release(); return answer; @@ -734,7 +734,7 @@ std::string postUpdateContext { // Note that v2 case doesn't use an actual response (so no need to waste time rendering it). // We render in the v1 case only - TIMED_RENDER(answer = response.render(asJsonObject)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject)); } // diff --git a/src/lib/serviceRoutines/postUpdateContextAvailabilitySubscription.cpp b/src/lib/serviceRoutines/postUpdateContextAvailabilitySubscription.cpp index 71cbd46da3..eb338ee88e 100644 --- a/src/lib/serviceRoutines/postUpdateContextAvailabilitySubscription.cpp +++ b/src/lib/serviceRoutines/postUpdateContextAvailabilitySubscription.cpp @@ -58,7 +58,7 @@ std::string postUpdateContextAvailabilitySubscription ciP->httpHeaders.correlator, ciP->tenant)); - TIMED_RENDER(answer = ucas.render()); + TIMED_RENDER(answer = ucas.toJsonV1()); return answer; } diff --git a/src/lib/serviceRoutines/postUpdateContextSubscription.cpp b/src/lib/serviceRoutines/postUpdateContextSubscription.cpp index a33ab19c52..e64ea62742 100644 --- a/src/lib/serviceRoutines/postUpdateContextSubscription.cpp +++ b/src/lib/serviceRoutines/postUpdateContextSubscription.cpp @@ -61,7 +61,7 @@ std::string postUpdateContextSubscription ciP->servicePathV, ciP->httpHeaders.correlator)); - TIMED_RENDER(answer = ucsr.render()); + TIMED_RENDER(answer = ucsr.toJsonV1()); return answer; } diff --git a/src/lib/serviceRoutines/putAllEntitiesWithTypeAndId.cpp b/src/lib/serviceRoutines/putAllEntitiesWithTypeAndId.cpp index 40f51bcdf1..9d535acd80 100644 --- a/src/lib/serviceRoutines/putAllEntitiesWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/putAllEntitiesWithTypeAndId.cpp @@ -97,14 +97,14 @@ extern std::string putAllEntitiesWithTypeAndId { alarmMgr.badInput(clientIp, "entity::type cannot be empty for this request"); response.errorCode.fill(SccBadRequest, "entity::type cannot be empty for this request"); - TIMED_RENDER(answer = response.render(asJsonObject, AllEntitiesWithTypeAndId)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, AllEntitiesWithTypeAndId)); return answer; } else if ((typeNameFromUriParam != entityType) && (typeNameFromUriParam != "")) { alarmMgr.badInput(clientIp, "non-matching entity::types in URL"); response.errorCode.fill(SccBadRequest, "non-matching entity::types in URL"); - TIMED_RENDER(answer = response.render( asJsonObject, AllEntitiesWithTypeAndId)); + TIMED_RENDER(answer = response.toJsonV1( asJsonObject, AllEntitiesWithTypeAndId)); return answer; } @@ -122,7 +122,7 @@ extern std::string putAllEntitiesWithTypeAndId // 06. Cleanup and return result - TIMED_RENDER(answer = response.render(asJsonObject, IndividualContextEntity)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, IndividualContextEntity)); parseDataP->upcr.res.release(); response.release(); diff --git a/src/lib/serviceRoutines/putAttributeValueInstance.cpp b/src/lib/serviceRoutines/putAttributeValueInstance.cpp index 86905ed3c8..3c08b79a83 100644 --- a/src/lib/serviceRoutines/putAttributeValueInstance.cpp +++ b/src/lib/serviceRoutines/putAttributeValueInstance.cpp @@ -89,7 +89,7 @@ std::string putAttributeValueInstance response.fill(SccBadRequest, details); - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); parseDataP->upcar.res.release(); @@ -109,7 +109,7 @@ std::string putAttributeValueInstance // 05. Render result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); // 06. Cleanup and return result diff --git a/src/lib/serviceRoutines/putAttributeValueInstanceWithTypeAndId.cpp b/src/lib/serviceRoutines/putAttributeValueInstanceWithTypeAndId.cpp index 0aed8d505a..c48ea540dd 100644 --- a/src/lib/serviceRoutines/putAttributeValueInstanceWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/putAttributeValueInstanceWithTypeAndId.cpp @@ -84,7 +84,7 @@ std::string putAttributeValueInstanceWithTypeAndId alarmMgr.badInput(clientIp, "non-matching entity::types in URL"); response.fill(SccBadRequest, "non-matching entity::types in URL"); - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); parseDataP->upcar.res.release(); return answer; @@ -99,7 +99,7 @@ std::string putAttributeValueInstanceWithTypeAndId std::string details = "unmatching metadata ID value URI/payload: /" + metaID + "/ vs /" + mP->stringValue + "/"; response.fill(SccBadRequest, details); - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); parseDataP->upcar.res.release(); return answer; @@ -119,7 +119,7 @@ std::string putAttributeValueInstanceWithTypeAndId // 07. Render result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); // 08. Cleanup and return result diff --git a/src/lib/serviceRoutines/putIndividualContextEntity.cpp b/src/lib/serviceRoutines/putIndividualContextEntity.cpp index c610e40fde..d96eaffeb0 100644 --- a/src/lib/serviceRoutines/putIndividualContextEntity.cpp +++ b/src/lib/serviceRoutines/putIndividualContextEntity.cpp @@ -99,7 +99,7 @@ std::string putIndividualContextEntity // 05. Cleanup and return result - TIMED_RENDER(answer = response.render(asJsonObject, IndividualContextEntity)); + TIMED_RENDER(answer = response.toJsonV1(asJsonObject, IndividualContextEntity)); response.release(); diff --git a/src/lib/serviceRoutines/putIndividualContextEntityAttribute.cpp b/src/lib/serviceRoutines/putIndividualContextEntityAttribute.cpp index cf95fe5de8..ebae972206 100644 --- a/src/lib/serviceRoutines/putIndividualContextEntityAttribute.cpp +++ b/src/lib/serviceRoutines/putIndividualContextEntityAttribute.cpp @@ -92,7 +92,7 @@ std::string putIndividualContextEntityAttribute // 4. Cleanup and return result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); response.release(); parseDataP->upcr.res.release(); // This call to release() crashed the functional test diff --git a/src/lib/serviceRoutines/putIndividualContextEntityAttributeWithTypeAndId.cpp b/src/lib/serviceRoutines/putIndividualContextEntityAttributeWithTypeAndId.cpp index cb46aeb95d..bd86c86843 100644 --- a/src/lib/serviceRoutines/putIndividualContextEntityAttributeWithTypeAndId.cpp +++ b/src/lib/serviceRoutines/putIndividualContextEntityAttributeWithTypeAndId.cpp @@ -115,7 +115,7 @@ std::string putIndividualContextEntityAttributeWithTypeAndId // 06. Cleanup and return result - TIMED_RENDER(answer = response.render(false, false)); + TIMED_RENDER(answer = response.toJsonV1(false, false)); parseDataP->upcar.res.release(); parseDataP->upcrs.res.release(); diff --git a/src/lib/serviceRoutinesV2/getEntities.cpp b/src/lib/serviceRoutinesV2/getEntities.cpp index e9eceae7e9..b6bc030af1 100644 --- a/src/lib/serviceRoutinesV2/getEntities.cpp +++ b/src/lib/serviceRoutinesV2/getEntities.cpp @@ -330,7 +330,7 @@ std::string getEntities } else { - TIMED_RENDER(answer = entities.render(getRenderFormat(ciP->uriParamOptions), + TIMED_RENDER(answer = entities.toJson(getRenderFormat(ciP->uriParamOptions), attributeFilter.stringV, false, parseDataP->qcr.res.metadataList.stringV)); diff --git a/src/lib/serviceRoutinesV2/getEntityAttribute.cpp b/src/lib/serviceRoutinesV2/getEntityAttribute.cpp index 11524f1774..6f1745c607 100644 --- a/src/lib/serviceRoutinesV2/getEntityAttribute.cpp +++ b/src/lib/serviceRoutinesV2/getEntityAttribute.cpp @@ -89,7 +89,7 @@ std::string getEntityAttribute StringList metadataFilter; setMetadataFilter(ciP->uriParam, &metadataFilter); - TIMED_RENDER(answer = attribute.render(ciP->httpHeaders.accepted("text/plain"), + TIMED_RENDER(answer = attribute.toJson(ciP->httpHeaders.accepted("text/plain"), ciP->httpHeaders.accepted("application/json"), ciP->httpHeaders.outformatSelect(), &(ciP->outMimeType), diff --git a/src/lib/serviceRoutinesV2/getEntityAttributeValue.cpp b/src/lib/serviceRoutinesV2/getEntityAttributeValue.cpp index 6e098d2df0..9f953be614 100644 --- a/src/lib/serviceRoutinesV2/getEntityAttributeValue.cpp +++ b/src/lib/serviceRoutinesV2/getEntityAttributeValue.cpp @@ -109,7 +109,7 @@ std::string getEntityAttributeValue StringList metadataFilter; setMetadataFilter(ciP->uriParam, &metadataFilter); - TIMED_RENDER(answer = attribute.render(ciP->httpHeaders.accepted("text/plain"), + TIMED_RENDER(answer = attribute.toJson(ciP->httpHeaders.accepted("text/plain"), ciP->httpHeaders.accepted("application/json"), ciP->httpHeaders.outformatSelect(), &(ciP->outMimeType), diff --git a/src/lib/serviceRoutinesV2/postBatchQuery.cpp b/src/lib/serviceRoutinesV2/postBatchQuery.cpp index 8d6e597764..398dda9385 100644 --- a/src/lib/serviceRoutinesV2/postBatchQuery.cpp +++ b/src/lib/serviceRoutinesV2/postBatchQuery.cpp @@ -92,7 +92,7 @@ std::string postBatchQuery { entities.fill(&parseDataP->qcrs.res); - TIMED_RENDER(answer = entities.render(getRenderFormat(ciP->uriParamOptions), + TIMED_RENDER(answer = entities.toJson(getRenderFormat(ciP->uriParamOptions), filterAttrs.stringV, false, qcrP->metadataList.stringV)); } From c8e58648c7cd37e86d4b886e089312cebb6f8df0 Mon Sep 17 00:00:00 2001 From: Fermin Galan Marquez Date: Fri, 28 Sep 2018 09:15:04 +0200 Subject: [PATCH 3/6] FIX adjust functional test after removing isDomain and registration metadata --- .../cases/0000_https_support/https.test | 6 +- ...rseBadVerbDiscoverContextAvailability.test | 17 +-- .../jsonParseBadVerbRegisterContext.test | 17 +-- .../jsonParseContextEntitiesByEntityId.test | 36 ----- .../jsonParseContextEntityAttributes.test | 24 ---- .../jsonParseEntityByIdAttributeByName.test | 37 +----- .../jsonParseIndividualContextEntity.test | 3 +- ...nParsePostDiscoverContextAvailability.test | 51 +------- ...sonParsePostNotifyContextAvailability.test | 17 +-- .../jsonParsePostRegisterContext.test | 17 +-- ...sonParsePostRegisterContextNoEntities.test | 17 +-- ...sonParsePostRegisterContextNoEntityId.test | 17 +-- .../jsonParsePostUpdateContext.test | 17 +-- .../0000_large_requests/split_request.test | 123 ++++++------------ .../context_entities_by_entity_id.test | 12 -- .../context_entity_attributes.test | 12 -- ...ntity_types_attribute_container_ngsi9.test | 6 +- .../context_entity_types_attribute_ngsi9.test | 9 +- .../context_entity_types_ngsi9.test | 6 +- .../entity_by_id_attribute_by_name.test | 15 +-- .../post_context_entity_types.test | 36 ----- .../post_context_entity_types_attribute.test | 39 +----- ...text_entity_types_attribute_container.test | 36 ----- .../notify_context_availability.test | 10 +- .../check_default_duration.test | 6 +- .../registration_expired.test | 6 +- .../registration_fail.test | 3 +- .../registration_ok.test | 15 +-- .../subscription_availability_expiration.test | 9 +- .../subscription_availability_sequence.test | 32 ++--- ...ption_availability_wildcards_sequence.test | 26 ++-- .../discovery_pagination.test | 122 +++++------------ ...etAttributeValueInstanceWithTypeAndId.test | 10 +- .../getContextEntitiesByEntityId.test | 39 ++---- .../getContextEntitiesByEntityIdAndType.test | 37 ++---- .../getContextEntityAttributes.test | 41 ++---- .../getContextEntityTypeAttribute.test | 49 ++----- .../getContextEntityTypes.test | 43 ++---- .../getEntityByIdAttributeByName.test | 33 ++--- ...ntityByIdAttributeByNameWithTypeAndId.test | 32 ++--- .../getIndividualContextEntityAttribute.test | 3 +- ...alContextEntityAttributeWithTypeAndId.test | 3 +- .../postContextEntitiesByEntityId.test | 3 +- .../postContextEntitiesByEntityIdAndType.test | 56 -------- .../postContextEntityAttributes.test | 3 +- .../postContextEntityTypeAttribute.test | 6 +- .../postEntityByIdAttributeByName.test | 3 +- ...ntityByIdAttributeByNameWithTypeAndId.test | 80 +----------- ...ostSubscribeContextAvailabilityConvOp.test | 9 +- .../putAllEntitiesWithTypeAndId.test | 3 +- .../putAttributeValueInstance.test | 3 +- ...utAttributeValueInstanceWithTypeAndId.test | 3 +- .../putAvailabilitySubscriptionConvOp.test | 12 +- .../putIndividualContextEntity.test | 3 +- .../putIndividualContextEntityAttribute.test | 3 +- ...alContextEntityAttributeWithTypeAndId.test | 3 +- .../putIndividualContextEntityAttributes.test | 3 +- .../registration_64bit_duration.test | 6 +- .../http_tenant_name_error.test | 27 +--- .../http_tenant_register_discovery.test | 12 +- .../0322_multitenancy/tenant_name_error.test | 27 +--- .../query_redirect_operation.test | 3 +- .../query_redirect_three_providers.test | 9 +- .../update_redirect_delete_operation.test | 3 +- .../update_redirect_operation.test | 3 +- .../ngsi9_new_url_paths.test | 6 +- .../cases/0559_new_url_paths/v1_registry.test | 6 +- ...ntextEntities_enType_ENTYPE_enId_ENID.test | 19 --- ...e_ENTYPE_enId_ENID_attribute_attrName.test | 30 +---- .../0585_empty_type_in_response/ngsi9.test | 21 +-- .../input.test | 6 +- ...ant_for_update_and_query_standard_ops.test | 6 +- ...tion_of_service_path_when_not_present.test | 3 +- ...ath_for_update_and_query_standard_ops.test | 6 +- ...ken_for_update_and_query_standard_ops.test | 3 +- .../forward_attribute.test | 3 +- .../forward_attribute_query.test | 3 +- .../forward_attribute_with_servicePath.test | 3 +- .../forward_queries.test | 18 +-- ..._discovery_with_invalid_service_paths.test | 9 +- ..._and_discovery_with_many_servicepaths.test | 33 ++--- ...gister_and_discovery_with_servicepath.test | 16 +-- .../not_found_in_context_provider.test | 3 +- .../query_double_forward.test | 6 +- .../query_false_registration.test | 3 +- ...false_registration_and_one_more_value.test | 3 +- ...ration_and_one_more_value_in_provider.test | 6 +- ...uery_five_different_cprs_in_one_query.test | 15 +-- .../query_forward_depends_on_attr_field.test | 12 +- .../query_forward_query_not_found.test | 3 +- ...ound_and_not_found_locally_and_remote.test | 51 +++----- ...utes_in_query_results_from_CB_and_CP1.test | 9 +- ...tes_in_query_results_from_CP1_and_CP2.test | 15 +-- .../query_one_forward.test | 3 +- .../query_shadowed_attribute.test | 3 +- ...query_two_attributes_in_cpr_one_local.test | 9 +- ...ttributes_in_one_cpr_three_in_another.test | 15 +-- ...ntextElement_providingApplicationList.test | 6 +- .../update_double_forward.test | 6 +- .../update_false_registration.test | 3 +- ...false_registration_and_one_more_value.test | 3 +- ...ration_and_one_more_value_in_provider.test | 6 +- ...date_five_different_cprs_in_one_query.test | 15 +-- .../update_forward_depends_on_attr_field.test | 12 +- ...and_not_found_in_local_and_three_cprs.test | 18 +-- .../update_one_forward.test | 3 +- .../update_shadowed_attribute.test | 3 +- ...found_on_cps_two_local_four_not_found.test | 21 +-- .../ngsiv2_query_double_forward.test | 6 +- .../ngsiv2_query_false_registration.test | 3 +- ...false_registration_and_one_more_value.test | 3 +- ...ration_and_one_more_value_in_provider.test | 6 +- ...uery_five_different_cprs_in_one_query.test | 15 +-- ...2_query_forward_depends_on_attr_field.test | 12 +- .../ngsiv2_query_forward_query_not_found.test | 3 +- ...ound_and_not_found_locally_and_remote.test | 51 +++----- ...utes_in_query_results_from_CB_and_CP1.test | 9 +- ...tes_in_query_results_from_CP1_and_CP2.test | 15 +-- .../ngsiv2_query_one_forward_query.test | 3 +- .../ngsiv2_query_shadowed_attribute.test | 3 +- ...query_two_attributes_in_cpr_one_local.test | 9 +- ...ttributes_in_one_cpr_three_in_another.test | 15 +-- .../ngsiv2_update_double_forward.test | 6 +- .../ngsiv2_update_false_registration.test | 3 +- ...false_registration_and_one_more_value.test | 3 +- ...ration_and_one_more_value_in_provider.test | 6 +- ...date_five_different_cprs_in_one_query.test | 15 +-- ..._update_forward_depends_on_attr_field.test | 12 +- ...and_not_found_in_local_and_three_cprs.test | 18 +-- .../ngsiv2_update_one_forward.test | 3 +- .../ngsiv2_update_shadowed_attribute.test | 3 +- ...found_on_cps_two_local_four_not_found.test | 21 +-- .../forward_that_times_out.test | 3 +- .../notification_that_times_out.test | 3 +- .../query_with_and_without_forwarding.test | 3 +- .../pagination_with_cprs.test | 3 +- .../pagination_with_cprs_mix_entities.test | 3 +- .../pagination_with_cprs_mix_entities2.test | 3 +- .../fwd_query_limited.test | 15 +-- .../fwd_query_unlimited.test | 15 +-- .../fwd_query_zero_limit.test | 15 +-- .../fwd_update_limited.test | 15 +-- .../fwd_update_unlimited.test | 15 +-- .../fwd_update_zero_limit.test | 15 +-- .../1310_suspect_200OK/suspect_200OK.test | 3 - .../cpr_update_compounds.test | 3 +- ..._correlator_forward_and_notifications.test | 3 +- ...t_found_when_forwarding_specific_attr.test | 3 +- .../forward_using_GET_v2_entities.test | 3 +- .../forward_using_GET_v2_entities_EID.test | 3 +- ...rward_using_GET_v2_entities_EID_attrs.test | 3 +- ...ng_GET_v2_entities_EID_attrs_ATTRNAME.test | 3 +- ..._v2_entities_EID_attrs_ATTRNAME_value.test | 3 +- ...ard_using_PATCH_v2_entities_EID_attrs.test | 3 +- .../forward_using_POST_v2_op_update.test | 3 +- ...ng_PUT_v2_entities_EID_attrs_ATTRNAME.test | 3 +- ...eply_to_v2_response_on_error_with_cpr.test | 6 +- ...compound_values_in_forwarded_messages.test | 3 +- ...n_forwarded_messages_exactly_as_issue.test | 3 +- ...e_type_converted_to_string_on_forward.test | 3 +- ...tes_overwrite_the_types_of_attributes.test | 3 +- .../patterns_in_registrations.test | 9 +- .../cpr_invalid_response.test | 3 +- .../fwd_update_ok_but_not_found_response.test | 3 +- .../updateContext_APPEND_CPr_Reg.test | 3 +- test/functionalTest/fixContentLengths.py | 9 +- 166 files changed, 534 insertions(+), 1713 deletions(-) diff --git a/test/functionalTest/cases/0000_https_support/https.test b/test/functionalTest/cases/0000_https_support/https.test index 99b61ed483..b0311736da 100644 --- a/test/functionalTest/cases/0000_https_support/https.test +++ b/test/functionalTest/cases/0000_https_support/https.test @@ -50,8 +50,7 @@ payload='{ ], "attributes": [ { - "name": "temperature", - "isDomain": "false" + "name": "temperature" } ], "providingApplication": "http://kz.org" @@ -100,7 +99,7 @@ Date: REGEX(.*) +++ 2: Discover the Sensor of temperature HTTP/1.1 200 OK -Content-Length: 232 +Content-Length: 213 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -111,7 +110,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "" } diff --git a/test/functionalTest/cases/0000_json_parse/jsonParseBadVerbDiscoverContextAvailability.test b/test/functionalTest/cases/0000_json_parse/jsonParseBadVerbDiscoverContextAvailability.test index b9e34209f2..302e8405e0 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParseBadVerbDiscoverContextAvailability.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParseBadVerbDiscoverContextAvailability.test @@ -54,22 +54,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/functionalTest/cases/0000_json_parse/jsonParseBadVerbRegisterContext.test b/test/functionalTest/cases/0000_json_parse/jsonParseBadVerbRegisterContext.test index 3af0aadc2a..31102678d9 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParseBadVerbRegisterContext.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParseBadVerbRegisterContext.test @@ -47,22 +47,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/functionalTest/cases/0000_json_parse/jsonParseContextEntitiesByEntityId.test b/test/functionalTest/cases/0000_json_parse/jsonParseContextEntitiesByEntityId.test index a20613a93b..5c3d24e41c 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParseContextEntitiesByEntityId.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParseContextEntitiesByEntityId.test @@ -32,18 +32,6 @@ brokerStart CB echo "1: ++++++++++++++++++++" url="/v1/registry/contextEntities/ENTITY_ID" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1H", "providingApplication" : "http://kz.tid.es/abc" }' @@ -69,18 +57,6 @@ orionCurl --url "$url" --payload "${payload}" echo "3: ++++++++++++++++++++" url="/v1/registry/contextEntities/ENTITY_ID" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1111" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "YYY" - } - ], "duration" : "PT2H", "providingApplication" : "http://kz.tid.es/abc2", "registrationId" : "'$REG_ID'" @@ -116,18 +92,6 @@ orionCurl --url "/v1/registry/contextEntities/ENTITY_ID" -X "DELETE" echo "8: ++++++++++++++++++++" url="/v1/registry/contextEntities/ENTITY_ID" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1111" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "YYY" - } - ], "duration" : "PT2H", "providingApplication" : "http://kz.tid.es/abc2" }' diff --git a/test/functionalTest/cases/0000_json_parse/jsonParseContextEntityAttributes.test b/test/functionalTest/cases/0000_json_parse/jsonParseContextEntityAttributes.test index 51bb36e115..0bbfca01e8 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParseContextEntityAttributes.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParseContextEntityAttributes.test @@ -32,18 +32,6 @@ brokerStart CB echo "1: ++++++++++++++++++++" url="/v1/registry/contextEntities/ENTITY_ID/attributes" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1H", "providingApplication" : "http://kz.tid.es/abc" }' @@ -69,18 +57,6 @@ orionCurl --url ${url} --payload "${payload}" echo "3: ++++++++++++++++++++" url="/v1/registry/contextEntities/ENTITY_ID/attributes" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1111" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "YYY" - } - ], "duration" : "PT2H", "providingApplication" : "http://kz.tid.es/abc2", "registrationId" : "'$REG_ID'" diff --git a/test/functionalTest/cases/0000_json_parse/jsonParseEntityByIdAttributeByName.test b/test/functionalTest/cases/0000_json_parse/jsonParseEntityByIdAttributeByName.test index 41cf2762e0..383a32cce9 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParseEntityByIdAttributeByName.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParseEntityByIdAttributeByName.test @@ -32,18 +32,6 @@ brokerStart CB echo "1: ++++++++++++++++++++" url="/v1/registry/contextEntities/ENTITY_ID/attributes/ATTRIBUTE_01" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1H", "providingApplication" : "http://kz.tid.es/abc" }' @@ -69,18 +57,6 @@ orionCurl --url ${url} --payload "${payload}" echo "3: ++++++++++++++++++++" url="/v1/registry/contextEntities/ENTITY_ID/attributes/ATTRIBUTE_01" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1111" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "YYY" - } - ], "duration" : "PT2H", "providingApplication" : "http://kz.tid.es/abc2", "registrationId" : "'$REG_ID'" @@ -149,7 +125,7 @@ Date: REGEX(.*) } 2: ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 236 +Content-Length: 217 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -159,8 +135,7 @@ Date: REGEX(.*) { "contextRegistration": { "attributes": [ - { - "isDomain": "false", + { "name": "ATTRIBUTE_01", "type": "" } @@ -190,7 +165,7 @@ Date: REGEX(.*) } 4: ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 237 +Content-Length: 218 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -200,8 +175,7 @@ Date: REGEX(.*) { "contextRegistration": { "attributes": [ - { - "isDomain": "false", + { "name": "ATTRIBUTE_01", "type": "" } @@ -220,7 +194,7 @@ Date: REGEX(.*) } 5: ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 237 +Content-Length: 218 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -231,7 +205,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "ATTRIBUTE_01", "type": "" } diff --git a/test/functionalTest/cases/0000_json_parse/jsonParseIndividualContextEntity.test b/test/functionalTest/cases/0000_json_parse/jsonParseIndividualContextEntity.test index 1c14336df8..0a2257a0ff 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParseIndividualContextEntity.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParseIndividualContextEntity.test @@ -75,8 +75,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" diff --git a/test/functionalTest/cases/0000_json_parse/jsonParsePostDiscoverContextAvailability.test b/test/functionalTest/cases/0000_json_parse/jsonParsePostDiscoverContextAvailability.test index e1e453c2e0..921d403be1 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParsePostDiscoverContextAvailability.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParsePostDiscoverContextAvailability.test @@ -48,22 +48,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" @@ -126,34 +111,11 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] + "type": "degree" }, { "name": "pressure", - "type": "bar", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "bar" } ], "providingApplication": "http://192.168.100.1:70/application" @@ -209,7 +171,7 @@ Date: REGEX(.*) } +++++ Registration 1 Done +++++++++++++++ HTTP/1.1 200 OK -Content-Length: 319 +Content-Length: 300 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -220,7 +182,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -256,7 +217,7 @@ Date: REGEX(.*) } +++++ Registration 2 Done +++++++++++++++ HTTP/1.1 200 OK -Content-Length: 311 +Content-Length: 273 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -267,12 +228,10 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" }, { - "isDomain": "false", "name": "pressure", "type": "bar" } diff --git a/test/functionalTest/cases/0000_json_parse/jsonParsePostNotifyContextAvailability.test b/test/functionalTest/cases/0000_json_parse/jsonParsePostNotifyContextAvailability.test index 17615fdf0a..f0945d7517 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParsePostNotifyContextAvailability.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParsePostNotifyContextAvailability.test @@ -50,22 +50,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContext.test b/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContext.test index b24e4688ab..fbd2593f03 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContext.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContext.test @@ -48,22 +48,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContextNoEntities.test b/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContextNoEntities.test index 3826fd02b0..c10c30347a 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContextNoEntities.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContextNoEntities.test @@ -35,22 +35,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContextNoEntityId.test b/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContextNoEntityId.test index 235a9c7305..206fa854cf 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContextNoEntityId.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParsePostRegisterContextNoEntityId.test @@ -46,22 +46,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/functionalTest/cases/0000_json_parse/jsonParsePostUpdateContext.test b/test/functionalTest/cases/0000_json_parse/jsonParsePostUpdateContext.test index 576196de8e..4bb1535843 100644 --- a/test/functionalTest/cases/0000_json_parse/jsonParsePostUpdateContext.test +++ b/test/functionalTest/cases/0000_json_parse/jsonParsePostUpdateContext.test @@ -88,22 +88,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/functionalTest/cases/0000_large_requests/split_request.test b/test/functionalTest/cases/0000_large_requests/split_request.test index 34b8eea068..aa75a7721b 100644 --- a/test/functionalTest/cases/0000_large_requests/split_request.test +++ b/test/functionalTest/cases/0000_large_requests/split_request.test @@ -42,203 +42,163 @@ payload='{ "attributes": [ { "name": "cra1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra4", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra5", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra6", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra7", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra8", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra9", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra10", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra11", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra12", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra13", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra14", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra15", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra16", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra17", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra18", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra19", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra20", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra21", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra22", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra23", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra24", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra25", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra26", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra27", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra28", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra29", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra30", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra31", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra32", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra33", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra34", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra35", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra36", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra37", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra38", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra39", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "cra40", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:1028/application" @@ -279,7 +239,7 @@ Date: REGEX(.*) } ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 256 +Content-Length: 237 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -290,7 +250,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "cra1", "type": "string" } diff --git a/test/functionalTest/cases/0000_ngsi9_convenience/context_entities_by_entity_id.test b/test/functionalTest/cases/0000_ngsi9_convenience/context_entities_by_entity_id.test index 46b003117b..cd6bafa275 100644 --- a/test/functionalTest/cases/0000_ngsi9_convenience/context_entities_by_entity_id.test +++ b/test/functionalTest/cases/0000_ngsi9_convenience/context_entities_by_entity_id.test @@ -35,18 +35,6 @@ echo echo "1: ++++++++++++++++++++" url="/v1/registry/contextEntities/entity01" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1H", "providingApplication" : "http://kz.tid.es/abc" }' diff --git a/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_attributes.test b/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_attributes.test index 617bc58671..0743627eb0 100644 --- a/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_attributes.test +++ b/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_attributes.test @@ -35,18 +35,6 @@ echo echo "1: ++++++++++++++++++++" url="/v1/registry/contextEntities/entity01/attributes" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1H", "providingApplication" : "http://kz.tid.es/abc" }' diff --git a/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_attribute_container_ngsi9.test b/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_attribute_container_ngsi9.test index cdace5d527..a9fef2c9eb 100644 --- a/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_attribute_container_ngsi9.test +++ b/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_attribute_container_ngsi9.test @@ -52,8 +52,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" @@ -97,7 +96,7 @@ Date: REGEX(.*) } 2: ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 317 +Content-Length: 298 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -108,7 +107,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } diff --git a/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_attribute_ngsi9.test b/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_attribute_ngsi9.test index 6772ecd84a..cba613ab50 100644 --- a/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_attribute_ngsi9.test +++ b/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_attribute_ngsi9.test @@ -52,13 +52,11 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" }, { "name": "pressure", - "type": "bar", - "isDomain": "false" + "type": "bar" } ], "providingApplication": "http://localhost:1028/application" @@ -123,7 +121,7 @@ Date: REGEX(.*) } 2: ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 317 +Content-Length: 298 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -134,7 +132,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } diff --git a/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_ngsi9.test b/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_ngsi9.test index c7f3d3ae98..143c89db97 100644 --- a/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_ngsi9.test +++ b/test/functionalTest/cases/0000_ngsi9_convenience/context_entity_types_ngsi9.test @@ -53,8 +53,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" @@ -103,7 +102,7 @@ Date: REGEX(.*) 2: ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 317 +Content-Length: 298 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -114,7 +113,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } diff --git a/test/functionalTest/cases/0000_ngsi9_convenience/entity_by_id_attribute_by_name.test b/test/functionalTest/cases/0000_ngsi9_convenience/entity_by_id_attribute_by_name.test index 913e04c2a5..9c4f470fa0 100644 --- a/test/functionalTest/cases/0000_ngsi9_convenience/entity_by_id_attribute_by_name.test +++ b/test/functionalTest/cases/0000_ngsi9_convenience/entity_by_id_attribute_by_name.test @@ -35,18 +35,6 @@ orionCurl --url "/v1/registry/contextEntities/entity01/attributes/attr01" echo "1: ++++++++++++++++++++" url="/v1/registry/contextEntities/entity01/attributes/attr01" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1H", "providingApplication" : "http://kz.tid.es/abc" }' @@ -82,7 +70,7 @@ Date: REGEX(.*) } 2: ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 229 +Content-Length: 210 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -93,7 +81,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "attr01", "type": "" } diff --git a/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types.test b/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types.test index 3380d470a3..bc2c89d290 100644 --- a/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types.test +++ b/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types.test @@ -32,18 +32,6 @@ brokerStart CB echo "0: ++++++++++++++++++++" url="/v1/registry/contextEntityTypes/Room" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1H", "providingApplication" : "http://kz.tid.es/abc" }' @@ -54,18 +42,6 @@ REG_ID=$(echo "$_response" | grep registrationId | awk -F\" '{ print $4}') echo "1: ++++++++++++++++++++" url="/v1/registry/contextEntityTypes/Room" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT2H", "providingApplication" : "http://kz.tid.es/abc", "registrationId": "'$REG_ID'" @@ -75,18 +51,6 @@ orionCurl --url "$url" --payload "$payload" echo "2: ++++++++++++++++++++" url="/v1/registry/contextEntityTypes/Room" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT3H", "providingApplication" : "http://kz.tid.es/abc", "registrationId": "012301230123012301230123" diff --git a/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types_attribute.test b/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types_attribute.test index 6ee5347d94..4730a5f653 100644 --- a/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types_attribute.test +++ b/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types_attribute.test @@ -32,18 +32,6 @@ brokerStart CB echo "0: ++++++++++++++++++++" url="/v1/registry/contextEntityTypes/Room/attributes/temperature" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1H", "providingApplication" : "http://kz.tid.es/abc" }' @@ -54,18 +42,6 @@ REG_ID=$(echo "$_response" | grep registrationId | awk -F\" '{ print $4}') echo "1: ++++++++++++++++++++" url="/v1/registry/contextEntityTypes/Room/attributes/temperature" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT2H", "providingApplication" : "http://kz.tid.es/abc", "registrationId": "'$REG_ID'" @@ -75,18 +51,6 @@ orionCurl --url "$url" --payload "$payload" echo "2: ++++++++++++++++++++" url="/v1/registry/contextEntityTypes/Room/attributes/temperature" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT3H", "providingApplication" : "http://kz.tid.es/abc", "registrationId": "012301230123012301230123" @@ -136,7 +100,7 @@ Date: REGEX(.*) } 3: ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 230 +Content-Length: 211 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -147,7 +111,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "" } diff --git a/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types_attribute_container.test b/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types_attribute_container.test index ed46c68417..36bfa1aff1 100644 --- a/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types_attribute_container.test +++ b/test/functionalTest/cases/0000_ngsi9_convenience/post_context_entity_types_attribute_container.test @@ -32,18 +32,6 @@ brokerStart CB echo "0: ++++++++++++++++++++" url="/v1/registry/contextEntityTypes/Room/attributes" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1H", "providingApplication" : "http://kz.tid.es/abc" }' @@ -54,18 +42,6 @@ REG_ID=$(echo "$_response" | grep registrationId | awk -F\" '{ print $4}') echo "1: ++++++++++++++++++++" url="/v1/registry/contextEntityTypes/Room/attributes" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT2H", "providingApplication" : "http://kz.tid.es/abc", "registrationId": "'$REG_ID'" @@ -75,18 +51,6 @@ orionCurl --url "$url" --payload "$payload" echo "2: ++++++++++++++++++++" url="/v1/registry/contextEntityTypes/Room/attributes" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT3H", "providingApplication" : "http://kz.tid.es/abc", "registrationId": "012301230123012301230123" diff --git a/test/functionalTest/cases/0000_ngsi9_notify/notify_context_availability.test b/test/functionalTest/cases/0000_ngsi9_notify/notify_context_availability.test index 12ee75e32e..a798b83732 100644 --- a/test/functionalTest/cases/0000_ngsi9_notify/notify_context_availability.test +++ b/test/functionalTest/cases/0000_ngsi9_notify/notify_context_availability.test @@ -45,13 +45,11 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" }, { "name": "pressure", - "type": "clima", - "isDomain": "false" + "type": "clima" } ], "providingApplication": "http://sensor1:1028/providingApplication" @@ -91,7 +89,7 @@ Date: REGEX(.*) } 2: ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 324 +Content-Length: 286 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -102,12 +100,10 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" }, { - "isDomain": "false", "name": "pressure", "type": "clima" } diff --git a/test/functionalTest/cases/0000_ngsi9_registration_and_discover/check_default_duration.test b/test/functionalTest/cases/0000_ngsi9_registration_and_discover/check_default_duration.test index 32347b9f48..4fa493d4dc 100644 --- a/test/functionalTest/cases/0000_ngsi9_registration_and_discover/check_default_duration.test +++ b/test/functionalTest/cases/0000_ngsi9_registration_and_discover/check_default_duration.test @@ -46,8 +46,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" @@ -91,7 +90,7 @@ Date: REGEX(.*) } ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 317 +Content-Length: 298 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -102,7 +101,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } diff --git a/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_expired.test b/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_expired.test index c75de44485..f2a4c492f4 100644 --- a/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_expired.test +++ b/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_expired.test @@ -47,8 +47,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" @@ -119,7 +118,7 @@ Date: REGEX(.*) } 1: ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 317 +Content-Length: 298 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -130,7 +129,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } diff --git a/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_fail.test b/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_fail.test index 41961fff31..4618fd1af9 100644 --- a/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_fail.test +++ b/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_fail.test @@ -65,8 +65,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" diff --git a/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_ok.test b/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_ok.test index a04f076af7..d8909afbe4 100644 --- a/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_ok.test +++ b/test/functionalTest/cases/0000_ngsi9_registration_and_discover/registration_ok.test @@ -47,8 +47,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" @@ -118,8 +117,7 @@ payload='{ "attributes": [ { "name": "pressure", - "type": "BAR", - "isDomain": "false" + "type": "BAR" } ], "providingApplication": "http://localhost:1028/application" @@ -166,7 +164,7 @@ Date: REGEX(.*) } ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 317 +Content-Length: 298 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -177,7 +175,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -201,7 +198,7 @@ Date: REGEX(.*) } ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 317 +Content-Length: 298 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -212,7 +209,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -247,7 +243,7 @@ Date: REGEX(.*) } ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 257 +Content-Length: 238 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -258,7 +254,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "pressure", "type": "BAR" } diff --git a/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_expiration.test b/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_expiration.test index 6fac2cee5f..905cade4bb 100644 --- a/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_expiration.test +++ b/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_expiration.test @@ -78,8 +78,7 @@ payload2='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028" @@ -108,8 +107,7 @@ payload3='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028" @@ -176,7 +174,7 @@ Date: REGEX(.*) =========================================== POST http://127.0.0.1:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 295 +Content-Length: 276 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: 127.0.0.1:REGEX(\d+) Accept: application/json @@ -189,7 +187,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } diff --git a/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_sequence.test b/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_sequence.test index 20e5ef0a13..7625ff54d1 100644 --- a/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_sequence.test +++ b/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_sequence.test @@ -44,8 +44,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://sensor1:1028" @@ -102,8 +101,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://sensor2:1028" @@ -133,8 +131,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://sensor3:1028" @@ -190,8 +187,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://sensor4:1028" @@ -218,8 +214,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://sensor5:1028" @@ -265,8 +260,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://sensor6:1028" @@ -421,7 +415,7 @@ Date: REGEX(.*) Accumulated data: POST http://127.0.0.1:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 293 +Content-Length: 274 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: 127.0.0.1:REGEX(\d+) Accept: application/json @@ -434,7 +428,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -455,7 +448,7 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) ======================================= POST http://127.0.0.1:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 287 +Content-Length: 268 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: 127.0.0.1:REGEX(\d+) Accept: application/json @@ -468,7 +461,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -489,7 +481,7 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) ======================================= POST http://127.0.0.1:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 293 +Content-Length: 274 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: 127.0.0.1:REGEX(\d+) Accept: application/json @@ -502,7 +494,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -523,7 +514,7 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) ======================================= POST http://127.0.0.1:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 289 +Content-Length: 270 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: 127.0.0.1:REGEX(\d+) Accept: application/json @@ -535,8 +526,7 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) { "contextRegistration": { "attributes": [ - { - "isDomain": "false", + { "name": "temperature", "type": "degree" } diff --git a/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_wildcards_sequence.test b/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_wildcards_sequence.test index 455a93a50a..9a2b902318 100644 --- a/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_wildcards_sequence.test +++ b/test/functionalTest/cases/0000_ngsi9_subscriptions/subscription_availability_wildcards_sequence.test @@ -48,8 +48,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://sensor1:1028" @@ -79,8 +78,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://sensor2:1028" @@ -126,8 +124,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://sensor3:1028" @@ -172,8 +169,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://sensor4:1028" @@ -278,7 +274,7 @@ Date: REGEX(.*) 7: ++++++++++++++++++++ POST http://127.0.0.1:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 509 +Content-Length: 471 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: 127.0.0.1:REGEX(\d+) Accept: application/json @@ -291,7 +287,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -310,7 +305,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -331,7 +325,7 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) ======================================= POST http://127.0.0.1:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 294 +Content-Length: 275 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: 127.0.0.1:REGEX(\d+) Accept: application/json @@ -344,7 +338,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -365,7 +358,7 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) ======================================= POST http://127.0.0.1:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 501 +Content-Length: 463 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: 127.0.0.1:REGEX(\d+) Accept: application/json @@ -378,7 +371,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -397,7 +389,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -418,7 +409,7 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) ======================================= POST http://127.0.0.1:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 290 +Content-Length: 271 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: 127.0.0.1:REGEX(\d+) Accept: application/json @@ -431,7 +422,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/discovery_pagination.test b/test/functionalTest/cases/0117_convop_using_standard_ops/discovery_pagination.test index 985e87c50e..473d429fe4 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/discovery_pagination.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/discovery_pagination.test @@ -78,8 +78,7 @@ payload='{ "attributes": [ { "name": "A0", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -107,8 +106,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -136,8 +134,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -165,8 +162,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -194,8 +190,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -223,8 +218,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -252,8 +246,7 @@ payload='{ "attributes": [ { "name": "A6", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -281,8 +274,7 @@ payload='{ "attributes": [ { "name": "A7", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -310,8 +302,7 @@ payload='{ "attributes": [ { "name": "A8", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -339,8 +330,7 @@ payload='{ "attributes": [ { "name": "A9", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -368,8 +358,7 @@ payload='{ "attributes": [ { "name": "A9", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -397,8 +386,7 @@ payload='{ "attributes": [ { "name": "A9", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -426,8 +414,7 @@ payload='{ "attributes": [ { "name": "A10", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -455,8 +442,7 @@ payload='{ "attributes": [ { "name": "A10", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -484,8 +470,7 @@ payload='{ "attributes": [ { "name": "A10", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -815,7 +800,7 @@ Date: REGEX(.*) 16. Discover E1 using /v1/registry/contextEntities/E1, pagination '0-2' ======================================================================= HTTP/1.1 200 OK -Content-Length: 613 +Content-Length: 556 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -826,7 +811,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A0", "type": "string" } @@ -845,7 +829,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -864,7 +847,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -886,7 +868,7 @@ Date: REGEX(.*) 17. Discover E1 using /v1/registry/contextEntities/E1, pagination '3-23' ======================================================================== HTTP/1.1 200 OK -Content-Length: 1385 +Content-Length: 1252 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -897,7 +879,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -916,7 +897,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A4", "type": "string" } @@ -935,7 +915,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A5", "type": "string" } @@ -954,7 +933,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A6", "type": "string" } @@ -973,7 +951,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A7", "type": "string" } @@ -992,7 +969,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A8", "type": "string" } @@ -1011,7 +987,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A9", "type": "string" } @@ -1033,7 +1008,7 @@ Date: REGEX(.*) 18. Discover E1 using /v1/registry/contextEntities/E1, pagination '5', with details =================================================================================== HTTP/1.1 200 OK -Content-Length: 296 +Content-Length: 277 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1044,7 +1019,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A5", "type": "string" } @@ -1071,7 +1045,7 @@ Date: REGEX(.*) 19. Discover E1 using /v1/registry/contextEntities/E1/attributes, pagination '0-2' ================================================================================== HTTP/1.1 200 OK -Content-Length: 613 +Content-Length: 556 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1082,7 +1056,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A0", "type": "string" } @@ -1101,7 +1074,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -1120,7 +1092,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -1142,7 +1113,7 @@ Date: REGEX(.*) 20. Discover E1 using /v1/registry/contextEntities/E1/attributes, pagination '3-23' =================================================================================== HTTP/1.1 200 OK -Content-Length: 1385 +Content-Length: 1252 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1153,7 +1124,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -1172,7 +1142,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A4", "type": "string" } @@ -1190,8 +1159,7 @@ Date: REGEX(.*) { "contextRegistration": { "attributes": [ - { - "isDomain": "false", + { "name": "A5", "type": "string" } @@ -1210,7 +1178,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A6", "type": "string" } @@ -1229,7 +1196,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A7", "type": "string" } @@ -1248,7 +1214,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A8", "type": "string" } @@ -1267,7 +1232,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A9", "type": "string" } @@ -1289,7 +1253,7 @@ Date: REGEX(.*) 21. Discover E1 using /v1/registry/contextEntities/E1/attributes, pagination '5', with details ============================================================================================== HTTP/1.1 200 OK -Content-Length: 296 +Content-Length: 277 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1300,7 +1264,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A5", "type": "string" } @@ -1327,7 +1290,7 @@ Date: REGEX(.*) 22. Discover E2 using /v1/registry/contextEntities/E2/attributes/A9, pagination '0-1' ===================================================================================== HTTP/1.1 200 OK -Content-Length: 420 +Content-Length: 382 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1338,7 +1301,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A9", "type": "string" } @@ -1357,7 +1319,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A9", "type": "string" } @@ -1379,7 +1340,7 @@ Date: REGEX(.*) 23. Discover E2 using /v1/registry/contextEntities/E2/attributes/A9, pagination '1-21' ====================================================================================== HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1390,7 +1351,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A9", "type": "string" } @@ -1412,7 +1372,7 @@ Date: REGEX(.*) 24. Discover E2 using /v1/registry/contextEntities/E2/attributes/A9, pagination '0', with details ================================================================================================= HTTP/1.1 200 OK -Content-Length: 295 +Content-Length: 276 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1423,7 +1383,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A9", "type": "string" } @@ -1450,7 +1409,7 @@ Date: REGEX(.*) 25. Discover type T1 using /v1/registry/contextEntityTypes/T1, pagination '0-1' =============================================================================== HTTP/1.1 200 OK -Content-Length: 420 +Content-Length: 382 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1461,7 +1420,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A0", "type": "string" } @@ -1480,7 +1438,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -1502,7 +1459,7 @@ Date: REGEX(.*) 26. Discover type T1 using /v1/registry/contextEntityTypes/T1, pagination '1-21' ================================================================================ HTTP/1.1 200 OK -Content-Length: 1771 +Content-Length: 1600 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1513,7 +1470,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -1532,7 +1488,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -1551,7 +1506,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -1570,7 +1524,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A4", "type": "string" } @@ -1589,7 +1542,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A5", "type": "string" } @@ -1608,7 +1560,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A6", "type": "string" } @@ -1627,7 +1578,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A7", "type": "string" } @@ -1646,7 +1596,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A8", "type": "string" } @@ -1665,7 +1614,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A9", "type": "string" } @@ -1687,7 +1635,7 @@ Date: REGEX(.*) 27. Discover type T1 using /v1/registry/contextEntityTypes/T1, pagination '0', with details =========================================================================================== HTTP/1.1 200 OK -Content-Length: 296 +Content-Length: 277 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1698,7 +1646,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A0", "type": "string" } @@ -1725,7 +1672,7 @@ Date: REGEX(.*) 28. Discover type T4, attribute A10, using /v1/registry/contextEntityTypes/T4/attributes/A10, pagination '0-1' ============================================================================================================== HTTP/1.1 200 OK -Content-Length: 422 +Content-Length: 384 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1736,7 +1683,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A10", "type": "string" } @@ -1755,7 +1701,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A10", "type": "string" } @@ -1777,7 +1722,7 @@ Date: REGEX(.*) 29. Discover type T4, attribute A10, using /v1/registry/contextEntityTypes/T4/attributes/A10, pagination '1-21' =============================================================================================================== HTTP/1.1 200 OK -Content-Length: 422 +Content-Length: 384 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1788,7 +1733,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A10", "type": "string" } @@ -1807,7 +1751,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A10", "type": "string" } @@ -1829,7 +1772,7 @@ Date: REGEX(.*) 30. Discover type T4, attribute A10, using /v1/registry/contextEntityTypes/T4/attributes/A10, pagination '0', with details ========================================================================================================================== HTTP/1.1 200 OK -Content-Length: 296 +Content-Length: 277 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -1839,8 +1782,7 @@ Date: REGEX(.*) { "contextRegistration": { "attributes": [ - { - "isDomain": "false", + { "name": "A10", "type": "string" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/getAttributeValueInstanceWithTypeAndId.test b/test/functionalTest/cases/0117_convop_using_standard_ops/getAttributeValueInstanceWithTypeAndId.test index 6b5f7d3e61..f36486a775 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/getAttributeValueInstanceWithTypeAndId.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/getAttributeValueInstanceWithTypeAndId.test @@ -150,15 +150,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "primary" - } - ] + "type": "string" } ], "providingApplication": "http://localhost:'$CP1_PORT'/v1" diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntitiesByEntityId.test b/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntitiesByEntityId.test index 9959534ebe..aa843da560 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntitiesByEntityId.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntitiesByEntityId.test @@ -63,8 +63,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -92,8 +91,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -121,8 +119,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -237,7 +234,7 @@ Date: REGEX(.*) 04. Discover E1 using /v1/registry/contextEntities/E1 with Service-Path /A1 =========================================================================== HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -248,7 +245,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -270,7 +266,7 @@ Date: REGEX(.*) 05. Discover E1 using /v1/registry/contextEntities/E1 with Service-Path /A1,/A2 =============================================================================== HTTP/1.1 200 OK -Content-Length: 418 +Content-Length: 380 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -281,7 +277,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -300,7 +295,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -322,7 +316,7 @@ Date: REGEX(.*) 06. Discover E1 using /v1/registry/contextEntities/E1 with Service-Path /A1,/A3 =============================================================================== HTTP/1.1 200 OK -Content-Length: 420 +Content-Length: 382 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -333,7 +327,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -352,7 +345,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -374,7 +366,7 @@ Date: REGEX(.*) 07. Discover E1 using /v1/registry/contextEntities/E1 with Service-Path /A2,/A3 =============================================================================== HTTP/1.1 200 OK -Content-Length: 418 +Content-Length: 380 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -385,7 +377,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -404,7 +395,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -426,7 +416,7 @@ Date: REGEX(.*) 08. Discover E1 using /v1/registry/contextEntities/E1 with Service-Path /A1,/A2,/A3 =================================================================================== HTTP/1.1 200 OK -Content-Length: 611 +Content-Length: 554 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -437,7 +427,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -456,7 +445,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -475,7 +463,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -513,7 +500,7 @@ Date: REGEX(.*) 10. Discover E1 using /v1/registry/contextEntities/E1 without Service-Path ========================================================================== HTTP/1.1 200 OK -Content-Length: 611 +Content-Length: 554 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -524,7 +511,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -543,7 +529,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -562,7 +547,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -584,7 +568,7 @@ Date: REGEX(.*) 11. Discover E1 using /v1/registry/contextEntities/E1 with Service-Path /# ========================================================================== HTTP/1.1 200 OK -Content-Length: 611 +Content-Length: 554 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -595,7 +579,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -614,7 +597,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -633,7 +615,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntitiesByEntityIdAndType.test b/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntitiesByEntityIdAndType.test index 4e01532652..b53fd3319b 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntitiesByEntityIdAndType.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntitiesByEntityIdAndType.test @@ -71,8 +71,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "slash", - "isDomain": "false" + "type": "slash" } ], "providingApplication": "http://kz.tid.es/abc" @@ -149,8 +148,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "s1", - "isDomain": "false" + "type": "s1" } ], "providingApplication": "http://kz.tid.es/abc" @@ -178,8 +176,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "s2", - "isDomain": "false" + "type": "s2" } ], "providingApplication": "http://kz.tid.es/abc" @@ -268,7 +265,7 @@ Date: REGEX(.*) 03. GET /v1/registry/contextEntities/type/T1/id/E1 and see it work ================================================================== HTTP/1.1 200 OK -Content-Length: 226 +Content-Length: 207 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -279,7 +276,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "slash" } @@ -301,7 +297,7 @@ Date: REGEX(.*) 04. GET /v1/registry/contextEntities/type/T1/id/E1?exist=entity::type and see it work ===================================================================================== HTTP/1.1 200 OK -Content-Length: 226 +Content-Length: 207 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -312,7 +308,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "slash" } @@ -334,7 +329,7 @@ Date: REGEX(.*) 05. GET /v1/registry/contextEntities/type/T1/id/E1?entity::type=T1 and see it work ================================================================================== HTTP/1.1 200 OK -Content-Length: 226 +Content-Length: 207 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -345,7 +340,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "slash" } @@ -461,7 +455,7 @@ Date: REGEX(.*) 12. GET /v1/registry/contextEntities/type/T1/id/E1 with Service-Path /s1 ======================================================================== HTTP/1.1 200 OK -Content-Length: 223 +Content-Length: 204 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -472,7 +466,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "s1" } @@ -494,7 +487,7 @@ Date: REGEX(.*) 13. GET /v1/registry/contextEntities/type/T1/id/E1 with Service-Path /s2 ======================================================================== HTTP/1.1 200 OK -Content-Length: 223 +Content-Length: 204 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -505,7 +498,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "s2" } @@ -543,7 +535,7 @@ Date: REGEX(.*) 15. GET /v1/registry/contextEntities/type/T1/id/E1 without Service-Path ======================================================================= HTTP/1.1 200 OK -Content-Length: 604 +Content-Length: 547 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -554,7 +546,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "slash" } @@ -573,7 +564,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "s1" } @@ -592,7 +582,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "s2" } @@ -614,7 +603,7 @@ Date: REGEX(.*) 16. GET /v1/registry/contextEntities/type/T1/id/E1 with Service-Path /# ======================================================================= HTTP/1.1 200 OK -Content-Length: 604 +Content-Length: 547 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -625,7 +614,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "slash" } @@ -644,7 +632,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "s1" } @@ -663,7 +650,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "s2" } @@ -685,7 +671,7 @@ Date: REGEX(.*) 17. GET /v1/registry/contextEntities/type/T1/id/E1 with Service-Path / ====================================================================== HTTP/1.1 200 OK -Content-Length: 226 +Content-Length: 207 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -696,7 +682,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "slash" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityAttributes.test b/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityAttributes.test index 1963d21b46..6c0058bfee 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityAttributes.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityAttributes.test @@ -58,8 +58,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -87,8 +86,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -116,8 +114,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -232,7 +229,7 @@ Date: REGEX(.*) 04. Discover E1 using /v1/registry/contextEntities/E1/attributes with Service-Path /A1 ====================================================================================== HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -243,7 +240,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -265,7 +261,7 @@ Date: REGEX(.*) 05. Discover E1 using /v1/registry/contextEntities/E1/attributes with Service-Path /A1,/A2 ========================================================================================== HTTP/1.1 200 OK -Content-Length: 418 +Content-Length: 380 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -275,8 +271,7 @@ Date: REGEX(.*) { "contextRegistration": { "attributes": [ - { - "isDomain": "false", + { "name": "A1", "type": "string" } @@ -295,7 +290,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -317,7 +311,7 @@ Date: REGEX(.*) 06. Discover E1 using /v1/registry/contextEntities/E1/attributes with Service-Path /A1,/A3 ========================================================================================== HTTP/1.1 200 OK -Content-Length: 420 +Content-Length: 382 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -328,7 +322,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -347,7 +340,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -369,7 +361,7 @@ Date: REGEX(.*) 07. Discover E1 using /v1/registry/contextEntities/E1/attributes with Service-Path /A2,/A3 ========================================================================================== HTTP/1.1 200 OK -Content-Length: 418 +Content-Length: 380 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -380,7 +372,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -399,7 +390,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -421,7 +411,7 @@ Date: REGEX(.*) 08. Discover E1 using /v1/registry/contextEntities/E1/attributes with Service-Path /A1,/A2,/A3 ============================================================================================== HTTP/1.1 200 OK -Content-Length: 611 +Content-Length: 554 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -432,7 +422,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -451,7 +440,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -470,7 +458,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -508,7 +495,7 @@ Date: REGEX(.*) 10. Discover E1 using /v1/registry/contextEntities/E1/attributes without Service-Path ===================================================================================== HTTP/1.1 200 OK -Content-Length: 611 +Content-Length: 554 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -519,7 +506,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -538,7 +524,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -557,7 +542,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -579,7 +563,7 @@ Date: REGEX(.*) 11. Discover E1 using /v1/registry/contextEntities/E1/attributes with Service-Path /# ===================================================================================== HTTP/1.1 200 OK -Content-Length: 611 +Content-Length: 554 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -590,7 +574,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -609,7 +592,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -628,7 +610,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityTypeAttribute.test b/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityTypeAttribute.test index cc241301e3..da40740ce9 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityTypeAttribute.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityTypeAttribute.test @@ -60,8 +60,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -89,8 +88,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -118,8 +116,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -147,8 +144,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -176,8 +172,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -313,7 +308,7 @@ Date: REGEX(.*) 06. Discover entity type T1 using /v1/registry/contextEntityTypes/T1/attributes/A1 with Service-Path /E1 ======================================================================================================== HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -324,7 +319,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -346,7 +340,7 @@ Date: REGEX(.*) 07. Discover entity type T1 using /v1/registry/contextEntityTypes/T1/attributes/A1 with Service-Path /E1,/E2 ============================================================================================================ HTTP/1.1 200 OK -Content-Length: 420 +Content-Length: 382 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -357,7 +351,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -376,7 +369,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -398,7 +390,7 @@ Date: REGEX(.*) 08. Discover entity type T1 using /v1/registry/contextEntityTypes/T1/attributes/A1 with Service-Path /E1,/E2,/E3 ================================================================================================================ HTTP/1.1 200 OK -Content-Length: 420 +Content-Length: 382 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -409,7 +401,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -428,7 +419,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -450,7 +440,7 @@ Date: REGEX(.*) 09. Discover entity type T1 using /v1/registry/contextEntityTypes/T1/attributes/A1 with Service-Path /E1,/E2,/E3,/E4 ==================================================================================================================== HTTP/1.1 200 OK -Content-Length: 613 +Content-Length: 556 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -461,7 +451,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -480,7 +469,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -499,7 +487,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -521,7 +508,7 @@ Date: REGEX(.*) 10. Discover entity type T1 using /v1/registry/contextEntityTypes/T1/attributes/A1 with Service-Path /E1,/E2,/E3,/E4,/E5 ======================================================================================================================== HTTP/1.1 200 OK -Content-Length: 806 +Content-Length: 730 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -532,7 +519,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -551,7 +537,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -570,7 +555,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -589,7 +573,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -611,7 +594,7 @@ Date: REGEX(.*) 11. Discover entity type T1 using /v1/registry/contextEntityTypes/T1/attributes/A1 without Service-Path ======================================================================================================= HTTP/1.1 200 OK -Content-Length: 806 +Content-Length: 730 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -622,7 +605,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -641,7 +623,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -660,7 +641,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -679,7 +659,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -701,7 +680,7 @@ Date: REGEX(.*) 12. Discover entity type T2 using /v1/registry/contextEntityTypes/T1/attributes/A1 with Service-Path /# ======================================================================================================= HTTP/1.1 200 OK -Content-Length: 806 +Content-Length: 730 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -712,7 +691,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -731,7 +709,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -750,7 +727,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -769,7 +745,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityTypes.test b/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityTypes.test index bab253e5be..8e33bcf044 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityTypes.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/getContextEntityTypes.test @@ -60,8 +60,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -89,8 +88,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -118,8 +116,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -147,8 +144,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -176,8 +172,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -320,7 +315,7 @@ Date: REGEX(.*) 06. Discover entity type T1 using /v1/registry/contextEntityTypes/T1 with Service-Path /A1 ========================================================================================== HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -331,7 +326,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -353,7 +347,7 @@ Date: REGEX(.*) 07. Discover entity type T1 using /v1/registry/contextEntityTypes/T1 with Service-Path /A2 ========================================================================================== HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -364,7 +358,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -386,7 +379,7 @@ Date: REGEX(.*) 08. Discover entity type T1 using /v1/registry/contextEntityTypes/T1 with Service-Path /A1,/A2 ============================================================================================== HTTP/1.1 200 OK -Content-Length: 420 +Content-Length: 382 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -397,7 +390,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -416,7 +408,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -438,7 +429,7 @@ Date: REGEX(.*) 09. Discover entity type T2 using /v1/registry/contextEntityTypes/T2 with Service-Path /A4 ========================================================================================== HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -449,7 +440,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A4", "type": "string" } @@ -471,7 +461,7 @@ Date: REGEX(.*) 10. Discover entity type T2 using /v1/registry/contextEntityTypes/T2 with Service-Path /A5 ========================================================================================== HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -482,7 +472,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A5", "type": "string" } @@ -504,7 +493,7 @@ Date: REGEX(.*) 11. Discover entity type T2 using /v1/registry/contextEntityTypes/T2 with Service-Path /A4,/A5 ============================================================================================== HTTP/1.1 200 OK -Content-Length: 420 +Content-Length: 382 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -515,7 +504,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A4", "type": "string" } @@ -534,7 +522,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A5", "type": "string" } @@ -556,7 +543,7 @@ Date: REGEX(.*) 12. Discover entity type T1 using /v1/registry/contextEntityTypes/T1 without Service-Path ========================================================================================= HTTP/1.1 200 OK -Content-Length: 420 +Content-Length: 382 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -567,7 +554,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -586,7 +572,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -608,7 +593,7 @@ Date: REGEX(.*) 13. Discover entity type T2 using /v1/registry/contextEntityTypes/T2 with Service-Path /# ========================================================================================= HTTP/1.1 200 OK -Content-Length: 420 +Content-Length: 382 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -619,7 +604,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A4", "type": "string" } @@ -638,7 +622,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A5", "type": "string" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/getEntityByIdAttributeByName.test b/test/functionalTest/cases/0117_convop_using_standard_ops/getEntityByIdAttributeByName.test index fdfedcf4d0..0948f51db6 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/getEntityByIdAttributeByName.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/getEntityByIdAttributeByName.test @@ -65,8 +65,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -94,8 +93,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -123,8 +121,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -260,7 +257,7 @@ Date: REGEX(.*) 04. Discover E1 using /v1/registry/contextEntities/E1/attributes/A1 with Service-Path /A1 ========================================================================================= HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -271,7 +268,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -293,7 +289,7 @@ Date: REGEX(.*) 05. Discover E1 using /v1/registry/contextEntities/E1/attributes/A1 with Service-Path /A1,/A2 ============================================================================================= HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -304,7 +300,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -358,7 +353,7 @@ Date: REGEX(.*) 08. Discover E1 using /v1/registry/contextEntities/E1/attributes/A2 with Service-Path /A1,/A2 ============================================================================================= HTTP/1.1 200 OK -Content-Length: 225 +Content-Length: 206 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -369,7 +364,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -391,7 +385,7 @@ Date: REGEX(.*) 09. Discover E1 using /v1/registry/contextEntities/E1/attributes/A2 with Service-Path /A2 ========================================================================================= HTTP/1.1 200 OK -Content-Length: 225 +Content-Length: 206 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -402,7 +396,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -440,7 +433,7 @@ Date: REGEX(.*) 11. Discover E1 using /v1/registry/contextEntities/E1/attributes/A3 with Service-Path /A2,/A3 ============================================================================================= HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -451,7 +444,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -473,7 +465,7 @@ Date: REGEX(.*) 12. Discover E1 using /v1/registry/contextEntities/E1/attributes/A3 with Service-Path /A3 ========================================================================================= HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -484,7 +476,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "string" } @@ -506,7 +497,7 @@ Date: REGEX(.*) 13. Discover E1 using /v1/registry/contextEntities/E1/attributes/A1 without Service-Path ======================================================================================== HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -517,7 +508,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -539,7 +529,7 @@ Date: REGEX(.*) 14. Discover E1 using /v1/registry/contextEntities/E1/attributes/A1 with Service-Path /# ======================================================================================== HTTP/1.1 200 OK -Content-Length: 227 +Content-Length: 208 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -550,7 +540,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/getEntityByIdAttributeByNameWithTypeAndId.test b/test/functionalTest/cases/0117_convop_using_standard_ops/getEntityByIdAttributeByNameWithTypeAndId.test index 4282d233ca..7c617ac1cd 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/getEntityByIdAttributeByNameWithTypeAndId.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/getEntityByIdAttributeByNameWithTypeAndId.test @@ -70,8 +70,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/spath-none" @@ -141,8 +140,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/spath-s1" @@ -224,7 +222,7 @@ Date: REGEX(.*) 03. GET /v1/registry/contextEntities/type/T1/id/E1/attributes/A1 and see it work ================================================================================ HTTP/1.1 200 OK -Content-Length: 234 +Content-Length: 215 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -235,7 +233,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -257,7 +254,7 @@ Date: REGEX(.*) 04. GET /v1/registry/contextEntities/type/T1/id/E1/attributes/A1?exist=entity::type and see it work =================================================================================================== HTTP/1.1 200 OK -Content-Length: 234 +Content-Length: 215 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -268,7 +265,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -290,7 +286,7 @@ Date: REGEX(.*) 05. GET /v1/registry/contextEntities/type/T1/id/E1/attributes/A1?entity::type=T1 and see it work ================================================================================================ HTTP/1.1 200 OK -Content-Length: 234 +Content-Length: 215 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -301,7 +297,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -357,7 +352,7 @@ Date: REGEX(.*) 08. GET /v1/registry/contextEntities/type/T1/id/E1/attributes/A1?attributesFormat=object and see it work ======================================================================================================== HTTP/1.1 200 OK -Content-Length: 234 +Content-Length: 215 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -368,7 +363,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -404,7 +398,7 @@ Date: REGEX(.*) 10. GET /v1/registry/contextEntities/type/T1/id/E1/attributes/A1, without service-path, see two hits ==================================================================================================== HTTP/1.1 200 OK -Content-Length: 432 +Content-Length: 394 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -415,7 +409,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -434,7 +427,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -456,7 +448,7 @@ Date: REGEX(.*) 11. GET /v1/registry/contextEntities/type/T1/id/E1/attributes/A1, with service-path /#, see two hits ==================================================================================================== HTTP/1.1 200 OK -Content-Length: 432 +Content-Length: 394 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -467,7 +459,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -486,7 +477,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -508,7 +498,7 @@ Date: REGEX(.*) 12. GET /v1/registry/contextEntities/type/T1/id/E1/attributes/A1, with service-path /, see one hit ================================================================================================== HTTP/1.1 200 OK -Content-Length: 234 +Content-Length: 215 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -519,7 +509,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -541,7 +530,7 @@ Date: REGEX(.*) 13. GET /v1/registry/contextEntities/type/T1/id/E1/attributes/A1, with service-path /s1, see one hit ==================================================================================================== HTTP/1.1 200 OK -Content-Length: 232 +Content-Length: 213 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -552,7 +541,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/getIndividualContextEntityAttribute.test b/test/functionalTest/cases/0117_convop_using_standard_ops/getIndividualContextEntityAttribute.test index 489a6cbbef..92da7909c6 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/getIndividualContextEntityAttribute.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/getIndividualContextEntityAttribute.test @@ -186,8 +186,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/getIndividualContextEntityAttributeWithTypeAndId.test b/test/functionalTest/cases/0117_convop_using_standard_ops/getIndividualContextEntityAttributeWithTypeAndId.test index 55220ce06e..7af19453d2 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/getIndividualContextEntityAttributeWithTypeAndId.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/getIndividualContextEntityAttributeWithTypeAndId.test @@ -208,8 +208,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntitiesByEntityId.test b/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntitiesByEntityId.test index 4a97a316f5..2a134c5aa9 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntitiesByEntityId.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntitiesByEntityId.test @@ -204,7 +204,7 @@ Date: REGEX(.*) 04. Discover E1 =============== HTTP/1.1 200 OK -Content-Length: 223 +Content-Length: 204 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -215,7 +215,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntitiesByEntityIdAndType.test b/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntitiesByEntityIdAndType.test index eda8e95f56..c3de78aad8 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntitiesByEntityIdAndType.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntitiesByEntityIdAndType.test @@ -69,13 +69,6 @@ echo echo "02. POST /v1/registry/contextEntities/type/T1/id/E1" echo "===================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X2" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/part02" }' @@ -104,13 +97,6 @@ echo echo "04. Modify registration" echo "=======================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X4" - } - ], "duration": "PT2H", "providingApplication": "http://kz.tid.es/part04", "registrationId": "'$REG_ID'" @@ -139,13 +125,6 @@ echo echo "06. POST /v1/registry/contextEntities/type/T1/id/E2?!exist=entity::type, and see it fail" echo "========================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X6" - } - ], "duration": "PT2H", "providingApplication": "http://kz.tid.es/part06" }' @@ -157,13 +136,6 @@ echo echo "07. POST /v1/registry/contextEntities/type/T1/id/E2?exist=entity::type, and see it work" echo "=======================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X7" - } - ], "duration": "PT2H", "providingApplication": "http://kz.tid.es/part07" }' @@ -175,13 +147,6 @@ echo echo "08. POST /v1/registry/contextEntities/type/T1/id/E2?entity::type=T2, and see it fail" echo "====================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X8" - } - ], "duration": "PT2H", "providingApplication": "http://kz.tid.es/part08" }' @@ -193,13 +158,6 @@ echo echo "09. POST /v1/registry/contextEntities/type/T1/id/E2?entity::type=T1, and see it work" echo "====================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X9" - } - ], "duration": "PT2H", "providingApplication": "http://kz.tid.es/part09" }' @@ -211,13 +169,6 @@ echo echo "10. POST /v1/registry/contextEntities/type/T1/id/E2, servicePath /s1" echo "====================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X10" - } - ], "duration": "PT2H", "providingApplication": "http://kz.tid.es/part10" }' @@ -229,13 +180,6 @@ echo echo "11. POST /v1/registry/contextEntities/type/T1/id/E2, servicePath /s2" echo "====================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X11" - } - ], "duration": "PT2H", "providingApplication": "http://kz.tid.es/part11" }' diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntityAttributes.test b/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntityAttributes.test index 6895499466..02c2527d29 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntityAttributes.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntityAttributes.test @@ -204,7 +204,7 @@ Date: REGEX(.*) 04. Discover E1 =============== HTTP/1.1 200 OK -Content-Length: 223 +Content-Length: 204 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -215,7 +215,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntityTypeAttribute.test b/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntityTypeAttribute.test index cf0356b164..efc9ac8df2 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntityTypeAttribute.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/postContextEntityTypeAttribute.test @@ -95,7 +95,7 @@ Date: REGEX(.*) 02. Discover entities of type ET ================================ HTTP/1.1 200 OK -Content-Length: 203 +Content-Length: 184 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -106,7 +106,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "" } @@ -142,7 +141,7 @@ Date: REGEX(.*) 04. Discover entities of type ET ================================ HTTP/1.1 200 OK -Content-Length: 203 +Content-Length: 184 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -153,7 +152,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/postEntityByIdAttributeByName.test b/test/functionalTest/cases/0117_convop_using_standard_ops/postEntityByIdAttributeByName.test index 5feef21de9..0d9bde6a28 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/postEntityByIdAttributeByName.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/postEntityByIdAttributeByName.test @@ -142,7 +142,7 @@ Date: REGEX(.*) 02. Discover E1/A1 ================== HTTP/1.1 200 OK -Content-Length: 223 +Content-Length: 204 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -153,7 +153,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/postEntityByIdAttributeByNameWithTypeAndId.test b/test/functionalTest/cases/0117_convop_using_standard_ops/postEntityByIdAttributeByNameWithTypeAndId.test index e0b89fd69b..9f24021b83 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/postEntityByIdAttributeByNameWithTypeAndId.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/postEntityByIdAttributeByNameWithTypeAndId.test @@ -50,13 +50,6 @@ brokerStart CB 0 echo "01. POST /v1/registry/contextEntities/type/T1/id/E1/attributes/A1?entity::type=T2 and see it fail" echo "=================================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X1" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/part01" }' @@ -68,13 +61,6 @@ echo echo "02. POST /v1/registry/contextEntities/type/T1/id/E1/attributes/A1?!exist=entity::type and see it fail" echo "=====================================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X2" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/part02" }' @@ -86,13 +72,6 @@ echo echo "03. POST /v1/registry/contextEntities/type/T1/id/E1/attributes/A1 and see it work" echo "=================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X3" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/part03" }' @@ -104,13 +83,6 @@ echo echo "04. POST /v1/registry/contextEntities/type/T1/id/E1/attributes/A2?exist=entity::type and see it work" echo "====================================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X4" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/part04" }' @@ -122,13 +94,6 @@ echo echo "05. POST /v1/registry/contextEntities/type/T1/id/E1/attributes/A4?entity::type=T1 and see it work" echo "=================================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X5" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/part05" }' @@ -156,13 +121,6 @@ echo echo "07. POST /v1/registry/contextEntities/type/T1/id/E1/attributes/A3, without service-path" echo "=======================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X7" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/part07" }' @@ -174,13 +132,6 @@ echo echo "08. POST /v1/registry/contextEntities/type/T1/id/E1/attributes/A3, service-path /s1" echo "===================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X8" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/part08" }' @@ -192,13 +143,6 @@ echo echo "09. POST /v1/registry/contextEntities/type/T1/id/E1/attributes/A3, service-path /s2" echo "===================================================================================" payload='{ - "metadatas": [ - { - "name": "md", - "type": "string", - "value": "X9" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/part09" }' @@ -402,7 +346,7 @@ Date: REGEX(.*) 06. Discover E1-T1, get three hits ================================== HTTP/1.1 200 OK -Content-Length: 604 +Content-Length: 547 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -413,7 +357,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "" } @@ -432,7 +375,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "" } @@ -451,7 +393,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A4", "type": "" } @@ -515,7 +456,7 @@ Date: REGEX(.*) 10. Discover E1-T1-A3, without service-path, get three hits =========================================================== HTTP/1.1 200 OK -Content-Length: 604 +Content-Length: 547 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -526,7 +467,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "" } @@ -545,7 +485,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "" } @@ -564,7 +503,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "" } @@ -586,7 +524,7 @@ Date: REGEX(.*) 11. Discover E1-T1-A3, with service-path /#, get three hits =========================================================== HTTP/1.1 200 OK -Content-Length: 604 +Content-Length: 547 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -597,7 +535,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "" } @@ -616,7 +553,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "" } @@ -635,7 +571,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "" } @@ -657,7 +592,7 @@ Date: REGEX(.*) 12. Discover E1-T1-A3, with service-path /, get one hit ======================================================= HTTP/1.1 200 OK -Content-Length: 224 +Content-Length: 205 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -668,7 +603,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "" } @@ -690,7 +624,7 @@ Date: REGEX(.*) 13. Discover E1-T1-A3, with service-path /s1, get one hit ========================================================= HTTP/1.1 200 OK -Content-Length: 224 +Content-Length: 205 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -701,7 +635,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "" } @@ -723,7 +656,7 @@ Date: REGEX(.*) 14. Discover E1-T1-A3, with service-path /s2, get one hit ========================================================= HTTP/1.1 200 OK -Content-Length: 224 +Content-Length: 205 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -734,7 +667,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A3", "type": "" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/postSubscribeContextAvailabilityConvOp.test b/test/functionalTest/cases/0117_convop_using_standard_ops/postSubscribeContextAvailabilityConvOp.test index 06c2d4abbb..2366a9a3c6 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/postSubscribeContextAvailabilityConvOp.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/postSubscribeContextAvailabilityConvOp.test @@ -84,8 +84,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -119,8 +118,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://kz.tid.es/abc" @@ -191,7 +189,7 @@ Date: REGEX(.*) ================================= POST http://localhost:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 271 +Content-Length: 252 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: localhost:REGEX(\d+) Accept: application/json @@ -204,7 +202,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/putAllEntitiesWithTypeAndId.test b/test/functionalTest/cases/0117_convop_using_standard_ops/putAllEntitiesWithTypeAndId.test index 0eced4cf93..24cd210357 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/putAllEntitiesWithTypeAndId.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/putAllEntitiesWithTypeAndId.test @@ -186,8 +186,7 @@ payload='{ ], "attributes": [ { - "name": "A1", - "isDomain": "false" + "name": "A1" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/putAttributeValueInstance.test b/test/functionalTest/cases/0117_convop_using_standard_ops/putAttributeValueInstance.test index 441d017db7..385174aca9 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/putAttributeValueInstance.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/putAttributeValueInstance.test @@ -194,8 +194,7 @@ payload='{ ], "attributes": [ { - "name": "A1", - "isDomain": "false" + "name": "A1" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/putAttributeValueInstanceWithTypeAndId.test b/test/functionalTest/cases/0117_convop_using_standard_ops/putAttributeValueInstanceWithTypeAndId.test index 8da0c5620a..0b6b1a11f2 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/putAttributeValueInstanceWithTypeAndId.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/putAttributeValueInstanceWithTypeAndId.test @@ -185,8 +185,7 @@ payload='{ ], "attributes": [ { - "name": "A1", - "isDomain": "false" + "name": "A1" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/putAvailabilitySubscriptionConvOp.test b/test/functionalTest/cases/0117_convop_using_standard_ops/putAvailabilitySubscriptionConvOp.test index 7123cc40e0..c582407ecf 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/putAvailabilitySubscriptionConvOp.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/putAvailabilitySubscriptionConvOp.test @@ -164,8 +164,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${LISTENER_PORT}'/notify" @@ -201,8 +200,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${LISTENER_PORT}'/notify" @@ -322,7 +320,7 @@ Date: REGEX(.*) ============================================ POST http://localhost:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 279 +Content-Length: 260 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: localhost:REGEX(\d+) Accept: application/json @@ -335,7 +333,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } @@ -374,7 +371,7 @@ Date: REGEX(.*) =============================================== POST http://localhost:REGEX(\d+)/notify Fiware-Servicepath: / -Content-Length: 279 +Content-Length: 260 User-Agent: orion/REGEX(\d+\.\d+\.\d+.*) Host: localhost:REGEX(\d+) Accept: application/json @@ -387,7 +384,6 @@ Fiware-Correlator: REGEX([0-9a-f\-]{36}) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A2", "type": "string" } diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntity.test b/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntity.test index ec24e024e7..a037ac0a7b 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntity.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntity.test @@ -158,8 +158,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "A", - "isDomain": "false" + "type": "A" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttribute.test b/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttribute.test index 97e0a8690c..9abbe15f92 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttribute.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttribute.test @@ -159,8 +159,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "AT2", - "isDomain": "false" + "type": "AT2" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttributeWithTypeAndId.test b/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttributeWithTypeAndId.test index 97ddeaac04..e3dfb6267e 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttributeWithTypeAndId.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttributeWithTypeAndId.test @@ -141,8 +141,7 @@ payload='{ ], "attributes": [ { - "name": "A1", - "isDomain": "false" + "name": "A1" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttributes.test b/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttributes.test index fbdac3f66e..bc3b9282d3 100644 --- a/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttributes.test +++ b/test/functionalTest/cases/0117_convop_using_standard_ops/putIndividualContextEntityAttributes.test @@ -158,8 +158,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "A", - "isDomain": "false" + "type": "A" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0208_expiration_overflow_fix/registration_64bit_duration.test b/test/functionalTest/cases/0208_expiration_overflow_fix/registration_64bit_duration.test index b4455a6ac5..ffd1ae1975 100644 --- a/test/functionalTest/cases/0208_expiration_overflow_fix/registration_64bit_duration.test +++ b/test/functionalTest/cases/0208_expiration_overflow_fix/registration_64bit_duration.test @@ -47,8 +47,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" @@ -95,7 +94,7 @@ Date: REGEX(.*) } ++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 317 +Content-Length: 298 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -106,7 +105,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } diff --git a/test/functionalTest/cases/0322_multitenancy/http_tenant_name_error.test b/test/functionalTest/cases/0322_multitenancy/http_tenant_name_error.test index 554ee9bdc0..51ff7614fb 100644 --- a/test/functionalTest/cases/0322_multitenancy/http_tenant_name_error.test +++ b/test/functionalTest/cases/0322_multitenancy/http_tenant_name_error.test @@ -49,32 +49,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - }, - { - "name": "cm2", - "type": "string", - "value": "XXX" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" - }, - { - "name": "ID2", - "type": "string", - "value": "212" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" diff --git a/test/functionalTest/cases/0322_multitenancy/http_tenant_register_discovery.test b/test/functionalTest/cases/0322_multitenancy/http_tenant_register_discovery.test index 582d90a2f0..ff3ec88af0 100644 --- a/test/functionalTest/cases/0322_multitenancy/http_tenant_register_discovery.test +++ b/test/functionalTest/cases/0322_multitenancy/http_tenant_register_discovery.test @@ -46,8 +46,7 @@ payload='{ "attributes": [ { "name": "temperature01", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" @@ -76,8 +75,7 @@ payload='{ "attributes": [ { "name": "temperature02", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" @@ -153,7 +151,7 @@ Date: REGEX(.*) 3. Discover entity E with HTTP-Tenant t_01 ++++++++++++++++++++++++++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 252 +Content-Length: 233 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -164,7 +162,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature01", "type": "degree" } @@ -186,7 +183,7 @@ Date: REGEX(.*) 4. Discover entity E with HTTP-Tenant t_02 ++++++++++++++++++++++++++++++++++++++++++++ HTTP/1.1 200 OK -Content-Length: 252 +Content-Length: 233 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -197,7 +194,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature02", "type": "degree" } diff --git a/test/functionalTest/cases/0322_multitenancy/tenant_name_error.test b/test/functionalTest/cases/0322_multitenancy/tenant_name_error.test index a9623c401b..c914690067 100644 --- a/test/functionalTest/cases/0322_multitenancy/tenant_name_error.test +++ b/test/functionalTest/cases/0322_multitenancy/tenant_name_error.test @@ -48,32 +48,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - }, - { - "name": "cm2", - "type": "string", - "value": "XXX" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" - }, - { - "name": "ID2", - "type": "string", - "value": "212" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" diff --git a/test/functionalTest/cases/0499_context_providers_basic/query_redirect_operation.test b/test/functionalTest/cases/0499_context_providers_basic/query_redirect_operation.test index 262ef3d914..1c75f7f59f 100644 --- a/test/functionalTest/cases/0499_context_providers_basic/query_redirect_operation.test +++ b/test/functionalTest/cases/0499_context_providers_basic/query_redirect_operation.test @@ -86,8 +86,7 @@ payload4='{ "attributes": [ { "name": "A1", - "type": "T1", - "isDomain": "false" + "type": "T1" } ], "providingApplication": "http://localhost:'$CP1_PORT'/v1" diff --git a/test/functionalTest/cases/0499_context_providers_basic/query_redirect_three_providers.test b/test/functionalTest/cases/0499_context_providers_basic/query_redirect_three_providers.test index 6e3beb407b..722e4e888b 100644 --- a/test/functionalTest/cases/0499_context_providers_basic/query_redirect_three_providers.test +++ b/test/functionalTest/cases/0499_context_providers_basic/query_redirect_three_providers.test @@ -129,8 +129,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "T1", - "isDomain": "false" + "type": "T1" } ], "providingApplication": "http://localhost:'$CP1_PORT'/v1" @@ -157,8 +156,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "T1", - "isDomain": "false" + "type": "T1" } ], "providingApplication": "http://localhost:'$CP2_PORT'/v1" @@ -185,8 +183,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "T1", - "isDomain": "false" + "type": "T1" } ], "providingApplication": "http://localhost:'$CP3_PORT'/v1" diff --git a/test/functionalTest/cases/0499_context_providers_basic/update_redirect_delete_operation.test b/test/functionalTest/cases/0499_context_providers_basic/update_redirect_delete_operation.test index a74c26c68d..f4334e1933 100644 --- a/test/functionalTest/cases/0499_context_providers_basic/update_redirect_delete_operation.test +++ b/test/functionalTest/cases/0499_context_providers_basic/update_redirect_delete_operation.test @@ -57,8 +57,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "T1", - "isDomain": "false" + "type": "T1" } ], "providingApplication": "http://localhost:'$CP1_PORT'/v1" diff --git a/test/functionalTest/cases/0499_context_providers_basic/update_redirect_operation.test b/test/functionalTest/cases/0499_context_providers_basic/update_redirect_operation.test index b03fe1b714..5c1e5b0387 100644 --- a/test/functionalTest/cases/0499_context_providers_basic/update_redirect_operation.test +++ b/test/functionalTest/cases/0499_context_providers_basic/update_redirect_operation.test @@ -73,8 +73,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "T1", - "isDomain": "false" + "type": "T1" } ], "providingApplication": "http://localhost:'$CP1_PORT'/v1" diff --git a/test/functionalTest/cases/0559_new_url_paths/ngsi9_new_url_paths.test b/test/functionalTest/cases/0559_new_url_paths/ngsi9_new_url_paths.test index 39ae758fc9..7bff0d934d 100644 --- a/test/functionalTest/cases/0559_new_url_paths/ngsi9_new_url_paths.test +++ b/test/functionalTest/cases/0559_new_url_paths/ngsi9_new_url_paths.test @@ -613,7 +613,7 @@ Date: REGEX(.*) 8. GET /ngsi9/contextEntities/G/attributes/A ============================================ HTTP/1.1 200 OK -Content-Length: 217 +Content-Length: 198 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -624,7 +624,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A", "type": "" } @@ -770,7 +769,7 @@ Date: REGEX(.*) 11. GET /ngsi9/contextEntityTypes/V/attributes/A ================================================ HTTP/1.1 200 OK -Content-Length: 217 +Content-Length: 198 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -781,7 +780,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A", "type": "" } diff --git a/test/functionalTest/cases/0559_new_url_paths/v1_registry.test b/test/functionalTest/cases/0559_new_url_paths/v1_registry.test index fdf92dbd08..09571558dd 100644 --- a/test/functionalTest/cases/0559_new_url_paths/v1_registry.test +++ b/test/functionalTest/cases/0559_new_url_paths/v1_registry.test @@ -613,7 +613,7 @@ Date: REGEX(.*) 8. GET /v1/registry/contextEntities/G/attributes/A ================================================== HTTP/1.1 200 OK -Content-Length: 217 +Content-Length: 198 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -624,7 +624,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A", "type": "" } @@ -770,7 +769,7 @@ Date: REGEX(.*) 11. GET /v1/registry/contextEntityTypes/V/attributes/A ====================================================== HTTP/1.1 200 OK -Content-Length: 217 +Content-Length: 198 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -781,7 +780,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A", "type": "" } diff --git a/test/functionalTest/cases/0581_include_type_in_convops/v1_registry_contextEntities_enType_ENTYPE_enId_ENID.test b/test/functionalTest/cases/0581_include_type_in_convops/v1_registry_contextEntities_enType_ENTYPE_enId_ENID.test index edebfd15f6..7f588a3d69 100644 --- a/test/functionalTest/cases/0581_include_type_in_convops/v1_registry_contextEntities_enType_ENTYPE_enId_ENID.test +++ b/test/functionalTest/cases/0581_include_type_in_convops/v1_registry_contextEntities_enType_ENTYPE_enId_ENID.test @@ -47,18 +47,6 @@ echo echo "02. POST /v1/registry/contextEntities/type/ET1/id/entity01 OK" echo "=============================================================" payload='{ - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - }, - { - "name": "cm2", - "type": "string", - "value": "XXX" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/abc" }' @@ -76,13 +64,6 @@ echo echo "04. POST /v1/registry/contextEntities/type/ET1/id/entity02" echo "==========================================================" payload='{ - "metadatas": [ - { - "name": "cm2", - "type": "string", - "value": "XXX" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/abc" }' diff --git a/test/functionalTest/cases/0581_include_type_in_convops/v1_registry_contextEntities_enType_ENTYPE_enId_ENID_attribute_attrName.test b/test/functionalTest/cases/0581_include_type_in_convops/v1_registry_contextEntities_enType_ENTYPE_enId_ENID_attribute_attrName.test index cd352fb0fa..19480f16bd 100644 --- a/test/functionalTest/cases/0581_include_type_in_convops/v1_registry_contextEntities_enType_ENTYPE_enId_ENID_attribute_attrName.test +++ b/test/functionalTest/cases/0581_include_type_in_convops/v1_registry_contextEntities_enType_ENTYPE_enId_ENID_attribute_attrName.test @@ -49,18 +49,6 @@ echo "02. POST /v1/registry/contextEntities/type/ET1/id/entity01/attributes/attr echo "===============================================================================" url="/v1/registry/contextEntities/entity01/attributes/attr01" payload='{ - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - }, - { - "name": "cm2", - "type": "string", - "value": "XXX" - } - ], "duration": "PT1H", "providingApplication": "http://kz.tid.es/abc" }' @@ -79,18 +67,6 @@ echo echo "04. POST /v1/registry/contextEntities/type/ET1/id/entity01/attributes/attr02" echo "============================================================================" payload='{ - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1H", "providingApplication" : "http://kz.tid.es/abc" }' @@ -152,7 +128,7 @@ Date: REGEX(.*) 03. GET /v1/registry/contextEntities/type/ET1/id/entity01/attributes/attr01 OK ============================================================================== HTTP/1.1 200 OK -Content-Length: 232 +Content-Length: 213 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -163,7 +139,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "attr01", "type": "" } @@ -199,7 +174,7 @@ Date: REGEX(.*) 05. GET /v1/registry/contextEntities/type/ET1/id/entity01/attributes/attr02 =========================================================================== HTTP/1.1 200 OK -Content-Length: 232 +Content-Length: 213 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -210,7 +185,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "attr02", "type": "" } diff --git a/test/functionalTest/cases/0585_empty_type_in_response/ngsi9.test b/test/functionalTest/cases/0585_empty_type_in_response/ngsi9.test index c4c2343a9b..21a8b53be6 100644 --- a/test/functionalTest/cases/0585_empty_type_in_response/ngsi9.test +++ b/test/functionalTest/cases/0585_empty_type_in_response/ngsi9.test @@ -59,8 +59,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:1028/application" @@ -132,7 +131,7 @@ Date: REGEX(.*) 02. Discover with convop GET /v1/registry/contextEntities/Room ============================================================== HTTP/1.1 200 OK -Content-Length: 253 +Content-Length: 234 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -143,7 +142,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -165,7 +163,7 @@ Date: REGEX(.*) 03. Discover with convop GET /v1/registry/contextEntities/Room/attributes/temperature ===================================================================================== HTTP/1.1 200 OK -Content-Length: 253 +Content-Length: 234 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -176,7 +174,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -198,7 +195,7 @@ Date: REGEX(.*) 04. Discover with convop GET /v1/registry/contextEntityTypes/Room ================================================================= HTTP/1.1 200 OK -Content-Length: 307 +Content-Length: 288 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -209,7 +206,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -236,7 +232,7 @@ Date: REGEX(.*) 05. Discover with convop GET /v1/registry/contextEntityTypes/Room/attributes/temperature ======================================================================================== HTTP/1.1 200 OK -Content-Length: 307 +Content-Length: 288 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -247,7 +243,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -274,7 +269,7 @@ Date: REGEX(.*) 06. Discover with convop GET /v1/registry/contextEntities/type/Room/id/Room =========================================================================== HTTP/1.1 200 OK -Content-Length: 253 +Content-Length: 234 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -285,7 +280,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } @@ -307,7 +301,7 @@ Date: REGEX(.*) 07. Discover with convop GET /v1/registry/contextEntities/type/Room/id/Room/attributes/temperature ================================================================================================== HTTP/1.1 200 OK -Content-Length: 253 +Content-Length: 234 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -318,7 +312,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "temperature", "type": "degree" } diff --git a/test/functionalTest/cases/0619_forbidden_characters_in_payload/input.test b/test/functionalTest/cases/0619_forbidden_characters_in_payload/input.test index 795efc882b..e15429b7a5 100644 --- a/test/functionalTest/cases/0619_forbidden_characters_in_payload/input.test +++ b/test/functionalTest/cases/0619_forbidden_characters_in_payload/input.test @@ -58,8 +58,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "centigrade", - "isDomain": "false" + "type": "centigrade" } ], "providingApplication": "http://mysensors.com/Rooms" @@ -103,8 +102,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "centigrade", - "isDomain": "false" + "type": "centigrade" } ], "providingApplication": "pa=http://mysensors.com/Rooms" diff --git a/test/functionalTest/cases/0713_propagate_tenant/propagate_tenant_for_update_and_query_standard_ops.test b/test/functionalTest/cases/0713_propagate_tenant/propagate_tenant_for_update_and_query_standard_ops.test index ce10b44d0d..670636d15e 100644 --- a/test/functionalTest/cases/0713_propagate_tenant/propagate_tenant_for_update_and_query_standard_ops.test +++ b/test/functionalTest/cases/0713_propagate_tenant/propagate_tenant_for_update_and_query_standard_ops.test @@ -110,8 +110,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -139,8 +138,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0714_propagate_service_path/no_propagation_of_service_path_when_not_present.test b/test/functionalTest/cases/0714_propagate_service_path/no_propagation_of_service_path_when_not_present.test index 2a9c041558..f3e09bab68 100644 --- a/test/functionalTest/cases/0714_propagate_service_path/no_propagation_of_service_path_when_not_present.test +++ b/test/functionalTest/cases/0714_propagate_service_path/no_propagation_of_service_path_when_not_present.test @@ -53,8 +53,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${LISTENER_PORT}'/v1" diff --git a/test/functionalTest/cases/0714_propagate_service_path/propagate_service_path_for_update_and_query_standard_ops.test b/test/functionalTest/cases/0714_propagate_service_path/propagate_service_path_for_update_and_query_standard_ops.test index 641afb7ce7..fab66f1962 100644 --- a/test/functionalTest/cases/0714_propagate_service_path/propagate_service_path_for_update_and_query_standard_ops.test +++ b/test/functionalTest/cases/0714_propagate_service_path/propagate_service_path_for_update_and_query_standard_ops.test @@ -107,8 +107,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -136,8 +135,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0715_forward_xauth_token_to_cprs/propagate_xauth_token_for_update_and_query_standard_ops.test b/test/functionalTest/cases/0715_forward_xauth_token_to_cprs/propagate_xauth_token_for_update_and_query_standard_ops.test index f81222e2f0..027ef61bd7 100644 --- a/test/functionalTest/cases/0715_forward_xauth_token_to_cprs/propagate_xauth_token_for_update_and_query_standard_ops.test +++ b/test/functionalTest/cases/0715_forward_xauth_token_to_cprs/propagate_xauth_token_for_update_and_query_standard_ops.test @@ -56,8 +56,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${LISTENER_PORT}'/v1" diff --git a/test/functionalTest/cases/0716_forward_registered_attributes/forward_attribute.test b/test/functionalTest/cases/0716_forward_registered_attributes/forward_attribute.test index 6462d24f59..da3f403cf6 100644 --- a/test/functionalTest/cases/0716_forward_registered_attributes/forward_attribute.test +++ b/test/functionalTest/cases/0716_forward_registered_attributes/forward_attribute.test @@ -100,8 +100,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0716_forward_registered_attributes/forward_attribute_query.test b/test/functionalTest/cases/0716_forward_registered_attributes/forward_attribute_query.test index 5a6dcd04ae..2eeb7e4ae3 100644 --- a/test/functionalTest/cases/0716_forward_registered_attributes/forward_attribute_query.test +++ b/test/functionalTest/cases/0716_forward_registered_attributes/forward_attribute_query.test @@ -99,8 +99,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0719_servicepath_for_registrations/forward_attribute_with_servicePath.test b/test/functionalTest/cases/0719_servicepath_for_registrations/forward_attribute_with_servicePath.test index 70fec8353e..ffde407c68 100644 --- a/test/functionalTest/cases/0719_servicepath_for_registrations/forward_attribute_with_servicePath.test +++ b/test/functionalTest/cases/0719_servicepath_for_registrations/forward_attribute_with_servicePath.test @@ -80,8 +80,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0719_servicepath_for_registrations/forward_queries.test b/test/functionalTest/cases/0719_servicepath_for_registrations/forward_queries.test index c361ced5fe..7c42837262 100644 --- a/test/functionalTest/cases/0719_servicepath_for_registrations/forward_queries.test +++ b/test/functionalTest/cases/0719_servicepath_for_registrations/forward_queries.test @@ -207,8 +207,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -236,8 +235,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -265,8 +263,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -294,8 +291,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -323,8 +319,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -352,8 +347,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_invalid_service_paths.test b/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_invalid_service_paths.test index d3476e95f8..57b5137ff4 100644 --- a/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_invalid_service_paths.test +++ b/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_invalid_service_paths.test @@ -51,8 +51,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -79,8 +78,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -107,8 +105,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_many_servicepaths.test b/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_many_servicepaths.test index 77ea84d4d9..15a845d72c 100644 --- a/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_many_servicepaths.test +++ b/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_many_servicepaths.test @@ -55,8 +55,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -83,8 +82,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -111,8 +109,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -139,8 +136,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -167,8 +163,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -334,7 +329,7 @@ Date: REGEX(.*) 05. Discovery of E.*/A1 with service path /a1/e1,/a1/e2,/a1/e3,/a1/e4 ===================================================================== HTTP/1.1 200 OK -Content-Length: 818 +Content-Length: 742 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -345,7 +340,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -364,7 +358,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -383,7 +376,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -402,7 +394,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -424,7 +415,7 @@ Date: REGEX(.*) 06. Discovery of E.*/A1 with service path /a1/e1,/a1/e2,/a1/e3 ============================================================== HTTP/1.1 200 OK -Content-Length: 622 +Content-Length: 565 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -435,7 +426,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -454,7 +444,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -473,7 +462,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -495,7 +483,7 @@ Date: REGEX(.*) 07. Discovery of E.*/A1 with service path /a1/e1,/a1/e2 ======================================================= HTTP/1.1 200 OK -Content-Length: 426 +Content-Length: 388 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -506,7 +494,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -525,7 +512,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -547,7 +533,7 @@ Date: REGEX(.*) 08. Discovery of E.*/A1 with service path /a1/e1 ================================================ HTTP/1.1 200 OK -Content-Length: 230 +Content-Length: 211 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -558,7 +544,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } diff --git a/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_servicepath.test b/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_servicepath.test index 81af04f108..9c656eb1ef 100644 --- a/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_servicepath.test +++ b/test/functionalTest/cases/0719_servicepath_for_registrations/register_and_discovery_with_servicepath.test @@ -53,8 +53,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -81,8 +80,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -222,7 +220,7 @@ Date: REGEX(.*) 03. Discovery of E.*/A1 with service path /a1/e1 ================================================ HTTP/1.1 200 OK -Content-Length: 230 +Content-Length: 211 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -233,7 +231,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -255,7 +252,7 @@ Date: REGEX(.*) 04. Discovery of E.*/A1 with service path /a1/e2 ================================================ HTTP/1.1 200 OK -Content-Length: 230 +Content-Length: 211 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -266,7 +263,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -304,7 +300,7 @@ Date: REGEX(.*) 06. Discovery of E.*/A1 with service path /a1/# =============================================== HTTP/1.1 200 OK -Content-Length: 426 +Content-Length: 388 Content-Type: application/json Fiware-Correlator: REGEX([0-9a-f\-]{36}) Date: REGEX(.*) @@ -315,7 +311,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } @@ -334,7 +329,6 @@ Date: REGEX(.*) "contextRegistration": { "attributes": [ { - "isDomain": "false", "name": "A1", "type": "string" } diff --git a/test/functionalTest/cases/0773_not_found_in_context_provider/not_found_in_context_provider.test b/test/functionalTest/cases/0773_not_found_in_context_provider/not_found_in_context_provider.test index 4f25938623..3f476ff233 100644 --- a/test/functionalTest/cases/0773_not_found_in_context_provider/not_found_in_context_provider.test +++ b/test/functionalTest/cases/0773_not_found_in_context_provider/not_found_in_context_provider.test @@ -55,8 +55,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_double_forward.test b/test/functionalTest/cases/0787_cprs_full_functional/query_double_forward.test index 42512ffa98..586ee4919c 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_double_forward.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_double_forward.test @@ -55,8 +55,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -84,8 +83,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration.test b/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration.test index def1b0a3ae..055ee4f2a2 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration.test @@ -52,8 +52,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration_and_one_more_value.test b/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration_and_one_more_value.test index 137daca76d..8d78d29c60 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration_and_one_more_value.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration_and_one_more_value.test @@ -52,8 +52,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration_and_one_more_value_in_provider.test b/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration_and_one_more_value_in_provider.test index 88dca9a2f4..b838a01251 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration_and_one_more_value_in_provider.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_false_registration_and_one_more_value_in_provider.test @@ -55,8 +55,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -84,8 +83,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_five_different_cprs_in_one_query.test b/test/functionalTest/cases/0787_cprs_full_functional/query_five_different_cprs_in_one_query.test index 040b17c071..cdfc37f644 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_five_different_cprs_in_one_query.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_five_different_cprs_in_one_query.test @@ -184,8 +184,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -213,8 +212,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -242,8 +240,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -271,8 +268,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP4_PORT}'/v1" @@ -300,8 +296,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP5_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_forward_depends_on_attr_field.test b/test/functionalTest/cases/0787_cprs_full_functional/query_forward_depends_on_attr_field.test index d096301603..03a5efdfdf 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_forward_depends_on_attr_field.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_forward_depends_on_attr_field.test @@ -163,13 +163,11 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -197,13 +195,11 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_forward_query_not_found.test b/test/functionalTest/cases/0787_cprs_full_functional/query_forward_query_not_found.test index 02759a716a..dbbd0b559f 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_forward_query_not_found.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_forward_query_not_found.test @@ -51,8 +51,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_found_and_not_found_locally_and_remote.test b/test/functionalTest/cases/0787_cprs_full_functional/query_found_and_not_found_locally_and_remote.test index 7c639582fe..6c632ea827 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_found_and_not_found_locally_and_remote.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_found_and_not_found_locally_and_remote.test @@ -73,13 +73,11 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -107,18 +105,15 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -146,18 +141,15 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -185,18 +177,15 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -224,18 +213,15 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -263,18 +249,15 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_no_attributes_in_query_results_from_CB_and_CP1.test b/test/functionalTest/cases/0787_cprs_full_functional/query_no_attributes_in_query_results_from_CB_and_CP1.test index 334c4b2cb5..4b57172046 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_no_attributes_in_query_results_from_CB_and_CP1.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_no_attributes_in_query_results_from_CB_and_CP1.test @@ -114,18 +114,15 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_no_attributes_in_query_results_from_CP1_and_CP2.test b/test/functionalTest/cases/0787_cprs_full_functional/query_no_attributes_in_query_results_from_CP1_and_CP2.test index 62bf5df753..fdec8f795f 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_no_attributes_in_query_results_from_CP1_and_CP2.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_no_attributes_in_query_results_from_CP1_and_CP2.test @@ -117,13 +117,11 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -151,18 +149,15 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_one_forward.test b/test/functionalTest/cases/0787_cprs_full_functional/query_one_forward.test index d94c3cf065..024b57b742 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_one_forward.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_one_forward.test @@ -75,8 +75,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_shadowed_attribute.test b/test/functionalTest/cases/0787_cprs_full_functional/query_shadowed_attribute.test index 63ca750971..9ac5f3b425 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_shadowed_attribute.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_shadowed_attribute.test @@ -99,8 +99,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_two_attributes_in_cpr_one_local.test b/test/functionalTest/cases/0787_cprs_full_functional/query_two_attributes_in_cpr_one_local.test index 62fbcb0342..724d6dcdac 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_two_attributes_in_cpr_one_local.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_two_attributes_in_cpr_one_local.test @@ -152,8 +152,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -181,8 +180,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -210,8 +208,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_two_attributes_in_one_cpr_three_in_another.test b/test/functionalTest/cases/0787_cprs_full_functional/query_two_attributes_in_one_cpr_three_in_another.test index 5f9fbc235f..4a8958f012 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_two_attributes_in_one_cpr_three_in_another.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_two_attributes_in_one_cpr_three_in_another.test @@ -178,8 +178,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -207,8 +206,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -236,8 +234,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -265,8 +262,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -294,8 +290,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/query_with_contextElement_providingApplicationList.test b/test/functionalTest/cases/0787_cprs_full_functional/query_with_contextElement_providingApplicationList.test index 8381ecbd6d..029934edd7 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/query_with_contextElement_providingApplicationList.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/query_with_contextElement_providingApplicationList.test @@ -86,8 +86,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -115,8 +114,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/update_double_forward.test b/test/functionalTest/cases/0787_cprs_full_functional/update_double_forward.test index 2f3e3ba9a7..eda57583ec 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/update_double_forward.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/update_double_forward.test @@ -56,8 +56,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -85,8 +84,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration.test b/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration.test index 1f27719b69..7c158cdd00 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration.test @@ -51,8 +51,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration_and_one_more_value.test b/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration_and_one_more_value.test index 04d991692c..7a682b3783 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration_and_one_more_value.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration_and_one_more_value.test @@ -53,8 +53,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration_and_one_more_value_in_provider.test b/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration_and_one_more_value_in_provider.test index acd8aaf98e..2b2156f087 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration_and_one_more_value_in_provider.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/update_false_registration_and_one_more_value_in_provider.test @@ -56,8 +56,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -85,8 +84,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/update_five_different_cprs_in_one_query.test b/test/functionalTest/cases/0787_cprs_full_functional/update_five_different_cprs_in_one_query.test index eb64a1056f..60e728f9a8 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/update_five_different_cprs_in_one_query.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/update_five_different_cprs_in_one_query.test @@ -188,8 +188,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -217,8 +216,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -246,8 +244,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -275,8 +272,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP4_PORT}'/v1" @@ -304,8 +300,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP5_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/update_forward_depends_on_attr_field.test b/test/functionalTest/cases/0787_cprs_full_functional/update_forward_depends_on_attr_field.test index a39a5779e7..de6d2a3565 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/update_forward_depends_on_attr_field.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/update_forward_depends_on_attr_field.test @@ -168,13 +168,11 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -202,13 +200,11 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/update_found_and_not_found_in_local_and_three_cprs.test b/test/functionalTest/cases/0787_cprs_full_functional/update_found_and_not_found_in_local_and_three_cprs.test index 67f4a51e7e..5f6f2652d3 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/update_found_and_not_found_in_local_and_three_cprs.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/update_found_and_not_found_in_local_and_three_cprs.test @@ -139,13 +139,11 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -173,13 +171,11 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -207,13 +203,11 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A6", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/update_one_forward.test b/test/functionalTest/cases/0787_cprs_full_functional/update_one_forward.test index aee3cb2b90..782634227a 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/update_one_forward.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/update_one_forward.test @@ -76,8 +76,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/update_shadowed_attribute.test b/test/functionalTest/cases/0787_cprs_full_functional/update_shadowed_attribute.test index 54c17fd39f..0ac5d0b507 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/update_shadowed_attribute.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/update_shadowed_attribute.test @@ -101,8 +101,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional/update_three_found_on_cps_two_local_four_not_found.test b/test/functionalTest/cases/0787_cprs_full_functional/update_three_found_on_cps_two_local_four_not_found.test index b9a3570239..a38c4a1a6c 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional/update_three_found_on_cps_two_local_four_not_found.test +++ b/test/functionalTest/cases/0787_cprs_full_functional/update_three_found_on_cps_two_local_four_not_found.test @@ -209,8 +209,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -238,8 +237,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -267,8 +265,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -296,8 +293,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -325,8 +321,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -354,8 +349,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -383,8 +377,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_double_forward.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_double_forward.test index 507343286f..6310daa7a2 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_double_forward.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_double_forward.test @@ -55,8 +55,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -84,8 +83,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration.test index 6625599ee8..169b65e926 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration.test @@ -52,8 +52,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration_and_one_more_value.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration_and_one_more_value.test index 8a1b202d96..29b37d50b9 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration_and_one_more_value.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration_and_one_more_value.test @@ -52,8 +52,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration_and_one_more_value_in_provider.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration_and_one_more_value_in_provider.test index b6e013f2a8..6b6326a7ee 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration_and_one_more_value_in_provider.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_false_registration_and_one_more_value_in_provider.test @@ -55,8 +55,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -84,8 +83,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_five_different_cprs_in_one_query.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_five_different_cprs_in_one_query.test index 1400a09ad9..88097b5bbc 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_five_different_cprs_in_one_query.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_five_different_cprs_in_one_query.test @@ -184,8 +184,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -213,8 +212,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -242,8 +240,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -271,8 +268,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP4_PORT}'/v1" @@ -300,8 +296,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP5_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_forward_depends_on_attr_field.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_forward_depends_on_attr_field.test index 7be45d43a6..a0430f3e49 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_forward_depends_on_attr_field.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_forward_depends_on_attr_field.test @@ -163,13 +163,11 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -197,13 +195,11 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_forward_query_not_found.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_forward_query_not_found.test index 3d6395f228..f3ca9003ec 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_forward_query_not_found.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_forward_query_not_found.test @@ -51,8 +51,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_found_and_not_found_locally_and_remote.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_found_and_not_found_locally_and_remote.test index ab53724c7d..df44d532e6 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_found_and_not_found_locally_and_remote.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_found_and_not_found_locally_and_remote.test @@ -74,13 +74,11 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -108,18 +106,15 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -147,18 +142,15 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -186,18 +178,15 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -225,18 +214,15 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -264,18 +250,15 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_no_attributes_in_query_results_from_CB_and_CP1.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_no_attributes_in_query_results_from_CB_and_CP1.test index 49838269aa..111daa374e 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_no_attributes_in_query_results_from_CB_and_CP1.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_no_attributes_in_query_results_from_CB_and_CP1.test @@ -114,18 +114,15 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_no_attributes_in_query_results_from_CP1_and_CP2.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_no_attributes_in_query_results_from_CP1_and_CP2.test index 607f042bbc..8a68cb44b3 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_no_attributes_in_query_results_from_CP1_and_CP2.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_no_attributes_in_query_results_from_CP1_and_CP2.test @@ -117,13 +117,11 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -151,18 +149,15 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_one_forward_query.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_one_forward_query.test index f2b92052ea..ae6582e0f1 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_one_forward_query.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_one_forward_query.test @@ -76,8 +76,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_shadowed_attribute.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_shadowed_attribute.test index 0e81c16298..9f4b50e0bc 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_shadowed_attribute.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_shadowed_attribute.test @@ -99,8 +99,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_two_attributes_in_cpr_one_local.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_two_attributes_in_cpr_one_local.test index 3eb6e2a9a0..0e569435db 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_two_attributes_in_cpr_one_local.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_two_attributes_in_cpr_one_local.test @@ -152,8 +152,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -181,8 +180,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -210,8 +208,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_two_attributes_in_one_cpr_three_in_another.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_two_attributes_in_one_cpr_three_in_another.test index efe5f06f92..b5e520c11e 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_two_attributes_in_one_cpr_three_in_another.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_query_two_attributes_in_one_cpr_three_in_another.test @@ -178,8 +178,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -207,8 +206,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -236,8 +234,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -265,8 +262,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -294,8 +290,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_double_forward.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_double_forward.test index c1e1ea8269..531e900a7b 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_double_forward.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_double_forward.test @@ -56,8 +56,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -85,8 +84,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration.test index d1f0813ace..c2e4480623 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration.test @@ -51,8 +51,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration_and_one_more_value.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration_and_one_more_value.test index 2a648781ca..c48b94a4d4 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration_and_one_more_value.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration_and_one_more_value.test @@ -53,8 +53,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration_and_one_more_value_in_provider.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration_and_one_more_value_in_provider.test index c834597436..853b1b3a9b 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration_and_one_more_value_in_provider.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_false_registration_and_one_more_value_in_provider.test @@ -56,8 +56,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -85,8 +84,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_five_different_cprs_in_one_query.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_five_different_cprs_in_one_query.test index bba38306d3..a11da7de7c 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_five_different_cprs_in_one_query.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_five_different_cprs_in_one_query.test @@ -188,8 +188,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -217,8 +216,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -246,8 +244,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -275,8 +272,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP4_PORT}'/v1" @@ -304,8 +300,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP5_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_forward_depends_on_attr_field.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_forward_depends_on_attr_field.test index 0f437ddef2..70208f88ef 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_forward_depends_on_attr_field.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_forward_depends_on_attr_field.test @@ -168,13 +168,11 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -202,13 +200,11 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_found_and_not_found_in_local_and_three_cprs.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_found_and_not_found_in_local_and_three_cprs.test index 57c0967245..79fe12e482 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_found_and_not_found_in_local_and_three_cprs.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_found_and_not_found_in_local_and_three_cprs.test @@ -139,13 +139,11 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -173,13 +171,11 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -207,13 +203,11 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A6", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_one_forward.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_one_forward.test index 54566bfa6f..88bdd9664d 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_one_forward.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_one_forward.test @@ -77,8 +77,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_shadowed_attribute.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_shadowed_attribute.test index e255eab9c7..c7165adc4a 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_shadowed_attribute.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_shadowed_attribute.test @@ -101,8 +101,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_three_found_on_cps_two_local_four_not_found.test b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_three_found_on_cps_two_local_four_not_found.test index 9686895cdb..dae95ad2e6 100644 --- a/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_three_found_on_cps_two_local_four_not_found.test +++ b/test/functionalTest/cases/0787_cprs_full_functional_v2/ngsiv2_update_three_found_on_cps_two_local_four_not_found.test @@ -209,8 +209,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -238,8 +237,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -267,8 +265,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -296,8 +293,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -325,8 +321,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -354,8 +349,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -383,8 +377,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" diff --git a/test/functionalTest/cases/0880_timeout_for_forward_and_notifications/forward_that_times_out.test b/test/functionalTest/cases/0880_timeout_for_forward_and_notifications/forward_that_times_out.test index 0bf65eca20..6fabe9e971 100644 --- a/test/functionalTest/cases/0880_timeout_for_forward_and_notifications/forward_that_times_out.test +++ b/test/functionalTest/cases/0880_timeout_for_forward_and_notifications/forward_that_times_out.test @@ -54,8 +54,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${LISTENER_PORT}'/noresponse" diff --git a/test/functionalTest/cases/0880_timeout_for_forward_and_notifications/notification_that_times_out.test b/test/functionalTest/cases/0880_timeout_for_forward_and_notifications/notification_that_times_out.test index 903a558e4b..5cefe4a9dd 100644 --- a/test/functionalTest/cases/0880_timeout_for_forward_and_notifications/notification_that_times_out.test +++ b/test/functionalTest/cases/0880_timeout_for_forward_and_notifications/notification_that_times_out.test @@ -52,8 +52,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${LISTENER_PORT}'/v1" diff --git a/test/functionalTest/cases/0917_queryContext_behaves_differently/query_with_and_without_forwarding.test b/test/functionalTest/cases/0917_queryContext_behaves_differently/query_with_and_without_forwarding.test index c20fe3b287..ffc2e62a5a 100644 --- a/test/functionalTest/cases/0917_queryContext_behaves_differently/query_with_and_without_forwarding.test +++ b/test/functionalTest/cases/0917_queryContext_behaves_differently/query_with_and_without_forwarding.test @@ -83,8 +83,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${LISTENER_PORT}'/noresponse" diff --git a/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs.test b/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs.test index b55db44543..5bb45a9472 100644 --- a/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs.test +++ b/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs.test @@ -114,8 +114,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs_mix_entities.test b/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs_mix_entities.test index cd10bdffe6..ef90bc9f0a 100644 --- a/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs_mix_entities.test +++ b/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs_mix_entities.test @@ -167,8 +167,7 @@ payload='{ "attributes": [ { "name": "ping", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs_mix_entities2.test b/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs_mix_entities2.test index 2c2a418d89..8245d20336 100644 --- a/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs_mix_entities2.test +++ b/test/functionalTest/cases/0945_pagination_with_cprs/pagination_with_cprs_mix_entities2.test @@ -171,8 +171,7 @@ payload='{ "attributes": [ { "name": "ping", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_limited.test b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_limited.test index 85130d5f67..c060bbee36 100644 --- a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_limited.test +++ b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_limited.test @@ -184,8 +184,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -213,8 +212,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -242,8 +240,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -271,8 +268,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP4_PORT}'/v1" @@ -300,8 +296,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP5_PORT}'/v1" diff --git a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_unlimited.test b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_unlimited.test index caa76fc5c1..2fce09775d 100644 --- a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_unlimited.test +++ b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_unlimited.test @@ -184,8 +184,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -213,8 +212,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -242,8 +240,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -271,8 +268,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP4_PORT}'/v1" @@ -300,8 +296,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP5_PORT}'/v1" diff --git a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_zero_limit.test b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_zero_limit.test index c16024fec9..2cac9e1f04 100644 --- a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_zero_limit.test +++ b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_query_zero_limit.test @@ -184,8 +184,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -213,8 +212,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -242,8 +240,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -271,8 +268,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP4_PORT}'/v1" @@ -300,8 +296,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP5_PORT}'/v1" diff --git a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_limited.test b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_limited.test index 9495246a3f..ed7e74a356 100644 --- a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_limited.test +++ b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_limited.test @@ -188,8 +188,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -217,8 +216,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -246,8 +244,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -275,8 +272,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP4_PORT}'/v1" @@ -304,8 +300,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP5_PORT}'/v1" diff --git a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_unlimited.test b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_unlimited.test index 54e85711da..0a9b2be7aa 100644 --- a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_unlimited.test +++ b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_unlimited.test @@ -188,8 +188,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -217,8 +216,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -246,8 +244,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -275,8 +272,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP4_PORT}'/v1" @@ -304,8 +300,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP5_PORT}'/v1" diff --git a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_zero_limit.test b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_zero_limit.test index 3c6603d7fa..97408d6d43 100644 --- a/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_zero_limit.test +++ b/test/functionalTest/cases/1016_cpr_forward_limit/fwd_update_zero_limit.test @@ -188,8 +188,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -217,8 +216,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP2_PORT}'/v1" @@ -246,8 +244,7 @@ payload='{ "attributes": [ { "name": "A3", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP3_PORT}'/v1" @@ -275,8 +272,7 @@ payload='{ "attributes": [ { "name": "A4", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP4_PORT}'/v1" @@ -304,8 +300,7 @@ payload='{ "attributes": [ { "name": "A5", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP5_PORT}'/v1" diff --git a/test/functionalTest/cases/1310_suspect_200OK/suspect_200OK.test b/test/functionalTest/cases/1310_suspect_200OK/suspect_200OK.test index 93c2e56f88..74a55f7846 100644 --- a/test/functionalTest/cases/1310_suspect_200OK/suspect_200OK.test +++ b/test/functionalTest/cases/1310_suspect_200OK/suspect_200OK.test @@ -65,7 +65,6 @@ payload='{ "id": "E1" } ], - "providingApplication": "http://XXXlocalhostXXX:'${CP1_PORT}'/v1" } ], @@ -88,7 +87,6 @@ payload='{ "id": "E1" } ], - "providingApplication": "http://XXXlocalhostXXX:'${CP1_PORT}'/v1" } ], @@ -108,7 +106,6 @@ payload='{ "type": "T1" } ] - }' orionCurl --url /v1/queryContext --payload "$payload" --json echo diff --git a/test/functionalTest/cases/1440_cpr_update_compounds/cpr_update_compounds.test b/test/functionalTest/cases/1440_cpr_update_compounds/cpr_update_compounds.test index 584f246da9..fc669e403a 100644 --- a/test/functionalTest/cases/1440_cpr_update_compounds/cpr_update_compounds.test +++ b/test/functionalTest/cases/1440_cpr_update_compounds/cpr_update_compounds.test @@ -56,8 +56,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/1916_fiware_correlator/fiware_correlator_forward_and_notifications.test b/test/functionalTest/cases/1916_fiware_correlator/fiware_correlator_forward_and_notifications.test index 5b0b162748..1a80ea8268 100644 --- a/test/functionalTest/cases/1916_fiware_correlator/fiware_correlator_forward_and_notifications.test +++ b/test/functionalTest/cases/1916_fiware_correlator/fiware_correlator_forward_and_notifications.test @@ -106,8 +106,7 @@ payload='{ ], "attributes": [ { - "name": "A2", - "isDomain": "false" + "name": "A2" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2193_entity_not_found_when_forwarding/entity_not_found_when_forwarding_specific_attr.test b/test/functionalTest/cases/2193_entity_not_found_when_forwarding/entity_not_found_when_forwarding_specific_attr.test index d9c7f6fc5b..49ac511945 100644 --- a/test/functionalTest/cases/2193_entity_not_found_when_forwarding/entity_not_found_when_forwarding_specific_attr.test +++ b/test/functionalTest/cases/2193_entity_not_found_when_forwarding/entity_not_found_when_forwarding_specific_attr.test @@ -51,8 +51,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities.test b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities.test index 13a5963506..7ce2c7727a 100644 --- a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities.test +++ b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities.test @@ -70,8 +70,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID.test b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID.test index 9c66fc734f..86cae60ff1 100644 --- a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID.test +++ b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID.test @@ -70,8 +70,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs.test b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs.test index aa2ccfc23e..29dffe475a 100644 --- a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs.test +++ b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs.test @@ -70,8 +70,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs_ATTRNAME.test b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs_ATTRNAME.test index 1ffdf150b8..6a9fcee30f 100644 --- a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs_ATTRNAME.test +++ b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs_ATTRNAME.test @@ -70,8 +70,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs_ATTRNAME_value.test b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs_ATTRNAME_value.test index 3cf98fac00..74741f56b5 100644 --- a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs_ATTRNAME_value.test +++ b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_GET_v2_entities_EID_attrs_ATTRNAME_value.test @@ -68,8 +68,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_PATCH_v2_entities_EID_attrs.test b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_PATCH_v2_entities_EID_attrs.test index 8271975e8c..73b92c633e 100644 --- a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_PATCH_v2_entities_EID_attrs.test +++ b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_PATCH_v2_entities_EID_attrs.test @@ -68,8 +68,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_POST_v2_op_update.test b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_POST_v2_op_update.test index 46776dc715..cd907d856e 100644 --- a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_POST_v2_op_update.test +++ b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_POST_v2_op_update.test @@ -70,8 +70,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_PUT_v2_entities_EID_attrs_ATTRNAME.test b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_PUT_v2_entities_EID_attrs_ATTRNAME.test index c33dabbd51..47f8c6c368 100644 --- a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_PUT_v2_entities_EID_attrs_ATTRNAME.test +++ b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/forward_using_PUT_v2_entities_EID_attrs_ATTRNAME.test @@ -68,8 +68,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/v1_reply_to_v2_response_on_error_with_cpr.test b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/v1_reply_to_v2_response_on_error_with_cpr.test index c714bed036..cef958e376 100644 --- a/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/v1_reply_to_v2_response_on_error_with_cpr.test +++ b/test/functionalTest/cases/2193_v1_reply_to_v2_response_on_error_with_cpr/v1_reply_to_v2_response_on_error_with_cpr.test @@ -99,13 +99,11 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" }, { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2237_compound_values_in_forwarded_messages/compound_values_in_forwarded_messages.test b/test/functionalTest/cases/2237_compound_values_in_forwarded_messages/compound_values_in_forwarded_messages.test index d8ff14a4b5..3dc65e2b0a 100644 --- a/test/functionalTest/cases/2237_compound_values_in_forwarded_messages/compound_values_in_forwarded_messages.test +++ b/test/functionalTest/cases/2237_compound_values_in_forwarded_messages/compound_values_in_forwarded_messages.test @@ -53,8 +53,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2237_compound_values_in_forwarded_messages/compound_values_in_forwarded_messages_exactly_as_issue.test b/test/functionalTest/cases/2237_compound_values_in_forwarded_messages/compound_values_in_forwarded_messages_exactly_as_issue.test index 3a9359e0d7..2ae21ecfa6 100644 --- a/test/functionalTest/cases/2237_compound_values_in_forwarded_messages/compound_values_in_forwarded_messages_exactly_as_issue.test +++ b/test/functionalTest/cases/2237_compound_values_in_forwarded_messages/compound_values_in_forwarded_messages_exactly_as_issue.test @@ -52,8 +52,7 @@ payload='{ "attributes": [ { "name": "ping", - "type": "command", - "isDomain": "false" + "type": "command" } ], "providingApplication": "http://localhost:'${LISTENER_PORT}'/v1" diff --git a/test/functionalTest/cases/2248_forwarding_updates_overwrite_the_types_of_attributes/attribute_type_converted_to_string_on_forward.test b/test/functionalTest/cases/2248_forwarding_updates_overwrite_the_types_of_attributes/attribute_type_converted_to_string_on_forward.test index d510879982..942b16dc5e 100644 --- a/test/functionalTest/cases/2248_forwarding_updates_overwrite_the_types_of_attributes/attribute_type_converted_to_string_on_forward.test +++ b/test/functionalTest/cases/2248_forwarding_updates_overwrite_the_types_of_attributes/attribute_type_converted_to_string_on_forward.test @@ -49,8 +49,7 @@ payload='{ ], "attributes": [ { - "name": "A1", - "isDomain": "false" + "name": "A1" } ], "providingApplication": "http://localhost:'${LISTENER_PORT}'/v1" diff --git a/test/functionalTest/cases/2248_forwarding_updates_overwrite_the_types_of_attributes/forwarding_updates_overwrite_the_types_of_attributes.test b/test/functionalTest/cases/2248_forwarding_updates_overwrite_the_types_of_attributes/forwarding_updates_overwrite_the_types_of_attributes.test index 900583645b..4a3af26689 100644 --- a/test/functionalTest/cases/2248_forwarding_updates_overwrite_the_types_of_attributes/forwarding_updates_overwrite_the_types_of_attributes.test +++ b/test/functionalTest/cases/2248_forwarding_updates_overwrite_the_types_of_attributes/forwarding_updates_overwrite_the_types_of_attributes.test @@ -69,8 +69,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2332_patterns_in_registrations/patterns_in_registrations.test b/test/functionalTest/cases/2332_patterns_in_registrations/patterns_in_registrations.test index 4c6ad05a39..8b573cf240 100644 --- a/test/functionalTest/cases/2332_patterns_in_registrations/patterns_in_registrations.test +++ b/test/functionalTest/cases/2332_patterns_in_registrations/patterns_in_registrations.test @@ -49,8 +49,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -78,8 +77,7 @@ payload='{ "attributes": [ { "name": "A1", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" @@ -95,8 +93,7 @@ payload='{ "attributes": [ { "name": "A2", - "type": "string", - "isDomain": "false" + "type": "string" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/cases/2360_cpr_invalid_response/cpr_invalid_response.test b/test/functionalTest/cases/2360_cpr_invalid_response/cpr_invalid_response.test index 97a0d219c1..f63824945b 100644 --- a/test/functionalTest/cases/2360_cpr_invalid_response/cpr_invalid_response.test +++ b/test/functionalTest/cases/2360_cpr_invalid_response/cpr_invalid_response.test @@ -65,8 +65,7 @@ payload='{ "attributes": [ { "name": "c_name", - "type": "command", - "isDomain": "false" + "type": "command" } ], "providingApplication": "http://localhost:'${LISTENER_PORT}'/badresponse" diff --git a/test/functionalTest/cases/2871_fwd_update_ok_but_not_found_response/fwd_update_ok_but_not_found_response.test b/test/functionalTest/cases/2871_fwd_update_ok_but_not_found_response/fwd_update_ok_but_not_found_response.test index 1dc71a6f08..00361501e9 100644 --- a/test/functionalTest/cases/2871_fwd_update_ok_but_not_found_response/fwd_update_ok_but_not_found_response.test +++ b/test/functionalTest/cases/2871_fwd_update_ok_but_not_found_response/fwd_update_ok_but_not_found_response.test @@ -63,8 +63,7 @@ doc='{ "attrs":[ { "name":"turn", - "type":"string", - "isDomain":"false" + "type":"string" } ], "providingApplication":"http://localhost:9997/bug2871" diff --git a/test/functionalTest/cases/3177_updateContext_APPEND_CPr_Registration/updateContext_APPEND_CPr_Reg.test b/test/functionalTest/cases/3177_updateContext_APPEND_CPr_Registration/updateContext_APPEND_CPr_Reg.test index 6e4623e3f6..3cc2fd0079 100644 --- a/test/functionalTest/cases/3177_updateContext_APPEND_CPr_Registration/updateContext_APPEND_CPr_Reg.test +++ b/test/functionalTest/cases/3177_updateContext_APPEND_CPr_Registration/updateContext_APPEND_CPr_Reg.test @@ -52,8 +52,7 @@ payload='{ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false" + "type": "degree" } ], "providingApplication": "http://localhost:'${CP1_PORT}'/v1" diff --git a/test/functionalTest/fixContentLengths.py b/test/functionalTest/fixContentLengths.py index ba4c379cb7..2d3a61cdc7 100755 --- a/test/functionalTest/fixContentLengths.py +++ b/test/functionalTest/fixContentLengths.py @@ -24,6 +24,7 @@ from getopt import getopt, GetoptError import os +import shutil import sys import re import tempfile @@ -119,9 +120,11 @@ def patch_content_lengths(file_name, cl): file_temp.close() - # Remove old file, replacing by the edited one + # Remove old file, replacing by the edited one. Note we use shutil.move() instead of os.rename() + # as the later has problems when src and dest are not in the same filesystem (it is problematic + # if symlinks are used) os.remove(file_name) - os.rename(file_temp.name, file_name) + shutil.move(file_temp.name, file_name) except Exception as err: print ('* error processing file %s: %s' % (file_name, str(err))) @@ -351,4 +354,4 @@ def process_file(file_name, mode): result_exp = result[3] result_out = result[4] -msg('TOTAL: files: %d, changes: %d, length .regexpect: %d, length .out %d' % (files, changes, result_exp, result_out)) \ No newline at end of file +msg('TOTAL: files: %d, changes: %d, length .regexpect: %d, length .out %d' % (files, changes, result_exp, result_out)) From 2901bafcc387babe6fe1e126353d894a79d1d389 Mon Sep 17 00:00:00 2001 From: Fermin Galan Marquez Date: Thu, 27 Sep 2018 20:55:48 +0200 Subject: [PATCH 4/6] FIX adjust unit tests after removing isDomain and registration metadata --- ...ngsi9.registerContextRequest.ok.valid.json | 24 +-- ...ngsi9.registerContextRequest.ok.valid.json | 6 +- .../AppendContextElementRequest_test.cpp | 2 +- .../AppendContextElementResponse_test.cpp | 4 +- .../ContextAttributeResponseVector_test.cpp | 4 +- .../ContextAttributeResponse_test.cpp | 2 +- .../RegisterProviderRequest_test.cpp | 18 +-- .../UpdateContextAttributeRequest_test.cpp | 2 +- .../UpdateContextElementRequest_test.cpp | 2 +- .../UpdateContextElementResponse_test.cpp | 2 +- .../mongoContextProvidersQuery_test.cpp | 50 +++--- .../mongoContextProvidersUpdate_test.cpp | 42 ++--- .../mongoDiscoverContextAvailability_test.cpp | 119 +++----------- .../mongoNotifyContextAvailability_test.cpp | 144 ++++++----------- .../mongoRegisterContext_test.cpp | 152 ++++++------------ .../mongoRegisterContext_update_test.cpp | 57 ++----- ...mongoSubscribeContextAvailability_test.cpp | 116 ++++++------- ...teContextAvailabilitySubscription_test.cpp | 122 +++++++------- .../ngsi/AttributeExpression_test.cpp | 4 +- test/unittests/ngsi/AttributeList_test.cpp | 4 +- .../ngsi/ConditionValueList_test.cpp | 6 +- .../ngsi/ContextAttributeVector_test.cpp | 2 +- test/unittests/ngsi/ContextAttribute_test.cpp | 2 +- .../ContextElementResponseVector_test.cpp | 2 +- .../ngsi/ContextElementResponse_test.cpp | 2 +- .../ngsi/ContextElementVector_test.cpp | 4 +- ...ontextRegistrationAttributeVector_test.cpp | 12 +- .../ContextRegistrationAttribute_test.cpp | 4 +- ...ContextRegistrationResponseVector_test.cpp | 2 +- .../ngsi/ContextRegistrationResponse_test.cpp | 4 +- .../ngsi/ContextRegistrationVector_test.cpp | 2 +- test/unittests/ngsi/EntityId_test.cpp | 2 +- test/unittests/ngsi/MetadataVector_test.cpp | 4 +- test/unittests/ngsi/Metadata_test.cpp | 4 +- .../ngsi/NotifyConditionVector_test.cpp | 6 +- test/unittests/ngsi/NotifyCondition_test.cpp | 2 +- test/unittests/ngsi/Originator_test.cpp | 4 +- .../ngsi/ProvidingApplication_test.cpp | 4 +- test/unittests/ngsi/Reference_test.cpp | 4 +- .../unittests/ngsi/RestrictionString_test.cpp | 4 +- test/unittests/ngsi/Restriction_test.cpp | 2 +- test/unittests/ngsi/ScopeVector_test.cpp | 4 +- test/unittests/ngsi/Scope_test.cpp | 2 +- test/unittests/ngsi/StatusCode_test.cpp | 2 +- test/unittests/ngsi/SubscribeError_test.cpp | 4 +- test/unittests/ngsi/SubscriptionId_test.cpp | 2 +- test/unittests/ngsi/Throttling_test.cpp | 6 +- .../ngsi10/NotifyContextRequest_test.cpp | 8 +- .../ngsi10/QueryContextRequest_test.cpp | 2 +- .../ngsi10/QueryContextResponse_test.cpp | 26 +-- .../ngsi10/SubscribeContextResponse_test.cpp | 12 +- .../ngsi10/UnsubscribeContextRequest_test.cpp | 2 +- .../UnsubscribeContextResponse_test.cpp | 4 +- .../ngsi10/UpdateContextResponse_test.cpp | 12 +- ...UpdateContextSubscriptionResponse_test.cpp | 12 +- ...scoverContextAvailabilityResponse_test.cpp | 109 ++++--------- .../NotifyContextAvailabilityRequest_test.cpp | 10 +- ...NotifyContextAvailabilityResponse_test.cpp | 2 +- .../ngsi9/RegisterContextRequest_test.cpp | 28 +--- .../ngsi9/RegisterContextResponse_test.cpp | 10 +- ...scribeContextAvailabilityResponse_test.cpp | 8 +- ...scribeContextAvailabilityResponse_test.cpp | 4 +- ...xtAvailabilitySubscriptionRequest_test.cpp | 2 +- ...tAvailabilitySubscriptionResponse_test.cpp | 8 +- test/unittests/parse/compoundValue_test.cpp | 6 +- test/unittests/rest/OrionError_test.cpp | 6 +- ...xtRegistrationAttribute.render.middle.json | 2 +- ...trationAttributeVector.render1.middle.json | 2 +- ...trationAttributeVector.render2.middle.json | 2 +- ...AvailabilityRequest.jsonRender2.valid.json | 2 +- ...ailabilityResponse.jsonRender12.valid.json | 1 - ...ailabilityResponse.jsonRender16.valid.json | 2 +- ...vailabilityResponse.jsonRender6.valid.json | 2 +- ...vailabilityResponse.jsonRender7.valid.json | 2 +- ...vailabilityResponse.jsonRender8.valid.json | 1 - ...vailabilityResponse.jsonRender9.valid.json | 1 - ...fyContextAvailabilityRequest.ok.valid.json | 2 +- ...yContextAvailabilityRequest.ok2.valid.json | 17 +- .../ngsi9.registerContext.ok.valid.json | 17 +- ...RegistrationAttributeIsDomain.invalid.json | 41 ----- ...est.emptyProvidingApplication.invalid.json | 19 +-- ...quest.entityIdWithIsPatternTrue.valid.json | 19 +-- ...equest.invalidIsPatternString.invalid.json | 19 +-- ...equest.noProvidingApplication.invalid.json | 19 +-- ...ngsi9.registerContextRequest.ok.valid.json | 19 +-- ...Request.overwriteEntityIdType.invalid.json | 19 +-- ...erContextRequest.reregistration.valid.json | 17 +- ...gisterContextRequestRendered.ok.valid.json | 2 +- ...xtRegistrationAttributeIsDomain.valid.json | 1 - ...erProviderRequest.noMetdataName.valid.json | 1 - ...roviderRequest.noRegistrationId.valid.json | 12 -- ...gsi9.registerProviderRequest.ok.valid.json | 12 -- 92 files changed, 498 insertions(+), 1000 deletions(-) delete mode 100644 test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender12.valid.json delete mode 100644 test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender8.valid.json delete mode 100644 test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender9.valid.json delete mode 100644 test/unittests/testData/ngsi9.registerContextRequest.badContextRegistrationAttributeIsDomain.invalid.json delete mode 100644 test/unittests/testData/ngsi9.registerContextResponse.badContextRegistrationAttributeIsDomain.valid.json delete mode 100644 test/unittests/testData/ngsi9.registerProviderRequest.noMetdataName.valid.json diff --git a/test/manual/ngsi-9/ngsi9.registerContextRequest.ok.valid.json b/test/manual/ngsi-9/ngsi9.registerContextRequest.ok.valid.json index 75f28f0d71..2630985e9b 100644 --- a/test/manual/ngsi-9/ngsi9.registerContextRequest.ok.valid.json +++ b/test/manual/ngsi-9/ngsi9.registerContextRequest.ok.valid.json @@ -19,29 +19,7 @@ "contextRegistrationAttributeList": { "contextRegistrationAttribute": { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadata": { - "contextMetadata": [ - { - "name": "ID", - "type": "string", - "value": "1110" - }, - { - "name": "nn", - "type": "tt", - "value": "vv" - } - ] - } - } - }, - "registrationMetadata": { - "contextMetadata": { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } }, "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/manual/ngsi9.registerContextRequest.ok.valid.json b/test/manual/ngsi9.registerContextRequest.ok.valid.json index 49f5c6d6e7..1f54480869 100644 --- a/test/manual/ngsi9.registerContextRequest.ok.valid.json +++ b/test/manual/ngsi9.registerContextRequest.ok.valid.json @@ -16,13 +16,11 @@ "attributes": [ { "name": "temperature", - "type": "centigrade", - "isDomain": "false" + "type": "centigrade" }, { "name": "pressure", - "type": "mmHg", - "isDomain": "false" + "type": "mmHg" } ], "providingApplication": "http://mysensors.com/Rooms" diff --git a/test/unittests/convenience/AppendContextElementRequest_test.cpp b/test/unittests/convenience/AppendContextElementRequest_test.cpp index 5e725ebf2e..88140f1c9f 100644 --- a/test/unittests/convenience/AppendContextElementRequest_test.cpp +++ b/test/unittests/convenience/AppendContextElementRequest_test.cpp @@ -50,7 +50,7 @@ TEST(AppendContextElementRequest, render_json) acer.contextAttributeVector.push_back(&ca); - out = acer.render(false, UpdateContext); + out = acer.toJsonV1(false, UpdateContext); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile)) << "Error getting test data from '" << outfile << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/convenience/AppendContextElementResponse_test.cpp b/test/unittests/convenience/AppendContextElementResponse_test.cpp index fe1e2379c8..83620f9477 100644 --- a/test/unittests/convenience/AppendContextElementResponse_test.cpp +++ b/test/unittests/convenience/AppendContextElementResponse_test.cpp @@ -50,13 +50,13 @@ TEST(AppendContextElementResponse, render_json) utInit(); // 1. empty acer - out = acer.render(false, AppendContextElement); + out = acer.toJsonV1(false, AppendContextElement); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); // 2. errorCode 'active' acer.errorCode.fill(SccBadRequest, "very bad request"); - out = acer.render(false, AppendContextElement); + out = acer.toJsonV1(false, AppendContextElement); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile2)) << "Error getting test data from '" << outfile2 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/convenience/ContextAttributeResponseVector_test.cpp b/test/unittests/convenience/ContextAttributeResponseVector_test.cpp index 185a29bb50..952fac78b0 100644 --- a/test/unittests/convenience/ContextAttributeResponseVector_test.cpp +++ b/test/unittests/convenience/ContextAttributeResponseVector_test.cpp @@ -51,14 +51,14 @@ TEST(ContextAttributeResponseVector, render_json) // 1. empty vector car.statusCode.fill(SccBadRequest, "Empty Vector"); - out = carV.render(false, ContextEntityAttributes); + out = carV.toJsonV1(false, ContextEntityAttributes); EXPECT_STREQ("", out.c_str()); // 2. normal case car.contextAttributeVector.push_back(&ca); carV.push_back(&car); - out = carV.render(false, ContextEntityAttributes); + out = carV.toJsonV1(false, ContextEntityAttributes); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile)) << "Error getting test data from '" << outfile << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); } diff --git a/test/unittests/convenience/ContextAttributeResponse_test.cpp b/test/unittests/convenience/ContextAttributeResponse_test.cpp index 846c9e7b3d..e99ca03293 100644 --- a/test/unittests/convenience/ContextAttributeResponse_test.cpp +++ b/test/unittests/convenience/ContextAttributeResponse_test.cpp @@ -50,7 +50,7 @@ TEST(ContextAttributeResponse, render_json) car.contextAttributeVector.push_back(&ca); car.statusCode.fill(SccOk, "OK"); - out = car.render(false, ContextEntityAttributes); + out = car.toJsonV1(false, ContextEntityAttributes); utExit(); } diff --git a/test/unittests/convenience/RegisterProviderRequest_test.cpp b/test/unittests/convenience/RegisterProviderRequest_test.cpp index e8c10e9bb6..12c49bbf12 100644 --- a/test/unittests/convenience/RegisterProviderRequest_test.cpp +++ b/test/unittests/convenience/RegisterProviderRequest_test.cpp @@ -45,11 +45,11 @@ */ TEST(RegisterProviderRequest, json_ok) { + // FIXME P2: gap in outFile ParseData reqData; const char* inFile1 = "ngsi9.registerProviderRequest.noRegistrationId.valid.json"; const char* inFile2 = "ngsi9.registerProviderRequest.ok.valid.json"; - const char* outFile1 = "ngsi9.registerProviderRequestRendered.noRegistrationId.valid.json"; - const char* outFile2 = "ngsi9.registerProviderRequest.noMetdataName.valid.json"; + const char* outFile1 = "ngsi9.registerProviderRequestRendered.noRegistrationId.valid.json"; const char* outFile3 = "ngsi9.registerProviderRequest.predetectedError.valid.json"; const char* outFile4 = "ngsi9.registerProviderRequestRendered.ok.valid.json"; std::string result; @@ -65,26 +65,16 @@ TEST(RegisterProviderRequest, json_ok) result = jsonTreat(testBuf, &ci, &reqData, ContextEntitiesByEntityId, NULL); EXPECT_EQ("OK", result) << "this test should be OK"; - rendered = reqData.rpr.res.render(); + rendered = reqData.rpr.res.toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); - // 2. Destroying metadata to provoke an error - EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outFile2)) << "Error getting test data from '" << outFile2 << "'"; - - reqData.rpr.res.metadataVector[0]->name = ""; - checked = reqData.rpr.res.check(V1, DiscoverContextAvailability, ""); - EXPECT_STREQ(expectedBuf, checked.c_str()); - - // 3. sending a 'predetected error' to the check function EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outFile3)) << "Error getting test data from '" << outFile3 << "'"; checked = reqData.rpr.res.check(V1, DiscoverContextAvailability, "forced predetectedError"); EXPECT_STREQ(expectedBuf, checked.c_str()); - // Just for coverage - reqData.rpr.res.release(); // 4. Second file EXPECT_EQ("OK", testDataFromFile(testBuf, sizeof(testBuf), inFile2)) << "Error getting test data from '" << inFile2 << "'"; @@ -92,6 +82,6 @@ TEST(RegisterProviderRequest, json_ok) result = jsonTreat(testBuf, &ci, &reqData, ContextEntitiesByEntityId, NULL); EXPECT_EQ("OK", result); - rendered = reqData.rpr.res.render(); + rendered = reqData.rpr.res.toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); } diff --git a/test/unittests/convenience/UpdateContextAttributeRequest_test.cpp b/test/unittests/convenience/UpdateContextAttributeRequest_test.cpp index 5bf45ecf88..8f8cb83aca 100644 --- a/test/unittests/convenience/UpdateContextAttributeRequest_test.cpp +++ b/test/unittests/convenience/UpdateContextAttributeRequest_test.cpp @@ -51,7 +51,7 @@ TEST(UpdateContextAttributeRequest, render_json) ucar.contextValue = "Context Value"; ucar.metadataVector.push_back(&mdata); - out = ucar.render(); + out = ucar.toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); utExit(); diff --git a/test/unittests/convenience/UpdateContextElementRequest_test.cpp b/test/unittests/convenience/UpdateContextElementRequest_test.cpp index e9713061f6..7c4c743f21 100644 --- a/test/unittests/convenience/UpdateContextElementRequest_test.cpp +++ b/test/unittests/convenience/UpdateContextElementRequest_test.cpp @@ -53,7 +53,7 @@ TEST(UpdateContextElementRequest, render_json) // Just the normal case ucer.contextAttributeVector.push_back(&ca); - out = ucer.render(false, UpdateContext); + out = ucer.toJsonV1(false, UpdateContext); EXPECT_STREQ(expectedBuf, out.c_str()); utExit(); diff --git a/test/unittests/convenience/UpdateContextElementResponse_test.cpp b/test/unittests/convenience/UpdateContextElementResponse_test.cpp index 85965e148d..1cfb9f5a04 100644 --- a/test/unittests/convenience/UpdateContextElementResponse_test.cpp +++ b/test/unittests/convenience/UpdateContextElementResponse_test.cpp @@ -52,7 +52,7 @@ TEST(UpdateContextElementResponse, render_json) car.contextAttributeVector.push_back(&ca); car.statusCode.fill(SccOk, "details"); - out = ucer.render(false, UpdateContext); + out = ucer.toJsonV1(false, UpdateContext); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile)) << "Error getting test data from '" << outfile << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); } diff --git a/test/unittests/mongoBackend/mongoContextProvidersQuery_test.cpp b/test/unittests/mongoBackend/mongoContextProvidersQuery_test.cpp index cf8d142352..6bcc1d6281 100644 --- a/test/unittests/mongoBackend/mongoContextProvidersQuery_test.cpp +++ b/test/unittests/mongoBackend/mongoContextProvidersQuery_test.cpp @@ -139,35 +139,35 @@ static void prepareDatabase(void) BSON("id" << "E2" << "type" << "T2") << BSON("id" << "E3" << "type" << "T3")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A4" << "type" << "TA4" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A4" << "type" << "TA4"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T2")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1bis")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1bis" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1bis"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY( BSON("id" << "E1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1"))); /* 1879048191 corresponds to year 2029 so we avoid any expiration problem in the next 16 years :) */ BSONObj reg1 = BSON("_id" << OID("51307b66f481db11bf860001") << @@ -228,35 +228,35 @@ static void prepareDatabasePatternTrue(void) BSON("id" << "E2" << "type" << "T") << BSON("id" << "E3" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A4" << "type" << "TA4" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A4" << "type" << "TA4"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "Tbis")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2bis" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "TA2bis"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY( BSON("id" << "E3")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "TA2"))); /* 1879048191 corresponds to year 2029 so we avoid any expiration problem in the next 16 years :) */ BSONObj reg1 = BSON("_id" << "ff37" << @@ -322,25 +322,25 @@ static void prepareDatabaseSeveralCprs1(bool addGenericRegistry) "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "T" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "T"))); BSONObj cr2 = BSON("providingApplication" << "http://cpr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A3" << "type" << "T" << "isDomain" << "false"))); + BSON("name" << "A3" << "type" << "T"))); BSONObj cr3 = BSON("providingApplication" << "http://cpr1.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A4" << "type" << "T" << "isDomain" << "false"))); + BSON("name" << "A4" << "type" << "T"))); BSONObj cr4 = BSON("providingApplication" << "http://cpr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A5" << "type" << "T" << "isDomain" << "false"))); + BSON("name" << "A5" << "type" << "T"))); BSONObj cr5 = BSON("providingApplication" << "http://cpr3.com" << "entities" << BSON_ARRAY( @@ -417,19 +417,19 @@ static void prepareDatabaseSeveralCprs2(void) "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "T" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "T"))); BSONObj cr2 = BSON("providingApplication" << "http://cpr1.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "T" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "T"))); BSONObj cr3 = BSON("providingApplication" << "http://cpr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A3" << "type" << "T" << "isDomain" << "false"))); + BSON("name" << "A3" << "type" << "T"))); BSONObj cr4 = BSON("providingApplication" << "http://cpr2.com" << "entities" << BSON_ARRAY( diff --git a/test/unittests/mongoBackend/mongoContextProvidersUpdate_test.cpp b/test/unittests/mongoBackend/mongoContextProvidersUpdate_test.cpp index a14fabac51..58f5449d24 100644 --- a/test/unittests/mongoBackend/mongoContextProvidersUpdate_test.cpp +++ b/test/unittests/mongoBackend/mongoContextProvidersUpdate_test.cpp @@ -164,35 +164,35 @@ static void prepareDatabase(void) BSON("id" << "E2" << "type" << "T2") << BSON("id" << "E3" << "type" << "T3")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A4" << "type" << "TA4" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A4" << "type" << "TA4"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T2")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1bis")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1bis" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1bis"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY( BSON("id" << "E1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1"))); /* 1879048191 corresponds to year 2029 so we avoid any expiration problem in the next 16 years :) */ @@ -253,35 +253,35 @@ static void prepareDatabasePatternTrue(void) BSON("id" << "E2" << "type" << "T") << BSON("id" << "E3" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A4" << "type" << "TA4" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A4" << "type" << "TA4"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "Tbis")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2bis" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "TA2bis"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY( BSON("id" << "E3")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "TA2"))); /* 1879048191 corresponds to year 2029 so we avoid any expiration problem in the next 16 years :) */ @@ -353,19 +353,19 @@ static void prepareDatabaseSeveralCprs(void) "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "T" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "T"))); BSONObj cr2 = BSON("providingApplication" << "http://cpr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A4" << "type" << "T" << "isDomain" << "false"))); + BSON("name" << "A4" << "type" << "T"))); BSONObj cr3 = BSON("providingApplication" << "http://cpr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E3" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A5" << "type" << "T" << "isDomain" << "false"))); + BSON("name" << "A5" << "type" << "T"))); BSONObj cr4 = BSON("providingApplication" << "http://cpr1.com" << "entities" << BSON_ARRAY( diff --git a/test/unittests/mongoBackend/mongoDiscoverContextAvailability_test.cpp b/test/unittests/mongoBackend/mongoDiscoverContextAvailability_test.cpp index 772d340c29..4e019ad5fb 100644 --- a/test/unittests/mongoBackend/mongoDiscoverContextAvailability_test.cpp +++ b/test/unittests/mongoBackend/mongoDiscoverContextAvailability_test.cpp @@ -145,35 +145,35 @@ static void prepareDatabase(void) BSON("id" << "E2" << "type" << "T2") << BSON("id" << "E3" << "type" << "T3")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A4" << "type" << "TA4" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A4" << "type" << "TA4"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T2")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1bis")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1bis" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1bis"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY( BSON("id" << "E1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1"))); /* 1879048191 corresponds to year 2029 so we avoid any expiration problem in the next 16 years :) */ BSONObj reg1 = BSON("_id" << OID("51307b66f481db11bf860001") << @@ -234,35 +234,35 @@ static void prepareDatabasePatternTrue(void) BSON("id" << "E2" << "type" << "T") << BSON("id" << "E3" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A4" << "type" << "TA4" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A4" << "type" << "TA4"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "Tbis")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2bis" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "TA2bis"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY( BSON("id" << "E3")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "TA2"))); /* 1879048191 corresponds to year 2029 so we avoid any expiration problem in the next 16 years :) */ BSONObj reg1 = BSON( @@ -320,23 +320,23 @@ static void prepareDatabaseForPagination(void) BSONObj cr1 = BSON("providingApplication" << "http://cr1.com" << "entities" << BSON_ARRAY(BSON("id" << "E1" << "type" << "T1")) << - "attrs" << BSON_ARRAY(BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + "attrs" << BSON_ARRAY(BSON("name" << "A1" << "type" << "TA1"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY(BSON("id" << "E2" << "type" << "T2")) << - "attrs" << BSON_ARRAY(BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + "attrs" << BSON_ARRAY(BSON("name" << "A1" << "type" << "TA1"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY(BSON("id" << "E3" << "type" << "T3")) << - "attrs" << BSON_ARRAY(BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + "attrs" << BSON_ARRAY(BSON("name" << "A1" << "type" << "TA1"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY(BSON("id" << "E4" << "type" << "T4")) << - "attrs" << BSON_ARRAY(BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + "attrs" << BSON_ARRAY(BSON("name" << "A1" << "type" << "TA1"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY(BSON("id" << "E5" << "type" << "T5")) << - "attrs" << BSON_ARRAY(BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + "attrs" << BSON_ARRAY(BSON("name" << "A1" << "type" << "TA1"))); BSONObj reg1 = BSON("_id" << OID("51307b66f481db11bf860001") << "expiration" << 1879048191 << @@ -403,7 +403,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationDetails) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -417,7 +416,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationDetails) ASSERT_EQ(1, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -431,7 +429,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationDetails) ASSERT_EQ(1, RES_CNTX_REG(2).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(2, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(2, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(2, 0)->isDomain); EXPECT_EQ("http://cr3.com", RES_CNTX_REG(2).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[2]->errorCode.code); EXPECT_EQ(0, res.responseVector[2]->errorCode.reasonPhrase.size()); @@ -445,7 +442,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationDetails) ASSERT_EQ(1, RES_CNTX_REG(3).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(3, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(3, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(3, 0)->isDomain); EXPECT_EQ("http://cr4.com", RES_CNTX_REG(3).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[3]->errorCode.code); EXPECT_EQ(0, res.responseVector[3]->errorCode.reasonPhrase.size()); @@ -459,7 +455,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationDetails) ASSERT_EQ(1, RES_CNTX_REG(4).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(4, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(4, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(4, 0)->isDomain); EXPECT_EQ("http://cr5.com", RES_CNTX_REG(4).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[4]->errorCode.code); EXPECT_EQ(0, res.responseVector[4]->errorCode.reasonPhrase.size()); @@ -506,7 +501,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationAll) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -520,7 +514,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationAll) ASSERT_EQ(1, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -534,7 +527,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationAll) ASSERT_EQ(1, RES_CNTX_REG(2).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(2, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(2, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(2, 0)->isDomain); EXPECT_EQ("http://cr3.com", RES_CNTX_REG(2).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[2]->errorCode.code); EXPECT_EQ(0, res.responseVector[2]->errorCode.reasonPhrase.size()); @@ -548,7 +540,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationAll) ASSERT_EQ(1, RES_CNTX_REG(3).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(3, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(3, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(3, 0)->isDomain); EXPECT_EQ("http://cr4.com", RES_CNTX_REG(3).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[3]->errorCode.code); EXPECT_EQ(0, res.responseVector[3]->errorCode.reasonPhrase.size()); @@ -562,7 +553,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationAll) ASSERT_EQ(1, RES_CNTX_REG(4).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(4, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(4, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(4, 0)->isDomain); EXPECT_EQ("http://cr5.com", RES_CNTX_REG(4).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[4]->errorCode.code); EXPECT_EQ(0, res.responseVector[4]->errorCode.reasonPhrase.size()); @@ -611,7 +601,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationOnlyFirst) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -660,7 +649,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationOnlySecond) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -709,7 +697,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationRange) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr3.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -723,7 +710,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationRange) ASSERT_EQ(1, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("http://cr4.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -737,7 +723,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationRange) ASSERT_EQ(1, RES_CNTX_REG(2).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(2, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(2, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(2, 0)->isDomain); EXPECT_EQ("http://cr5.com", RES_CNTX_REG(2).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[2]->errorCode.code); EXPECT_EQ(0, res.responseVector[2]->errorCode.reasonPhrase.size()); @@ -822,7 +807,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, paginationNonExistingOverlap) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr5.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -906,13 +890,10 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternAttrsAll) ASSERT_EQ(3, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(0, 1)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(0, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 1)->isDomain); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(0, 2)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(0, 2)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 2)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -967,7 +948,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternAttrOneSingle) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A4", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA4", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1030,7 +1010,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternAttrOneMulti) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1044,7 +1023,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternAttrOneMulti) ASSERT_EQ(1, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -1102,10 +1080,8 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternAttrsSubset) ASSERT_EQ(2, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(0, 1)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(0, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 1)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1161,13 +1137,10 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternSeveralCREs) ASSERT_EQ(3, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(0, 1)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(0, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 1)->isDomain); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(0, 2)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(0, 2)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 2)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1180,10 +1153,8 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternSeveralCREs) ASSERT_EQ(2, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("A4", RES_CNTX_REG_ATTR(1, 1)->name); EXPECT_EQ("TA4", RES_CNTX_REG_ATTR(1, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(1, 1)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -1239,13 +1210,10 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternSeveralRegistrations) ASSERT_EQ(3, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(0, 1)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(0, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 1)->isDomain); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(0, 2)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(0, 2)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 2)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1258,10 +1226,8 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternSeveralRegistrations) ASSERT_EQ(2, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(1, 1)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(1, 1)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 1)->isDomain); EXPECT_EQ("http://cr3.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -1408,13 +1374,10 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternMultiEntity) ASSERT_EQ(3, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(0, 1)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(0, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 1)->isDomain); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(0, 2)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(0, 2)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 2)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1427,10 +1390,8 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternMultiEntity) ASSERT_EQ(2, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("A4", RES_CNTX_REG_ATTR(1, 1)->name); EXPECT_EQ("TA4", RES_CNTX_REG_ATTR(1, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(1, 1)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -1443,10 +1404,8 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternMultiEntity) ASSERT_EQ(2, RES_CNTX_REG(2).contextRegistrationAttributeVector.size()); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(2, 0)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(2, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(2, 0)->isDomain); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(2, 1)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(2, 1)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(2, 1)->isDomain); EXPECT_EQ("http://cr3.com", RES_CNTX_REG(2).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[2]->errorCode.code); EXPECT_EQ(0, res.responseVector[2]->errorCode.reasonPhrase.size()); @@ -1505,7 +1464,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternMultiAttr) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1518,7 +1476,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternMultiAttr) ASSERT_EQ(1, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A4", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA4", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -1583,7 +1540,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternMultiEntityAttrs) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1596,7 +1552,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternMultiEntityAttrs) ASSERT_EQ(1, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A4", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA4", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -1609,7 +1564,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternMultiEntityAttrs) ASSERT_EQ(1, RES_CNTX_REG(2).contextRegistrationAttributeVector.size()); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(2, 0)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(2, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(2, 0)->isDomain); EXPECT_EQ("http://cr3.com", RES_CNTX_REG(2).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[2]->errorCode.code); EXPECT_EQ(0, res.responseVector[2]->errorCode.reasonPhrase.size()); @@ -1672,7 +1626,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternNoType) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1686,7 +1639,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternNoType) ASSERT_EQ(1, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -1700,7 +1652,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternNoType) ASSERT_EQ(1, RES_CNTX_REG(2).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(2, 0)->name); EXPECT_EQ("TA1bis", RES_CNTX_REG_ATTR(2, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(2, 0)->isDomain); EXPECT_EQ("http://cr4.com", RES_CNTX_REG(2).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[2]->errorCode.code); EXPECT_EQ(0, res.responseVector[2]->errorCode.reasonPhrase.size()); @@ -1714,7 +1665,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, noPatternNoType) ASSERT_EQ(1, RES_CNTX_REG(3).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(3, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(3, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(3, 0)->isDomain); EXPECT_EQ("http://cr5.com", RES_CNTX_REG(3).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[3]->errorCode.code); EXPECT_EQ(0, res.responseVector[3]->errorCode.reasonPhrase.size()); @@ -1777,13 +1727,10 @@ TEST(mongoDiscoverContextAvailabilityRequest, pattern0Attr) ASSERT_EQ(3, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(0, 1)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(0, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 1)->isDomain); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(0, 2)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(0, 2)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 2)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_STREQ("", res.responseVector[0]->errorCode.reasonPhrase.c_str()); @@ -1797,10 +1744,8 @@ TEST(mongoDiscoverContextAvailabilityRequest, pattern0Attr) ASSERT_EQ(2, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(1, 1)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(1, 1)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 1)->isDomain); EXPECT_EQ("http://cr3.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -1856,7 +1801,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, pattern1AttrSingle) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A4", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA4", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1916,7 +1860,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, pattern1AttrMulti) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -1930,7 +1873,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, pattern1AttrMulti) ASSERT_EQ(1, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -1992,10 +1934,8 @@ TEST(mongoDiscoverContextAvailabilityRequest, patternNAttr) ASSERT_EQ(2, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(0, 1)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(0, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 1)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -2009,7 +1949,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, patternNAttr) ASSERT_EQ(1, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -2023,7 +1962,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, patternNAttr) ASSERT_EQ(1, RES_CNTX_REG(2).contextRegistrationAttributeVector.size()); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(2, 0)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(2, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(2, 0)->isDomain); EXPECT_EQ("http://cr3.com", RES_CNTX_REG(2).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[2]->errorCode.code); EXPECT_EQ(0, res.responseVector[2]->errorCode.reasonPhrase.size()); @@ -2130,7 +2068,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, patternNoType) ASSERT_EQ(1, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -2144,7 +2081,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, patternNoType) ASSERT_EQ(1, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("http://cr3.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -2158,7 +2094,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, patternNoType) ASSERT_EQ(1, RES_CNTX_REG(2).contextRegistrationAttributeVector.size()); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(2, 0)->name); EXPECT_EQ("TA2bis", RES_CNTX_REG_ATTR(2, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(2, 0)->isDomain); EXPECT_EQ("http://cr4.com", RES_CNTX_REG(2).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[2]->errorCode.code); EXPECT_EQ(0, res.responseVector[2]->errorCode.reasonPhrase.size()); @@ -2172,7 +2107,6 @@ TEST(mongoDiscoverContextAvailabilityRequest, patternNoType) ASSERT_EQ(1, RES_CNTX_REG(3).contextRegistrationAttributeVector.size()); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(3, 0)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(3, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(3, 0)->isDomain); EXPECT_EQ("http://cr5.com", RES_CNTX_REG(3).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[3]->errorCode.code); EXPECT_EQ(0, res.responseVector[3]->errorCode.reasonPhrase.size()); @@ -2238,13 +2172,10 @@ TEST(mongoDiscoverContextAvailabilityRequest, mixPatternAndNotPattern) ASSERT_EQ(3, RES_CNTX_REG(0).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(0, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(0, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 0)->isDomain); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(0, 1)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(0, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(0, 1)->isDomain); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(0, 2)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(0, 2)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(0, 2)->isDomain); EXPECT_EQ("http://cr1.com", RES_CNTX_REG(0).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[0]->errorCode.code); EXPECT_EQ(0, res.responseVector[0]->errorCode.reasonPhrase.size()); @@ -2258,10 +2189,8 @@ TEST(mongoDiscoverContextAvailabilityRequest, mixPatternAndNotPattern) ASSERT_EQ(2, RES_CNTX_REG(1).contextRegistrationAttributeVector.size()); EXPECT_EQ("A1", RES_CNTX_REG_ATTR(1, 0)->name); EXPECT_EQ("TA1", RES_CNTX_REG_ATTR(1, 0)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(1, 0)->isDomain); EXPECT_EQ("A4", RES_CNTX_REG_ATTR(1, 1)->name); EXPECT_EQ("TA4", RES_CNTX_REG_ATTR(1, 1)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(1, 1)->isDomain); EXPECT_EQ("http://cr2.com", RES_CNTX_REG(1).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[1]->errorCode.code); EXPECT_EQ(0, res.responseVector[1]->errorCode.reasonPhrase.size()); @@ -2275,10 +2204,8 @@ TEST(mongoDiscoverContextAvailabilityRequest, mixPatternAndNotPattern) ASSERT_EQ(2, RES_CNTX_REG(2).contextRegistrationAttributeVector.size()); EXPECT_EQ("A2", RES_CNTX_REG_ATTR(2, 0)->name); EXPECT_EQ("TA2", RES_CNTX_REG_ATTR(2, 0)->type); - EXPECT_EQ("false", RES_CNTX_REG_ATTR(2, 0)->isDomain); EXPECT_EQ("A3", RES_CNTX_REG_ATTR(2, 1)->name); EXPECT_EQ("TA3", RES_CNTX_REG_ATTR(2, 1)->type); - EXPECT_EQ("true", RES_CNTX_REG_ATTR(2, 1)->isDomain); EXPECT_EQ("http://cr3.com", RES_CNTX_REG(2).providingApplication.get()); EXPECT_EQ(SccNone, res.responseVector[2]->errorCode.code); EXPECT_EQ(0, res.responseVector[2]->errorCode.reasonPhrase.size()); diff --git a/test/unittests/mongoBackend/mongoNotifyContextAvailability_test.cpp b/test/unittests/mongoBackend/mongoNotifyContextAvailability_test.cpp index 2caef2e3ee..45b4235cce 100644 --- a/test/unittests/mongoBackend/mongoNotifyContextAvailability_test.cpp +++ b/test/unittests/mongoBackend/mongoNotifyContextAvailability_test.cpp @@ -277,8 +277,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_En1_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", "T1"); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&en); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -319,10 +319,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_En1_AtN_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -347,8 +345,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_En1_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", "T1"); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&en); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -389,10 +387,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_En1_AtNnt_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -417,8 +413,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_En1nt_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", ""); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&en); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -459,10 +455,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_En1nt_AtN_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -487,8 +481,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_En1nt_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", ""); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&en); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -529,10 +523,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_En1nt_AtNnt_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -686,8 +678,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_EnN_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", "T1"); EntityId en2("E2", "T2"); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&en1); crr.contextRegistration.entityIdVector.push_back(&en2); @@ -732,10 +724,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_EnN_AtN_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -761,8 +751,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_EnN_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", "T1"); EntityId en2("E2", "T2"); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&en1); crr.contextRegistration.entityIdVector.push_back(&en2); @@ -807,10 +797,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_EnN_AtNnt_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -836,8 +824,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_EnNnt_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", ""); EntityId en2("E2", ""); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&en1); crr.contextRegistration.entityIdVector.push_back(&en2); @@ -882,10 +870,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_EnNnt_AtN_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -911,8 +897,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_EnNnt_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", ""); EntityId en2("E2", ""); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&en1); crr.contextRegistration.entityIdVector.push_back(&en2); @@ -957,10 +943,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ce1_EnNnt_AtNnt_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1132,10 +1116,10 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", "T1"); EntityId en2("E2", "T2"); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); - ContextRegistrationAttribute cra3("A3", "TA3", "false"); - ContextRegistrationAttribute cra4("A4", "TA4", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&en1); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1183,10 +1167,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1201,10 +1183,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA4", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1230,10 +1210,10 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", "T1"); EntityId en2("E2", "T2"); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); - ContextRegistrationAttribute cra3("A3", "", "false"); - ContextRegistrationAttribute cra4("A4", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); + ContextRegistrationAttribute cra3("A3", ""); + ContextRegistrationAttribute cra4("A4", ""); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&en1); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1281,10 +1261,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1299,10 +1277,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1328,10 +1304,10 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1nt_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", ""); EntityId en2("E2", ""); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); - ContextRegistrationAttribute cra3("A3", "TA3", "false"); - ContextRegistrationAttribute cra4("A4", "TA4", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&en1); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1379,10 +1355,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1nt_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1397,10 +1371,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1nt_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA4", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1426,10 +1398,10 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1nt_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", ""); EntityId en2("E2", ""); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); - ContextRegistrationAttribute cra3("A3", "", "false"); - ContextRegistrationAttribute cra4("A4", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); + ContextRegistrationAttribute cra3("A3", ""); + ContextRegistrationAttribute cra4("A4", ""); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&en1); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1477,10 +1449,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1nt_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1495,10 +1465,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_En1nt_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1694,10 +1662,10 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnN_AtN_Ok) EntityId en2("E2", "T2"); EntityId en3("E3", "T3"); EntityId en4("E4", "T4"); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); - ContextRegistrationAttribute cra3("A3", "TA3", "false"); - ContextRegistrationAttribute cra4("A4", "TA4", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&en1); crr1.contextRegistration.entityIdVector.push_back(&en2); @@ -1750,10 +1718,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnN_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1771,10 +1737,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnN_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA4", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1802,10 +1766,10 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnN_AtNnt_Ok) EntityId en2("E2", "T2"); EntityId en3("E3", "T3"); EntityId en4("E4", "T4"); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); - ContextRegistrationAttribute cra3("A3", "", "false"); - ContextRegistrationAttribute cra4("A4", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); + ContextRegistrationAttribute cra3("A3", ""); + ContextRegistrationAttribute cra4("A4", ""); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&en1); crr1.contextRegistration.entityIdVector.push_back(&en2); @@ -1858,10 +1822,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnN_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1879,10 +1841,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnN_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1910,10 +1870,10 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnNnt_AtN_Ok) EntityId en2("E2", ""); EntityId en3("E3", ""); EntityId en4("E4", ""); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); - ContextRegistrationAttribute cra3("A3", "TA3", "false"); - ContextRegistrationAttribute cra4("A4", "TA4", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&en1); crr1.contextRegistration.entityIdVector.push_back(&en2); @@ -1966,10 +1926,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnNnt_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1987,10 +1945,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnNnt_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA4", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -2018,10 +1974,10 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnNnt_AtNnt_Ok) EntityId en2("E2", ""); EntityId en3("E3", ""); EntityId en4("E4", ""); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); - ContextRegistrationAttribute cra3("A3", "", "false"); - ContextRegistrationAttribute cra4("A4", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); + ContextRegistrationAttribute cra3("A3", ""); + ContextRegistrationAttribute cra4("A4", ""); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&en1); crr1.contextRegistration.entityIdVector.push_back(&en2); @@ -2074,10 +2030,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnNnt_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -2095,10 +2049,8 @@ TEST(mongoNotifyContextAvailabilityRequest, ceN_EnNnt_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); diff --git a/test/unittests/mongoBackend/mongoRegisterContext_test.cpp b/test/unittests/mongoBackend/mongoRegisterContext_test.cpp index fdcee90606..b02dffe5b8 100644 --- a/test/unittests/mongoBackend/mongoRegisterContext_test.cpp +++ b/test/unittests/mongoBackend/mongoRegisterContext_test.cpp @@ -347,8 +347,8 @@ TEST(mongoRegisterContextRequest, ce1_En1_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", "T1"); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra1); @@ -392,10 +392,8 @@ TEST(mongoRegisterContextRequest, ce1_En1_AtN_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -422,8 +420,8 @@ TEST(mongoRegisterContextRequest, ce1_En1_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", "T1"); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra1); @@ -467,10 +465,8 @@ TEST(mongoRegisterContextRequest, ce1_En1_AtNnt_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -498,8 +494,8 @@ TEST(mongoRegisterContextRequest, ce1_En1nt_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", ""); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra1); @@ -543,10 +539,8 @@ TEST(mongoRegisterContextRequest, ce1_En1nt_AtN_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); utExit(); } @@ -565,8 +559,8 @@ TEST(mongoRegisterContextRequest, ce1_En1nt_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", ""); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra1); @@ -610,10 +604,8 @@ TEST(mongoRegisterContextRequest, ce1_En1nt_AtNnt_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -777,8 +769,8 @@ TEST(mongoRegisterContextRequest, ce1_EnN_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", "T1"); EntityId en2("E2", "T2"); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistration cr; cr.entityIdVector.push_back(&en1); cr.entityIdVector.push_back(&en2); @@ -827,10 +819,8 @@ TEST(mongoRegisterContextRequest, ce1_EnN_AtN_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -858,8 +848,8 @@ TEST(mongoRegisterContextRequest, ce1_EnN_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", "T1"); EntityId en2("E2", "T2"); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); ContextRegistration cr; cr.entityIdVector.push_back(&en1); cr.entityIdVector.push_back(&en2); @@ -908,10 +898,8 @@ TEST(mongoRegisterContextRequest, ce1_EnN_AtNnt_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -939,8 +927,8 @@ TEST(mongoRegisterContextRequest, ce1_EnNnt_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", ""); EntityId en2("E2", ""); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistration cr; cr.entityIdVector.push_back(&en1); cr.entityIdVector.push_back(&en2); @@ -989,10 +977,8 @@ TEST(mongoRegisterContextRequest, ce1_EnNnt_AtN_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1020,8 +1006,8 @@ TEST(mongoRegisterContextRequest, ce1_EnNnt_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", ""); EntityId en2("E2", ""); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); ContextRegistration cr; cr.entityIdVector.push_back(&en1); cr.entityIdVector.push_back(&en2); @@ -1070,10 +1056,8 @@ TEST(mongoRegisterContextRequest, ce1_EnNnt_AtNnt_Ok) BSONObj rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1255,10 +1239,10 @@ TEST(mongoRegisterContextRequest, ceN_En1_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", "T1"); EntityId en2("E2", "T2"); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); - ContextRegistrationAttribute cra3("A3", "TA3", "false"); - ContextRegistrationAttribute cra4("A4", "TA4", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistration cr1, cr2; cr1.entityIdVector.push_back(&en1); cr1.contextRegistrationAttributeVector.push_back(&cra1); @@ -1308,10 +1292,8 @@ TEST(mongoRegisterContextRequest, ceN_En1_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1326,10 +1308,8 @@ TEST(mongoRegisterContextRequest, ceN_En1_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA4", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1357,10 +1337,10 @@ TEST(mongoRegisterContextRequest, ceN_En1_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", "T1"); EntityId en2("E2", "T2"); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); - ContextRegistrationAttribute cra3("A3", "", "false"); - ContextRegistrationAttribute cra4("A4", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); + ContextRegistrationAttribute cra3("A3", ""); + ContextRegistrationAttribute cra4("A4", ""); ContextRegistration cr1, cr2; cr1.entityIdVector.push_back(&en1); cr1.contextRegistrationAttributeVector.push_back(&cra1); @@ -1410,10 +1390,8 @@ TEST(mongoRegisterContextRequest, ceN_En1_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1428,10 +1406,8 @@ TEST(mongoRegisterContextRequest, ceN_En1_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1459,10 +1435,10 @@ TEST(mongoRegisterContextRequest, ceN_En1nt_AtN_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", ""); EntityId en2("E2", ""); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); - ContextRegistrationAttribute cra3("A3", "TA3", "false"); - ContextRegistrationAttribute cra4("A4", "TA4", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistration cr1, cr2; cr1.entityIdVector.push_back(&en1); cr1.contextRegistrationAttributeVector.push_back(&cra1); @@ -1512,10 +1488,8 @@ TEST(mongoRegisterContextRequest, ceN_En1nt_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1530,10 +1504,8 @@ TEST(mongoRegisterContextRequest, ceN_En1nt_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA4", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1561,10 +1533,10 @@ TEST(mongoRegisterContextRequest, ceN_En1nt_AtNnt_Ok) /* Forge the request (from "inside" to "outside") */ EntityId en1("E1", ""); EntityId en2("E2", ""); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); - ContextRegistrationAttribute cra3("A3", "", "false"); - ContextRegistrationAttribute cra4("A4", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); + ContextRegistrationAttribute cra3("A3", ""); + ContextRegistrationAttribute cra4("A4", ""); ContextRegistration cr1, cr2; cr1.entityIdVector.push_back(&en1); cr1.contextRegistrationAttributeVector.push_back(&cra1); @@ -1614,10 +1586,8 @@ TEST(mongoRegisterContextRequest, ceN_En1nt_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1632,10 +1602,8 @@ TEST(mongoRegisterContextRequest, ceN_En1nt_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1841,10 +1809,10 @@ TEST(mongoRegisterContextRequest, ceN_EnN_AtN_Ok) EntityId en2("E2", "T2"); EntityId en3("E3", "T3"); EntityId en4("E4", "T4"); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); - ContextRegistrationAttribute cra3("A3", "TA3", "false"); - ContextRegistrationAttribute cra4("A4", "TA4", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistration cr1, cr2; cr1.entityIdVector.push_back(&en1); cr1.entityIdVector.push_back(&en2); @@ -1899,10 +1867,8 @@ TEST(mongoRegisterContextRequest, ceN_EnN_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -1920,10 +1886,8 @@ TEST(mongoRegisterContextRequest, ceN_EnN_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA4", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -1953,10 +1917,10 @@ TEST(mongoRegisterContextRequest, ceN_EnN_AtNnt_Ok) EntityId en2("E2", "T2"); EntityId en3("E3", "T3"); EntityId en4("E4", "T4"); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); - ContextRegistrationAttribute cra3("A3", "", "false"); - ContextRegistrationAttribute cra4("A4", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); + ContextRegistrationAttribute cra3("A3", ""); + ContextRegistrationAttribute cra4("A4", ""); ContextRegistration cr1, cr2; cr1.entityIdVector.push_back(&en1); cr1.entityIdVector.push_back(&en2); @@ -2011,10 +1975,8 @@ TEST(mongoRegisterContextRequest, ceN_EnN_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -2032,10 +1994,8 @@ TEST(mongoRegisterContextRequest, ceN_EnN_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -2065,10 +2025,10 @@ TEST(mongoRegisterContextRequest, ceN_EnNnt_AtN_Ok) EntityId en2("E2", ""); EntityId en3("E3", ""); EntityId en4("E4", ""); - ContextRegistrationAttribute cra1("A1", "TA1", "false"); - ContextRegistrationAttribute cra2("A2", "TA2", "true"); - ContextRegistrationAttribute cra3("A3", "TA3", "false"); - ContextRegistrationAttribute cra4("A4", "TA4", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistration cr1, cr2; cr1.entityIdVector.push_back(&en1); cr1.entityIdVector.push_back(&en2); @@ -2123,10 +2083,8 @@ TEST(mongoRegisterContextRequest, ceN_EnNnt_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -2144,10 +2102,8 @@ TEST(mongoRegisterContextRequest, ceN_EnNnt_AtN_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("TA4", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -2177,10 +2133,10 @@ TEST(mongoRegisterContextRequest, ceN_EnNnt_AtNnt_Ok) EntityId en2("E2", ""); EntityId en3("E3", ""); EntityId en4("E4", ""); - ContextRegistrationAttribute cra1("A1", "", "false"); - ContextRegistrationAttribute cra2("A2", "", "true"); - ContextRegistrationAttribute cra3("A3", "", "false"); - ContextRegistrationAttribute cra4("A4", "", "true"); + ContextRegistrationAttribute cra1("A1", ""); + ContextRegistrationAttribute cra2("A2", ""); + ContextRegistrationAttribute cra3("A3", ""); + ContextRegistrationAttribute cra4("A4", ""); ContextRegistration cr1, cr2; cr1.entityIdVector.push_back(&en1); cr1.entityIdVector.push_back(&en2); @@ -2235,10 +2191,8 @@ TEST(mongoRegisterContextRequest, ceN_EnNnt_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); EXPECT_STREQ("http://dummy2.com", C_STR_FIELD(contextRegistration, "providingApplication")); @@ -2256,10 +2210,8 @@ TEST(mongoRegisterContextRequest, ceN_EnNnt_AtNnt_Ok) rattr1 = regAttrs[1].embeddedObject(); EXPECT_STREQ("A3", C_STR_FIELD(rattr0, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr0, "type")); - EXPECT_STREQ("false", C_STR_FIELD(rattr0, "isDomain")); EXPECT_STREQ("A4", C_STR_FIELD(rattr1, "name")); EXPECT_STREQ("", C_STR_FIELD(rattr1, "type")); - EXPECT_STREQ("true", C_STR_FIELD(rattr1, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -2360,7 +2312,7 @@ TEST(mongoRegisterContextRequest, NotifyContextAvailability2) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar1, expectedNcar2; EntityId mockEn1("E5", "T5", "false"); - ContextRegistrationAttribute mockCra("A1", "TA1", "false"); + ContextRegistrationAttribute mockCra("A1", "TA1"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn1); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&mockCra); @@ -2393,7 +2345,7 @@ TEST(mongoRegisterContextRequest, NotifyContextAvailability2) /* Forge the request (from "inside" to "outside") */ EntityId en("E5", "T5", "false"); - ContextRegistrationAttribute cra("A1", "TA1", "false"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra); @@ -2439,7 +2391,7 @@ TEST(mongoRegisterContextRequest, NotifyContextAvailability3) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E5", "T5", "false"); - ContextRegistrationAttribute mockCra("A2", "TA2", "false"); + ContextRegistrationAttribute mockCra("A2", "TA2"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn1); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&mockCra); @@ -2470,7 +2422,7 @@ TEST(mongoRegisterContextRequest, NotifyContextAvailability3) /* Forge the request (from "inside" to "outside") */ EntityId en("E5", "T5", "false"); - ContextRegistrationAttribute cra("A2", "TA2", "false"); + ContextRegistrationAttribute cra("A2", "TA2"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra); diff --git a/test/unittests/mongoBackend/mongoRegisterContext_update_test.cpp b/test/unittests/mongoBackend/mongoRegisterContext_update_test.cpp index 905d616938..d7d98d2e1a 100644 --- a/test/unittests/mongoBackend/mongoRegisterContext_update_test.cpp +++ b/test/unittests/mongoBackend/mongoRegisterContext_update_test.cpp @@ -107,21 +107,21 @@ static void prepareDatabase(void) "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr1.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1"))); BSONObj cr3 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1"))); BSONObjBuilder reg1; @@ -174,7 +174,7 @@ TEST(mongoRegisterContext_update, updateCase1) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", "T1"); - ContextRegistrationAttribute cra("A1", "TA1", "true"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra); @@ -223,7 +223,6 @@ TEST(mongoRegisterContext_update, updateCase1) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); /* reg #2 (untouched) */ reg = connection->findOne(REGISTRATIONS_COLL, BSON("_id" << OID("51307b66f481db11bf860002"))); @@ -246,7 +245,6 @@ TEST(mongoRegisterContext_update, updateCase1) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); @@ -262,7 +260,6 @@ TEST(mongoRegisterContext_update, updateCase1) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -289,7 +286,7 @@ TEST(mongoRegisterContext_update, updateCase2) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", "T1"); - ContextRegistrationAttribute cra("A1", "TA1", "true"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra); @@ -339,13 +336,10 @@ TEST(mongoRegisterContext_update, updateCase2) attr2 = attrs[2].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(attr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(attr1, "type")); - EXPECT_STREQ("false", C_STR_FIELD(attr1, "isDomain")); EXPECT_STREQ("A3", C_STR_FIELD(attr2, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(attr2, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr2, "isDomain")); /* reg #2 */ reg = connection->findOne(REGISTRATIONS_COLL, BSON("_id" << OID("51307b66f481db11bf860002"))); @@ -368,7 +362,6 @@ TEST(mongoRegisterContext_update, updateCase2) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -395,7 +388,7 @@ TEST(mongoRegisterContext_update, updateNotFound) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", "T1"); - ContextRegistrationAttribute cra("A1", "TA1", "true"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra); @@ -445,13 +438,10 @@ TEST(mongoRegisterContext_update, updateNotFound) attr2 = attrs[2].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(attr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(attr1, "type")); - EXPECT_STREQ("false", C_STR_FIELD(attr1, "isDomain")); EXPECT_STREQ("A3", C_STR_FIELD(attr2, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(attr2, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr2, "isDomain")); /* reg #2 (untouched) */ reg = connection->findOne(REGISTRATIONS_COLL, BSON("_id" << OID("51307b66f481db11bf860002"))); @@ -474,7 +464,6 @@ TEST(mongoRegisterContext_update, updateNotFound) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); @@ -490,7 +479,6 @@ TEST(mongoRegisterContext_update, updateNotFound) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -517,7 +505,7 @@ TEST(mongoRegisterContext_update, updateWrongIdString) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", "T1"); - ContextRegistrationAttribute cra("A1", "TA1", "true"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra); @@ -567,13 +555,10 @@ TEST(mongoRegisterContext_update, updateWrongIdString) attr2 = attrs[2].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(attr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(attr1, "type")); - EXPECT_STREQ("false", C_STR_FIELD(attr1, "isDomain")); EXPECT_STREQ("A3", C_STR_FIELD(attr2, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(attr2, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr2, "isDomain")); /* reg #2 (untouched) */ reg = connection->findOne(REGISTRATIONS_COLL, BSON("_id" << OID("51307b66f481db11bf860002"))); @@ -596,7 +581,6 @@ TEST(mongoRegisterContext_update, updateWrongIdString) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); @@ -612,7 +596,6 @@ TEST(mongoRegisterContext_update, updateWrongIdString) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -641,7 +624,7 @@ TEST(DISABLED_mongoRegisterContext_update, updateWrongIdNoHex) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", "T1"); - ContextRegistrationAttribute cra("A1", "TA1", "true"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra); @@ -691,13 +674,10 @@ TEST(DISABLED_mongoRegisterContext_update, updateWrongIdNoHex) attr2 = attrs[2].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(attr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(attr1, "type")); - EXPECT_STREQ("false", C_STR_FIELD(attr1, "isDomain")); EXPECT_STREQ("A3", C_STR_FIELD(attr2, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(attr2, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr2, "isDomain")); /* reg #2 (untouched) */ reg = connection->findOne(REGISTRATIONS_COLL, BSON("_id" << OID("51307b66f481db11bf860002"))); @@ -720,7 +700,6 @@ TEST(DISABLED_mongoRegisterContext_update, updateWrongIdNoHex) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); @@ -736,7 +715,6 @@ TEST(DISABLED_mongoRegisterContext_update, updateWrongIdNoHex) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); /* Check response is as expected */ EXPECT_EQ(SccOk, ms); @@ -771,7 +749,7 @@ TEST(mongoRegisterContext_update, MongoDbFindOneFail) /* Forge the request (from "inside" to "outside") */ EntityId en("E1", "T1"); - ContextRegistrationAttribute cra("A1", "TA1", "true"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra); @@ -839,13 +817,10 @@ TEST(mongoRegisterContext_update, MongoDbFindOneFail) attr2 = attrs[2].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); EXPECT_STREQ("A2", C_STR_FIELD(attr1, "name")); EXPECT_STREQ("TA2", C_STR_FIELD(attr1, "type")); - EXPECT_STREQ("false", C_STR_FIELD(attr1, "isDomain")); EXPECT_STREQ("A3", C_STR_FIELD(attr2, "name")); EXPECT_STREQ("TA3", C_STR_FIELD(attr2, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr2, "isDomain")); /* reg #2 (untouched) */ reg = connectionDb->findOne(REGISTRATIONS_COLL, BSON("_id" << OID("51307b66f481db11bf860002"))); @@ -868,7 +843,6 @@ TEST(mongoRegisterContext_update, MongoDbFindOneFail) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); contextRegistration = contextRegistrationV[1].embeddedObject(); @@ -884,7 +858,6 @@ TEST(mongoRegisterContext_update, MongoDbFindOneFail) attr0 = attrs[0].embeddedObject(); EXPECT_STREQ("A1", C_STR_FIELD(attr0, "name")); EXPECT_STREQ("TA1", C_STR_FIELD(attr0, "type")); - EXPECT_STREQ("true", C_STR_FIELD(attr0, "isDomain")); utExit(); } @@ -976,7 +949,7 @@ TEST(mongoRegisterContext_update, NotifyContextAvailability2) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar1, expectedNcar2; EntityId mockEn1("E5", "T5", "false"); - ContextRegistrationAttribute mockCra("A1", "TA1", "false"); + ContextRegistrationAttribute mockCra("A1", "TA1"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn1); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&mockCra); @@ -1005,7 +978,7 @@ TEST(mongoRegisterContext_update, NotifyContextAvailability2) /* Forge the request (from "inside" to "outside") */ EntityId en("E5", "T5", "false"); - ContextRegistrationAttribute cra("A1", "TA1", "false"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra); @@ -1052,7 +1025,7 @@ TEST(mongoRegisterContext_update, NotifyContextAvailability3) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E5", "T5", "false"); - ContextRegistrationAttribute mockCra("A2", "TA2", "false"); + ContextRegistrationAttribute mockCra("A2", "TA2"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn1); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&mockCra); @@ -1078,7 +1051,7 @@ TEST(mongoRegisterContext_update, NotifyContextAvailability3) /* Forge the request (from "inside" to "outside") */ EntityId en("E5", "T5", "false"); - ContextRegistrationAttribute cra("A2", "TA2", "false"); + ContextRegistrationAttribute cra("A2", "TA2"); ContextRegistration cr; cr.entityIdVector.push_back(&en); cr.contextRegistrationAttributeVector.push_back(&cra); diff --git a/test/unittests/mongoBackend/mongoSubscribeContextAvailability_test.cpp b/test/unittests/mongoBackend/mongoSubscribeContextAvailability_test.cpp index 8fc28c85cb..7ea2c7a73f 100644 --- a/test/unittests/mongoBackend/mongoSubscribeContextAvailability_test.cpp +++ b/test/unittests/mongoBackend/mongoSubscribeContextAvailability_test.cpp @@ -144,35 +144,35 @@ static void prepareDatabase(void) BSON("id" << "E2" << "type" << "T2") << BSON("id" << "E3" << "type" << "T3")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A4" << "type" << "TA4" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A4" << "type" << "TA4"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T2")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1bis")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1bis" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1bis"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY( BSON("id" << "E1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1"))); /* 1879048191 corresponds to year 2029 so we avoid any expiration problem in the next 16 years :) */ BSONObj reg1 = BSON( @@ -238,35 +238,35 @@ static void prepareDatabasePatternTrue(void) BSON("id" << "E2" << "type" << "T") << BSON("id" << "E3" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A4" << "type" << "TA4" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A4" << "type" << "TA4"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "Tbis")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2bis" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "TA2bis"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY( BSON("id" << "E3")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "TA2"))); /* 1879048191 corresponds to year 2029 so we avoid any expiration problem in the next 16 years :) */ BSONObj reg1 = BSON( @@ -760,9 +760,9 @@ TEST(mongoSubscribeContextAvailability, noPatternAttrsAll) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E3", "T3", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -850,9 +850,9 @@ TEST(mongoSubscribeContextAvailability, noPatternAttrsAll_JSON) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E3", "T3", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -940,7 +940,7 @@ TEST(mongoSubscribeContextAvailability, noPatternAttrOneSingle) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E1", "T1", "false"); - ContextRegistrationAttribute cra("A4", "TA4", "false"); + ContextRegistrationAttribute cra("A4", "TA4"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra); @@ -1033,7 +1033,7 @@ TEST(mongoSubscribeContextAvailability, noPatternAttrOneMulti) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E1", "T1", "false"); - ContextRegistrationAttribute cra("A1", "TA1", "true"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra); @@ -1126,8 +1126,8 @@ TEST(mongoSubscribeContextAvailability, noPatternAttrsSubset) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E3", "T3", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1219,10 +1219,10 @@ TEST(mongoSubscribeContextAvailability, noPatternSeveralCREs) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E1", "T1", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); - ContextRegistrationAttribute cra4("A4", "TA4", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1316,9 +1316,9 @@ TEST(mongoSubscribeContextAvailability, noPatternSeveralRegistrations) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E2", "T2", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1414,10 +1414,10 @@ TEST(mongoSubscribeContextAvailability, noPatternMultiEntity) NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E1", "T1", "false"); EntityId mockEn2("E2", "T2", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); - ContextRegistrationAttribute cra4("A4", "TA4", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistrationResponse crr1, crr2, crr3; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -1523,8 +1523,8 @@ TEST(mongoSubscribeContextAvailability, noPatternMultiAttr) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E1", "T1", "false"); - ContextRegistrationAttribute cra1("A3", "TA3", "true"); - ContextRegistrationAttribute cra2("A4", "TA4", "false"); + ContextRegistrationAttribute cra1("A3", "TA3"); + ContextRegistrationAttribute cra2("A4", "TA4"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1623,8 +1623,8 @@ TEST(mongoSubscribeContextAvailability, noPatternMultiEntityAttrs) NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E1", "T1", "false"); EntityId mockEn2("E2", "T2", "false"); - ContextRegistrationAttribute cra1("A3", "TA3", "true"); - ContextRegistrationAttribute cra2("A4", "TA4", "false"); + ContextRegistrationAttribute cra1("A3", "TA3"); + ContextRegistrationAttribute cra2("A4", "TA4"); ContextRegistrationResponse crr1, crr2, crr3; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -1740,8 +1740,8 @@ TEST(mongoSubscribeContextAvailability, noPatternNoType) EntityId mockEn1("E1", "T1", "false"); EntityId mockEn2("E1", "T1bis", "false"); EntityId mockEn3("E1", "", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A1", "TA1bis", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A1", "TA1bis"); ContextRegistrationResponse crr1, crr2, crr3, crr4; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1846,9 +1846,9 @@ TEST(mongoSubscribeContextAvailability, pattern0Attr) NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E2", "T", "false"); EntityId mockEn2("E3", "T", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -1941,7 +1941,7 @@ TEST(mongoSubscribeContextAvailability, pattern1AttrSingle) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E1", "T", "false"); - ContextRegistrationAttribute cra("A4", "TA4", "false"); + ContextRegistrationAttribute cra("A4", "TA4"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra); @@ -2030,7 +2030,7 @@ TEST(mongoSubscribeContextAvailability, pattern1AttrMulti) NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E1", "T", "false"); EntityId mockEn2("E2", "T", "false"); - ContextRegistrationAttribute cra("A1", "TA1", "true"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -2125,8 +2125,8 @@ TEST(mongoSubscribeContextAvailability, patternNAttr) NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E1", "T", "false"); EntityId mockEn2("E2", "T", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistrationResponse crr1, crr2, crr3; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -2235,8 +2235,8 @@ TEST(mongoSubscribeContextAvailability, patternNoType) EntityId mockEn2("E3", "T", "false"); EntityId mockEn3("E2", "Tbis", "false"); EntityId mockEn4("E3", "", "false"); - ContextRegistrationAttribute cra1("A2", "TA2", "false"); - ContextRegistrationAttribute cra2("A2", "TA2bis", "false"); + ContextRegistrationAttribute cra1("A2", "TA2"); + ContextRegistrationAttribute cra2("A2", "TA2bis"); ContextRegistrationResponse crr1, crr2, crr3, crr4; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -2340,10 +2340,10 @@ TEST(mongoSubscribeContextAvailability, mixPatternAndNotPattern) EntityId mockEn1("E1", "T", "false"); EntityId mockEn2("E2", "T", "false"); EntityId mockEn3("E3", "T", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); - ContextRegistrationAttribute cra4("A4", "TA4", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistrationResponse crr1, crr2, crr3; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); diff --git a/test/unittests/mongoBackend/mongoUpdateContextAvailabilitySubscription_test.cpp b/test/unittests/mongoBackend/mongoUpdateContextAvailabilitySubscription_test.cpp index 63f8b99f13..97e7c2dd98 100644 --- a/test/unittests/mongoBackend/mongoUpdateContextAvailabilitySubscription_test.cpp +++ b/test/unittests/mongoBackend/mongoUpdateContextAvailabilitySubscription_test.cpp @@ -156,35 +156,35 @@ static void prepareDatabase(void) BSON("id" << "E2" << "type" << "T2") << BSON("id" << "E3" << "type" << "T3")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A4" << "type" << "TA4" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A4" << "type" << "TA4"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T2")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T1bis")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1bis" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1bis"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY( BSON("id" << "E1")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1"))); /* 1879048191 corresponds to year 2029 so we avoid any expiration problem in the next 16 years :) */ BSONObj reg1 = BSON( @@ -267,35 +267,35 @@ static void prepareDatabasePatternTrue(void) BSON("id" << "E2" << "type" << "T") << BSON("id" << "E3" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr2 = BSON("providingApplication" << "http://cr2.com" << "entities" << BSON_ARRAY( BSON("id" << "E1" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A1" << "type" << "TA1" << "isDomain" << "true") << - BSON("name" << "A4" << "type" << "TA4" << "isDomain" << "false"))); + BSON("name" << "A1" << "type" << "TA1") << + BSON("name" << "A4" << "type" << "TA4"))); BSONObj cr3 = BSON("providingApplication" << "http://cr3.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "T")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false") << - BSON("name" << "A3" << "type" << "TA3" << "isDomain" << "true"))); + BSON("name" << "A2" << "type" << "TA2") << + BSON("name" << "A3" << "type" << "TA3"))); BSONObj cr4 = BSON("providingApplication" << "http://cr4.com" << "entities" << BSON_ARRAY( BSON("id" << "E2" << "type" << "Tbis")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2bis" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "TA2bis"))); BSONObj cr5 = BSON("providingApplication" << "http://cr5.com" << "entities" << BSON_ARRAY( BSON("id" << "E3")) << "attrs" << BSON_ARRAY( - BSON("name" << "A2" << "type" << "TA2" << "isDomain" << "false"))); + BSON("name" << "A2" << "type" << "TA2"))); /* 1879048191 corresponds to year 2029 so we avoid any expiration problem in the next 16 years :) */ BSONObj reg1 = BSON( @@ -800,9 +800,9 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternAttrsAll) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E3", "T3", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -889,9 +889,9 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternAttrsAll_JSON) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E3", "T3", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -978,7 +978,7 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternAttrOneSingle) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E1", "T1", "false"); - ContextRegistrationAttribute cra("A4", "TA4", "false"); + ContextRegistrationAttribute cra("A4", "TA4"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra); @@ -1070,7 +1070,7 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternAttrOneMulti) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E1", "T1", "false"); - ContextRegistrationAttribute cra("A1", "TA1", "true"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra); @@ -1162,8 +1162,8 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternAttrsSubset) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E3", "T3", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1254,10 +1254,10 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternSeveralCREs) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E1", "T1", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); - ContextRegistrationAttribute cra4("A4", "TA4", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1350,9 +1350,9 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternSeveralRegistrations) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E2", "T2", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1447,10 +1447,10 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternMultiEntity) NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E1", "T1", "false"); EntityId mockEn2("E2", "T2", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); - ContextRegistrationAttribute cra4("A4", "TA4", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistrationResponse crr1, crr2, crr3; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -1555,8 +1555,8 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternMultiAttr) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E1", "T1", "false"); - ContextRegistrationAttribute cra1("A3", "TA3", "true"); - ContextRegistrationAttribute cra2("A4", "TA4", "false"); + ContextRegistrationAttribute cra1("A3", "TA3"); + ContextRegistrationAttribute cra2("A4", "TA4"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1654,8 +1654,8 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternMultiEntityAttrs) NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E1", "T1", "false"); EntityId mockEn2("E2", "T2", "false"); - ContextRegistrationAttribute cra1("A3", "TA3", "true"); - ContextRegistrationAttribute cra2("A4", "TA4", "false"); + ContextRegistrationAttribute cra1("A3", "TA3"); + ContextRegistrationAttribute cra2("A4", "TA4"); ContextRegistrationResponse crr1, crr2, crr3; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -1770,8 +1770,8 @@ TEST(mongoUpdateContextAvailabilitySubscription, noPatternNoType) EntityId mockEn1("E1", "T1", "false"); EntityId mockEn2("E1", "T1bis", "false"); EntityId mockEn3("E1", "", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A1", "TA1bis", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A1", "TA1bis"); ContextRegistrationResponse crr1, crr2, crr3, crr4; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); @@ -1875,9 +1875,9 @@ TEST(mongoUpdateContextAvailabilitySubscription, pattern0Attr) NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E2", "T", "false"); EntityId mockEn2("E3", "T", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -1969,7 +1969,7 @@ TEST(mongoUpdateContextAvailabilitySubscription, pattern1AttrSingle) /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E1", "T", "false"); - ContextRegistrationAttribute cra("A4", "TA4", "false"); + ContextRegistrationAttribute cra("A4", "TA4"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra); @@ -2057,7 +2057,7 @@ TEST(mongoUpdateContextAvailabilitySubscription, pattern1AttrMulti) NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E1", "T", "false"); EntityId mockEn2("E2", "T", "false"); - ContextRegistrationAttribute cra("A1", "TA1", "true"); + ContextRegistrationAttribute cra("A1", "TA1"); ContextRegistrationResponse crr1, crr2; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -2151,8 +2151,8 @@ TEST(mongoUpdateContextAvailabilitySubscription, patternNAttr) NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn1("E1", "T", "false"); EntityId mockEn2("E2", "T", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); ContextRegistrationResponse crr1, crr2, crr3; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -2260,8 +2260,8 @@ TEST(mongoUpdateContextAvailabilitySubscription, patternNoType) EntityId mockEn2("E3", "T", "false"); EntityId mockEn3("E2", "Tbis", "false"); EntityId mockEn4("E3", "", "false"); - ContextRegistrationAttribute cra1("A2", "TA2", "false"); - ContextRegistrationAttribute cra2("A2", "TA2bis", "false"); + ContextRegistrationAttribute cra1("A2", "TA2"); + ContextRegistrationAttribute cra2("A2", "TA2bis"); ContextRegistrationResponse crr1, crr2, crr3, crr4; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -2364,10 +2364,10 @@ TEST(mongoUpdateContextAvailabilitySubscription, mixPatternAndNotPattern) EntityId mockEn1("E1", "T", "false"); EntityId mockEn2("E2", "T", "false"); EntityId mockEn3("E3", "T", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); - ContextRegistrationAttribute cra4("A4", "TA4", "false"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); + ContextRegistrationAttribute cra4("A4", "TA4"); ContextRegistrationResponse crr1, crr2, crr3; crr1.contextRegistration.entityIdVector.push_back(&mockEn1); crr1.contextRegistration.entityIdVector.push_back(&mockEn2); @@ -2549,9 +2549,9 @@ TEST(mongoUpdateContextAvailabilitySubscription, updateDurationAndNoPatternAttrs /* Prepare mock */ NotifyContextAvailabilityRequest expectedNcar; EntityId mockEn("E3", "T3", "false"); - ContextRegistrationAttribute cra1("A1", "TA1", "true"); - ContextRegistrationAttribute cra2("A2", "TA2", "false"); - ContextRegistrationAttribute cra3("A3", "TA3", "true"); + ContextRegistrationAttribute cra1("A1", "TA1"); + ContextRegistrationAttribute cra2("A2", "TA2"); + ContextRegistrationAttribute cra3("A3", "TA3"); ContextRegistrationResponse crr; crr.contextRegistration.entityIdVector.push_back(&mockEn); crr.contextRegistration.contextRegistrationAttributeVector.push_back(&cra1); diff --git a/test/unittests/ngsi/AttributeExpression_test.cpp b/test/unittests/ngsi/AttributeExpression_test.cpp index 5bceb9d0b1..5b04bd3933 100644 --- a/test/unittests/ngsi/AttributeExpression_test.cpp +++ b/test/unittests/ngsi/AttributeExpression_test.cpp @@ -47,11 +47,11 @@ TEST(AttributeExpression, ok) EXPECT_STREQ("AE", ae.get().c_str()); ae.set(""); - EXPECT_STREQ("", ae.render(false).c_str()); + EXPECT_STREQ("", ae.toJsonV1(false).c_str()); ae.set("AE"); - out = ae.render(false); + out = ae.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/AttributeList_test.cpp b/test/unittests/ngsi/AttributeList_test.cpp index 6c13cc9af9..c927d63814 100644 --- a/test/unittests/ngsi/AttributeList_test.cpp +++ b/test/unittests/ngsi/AttributeList_test.cpp @@ -43,13 +43,13 @@ TEST(AttributeList, ok) utInit(); - out = al.render(false, "attributes"); + out = al.toJsonV1(false, "attributes"); EXPECT_STREQ("", out.c_str()); al.push_back("a1"); al.push_back("a2"); - out = al.render(false, "attributes"); + out = al.toJsonV1(false, "attributes"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/ConditionValueList_test.cpp b/test/unittests/ngsi/ConditionValueList_test.cpp index 92770b73f2..1cef0597d5 100644 --- a/test/unittests/ngsi/ConditionValueList_test.cpp +++ b/test/unittests/ngsi/ConditionValueList_test.cpp @@ -41,17 +41,17 @@ TEST(ConditionValueList, ok) const char* outfile1 = "ngsi.conditionValueList.ok2.middle.json"; const char* outfile2 = "ngsi.conditionValueList.ok3.middle.json"; - out = cvList.render(false); + out = cvList.toJsonV1(false); EXPECT_STREQ("", out.c_str()); cvList.push_back("cv1"); - out = cvList.render(false); + out = cvList.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); cvList.push_back("cv2"); - out = cvList.render(false); + out = cvList.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile2)) << "Error getting test data from '" << outfile2 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/ContextAttributeVector_test.cpp b/test/unittests/ngsi/ContextAttributeVector_test.cpp index 4bc8001b25..27001aaa3f 100644 --- a/test/unittests/ngsi/ContextAttributeVector_test.cpp +++ b/test/unittests/ngsi/ContextAttributeVector_test.cpp @@ -47,7 +47,7 @@ TEST(ContextAttributeVector, render) const std::vector emptyMdV; // FIXME P3: "" is a string, signature tells bool... - out = cav.render(false, UpdateContextAttribute, emptyAttrsV, emptyMdV, ""); + out = cav.toJsonV1(false, UpdateContextAttribute, emptyAttrsV, emptyMdV, ""); EXPECT_STREQ("", out.c_str()); utExit(); diff --git a/test/unittests/ngsi/ContextAttribute_test.cpp b/test/unittests/ngsi/ContextAttribute_test.cpp index 555a353968..f0acb5e8a6 100644 --- a/test/unittests/ngsi/ContextAttribute_test.cpp +++ b/test/unittests/ngsi/ContextAttribute_test.cpp @@ -104,7 +104,7 @@ TEST(ContextAttribute, render) std::vector emptyMdV; - out = caP->render(false, UpdateContext, emptyMdV, false); + out = caP->toJsonV1(false, UpdateContext, emptyMdV, false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/ContextElementResponseVector_test.cpp b/test/unittests/ngsi/ContextElementResponseVector_test.cpp index 21a1b8c716..52d119578c 100644 --- a/test/unittests/ngsi/ContextElementResponseVector_test.cpp +++ b/test/unittests/ngsi/ContextElementResponseVector_test.cpp @@ -76,7 +76,7 @@ TEST(ContextElementResponseVector, render) std::vector emptyV; // FIXME P2: "" is string, function signature says bool.. - out = cerv.render(false, UpdateContextElement, emptyV, false, emptyV, ""); + out = cerv.toJsonV1(false, UpdateContextElement, emptyV, false, emptyV, ""); EXPECT_STREQ("", out.c_str()); cer.entity.id = "ID"; diff --git a/test/unittests/ngsi/ContextElementResponse_test.cpp b/test/unittests/ngsi/ContextElementResponse_test.cpp index a662391565..ce6da4eb7c 100644 --- a/test/unittests/ngsi/ContextElementResponse_test.cpp +++ b/test/unittests/ngsi/ContextElementResponse_test.cpp @@ -81,7 +81,7 @@ TEST(ContextElementResponse, render) std::vector emptyV; - out = cer.render(false, UpdateContextElement, emptyV, false, emptyV, false); + out = cer.toJsonV1(false, UpdateContextElement, emptyV, false, emptyV, false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile)) << "Error getting test data from '" << outfile << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/ContextElementVector_test.cpp b/test/unittests/ngsi/ContextElementVector_test.cpp index 560d592644..d99b486a1a 100644 --- a/test/unittests/ngsi/ContextElementVector_test.cpp +++ b/test/unittests/ngsi/ContextElementVector_test.cpp @@ -42,14 +42,14 @@ TEST(ContextElementVector, render) std::string rendered; ContextElementVector ceV; - rendered = ceV.render(false, UpdateContextElement, false); + rendered = ceV.toJsonV1(false, UpdateContextElement, false); EXPECT_STREQ("", rendered.c_str()); eP->id = "E_ID"; eP->type = "E_TYPE"; ceV.push_back(eP); - rendered = ceV.render(false, UpdateContextElement, false); + rendered = ceV.toJsonV1(false, UpdateContextElement, false); ceV.release(); } diff --git a/test/unittests/ngsi/ContextRegistrationAttributeVector_test.cpp b/test/unittests/ngsi/ContextRegistrationAttributeVector_test.cpp index 14b3fe7286..d940170c9e 100644 --- a/test/unittests/ngsi/ContextRegistrationAttributeVector_test.cpp +++ b/test/unittests/ngsi/ContextRegistrationAttributeVector_test.cpp @@ -38,27 +38,27 @@ TEST(ContextRegistrationAttributeVector, render) { ContextRegistrationAttributeVector crav; - ContextRegistrationAttribute cra("name", "type", "false"); - ContextRegistrationAttribute cra2("name2", "type2", "true"); + ContextRegistrationAttribute cra("name", "type"); + ContextRegistrationAttribute cra2("name2", "type2"); std::string out; const char* outfile1 = "ngsi.contextRegistrationAttributeVector.render1.middle.json"; const char* outfile2 = "ngsi.contextRegistrationAttributeVector.render2.middle.json"; utInit(); - out = crav.render(false); + out = crav.toJsonV1(false); EXPECT_STREQ("", out.c_str()); - out = crav.render(false); + out = crav.toJsonV1(false); EXPECT_STREQ("", out.c_str()); crav.push_back(&cra); - out = crav.render(false); + out = crav.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); crav.push_back(&cra2); - out = crav.render(false); + out = crav.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile2)) << "Error getting test data from '" << outfile2 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/ContextRegistrationAttribute_test.cpp b/test/unittests/ngsi/ContextRegistrationAttribute_test.cpp index 74b6c3d512..202711f378 100644 --- a/test/unittests/ngsi/ContextRegistrationAttribute_test.cpp +++ b/test/unittests/ngsi/ContextRegistrationAttribute_test.cpp @@ -37,13 +37,13 @@ */ TEST(ContextRegistrationAttribute, render) { - ContextRegistrationAttribute cra("name", "type", "false"); + ContextRegistrationAttribute cra("name", "type"); std::string out; const char* outfile1 = "ngsi.contextRegistrationAttribute.render.middle.json"; utInit(); - out = cra.render(false); + out = cra.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/ContextRegistrationResponseVector_test.cpp b/test/unittests/ngsi/ContextRegistrationResponseVector_test.cpp index 4f26da1f07..0437aef7c9 100644 --- a/test/unittests/ngsi/ContextRegistrationResponseVector_test.cpp +++ b/test/unittests/ngsi/ContextRegistrationResponseVector_test.cpp @@ -44,7 +44,7 @@ TEST(ContextRegistrationResponseVector, all) crr.contextRegistration.providingApplication.set("10.1.1.1://nada"); // Empty vector gives empty rendered result - rendered = crrV.render(false); + rendered = crrV.toJsonV1(false); EXPECT_EQ("", rendered); crrV.push_back(&crr); diff --git a/test/unittests/ngsi/ContextRegistrationResponse_test.cpp b/test/unittests/ngsi/ContextRegistrationResponse_test.cpp index 09e3fd3380..97c1f61dec 100644 --- a/test/unittests/ngsi/ContextRegistrationResponse_test.cpp +++ b/test/unittests/ngsi/ContextRegistrationResponse_test.cpp @@ -45,12 +45,12 @@ TEST(ContextRegistrationResponse, render) utInit(); crr.errorCode.fill(SccNone); - rendered = crr.render(false); + rendered = crr.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, rendered.c_str()); crr.errorCode.fill(SccBadRequest); - rendered = crr.render(false); + rendered = crr.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile2)) << "Error getting test data from '" << outfile2 << "'"; EXPECT_STREQ(expectedBuf, rendered.c_str()); diff --git a/test/unittests/ngsi/ContextRegistrationVector_test.cpp b/test/unittests/ngsi/ContextRegistrationVector_test.cpp index fd3118445f..675ae99ba4 100644 --- a/test/unittests/ngsi/ContextRegistrationVector_test.cpp +++ b/test/unittests/ngsi/ContextRegistrationVector_test.cpp @@ -44,7 +44,7 @@ TEST(ContextRegistrationVector, render) utInit(); - out = crv.render(false); + out = crv.toJsonV1(false); EXPECT_STREQ("", out.c_str()); utExit(); diff --git a/test/unittests/ngsi/EntityId_test.cpp b/test/unittests/ngsi/EntityId_test.cpp index 05c2b7a0de..467dc2f4a6 100644 --- a/test/unittests/ngsi/EntityId_test.cpp +++ b/test/unittests/ngsi/EntityId_test.cpp @@ -40,7 +40,7 @@ TEST(EntityId, render) utInit(); - out = eId.render(false); + out = eId.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/MetadataVector_test.cpp b/test/unittests/ngsi/MetadataVector_test.cpp index 149500a9e7..0b4a36400c 100644 --- a/test/unittests/ngsi/MetadataVector_test.cpp +++ b/test/unittests/ngsi/MetadataVector_test.cpp @@ -49,14 +49,14 @@ TEST(MetadataVector, render) metadataFilter.push_back(&m); - out = mV.render(metadataFilter, false); + out = mV.toJsonV1(metadataFilter, false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); metadataFilter.push_back(&m2); mV.push_back(&m2); - out = mV.render(metadataFilter, false); + out = mV.toJsonV1(metadataFilter, false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile2)) << "Error getting test data from '" << outfile2 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/Metadata_test.cpp b/test/unittests/ngsi/Metadata_test.cpp index 46d915ce75..46ed9c2ca8 100644 --- a/test/unittests/ngsi/Metadata_test.cpp +++ b/test/unittests/ngsi/Metadata_test.cpp @@ -65,11 +65,11 @@ TEST(Metadata, render) utInit(); - out = m1.render(false); + out = m1.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); - out = m2.render(false); + out = m2.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile2)) << "Error getting test data from '" << outfile2 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/NotifyConditionVector_test.cpp b/test/unittests/ngsi/NotifyConditionVector_test.cpp index f1574d6976..7b1cf7f5b8 100644 --- a/test/unittests/ngsi/NotifyConditionVector_test.cpp +++ b/test/unittests/ngsi/NotifyConditionVector_test.cpp @@ -44,19 +44,19 @@ TEST(NotifyConditionVector, render) utInit(); - out = ncV.render(false); + out = ncV.toJsonV1(false); EXPECT_STREQ("", out.c_str()); ncP->type = "Type"; ncV.push_back(ncP); - out = ncV.render(false); + out = ncV.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); ncV.release(); - out = ncV.render(false); + out = ncV.toJsonV1(false); EXPECT_STREQ("", out.c_str()); utExit(); diff --git a/test/unittests/ngsi/NotifyCondition_test.cpp b/test/unittests/ngsi/NotifyCondition_test.cpp index 5ed722c564..80baae1ce2 100644 --- a/test/unittests/ngsi/NotifyCondition_test.cpp +++ b/test/unittests/ngsi/NotifyCondition_test.cpp @@ -61,7 +61,7 @@ TEST(NotifyCondition, render) utInit(); - out = nc.render(false); + out = nc.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/Originator_test.cpp b/test/unittests/ngsi/Originator_test.cpp index 91a8763ea2..5c80355780 100644 --- a/test/unittests/ngsi/Originator_test.cpp +++ b/test/unittests/ngsi/Originator_test.cpp @@ -93,12 +93,12 @@ TEST(Originator, render) utInit(); - out = originator.render(false); + out = originator.toJsonV1(false); EXPECT_STREQ("", out.c_str()); originator.string = "String"; - out = originator.render(false); + out = originator.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/ProvidingApplication_test.cpp b/test/unittests/ngsi/ProvidingApplication_test.cpp index 8b67aaf6f5..467af2e78a 100644 --- a/test/unittests/ngsi/ProvidingApplication_test.cpp +++ b/test/unittests/ngsi/ProvidingApplication_test.cpp @@ -43,12 +43,12 @@ TEST(ProvidingApplication, render) utInit(); - out = pa.render(false); + out = pa.toJsonV1(false); EXPECT_STREQ("", out.c_str()); pa.set("PA"); - out = pa.render(false); + out = pa.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/Reference_test.cpp b/test/unittests/ngsi/Reference_test.cpp index 31f0be9d15..31e28979a1 100644 --- a/test/unittests/ngsi/Reference_test.cpp +++ b/test/unittests/ngsi/Reference_test.cpp @@ -86,12 +86,12 @@ TEST(Reference, render) utInit(); reference .set(""); - out = reference.render(false); + out = reference.toJsonV1(false); EXPECT_STREQ("", out.c_str()); reference .set("REF"); - out = reference.render(false); + out = reference.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/RestrictionString_test.cpp b/test/unittests/ngsi/RestrictionString_test.cpp index 668d3c7c86..a785b52802 100644 --- a/test/unittests/ngsi/RestrictionString_test.cpp +++ b/test/unittests/ngsi/RestrictionString_test.cpp @@ -89,12 +89,12 @@ TEST(RestrictionString, render) utInit(); - out = restrictionString.render(false); + out = restrictionString.toJsonV1(false); EXPECT_STREQ("", out.c_str()); restrictionString.string = "String"; - out = restrictionString.render(false); + out = restrictionString.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/Restriction_test.cpp b/test/unittests/ngsi/Restriction_test.cpp index 47d588cb41..f97894902f 100644 --- a/test/unittests/ngsi/Restriction_test.cpp +++ b/test/unittests/ngsi/Restriction_test.cpp @@ -73,6 +73,6 @@ TEST(Restriction, render) std::string rendered; std::string expected = ""; - rendered = restriction.render(0, false); + rendered = restriction.toJsonV1(0, false); EXPECT_STREQ(expected.c_str(), rendered.c_str()); } diff --git a/test/unittests/ngsi/ScopeVector_test.cpp b/test/unittests/ngsi/ScopeVector_test.cpp index fe1335469a..4c7e078fc4 100644 --- a/test/unittests/ngsi/ScopeVector_test.cpp +++ b/test/unittests/ngsi/ScopeVector_test.cpp @@ -42,12 +42,12 @@ TEST(ScopeVector, renderAndRelease) utInit(); - out = sV.render(false); + out = sV.toJsonV1(false); EXPECT_STREQ("", out.c_str()); sV.push_back(s); - out = sV.render(false); + out = sV.toJsonV1(false); EXPECT_EQ(sV.size(), 1); sV.release(); diff --git a/test/unittests/ngsi/Scope_test.cpp b/test/unittests/ngsi/Scope_test.cpp index 5b2c0d9972..4220fd1786 100644 --- a/test/unittests/ngsi/Scope_test.cpp +++ b/test/unittests/ngsi/Scope_test.cpp @@ -43,7 +43,7 @@ TEST(Scope, render) utInit(); - out = scope.render(false); + out = scope.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/StatusCode_test.cpp b/test/unittests/ngsi/StatusCode_test.cpp index 63f13f55a9..d6e1e4b002 100644 --- a/test/unittests/ngsi/StatusCode_test.cpp +++ b/test/unittests/ngsi/StatusCode_test.cpp @@ -44,7 +44,7 @@ TEST(StatusCode, render) utInit(); - out = sc2.render(false); + out = sc2.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/SubscribeError_test.cpp b/test/unittests/ngsi/SubscribeError_test.cpp index 2ce3e978eb..b1c4845553 100644 --- a/test/unittests/ngsi/SubscribeError_test.cpp +++ b/test/unittests/ngsi/SubscribeError_test.cpp @@ -47,11 +47,11 @@ TEST(SubscribeError, render) se.subscriptionId.set("SUB_123"); se.errorCode.fill(SccBadRequest, "detail"); - out = se.render(RegisterContext, false); + out = se.toJsonV1(RegisterContext, false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); - out = se.render(SubscribeContext, false); + out = se.toJsonV1(SubscribeContext, false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile2)) << "Error getting test data from '" << outfile2 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/SubscriptionId_test.cpp b/test/unittests/ngsi/SubscriptionId_test.cpp index e893606ea6..0f36fbe9ab 100644 --- a/test/unittests/ngsi/SubscriptionId_test.cpp +++ b/test/unittests/ngsi/SubscriptionId_test.cpp @@ -116,7 +116,7 @@ TEST(SubscriptionId, render) sId.set("012345012345012345012345"); - out = sId.render(UnsubscribeContext, false); + out = sId.toJsonV1(UnsubscribeContext, false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi/Throttling_test.cpp b/test/unittests/ngsi/Throttling_test.cpp index 51ca1ddd0a..232dfa1495 100644 --- a/test/unittests/ngsi/Throttling_test.cpp +++ b/test/unittests/ngsi/Throttling_test.cpp @@ -95,15 +95,15 @@ TEST(Throttling, render) utInit(); t.set(""); - out = t.render(false); + out = t.toJsonV1(false); EXPECT_STREQ("", out.c_str()); - out = t.render(false); + out = t.toJsonV1(false); EXPECT_STREQ("", out.c_str()); t.set("PT1S"); - out = t.render(false); + out = t.toJsonV1(false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi10/NotifyContextRequest_test.cpp b/test/unittests/ngsi10/NotifyContextRequest_test.cpp index 8e9ff5de3d..24ed7a9e59 100644 --- a/test/unittests/ngsi10/NotifyContextRequest_test.cpp +++ b/test/unittests/ngsi10/NotifyContextRequest_test.cpp @@ -68,7 +68,7 @@ TEST(NotifyContextRequest, json_ok) // std::vector emptyV; EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile)) << "Error getting test data from '" << outfile << "'"; - rendered = ncrP->render(false, emptyV, false, emptyV); + rendered = ncrP->toJsonV1(false, emptyV, false, emptyV); EXPECT_STREQ(expectedBuf, rendered.c_str()); ncrP->release(); @@ -152,7 +152,7 @@ TEST(NotifyContextRequest, json_render) // 1. Without ContextResponseList EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - rendered = ncrP->render(false, emptyV, false, emptyV); + rendered = ncrP->toJsonV1(false, emptyV, false, emptyV); EXPECT_STREQ(expectedBuf, rendered.c_str()); @@ -163,7 +163,7 @@ TEST(NotifyContextRequest, json_render) cerP->statusCode.fill(SccOk); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - rendered = ncrP->render(false, emptyV, false, emptyV); + rendered = ncrP->toJsonV1(false, emptyV, false, emptyV); EXPECT_STREQ(expectedBuf, rendered.c_str()); @@ -174,7 +174,7 @@ TEST(NotifyContextRequest, json_render) cerP->statusCode.fill(SccOk); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename3)) << "Error getting test data from '" << filename3 << "'"; - rendered = ncrP->render(false, emptyV, false, emptyV); + rendered = ncrP->toJsonV1(false, emptyV, false, emptyV); EXPECT_STREQ(expectedBuf, rendered.c_str()); utExit(); diff --git a/test/unittests/ngsi10/QueryContextRequest_test.cpp b/test/unittests/ngsi10/QueryContextRequest_test.cpp index 2e88e9a9be..373f43e305 100644 --- a/test/unittests/ngsi10/QueryContextRequest_test.cpp +++ b/test/unittests/ngsi10/QueryContextRequest_test.cpp @@ -93,7 +93,7 @@ TEST(QueryContextRequest, ok_json) QueryContextRequest* qcrP = &parseData.qcr.res; EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile)) << "Error getting test data from '" << outfile << "'"; - rendered = qcrP->render(); + rendered = qcrP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); qcrP->release(); diff --git a/test/unittests/ngsi10/QueryContextResponse_test.cpp b/test/unittests/ngsi10/QueryContextResponse_test.cpp index 34febd07fc..8643b23496 100644 --- a/test/unittests/ngsi10/QueryContextResponse_test.cpp +++ b/test/unittests/ngsi10/QueryContextResponse_test.cpp @@ -68,13 +68,13 @@ TEST(QueryContextResponse, json_render) qcrP->contextElementResponseVector.push_back(cerP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); // 2. ContextElement: +entityId -contextAttributeVector EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -84,14 +84,14 @@ TEST(QueryContextResponse, json_render) cerP->entity.attributeVector.push_back(caP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename3)) << "Error getting test data from '" << filename3 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); // 4. ContextElement: +entityId +contextAttributeVector EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename4)) << "Error getting test data from '" << filename4 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -100,14 +100,14 @@ TEST(QueryContextResponse, json_render) cerP->entity.attributeVector.release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename5)) << "Error getting test data from '" << filename5 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); // 6. ContextElement: +entityId -contextAttributeVector EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename6)) << "Error getting test data from '" << filename6 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -117,14 +117,14 @@ TEST(QueryContextResponse, json_render) cerP->entity.attributeVector.push_back(caP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename7)) << "Error getting test data from '" << filename7 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); // 8. ContextElement: +entityId +contextAttributeVector EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename8)) << "Error getting test data from '" << filename8 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -134,7 +134,7 @@ TEST(QueryContextResponse, json_render) cerP->entity.attributeVector.push_back(caP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename9)) << "Error getting test data from '" << filename9 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -147,7 +147,7 @@ TEST(QueryContextResponse, json_render) qcrP->contextElementResponseVector.push_back(cerP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename11)) << "Error getting test data from '" << filename11 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -157,7 +157,7 @@ TEST(QueryContextResponse, json_render) EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename12)) << "Error getting test data from '" << filename12 << "'"; qcrP->errorCode.code = SccNone; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -165,13 +165,13 @@ TEST(QueryContextResponse, json_render) qcrP->errorCode.fill(SccBadRequest, "no details"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename13)) << "Error getting test data from '" << filename13 << "'"; - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); // 13. contextElementResponseVector is released and the render method should give an almost empty response EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename14)) << "Error getting test data from '" << filename14 << "'"; qcrP->contextElementResponseVector.release(); - out = qcrP->render(false); + out = qcrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); diff --git a/test/unittests/ngsi10/SubscribeContextResponse_test.cpp b/test/unittests/ngsi10/SubscribeContextResponse_test.cpp index 5bcfd9a38d..d6dd218684 100644 --- a/test/unittests/ngsi10/SubscribeContextResponse_test.cpp +++ b/test/unittests/ngsi10/SubscribeContextResponse_test.cpp @@ -82,7 +82,7 @@ TEST(SubscribeContextResponse, json_render) scrP->subscribeError.errorCode.fill(SccBadRequest, "details"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - out = scrP->render(); + out = scrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -92,7 +92,7 @@ TEST(SubscribeContextResponse, json_render) scrP->subscribeError.subscriptionId.set("012345678901234567890123"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - out = scrP->render(); + out = scrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); scrP->subscribeError.errorCode.fill(SccNone); @@ -103,7 +103,7 @@ TEST(SubscribeContextResponse, json_render) scrP->subscribeResponse.subscriptionId.set("012345678901234567890123"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename3)) << "Error getting test data from '" << filename3 << "'"; - out = scrP->render(); + out = scrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -112,7 +112,7 @@ TEST(SubscribeContextResponse, json_render) scrP->subscribeResponse.throttling.set("PT1M"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename4)) << "Error getting test data from '" << filename4 << "'"; - out = scrP->render(); + out = scrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -122,7 +122,7 @@ TEST(SubscribeContextResponse, json_render) scrP->subscribeResponse.duration.set("PT1H"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename5)) << "Error getting test data from '" << filename5 << "'"; - out = scrP->render(); + out = scrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -131,7 +131,7 @@ TEST(SubscribeContextResponse, json_render) scrP->subscribeResponse.throttling.set("PT1M"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename6)) << "Error getting test data from '" << filename6 << "'"; - out = scrP->render(); + out = scrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); utExit(); diff --git a/test/unittests/ngsi10/UnsubscribeContextRequest_test.cpp b/test/unittests/ngsi10/UnsubscribeContextRequest_test.cpp index b69b30e2c3..5c2235fe33 100644 --- a/test/unittests/ngsi10/UnsubscribeContextRequest_test.cpp +++ b/test/unittests/ngsi10/UnsubscribeContextRequest_test.cpp @@ -59,7 +59,7 @@ TEST(UnsubscribeContextRequest, badSubscriptionId_json) EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile2)) << "Error getting test data from '" << outfile2 << "'"; - out = ucrP->render(); + out = ucrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); ucrP->release(); diff --git a/test/unittests/ngsi10/UnsubscribeContextResponse_test.cpp b/test/unittests/ngsi10/UnsubscribeContextResponse_test.cpp index 4bf7bcc145..426d7c63b9 100644 --- a/test/unittests/ngsi10/UnsubscribeContextResponse_test.cpp +++ b/test/unittests/ngsi10/UnsubscribeContextResponse_test.cpp @@ -77,7 +77,7 @@ TEST(UnsubscribeContextResponse, jsonRender) uncrP->statusCode.fill(SccBadRequest, "details"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), infile1)) << "Error getting test data from '" << infile1 << "'"; - out = uncrP->render(); + out = uncrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -86,7 +86,7 @@ TEST(UnsubscribeContextResponse, jsonRender) uncrP->statusCode.fill(SccOk); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), infile2)) << "Error getting test data from '" << infile2 << "'"; - out = uncrP->render(); + out = uncrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); delete uncrP; diff --git a/test/unittests/ngsi10/UpdateContextResponse_test.cpp b/test/unittests/ngsi10/UpdateContextResponse_test.cpp index 388c22a1e5..d0613d01c4 100644 --- a/test/unittests/ngsi10/UpdateContextResponse_test.cpp +++ b/test/unittests/ngsi10/UpdateContextResponse_test.cpp @@ -64,7 +64,7 @@ TEST(UpdateContextResponse, jsonRender) ucrP->errorCode.fill(SccOk); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - out = ucrP->render(false); + out = ucrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -72,7 +72,7 @@ TEST(UpdateContextResponse, jsonRender) // Test 02. UpdateContextResponse::errorCode NOT OK and contextElementResponseVector filled id (with details) ucrP->errorCode.fill(SccBadRequest, "no details"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - out = ucrP->render(false); + out = ucrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); ucrP->errorCode.fill(SccOk); // Cleanup @@ -86,7 +86,7 @@ TEST(UpdateContextResponse, jsonRender) ucrP->contextElementResponseVector.push_back(cerP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename3)) << "Error getting test data from '" << filename3 << "'"; - out = ucrP->render(false); + out = ucrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -96,7 +96,7 @@ TEST(UpdateContextResponse, jsonRender) cerP->entity.attributeVector.push_back(caP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename5)) << "Error getting test data from '" << filename5 << "'"; - out = ucrP->render(false); + out = ucrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -106,7 +106,7 @@ TEST(UpdateContextResponse, jsonRender) cerP->entity.attributeVector.push_back(caP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename11)) << "Error getting test data from '" << filename11 << "'"; - out = ucrP->render(false); + out = ucrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -119,7 +119,7 @@ TEST(UpdateContextResponse, jsonRender) ucrP->contextElementResponseVector.push_back(cerP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename13)) << "Error getting test data from '" << filename13 << "'"; - out = ucrP->render(false); + out = ucrP->toJsonV1(false); EXPECT_STREQ(expectedBuf, out.c_str()); utExit(); diff --git a/test/unittests/ngsi10/UpdateContextSubscriptionResponse_test.cpp b/test/unittests/ngsi10/UpdateContextSubscriptionResponse_test.cpp index 52ce77e64a..c46091b1a9 100644 --- a/test/unittests/ngsi10/UpdateContextSubscriptionResponse_test.cpp +++ b/test/unittests/ngsi10/UpdateContextSubscriptionResponse_test.cpp @@ -62,7 +62,7 @@ TEST(UpdateContextSubscriptionResponse, json_render) ucsrP->subscribeError.errorCode.fill(SccBadRequest, "details"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - out = ucsrP->render(); + out = ucsrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -72,7 +72,7 @@ TEST(UpdateContextSubscriptionResponse, json_render) ucsrP->subscribeError.subscriptionId.set("012345678901234567890123"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - out = ucsrP->render(); + out = ucsrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); ucsrP->subscribeError.errorCode.fill(SccNone); @@ -83,7 +83,7 @@ TEST(UpdateContextSubscriptionResponse, json_render) ucsrP->subscribeResponse.subscriptionId.set("012345678901234567890123"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename3)) << "Error getting test data from '" << filename3 << "'"; - out = ucsrP->render(); + out = ucsrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -92,7 +92,7 @@ TEST(UpdateContextSubscriptionResponse, json_render) ucsrP->subscribeResponse.throttling.set("PT1M"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename4)) << "Error getting test data from '" << filename4 << "'"; - out = ucsrP->render(); + out = ucsrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -102,7 +102,7 @@ TEST(UpdateContextSubscriptionResponse, json_render) ucsrP->subscribeResponse.duration.set("PT1H"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename5)) << "Error getting test data from '" << filename5 << "'"; - out = ucsrP->render(); + out = ucsrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -111,7 +111,7 @@ TEST(UpdateContextSubscriptionResponse, json_render) ucsrP->subscribeResponse.throttling.set("PT1M"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename6)) << "Error getting test data from '" << filename6 << "'"; - out = ucsrP->render(); + out = ucsrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); utExit(); diff --git a/test/unittests/ngsi9/DiscoverContextAvailabilityResponse_test.cpp b/test/unittests/ngsi9/DiscoverContextAvailabilityResponse_test.cpp index 4ecb89a7c2..c913603920 100644 --- a/test/unittests/ngsi9/DiscoverContextAvailabilityResponse_test.cpp +++ b/test/unittests/ngsi9/DiscoverContextAvailabilityResponse_test.cpp @@ -54,10 +54,10 @@ TEST(DiscoverContextAvailabilityResponse, render) utInit(); - out = dcar1.render(); + out = dcar1.toJsonV1(); EXPECT_EQ(SccReceiverInternalError, dcar1.errorCode.code); - out = dcar2.render(); + out = dcar2.toJsonV1(); EXPECT_EQ(SccBadRequest, dcar2.errorCode.code); utExit(); @@ -82,11 +82,8 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) const char* filename4 = "ngsi9.discoverContextAvailabilityResponse.jsonRender4.valid.json"; const char* filename5 = "ngsi9.discoverContextAvailabilityResponse.jsonRender5.valid.json"; const char* filename6 = "ngsi9.discoverContextAvailabilityResponse.jsonRender6.valid.json"; - const char* filename7 = "ngsi9.discoverContextAvailabilityResponse.jsonRender7.valid.json"; - const char* filename8 = "ngsi9.discoverContextAvailabilityResponse.jsonRender8.valid.json"; - const char* filename9 = "ngsi9.discoverContextAvailabilityResponse.jsonRender9.valid.json"; + const char* filename7 = "ngsi9.discoverContextAvailabilityResponse.jsonRender7.valid.json"; const char* filename10 = "ngsi9.discoverContextAvailabilityResponse.jsonRender10.valid.json"; - const char* filename12 = "ngsi9.discoverContextAvailabilityResponse.jsonRender12.valid.json"; const char* filename14 = "ngsi9.discoverContextAvailabilityResponse.jsonRender14.valid.json"; const char* filename16 = "ngsi9.discoverContextAvailabilityResponse.jsonRender16.valid.json"; const char* filename18 = "ngsi9.discoverContextAvailabilityResponse.jsonRender18.valid.json"; @@ -111,13 +108,13 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) dcarP->responseVector.push_back(crrP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); dcarP->release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests free(dcarP); @@ -132,7 +129,7 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) dcarP->responseVector.push_back(crrP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); // No release here - the data stays - to be used in the following test scenario @@ -146,12 +143,12 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) dcarP->responseVector.push_back(crrP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename3)) << "Error getting test data from '" << filename3 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests @@ -165,7 +162,7 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) dcarP->responseVector.push_back(crrP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename4)) << "Error getting test data from '" << filename4 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); // No release here - the data stays - to be used in the following test scenario @@ -177,119 +174,83 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) crrP->contextRegistration.providingApplication.set("http://tid.test.com/unitTest5"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename5)) << "Error getting test data from '" << filename5 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests // 6. ContextRegistration: one attribute in contextRegistrationAttributeVector crrP = new ContextRegistrationResponse(); - attrP = new ContextRegistrationAttribute("Attr1", "AType", "false"); + attrP = new ContextRegistrationAttribute("Attr1", "AType"); crrP->contextRegistration.contextRegistrationAttributeVector.push_back(attrP); crrP->contextRegistration.providingApplication.set("http://tid.test.com/unitTest6"); dcarP->responseVector.push_back(crrP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename6)) << "Error getting test data from '" << filename6 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); // No release here - the data stays - to be used in the following test scenario // 7. ContextRegistration: two attributes in contextRegistrationAttributeVector - attrP = new ContextRegistrationAttribute("Attr2", "AType", "true"); + attrP = new ContextRegistrationAttribute("Attr2", "AType"); crrP->contextRegistration.contextRegistrationAttributeVector.push_back(attrP); crrP->contextRegistration.providingApplication.set("http://tid.test.com/unitTest7"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename7)) << "Error getting test data from '" << filename7 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests - // 8. ContextRegistration: one metadata in registrationMetadataVector - crrP = new ContextRegistrationResponse(); - mdP = new Metadata("M1", "string", "test 8"); - - crrP->contextRegistration.registrationMetadataVector.push_back(mdP); - crrP->contextRegistration.providingApplication.set("http://tid.test.com/unitTest8"); - dcarP->responseVector.push_back(crrP); - - EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename8)) << "Error getting test data from '" << filename8 << "'"; - rendered = dcarP->render(); - EXPECT_STREQ(expectedBuf, rendered.c_str()); - // No release here - the data stays - to be used in the following test scenario - - - - // 9. ContextRegistration: two metadatas in registrationMetadataVector - mdP = new Metadata("M2", "string", "test 9"); - - crrP->contextRegistration.registrationMetadataVector.push_back(mdP); - crrP->contextRegistration.providingApplication.set("http://tid.test.com/unitTest9"); - - EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename9)) << "Error getting test data from '" << filename9 << "'"; - rendered = dcarP->render(); - EXPECT_STREQ(expectedBuf, rendered.c_str()); - - dcarP->release(); - EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); - EXPECT_STREQ(expectedBuf, rendered.c_str()); - dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests - - - // 10. !entityIdVector !contextRegistrationAttributeVector !registrationMetadataVector +providingApplication + // 10. !entityIdVector !contextRegistrationAttributeVector +providingApplication crrP = new ContextRegistrationResponse(); crrP->contextRegistration.providingApplication.set("http://tid.test.com/unitTest10"); dcarP->responseVector.push_back(crrP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename10)) << "Error getting test data from '" << filename10 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests - // 12. !entityIdVector +contextRegistrationAttributeVector !registrationMetadataVector +providingApplication + // 12. !entityIdVector +contextRegistrationAttributeVector +providingApplication crrP = new ContextRegistrationResponse(); - attrP = new ContextRegistrationAttribute("Attr12", "AType", "true"); + attrP = new ContextRegistrationAttribute("Attr12", "AType"); crrP->contextRegistration.contextRegistrationAttributeVector.push_back(attrP); crrP->contextRegistration.providingApplication.set("http://tid.test.com/unitTest12"); dcarP->responseVector.push_back(crrP); - EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename12)) << "Error getting test data from '" << filename12 << "'"; - rendered = dcarP->render(); - EXPECT_STREQ(expectedBuf, rendered.c_str()); - dcarP->release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests - // 14. +entityIdVector !contextRegistrationAttributeVector !registrationMetadataVector +providingApplication + // 14. +entityIdVector !contextRegistrationAttributeVector +providingApplication crrP = new ContextRegistrationResponse(); eidP = new EntityId("E14", "EType", "false"); @@ -298,21 +259,21 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) dcarP->responseVector.push_back(crrP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename14)) << "Error getting test data from '" << filename14 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests - // 16. +entityIdVector +contextRegistrationAttributeVector !registrationMetadataVector +providingApplication + // 16. +entityIdVector +contextRegistrationAttributeVector +providingApplication crrP = new ContextRegistrationResponse(); eidP = new EntityId("E16", "EType", "false"); - attrP = new ContextRegistrationAttribute("Attr16", "AType", "true"); + attrP = new ContextRegistrationAttribute("Attr16", "AType"); crrP->contextRegistration.entityIdVector.push_back(eidP); crrP->contextRegistration.contextRegistrationAttributeVector.push_back(attrP); @@ -320,12 +281,12 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) dcarP->responseVector.push_back(crrP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename16)) << "Error getting test data from '" << filename16 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests @@ -334,11 +295,11 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) dcarP->errorCode.fill(SccBadRequest, "DiscoverContextAvailabilityResponse Unit Test 18"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename18)) << "Error getting test data from '" << filename18 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests @@ -348,12 +309,12 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) dcarP->errorCode.fill(SccBadRequest); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename19)) << "Error getting test data from '" << filename19 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); // ... otherwise the 500 remains and "pollutes" next tests @@ -374,12 +335,12 @@ TEST(DiscoverContextAvailabilityResponse, jsonRender) dcarP->responseVector.push_back(crrP); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename20)) << "Error getting test data from '" << filename20 << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); dcarP->release(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), emptyFilename)) << "Error getting test data from '" << emptyFilename << "'"; - rendered = dcarP->render(); + rendered = dcarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); free(dcarP); diff --git a/test/unittests/ngsi9/NotifyContextAvailabilityRequest_test.cpp b/test/unittests/ngsi9/NotifyContextAvailabilityRequest_test.cpp index aafffd75a1..0d49696957 100644 --- a/test/unittests/ngsi9/NotifyContextAvailabilityRequest_test.cpp +++ b/test/unittests/ngsi9/NotifyContextAvailabilityRequest_test.cpp @@ -60,7 +60,7 @@ TEST(NotifyContextAvailabilityRequest, ok_json) const char* outfile = "ngsi9.notifyContextAvailabilityRequest.ok.valid.json"; - out = ncarP->render(); + out = ncarP->toJsonV1(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile)) << "Error getting test data from '" << outfile << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); @@ -126,14 +126,13 @@ TEST(NotifyContextAvailabilityRequest, json_render) // Test 1. contextRegistrationResponseVector with ONE contextRegistrationResponse instance EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - rendered = ncarP->render(); + rendered = ncarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); // Test 2. contextRegistrationResponseVector with TWO contextRegistrationResponse instances - Metadata* mdP = new Metadata("M01", "MType", "123"); - ContextRegistrationAttribute* craP = new ContextRegistrationAttribute("CRA1", "CType", "false"); + ContextRegistrationAttribute* craP = new ContextRegistrationAttribute("CRA1", "CType"); eidP->fill("E02", "EType", "false"); crrP = new ContextRegistrationResponse(); @@ -142,12 +141,11 @@ TEST(NotifyContextAvailabilityRequest, json_render) crrP->contextRegistration.entityIdVector.push_back(eidP); crrP->contextRegistration.entityIdVectorPresent = true; crrP->contextRegistration.contextRegistrationAttributeVector.push_back(craP); - crrP->contextRegistration.registrationMetadataVector.push_back(mdP); crrP->contextRegistration.providingApplication.set("http://www.tid.es/NotifyContextAvailabilityRequestTest2"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - rendered = ncarP->render(); + rendered = ncarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); utExit(); diff --git a/test/unittests/ngsi9/NotifyContextAvailabilityResponse_test.cpp b/test/unittests/ngsi9/NotifyContextAvailabilityResponse_test.cpp index 43aec7595d..f01e05c6bc 100644 --- a/test/unittests/ngsi9/NotifyContextAvailabilityResponse_test.cpp +++ b/test/unittests/ngsi9/NotifyContextAvailabilityResponse_test.cpp @@ -45,7 +45,7 @@ TEST(NotifyContextAvailabilityResponse, all) EXPECT_EQ(ncr1.responseCode.code, SccOk); EXPECT_EQ(ncr2.responseCode.code, SccBadRequest); - ncr1.render(); + ncr1.toJsonV1(); ncr1.release(); } diff --git a/test/unittests/ngsi9/RegisterContextRequest_test.cpp b/test/unittests/ngsi9/RegisterContextRequest_test.cpp index 25f6e82d72..a8928fd938 100644 --- a/test/unittests/ngsi9/RegisterContextRequest_test.cpp +++ b/test/unittests/ngsi9/RegisterContextRequest_test.cpp @@ -61,9 +61,6 @@ * json_overwriteEntityIdType * durationError * emptyContextRegistrationAttributeName -* emptyContextRegistrationAttributeIsDomain -* badContextRegistrationAttributeIsDomain -* json_badContextRegistrationAttributeIsDomain * emptyContextMetadataName * emptyContextMetadataValue * emptyRegistrationMetadataValue @@ -95,7 +92,7 @@ TEST(RegisterContextRequest, json_ok) std::string result = jsonTreat(testBuf, &ci, &parseData, RegisterContext, &reqP); EXPECT_EQ("OK", result) << "this test should be OK"; - out = rcrP->render(); + out = rcrP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); reqP->release(&parseData); @@ -239,29 +236,6 @@ TEST(RegisterContextRequest, json_overwriteEntityIdType) -/* **************************************************************************** -* -* json_badContextRegistrationAttributeIsDomain - -*/ -TEST(RegisterContextRequest, json_badContextRegistrationAttributeIsDomain) -{ - ParseData parseData; - const char* inFile = "ngsi9.registerContextRequest.badContextRegistrationAttributeIsDomain.invalid.json"; - const char* outFile = "ngsi9.registerContextResponse.badContextRegistrationAttributeIsDomain.valid.json"; - ConnectionInfo ci("", "POST", "1.1"); - - ci.inMimeType = JSON; - ci.outMimeType = JSON; - - EXPECT_EQ("OK", testDataFromFile(testBuf, sizeof(testBuf), inFile)) << "Error getting test data from '" << inFile << "'"; - EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outFile)) << "Error getting test data from '" << outFile << "'"; - - std::string result = jsonTreat(testBuf, &ci, &parseData, RegisterContext, NULL); - EXPECT_STREQ(expectedBuf, result.c_str()); -} - - - /* **************************************************************************** * * json_reregistration - diff --git a/test/unittests/ngsi9/RegisterContextResponse_test.cpp b/test/unittests/ngsi9/RegisterContextResponse_test.cpp index 1950824465..b04e9737f3 100644 --- a/test/unittests/ngsi9/RegisterContextResponse_test.cpp +++ b/test/unittests/ngsi9/RegisterContextResponse_test.cpp @@ -61,7 +61,7 @@ TEST(RegisterContextResponse, constructors) EXPECT_EQ("012345678901234567890123", rcr4.registrationId.get()); EXPECT_EQ(SccBadRequest, rcr4.errorCode.code); - out = rcr5.check("", 0); + out = rcr5.check(""); EXPECT_EQ(expected5, out); @@ -87,27 +87,27 @@ TEST(RegisterContextResponse, jsonRender) // 1. Only registrationId rcr.registrationId.set("012345678901234567890123"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - rendered = rcr.render(); + rendered = rcr.toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); // 2. registrationId and duration rcr.duration.set("PT1S"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - rendered = rcr.render(); + rendered = rcr.toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); // 3. registrationId and errorCode rcr.duration.set(""); rcr.errorCode.fill(SccBadRequest, "no details"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename3)) << "Error getting test data from '" << filename3 << "'"; - rendered = rcr.render(); + rendered = rcr.toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); // 4. registrationId and duration and errorCode rcr.duration.set("PT2S"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename4)) << "Error getting test data from '" << filename4 << "'"; - rendered = rcr.render(); + rendered = rcr.toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); utExit(); diff --git a/test/unittests/ngsi9/SubscribeContextAvailabilityResponse_test.cpp b/test/unittests/ngsi9/SubscribeContextAvailabilityResponse_test.cpp index 11da3a2ca9..3d93e2fba3 100644 --- a/test/unittests/ngsi9/SubscribeContextAvailabilityResponse_test.cpp +++ b/test/unittests/ngsi9/SubscribeContextAvailabilityResponse_test.cpp @@ -83,7 +83,7 @@ TEST(SubscribeContextAvailabilityResponse, jsonRender) scarP->subscriptionId.set("012345678901234567890123"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - rendered = scarP->render(); + rendered = scarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); @@ -91,7 +91,7 @@ TEST(SubscribeContextAvailabilityResponse, jsonRender) scarP->errorCode.fill(SccBadRequest); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - rendered = scarP->render(); + rendered = scarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); @@ -100,7 +100,7 @@ TEST(SubscribeContextAvailabilityResponse, jsonRender) scarP->duration.set("PT1H"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename3)) << "Error getting test data from '" << filename3 << "'"; - rendered = scarP->render(); + rendered = scarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); @@ -108,7 +108,7 @@ TEST(SubscribeContextAvailabilityResponse, jsonRender) scarP->errorCode.fill(SccBadRequest, "no details"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename4)) << "Error getting test data from '" << filename4 << "'"; - rendered = scarP->render(); + rendered = scarP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); diff --git a/test/unittests/ngsi9/UnsubscribeContextAvailabilityResponse_test.cpp b/test/unittests/ngsi9/UnsubscribeContextAvailabilityResponse_test.cpp index 730cfa06da..22dfe8d549 100644 --- a/test/unittests/ngsi9/UnsubscribeContextAvailabilityResponse_test.cpp +++ b/test/unittests/ngsi9/UnsubscribeContextAvailabilityResponse_test.cpp @@ -79,7 +79,7 @@ TEST(UnsubscribeContextAvailabilityResponse, jsonRender) ucasP->statusCode.fill(SccOk); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - out = ucasP->render(); + out = ucasP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); @@ -87,7 +87,7 @@ TEST(UnsubscribeContextAvailabilityResponse, jsonRender) ucasP->statusCode.fill(SccBadRequest, "no details"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - out = ucasP->render(); + out = ucasP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); free(ucasP); diff --git a/test/unittests/ngsi9/UpdateContextAvailabilitySubscriptionRequest_test.cpp b/test/unittests/ngsi9/UpdateContextAvailabilitySubscriptionRequest_test.cpp index 7af8aafc00..becfee77f2 100644 --- a/test/unittests/ngsi9/UpdateContextAvailabilitySubscriptionRequest_test.cpp +++ b/test/unittests/ngsi9/UpdateContextAvailabilitySubscriptionRequest_test.cpp @@ -63,7 +63,7 @@ TEST(UpdateContextAvailabilitySubscriptionRequest, json_ok) UpdateContextAvailabilitySubscriptionRequest* ucasP = &parseData.ucas.res; EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; - out = ucasP->render(); + out = ucasP->toJsonV1(); EXPECT_STREQ(expectedBuf, out.c_str()); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile2)) << "Error getting test data from '" << outfile2 << "'"; diff --git a/test/unittests/ngsi9/UpdateContextAvailabilitySubscriptionResponse_test.cpp b/test/unittests/ngsi9/UpdateContextAvailabilitySubscriptionResponse_test.cpp index 066a0cc589..c1072a461a 100644 --- a/test/unittests/ngsi9/UpdateContextAvailabilitySubscriptionResponse_test.cpp +++ b/test/unittests/ngsi9/UpdateContextAvailabilitySubscriptionResponse_test.cpp @@ -58,7 +58,7 @@ TEST(UpdateContextAvailabilitySubscriptionResponse, jsonRender) ucasP->subscriptionId.set("012345678901234567890123"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename1)) << "Error getting test data from '" << filename1 << "'"; - rendered = ucasP->render(); + rendered = ucasP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); @@ -66,7 +66,7 @@ TEST(UpdateContextAvailabilitySubscriptionResponse, jsonRender) ucasP->errorCode.fill(SccBadRequest); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename2)) << "Error getting test data from '" << filename2 << "'"; - rendered = ucasP->render(); + rendered = ucasP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); @@ -75,7 +75,7 @@ TEST(UpdateContextAvailabilitySubscriptionResponse, jsonRender) ucasP->duration.set("PT1H"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename3)) << "Error getting test data from '" << filename3 << "'"; - rendered = ucasP->render(); + rendered = ucasP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); @@ -83,7 +83,7 @@ TEST(UpdateContextAvailabilitySubscriptionResponse, jsonRender) ucasP->errorCode.fill(SccBadRequest, "no details"); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), filename4)) << "Error getting test data from '" << filename4 << "'"; - rendered = ucasP->render(); + rendered = ucasP->toJsonV1(); EXPECT_STREQ(expectedBuf, rendered.c_str()); diff --git a/test/unittests/parse/compoundValue_test.cpp b/test/unittests/parse/compoundValue_test.cpp index fd0995b483..641081f89c 100644 --- a/test/unittests/parse/compoundValue_test.cpp +++ b/test/unittests/parse/compoundValue_test.cpp @@ -437,7 +437,7 @@ TEST(compoundValue, updateTwoStructsJson) std::vector emptyMdV; ci.outMimeType = JSON; - rendered = caP->render(false, UpdateContext, emptyMdV, false); + rendered = caP->toJsonV1(false, UpdateContext, emptyMdV, false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), renderedFile)) << "Error getting test data from '" << renderedFile << "'"; EXPECT_STREQ(expectedBuf, rendered.c_str()); @@ -591,7 +591,7 @@ TEST(compoundValue, sixLevelsJson) std::vector emptyMdV; ci.outMimeType = JSON; - rendered = caP->render(false, UpdateContext, emptyMdV, false); + rendered = caP->toJsonV1(false, UpdateContext, emptyMdV, false); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), renderedFile)) << "Error getting test data from '" << renderedFile << "'"; EXPECT_STREQ(expectedBuf, rendered.c_str()); @@ -1002,7 +1002,7 @@ TEST(compoundValue, tenCompounds) utInit(); upcrP = &reqData.upcr.res; - rendered = upcrP->render(false); + rendered = upcrP->toJsonV1(false); utExit(); } diff --git a/test/unittests/rest/OrionError_test.cpp b/test/unittests/rest/OrionError_test.cpp index 49296b13bf..245d651a11 100644 --- a/test/unittests/rest/OrionError_test.cpp +++ b/test/unittests/rest/OrionError_test.cpp @@ -70,19 +70,19 @@ TEST(OrionError, all) ci.outMimeType = JSON; - out = e1.render(); + out = e1.toJsonV1(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); - out = e3.render(); + out = e3.toJsonV1(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile2)) << "Error getting test data from '" << outfile2 << "'"; EXPECT_STREQ(expectedBuf, out.c_str()); - out = e4.render(); + out = e4.toJsonV1(); EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile3)) << "Error getting test data from '" << outfile3 << "'"; diff --git a/test/unittests/testData/ngsi.contextRegistrationAttribute.render.middle.json b/test/unittests/testData/ngsi.contextRegistrationAttribute.render.middle.json index 53f8c52eb3..870f6ee9d3 100644 --- a/test/unittests/testData/ngsi.contextRegistrationAttribute.render.middle.json +++ b/test/unittests/testData/ngsi.contextRegistrationAttribute.render.middle.json @@ -1 +1 @@ -{"name":"name","type":"type","isDomain":"false"} \ No newline at end of file +{"name":"name","type":"type"} \ No newline at end of file diff --git a/test/unittests/testData/ngsi.contextRegistrationAttributeVector.render1.middle.json b/test/unittests/testData/ngsi.contextRegistrationAttributeVector.render1.middle.json index 0fd7fc0169..4b766b76a0 100644 --- a/test/unittests/testData/ngsi.contextRegistrationAttributeVector.render1.middle.json +++ b/test/unittests/testData/ngsi.contextRegistrationAttributeVector.render1.middle.json @@ -1 +1 @@ -"attributes":[{"name":"name","type":"type","isDomain":"false"}] \ No newline at end of file +"attributes":[{"name":"name","type":"type"}] \ No newline at end of file diff --git a/test/unittests/testData/ngsi.contextRegistrationAttributeVector.render2.middle.json b/test/unittests/testData/ngsi.contextRegistrationAttributeVector.render2.middle.json index dc82adcc74..0a59fb29da 100644 --- a/test/unittests/testData/ngsi.contextRegistrationAttributeVector.render2.middle.json +++ b/test/unittests/testData/ngsi.contextRegistrationAttributeVector.render2.middle.json @@ -1 +1 @@ -"attributes":[{"name":"name","type":"type","isDomain":"false"},{"name":"name2","type":"type2","isDomain":"true"}] \ No newline at end of file +"attributes":[{"name":"name","type":"type"},{"name":"name2","type":"type2"}] \ No newline at end of file diff --git a/test/unittests/testData/ngsi10.notifyContextAvailabilityRequest.jsonRender2.valid.json b/test/unittests/testData/ngsi10.notifyContextAvailabilityRequest.jsonRender2.valid.json index 58f179740c..e2361b1a82 100644 --- a/test/unittests/testData/ngsi10.notifyContextAvailabilityRequest.jsonRender2.valid.json +++ b/test/unittests/testData/ngsi10.notifyContextAvailabilityRequest.jsonRender2.valid.json @@ -1 +1 @@ -{"subscriptionId":"012345678901234567890123","contextRegistrationResponses":[{"contextRegistration":{"entities":[{"type":"EType","isPattern":"false","id":"E02"}],"providingApplication":"http://www.tid.es/NotifyContextAvailabilityRequestTest"}},{"contextRegistration":{"entities":[{"type":"EType","isPattern":"false","id":"E02"}],"attributes":[{"name":"CRA1","type":"CType","isDomain":"false"}],"providingApplication":"http://www.tid.es/NotifyContextAvailabilityRequestTest2"}}]} \ No newline at end of file +{"subscriptionId":"012345678901234567890123","contextRegistrationResponses":[{"contextRegistration":{"entities":[{"type":"EType","isPattern":"false","id":"E02"}],"providingApplication":"http://www.tid.es/NotifyContextAvailabilityRequestTest"}},{"contextRegistration":{"entities":[{"type":"EType","isPattern":"false","id":"E02"}],"attributes":[{"name":"CRA1","type":"CType"}],"providingApplication":"http://www.tid.es/NotifyContextAvailabilityRequestTest2"}}]} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender12.valid.json b/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender12.valid.json deleted file mode 100644 index b1298c1502..0000000000 --- a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender12.valid.json +++ /dev/null @@ -1 +0,0 @@ -{"contextRegistrationResponses":[{"contextRegistration":{"attributes":[{"name":"Attr12","type":"AType","isDomain":"true"}],"providingApplication":"http://tid.test.com/unitTest12"}}]} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender16.valid.json b/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender16.valid.json index b168bc9c47..c67e6d12fe 100644 --- a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender16.valid.json +++ b/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender16.valid.json @@ -1 +1 @@ -{"contextRegistrationResponses":[{"contextRegistration":{"entities":[{"type":"EType","isPattern":"false","id":"E16"}],"attributes":[{"name":"Attr16","type":"AType","isDomain":"true"}],"providingApplication":"http://tid.test.com/unitTest16"}}]} \ No newline at end of file +{"contextRegistrationResponses":[{"contextRegistration":{"entities":[{"type":"EType","isPattern":"false","id":"E16"}],"attributes":[{"name":"Attr16","type":"AType"}],"providingApplication":"http://tid.test.com/unitTest16"}}]} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender6.valid.json b/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender6.valid.json index 40e1e9cb21..b78b57c7fd 100644 --- a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender6.valid.json +++ b/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender6.valid.json @@ -1 +1 @@ -{"contextRegistrationResponses":[{"contextRegistration":{"attributes":[{"name":"Attr1","type":"AType","isDomain":"false"}],"providingApplication":"http://tid.test.com/unitTest6"}}]} \ No newline at end of file +{"contextRegistrationResponses":[{"contextRegistration":{"attributes":[{"name":"Attr1","type":"AType"}],"providingApplication":"http://tid.test.com/unitTest6"}}]} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender7.valid.json b/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender7.valid.json index b8f008dee6..b52567441e 100644 --- a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender7.valid.json +++ b/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender7.valid.json @@ -1 +1 @@ -{"contextRegistrationResponses":[{"contextRegistration":{"attributes":[{"name":"Attr1","type":"AType","isDomain":"false"},{"name":"Attr2","type":"AType","isDomain":"true"}],"providingApplication":"http://tid.test.com/unitTest7"}}]} \ No newline at end of file +{"contextRegistrationResponses":[{"contextRegistration":{"attributes":[{"name":"Attr1","type":"AType"},{"name":"Attr2","type":"AType"}],"providingApplication":"http://tid.test.com/unitTest7"}}]} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender8.valid.json b/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender8.valid.json deleted file mode 100644 index 8a6c7c0b0f..0000000000 --- a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender8.valid.json +++ /dev/null @@ -1 +0,0 @@ -{"contextRegistrationResponses":[{"contextRegistration":{"providingApplication":"http://tid.test.com/unitTest8"}}]} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender9.valid.json b/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender9.valid.json deleted file mode 100644 index 36c9f1ff43..0000000000 --- a/test/unittests/testData/ngsi9.discoverContextAvailabilityResponse.jsonRender9.valid.json +++ /dev/null @@ -1 +0,0 @@ -{"contextRegistrationResponses":[{"contextRegistration":{"providingApplication":"http://tid.test.com/unitTest9"}}]} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.notifyContextAvailabilityRequest.ok.valid.json b/test/unittests/testData/ngsi9.notifyContextAvailabilityRequest.ok.valid.json index 75ce55e651..42bd1ac9e4 100644 --- a/test/unittests/testData/ngsi9.notifyContextAvailabilityRequest.ok.valid.json +++ b/test/unittests/testData/ngsi9.notifyContextAvailabilityRequest.ok.valid.json @@ -1 +1 @@ -{"subscriptionId":"012345678901234567890123","contextRegistrationResponses":[{"contextRegistration":{"entities":[{"type":"Room","isPattern":"false","id":"ConferenceRoom"},{"type":"Room","isPattern":"false","id":"OfficeRoom"}],"attributes":[{"name":"temperature","type":"degree","isDomain":"false"}],"providingApplication":"http://192.168.100.1:70/application"}}]} \ No newline at end of file +{"subscriptionId":"012345678901234567890123","contextRegistrationResponses":[{"contextRegistration":{"entities":[{"type":"Room","isPattern":"false","id":"ConferenceRoom"},{"type":"Room","isPattern":"false","id":"OfficeRoom"}],"attributes":[{"name":"temperature","type":"degree"}],"providingApplication":"http://192.168.100.1:70/application"}}]} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.notifyContextAvailabilityRequest.ok2.valid.json b/test/unittests/testData/ngsi9.notifyContextAvailabilityRequest.ok2.valid.json index ad4074684f..268ec18ca9 100644 --- a/test/unittests/testData/ngsi9.notifyContextAvailabilityRequest.ok2.valid.json +++ b/test/unittests/testData/ngsi9.notifyContextAvailabilityRequest.ok2.valid.json @@ -18,22 +18,7 @@ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/unittests/testData/ngsi9.registerContext.ok.valid.json b/test/unittests/testData/ngsi9.registerContext.ok.valid.json index a2d457f6a4..02b14e294d 100644 --- a/test/unittests/testData/ngsi9.registerContext.ok.valid.json +++ b/test/unittests/testData/ngsi9.registerContext.ok.valid.json @@ -16,22 +16,7 @@ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/unittests/testData/ngsi9.registerContextRequest.badContextRegistrationAttributeIsDomain.invalid.json b/test/unittests/testData/ngsi9.registerContextRequest.badContextRegistrationAttributeIsDomain.invalid.json deleted file mode 100644 index 9026455f0b..0000000000 --- a/test/unittests/testData/ngsi9.registerContextRequest.badContextRegistrationAttributeIsDomain.invalid.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "contextRegistrations": [ - { - "entities": [ - { - "type": "Room", - "isPattern": "false", - "id": "ConferenceRoom" - }, - { - "type": "Room", - "isPattern": "false", - "id": "OfficeRoom" - } - ], - "attributes": [ - { - "name": "temperature", - "type": "degree", - "isDomain": "not_even_false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" - } - ], - "providingApplication": "http://192.168.100.1:70/application" - } - ], - "duration": "PT1M" -} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.registerContextRequest.emptyProvidingApplication.invalid.json b/test/unittests/testData/ngsi9.registerContextRequest.emptyProvidingApplication.invalid.json index e58bd4bc64..d6f575c6bd 100644 --- a/test/unittests/testData/ngsi9.registerContextRequest.emptyProvidingApplication.invalid.json +++ b/test/unittests/testData/ngsi9.registerContextRequest.emptyProvidingApplication.invalid.json @@ -16,26 +16,11 @@ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "" } ], "duration": "PT1M" -} \ No newline at end of file +} diff --git a/test/unittests/testData/ngsi9.registerContextRequest.entityIdWithIsPatternTrue.valid.json b/test/unittests/testData/ngsi9.registerContextRequest.entityIdWithIsPatternTrue.valid.json index a5fac01898..ec9073d305 100644 --- a/test/unittests/testData/ngsi9.registerContextRequest.entityIdWithIsPatternTrue.valid.json +++ b/test/unittests/testData/ngsi9.registerContextRequest.entityIdWithIsPatternTrue.valid.json @@ -16,26 +16,11 @@ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" } ], "duration": "PT1M" -} \ No newline at end of file +} diff --git a/test/unittests/testData/ngsi9.registerContextRequest.invalidIsPatternString.invalid.json b/test/unittests/testData/ngsi9.registerContextRequest.invalidIsPatternString.invalid.json index c26d914a74..8109389624 100644 --- a/test/unittests/testData/ngsi9.registerContextRequest.invalidIsPatternString.invalid.json +++ b/test/unittests/testData/ngsi9.registerContextRequest.invalidIsPatternString.invalid.json @@ -16,26 +16,11 @@ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" } ], "duration": "PT1M" -} \ No newline at end of file +} diff --git a/test/unittests/testData/ngsi9.registerContextRequest.noProvidingApplication.invalid.json b/test/unittests/testData/ngsi9.registerContextRequest.noProvidingApplication.invalid.json index 51b055025a..e005248fc8 100644 --- a/test/unittests/testData/ngsi9.registerContextRequest.noProvidingApplication.invalid.json +++ b/test/unittests/testData/ngsi9.registerContextRequest.noProvidingApplication.invalid.json @@ -16,25 +16,10 @@ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ] } ], "duration": "PT1M" -} \ No newline at end of file +} diff --git a/test/unittests/testData/ngsi9.registerContextRequest.ok.valid.json b/test/unittests/testData/ngsi9.registerContextRequest.ok.valid.json index 12341392cd..c4f7c675ed 100644 --- a/test/unittests/testData/ngsi9.registerContextRequest.ok.valid.json +++ b/test/unittests/testData/ngsi9.registerContextRequest.ok.valid.json @@ -16,26 +16,11 @@ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" } ], "duration": "PT1M" -} \ No newline at end of file +} diff --git a/test/unittests/testData/ngsi9.registerContextRequest.overwriteEntityIdType.invalid.json b/test/unittests/testData/ngsi9.registerContextRequest.overwriteEntityIdType.invalid.json index 65eba7c5d6..e80ffab9b3 100644 --- a/test/unittests/testData/ngsi9.registerContextRequest.overwriteEntityIdType.invalid.json +++ b/test/unittests/testData/ngsi9.registerContextRequest.overwriteEntityIdType.invalid.json @@ -17,26 +17,11 @@ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" } ], "duration": "PT1M" -} \ No newline at end of file +} diff --git a/test/unittests/testData/ngsi9.registerContextRequest.reregistration.valid.json b/test/unittests/testData/ngsi9.registerContextRequest.reregistration.valid.json index c1c78b73a3..42a4d2fcb4 100644 --- a/test/unittests/testData/ngsi9.registerContextRequest.reregistration.valid.json +++ b/test/unittests/testData/ngsi9.registerContextRequest.reregistration.valid.json @@ -16,22 +16,7 @@ "attributes": [ { "name": "temperature", - "type": "degree", - "isDomain": "false", - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "1110" - } - ] - } - ], - "metadatas": [ - { - "name": "ID", - "type": "string", - "value": "2212" + "type": "degree" } ], "providingApplication": "http://192.168.100.1:70/application" diff --git a/test/unittests/testData/ngsi9.registerContextRequestRendered.ok.valid.json b/test/unittests/testData/ngsi9.registerContextRequestRendered.ok.valid.json index cea00a9819..803b09aff2 100644 --- a/test/unittests/testData/ngsi9.registerContextRequestRendered.ok.valid.json +++ b/test/unittests/testData/ngsi9.registerContextRequestRendered.ok.valid.json @@ -1 +1 @@ -{"contextRegistrations":[{"entities":[{"type":"Room","isPattern":"false","id":"ConferenceRoom"},{"type":"Room","isPattern":"false","id":"OfficeRoom"}],"attributes":[{"name":"temperature","type":"degree","isDomain":"false"}],"providingApplication":"http://192.168.100.1:70/application"}],"duration":"PT1M"} \ No newline at end of file +{"contextRegistrations":[{"entities":[{"type":"Room","isPattern":"false","id":"ConferenceRoom"},{"type":"Room","isPattern":"false","id":"OfficeRoom"}],"attributes":[{"name":"temperature","type":"degree"}],"providingApplication":"http://192.168.100.1:70/application"}],"duration":"PT1M"} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.registerContextResponse.badContextRegistrationAttributeIsDomain.valid.json b/test/unittests/testData/ngsi9.registerContextResponse.badContextRegistrationAttributeIsDomain.valid.json deleted file mode 100644 index addb519fc1..0000000000 --- a/test/unittests/testData/ngsi9.registerContextResponse.badContextRegistrationAttributeIsDomain.valid.json +++ /dev/null @@ -1 +0,0 @@ -{"registrationId":"000000000000000000000000","errorCode":{"code":"400","reasonPhrase":"Bad Request","details":"missing isDomain value for registration attribute"}} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.registerProviderRequest.noMetdataName.valid.json b/test/unittests/testData/ngsi9.registerProviderRequest.noMetdataName.valid.json deleted file mode 100644 index 43917a2a79..0000000000 --- a/test/unittests/testData/ngsi9.registerProviderRequest.noMetdataName.valid.json +++ /dev/null @@ -1 +0,0 @@ -{"errorCode":{"code":"400","reasonPhrase":"Bad Request","details":"missing metadata name"}} \ No newline at end of file diff --git a/test/unittests/testData/ngsi9.registerProviderRequest.noRegistrationId.valid.json b/test/unittests/testData/ngsi9.registerProviderRequest.noRegistrationId.valid.json index edba100c40..1d421a6ac4 100644 --- a/test/unittests/testData/ngsi9.registerProviderRequest.noRegistrationId.valid.json +++ b/test/unittests/testData/ngsi9.registerProviderRequest.noRegistrationId.valid.json @@ -1,16 +1,4 @@ { - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1S", "providingApplication" : "http://kz.tid.es/abc" } diff --git a/test/unittests/testData/ngsi9.registerProviderRequest.ok.valid.json b/test/unittests/testData/ngsi9.registerProviderRequest.ok.valid.json index c628a8b852..dfe4a695cd 100644 --- a/test/unittests/testData/ngsi9.registerProviderRequest.ok.valid.json +++ b/test/unittests/testData/ngsi9.registerProviderRequest.ok.valid.json @@ -1,16 +1,4 @@ { - "metadatas" : [ - { - "name" : "ID", - "type" : "string", - "value" : "1110" - }, - { - "name" : "cm2", - "type" : "string", - "value" : "XXX" - } - ], "duration" : "PT1S", "providingApplication" : "http://kz.tid.es/abc", "registrationId" : "001122334455667788991234" From 7e25b65c1f5bf757b5e8dda2b346dabb1a657d53 Mon Sep 17 00:00:00 2001 From: Fermin Galan Marquez Date: Mon, 1 Oct 2018 15:47:08 +0200 Subject: [PATCH 5/6] FIX issue raised in code revie --- src/lib/ngsi/ContextAttribute.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ngsi/ContextAttribute.cpp b/src/lib/ngsi/ContextAttribute.cpp index 593002481c..3869e9bbab 100644 --- a/src/lib/ngsi/ContextAttribute.cpp +++ b/src/lib/ngsi/ContextAttribute.cpp @@ -601,9 +601,9 @@ std::string ContextAttribute::getLocation(ApiVersion apiVersion) const /* **************************************************************************** * -* toJsonV1AsJsonObject - +* toJsonV1AsObject - */ -std::string ContextAttribute::toJsonV1AsJsonObject +std::string ContextAttribute::toJsonV1AsObject ( RequestType request, const std::vector& orderedMetadata, @@ -735,7 +735,7 @@ std::string ContextAttribute::toJsonV1 if (asJsonObject) { - return toJsonV1AsJsonObject(request, orderedMetadata, comma, omitValue); + return toJsonV1AsObject(request, orderedMetadata, comma, omitValue); } out += startTag(); From 6fb4debdee78e69748c42b16bcb06367307f90fa Mon Sep 17 00:00:00 2001 From: Fermin Galan Marquez Date: Mon, 1 Oct 2018 16:38:38 +0200 Subject: [PATCH 6/6] FIX issue raised in code revie --- src/lib/ngsi/ContextAttribute.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/ngsi/ContextAttribute.h b/src/lib/ngsi/ContextAttribute.h index 08da7931c7..fa4da1e452 100644 --- a/src/lib/ngsi/ContextAttribute.h +++ b/src/lib/ngsi/ContextAttribute.h @@ -100,10 +100,10 @@ typedef struct ContextAttribute bool comma = false, bool omitValue = false); - std::string toJsonV1AsJsonObject(RequestType request, - const std::vector& orderedMetadata, - bool comma, - bool omitValue = false); + std::string toJsonV1AsObject(RequestType request, + const std::vector& orderedMetadata, + bool comma, + bool omitValue = false); std::string toJsonV1AsNameString(bool comma);