[ 
https://issues.apache.org/jira/browse/FELIX-6363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17243287#comment-17243287
 ] 

Peter Grape commented on FELIX-6363:
------------------------------------

Yes, a proper single property update command that really does what is stated 
would be good.

A simple added "update" option which then disables the clear function should 
solve the logic and be transparent for the webgui.

So: 

{color:#FF0000}curl -u admin:admin -X POST -d "apply=true" *-d "update=true"* 
-d "propertylist=foo,bar" -d "foo=51" -d "bar=hello" 
http://localhost:8080/system/console/configMgr/com.acme.MyPid{color}

 

I assume the function is there for a clean apply of all options every time in 
the webgui, if you would delete a value, it would not be removed if all the 
values are not cleared on every call.

 

BTW.

I also found out that applying all the options w/o any values worked for all 
types except for array which was cleared.

 

> Updating OSGI configuration via REST API deletes unreferenced properties
> ------------------------------------------------------------------------
>
>                 Key: FELIX-6363
>                 URL: https://issues.apache.org/jira/browse/FELIX-6363
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>            Reporter: Peter Grape
>            Priority: Major
>
> When updating a single value using the REST API the unreferenced properties 
> in a configuration is deleted, this is not what the documentation is saying 
> on: 
> [https://felix.apache.org/documentation/subprojects/apache-felix-web-console/web-console-restful-api.html#configuration-admin-plugin]
> If I instead add all the properties to the propertyList parameter all those 
> referenced are updated and/or saved .
>  
> This cannot be right because I will then have to query for all parameters 
> before I am able to update a single one.
> Since there is a delete option in the REST API this should only as stated in 
> the documentation update the referenced parameters and leave all others 
> untouched.
>  
> Either add an extra option with the possibility to delete unreferenced 
> properties.
> or remove the code all together.
>  
> The code that does the deletion is here: 
> [https://github.com/apache/felix-dev/blob/ab2c3ac3a570ba316daeb6368bab8193805f37c0/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigAdminSupport.java#L304]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to