Fix wrong "Failed to list guest" message

The module vmscreenshot is preventing this error using Image.load
function inside a try/except. However right after the except block,
the code calls Image.thumbnail() function, which calls the same
load() function internally. Then the error could happen again.
This patch fixes this possible problem.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
pass params to create method of all Collections.

We can pass params as an argument to create method, do not need call
parse_request in every create method.

create means the HTTP POST method, and POST requires body.
So every create needs params parsed from body.
But we do not need to parse params in every create.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Fix path of plugins dir

Fix the wrong path of plugins dir introduced in commit 44be0d2d.

Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com>
refactor exception: Create a common Exception to translate error messages

KimchiException will be the base for all other Exception types in Kimchi
It will translate the error message before raising it.
Then UI can use the message directly. That way we avoid duplicating messages
on UI and backend.
Also add i18n.py which will contain all the backend messages to be translated.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor exception: Add messages to be translated on backend

src/kimchi/i18n.py and plugins/sample/i18n.py contain all messages used
in backend to report error to the user

The messages are associated with a code which will be used to identify
the error independent of the language used in Kimchi.
The code has a basic rule:
- Start with KCH -> as it is related to Kimchi and not to any other
  plugin
- Follow by the resource it references to: VM, TMPL, POOL, VOL, etc
- And a number to represent the error: starting with 0001, 0002, etc for
  backend and for UI it starts in 6001, 6002, etc
- And at the end which the message is: E (for error), M (for message), W
  (for warning), I (for info)

So we will have some codes as: KCHVM0001E, KCHTMPL0001E, KCHPOOL0001E,
KCHVM60001M, KCHPOOL6001M

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor exception: Set error messages for jsonschema validation

While validating data with jsonschema it raises English messages.
To allow translate all error messages to the supported languages it is
needed to set a custom error message.
In this case, the message code is being used. Then KimchiException can
get the correct message based on code and display the translated
message.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refator exception: Update control to raise the exception message

The error messages raised on control were being built in there instead of
using the exception message
And the errors from jsonschema validation also were displayed to the user
without a customization what can cause a misunderstanding as it contains
technical words.
Fix it in order to raise the translated messages to the user.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor exception: Update all exceptions

Update all Kimchi exceptions to translate backend messages.
Use message code to get the correct messages in i18n.py and raise a
message like: "<code>: <translated-message>"

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor exception: Update gen-pot script to get messages from i18n.py

As the backend messages will be translated on backend, the i18n.py file
need to be added to POTFILES.in
Also update gen-pot to properly add the translatable messages to .pot
file.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor exception: Update UI references

Instead of using UI message, we can display the messages from backend as
they are also translated to the current language

Also associate a code to the UI messages and display error messages
like: <code>: <msg>
For that, create a new function kimchi.message.error.code to display
those messages.
The function kimchi.message.error will be used to display error messages came
from backend (that are already in format <code>: <msg>)

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
refactor exception: Update all po files

Update po files to include new messages from i18n.py

Signed-off-by: Aline Manera <alinefm@br.ibm.com>