Bug #8687
closed
Inconsistent directive API parameters at creation
Added by Alexis Mousset over 8 years ago.
Updated over 8 years ago.
Description
In the directive API:
- the priority attribute in exported, can be modified, but cannot be provided at creation
- the isSystem attribute in exported, can be modified, but cannot be provided at creation
- The isEnabled attribute is called enabled at creation
- Subject changed from Inconsistent API parameters to Inconsistent directive API parameters at creation
We need to ensure that POST (GET url_api) works.
For that case, we need to:
- just add the missing priority parameter,
- remove from documentation the "isXXX" to only keep "XXX" variant,
- keep aliases in code to node break existing script, marking "isXXX" variant deprecated,
- remove in next major API the old "isXXX" values.
Priority works, it just not documented.
We do not accept "isXXX" as parameter, but always "XXX". But we always answer "isXXX"
I don't think "system" should be set/modified
- Assignee set to Vincent MEMBRÉ
- Target version set to 2.11.23
We will:
- Document priority in directive creation (another issue)
- Always send 'xxx' instead of 'isxxx"
- Define a new property 'api compatibility' that is 'disabled' on new install, 'enabled' on migration which allows:
- If "enabled", api will also send "isxxx" in response, which will allow compatibility with old script treating the "isxxx -> xxx" case
- Deprecate all current API in master, so we can create a new one only snedinf 'xxx'
- Remove all deprecated API and the property in master+1
- Status changed from New to In progress
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to François ARMAND
- Pull Request set to https://github.com/Normation/rudder/pull/1136
If you do not accept system, you break the "export then import" workflow, which is the first use of this kind of API.
I suggest that you accept the "system" attribute and return an error if it is true.
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.11.23, 3.1.12 and 3.2.5 which were released today.
Also available in: Atom
PDF