[Wok] Doubts about JS on login page.
by Ramon Medeiros
Hi,
i'm doing the issue https://github.com/kimchi-project/wok/issues/147,
and got a problem to deal with exceptions and Javascript. I got this
code at src/wok/root.py:
# check for repetly
l = len(self.failed_logins)
if l >= 3:
# verify if timeout is still valid
last_try = self.failed_logins[l -1]
if time.time() < (last_try["time"] + self.fail_timeout):
details = e = UnauthorizedError("WOKAUTH0004E",
{"seconds":
self.fail_timeout})
log_request(code, params, details, method, 403)
import pdb;pdb.set_trace()
raise cherrypy.HTTPError(403, e.message)
return e.message
So, it may raise an exception. I want to filter this exception at UI. So
i got this code:
wok.login(settings, function(data) {
var query = window.location.search;
var next = /.*next=(.*?)(&|$)/g.exec(query);
if (next) {
var next_url = decodeURIComponent(next[1]);
}
else {
var lastPage = wok.cookie.get('lastPage');
var next_url = lastPage ? lastPage.replace(/\"/g,'') : "/";
}
wok.cookie.set('roles',JSON.stringify(data.roles));
window.location.replace(window.location.pathname.replace(/\/+login.html/,
'') + next_url);
}, function(jqXHR, textStatus, errorThrown) {
if (jqXHR.responseText == "") {
$("#messUserPass").hide();
$("#missServer").show();
} else {
$("#missServer").hide();
$("#messUserPass").show();
}
$("#messSession").hide();
$("#logging").hide();
$("#login").show();
});
The issue is:
1) If i raise a cherrypy.HTTPError, i got a html error with the message
i created on the code. Here is an example http://pastebin.com/AjkWwHBz.
The message is there, but i must parse it.
2) If i raise a InvalidOperation or other exception from wok, i receive
a error 500:
{
"reason":"The server encountered an unexpected condition which
prevented it from fulfilling the request.",
"code":"500 Internal Server Error"
}
I want to receive a json with the error, to make it to parse from UI.
--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn(a)br.ibm.com
7 years, 10 months
[PATCH] [Wok 0/2] Remove Kimchi references from Wok
by Aline Manera
Aline Manera (2):
Fix issue #40: Improve WOKAUTH0002E error message and remove
references to Kimchi
Remove spice-html5 references from Wok build
configure.ac | 11 +----------
po/de_DE.po | 33 ++++++++++++++++-----------------
po/en_US.po | 29 ++++++++++++++---------------
po/es_ES.po | 33 ++++++++++++++++-----------------
po/fr_FR.po | 33 ++++++++++++++++-----------------
po/it_IT.po | 33 ++++++++++++++++-----------------
po/ja_JP.po | 33 ++++++++++++++++-----------------
po/ko_KR.po | 33 ++++++++++++++++-----------------
po/pt_BR.po | 33 ++++++++++++++++-----------------
po/ru_RU.po | 33 ++++++++++++++++-----------------
po/wok.pot | 27 +++++++++++++--------------
po/zh_CN.po | 33 ++++++++++++++++-----------------
po/zh_TW.po | 33 ++++++++++++++++-----------------
src/wok/Makefile.am | 11 ++---------
src/wok/i18n.py | 6 +++---
15 files changed, 193 insertions(+), 221 deletions(-)
--
2.7.4
7 years, 10 months
[PATCH v2] [Kimchi 0/4] Live migration RDMA support
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
v2:
- added unit test.
This patch set adds Live Migration RDMA support in Kimchi.
The backend/frontend will not verify if the network card
is RDMA capable before doing the migration. User will have
to deal with the libvirt errors in case RDMA is chosen
without proper support/setup.
Daniel Henrique Barboza (4):
Live migration RDMA support: doc changes
Live migration RDMA support: model changes
Live migration RDMA support: ui changes
Live migration RDMA support: test changes
API.json | 5 ++++
control/vms.py | 5 ++--
docs/API.md | 1 +
i18n.py | 3 +-
model/vms.py | 18 ++++++++---
tests/test_livemigration.py | 53 ++++++++++++++++++++++++++++++++-
ui/js/src/kimchi.guest_livemigration.js | 7 +++--
ui/pages/guest-migration.html.tmpl | 6 +++-
8 files changed, 86 insertions(+), 12 deletions(-)
--
2.7.4
7 years, 10 months
[PATCH v3] [Kimchi] Issue# 979 - Change boot order UI
by bianca@linux.vnet.ibm.com
From: Bianca Carvalho <bianca(a)linux.vnet.ibm.com>
This patch adds the UI portion for supporting changing the guest boot order
via edit guest panel. This was based off of what Samuel had prototyped.
Issue found in backend during test:
When updating the VM even with just changing the name, the bootorder gets reset to 'hd' only.
I tested this using the curl command and confirmed that indeed it does get reset to one entry only.
Issue written to address this: https://github.com/kimchi-project/kimchi/issues/1012
Signed-off-by: Bianca Carvalho <bianca(a)linux.vnet.ibm.com>
---
ui/css/kimchi.css | 57 +++++++++++++++++++++++++++++++-
ui/css/src/modules/_edit-guests.scss | 56 +++++++++++++++++++++++++++++++-
ui/js/src/kimchi.guest_edit_main.js | 63 ++++++++++++++++++++++++++++++++++--
ui/pages/guest-edit.html.tmpl | 18 +++++++++--
4 files changed, 187 insertions(+), 7 deletions(-)
diff --git a/ui/css/kimchi.css b/ui/css/kimchi.css
index fff3279..16cc161 100644
--- a/ui/css/kimchi.css
+++ b/ui/css/kimchi.css
@@ -1,7 +1,7 @@
/*
* Project Kimchi
*
- * Copyright IBM Corp, 2015-2016
+ * Copyright IBM Corp, 2015-2017
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1557,6 +1557,61 @@ body.wok-gallery {
overflow: visible;
}
+ul {
+ cursor: default;
+}
+
+.boot-order {
+ display: block;
+ width: 85%;
+ font-size: 14px;
+ line-height: 1.42857;
+ color: #444;
+ overflow: hidden;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+}
+
+.boot-order:focus,
+.boot-order.focus {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+
+.boot-order > li {
+ cursor: move;
+ /* fallback if grab cursor is unsupported */
+ cursor: grab;
+ cursor: -moz-grab;
+ cursor: -webkit-grab;
+ border-left: 0;
+ border-right: 0;
+}
+
+.boot-order > li:first-child {
+ border-top: 0;
+}
+
+.boot-order > li:last-child {
+ border-bottom: 0;
+}
+
+.boot-order > li.ui-sortable-helper {
+ cursor: grabbing;
+ cursor: -moz-grabbing;
+ cursor: -webkit-grabbing;
+ border: 1px solid #ccc !important;
+}
+
/* Add Template Modal Window */
.templates-modal .modal-dialog {
width: 1100px;
diff --git a/ui/css/src/modules/_edit-guests.scss b/ui/css/src/modules/_edit-guests.scss
index 25d4d65..e0794de 100644
--- a/ui/css/src/modules/_edit-guests.scss
+++ b/ui/css/src/modules/_edit-guests.scss
@@ -1,7 +1,7 @@
//
// Project Kimchi
//
-// Copyright IBM Corp, 2015-2016
+// Copyright IBM Corp, 2015-2017
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -429,3 +429,57 @@
#form-guest-storage-add .form-section .field {
overflow: visible;
}
+
+ul {
+ cursor: default;
+}
+
+.boot-order {
+ display: block;
+ width: 85%;
+ font-size: 14px;
+ line-height: 1.42857;
+ color: #444;
+ overflow: hidden;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+}
+
+.boot-order:focus,
+.boot-order.focus {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+}
+
+.boot-order > li {
+ cursor: move; /* fallback if grab cursor is unsupported */
+ cursor: grab;
+ cursor: -moz-grab;
+ cursor: -webkit-grab;
+ border-left: 0;
+ border-right: 0;
+}
+
+.boot-order > li:first-child {
+ border-top: 0;
+}
+
+.boot-order > li:last-child {
+ border-bottom: 0;
+}
+
+.boot-order > li.ui-sortable-helper {
+ cursor: grabbing;
+ cursor: -moz-grabbing;
+ cursor: -webkit-grabbing;
+ border: 1px solid #ccc !important;
+}
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index bb82077..38a1d39 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -1,7 +1,7 @@
/*
* Project Kimchi
*
- * Copyright IBM Corp, 2013-2016
+ * Copyright IBM Corp, 2013-2017
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ kimchi.guest_edit_main = function() {
var networkOptions = "";
clearTimeout(kimchi.vmTimeout);
+ var bootOrderOptions = [];
$('#modalWindow').on('hidden.bs.modal', function() {
kimchi.setListVMAutoTimeout();
@@ -45,7 +46,7 @@ kimchi.guest_edit_main = function() {
var submitForm = function(event) {
- // tap map, "general": 0, "storage": 1, "interface": 2, "permission": 3, "password": 4
+ // tap map, "general": 0, "storage": 1, "interface": 2, "permission": 3, "pci": 4, "snapshot": 5, "processor": 6
var submit_map = {
0: generalSubmit,
3: permissionSubmit,
@@ -967,6 +968,42 @@ kimchi.guest_edit_main = function() {
}
};
+ var setupBootOrder = function(guest) {
+ var guestBootOrder = guest['bootorder'];
+ $("#myList").empty();
+ $.each(guestBootOrder, function(index, value) {
+ var itemNode = $.parseHTML("<li class='list-group-item' " + "data-value=" + value + ">" + value + "</li>");
+ $("#myList").append(itemNode);
+ });
+
+ $('.boot-order').sortable({
+ items: 'li',
+ cursor: 'move',
+ opacity: 0.6,
+ containment: "parent",
+ start: function(event, ui) {
+ $(this).addClass('focus');
+ },
+ stop: function(event, ui) {
+ $(this).removeClass('focus');
+ },
+ change: function(event, ui) {
+ // callback once started changing order
+ },
+ update: function(event, ui) {
+ // callback once finished order
+ $(saveButton).prop('disabled', false);
+ bootOrderOptions = [];
+ $("#myList li").each(function() {
+ bootOrderOptions.push($(this).text())
+ });
+ bootOrderOptions.forEach(function(entry) {
+ console.log(entry);
+ });
+ }
+ });
+ };
+
var initContent = function(guest) {
guest['icon'] = guest['icon'] || 'plugins/kimchi/images/icon-vm.png';
$('#form-guest-edit-general').fillWithObject(guest);
@@ -1032,6 +1069,7 @@ kimchi.guest_edit_main = function() {
setupPermission();
setupPCIDevice();
setupSnapshot();
+ setupBootOrder(guest);
kimchi.init_processor_tab(guest.cpu_info, $(saveButton));
if ((kimchi.thisVMState === "running") || (kimchi.thisVMState === "paused")) {
@@ -1129,6 +1167,27 @@ kimchi.guest_edit_main = function() {
});
});
+ //Format the strings to go in the array before passing in to the API
+ //"hd", "network", "cdrom"
+ var formattedBootOrderOptions = [];
+ for (var i=0; i<bootOrderOptions.length; i++) {
+ var str = bootOrderOptions[i].trim();
+ str = str.toLowerCase();
+ if (str === "hdd") {
+ str = "hd";
+ } else if (str === "cd-rom") {
+ str = "cdrom";
+ }
+ formattedBootOrderOptions.push(str);
+ }
+ var data = {
+ bootorder: formattedBootOrderOptions
+ };
+ kimchi.updateVM(kimchi.selectedGuest, data, function() {
+ wok.window.close();
+ }, function(err) {
+ wok.message.error(err.responseJSON.reason,'#alert-modal-container');
+ });
};
var permissionSubmit = function(event) {
diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl
index d8a482c..9cc73b6 100644
--- a/ui/pages/guest-edit.html.tmpl
+++ b/ui/pages/guest-edit.html.tmpl
@@ -1,7 +1,7 @@
#*
* Project Kimchi
*
- * Copyright IBM Corp, 2013-2016
+ * Copyright IBM Corp, 2013-2017
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@
</div>
<div class="modal-body">
<span id="alert-modal-container"></span>
-<ul class="nav nav-tabs" role="tablist">
+ <ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#form-guest-edit-general" aria-controls="form-guest-edit-general" role="tab" data-id="form-guest-edit-general" data-toggle="tab">$_("General")</a></li>
<li role="presentation"><a href="#form-guest-edit-storage" aria-controls="form-guest-edit-storage" role="tab" data-id="form-guest-edit-storage" data-toggle="tab">$_("Storage")</a></li>
<li role="presentation"><a href="#form-guest-edit-interface" aria-controls="form-guest-edit-interface" role="tab" data-id="form-guest-edit-interface" data-toggle="tab">$_("Interface")</a></li>
@@ -68,6 +68,19 @@
<option value="virtio">$_("virtio")</option>
</select>
</div>
+ <div class="form-group">
+ <div id="bootOrder">
+ <label for="guest-edit-boot-order-textbox">Boot Order</label>
+ <ul id="myList" class="list-group boot-order">
+ <li class="list-group-item" data-value="CD-ROM">CD-ROM</li>
+ <li class="list-group-item" data-value="HDD">HDD</li>
+ <li class="list-group-item" data-value="Network">Network</li>
+ </ul>
+ <p class="help-block">
+ <i class="fa fa-info-circle"></i> $_("Change the boot order by dragging the items on the list.")</p>
+ </p>
+ </div>
+ </div>
</form>
<form role="tabpanel" class="tab-pane" id="form-guest-edit-storage">
<div class="btn-group action-area">
@@ -197,7 +210,6 @@
$_("Current CPU must be equal or lower than the Maximum CPU value. If a topology is set, it must be also be a multiple of the 'threads' value.")
</p>
</div>
-
<div id="guest-max-processor-panel" class="form-group">
<label for="guest-edit-max-processor-textbox">$_("Max CPU")</label>
<p id="settings-readonly-help" class="hidden">$_("Unable to edit maximum CPU or CPU topology when editing a running or paused virtual machine.")</p>
--
2.9.3
7 years, 10 months
[PATCH] [Kimchi] Fix issue #1069: Allow user specifies the Template name when creating it
by Aline Manera
When user creates a Template, now he/she can specify the Template name
otherwise, it will be automatically chosen.
The Template name is not taken in count when the user selected more than
one Image Template. In that case, a name will be automatically chosen
for each Image Template selected.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.template_add_main.js | 24 +++++++++++++++++++++++-
ui/pages/template-add.html.tmpl | 10 +++++++++-
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/kimchi.template_add_main.js b/ui/js/src/kimchi.template_add_main.js
index 64d67c1..89d86e3 100644
--- a/ui/js/src/kimchi.template_add_main.js
+++ b/ui/js/src/kimchi.template_add_main.js
@@ -1,7 +1,7 @@
/*
* Project Kimchi
*
- * Copyright IBM Corp, 2013-2016
+ * Copyright IBM Corp, 2013-2017
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -255,6 +255,13 @@ kimchi.template_add_main = function() {
$('#iso-file').val('');
$('#iso-url').val('');
+ if (checkedLength && checkedLength != 1) {
+ $('#tmpl-name').val('');
+ $('#tmpl-name').attr('disabled', 'disabled');
+ } else {
+ $('#tmpl-name').removeAttr('disabled');
+ }
+
$('#btn-template-file-create').attr('disabled', 'disabled').css('display', 'none'); // 1 - Folder path
$('#btn-template-local-iso-create').attr('disabled', 'disabled').css('display', 'inline-block'); // 2 - Selected ISOs
$('#btn-template-netboot-create').attr('disabled', 'disabled').css('display', 'none'); // 3 - Netboot
@@ -271,9 +278,15 @@ kimchi.template_add_main = function() {
});
$('#btn-template-netboot-create').click(function() {
+ var tmpl_name = $('#tmpl-name').val();
var data = {
"source_media": {"type": "netboot"}
};
+
+ if (tmpl_name && tmpl_name != "") {
+ data['name'] = tmpl_name
+ }
+
addTemplate(data, function() {
$('#btn-template-netboot-create').text(i18n['KCHAPI6005M']);
$('#btn-template-netboot-create').prop('disabled', false);
@@ -281,6 +294,7 @@ kimchi.template_add_main = function() {
});
$('#btn-template-local-iso-create').click(function() {
+ var tmpl_name = $('#tmpl-name').val();
$('input', '#iso-file-box').prop('disabled', true);
$('#btn-template-local-iso-create').text(i18n['KCHAPI6008M']);
$('#btn-template-local-iso-create').prop('disabled', true);
@@ -288,6 +302,7 @@ kimchi.template_add_main = function() {
});
$('#btn-template-file-create').click(function() {
+ var tmpl_name = $('#tmpl-name').val();
var isoFile = $('#iso-file').val();
$('input', '#iso-file-box').prop('disabled', true);
$('#btn-template-file-create').text(i18n['KCHAPI6008M']);
@@ -299,6 +314,9 @@ kimchi.template_add_main = function() {
var data = {
"source_media": {"type": "disk", "path": isoFile}
};
+ if (tmpl_name && tmpl_name != "") {
+ data['name'] = tmpl_name
+ }
addTemplate(data, function() {
$('input', '#iso-file-box').prop('disabled', false);
$('#btn-template-file-create').text(i18n['KCHAPI6005M']);
@@ -440,11 +458,15 @@ kimchi.template_add_main = function() {
var length = 0;
var successNum = 0;
var addTemplate = function(isoInfo) {
+ var tmpl_name = $('#tmpl-name').val();
var data = {
"os_distro": isoInfo.os_distro,
"os_version": isoInfo.os_version,
"source_media": {"type": "disk", "path": isoInfo.path}
};
+ if (length == 1 && tmpl_name && tmpl_name != "") {
+ data['name'] = tmpl_name
+ }
kimchi.createTemplate(data, function() {
successNum++;
$('input[value="' + isoInfo.isoId + '"]').prop('checked', false);
diff --git a/ui/pages/template-add.html.tmpl b/ui/pages/template-add.html.tmpl
index 4028f90..007511f 100644
--- a/ui/pages/template-add.html.tmpl
+++ b/ui/pages/template-add.html.tmpl
@@ -1,7 +1,7 @@
#*
* Project Kimchi
*
- * Copyright IBM Corp, 2013-2016
+ * Copyright IBM Corp, 2013-2017
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,6 +30,14 @@
<div class="modal-body">
<div class="template-modal-container">
<div id="alert-modal-container"></div>
+ <div class="form-group">
+ <label for="tmpl-name">$_("Template Name")</label>
+ <input type="text" class="form-control" name="name" id="tmpl-name" />
+ <p class="help-block"><i class="fa fa-info-circle"></i> $_("The name used to identify the template. If omitted, a name will be automatically chosen.")
+ </p>
+ <p class="help-block"><i class="fa fa-info-circle"></i> $_("When selecting more than one Image Template, a name will be automatically chosen for each Image Template selected.")
+ </p>
+ </div>
<div>
<h5>$_("Where is the source media for this template? ")</h5>
<input type="radio" checked="checked" name="iso-source" id="image-src" value="image-src" class="wok-radio">
--
2.7.4
7 years, 10 months
[PATCH] [Kimchi 0/3] Live migration RDMA support
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
This patch set adds Live Migration RDMA support in Kimchi.
The backend/frontend will not verify if the network card
is RDMA capable before doing the migration. User will have
to deal with the libvirt errors in case RDMA is chosen
without proper support/setup.
Daniel Henrique Barboza (3):
Live migration RDMA support: doc changes
Live migration RDMA support: model changes
Live migration RDMA support: ui changes
API.json | 5 +++++
control/vms.py | 5 +++--
docs/API.md | 1 +
i18n.py | 3 ++-
model/vms.py | 18 ++++++++++++++----
ui/js/src/kimchi.guest_livemigration.js | 7 ++++---
ui/pages/guest-migration.html.tmpl | 6 +++++-
7 files changed, 34 insertions(+), 11 deletions(-)
--
2.7.4
7 years, 10 months
[PATCH] [Wok] Always install firewalld conf for all distributions
by Lucio Correia
Even if firewalld is not installed, Wok should install
specific wokd.xml for it, for the case firewalld is
installed afterwards.
This patch does that by removing checks for existing
firewalld directory and removing all build and runtime
dependencies on firewalld, since it's not required to
run Wok.
Also, by always installing config for firealld, it
fixes issues #27 and #185 another way.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
Makefile.am | 14 +++++++-------
contrib/wok.spec.fedora.in | 4 +---
contrib/wok.spec.suse.in | 2 +-
docs/fedora-deps.md | 2 +-
docs/opensuse-deps.md | 2 +-
5 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 72ffb50..7b34dca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -98,6 +98,9 @@ install-deb: install
$(DESTDIR)/etc/init/wokd.conf; \
fi
$(MKDIR_P) $(DESTDIR)/$(localstatedir)/lib/wok/
+ $(MKDIR_P) $(DESTDIR)/usr/lib/firewalld/services
+ cp -R $(top_srcdir)/src/firewalld.xml \
+ $(DESTDIR)/usr/lib/firewalld/services/wokd.xml
deb: contrib/make-deb.sh
@@ -143,10 +146,8 @@ install-data-local:
$(INSTALL_DATA) contrib/wokd.sysvinit $(DESTDIR)/etc/init.d/wokd; \
chmod +x $(DESTDIR)/etc/init.d/wokd; \
fi; \
- if test -d /usr/lib/firewalld/services/; then \
- mkdir -p $(DESTDIR)/usr/lib/firewalld/services/; \
- $(INSTALL_DATA) src/firewalld.xml $(DESTDIR)/usr/lib/firewalld/services/wokd.xml; \
- fi; \
+ mkdir -p $(DESTDIR)/usr/lib/firewalld/services/;
+ $(INSTALL_DATA) src/firewalld.xml $(DESTDIR)/usr/lib/firewalld/services/wokd.xml;
mkdir -p $(DESTDIR)/$(localstatedir)/lib/wok/
mkdir -p $(DESTDIR)/$(localstatedir)/log/wok/
touch $(DESTDIR)/$(localstatedir)/log/wok/wok-access.log
@@ -165,9 +166,8 @@ uninstall-local:
$(RM) $(DESTDIR)/etc/init.d/wokd; \
$(RM) $(DESTDIR)/etc/init/wok.conf; \
fi; \
- if test -d /usr/lib/firewalld/services/; then \
- $(RM) $(DESTDIR)/usr/lib/firewalld/services/wokd.xml; \
- fi; \
+ $(RM) $(DESTDIR)/usr/lib/firewalld/services/wokd.xml
+ rmdir $(DESTDIR)/usr/lib/firewalld/services && rmdir $(DESTDIR)/usr/lib/firewalld || :
$(RM) -rf $(DESTDIR)/$(localstatedir)/lib/wok
$(RM) -rf $(DESTDIR)/$(localstatedir)/log/wok
$(RM) -rf $(DESTDIR)/etc/wok
diff --git a/contrib/wok.spec.fedora.in b/contrib/wok.spec.fedora.in
index 0119381..fcada13 100644
--- a/contrib/wok.spec.fedora.in
+++ b/contrib/wok.spec.fedora.in
@@ -21,7 +21,6 @@ Requires: fontawesome-fonts
Requires: open-sans-fonts
Requires: logrotate
Requires: openssl
-BuildRequires: firewalld
BuildRequires: gettext-devel
BuildRequires: libxslt
BuildRequires: openssl
@@ -39,7 +38,6 @@ BuildRequires: python-unittest2
%if 0%{?with_systemd}
Requires: systemd
-Requires: firewalld
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
@@ -115,6 +113,7 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/wok/plugins/*.py*
%{python_sitelib}/wok/
%{_prefix}/share/locale/*/LC_MESSAGES/wok.mo
+%{_prefix}/lib/firewalld/services/wokd.xml
%{_datadir}/wok/ui/
%{_datadir}/wok
%{_sysconfdir}/wok/wok.conf
@@ -128,7 +127,6 @@ rm -rf $RPM_BUILD_ROOT
%{_localstatedir}/log/wok/*
%{_localstatedir}/log/wok/
%{_unitdir}/wokd.service
-%{_prefix}/lib/firewalld/services/wokd.xml
%endif
%if 0%{?rhel} == 6
/etc/init/wokd.conf
diff --git a/contrib/wok.spec.suse.in b/contrib/wok.spec.suse.in
index 8bed37a..ea2e708 100644
--- a/contrib/wok.spec.suse.in
+++ b/contrib/wok.spec.suse.in
@@ -22,7 +22,6 @@ Requires: fontawesome-fonts
Requires: google-opensans-fonts
Requires: logrotate
Requires: openssl
-BuildRequires: firewalld
BuildRequires: gettext-tools
BuildRequires: libxslt-tools
BuildRequires: openssl
@@ -110,6 +109,7 @@ rm -rf $RPM_BUILD_ROOT
%{_localstatedir}/log/wok/*
%{_localstatedir}/log/wok/
%{_mandir}/man8/wokd.8.gz
+%{_prefix}/lib/firewalld/services/wokd.xml
%if 0%{?with_systemd}
%{_unitdir}/wokd.service
diff --git a/docs/fedora-deps.md b/docs/fedora-deps.md
index fa99f30..260390e 100644
--- a/docs/fedora-deps.md
+++ b/docs/fedora-deps.md
@@ -20,7 +20,7 @@ Build Dependencies
--------------------
$ sudo yum install gcc make autoconf automake gettext-devel git rpm-build \
- libxslt firewalld
+ libxslt
Runtime Dependencies
--------------------
diff --git a/docs/opensuse-deps.md b/docs/opensuse-deps.md
index ad4ed92..7fe1763 100644
--- a/docs/opensuse-deps.md
+++ b/docs/opensuse-deps.md
@@ -10,7 +10,7 @@ Build Dependencies
--------------------
$ sudo zypper install gcc make autoconf automake gettext-tools git \
- rpm-build libxslt-tools firewalld
+ rpm-build libxslt-tools
Runtime Dependencies
--------------------
--
2.7.4
7 years, 10 months
[PATCH] [Wok] Fix typo in settings.css
by Lucio Correia
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
ui/css/settings.css | 2 +-
ui/css/src/modules/_wok-accordion.scss | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui/css/settings.css b/ui/css/settings.css
index 641b805..ec3c086 100644
--- a/ui/css/settings.css
+++ b/ui/css/settings.css
@@ -37,7 +37,7 @@
clear: both;
}
-#wok-root-container .accordion:first-chld {
+#wok-root-container .accordion:first-child {
margin-top: 24px;
}
diff --git a/ui/css/src/modules/_wok-accordion.scss b/ui/css/src/modules/_wok-accordion.scss
index 1d86ddd..ee91709 100644
--- a/ui/css/src/modules/_wok-accordion.scss
+++ b/ui/css/src/modules/_wok-accordion.scss
@@ -22,7 +22,7 @@
border-bottom: 1px solid $table-border-color;
overflow: visible;
clear: both;
- &:first-chld {
+ &:first-child {
margin-top: 24px;
}
> h3 {
@@ -65,4 +65,4 @@
}
}
}
-}
\ No newline at end of file
+}
--
2.7.4
7 years, 10 months
[PATCH] [Wok] Remove execution permission from css files
by Lucio Correia
Debian build system has detected unnecessary execution
permission bits in some files. Fix them.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
ui/css/src/vendor/compass-mixins/lib/compass/functions/_display.scss | 0
ui/css/src/wok.scss | 0
2 files changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 ui/css/src/vendor/compass-mixins/lib/compass/functions/_display.scss
mode change 100755 => 100644 ui/css/src/wok.scss
diff --git a/ui/css/src/vendor/compass-mixins/lib/compass/functions/_display.scss b/ui/css/src/vendor/compass-mixins/lib/compass/functions/_display.scss
old mode 100755
new mode 100644
diff --git a/ui/css/src/wok.scss b/ui/css/src/wok.scss
old mode 100755
new mode 100644
--
2.7.4
7 years, 10 months
[PATCH] [Kimchi] Bug fix #1073: Re-attach device to host when detaching it from guest
by Aline Manera
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
model/vmhostdevs.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/model/vmhostdevs.py b/model/vmhostdevs.py
index 1f893f2..6b02f4d 100644
--- a/model/vmhostdevs.py
+++ b/model/vmhostdevs.py
@@ -636,6 +636,13 @@ class VMHostDevModel(object):
return
wok_log.info("Device %s removed successfuly" % alias)
+ # Re-attach device to host
+ try:
+ dev = conn.get().nodeDeviceLookupByName(alias)
+ dev.reAttach()
+ except libvirt.libvirtError, e:
+ wok_log.error("Unable to attach device %s back to host. Error: %s",
+ alias, e.message)
opaque._cb('OK', True)
def _detach_device(self, cb, params):
--
2.7.4
7 years, 10 months