Problem
The handling of input parameters for p1RemoveOutOfRangeLevels is wrong.
The required solution applies to all Functions. For the 1.0.1_spec version not treating the nested input correctly would not lead to an issue for p1RemoveOutOfRangeLevels, but in future releases it could be necessary to call additional Functions from inside p1RemoveOutOfRangeLevels (or any of the other Functions) and then parameters for those could not be passed correctly anymore.
Details:
The implementation for p1RemoveOutOfRangeLevels reads the parameters input as a flat object:
const parameterStruct1 = {
"lower-tx-level-limit": "10",
"upper-tx-level-limit": "100",
"lower-rx-level-limit": "1000",
"upper-rx-level-limit": "10000"
}
But the specification defines parameters as a structured object containing a parameter array of name/value entries:
"parameters": {
"function-name": "p1RemoveOutOfRangeLevels",
"description": "Removes out-of-range level attributes from a performance data slice",
"is-active": true,
"parameter": [
{
"parameter-name": "lowerTxLevelLimit",
"purpose": "Lower bound of valid values of the transmit level",
"owner": "engineering",
"value": "-30"
},
{
"parameter-name": "upperTxLevelLimit",
"purpose": "Upper bound of valid values of the transmit level",
"owner": "engineering",
"value": "40"
},
{
"parameter-name": "lowerRxLevelLimit",
"purpose": "Lower bound of valid values of the receive level",
"owner": "engineering",
"value": "-129"
},
{
"parameter-name": "upperRxLevelLimit",
"purpose": "Upper bound of valid values of the receive level",
"owner": "engineering",
"value": "-10"
}
],
"sub-function": []
}
the structure of the object from here : https://github.com/openBackhaul/DevicePerformanceManagementDataProcessor/blob/develop/spec/Functions/p1StreamPmData/p1LoadParameters/1.0.0/variables.yaml
Expected behavior
The function should parse and use the spec-defined parameters.parameter[] structure (or at least accept it).
Actual behavior
The function appears to only support the flat keys (e.g., "lower-tx-level-limit") and may fail or ignore limits when provided with the spec-compliant structure.
Problem
The handling of input parameters for p1RemoveOutOfRangeLevels is wrong.
The required solution applies to all Functions. For the 1.0.1_spec version not treating the nested input correctly would not lead to an issue for p1RemoveOutOfRangeLevels, but in future releases it could be necessary to call additional Functions from inside p1RemoveOutOfRangeLevels (or any of the other Functions) and then parameters for those could not be passed correctly anymore.
Details:
The implementation for p1RemoveOutOfRangeLevels reads the parameters input as a flat object:
But the specification defines parameters as a structured object containing a parameter array of name/value entries:
the structure of the object from here : https://github.com/openBackhaul/DevicePerformanceManagementDataProcessor/blob/develop/spec/Functions/p1StreamPmData/p1LoadParameters/1.0.0/variables.yaml
Expected behavior
The function should parse and use the spec-defined parameters.parameter[] structure (or at least accept it).
Actual behavior
The function appears to only support the flat keys (e.g., "lower-tx-level-limit") and may fail or ignore limits when provided with the spec-compliant structure.