[ 
https://issues.apache.org/jira/browse/FELIX-5951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raymond Augé updated FELIX-5951:
--------------------------------
    Description: 
I'd like to propose adding the service properties:
{{osgi.command.scope = 'cm'}} and {{osgi.command.function = 
ConfigurationAdmin.class.getDeclaredMethods() }} to the ConfigurationAdmin 
service.

Here are some examples that this would enable:
{code:bash}
# store a pid for reuse
g! pid = "foo"
## CM - get configurations
g! cm:listconfigurations "(service.pid=$pid)"
## CM - get single configuration
g! config = (cm:listconfigurations "(service.pid=$pid)") 0
## CM - create configuration
g! config = cm:getconfiguration $pid "?"
## CM - delete configuration
g! $config delete
## CM - list configuration properties
g! $config properties
## CM - update configuration from existing properties
g! props = ($config properties)
g! $props put "foo" 20
g! $config update $props
## CM - update configuration with new properties
g! props = (new java.util.Hashtable)
g! $props put "foo" 20
g! $config update $props
{code}

  was:
I'd like to propose adding the service properties:
{{osgi.command.scope = 'cm'}} and {{osgi.command.function = 
ConfigurationAdmin.class.getDeclaredMethods() }} to the ConfigurationAdmin 
service.

Here are some examples that this would enable:
{code:shell}
# store a pid for reuse
g! pid = "foo"
## CM - get configurations
g! cm:listconfigurations "(service.pid=$pid)"
## CM - get single configuration
g! config = (cm:listconfigurations "(service.pid=$pid)") 0
## CM - create configuration
g! config = cm:getconfiguration $pid "?"
## CM - delete configuration
g! $config delete
## CM - list configuration properties
g! $config properties
## CM - update configuration from existing properties
g! props = ($config properties)
g! $props put "foo" 20
g! $config update $props
## CM - update configuration with new properties
g! props = (new java.util.Hashtable)
g! $props put "foo" 20
g! $config update $props
{code}


> Automatically add ConfigurationAdmin service as a shell command
> ---------------------------------------------------------------
>
>                 Key: FELIX-5951
>                 URL: https://issues.apache.org/jira/browse/FELIX-5951
>             Project: Felix
>          Issue Type: New Feature
>          Components: Configuration Admin
>            Reporter: Raymond Augé
>            Assignee: Raymond Augé
>            Priority: Minor
>             Fix For: configadmin-1.9.10
>
>
> I'd like to propose adding the service properties:
> {{osgi.command.scope = 'cm'}} and {{osgi.command.function = 
> ConfigurationAdmin.class.getDeclaredMethods() }} to the ConfigurationAdmin 
> service.
> Here are some examples that this would enable:
> {code:bash}
> # store a pid for reuse
> g! pid = "foo"
> ## CM - get configurations
> g! cm:listconfigurations "(service.pid=$pid)"
> ## CM - get single configuration
> g! config = (cm:listconfigurations "(service.pid=$pid)") 0
> ## CM - create configuration
> g! config = cm:getconfiguration $pid "?"
> ## CM - delete configuration
> g! $config delete
> ## CM - list configuration properties
> g! $config properties
> ## CM - update configuration from existing properties
> g! props = ($config properties)
> g! $props put "foo" 20
> g! $config update $props
> ## CM - update configuration with new properties
> g! props = (new java.util.Hashtable)
> g! $props put "foo" 20
> g! $config update $props
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to