46 Commits

Author SHA1 Message Date
Jim Rollenhagen
2a6a0a92d9 pass command_name to the command function itself 2014-02-20 12:37:27 -08:00
Jim Rollenhagen
408bc793eb remove magic from decorator and fix function binding 2014-02-20 12:06:24 -08:00
Josh Gachnang
7c22a4e3bf Making async and sync calls consistent 2014-02-06 11:04:44 -08:00
Josh Gachnang
313a01e5fa Changing image commands to be async functions
Instead of having separate classes for each async command, they now are
functions inside StandbyMode which are run in separate threads. I also
cleaned up the function signatures for StandbyMode.
2014-02-05 15:41:48 -08:00
Russell Haering
1bca58281b cause the agent to lazily load a command mode 2014-01-23 12:37:18 -08:00
Russell Haering
835bdf21e2 move sync result wrapping into BaseAgentMode 2014-01-21 10:49:06 -08:00
Russell Haering
d4d97920cf clarify BaseAgentMode operation 2014-01-21 10:42:43 -08:00
Russell Haering
ad70d89847 split out base and agent modules 2014-01-20 14:36:17 -08:00
Russell Haering
27bc0eb316 use a mode implementation in the teeth agent 2014-01-20 14:36:17 -08:00
Russell Haering
b5a2dfd002 rename BaseTeethAgent to TeethAgent 2014-01-20 14:36:17 -08:00
Russell Haering
5fff30ab14 allow BaseTeethAgent to load a mode implementation 2014-01-20 14:36:17 -08:00
Russell Haering
e0ee74e63d add BaseAgentMode class 2014-01-20 14:36:17 -08:00
Russell Haering
ec0ac63b8a log reason for shutdown 2014-01-14 12:47:52 -08:00
Russell Haering
cae5321505 take a listen_host argument to base agent 2014-01-13 21:06:28 -08:00
Russell Haering
b34fb060e9 allow the user to specify listen-host 2014-01-13 17:27:07 -08:00
Russell Haering
6d3240102a support separation of listen and advertised ports 2014-01-13 16:46:27 -08:00
Russell Haering
d08a5b465f resolve listen IP by connecting to API 2014-01-13 16:29:45 -08:00
Russell Haering
13ac2f4e41 fix typo 2014-01-13 13:00:09 -08:00
Russell Haering
ee703e97db log heartbeats 2014-01-11 21:19:12 -08:00
Russell Haering
1a9189dce9 use cherrypy in place of werkzeug dev server 2014-01-10 13:49:48 -08:00
Russell Haering
710e250646 add join to base command result 2014-01-09 15:35:42 -08:00
Russell Haering
e205150761 lock to avoid race conditions in command execution 2014-01-09 14:46:52 -08:00
Russell Haering
92a34f4b3f limit the agent to a single concurrent command 2014-01-09 14:44:15 -08:00
Russell Haering
d25dee80bb return an async result from standby.cache_images 2014-01-09 13:44:08 -08:00
Russell Haering
d6ddc267b3 add BaseAgent methods to retrieve and list results 2014-01-09 13:43:04 -08:00
Russell Haering
f01b8a62ad fix reference to invalid error class 2014-01-09 13:34:21 -08:00
Russell Haering
019bc75bbf fix typos in base agent 2014-01-08 14:33:33 -08:00
Russell Haering
0134631ab3 stop heartbeating when agent is stopped 2014-01-08 08:42:03 -08:00
Russell Haering
fecd9d5d65 exponential backoff in heartbeater 2014-01-07 23:45:47 -08:00
Russell Haering
baef85db56 start the heartbeater on agent run 2014-01-07 18:15:01 -08:00
Russell Haering
a794093f8a fix typo 2014-01-07 17:34:15 -08:00
Russell Haering
f40415e358 read the eth0 mac address from sysfs 2014-01-07 15:58:25 -08:00
Russell Haering
d01145512a add a class that heartbeats to the API 2014-01-07 14:28:05 -08:00
Russell Haering
3f1cb973b7 add methods to get agent URL and mac address 2014-01-07 14:27:55 -08:00
Russell Haering
2b858b90b1 record agent version on TeethBaseAgent 2014-01-07 14:16:13 -08:00
Russell Haering
0ece4ab51e add an api_url parameter to BaseTeethAgent 2014-01-06 12:02:12 -08:00
Russell Haering
476e6fa242 add an async command result that runs commands in a thread 2014-01-05 21:46:22 -08:00
Russell Haering
f230e7efbe add a concept of a command result 2014-01-02 13:18:33 -08:00
Russell Haering
26faa0dc4a pass the command name to implementations 2013-12-31 11:49:32 -08:00
Russell Haering
604ed14f2d pass command results back to the API 2013-12-27 15:06:29 -08:00
Russell Haering
da1b5bfecc document intentions regarding async command results 2013-12-27 12:53:44 -08:00
Russell Haering
467eb22edd fix typo in base agent 2013-12-25 21:00:19 -08:00
Russell Haering
15c63e8b46 begin hacking on command execution 2013-12-21 17:22:09 -08:00
Russell Haering
b976288335 simplify internal command execution API 2013-12-20 16:03:30 -08:00
Russell Haering
ffcbbd49e0 remove old agent classes 2013-12-20 15:29:23 -08:00
Russell Haering
f005c10d4f split agent out into standby and decom classes 2013-12-20 12:57:38 -08:00