Updating exception in receiver daemon and cleaning up headers in log.cc. adding forgotton class
Fixed Log, which was broken in the release build. Changed test for ConfigFile. Fixed memory leak in receiver. Added guest_exception so we'd have something unique to throw, added code to throw it from config file constructor after seeing the check in the test. Re-enabled send_and_receive. I'm getting an error that some code points to uninitialized bytes, but afterwards Valgrind claims there's no errors (??). It seems to be in the core rabbit libs. :(
Added code to trim the quotes off the SQL init user name and password.
Fixed the evil wicked memory leak. The twist ending was that *I* was its father! * Added an exe we can run in Valgrind to find leaks (kind of a scratch pad). * Added a debug method to the Log class so we could liter the standard out with extra stuff if we need to. * With Mike's help fixed the SQL guest class to parse username and passwords ensconsed in quotes. * Added a SQL exception class our Guest class can throw to denote exceptions. * Added a feature to the receiver daemon in debug mode where sending a method of "exit" will cause it to shut down (so we can see the Valgrind info without all the noise it gives us when we kill it with CTRL +C). * Changed the receiver to only use one channel.
Added the leak_tester source file.
Put all classes and types into proper namespaces.
Added APT functionality along with several utility classes, cleaned up build file.

* Added wrapper classes to the JSON stuff to avoid having to check for errors in every single spot. Updated the code to use these.
* Added APT functionality. I wanted to use the real native APT code but so much of the functionality in apt-get is not easily callable. We'll look at doing it the real way later, for now I'm calling the process the same way we did in the Python guest.
* Simply calling apt-get was not as easy as I'd have liked either. I created a Process class to help with this along with a IO module which uses the SIGALRM signal for time outs.
* Coded the JSON part of the apt code and wrote tests for it which execute seperately.
* Polished the Jamroot.jam file. There were issues in Boost Build with referring to the same source file from multiple targets, so I created a custom rule making it easy (I hope anyway) to define a compilation unit, its unit-test code, and the dependencies it requires. Before, the lib dependency was dependent on all the unit tests. Now each unit is dependent on its own tests, and anything which uses that unit can only run if the tests pass.
Changed the name of source files which referred to only one class to the Pascal-cased name of the class. For source files which entirely represent a namespace, those simply get the namespace name. Made some classes Pascal cased. Put the mysql and apt code into its own namespace.
Removed old TODOs.
Renamed various MySql classes and methods to be consistent with the Python code. Finished the MySql code, but have been unable to come up with good tests for it yet. Added some extra functionality to the Process class and IO functions to help with the MySql code.
Extracted a MySqlConnection class out of the MySqlGuest class to better show its purpose in the interface. Moved the "generate_password" function out of the class and into the nova::guest::mysql namespace.

Changed Log.debug to print to std::err.

Changed apt::fix so that when "dpkg --configure -a" is called if it writes to std::out the call won't be considered a failure. Now it just assumes it worked if it eventually see EOF, which is the best it can do.

Created overloads of the "execute" and "wait_for_eof" functions of the Process class which capture stdout to a stream. This made it easier to check some things in the integration tests.

Removed MySqlGuest::disable_root.

Integration testing revealed nearly nothing in the MySqlGuest class worked which seemed to be an issue. The culprit is that the MySQL prepared statements don't work for most administrative commands. We're going to probably end up escaping stuff client side which feels wrong. I can't figure out how to call the escape string method in the normal C libs either, so for now there's a dummy method which returns the same string passed in.

Got beguiled by the notion of reusing our real Proboscis-style integration tests by wrapping the new agent code in Python. Boost Python was easy to use initially and it looked as if we'd get it for free. However as I began to wrap the various POCOs (plain old C objects) in the nova::guest::mysql namespace the wrapping process got difficult and I realized no one would appreciate the added complexity. Thankfully, even though the Python code had been making use of Pexpect and other libs the integration tests were easier to rewrite in C++ than I anticipated. However the end result isn't as readable as I'd have liked.
Deleted all the Python stuff and cleaned up the file structure a bit.

