From ead649cf99cf4e742a35685dfc56a452208bc167 Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Tue, 24 Sep 2013 20:44:46 +0000 Subject: [PATCH] start on README.md docs on agent protocol --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..420e0925d --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# teeth-agent + +## Protocol + +JSON. Line Delimitated. Bi-directional. Most messages contain: + +* `version` Message Version - String +* `id` Message ID - String + +Commands contain: + +* `method` Method - String +* `params` Params - Hash of parameters to Method. + +Success Responses contain: + +* `id` Original Message ID from Command - String +* `result` Result from Command - Hash + +Error Responses contain: + +* `id` Original Message ID from Command - String +* `error` Result from Command - Hash, `.msg` contains human readable error. Other fields might come later. + +Fatal Error: + +* `fatal_error` - String - Fatal error message; Connection should be closed. + + +### Commands + +#### All Protocol Implementations. + +* `ping`: (All) Params are echo'ed back as results. + +#### Agent specific Commands + +* `log`: (Agent->Server) Log a structured message from the Agent. +* `status`: (Server->Agent) Uptime, version, and other fields reported. + +#### Decommission + +* `decom.disk_erase`: (Server->Agent) Erase all attached block devices securely. +* `decom.firmware_secure`: (Server->Agent) Update Firmwares/BIOS versions and settings. +* `decom.qc`: (Server->Agent) Run quality control checks on chassis model. Includes sending specifications of chassis (cpu types, disks, etc) + + +#### Standbye + +* `standbye.cache_images`: (Server->Agent) Cache an set of image UUID on local storage. Ordered in priority, chassis may only cache a subset depending on local storage. +* `standbye.prepare_image`: (Server->Agent) Prepare a image UUID to be ran. +* `standbye.run_image`: (Server->Agent) Run an image UUID. Must include Config Drive Settings. Agent will write config drive, and setup grub. If the Agent can detect a viable kexec target it will kexec into it, otherwise reboot. + + + + +