zhengweisk / aspersa

Automatically exported from code.google.com/p/aspersa
0 stars 0 forks source link

Make summary store and read files in a directory #93

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Right now summary decides as it goes which programs to execute.  This makes it 
hard to test, and integration testing is hard even if all the pieces are 
tested.  It would also be handy to be able to grab some output from commands on 
one server and format it as a report elsewhere.  To remedy this, make it accept 
two kinds of command-line options:

- p PREFIX

This would indicate to store all of the files with the prefix PREFIX. The 
default is "/tmp/aspersa-".  If this option is specified, then it won't delete 
its files after running.  This makes it possible to gather and save files for 
taking elsewhere.

[PATH]

This argument will indicate that instead of gathering data by running programs, 
it should look in the specified path for the files it needs.  These should be 
named as it expects, of course.  So for example, we might specify 
"/path/to/summary/2011-01-01-" and it will look for 
/path/to/summary/2011-01-01-{uptime,date,...}  This will make it possible to 
regenerate reports later (with possibly improved tool) and to create 
integration test cases.

Original issue reported on code.google.com by baron.schwartz on 14 Feb 2011 at 2:00