Commit a5cac51b authored by Ken Zangelin's avatar Ken Zangelin
Browse files

fix(distops): exclusive registrations name the entity ids and do not overlap...

fix(distops): exclusive registrations name the entity ids and do not overlap local data (TS 104-175 clause 9.3.3)

An exclusive registration is for specific entity ids, and its attributes are not held locally as well.
- D012-D016 (batch create, upsert, update, delete, merge): the exclusive registration names the two entity ids
  the test creates instead of an id pattern (context-source-registration-vehicle-speed-with-batch-ops.jsonld
  now has one information item per entity id); the locally created entities
  do not carry the registered attribute (speed). D013 checks that the forwarded entities are the two ids
  with speed.
- D003 (append): the attribute fragment is sent with the suite's @context, so its names expand to the
  registration's IRIs; the local entity is created local=true and lacks speed.
- D005: the local entity does not carry the registered attribute.
- D006 (redirect): no local copy of the entity is created.
- 033_01 (create a registration with mode and operations): the registration names an idPattern, so it is
  redirect, not exclusive.
Keywords: Append Entity Attributes and Append Entity Attributes With Parameters take an optional context (a Link header);
Prepare Context Source Registration From File takes a second entity id.
parent f389b3c7
Loading
Loading
Loading
Loading
+2 −1
Changes for TP/NGSI-LD/DistributedOperations/Provision/BatchEntities/CreateBatchOfEntities/D012_01_exc.robot: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -59,7 +59,8 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo
    ${registration_payload}=    Prepare Context Source Registration From File
    ...    ${registration_id}
    ...    ${registration_payload_file_path}
    ...    entity_id_pattern=${entity_pattern}
    ...    entity_id=${first_entity_id}
    ...    entity_id2=${second_entity_id}
    ...    mode=exclusive
    ...    endpoint=/broker1
    ${response}=    Create Context Source Registration With Return    ${registration_payload}
+3 −2
Changes for TP/NGSI-LD/DistributedOperations/Provision/BatchEntities/DeleteBatchOfEntities/D015_01_exc.robot: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ Test Teardown Delete Registration And Stop Context Source Mock Server


*** Variables ***
${entity_payload_filename}              vehicle-simple-different-attributes.jsonld
${entity_payload_filename}              vehicle-simple-attributes-second.jsonld
${entity_pattern}                       urn:ngsi-ld:Vehicle:*
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-speed-with-batch-ops.jsonld

@@ -58,7 +58,8 @@ Create Entities And Registration And Start Context Source Mock Server
    ${registration_payload}=    Prepare Context Source Registration From File
    ...    ${registration_id}
    ...    ${registration_payload_file_path}
    ...    entity_id_pattern=${entity_pattern}
    ...    entity_id=${first_entity_id}
    ...    entity_id2=${second_entity_id}
    ...    mode=exclusive
    ...    endpoint=/broker1
    ${response}=    Create Context Source Registration With Return    ${registration_payload}
+2 −1
Changes for TP/NGSI-LD/DistributedOperations/Provision/BatchEntities/MergeBatchOfEntities/D016_01_exc.robot: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -66,7 +66,8 @@ Create Entity And Registration On The Context Broker And Start Context Source Mo
    ${registration_payload}=    Prepare Context Source Registration From File
    ...    ${registration_id}
    ...    ${registration_payload_file_path}
    ...    entity_id_pattern=${entity_pattern}
    ...    entity_id=${first_entity_id}
    ...    entity_id2=${second_entity_id}
    ...    mode=exclusive
    ...    endpoint=/broker1
    ${response}=    Create Context Source Registration With Return    ${registration_payload}
+3 −2
Changes for TP/NGSI-LD/DistributedOperations/Provision/BatchEntities/UpdateBatchOfEntities/D014_01_exc.robot: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ Test Teardown Delete Registration And Stop Context Source Mock Server


*** Variables ***
${entity_payload_filename}              vehicle-simple-different-attributes.jsonld
${entity_payload_filename}              vehicle-simple-attributes-second.jsonld
${update_payload_filename}              expectations/vehicle-replace-isParked-attribute.jsonld
${entity_pattern}                       urn:ngsi-ld:Vehicle:*
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-speed-with-batch-ops.jsonld
@@ -56,7 +56,8 @@ Setup Registration And Start Context Source Mock Server
    ${registration_payload}=    Prepare Context Source Registration From File
    ...    ${registration_id}
    ...    ${registration_payload_file_path}
    ...    entity_id_pattern=${entity_pattern}
    ...    entity_id=${first_entity_id}
    ...    entity_id2=${second_entity_id}
    ...    mode=exclusive
    ...    endpoint=/broker1
    ${response1}=    Create Context Source Registration With Return    ${registration_payload}
+3 −2
Changes for TP/NGSI-LD/DistributedOperations/Provision/BatchEntities/UpdateBatchOfEntities/D014_02_exc.robot: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ Test Teardown Delete Registration And Stop Context Source Mock Server


*** Variables ***
${entity_payload_filename}              vehicle-simple-different-attributes.jsonld
${entity_payload_filename}              vehicle-simple-attributes-second.jsonld
${update_payload_filename}              expectations/vehicle-replace-isParked-attribute.jsonld
${entity_pattern}                       urn:ngsi-ld:Vehicle:*
${registration_payload_file_path}       csourceRegistrations/context-source-registration-vehicle-speed-with-batch-ops.jsonld
@@ -59,7 +59,8 @@ Setup Registration And Start Context Source Mock Server
    ${registration_payload}=    Prepare Context Source Registration From File
    ...    ${registration_id}
    ...    ${registration_payload_file_path}
    ...    entity_id_pattern=${entity_pattern}
    ...    entity_id=${first_entity_id}
    ...    entity_id2=${second_entity_id}
    ...    mode=exclusive
    ...    endpoint=/broker1
    ${response1}=    Create Context Source Registration With Return    ${registration_payload}
Loading