Re: [openstack-dev] [automaton] How to extend automaton?

2018-02-15 Thread Kwan, Louie
...@fastmail.com] Sent: Wednesday, February 14, 2018 1:05 AM To: OpenStack Development Mailing List (not for usage questions) Subject: Re: [openstack-dev] [automaton] How to extend automaton? As far a 1, I'd recommend just use functools.partial or make an object with all the extra stuff u want and have

Re: [openstack-dev] [automaton] How to extend automaton?

2018-02-13 Thread Joshua Harlow
As far a 1, I'd recommend just use functools.partial or make an object with all the extra stuff u want and have that object provide a __call__ method. As far as 2, you might have to subclass the FSM baseclass and add those into the internal data-structure (same for 3 I think); ie this one @ h

[openstack-dev] [automaton] How to extend automaton?

2018-02-13 Thread Kwan, Louie
https://github.com/openstack/automaton Friendly state machines for python. A few questions about automaton. 1. I would like to know can we addition parameters on on_enter or on_exit callbacks. Right now, it seems it only allows state and triggered_event. a. I have many FSM r