[
https://issues.apache.org/jira/browse/ARIA-247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ran Ziv updated ARIA-247:
-------------------------
Summary: Automatically infer single-package plugins package prefix (was:
Automatically inferring single-package plugins package prefix)
> Automatically infer single-package plugins package prefix
> ---------------------------------------------------------
>
> Key: ARIA-247
> URL: https://issues.apache.org/jira/browse/ARIA-247
> Project: AriaTosca
> Issue Type: Story
> Reporter: Ran Ziv
> Priority: Trivial
>
> When mapping an operation implementation in the service template to some
> plugin, one would usually map it like so:
> {code}
> implementation: my_plugin > my_package.my_module.my_function
> {code}
> We could improve on this and possibly help masking the "Python" aspect of
> this path if the {{PluginManager}} class, when loading a plugin, would
> automatically infer the {{my_package}} prefix when it comes to single-package
> plugins (a common case).
> That would allow for the implementation to also look like this:
> {code}
> implementation: my_plugin > my_module.my_function
> {code}
> Then, plugin authors could also alias operations entry points in the
> package's {{__init__.py}} file, and thereby allowing the implementation line
> so simply be:
> {code}
> implementation: my_plugin > my_function
> {code}
> Which is much neater.
> (Note that supporting both cases, i.e. both inferring and also trying the
> exact implementation string, may cause ambiguity in some scenarios)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)