The 'bundles' call translates into bundleContext.getBundles() by virtue of
bundleContext being exposed implicitely and bundles being translated into
the getter call.
For features, you need to access the FeaturesService which is exposed in the
OSGi registry.

With karaf trunk, you could write something like :

fs = ($.context getService ($.context getServiceReference
org.apache.karaf.features.FeaturesService))
each ($fs listFeatures) { echo ($it name) }

Removing the $.context should make it work on your version.



On Wed, Jan 19, 2011 at 10:42, <[email protected]> wrote:

> Greetings!
>
> Could you please help me write the karaf script which shows all feature
> names (only).
> I tried the following:
>  each (features:list) { echo ($it name) }
> based on the example from mail list (it works!):
>  each (bundles) { echo ($it symbolicname) }
>
> But I got the error:
> Error executing command: Argument values is required
>
> Please, advice.
>
> Regards,
> Boris
> _______________________________________________________
>
> The information contained in this message may be privileged and conf
> idential and protected from disclosure. If you are not the original intended
> recipient, you are hereby notified that any review, retransmission,
> dissemination, or other use of, or taking of any action in reliance upon,
> this information is prohibited. If you have received this communication in
> error, please notify the sender immediately by replying to this message and
> delete it from your computer. Thank you for your cooperation. Troika Dialog,
> Russia.
> If you need assistance please contact our Contact Center  (+7495) 258 0500
> or go to www.troika.ru/eng/Contacts/system.wbp
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to