Properly display YUM exception

When YUM raises an error it does not set the message exception so while
using e.message we get an empty string.
Fix it by using str(e)

Also releases Kimchi lock before raises the exception.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
fix lock for apt package manager

Tested with:
    1.Model test update/add/remove repositories.
    2.UI test.
Global lock is acquired for kimchi to update/add/remove
and list package informations.

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
Add lock in swupdate

Add apt system lock to swupdate.

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
bug fix: fix the string format.

a "s" should be subfix in string format.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Fix a typo.

Signed-off-by: Leonardo Garcia <lagarcia@br.ibm.com>
error message fix.

This error message is not obscure.
Fix it.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Fix swupdate listing

In ubuntu 13.10, package does not have architecture method,
using pkg.architecture() raises error.
workaround by using _pkg.architecture.

dir(pkg) output:
['_Package__set_candidate', '__class__', '__delattr__',
'__dict__', '__doc__', '__format__', '__getattribute__',
'__hash__', '__init__', '__lt__', '__module__', '__new__',
'__reduce__', '__reduce_ex__', '__repr__', '__setattr__',
'__sizeof__', '__str__', '__subclasshook__', '__weakref__',
'_changelog', '_pcache', '_pkg', 'candidate', 'commit', 'essential',
'fullname', 'get_changelog', 'id', 'installed', 'installed_files',
'is_auto_installed', 'is_auto_removable', 'is_inst_broken',
'is_installed', 'is_now_broken', 'is_upgradable', 'mark_auto',
'mark_delete', 'mark_install', 'mark_keep', 'mark_upgrade', 'marked_delete',
'marked_downgrade', 'marked_install', 'marked_keep', 'marked_reinstall',
'marked_upgrade', 'name', 'section', 'shortname', 'versions']

Signed-off-by: Royce Lv <lvroyce@linux.vnet.ibm.com>
validate the volume parameter when the pool of template is iscsi or scsi

When the pool of template is iscsi or scsi, the volume parameter can not
be NULL.
And as we discussion, we do not mix disks from 2 different types of
storage pools, for instance: we do not create a template with 2
disks, where one comes from a SCSI pool and other is a .img in
a DIR pool.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Logical Storage Pool: Detect and Enumerate Multipath Block Devices

When creating a logical storage pool Kimci ignores multipath block
devices. This is on purpose because at the time the kimchi.disks was
implemented, there was not enough time to test every kind of devices.

This patch adds the missing support for multipath block devices. After
this patch, the kimchi.disks will include multipath devices in the
available partition list. The front-end code is also changed
accordingly.

v2
Use the major device number to determine if a deivce is a multipath one.
Use indexOf of the array object to determine if an element is in array.

Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
Add error handling for repo management

ListRepo call had no error handler.

Signed-off-by: Adam King <rak@linux.vnet.ibm.com>
bug fix: fix the string format %(pool).

a "s" should be subfix in string format %(pool).

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Chinese translation for release 1.2

Chinese translation for release 1.2

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
Translate pt_BR.po file

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@linux.vnet.ibm.com>
Signed-off-by: Ramon Medeiros <ramonn@linux.vnet.ibm.com>
Update po and pot files for 1.2 release

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Remove LUN assignment in VM

It will be done in Template level.
Remove it from VM and update docs accordingly.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>
Update Changelog for 1.2 release

Run "make dist" to update the files for 1.2 release.

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