Re: [openstack-dev] [mistral] mistral actions plugin architecture

2015-02-18 Thread Renat Akhmerov
Hi Filip,

Well, it’s not necessary to keep custom action sources as part of Mistral 
sources. You can keep them anywhere else but the only requirement is that they 
must be registered globally in python packages so that  when Mistral parses 
entry points in setup.cfg it could find needed classes using their fully 
qualified names. To do that you can use regular well known python procedures 
(setuptools etc.)

Hope this helps

Renat Akhmerov
@ Mirantis Inc.



 On 18 Feb 2015, at 14:55, Filip Blaha filip.bl...@hp.com wrote:
 
 Thanks for answer!
 
 A custom action inherits from base.Action. So if I need to write custom 
 action in different project and register it via entry points then I need 
 dependency on mistral sources. Is that correct? Or is there way how to create 
 custom action without that dependency?
 
 Regards
 Filip
 
 On 02/09/2015 04:58 PM, Renat Akhmerov wrote:
 Hi,
 
 It’s pretty simple and described in 
 http://mistral.readthedocs.org/en/master/developer/writing_a_plugin_action.html
  
 http://mistral.readthedocs.org/en/master/developer/writing_a_plugin_action.html.
 
 Renat Akhmerov
 @ Mirantis Inc.
 
 
 
 On 09 Feb 2015, at 21:43, Filip Blaha filip.bl...@hp.com 
 mailto:filip.bl...@hp.com wrote:
 
 Hi all,
 
 regarding to [1] there should be some plugin mechanism for custom actions 
 in Mistral. I went through code and I found some introspection mechanism 
 [2] generating mistral actions from methods on client classes for openstack 
 core projects. E.g. it takes nova client class (python-novaclient) and 
 introspects its methods and theirs parameters and creates corresponding 
 actions with corresponding parameters. The same for other core projects 
 like neutron, cinder, ... However the list of  these client classes seems 
 to be hardcoded [3].  So I am not sure whether this mechanism can be used 
 for other projects like murano client to create murano related actions in 
 mistral? Or is there any other pluggable mechanism to get murano actions 
 into mistral without hardcoding in mistral project?
 
 [1] 
 https://wiki.openstack.org/wiki/Mistral/Blueprints/ActionsDesign#Plugin_Architecture
  
 https://wiki.openstack.org/wiki/Mistral/Blueprints/ActionsDesign#Plugin_Architecture
  
 [2] 
 https://github.com/stackforge/mistral/blob/master/mistral/actions/openstack/action_generator/base.py#L91
  
 https://github.com/stackforge/mistral/blob/master/mistral/actions/openstack/action_generator/base.py#L91
  
 [3] 
 https://github.com/stackforge/mistral/blob/master/mistral/actions/generator_factory.py
  
 https://github.com/stackforge/mistral/blob/master/mistral/actions/generator_factory.py
  
 
 
 Regards
 Filip
 
 __
 OpenStack Development Mailing List (not for usage questions)
 Unsubscribe: openstack-dev-requ...@lists.openstack.org 
 mailto:openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev 
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
 
 
 
 __
 OpenStack Development Mailing List (not for usage questions)
 Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe 
 mailto:openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev 
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
 
 __
 OpenStack Development Mailing List (not for usage questions)
 Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [mistral] mistral actions plugin architecture

2015-02-18 Thread Filip Blaha

Thanks for answer!

A custom action inherits from base.Action. So if I need to write custom 
action in different project and register it via entry points then I need 
dependency on mistral sources. Is that correct? Or is there way how to 
create custom action without that dependency?


Regards
Filip

On 02/09/2015 04:58 PM, Renat Akhmerov wrote:

Hi,

It’s pretty simple and described in 
http://mistral.readthedocs.org/en/master/developer/writing_a_plugin_action.html.


Renat Akhmerov
@ Mirantis Inc.



On 09 Feb 2015, at 21:43, Filip Blaha filip.bl...@hp.com 
mailto:filip.bl...@hp.com wrote:


