[PATCH][Kimchi 0/3] Issue #857: Support VM description
by Ramon Medeiros
Ramon Medeiros (3):
Issue #857: Support VM description
Update tests
Update docs
API.json | 20 ++++++++++++++++++++
docs/API.md | 6 ++++++
i18n.py | 2 ++
model/vms.py | 24 +++++++++++++++++++++---
tests/test_mockmodel.py | 3 ++-
tests/test_model.py | 3 ++-
vmtemplate.py | 5 ++++-
7 files changed, 57 insertions(+), 6 deletions(-)
--
2.5.5
8 years, 4 months
[PATCH] [Kimchi] Issue# 317 Inconsistent button status when adding or creating new resources
by Socorro Stoppler
From: Socorro <socorro(a)linux.vnet.ibm.com>
- Addressed last comment by pvital in github issue in that only the Network tab
now has this problem in that the 'Create' button is enabled after clicking on
Add a Newtwork. It should be disabled by default until the minimum of the required
fields are filled. In the Network case, network name field (as long as valid)
will enable the Create button as soon as at least one character is typed in.
Signed-off-by: Socorro <socorro(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.network_add_main.js | 6 +++---
ui/pages/network-add.html.tmpl | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ui/js/src/kimchi.network_add_main.js b/ui/js/src/kimchi.network_add_main.js
index fd45f34..e1fdf13 100644
--- a/ui/js/src/kimchi.network_add_main.js
+++ b/ui/js/src/kimchi.network_add_main.js
@@ -153,9 +153,9 @@ kimchi.changeNetworkDestination = function() {
kimchi.updateNetworkFormButton = function() {
if($("#networkName").hasClass("invalid-field")){
- $("#networkFormOk").button("disable");
- }else{
- $("#networkFormOk").button("enable");
+ $("#networkFormOk").attr('disabled', true);
+ } else{
+ $("#networkFormOk").attr('disabled', false);
}
};
diff --git a/ui/pages/network-add.html.tmpl b/ui/pages/network-add.html.tmpl
index fbbea3d..14373ff 100644
--- a/ui/pages/network-add.html.tmpl
+++ b/ui/pages/network-add.html.tmpl
@@ -66,7 +66,7 @@
</div>
</div>
<div class="modal-footer">
- <button type="submit" id="networkFormOk" class="btn btn-default">$_("Create")</button>
+ <button type="submit" id="networkFormOk" class="btn btn-default" disabled="disabled">$_("Create")</button>
<button type="button" id="networkFormCancel" data-dismiss="modal" class="btn btn-default">$_("Cancel")</button>
</div>
</div>
--
2.7.4
8 years, 4 months
[PATCH] [Kimchi] Prevents pci passthrough double click
by Jose Ricardo Ziviani
- Double clicks fire 'click' events twice, and this may confuse users
because the backend will throw an error about plugging the same adapter
twice. This commit prevents such events.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_edit_main.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index a59d51a..dcaafb8 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -536,6 +536,8 @@ kimchi.guest_edit_main = function() {
var pciDeviceButtonHandler = function() {
$('.btn.btn-link', '#form-guest-edit-pci').on('click', function(event) {
event.preventDefault();
+ if (event.originalEvent.detail > 1)
+ return;
var obj = $(this);
var objIcon = obj.find('i');
var id = obj.parent().parent().attr('id');
--
2.7.4
8 years, 4 months
[PATCH] [Kimchi] Fix frontend vcpu hotplug
by Jose Ricardo Ziviani
- this commit updates the max vcpus value in order to fix the hotplug.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_edit_main.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index a59d51a..518017c 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -818,7 +818,7 @@ kimchi.guest_edit_main = function() {
// since it is disabled; for cpu_info, when guest is running, just skip it since no processing is required
if (kimchi.thisVMState === 'running' || kimchi.thisVMState === 'paused') {
if (key === 'cpu_info') {
- continue;
+ data['cpu_info']['maxvcpus'] = org.cpu_info.maxvcpus;
}
if (key === 'memory') {
// Replace valueFromUI of max mem with one from original as otherwise the value is undefined
--
2.7.4
8 years, 4 months
[PATCH ][Wok] Issue # 156 : Wok success message is not disappearing automatically.
by atreyee@linux.vnet.ibm.com
From: Atreyee Mukhopadhyay <atreyee(a)linux.vnet.ibm.com>
Making closable parameter configurable for Success, error,warn and
notify method instead of making it default true.
---
ui/js/src/wok.message.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/ui/js/src/wok.message.js b/ui/js/src/wok.message.js
index 159dc36..1c07466 100644
--- a/ui/js/src/wok.message.js
+++ b/ui/js/src/wok.message.js
@@ -20,14 +20,13 @@
wok.message = function(msg, level, node, closeable, onclick, alertId) {
"use strict";
- var close = closeable || true;
var container = node || $('#alert-fields');
if($("#" + alertId).length === 0) {
if ($(container).size() < 1) {
container = $('<div id="alert-fields"/>').appendTo($('#alert-container'));
}
var message = '<div '+( alertId ? 'id="'+alertId+'"' : '')+' role="alert" class="alert ' + (level || '') + ' '+( close ? 'alert-dismissible' : '')+' fade in" style="display: none;">';
- if(!node || close) {
+ if(!node || closeable) {
message += '<button type="button" class="close" data-dismiss="alert" aria-label="Close" onclick="' + (onclick || '') + '"><span aria-hidden="true"><i class="fa fa-times-circle"></i></span></button>';
}
message += msg;
@@ -38,7 +37,7 @@ wok.message = function(msg, level, node, closeable, onclick, alertId) {
$message.alert();
$message.fadeIn(100);
- if(!close){
+ if(!closeable){
var timeout = setTimeout(function() {
$message.delay(4000).fadeOut(100, function() {
$message.alert('close');
@@ -54,22 +53,27 @@ wok.message = function(msg, level, node, closeable, onclick, alertId) {
wok.message.warn = function(msg, node, closeable, alertId) {
"use strict";
+ closeable = closeable || true;
wok.message(msg, 'alert-warning', node, closeable, null, alertId);
};
wok.message.error = function(msg, node, closeable, alertId) {
"use strict";
+ closeable = closeable || true;
wok.message(msg, 'alert-danger', node, closeable, null, alertId);
};
wok.message.error.code = function(code, node, closeable, alertId) {
"use strict";
var msg = code + ": " + i18n[code];
+ closeable = closeable || true;
wok.message(msg, 'alert-danger', node, closeable, null, alertId);
};
wok.message.success = function(msg, node, closeable, alertId) {
"use strict";
+ closeable = closeable || false;
wok.message(msg, 'alert-success', node, closeable, null, alertId);
};
wok.message.notify = function(notification, node) {
"use strict";
+ closeable = closeable || true;
wok.message(notification.message, 'alert-warning', node, true, "wok.removeNotification('" + notification.code + "')");
};
--
2.1.0
8 years, 4 months
[PATCH] [Wok] Issue #155: 'make clean' does not revert its changes from 'make rpm'
by bianca@linux.vnet.ibm.com
From: Bianca Carvalho <bianca(a)linux.vnet.ibm.com>
Edited Makefile.am to check if there is any file to be stashed or
commited before run 'make rpm' to avoid losing any changes.
Also included 'git reset --hard' command to revert changes made by
'make rpm' command.
Signed-off-by: Bianca Carvalho <bianca(a)linux.vnet.ibm.com>
---
Makefile.am | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index ac07e97..10d9718 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -115,17 +115,30 @@ wok.spec: contrib/wok.spec.fedora contrib/wok.spec.suse
/bin/false ; \
fi
-rpm: dist wok.spec
+check_files:
+ @if [ -d '.git' ]; then \
+ if [ `git status --porcelain --untracked-files=no | wc -l` -gt 0 ]; then \
+ echo "***** Aborting 'make rpm' command *****"; \
+ echo "There are some changes not commited in your working \
+directory. To avoid losing them, please commit or stage before run 'make rpm' command."; \
+ exit 1; \
+ fi \
+ fi
+
+rpm: check_files dist wok.spec
$(MKDIR_P) rpm/BUILD rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS
cp $(top_srcdir)/wok.spec rpm/SPECS/wok.spec
cp $(DIST_ARCHIVES) rpm/SOURCES
rpmbuild -ba --define "_topdir `pwd`/rpm" rpm/SPECS/wok.spec
+ @if [ -d '.git' ]; then \
+ git reset --hard; \
+ fi
-fedora-rpm: contrib/wok.spec.fedora
+fedora-rpm: check_files contrib/wok.spec.fedora
ln -sf contrib/wok.spec.fedora wok.spec
$(MAKE) rpm
-suse-rpm: contrib/wok.spec.suse
+suse-rpm: check_files contrib/wok.spec.suse
ln -sf contrib/wok.spec.suse wok.spec
$(MAKE) rpm
--
2.7.4
8 years, 4 months
[RFC] Issue #802 - Update list of remote templates
by Ramon Medeiros
Propose:
Unless has a set of distro isos, use an algorithm to query new ISOs from
repositories and display them when creating new templates.
Ways to implement it:
1) Add a script that queries the ISOS everytime we lookup at template
list. In the past, we've got a PoC from Cristian Viana, saying that it
could take a while
(https://github.com/kimchi-project/kimchi/issues/605#issuecomment-78279706).
2) We can run the script when starting wok, and write the output to a
dictonary. The only problem will be servers that did not reboot.
I would like to have a way that we can run the script in parallel, like
refreshing the cache between some periods.
--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn(a)br.ibm.com
8 years, 4 months
[RFC] [Wok] Issue 140 - Track asynchronous tasks in user request log
by Lucio Correia
User Request Log needs to be improved to track some special requests of
Kimchi, Ginger and Gingerbase which, when successful, generate an
asynchronous task to do the actual job. Examples are cloning vms,
upgrading software and creating volumes.
Currently those requests are always logged as successful, even when the
generated asynchronous task fails for some reason.
My proposal to solve this issue is to:
1 - Change the wording of all existing user log messages for requests
that generate asynchronous task.
i.e.: change "Clone vm 'name'" to "Start to clone vm 'name'"
2 - Log a couple of additional entries in AsyncTask for each task executed:
- "Started Kimchi task ID 100: /plugins/kimchi/vms/name/clone" when
async task is started successfully
- "Successfully completed Kimchi task ID 100:
/plugins/kimchi/vms/name/clone" when async task works fine *or*
"Failure on Kimchi task ID 100: /plugins/kimchi/vms/name/clone
(KCHVM0001E failed to clone vm 'name')" when async task fails
3 - Backend/UI work to recognize the new type of entry:
{
"time": "11:49:55",
"date": "2016-08-12"
"zone": "BRT",
timezone continues the same
"req": "TASK",
use a specific "request" type for differentiation, i.e. TASK
"user": "",
"ip": "",
user and ip will be blank, since we are out of scope of the request
"status": 1002,
create 3 new status codes, say 1000 for "task started", 1001 for "task
completed successfully", 1002 for "task failed"
"app": "kimchi",
app will be informed by each plugin (backend change)
"msgCode": "WOKASYNC0002L",
async task log message Id, based on status
"detCode": "KCHVM00001E",
failed task details: original exception
}
>>>
{"target_uri": "/plugins/kimchi/vms/name/clone", "task_id": 100}
msgCode params
>>>
{"vm": "name"}
detCode params (optional)
>>>
Failure on Kimchi task ID 100: /plugins/kimchi/vms/name/clone
(KCHVM0001E failed to blah blah)
English log message
A corresponding log entry in text file for this example would be:
[2016-08-12 11:49:55 BRT] TASK 1002 kimchi Failure on Kimchi task ID
100: /plugins/kimchi/vms/name/clone (KCHVM0001E failed to clone vm 'name')
With this implementation it will be possible for an admin to see:
* how much time a task took/is taking to run
* which other requests were done between task start and finish
--
Lucio Correia
Software Engineer
IBM LTC Brazil
8 years, 4 months
[PATCH v2] [Kimchi] Issue #585: 'make clean' does not revert its changes from 'make rpm'
by bianca@linux.vnet.ibm.com
From: Bianca Carvalho <bianca(a)linux.vnet.ibm.com>
Edited Makefile.am to check if there is any file to be stashed or
commited before run 'make rpm' to avoid losing any changes.
Also included 'git clean -df & git reset --hard' command to remove
untracked files from the working tree and to revert changes made by
'make rpm' command.
Signed-off-by: Bianca Carvalho <bianca(a)linux.vnet.ibm.com>
---
Makefile.am | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 9bebb65..d4a96b3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -135,17 +135,30 @@ kimchi.spec: contrib/kimchi.spec.fedora contrib/kimchi.spec.suse
/bin/false ; \
fi
-rpm: dist kimchi.spec
+check_files:
+ @if [ -d '.git' ]; then \
+ if [ `git status --porcelain --untracked-files=no | wc -l` -gt 0 ]; then \
+ echo "***** Aborting 'make rpm' command *****"; \
+ echo "There are some changes not commited in your working \
+directory. To avoid losing them, please commit or stage before run 'make rpm' command."; \
+ exit 1; \
+ fi \
+ fi
+
+rpm: check_files dist kimchi.spec
$(MKDIR_P) rpm/BUILD rpm/RPMS rpm/SOURCES rpm/SPECS rpm/SRPMS
cp $(top_srcdir)/kimchi.spec rpm/SPECS/kimchi.spec
cp $(DIST_ARCHIVES) rpm/SOURCES
rpmbuild -ba --define "_topdir `pwd`/rpm" rpm/SPECS/kimchi.spec
+ @if [ -d '.git' ]; then \
+ git clean -df & git reset --hard; \
+ fi
-fedora-rpm: contrib/kimchi.spec.fedora
+fedora-rpm: check_files contrib/kimchi.spec.fedora
ln -sf contrib/kimchi.spec.fedora kimchi.spec
$(MAKE) rpm
-suse-rpm: contrib/kimchi.spec.suse
+suse-rpm: check_files contrib/kimchi.spec.suse
ln -sf contrib/kimchi.spec.suse kimchi.spec
$(MAKE) rpm
--
2.7.4
8 years, 4 months
[RFC] Issue #802 - Update list of remote templates
by Ramon Medeiros
Propose:
Unless has a set of distro isos, use an algorithm to query new ISOs from
repositories and display them when creating new templates.
Ways to implement it:
1) Add a script that queries the ISOS everytime we lookup at template
list. In the past, we've got a PoC from Cristian Viana, saying that it
could take a while
(https://github.com/kimchi-project/kimchi/issues/605#issuecomment-78279706).
2) We can run the script when starting wok, and write the output to a
dictonary. The only problem will be servers that did not reboot.
I would like to have a way that we can run the script in parallel, like
refreshing the cache between some periods.
--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn(a)br.ibm.com
8 years, 4 months