-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[freeboxos] Fix enabling/disabling of Mac OS file sharing #17203
Conversation
Fix openhab#17200 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Replace an enum with a string? I would opt to change the configuration parameter to have options in the xml, so the value can be chosen from the UI. For file based config, I propose to add a check in the initialize method. This check would check if the enum.valueOf(config.parameter.topUpper()) throws an illegal argument exception and set the thing state to configuration_error accordingly. string is also possible, but with a limited list I would really prefer enum. |
This is only an API field that is returned by the API and just provided to the API when changing the config. |
To be clear, we need to keep the raw value returned by the get API to then provide it when calling the set API. |
Look at lines 61-63 to understand. It is not OH thing configuration but Freebox OS config REST API. |
Based on the text in the linked issue I thought it was the openHAB config. Nevertheless still prefer proper enum conversion, no magic strings in the code, but it ie much less important and certainly not blocking. LGTM |
API filed is a string. |
Still I don't understand the purpose of removing the enum. |
The get API returns value "airport" in lowercase for the field server_type. @clinique : is it clearer now ? Edit: look at what you did in |
) Fix openhab#17200 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Partial revert of openhab#17203 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
) Fix openhab#17200 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
…ng) (openhab#17284) Partial revert of openhab#17203 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
) Fix openhab#17200 Signed-off-by: Laurent Garnier <lg.hc@free.fr> Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
…ng) (openhab#17284) Partial revert of openhab#17203 Signed-off-by: Laurent Garnier <lg.hc@free.fr> Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
) Fix openhab#17200 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
…ng) (openhab#17284) Partial revert of openhab#17203 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
) Fix openhab#17200 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
…ng) (openhab#17284) Partial revert of openhab#17203 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Fix #17200
Signed-off-by: Laurent Garnier lg.hc@free.fr