João,
I would prefer not to add component bundles whose sole purpose is to pass 
configuration values from pid.cfg to a command via @Reference.

Paul Spencer

> On May 13, 2022, at 9:48 AM, João Assunção <[email protected]> 
> wrote:
> 
> Why not have the components implement the required operations as a service, 
> or expose those values in some service operation, and then make the shell 
> command use that service ?
> 
> João Assunção
> 
> Email: [email protected]
> Mobile: +351 916968984
> Phone: +351 211933149
> Web: www.exploitsys.com
> 
> 
> 
> 
> On Fri, May 13, 2022 at 2:27 PM Paul Spencer <[email protected]> 
> wrote:
> JB,
> The command needs to use values stored in pid.cfg files, like instance 
> specific CustomerName, just like other components.
> 
> Paul Spencer
> 
> > On May 13, 2022, at 1:46 AM, Jean-Baptiste Onofré <[email protected]> wrote:
> > 
> > Hi Paul,
> > 
> > Not sure I understand exactly the request, but you can do:
> > 
> > config:edit pid
> > config:property-list ...
> > config:cancel | config:commit
> > 
> > Regards
> > JB
> > 
> > On Thu, May 12, 2022 at 6:38 PM Paul Spencer <[email protected]> 
> > wrote:
> >> 
> >> Karaf 4.3.6
> >> I am looking to load configuration into a shell command, but I do not see 
> >> where to set the configuration PID nor do I see where the configuration is 
> >> passed or injected into the Action class.
> >> 
> >> 
> >> In a component, the configuration loaded by @Activate is defined by 
> >> @Component and the configurationPid attribute. What are the equivalents 
> >> for shell commands, class that implement 
> >> org.apache.karaf.shell.api.action.Action?
> >> 
> >> Paul Spencer
> 

Reply via email to