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

DOC: explicitAttributes true: just active attributes, not measures #1500

Closed
AlvaroVega opened this issue Oct 5, 2023 · 5 comments
Closed

Comments

@AlvaroVega
Copy link
Member

IoT Agent Node Lib version the issue has been seen with

3.2.0

Bound or port used (API interaction)

Southbound (Devices data API)

NGSI version

NGSIv2

Are you running a container?

Yes, I am using a contaner (Docker, Kubernetes...)

Image type

normal

Expected behaviour you didn't see

explicitAttributes true:
Just be attributes defined in active. Not measures.

Unexpected behaviour you saw

explicitAttributes true:

https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#explicitly-defined-attributes-explicitattrs

Case 2:

"explicitAttrs": true

just measures defined in active, static (plus conditionally TimeInstant) will be propagated to NGSI interface.

https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#explicitly-defined-attributes-explicitattrs

Steps to reproduce the problem

No response

Configs

environment:
    - "IOTA_CB_HOST=orion"
    - "IOTA_CB_PORT=1026"
    - "IOTA_NORTH_PORT=4041"
    - "IOTA_REGISTRY_TYPE=mongodb"
    - "IOTA_MONGO_HOST=mongodb"
    - "IOTA_MONGO_PORT=27017"
    - "IOTA_MONGO_DB=iotagent-json"
    - "IOTA_HTTP_PORT=7896"
    - "IOTA_PROVIDER_URL=http://iot-agent:4041"

Log output

No response

@AlvaroVega
Copy link
Member Author

describe('When an update comes for a multientity measurement explicitAttrs for several entities', function () {
const values = [
{
name: 'x',
type: 'Number',
value: 52
},
{
name: 'y',
type: 'Number',
value: 13
},
{
name: 'z',
type: 'Number',
value: 12
}
];
beforeEach(function () {
nock.cleanAll();
contextBrokerMock = nock('http://192.168.1.1:1026')
.matchHeader('fiware-service', 'smartgondor')
.matchHeader('fiware-servicepath', 'gardens')
.post(
'/v2/op/update',
utils.readExampleFile(
'./test/unit/ngsiv2/examples/contextRequests/updateContextMultientityPlugin25.json'
)
)
.reply(204);
});
it('should remove hidden attrs from the value', function (done) {
iotAgentLib.update('gps1', 'GPS1', '', values, function (error) {
should.not.exist(error);
contextBrokerMock.done();
done();
});
});
});

@AlvaroVega
Copy link
Member Author

PR about test: #1502

@AlvaroVega
Copy link
Member Author

Related PRs with explicitAttrs:

#1355

@AlvaroVega AlvaroVega changed the title explicitAttributes true: just active attributes, not measures DOC: explicitAttributes true: just active attributes, not measures Oct 6, 2023
@AlvaroVega
Copy link
Member Author

PR for fix this issue: 3af2219

@fgalan
Copy link
Member

fgalan commented Oct 6, 2023

That commit belongs to PR #1502, which has been closed.

Should this issue be closed also?

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

2 participants