Hi all,

regarding to [1] there should be some plugin mechanism for custom 
actions in Mistral. I went through code and I found some 
introspection mechanism [2] generating mistral actions from methods 
on client classes for openstack core projects. E.g. it takes nova 
client class (python-novaclient) and introspects its methods and 
theirs parameters and creates corresponding actions with 
corresponding parameters. The same for other core projects like 
neutron, cinder, ... However the list of  these client classes seems 
to be hardcoded [3].  So I am not sure whether this mechanism can be 
used for other projects like murano client to create murano related 
actions in mistral? Or is there any other pluggable mechanism to get 
murano actions into mistral without hardcoding in mistral project?


[1] 
https://wiki.openstack.org/wiki/Mistral/Blueprints/ActionsDesign#Plugin_Architecture 

[2] 
https://github.com/stackforge/mistral/blob/master/mistral/actions/openstack/action_generator/base.py#L91 

[3] 
https://github.com/stackforge/mistral/blob/master/mistral/actions/generator_factory.py 




Regards
Filip

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org 
mailto:openstack-dev-requ...@lists.openstack.org?subject:unsubscribe

http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [mistral] mistral actions plugin architecture

2015-02-09 Thread Filip Blaha

Hi all,

regarding to [1] there should be some plugin mechanism for custom 
actions in Mistral. I went through code and I found some introspection 
mechanism [2] generating mistral actions from methods on client classes 
for openstack core projects. E.g. it takes nova client class 
(python-novaclient) and introspects its methods and theirs parameters 
and creates corresponding actions with corresponding parameters. The 
same for other core projects like neutron, cinder, ... However the list 
of  these client classes seems to be hardcoded [3].  So I am not sure 
whether this mechanism can be used for other projects like murano client 
to create murano related actions in mistral? Or is there any other 
pluggable mechanism to get murano actions into mistral without 
hardcoding in mistral project?


[1] 
https://wiki.openstack.org/wiki/Mistral/Blueprints/ActionsDesign#Plugin_Architecture 

[2] 
https://github.com/stackforge/mistral/blob/master/mistral/actions/openstack/action_generator/base.py#L91 

[3] 
https://github.com/stackforge/mistral/blob/master/mistral/actions/generator_factory.py 




Regards
Filip

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [mistral] mistral actions plugin architecture

2015-02-09 Thread Renat Akhmerov
Hi,

It’s pretty simple and described in 
http://mistral.readthedocs.org/en/master/developer/writing_a_plugin_action.html 
http://mistral.readthedocs.org/en/master/developer/writing_a_plugin_action.html.

Renat Akhmerov
@ Mirantis Inc.



 On 09 Feb 2015, at 21:43, Filip Blaha filip.bl...@hp.com wrote:
 
 Hi all,
 
 regarding to [1] there should be some plugin mechanism for custom actions in 
 Mistral. I went through code and I found some introspection mechanism [2] 
 generating mistral actions from methods on client classes for openstack core 
 projects. E.g. it takes nova client class (python-novaclient) and introspects 
 its methods and theirs parameters and creates corresponding actions with 
 corresponding parameters. The same for other core projects like neutron, 
 cinder, ... However the list of  these client classes seems to be hardcoded 
 [3].  So I am not sure whether this mechanism can be used for other projects 
 like murano client to create murano related actions in mistral? Or is there 
 any other pluggable mechanism to get murano actions into mistral without 
 hardcoding in mistral project?
 
 [1] 
 https://wiki.openstack.org/wiki/Mistral/Blueprints/ActionsDesign#Plugin_Architecture
  
 [2] 
 https://github.com/stackforge/mistral/blob/master/mistral/actions/openstack/action_generator/base.py#L91
  
 [3] 
 https://github.com/stackforge/mistral/blob/master/mistral/actions/generator_factory.py
  
 
 
 Regards
 Filip
 
 __
 OpenStack Development Mailing List (not for usage questions)
 Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev