Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cygnus-ngsi][NGSINameMappingsInterceptor] Allow regular expression replacement for EntityIds #1456

Closed
dmartinezgomez opened this issue Oct 2, 2017 · 1 comment

Comments

@dmartinezgomez
Copy link
Collaborator

dmartinezgomez commented Oct 2, 2017

The current behavior is that only RegEx Matching is allowed with a constant replacement.
It will be nice to allow the use of reular expressions also in replacement.

E.g.
Entities like: "Air_0001","Air_0002","Air_0003","Air_0004",...
should be mapped like: "AirQualityObserved0001",...

{
  "serviceMappings": [{
    "originalService": "service",
    "newService": "new_service",
    "servicePathMappings": [{
      "originalServicePath": "/subservice",
      "newServicePath": "/new_subservice",
      "entityMappings": [{
        "originalEntityType": "entity_type",
        "originalEntityId": "(Air_)([0-9]*)",
        "newEntityId": "AirQualityObserved$2",
        "attributeMappings": []
      }]
    }]
  }]
}
@fgalan
Copy link
Member

fgalan commented Oct 4, 2017

Implemented by PR #1457

@fgalan fgalan added this to the release/1.9.0 milestone Oct 4, 2017
dmartinezgomez added a commit that referenced this issue Oct 4, 2017
[cygnus-ngsi][NGSINameMappingsInterceptor] Repharsing: Pull request #1456
@frbattid frbattid closed this as completed Oct 4, 2017
@fgalan fgalan added the techdebt label Oct 4, 2017
@pmo-sdr pmo-sdr self-assigned this Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants