Commit adfef206 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

feat: add an option to automatically delete a temporal entity when corresponding entity is deleted

parent c5078d2e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -78,6 +78,8 @@ Default value: `0.0.0.0` and `8086`.
- `context_server_host` and `context_server_port` : The address and port used for the context server provider. 
Default value: `0.0.0.0` and `8087`.
- `core_context`: The default cached core context used by the Brokers.
- `delete_temporal_on_core_delete`: Whether the Temporal Representation of an Entity should be deleted when an Entity is deleted.
Default value: True

When you execute locally the tests, you can leave the default values as they are. NGSI-LD Test Suite provides
a mockup services to provide the notification functionality and therefore the notification_server_host can be
+4 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ Library RequestsLibrary
Library         OperatingSystem
Library         Collections
Library         JSONLibrary
Resource        ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource
Resource        ${EXECDIR}/resources/JsonUtils.resource


@@ -241,6 +242,9 @@ Delete Entity by Id
    ${response}=    DELETE
    ...    url=${base_url}/${ENTITIES_ENDPOINT_PATH}${id}
    ...    expected_status=any
    IF    ${delete_temporal_on_core_delete}
        Delete Temporal Representation Of Entity    ${id}
    END
    Output    ${response}    Delete Entity by Id
    RETURN    ${response}

+3 −0
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@ context_server_host = '0.0.0.0'
context_server_port = 8087
core_context = 'https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld'

# whether the Temporal Representation of an Entity should be deleted when an Entity is deleted
delete_temporal_on_core_delete = True

#DistOps variables
remote_url = 'http://0.0.0.0:8081/ngsi-ld/v1'
context_source_endpoint  = 'http://0.0.0.0:8081'