Added a safety feature to the integration tests so someone won't run them not understanding what they do and then get sad when they loose their MySQL install. To run them now, set DESTROY_MYSQL_ON_THIS_MACHINE=PLEASE.
Preliminary Integration work with Nova, switched to MySQL C lib * Added a flags class mimicing the ones from Nova. * Added a utils namespace with functions to get the address of devices, so the guest can find its IP address and ask the Nova database what it's name is. * Changed the MySQL stuff to use the C libs rather than the C++ ones. * Wrote integration tests for the new MySQL classes I had to write, as well as integration tests for the MySqlGuest and MySqlPreparer test. * Began work to statically link the guest agent. Left a lot of commented out cruft in the Jamroot.jam file though... :( * Got Nova and the Guest to communicate. If the guest replies to Nova and it isn't 100% correct, Nova silently swallows the error which is incredibly frustrating to figure out, so I changed the interface of the message handler and the code in receiver_daemon so that the format Nova expects will be assured. * Changed the JSON stuff so that the to_string() method was on the JsonData base class where it belonged. Wrote some helper static methods on the JsonData class so we could create instances representing just a single element such as string or null or something. * Added some cruft to Receiver, Sender, and the AMQP classes and changed them a little. Changed AMQP to send data as "application/json" which was necessary. * Disabled tests which depended on a certain environment. Changed some tests to work in the Debian environment.
Fixed a lot of little bugs. Cleaned up the receiver_daemon code to use hostname for queue and grab other settings from the flag settings.
Memory Leak Hunt * Added some documentation to the Jamroot.jam file. Enabled Valgrind for all tests (would like to make it optional and enabled via an environment variable but it seems hard to do so). * Fixed a mild memory leak (it was constant and not a real danger in production) picked up by Valgrind in the MySql code. * Fixed a pretty awful memory leak I'd recently added to the JsonArray class. * Changed the JSON message interpretter to return a null pointer (or an empty smart pointer) when they can't match the method. * Fixed some JSON tests which freed json_object struct pointers. I changed the constructors to free this memory if they failed. * Added a get_host_name method to utils. Its completely untested and I'm a monster! * Added some stuff to the receiver_daemon.cc in anticipation of further integration work.
Integration work continued * After statically linking a bunch got the program's virtual memory down to 20152K. Still too big. * Renamed "FlagValues" to "FlagMap" and gave the first name to a class named FlagValues which has accessors for named properties. This feels a bit like overkill but after going with the alternative for a long time I think this way is preferrable.
Closer to integration. The prepare call may work (ran into unrelated issues manually testing it). Guest call status unknown. * The memory consumed by the AMQP client is now configurable via a flag. * The apt code was changed from several free-standing functions to a class. There is an option to use sudo or not as well which is driven by the flags and also turned out to be completely unnecessary. * Changed MySqlConnection to have a public close method, making it possible to close and re-open the connection each time in the receiver loop and avoid closed connections. * Changed MySqlConnection to optionally get its values from the my.cnf file (this functionality was moved from MySqlGuest) at connection time. * Changed MySqlGuest to accept a reference to MySqlConnection in its constructor. * Changed MySqlMessageHandler to accept a pointer to the new AptGuest class, since it needs them both for the call to prepare. * Fixed up all the JSON handling for the MySQL guest calls (not yet tested). * Added a call to "apt-get update" before each install call as requested by Ed (koko). * Fixed a lot of bugs where I was calling programs with the first argument as something other than an absolute file path. Changed one piece of code to set an environment variable before calling a program and wrote a tiny test for the process class to confirm this worked. * Fixed a bug I'd introduced changing the install code to make it stricter than the Python version. Turned out this was *too* strict and was causing problems. * Process:wait_for_eof() was not throwing a TimeOutException in the event of time out. The rest of the code seemed to expect that it would so I changed it.
Added a small change to the apt tests to make them more flexible.
Adding debian packages
Adding debian/tmp