[Kimchi] Entering code freeze for 2.1 release
by Aline Manera
Hi all,
We are now entering on code freeze, which means only bug fixes will be
accepted on Kimchi master branch from now on.
Any help to test Kimchi and fix bugs from now on up to the release
announcement is more than welcome.
Thanks,
Aline Manera
8 years, 8 months
[PATCH] [Kimchi] Gallery View
by peterpnns@gmail.com
From: peterpennings <peterpnns(a)gmail.com>
This patch enables gallery view to guest tab in kimchi.
It also fixes minor issues with tampletes tab.
peterpennings (1):
Adding gallery view to guest tab and minor fixes to templates tab
ui/css/kimchi.css | 494 ++++++++++++++++++++++++++++---------
ui/css/src/modules/_guests.scss | 434 +++++++++++++++++++++++++-------
ui/css/src/modules/_templates.scss | 3 +-
ui/js/src/kimchi.guest_main.js | 37 ++-
ui/js/src/kimchi.template_main.js | 2 +
ui/pages/guest.html.tmpl | 50 ++--
ui/pages/tabs/guests.html.tmpl | 5 +-
7 files changed, 792 insertions(+), 233 deletions(-)
--
2.5.0
8 years, 8 months
[PATCH] [Kimchi] Gallery view and Media Queries fixes
by sguimaraes943@gmail.com
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
This patch fixes some Gallery View and List View CSS glitches that were caused by Media Queries breakpoints and column width in % values that were rendered in different subpixel values that may vary depending on the OS or browser.
Please apply Guets Gallery view patch first.
Samuel Guimarães (1):
Multiple fixes in Gallery and List views for Templates and Guests tabs
ui/css/kimchi.css | 76 +++++++++++++++++++++++++++++---------
ui/css/src/modules/_guests.scss | 37 +++++++++++++------
ui/css/src/modules/_templates.scss | 5 ++-
ui/js/src/kimchi.guest_main.js | 32 +++++++++++-----
ui/js/src/kimchi.main.js | 23 ++++++++++++
ui/js/src/kimchi.network.js | 1 +
ui/js/src/kimchi.storage_main.js | 1 +
ui/js/src/kimchi.template_main.js | 14 ++++---
ui/pages/tabs/guests.html.tmpl | 2 +-
9 files changed, 146 insertions(+), 45 deletions(-)
--
1.9.3
8 years, 8 months
[PATCH] [Kimchi] Bug fix: Remove storage volume file while removing the storage volume
by Aline Manera
When removing a storage volume, it was only removed from a libvirt
perspective, ie, the storage volume file kept in the system.
It may confuse user as he/she will not be able to create a new storage
volume with the same name from the storage volume removed before as the file
exists in the system.
To avoid it, remove the file from the system after removing it from a
libvirt perspective.
This issue was identified due a failure in the test suite.
2 files related to storage volume tests were kept on the system causing
errors when running the test suite multiple times.
To verify this patch, please, make sure to do not have any leftovers in the
'default' storage pool directory (/var/lib/libvirt/images).
After that, run the test suite mutliple times and you will see no
leftovers will be in the system when the test completes.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
model/storagevolumes.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/model/storagevolumes.py b/model/storagevolumes.py
index d010bcd..d5fdff9 100644
--- a/model/storagevolumes.py
+++ b/model/storagevolumes.py
@@ -373,6 +373,12 @@ class StorageVolumeModel(object):
raise OperationFailed("KCHVOL0010E",
{'name': name, 'err': e.get_error_message()})
+ try:
+ os.remove(pool_info['path'])
+ except OSError, e:
+ wok_log.error("Unable to delete storage volume file: %s."
+ "Details: %s" % (pool_info['path'], e.message))
+
def resize(self, pool, name, size):
volume = StorageVolumeModel.get_storagevolume(pool, name, self.conn)
--
2.5.0
8 years, 9 months
[PATCH] [Wok 0/3] Fixes on user log support
by Aline Manera
Aline Manera (3):
Bug fix: Log user action only if operation was successfully completed
Bug fix: Require authentication on /logs API
Bug fix: Properly encode unicode string
src/wok/control/base.py | 78 ++++++++++++++++++++++++-------------------------
src/wok/control/logs.py | 2 +-
2 files changed, 39 insertions(+), 41 deletions(-)
--
2.5.0
8 years, 9 months
[PATCH] [Kimchi] Fix test case: Proper check memory and cpu_info information
by Aline Manera
memory and cpu_info are a dict in which user can update only one value.
So update the test case to cover it as only one value is being updated
for memory and cpu_info, ie, the other ones keep the same.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
tests/test_rest.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tests/test_rest.py b/tests/test_rest.py
index 4926126..d0d2fcf 100644
--- a/tests/test_rest.py
+++ b/tests/test_rest.py
@@ -237,18 +237,23 @@ class RestTests(unittest.TestCase):
resp = self.request('/plugins/kimchi/vms/vm-1', req, 'PUT')
self.assertEquals(400, resp.status)
+ vm = json.loads(
+ self.request('/plugins/kimchi/vms/vm-1', req).read()
+ )
params = {'name': u'∨м-црdαtеd', 'cpu_info': {'vcpus': 5},
'memory': {'current': 3072}}
req = json.dumps(params)
resp = self.request('/plugins/kimchi/vms/vm-1', req, 'PUT')
self.assertEquals(303, resp.status)
- vm = json.loads(
+ vm_updated = json.loads(
self.request('/plugins/kimchi/vms/∨м-црdαtеd', req).read()
)
# Memory was hot plugged
- params['memory']['current'] += 1024
+ vm['name'] = u'∨м-црdαtеd'
+ vm['cpu_info'].update(params['cpu_info'])
+ vm['memory'].update(params['memory'])
for key in params.keys():
- self.assertEquals(params[key], vm[key])
+ self.assertEquals(vm[key], vm_updated[key])
# change only VM users - groups are not changed (default is empty)
resp = self.request('/plugins/kimchi/users', '{}', 'GET')
--
2.5.0
8 years, 9 months
[PATCH] [Kimchi] Fix pep8 1.6.2 error W503 in model/vms.py
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
This patch fixes the following pep8 error in make check-local:
$ make check-local
contrib/check_i18n.py ./i18n.py
Checking for invalid i18n string...
Checking for invalid i18n string successfully
/bin/pep8 --version
1.6.2
/bin/pep8 --filename '*.py,*.py.in' --exclude="*config.py,*i18n.py,*tests/test_config.py" .
./model/vms.py:842:36: W503 line break before binary operator
Makefile:1036: recipe for target 'check-local' failed
make: *** [check-local] Error 1
Signed-off-by: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
---
model/vms.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/model/vms.py b/model/vms.py
index 8c3d4c4..195c879 100644
--- a/model/vms.py
+++ b/model/vms.py
@@ -838,8 +838,10 @@ class VMModel(object):
for dev in memDevs:
if int(dev.xpath('./address/@slot')[0]) > devsRemove:
root.find('./devices').remove(dev)
- newMem = newMem - (len(root.findall('./devices/memory'))
- * 1024 << 10)
+ newMem = \
+ newMem - (
+ len(root.findall('./devices/memory')) * 1024 << 10
+ )
elif newMem == (oldMem << 10):
newMem = newMem - ((len(memDevs) * 1024) << 10)
--
2.5.0
8 years, 9 months
[PATCH] [Kimchi v2 0/2] Set memory when attaching GPU
by Jose Ricardo Ziviani
v2:
- ignore iommu validation for testing gpu attachment.
Set the window size accordingly when attaching a GPU.
Jose Ricardo Ziviani (2):
Set mmio memory when GPU is attached
Create test cases for GPU attachment
i18n.py | 2 +-
mockmodel.py | 164 +++++++++++++++++++++++++++++++++++++++++++++++-
model/host.py | 4 +-
model/vmhostdevs.py | 141 +++++++++++++++++++++++++++++++++++++++--
tests/test_mockmodel.py | 33 ++++++++++
5 files changed, 336 insertions(+), 8 deletions(-)
--
1.9.1
8 years, 9 months
[Wok] Entering code freeze for 2.1 release
by Aline Manera
Hi all,
We are now entering on code freeze, which means only bug fixes will be
accepted on Wok master branch from now on.
Any help to test Wok and fix bugs from now on up to the release announcement is more than welcome.
Thanks,
Aline Manera
8 years, 9 months
[PATCH V2] [Wok 0/5] Implement User Request Logger
by Lucio Correia
Changes in V2:
* applied review from gingerbase patch
* added download option
* added crontab for deleting generated downloads
* log login/logout requests
User requests log is saved by default at log/wok-req.log. The maximum file
size is 3 MB and there is rotation with log/wok-req.log.1, which means it will
use at most 6 MB of disk space. Suggestions here are appreciated.
The log format is JSON, since:
* the web user interface will provide a log utility to easily search and filter
log results.
* there is a download function which generates a log-like text file based on
search results.
Request log results can be searched using the following parameters:
* app: filter by application that received the request (wok, kimchi, etc.)
* user: filter by user that performed the request
* req: filter by request type: POST, DELETE, PUT. GET requests are not logged.
* date: filter by request date in format YYYY-MM-DD
* download: generate a log-like text file for download
Sample JSON response:
dev@u1510:~$ curl -u dev -H "Content-Type: application/json" -H "Accept: application/json" "http://localhost:8010/logs?download=True" -X GET -d '{}'
Enter host password for user 'dev':
{
"records":[
{
"app":"wok",
"req":"POST",
"user":"dev",
"time":"14:39:59",
"date":"2016-02-25",
"message":"User 'dev' logout"
},
(...truncated...)
{
"app":"gingerbase",
"req":"POST",
"user":"dev",
"time":"14:42:31",
"date":"2016-02-25",
"message":"Host software update"
}
],
"uri":"/data/logs/tmpbnOzP2.txt"
}
"uri" value can then be used to download log file:
dev@u1510:~$ curl -u dev -H "Content-Type: application/json" -H "Accept: application/json" "http://localhost:8010/data/logs/tmpbnOzP2.txt" -X GET -d '{}'
Enter host password for user 'dev':
[2016-02-25 14:39:59] POST wok dev: User 'dev' logout
[2016-02-25 14:40:13] POST gingerbase dev: Create host debug report 'test'
[2016-02-25 14:40:58] PUT gingerbase dev: Update host debug report 'test0'
[2016-02-25 14:41:10] DELETE gingerbase dev: Delete host debug report 'test0'
[2016-02-25 14:41:55] POST gingerbase dev: Enable host software repository 'archive.canonical.com-wily-partner'
[2016-02-25 14:42:06] POST gingerbase dev: Disable host software repository 'archive.canonical.com-wily-partner'
[2016-02-25 14:42:31] POST gingerbase dev: Host software update
Lucio Correia (5):
Add User Request Logger
Install cron for cleaning User Request Logs
Log user requests
Implement User Request Logger API
Fix tests
Makefile.am | 10 +++
contrib/DEBIAN/control.in | 1 +
contrib/Makefile.am | 1 +
contrib/cleanlogs.sh | 4 ++
contrib/wok.spec.fedora.in | 2 +
contrib/wok.spec.suse.in | 2 +
docs/API/logs.md | 27 ++++++++
src/wok/config.py.in | 10 +++
src/wok/control/base.py | 81 ++++++++++++++++++++++--
src/wok/control/logs.py | 43 +++++++++++++
src/wok/i18n.py | 4 +-
src/wok/model/logs.py | 31 +++++++++
src/wok/reqlogger.py | 154 +++++++++++++++++++++++++++++++++++++++++++++
src/wok/root.py | 27 ++++++++
src/wok/server.py | 11 ++++
src/wok/utils.py | 12 ++++
src/wokd.in | 4 ++
tests/utils.py | 1 +
18 files changed, 418 insertions(+), 7 deletions(-)
create mode 100644 contrib/cleanlogs.sh
create mode 100644 docs/API/logs.md
create mode 100644 src/wok/control/logs.py
create mode 100644 src/wok/model/logs.py
create mode 100644 src/wok/reqlogger.py
--
1.9.1
8 years, 9 months