-
Notifications
You must be signed in to change notification settings - Fork 57
MimicTwoHourWorkshop
Glyph edited this page Feb 2, 2015
·
8 revisions
part 1: 30m: is mimic, how to run it, how to use it from the command line and your tests
- short (~5min) talk introducing mimic - what is it, who uses it, how much does it implement
- (~5 min) 2 video demos from openstack: show how to run mimic, how to run python-novaclient against it
- 12 minutes: ask the audience to do what is shown in the video, make sure everyone has managed to create a fake server
- ~3min - explain
--realtime
option, note that the fake server was created in 1970, show the difference with the option set, explain clock-advance endpoint - (~5min) ask the audience to generate a metadata-based error with the nova command line, watch it fail (3rd demo from openstack)
part 2, 1hr: how to write a plugin
- basic dev setup: prerequisite, show up with a working 'tox'; live demo of
running mimic's tests (~5m)
- install Chrome REST client https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo
- use 'tox -e lint -e py27' to get fast build results and ignore interpreters which are not of interest to first-time contributors
- quick web framework tutorial (~10m):
- explain what klein is (~1 minute, "it's flask but with twisted")
- show klein quickstart demo,
@route
,@run
, etc (~4 minutes) - ask audience to make a quickstart demo, return some JSON (~5 minutes)
- point at https://twistedmatrix.com/documents/current/api/twisted.web.iweb.IRequest.html for an explanation of what "request" is
- create a plugin (~15m):
- create a fork of mimic! (2 min)
- create file in plugin directory (2 min)
- add plugin to
mimic.test.CoreBuildingTests.test_from_plugin_includes_all_plugins
and make sure the test passes to ensure the plugin is loaded properly (10 min)
- implement the plugin (18m)
- add a root resource (2m to explain, 4m for audence to follow)
- use REST client to inspect service catalog and extract the URL (2m,4m)
- hit the URL to see the response (2m,4m)
- leave 15 minutes for people to catch up, to elaborate; 1 on 1 introduce folks to the object-model stuff if they have gotten far enough
part 3: 30m: wrap-up
-
(~5 minutes) what can you do with mimic?
-
(~5 minutes) how can you contribute to mimic? (survey of some existing github issues)
-
(~20 minutes) what can mimic do for you? what features do you need, how much proof-of-concept would you need to convince your (boss / director / SVP) that you should be spending some of your time on Mimic?