[kimchi-devel][PATCH] Fix shallow scan test: wait until storage volume creation finished
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Shallow scan errors with:
Traceback (most recent call last):
File "test_rest.py", line 1272, in test_iso_scan_shallow
'/storagepools/kimchi_isos/storagevolumes/').read())[0]
IndexError: list index out of range
Because of shallow scan finished before volume creation finshed.
Since we change creation of volume to async task,
we need to wait it finish before issue shallow scan.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
tests/test_rest.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/test_rest.py b/tests/test_rest.py
index 812afb7..f90b7e7 100644
--- a/tests/test_rest.py
+++ b/tests/test_rest.py
@@ -1264,7 +1264,9 @@ class RestTests(unittest.TestCase):
'capacity': 1073741824, # 1 GiB
'type': 'file',
'format': 'iso'}
- model.storagevolumes_create('pool-3', params)
+ task_info = model.storagevolumes_create('pool-3', params)
+ wait_task(self._task_lookup, task_info['id'])
+
storagevolume = json.loads(self.request(
'/storagepools/kimchi_isos/storagevolumes/').read())[0]
--
1.9.1
9 years, 9 months
[PATCH] Change python #! line to be more portable
by Alan Jenkins
Hey guys,
This is a patch to change the #! line used in Kimchi from the ambiguous
/usr/bin/python to a more specific and more portable /usr/bin/env python2.
This enables users of distributions that have switched to the default python version
to python3 to run Kimchi without having to go and manually change the line and at the
same time allows people who have python installed to non default locations to also use
Kimchi by setting the python2 environment variable.
Thanks,
Alan Jenkins (demon012)
Alan Jenkins (1):
Change from using /usr/bin/python to /usr/bin/env python2 to improve
portability.
contrib/check_i18n.py | 2 +-
src/kimchi/vnc.py | 2 +-
src/kimchid.in | 2 +-
ui/pages/help/gen-index.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
--
2.2.2
9 years, 9 months
Help managing the Github issues
by Crístian Viana
Hi,
As the end of the next release cycle is coming, there is a need to
manage the Github issues
even more efficiently: assigning them to their owners, labeling them,
following up on them, closing them.
I would like to help managing them so we can have a better (and faster)
understanding of our issues
situation. AFAIK, Aline is the only one responsible for it and she's had
a lot of other tasks to take care of.
With this work, the issues' statuses will be more helpful and up-to-date.
Let me know if my help will be considered.
Best regards,
Crístian.
9 years, 9 months
[PATCH 0/2] UI and message for async VM create
by Christy Perez
I thought I would try to get the UI fixed up myself, so I'm sending these
as an addendum to my previous patchset "[PATCH v3 0/5] Create VMs Asynchronously."
If there are any issues with the v3 of the previous patchset, I can re-send
these all together.
Christy Perez (2):
VMs Async Create: UI
Translation update to add 'Creating'
po/de_DE.po | 103 +++++++++++++++++++++++------------------
po/en_US.po | 83 +++++++++++++++++++--------------
po/es_ES.po | 102 ++++++++++++++++++++++------------------
po/fr_FR.po | 102 ++++++++++++++++++++++------------------
po/it_IT.po | 102 ++++++++++++++++++++++------------------
po/ja_JP.po | 102 ++++++++++++++++++++++------------------
po/kimchi.pot | 84 ++++++++++++++++++---------------
po/ko_KR.po | 102 ++++++++++++++++++++++------------------
po/pt_BR.po | 102 ++++++++++++++++++++++------------------
po/ru_RU.po | 102 ++++++++++++++++++++++------------------
po/zh_CN.po | 102 ++++++++++++++++++++++------------------
po/zh_TW.po | 102 ++++++++++++++++++++++------------------
ui/css/theme-default/list.css | 18 +++++++
ui/js/src/kimchi.guest_main.js | 25 ++++++++--
ui/pages/guest.html.tmpl | 3 ++
15 files changed, 698 insertions(+), 536 deletions(-)
--
2.1.0
9 years, 9 months
[PATCH 0/8] UI: Change dialogs of kimchi
by Wen Wang
UI: Change dialogs of kimchi
Wen Wang (8):
UI: Change host dialog
UI: Exchange guests dialog style to new kimchi UI
UI: Guest button fix
UI: Exchange template dialog with new kimchi UI
UI: Exchange storage dialog with new kimchi UI
UI Add text help icon to dialog of first 4 tabs
UI: Change dialog of network to new kimchi UI
UI: temp fix for the buttons
ui/css/theme-default/base.css | 6 +++-
ui/css/theme-default/button.css | 57 ++++++++++++++++++++++---------
ui/css/theme-default/form.css | 10 ++++--
ui/css/theme-default/guest-edit.css | 28 +++++++++------
ui/css/theme-default/network.css | 23 +++++--------
ui/css/theme-default/report-add.css | 11 ++++--
ui/css/theme-default/report-rename.css | 14 ++++----
ui/css/theme-default/repository-add.css | 6 ++++
ui/css/theme-default/repository-edit.css | 22 ++++++------
ui/css/theme-default/template_add.css | 4 +++
ui/css/theme-default/window.css | 49 ++++++--------------------
ui/js/src/kimchi.network.js | 49 ++++++++++++++++++++++++--
ui/js/src/kimchi.storagepool_add_main.js | 7 ++--
ui/pages/guest-add.html.tmpl | 17 +++++----
ui/pages/guest-edit.html.tmpl | 6 ++--
ui/pages/login.html.tmpl | 2 +-
ui/pages/report-add.html.tmpl | 11 +++---
ui/pages/report-rename.html.tmpl | 11 +++---
ui/pages/repository-add.html.tmpl | 46 ++++++++++++++-----------
ui/pages/repository-edit.html.tmpl | 8 +++--
ui/pages/storagepool-add-volume.html.tmpl | 16 +++++----
ui/pages/storagepool-add.html.tmpl | 48 +++++++++++++++-----------
ui/pages/tabs/host.html.tmpl | 6 ++--
ui/pages/tabs/network.html.tmpl | 6 ++--
ui/pages/template-add.html.tmpl | 8 +++--
ui/pages/template-edit.html.tmpl | 4 +--
26 files changed, 285 insertions(+), 190 deletions(-)
--
2.1.0
9 years, 9 months
[PATCH v2 0/5] Create VMs Asynchronously
by Christy Perez
If a guest has a large disk, and uses a filesystem that requires
preallocation, it can take several minutes to create a VM. During that
time, kimchi is tied up by the VM creation.
This patch changes the VMs Collection to be an AsyncCollection.
Another change required for this was to create a more granular way to
query tasks. Currently it is not possible (using the API) to query tasks
for the same collection or resource type that may have different operations.
For example, VM cloning is also an asynchronous operation. For the guests tab,
the UI was querying all running tasks and displaying them with the Cloning
label. This picked up VMs that were being created as well. For more information
about how the tasks can be queried, see the updated API doc and the UI change.
Christy Perez (5):
Granular Task Queries: Backend
Granular task queries test updates
More Granular Task Queries: UI
Create guests asynchronously: Backend
Async vm creation test updates
docs/API.md | 14 +++++++
src/kimchi/asynctask.py | 6 ++-
src/kimchi/control/vms.py | 4 +-
src/kimchi/mockmodel.py | 7 ++--
src/kimchi/model/debugreports.py | 4 +-
src/kimchi/model/host.py | 4 +-
src/kimchi/model/storagepools.py | 2 +-
src/kimchi/model/storagevolumes.py | 7 ++--
src/kimchi/model/tasks.py | 1 -
src/kimchi/model/vms.py | 33 ++++++++++++---
src/kimchi/model/vmsnapshots.py | 3 +-
src/kimchi/utils.py | 4 +-
tests/test_authorization.py | 23 ++++++-----
tests/test_mockmodel.py | 15 +++++--
tests/test_model.py | 62 ++++++++++++++++++----------
tests/test_rest.py | 82 ++++++++++++++++++++++++++++----------
ui/js/src/kimchi.guest_main.js | 2 +-
17 files changed, 192 insertions(+), 81 deletions(-)
--
2.1.0
9 years, 9 months
[PATCH v2 0/2] Fix issue #595
by Crístian Viana
This is the changelog between this and the previous pathset (v1):
- PATCH 01/02:
The documentation has been updated;
The parameter names have been updated;
The values None and '' are not valid size units, thus, DEFAULT_UNIT is not needed;
An optimization for when 'to_unit' == 'from_unit' has been added;
Test cases have been added;
Crístian Viana (2):
Add function to convert data sizes
issue #595: Return correct memory value when VM is shutoff
src/kimchi/i18n.py | 2 +
src/kimchi/model/vms.py | 20 ++++++-
src/kimchi/utils.py | 145 ++++++++++++++++++++++++++++++++++++++++++++++++
tests/test_utils.py | 69 +++++++++++++++++++++++
4 files changed, 233 insertions(+), 3 deletions(-)
create mode 100644 tests/test_utils.py
--
2.1.0
9 years, 9 months
[PATCH 0/2] Fix issue #595
by Crístian Viana
Crístian Viana (2):
Add function to convert data sizes
issue #595: Return correct memory value when VM is shutoff
src/kimchi/i18n.py | 2 +
src/kimchi/model/vms.py | 20 ++++++-
src/kimchi/utils.py | 145 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 164 insertions(+), 3 deletions(-)
--
2.1.0
9 years, 9 months
[PATCH] issue #545: Handle simultaneous authentication methods when updating VM permission
by Crístian Viana
If a VM has one authentication method in its metadata (e.g. 'pam') and
a user sets some permissions with a different authentication method
(e.g. 'ldap'), then the group of the first authentication method is
lost and only the last type is kept. In other words, it is not possible
to have more than one authenticatin type in a VM's metadata.
Add the ability to handle different authentication methods
simultaneously when updating VM permission. Whatever is already set will
always be kept, even if the user chooses a different method.
Fix issue #545 (VM permission data is lost when changing authentication
method).
Signed-off-by: Crístian Viana <vianac(a)linux.vnet.ibm.com>
---
src/kimchi/model/vms.py | 54 ++++++++++++++++++++++++++++++++++++-------------
1 file changed, 40 insertions(+), 14 deletions(-)
diff --git a/src/kimchi/model/vms.py b/src/kimchi/model/vms.py
index 379c850..018df9e 100644
--- a/src/kimchi/model/vms.py
+++ b/src/kimchi/model/vms.py
@@ -552,18 +552,48 @@ class VMModel(object):
# remove the new object store entry should an error occur later
rollback.prependDefer(_rollback_objstore)
- def _build_access_elem(self, users, groups):
+ def _build_access_elem(self, dom, users, groups):
auth = config.get("authentication", "method")
- auth_elem = E.auth(type=auth)
- for user in users:
- auth_elem.append(E.user(user))
+ access_xml = get_metadata_node(dom, "access",
+ self.caps.metadata_support)
- for group in groups:
- auth_elem.append(E.group(group))
+ auth_elem = None
- access = E.access()
- access.append(auth_elem)
- return access
+ if not access_xml:
+ # there is no metadata element 'access'
+ access_elem = E.access()
+ else:
+ access_elem = ET.fromstring(access_xml)
+
+ same_auth = access_elem.xpath('./auth[@type="%s"]' % auth)
+ if len(same_auth) > 0:
+ # there is already a sub-element 'auth' with the same type;
+ # update it.
+ auth_elem = same_auth[0]
+
+ if users is not None:
+ for u in auth_elem.findall('user'):
+ auth_elem.remove(u)
+
+ if groups is not None:
+ for g in auth_elem.findall('group'):
+ auth_elem.remove(g)
+
+ if auth_elem is None:
+ # there is no sub-element 'auth' with the same type
+ # (or no 'auth' at all); create it.
+ auth_elem = E.auth(type=auth)
+ access_elem.append(auth_elem)
+
+ if users is not None:
+ for u in users:
+ auth_elem.append(E.user(u))
+
+ if groups is not None:
+ for g in groups:
+ auth_elem.append(E.group(g))
+
+ return access_elem
def _vm_update_access_metadata(self, dom, params):
users = groups = None
@@ -583,11 +613,7 @@ class VMModel(object):
if users is None and groups is None:
return
- old_users, old_groups = self._get_access_info(dom)
- users = old_users if users is None else users
- groups = old_groups if groups is None else groups
-
- node = self._build_access_elem(users, groups)
+ node = self._build_access_elem(dom, users, groups)
set_metadata_node(dom, node, self.caps.metadata_support)
def _get_access_info(self, dom):
--
2.1.0
9 years, 9 months
[PATCH 0/2] Change radios and checkboxes in first 4 dialogs
by Wen Wang
1) Add icons to the help text
2) Change all the radios and checkboxes in frist 4 tabs of dialog
Wen Wang (2):
UI Add text help icon to dialog of first 4 tabs
UI: complete kimchi dialog exchange for frist 4 tabs
ui/css/theme-default/base.css | 4 +++
ui/css/theme-default/button.css | 5 +++
ui/css/theme-default/repository-add.css | 4 +++
ui/css/theme-default/repository-edit.css | 6 ++--
ui/css/theme-default/template-edit.css | 4 +++
ui/css/theme-default/template_add.css | 5 +++
ui/js/src/kimchi.repository_add_main.js | 21 +++++++++++++
ui/js/src/kimchi.repository_edit_main.js | 16 ++++++++++
ui/js/src/kimchi.storagepool_add_main.js | 11 +++++++
ui/js/src/kimchi.storagepool_add_volume_main.js | 17 ++++++++++
ui/js/src/kimchi.template_add_main.js | 24 +++++++++++++++
ui/js/src/kimchi.template_edit_main.js | 12 ++++++++
ui/pages/guest-add.html.tmpl | 9 ++++--
ui/pages/report-add.html.tmpl | 1 +
ui/pages/report-rename.html.tmpl | 1 +
ui/pages/repository-add.html.tmpl | 18 +++++++----
ui/pages/repository-edit.html.tmpl | 6 ++--
ui/pages/storagepool-add-volume.html.tmpl | 14 ++++++---
ui/pages/storagepool-add.html.tmpl | 41 +++++++++++++++----------
ui/pages/template-add.html.tmpl | 9 ++++--
ui/pages/template-edit.html.tmpl | 6 +++-
21 files changed, 196 insertions(+), 38 deletions(-)
--
2.1.0
9 years, 10 months