Fix Image imports on Fedora 19

More info here: http://lists.debian.org/debian-python/2013/02/msg00017.html

Though Fedora doesn't seem to provide those back compat imports.
Merge pull request #3 from crobinso/fedora-pil-fix

Fix Image imports on Fedora 19

Reviewed-by: Adam Litke agl@linux.vnet.ibm.com
Add RHEL6 support

- package python-ordereddict required to run
- package python-unittest2 to run unnittest
- new run_test to use unit2
- qemu-system has another name on RHEL6
- decorators to make the tests compatible with python 2.6

Signed-off-by: Eduardo Elias Ferreira <edusf@linux.vnet.ibm.com>
Update controller.py to prefer InternalRedirect to HTTPRedirect

Current implemenation of controller makes extensive use of HTTPRedirect.
CherryPy implements InternalRedirect which accomplishes the same effect
without the round trip to the browser.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Update the Rest and MockModel tests to account for the server no longer redirecting

tests updated to no longer expect 303 response. The screenshot test update is the most
interesing. It previously got the redirect URL and confirmed that 5 seconds later it
got the same redirect url. Now it fetches the screenshot url to ensire there is a
screenshot avail, then gets the VM info which currently includes a direct link to the
screenshot. After 5 seconds it refetches the screenshot url and confirms that the image
is still the same.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Remove unused rule .template-drop in template list CSS

Remove unused rule .template-drop as Aline reported.

Signed-off-by: Hongliang Wang <hlwang@linux.vnet.ibm.com>
Update setup.py make_po task to be verbose

When it fails, the make_po task fails without telling what file it was processing when it failed.
Add "-v" to make it verbose, listing each file as the file is processed.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Bug 94806 Screenshot live tile gets 404 on initial load. Refactor html

Refactor the guests html template to prevent the invalid IMG request on
inital page load. 404 visible in network tab of JS debugger. Reported
visible onscreen with older browsers.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Bug 94806 screenshot can not display from design UI. JS Updates

This patch updates the JS to expliot the html restructuring done with the other patch in this series.
The basic flow is now to load the "wrapping" html used in creating the table rows via ajax

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Correct License file to correctly cite ASL2

Update the license file of guestTab.html.tmpl to the correct ASL2 license.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
Tasks: Define the APIs

Signed-off-by: Shu Ming <shuming@linux.vnet.ibm.com>
Tasks: Splitting ObjectStore from model file

Signed-off-by: Shu Ming <shuming@linux.vnet.ibm.com>
Tasks: Implement mock model

Signed-off-by: Shu Ming <shuming@linux.vnet.ibm.com>
Tasks: Implement the backend

Signed-off-by: Shu Ming <shuming@linux.vnet.ibm.com>
fix: Remove extra import statement in objectstore.py

The OrderedDict import must be in a try/expect block as it is in different
packages depends on the Linux distribution

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
ui: Fix screenshot flicker

Using old image in tile before new image finish loading to prevent flicker.

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
Add another path for SLES11 to find the qemu binary

Signed-off-by: Bing Bu Cao <mars@linux.vnet.ibm.com>
mockmodel: Use ps|grep to find open VNC port

The -C option from ps command selects the processes by command name and ignores
the parameters.
Using ps|grep makes sure the full command line (with parameters) will be used
in the search.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Bing Bu Cao <mars@linux.vnet.ibm.com>
Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Raise an exception in skipUnless() to abort the test on Python2.6

On Python2.6,no skipping for unittest, commit 4b65b209a017e3011ed935075c37e2c115291e1b add missing unittest decorator
for it but just give warning log, this commit will raise an exception to abort the unittest otherwise
the unittest go on and report error.

Signed-off-by: Bing Bu Cao <mars@linux.vnet.ibm.com>
Bug Fix: Get correct exception info when run unittest on Python2.6

When running unittest on SLES(python2.6), found a problem:
If an exception occurs in body of 'with' statement, the 'exc_value' is a str
not a exception object, 'raise firstException' will raise a TypeError.
In this case, we will not get info of the first exception.

This is a bug on Python 2.6:
http://bugs.python.org/issue7853

Reference:
http://docs.python.org/2.7/library/stdtypes.html#context-manager-types

Signed-off-by: Bing Bu Cao <mars@linux.vnet.ibm.com>