Skip to content

Commit c266011

Browse files
committed
Merge branch 'master' into feature/memCache
2 parents f427e5b + e85304d commit c266011

File tree

229 files changed

+1268
-15881
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+1268
-15881
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ name: CI
66
pull_request:
77
branches:
88
- master
9+
workflow_dispatch:
910
jobs:
1011
lint-markdown:
1112
name: Lint Markdown
@@ -91,3 +92,18 @@ jobs:
9192
uses: coverallsapp/github-action@master
9293
with:
9394
github-token: ${{ secrets.GITHUB_TOKEN }}
95+
96+
dispatch:
97+
needs: unit-test
98+
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
99+
strategy:
100+
matrix:
101+
repo: ['telefonicaid/iotagent-ul', 'telefonicaid/sigfox-iotagent', 'telefonicaid/iotagent-json', 'telefonicaid/lightweightm2m-iotagent', 'telefonicaid/iotagent-manager']
102+
runs-on: ubuntu-latest
103+
steps:
104+
- name: Repository Dispatch
105+
uses: peter-evans/repository-dispatch@v1
106+
with:
107+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
108+
repository: ${{ matrix.repo }}
109+
event-type: lib-update

.readthedocs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
3+
mkdocs:
4+
configuration: mkdocs.yml
5+
6+
python:
7+
version: 3.6

