Commit Graph

863 Commits

Author SHA1 Message Date
Steve Pulec
705ec314a3 Cleanup different places using unix_time() 2015-11-27 14:14:40 -05:00
Steve Pulec
eabcb3d39c Merge pull request #451 from botify-labs/feature/add-swf
[wip] Add SWF support
2015-11-26 09:50:01 -05:00
Steve Pulec
025445d23e Merge pull request #467 from EarthmanT/support_default_filter_network_acl
Support Associate NetworkACL and Filtering in Describe
2015-11-26 09:41:13 -05:00
Andrew Garrett
f1566cecf4 Add support for KMS key rotation operations
This adds support for the following KMS endpoints:

* EnableKeyRotation
* DisableKeyRotation
* GetKeyRotationStatus

Signed-off-by: Jesse Szwedko <jesse.szwedko@getbraintree.com>
2015-11-24 23:44:55 +00:00
earthmant
18fe3e41e9 Support default ACL in a VPC
a vpc usually has a default acl
this makes sure that moto flags it
and that the describe response has it in there
2015-11-23 18:07:51 +02:00
Jean-Baptiste Barth
566a90800e Make SWF events formatting more generic
(suggested in @spulec review)
2015-11-23 14:52:16 +01:00
earthmant
4b59c6b907 Support Associate Network ACL
add the new_association_id property to NetworkACL object so that the template render for replace adds the ID and the associate_network_acl receives a response
2015-11-23 15:16:46 +02:00
Jean-Baptiste Barth
a06f8b15f5 Add moto.core.utils.underscores_to_camelcase() 2015-11-23 14:09:31 +01:00
Jean-Baptiste Barth
45437368b2 Move SWF type checks to response object
(suggested in @spulec review)
2015-11-23 12:41:44 +01:00
Jean-Baptiste Barth
78ea7967ad Remove overriden SWFResponse.call_action() thanks to 32dd72f
Not necessary anymore: 32dd72f6b7
2015-11-19 11:46:54 +01:00
Jean-Baptiste Barth
26980f41a6 Replace globals() call with a static mapping
(suggested in @spulec review)
2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
6b581edb55 Use datetime.utcnow() instead of datetime.now()
(suggested in @spulec review)
2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
5f0684fca5 Use dict.values() instead of dict.items() where possible
(suggested in @spulec review)
2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
de646cf7ac Fix python 3 compatibility: filter() returns an iterator now 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
248975d4e6 Improve SWF timeouts processing: now processed in order, one by one 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
7f2cbb79b0 Refactor SWF workflow execution to ease next timeout change 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
6027bf15c1 Move some timeout conditionals to concerned models 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
d007dfe3ff Remove process_timeouts() method in favor of timeout(<Timeout>) and a helper for tests 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
65c35bfa69 Make timeout events appear at the right time in workflow history 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
d618585790 Refactor timeouts processing so it will be easier to compute them in order 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
61bb550052 Ensure activity and decision tasks cannot progress on a closed workflow
This is a second barrier because I'm a little nervous about this and I
don't want moto/swf to make any activity progress while in the real
world service, it's strictly impossible once the execution is closed.
Python doesn't seem to have any nice way of freezing an object so here
we go with a manual boundary...
2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
65c95ab5bc Ensure activity and decision tasks cannot timeout on a closed workflow 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
9c3996ff58 Add WorkflowExecution.open to clarify code in some places 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
f38d23e483 Implement start to close timeout on SWF workflow executions 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
86973f2b87 Implement start to close timeout on SWF decision tasks 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
b386495520 Use list comprehensions instead of filter() for easier moto/swf python 3.x compatibility 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
3a5f679783 Fix python 3.3 compatibility in moto/swf regarging string types detection 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
c0b4aadd92 Fix python 3.x compatibility regarding json loading
Error on travis-ci was:

    TypeError: can't use a string pattern on a bytes-like object
2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
2cd3d5fb45 Fix python 3.x compatibility regarding iterations on a dict
Error on travis-ci was:

    AttributeError: 'dict' object has no attribute 'iteritems'

And actually it's been removed in python 3.x in favor of dict.items()
2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
e9732140e5 Fix python 2.6 compatibility for moto/swf 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
90c8797abd Implement heartbeat timeout on SWF activity tasks 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
f576f3765c Add SWF endpoint RecordActivityTaskHeartbeat 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
804d2e91b5 Improve workflow selection before raising a WorkflowExecutionAlreadyStartedFault 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
96d6bb056b Add SWF endpoint TerminateWorkflowExecution 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
98948a01c8 Add missing attributes in DescribeWorkflowExecution responses 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
fd12e317f8 Add SWF endpoint RespondActivityTaskFailed 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
c9e8ad03f8 Add SWF endpoint RespondActivityTaskCompleted 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
08643945df Add SWF endpoint CountPendingActivityTasks 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
761ab816f9 Add SWF endpoint PollForActivityTask 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
d650f71d9c Simplify decision task handling in SWF backend 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
be71909a8c Rework task lists for activity/decision tasks 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
83c08b7655 Remove unused import 2015-11-19 11:45:24 +01:00
Jean-Baptiste Barth
a713005882 Simplify implementation of ScheduleActivityTask decision 2015-11-19 11:45:24 +01:00
Jean-Baptiste Barth
5e086223c2 Implement ScheduleActivityTask decision 2015-11-19 11:45:24 +01:00
Jean-Baptiste Barth
53630dc061 Add a Domain to WorkflowExecution objects
This will be needed later for finding an activity type for instance.
2015-11-19 11:45:24 +01:00
Jean-Baptiste Barth
fa4608be98 Add basic ActivityTask model 2015-11-19 11:45:24 +01:00
Jean-Baptiste Barth
49e44c8ee6 Fix openDecisionTasks counter not updated when we complete a DecisionTask 2015-11-19 11:45:24 +01:00
Jean-Baptiste Barth
918cf8a4e3 Fix decision parameters: attributes are in foo*Decision*Attributes 2015-11-19 11:45:24 +01:00
Jean-Baptiste Barth
417f732b53 Implement FailWorkflowExecution decision 2015-11-19 11:45:24 +01:00
Jean-Baptiste Barth
6810973b76 Update obsolete comment about SWF decisions completion 2015-11-19 11:45:24 +01:00