Open jason-fox opened 2 years ago
The crux of the issue is should Orion-LD spoof the attrsFormat
back to normalized
or should Cygnus accept a wider range of acceptable formats (i.e. allowing x-ngsiv2-normalized-compacted
= normalized
) or both?
@mapedraza @kzangeli
Since the data is processed by NGSIv2 endpoint, it makes sense that the values allowed for attrsFormat
are aligned with the NGSIv2 specification ( attrsFormat
= normalized
)
In addition, according to the NGSIv2 specification (section Notification Messages), we can see only specified values are allowed.
Notifications must include the Ngsiv2-AttrsFormat HTTP header with the value of the format of the associated subscription, so that notification receivers are aware of the format without needing to process the notification payload."
Note that Cygnus only process notifications in normalized mode, keyValues
or custom
does not have sense
So, sure, Orion-LD could use the older names of "normalized" and "keyValues". These would imply expanded values for attribute names and entity types.
For compacted values, we add "-compact" ?
For compacted values, we add "-compact" ?
- "normalized-compact"
- "keyValues-compact" ?
I would say NO - normalized is just normalized regardless of whether it is expanded or compacted. An NGSI-v2 notification has no concept of "compact" since it doesn't deal with linked data JSON-LD compaction. so just call of all of the available x-ngsiv2-
compatible formats with the headers Ngsiv2-AttrsFormat=normalized
or Ngsiv2-AttrsFormat=keyValues
only.
With an NGSI-v2 notification you are not dealing with @context
any more.
ok, we kind of lose valuable info there. However, that info is part of the subscription, so, I guess it's not quite lost.
If all are OK with this, I'll modify Orion-LD accordingly-
If all are OK with this, I'll modify Orion-LD accordingly-
So, no action in Cygnus? Can this issue be closed here?
Looks like an Orion-LD change, but leave it open until we can confirm that it is fixed.
Problem reported in the last TSC where status of Cygnus was followed up. Apparently, Cygnus doesn’t know how to process part of the header sent with the notification. Not sure if this a Cygnus fix or an Orion-LD fix.
NGSI-v2 with Orion - works as expected
Using
fiware/cygnus-ngsi
Using
fiware/orion
Open up the supermarket, switch on the lamp & etc. Create a v2 subscription on Cygnus MySQL port using
attrsFormat: normalized
Verify subscription
NGSI-v2 with Orion-LD in backwards compatibility mode - not working
Using
fiware/cygnus-ngsi
Using
fiware/orion-ld
Open up the farm, start the tractor & etc. Create a v2 subscription on Cygnus MySQL port using
attrsFormat: x-ngsiv2-normalized-compacted
Verify subscriptions
NGSI-LD Payload is
x-ngsiv2-normalized-compacted
which is valid NGSI-v2Cygnus Log