CHANGES_NEXT_RELEASE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- Remove: NGSI-v1 implementation (#966)
2+
- FIx: export fillDomains function to iotagent-node-lib available functions (needed to fix logs in iotagent-json#587 and iotagent-ul#508)
3+
- Fix: keep internalAttributes stored in device mongo collection when update it (#1092)
4+
- Add: new JEXL get TimeZone Offset (valid for summer winter schedulles) and binary shifting for bitwise operator

doc/advanced-topics.md

Lines changed: 52 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
## Advanced Topics
22

3-
* [Secured access to the Context Broker](#secured-access-to-the-context-broker)
4-
* [GeoJSON support this only applies for NGSI-LD, not for NGSI-v1 and NGSI-v2](#geojson-support-this-only-applies-for-ngsi-ld-not-for-ngsi-v1-and-ngsi-v2)
5-
* [Metadata support](#metadata-support)
6-
* [NGSI LD data and metadata considerations](#ngsi-ld-data-and-metadata-considerations)
7-
* [NGSI-LD Linked Data support](#ngsi-ld-linked-data-support)
8-
* [Autoprovision configuration (autoprovision)](#autoprovision-configuration-autoprovision)
9-
* [Explicitly defined attributes (explicitAttrs)](#explicitly-defined-attributes-explicitattrs)
10-
* [Configuring operation to persist the data in Context Broker (appendMode)](#configuring-operation-to-persist-the-data-in-context-broker-appendmode)
11-
* [Data mapping plugins](#data-mapping-plugins)
12-
* [Development](#development)
13-
* [Provided plugins](#provided-plugins)
14-
* [Timestamp Compression plugin (compressTimestamp)](#timestamp-compression-plugin-compresstimestamp)
15-
* [Attribute Alias plugin (attributeAlias)](#attribute-alias-plugin-attributealias)
16-
* [Event plugin (addEvents)](#event-plugin-addevents)
17-
* [Timestamp Processing Plugin (timestampProcess)](#timestamp-processing-plugin-timestampprocess)
18-
* [Expression Translation plugin (expressionTransformation)](#expression-translation-plugin-expressiontransformation)
19-
* [Multientity plugin (multiEntity)](#multientity-plugin-multientity)
20-
* [Bidirectionality plugin (bidirectional)](#bidirectionality-plugin-bidirectional)
21-
* [Autoprovision configuration (autoprovision)](#autoprovision-configuration-autoprovision)
22-
* [Explicitly defined attributes (explicitAttrs)](#explicitly-defined-attributes-explicitattrs)
23-
* [Configuring operation to persist the data in Context Broker (appendMode)](#configuring-operation-to-persist-the-data-in-context-broker-appendmode)
24-
* [Old IoTAgent data migration](#old-iotagent-data-migration)
25-
3+
- [Secured access to the Context Broker](#secured-access-to-the-context-broker)
4+
- [GeoJSON support NGSI-LD only](#geojson-support-ngsi-ld-only)
5+
- [Metadata support](#metadata-support)
6+
- [NGSI LD data and metadata considerations](#ngsi-ld-data-and-metadata-considerations)
7+
- [NGSI-LD Linked Data support](#ngsi-ld-linked-data-support)
8+
- [Autoprovision configuration (autoprovision)](#autoprovision-configuration-autoprovision)
9+
- [Explicitly defined attributes (explicitAttrs)](#explicitly-defined-attributes-explicitattrs)
10+
- [Configuring operation to persist the data in Context Broker (appendMode)](#configuring-operation-to-persist-the-data-in-context-broker-appendmode)
11+
- [Data mapping plugins](#data-mapping-plugins)
12+
- [Development](#development)
13+
- [Provided plugins](#provided-plugins)
14+
- [Timestamp Compression plugin (compressTimestamp)](#timestamp-compression-plugin-compresstimestamp)
15+
- [Attribute Alias plugin (attributeAlias)](#attribute-alias-plugin-attributealias)
16+
- [Event plugin (addEvents)](#event-plugin-addevents)
17+
- [Timestamp Processing Plugin (timestampProcess)](#timestamp-processing-plugin-timestampprocess)
18+
- [Expression Translation plugin (expressionTransformation)](#expression-translation-plugin-expressiontransformation)
19+
- [Multientity plugin (multiEntity)](#multientity-plugin-multientity)
20+
- [Bidirectionality plugin (bidirectional)](#bidirectionality-plugin-bidirectional)
21+
- [Autoprovision configuration (autoprovision)](#autoprovision-configuration-autoprovision)
22+
- [Explicitly defined attributes (explicitAttrs)](#explicitly-defined-attributes-explicitattrs)
23+
- [Configuring operation to persist the data in Context Broker (appendMode)](#configuring-operation-to-persist-the-data-in-context-broker-appendmode)
24+
- [Old IoTAgent data migration](#old-iotagent-data-migration)
2625

2726
### Secured access to the Context Broker
2827

2928
For access to instances of the Context Broker secured with a
3029
[PEP Proxy](https://github.com/telefonicaid/fiware-orion-pep), an authentication mechanism based in Keystone Trust
31-
tokens is provided. A Trust token is a long-term token that can be issued by any user to give another user permissions
32-
to impersonate him with a given role in a given project. Such impersonation itself is in turn based on a short-term
33-
access token.
30+
tokens is provided. A trust token is a way of Keystone to allow an user delegates a role to another user for a
31+
subservice. It is a long-term token that can be issued by any user to give another user permissions to impersonate him
32+
with a given role in a given project (subservice). Such impersonation itself is in turn based on a short-term access
33+
token.
3434

3535
For the authentication mechanisms to work, the `authentication` attribute in the configuration has to be fully
3636
configured, and the `authentication.enabled` subattribute should have the value `true`.
@@ -70,7 +70,12 @@ curl http://${KEYSTONE_HOST}/v3/OS-TRUST/trusts \
7070
Apart from the generation of the trust, the use of secured Context Brokers should be transparent to the user of the IoT
7171
Agent.
7272

73-
### GeoJSON support (this only applies for NGSI-LD, not for NGSI-v1 and NGSI-v2)
73+
Complete info on Keystone trust tokens could be found at:
74+
75+
- [Trusts concept](https://docs.openstack.org/keystone/stein/user/trusts)
76+
- [Trusts API](https://docs.openstack.org/keystone/stein/api_curl_examples.html#post-v3-os-trust-trusts)
77+
78+
### GeoJSON support NGSI-LD only
7479

7580
The defined `type` of any GeoJSON attribute can be any set to any of the standard NGSI-v2 GeoJSON types - (e.g.
7681
`geo:json`, `geo:point`). NGSI-LD formats such as `GeoProperty`, `Point` and `LineString` are also accepted `type`
@@ -263,26 +268,28 @@ updated as shown:
263268

264269
### Autoprovision configuration (autoprovision)
265270

266-
By default, when a measure arrives to the IoTAgent, if the `device_id` does not match with an existing one, then, the IoTA
267-
creates a new device and a new entity according to the group config. Defining the field `autoprovision` to `false`
268-
when provisioning the device group, the IoTA to reject the measure at the southbound, allowing only to persist the
269-
data to devices that are already provisioned. It makes no sense to use this field in device provisioning since it is
270-
intended to avoid provisioning devices (and for it to be effective, it would have to be provisional).
271+
By default, when a measure arrives to the IoTAgent, if the `device_id` does not match with an existing one, then, the
272+
IoTA creates a new device and a new entity according to the group config. Defining the field `autoprovision` to `false`
273+
when provisioning the device group, the IoTA to reject the measure at the southbound, allowing only to persist the data
274+
to devices that are already provisioned. It makes no sense to use this field in device provisioning since it is intended
275+
to avoid provisioning devices (and for it to be effective, it would have to be provisional).
271276

272277
### Explicitly defined attributes (explicitAttrs)
273278

274-
If a given measure element (object_id) is not defined in the mappings of the device or group provision, the measure is stored
275-
in the Context Broker by adding a new attribute to the entity with the same name of the undefined measure element. By adding the
276-
field `explicitAttrs` with `true` value to device or group provision, the IoTAgent rejects the measure elements that are not defined
277-
in the mappings of device or group provision, persisting only the one defined in the mappings of the provision. If `explicitAttrs`
278-
is provided both at device and group level, the device level takes precedence.
279+
If a given measure element (object_id) is not defined in the mappings of the device or group provision, the measure is
280+
stored in the Context Broker by adding a new attribute to the entity with the same name of the undefined measure
281+
element. By adding the field `explicitAttrs` with `true` value to device or group provision, the IoTAgent rejects the
282+
measure elements that are not defined in the mappings of device or group provision, persisting only the one defined in
283+
the mappings of the provision. If `explicitAttrs` is provided both at device and group level, the device level takes
284+
precedence.
279285

280286
### Configuring operation to persist the data in Context Broker (appendMode)
281287

282-
This is a flag that can be enabled by activating the parameter `appendMode` in the configuration file or by using the `IOTA_APPEND_MODE`
283-
environment variable (more info [here](https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/installationguide.md)).
284-
If this flag is activated, the update requests to the Context Broker will be performed always with APPEND type, instead of the
285-
default UPDATE. This have implications in the use of attributes with Context Providers, so this flag should be used with care.
288+
This is a flag that can be enabled by activating the parameter `appendMode` in the configuration file or by using the
289+
`IOTA_APPEND_MODE` environment variable (more info
290+
[here](https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/installationguide.md)). If this flag is
291+
activated, the update requests to the Context Broker will be performed always with APPEND type, instead of the default
292+
UPDATE. This have implications in the use of attributes with Context Providers, so this flag should be used with care.
286293

287294
### Data mapping plugins
288295

@@ -367,8 +374,8 @@ events in the IoT Agent with the configured type name will be marked as events.
367374

368375
##### Timestamp Processing Plugin (timestampProcess)
369376

370-
This plugin processes the entity attributes looking for a `TimeInstant` attribute. If one is found, for NGSI-v1/NGSIv2,
371-
the plugin adds a `TimeInstant` attribute as metadata for every other attribute in the same request. With NGSI-LD, the
377+
This plugin processes the entity attributes looking for a `TimeInstant` attribute. If one is found, for NGSIv2, the
378+
plugin adds a `TimeInstant` attribute as metadata for every other attribute in the same request. With NGSI-LD, the
372379
Standard `observedAt` property-of-a-property is used instead.
373380

374381
##### Expression Translation plugin (expressionTransformation)
@@ -432,7 +439,8 @@ When a device is provisioned with bidirectional attributes, the IoTAgent subscri
432439
change notification for that attribute arrives to the IoTA, it applies the transformation defined in the device
433440
provisioning payload to the notification, and calls the underlying notification handler with the transformed entity.
434441

435-
The following `attributes` section shows an example of the plugin configuration (using IOTA_AUTOCAST=false to avoid translation from geo:point to geo:json)
442+
The following `attributes` section shows an example of the plugin configuration (using IOTA_AUTOCAST=false to avoid
443+
translation from geo:point to geo:json)
436444

437445
```json
438446
"attributes": [

0 commit comments

Comments
 (0)