stbenjam/spaceclone — pull request #11 by nzwulfin (2013-07-17 17:12:17+00:00)
Title: Cached session handling for authentication

In the contructor for satellite objects I've added caching to the session key. I've pulled the requirement from username in options.py calls, f it doesn't exist we will prompt during satellite initiialization. Password has been removed completely as an option and will be prompted for, this will eliminate it being in plain text. We could add this back since that could effect scriptability.

The key flow is this:
* check for an existing cache file
* check the validity of cached credentials
* prompt for any missing components or replacements
* write new valid credentials to cache

The cache file is based off a CRC32 hash of the server name, so we can deal with multiple different satellite servers with different credentials. Timeout is hard coded at 300 seconds right now.

Changes to modules were minor, mainly on required options. There was a minor fix to move.py to exit if no servers were found. There was a minor change to create.py to add the description to the initial definition instead of a second call to setDetails.

All of the testing I've done shows the same behavior as current upstream with prompted passwords.