Open miguelagd opened 7 years ago
@miguelagd have you tried sending type and value as null during your PUT commands and just have the actualType and actualValue set?
@miguelagd any feedback, otherwise i'm going to close this...
Sorry. For any reason I did not read the comment you wrote on July. I will test it today, during the day, and I will give you an answer.
Thanks.
@miguelagd have you tried sending type and value as null during your PUT commands and just have the actualType and actualValue set?
I have tried what you proposed without success: Nuage's VSD returns an error if value
is null. Let me give you a complete example of what I tested:
{
"actualType": 6,
"actualValues": ["8.8.8.8" ,"1.1.1.1"],
"length": null,
"type": null,
"value": null
}
[{
"children": null,
"parentType": "subnet",
"entityScope": "ENTERPRISE",
"lastUpdatedBy": "8a6f0e20-a4db-4878-ad84-9cc61756cd5e",
"lastUpdatedDate": 1509979009000,
"creationDate": 1509979009000,
"type": "06",
"length": "08",
"value": "0808080801010101",
"actualValues": [
"8.8.8.8",
"1.1.1.1"
],
"actualType": 6,
"owner": "8a6f0e20-a4db-4878-ad84-9cc61756cd5e",
"ID": "b14566a8-1bfc-4679-9c96-d75151bf21b5",
"parentID": "30119341-9373-47d5-b6c6-f192e8dfe376",
"externalID": null
}]
{
"actualType": 6,
"actualValues": ["8.8.8.8" ,"1.1.1.2"],
"length": "08",
"type": null,
"value": null
}
{
"errors": [
{
"property": "value",
"descriptions": [ {
"title": "Invalid hexadecimal number",
"description": "Value must be a valid padded (multiple of 2) hexadecimal number."
}]
},
{
"property": "type",
"descriptions": [ {
"title": "Invalid hexadecimal number",
"description": "Value must be a valid padded (multiple of 2) hexadecimal number."
}]
}
],
"internalErrorCode": 5000
}
Following the documentation, if
actualType
andactualValues
are defined, in adhcpoption
, they override the values oftype
andvalue
, respectively. However, in a modification (PUT) of adhcpoption
, when bothactualType
andactualValues
are explicitly defined (with no null values) sometimes they are taking into account, modifying thedhcpoption
using them, but sometimes they are ignored, using the values oftype
andvalue
instead.Please, find below a concrete sequence of steps that reproduce the issue:
dhcpoption
--> OK.Json sent:
Json received:
dhcpoption
: --> OK.Json sent:
Json received after a read of the
dhcpoption
:dhcpoption
again --> fails -->actualValues
is ignored, going back to the original value, contained invalue
:Json sent:
Json received after a read of the
dhcpoption
:This behavior has been found in 4.0 R4 and 4.0 R7.