[PATCH] [Kimchi] Use qxl driver only for x86
by Lucio Correia
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
osinfo.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/osinfo.py b/osinfo.py
index 4b89aac..a3c2b0e 100644
--- a/osinfo.py
+++ b/osinfo.py
@@ -74,7 +74,7 @@ template_specs = {'x86': {'old': dict(disk_bus='ide',
tablet_bus='usb')}}
-custom_specs = {'fedora': {'22': dict(video_model='qxl')}}
+custom_specs = {'fedora': {'22': {'x86': dict(video_model='qxl')}}}
modern_version_bases = {'x86': {'debian': '6.0', 'ubuntu': '7.10',
@@ -233,7 +233,7 @@ def lookup(distro, version):
specs = custom_specs.get(distro, {})
for v, config in specs.iteritems():
if LooseVersion(version) >= LooseVersion(v):
- params.update(config)
+ params.update(config.get(arch, {}))
if distro in icon_available_distros:
params['icon'] = 'plugins/kimchi/images/icon-%s.png' % distro
--
1.9.1
8 years, 5 months
[PATCH][Kimchi] Fix typo in API.md
by Rodrigo Trujillo
---
docs/API.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/API.md b/docs/API.md
index 7072ab2..84ef7c9 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -908,7 +908,7 @@ List of available groups.
Other available values are "fc_host", "net", "pci", "scsi",
"storage", "system", "usb" and "usb_device".
* _passthrough: Filter devices eligible to be assigned to guest
- directly. Possible values are "ture" and "false".
+ directly. Possible values are "true" and "false".
* _passthrough_affected_by: Filter the affected devices in the same
group of a certain directly assigned device.
The value should be the name of a device.
--
2.1.0
8 years, 5 months
[PATCH V4] [Kimchi 0/3] Fix VM name conflicts with snapshot reverts
by Lucio Correia
Changes in V4:
* Fixed test_rest
Lucio Correia (3):
Always update snapshot XML with new name and UUID
Use ASCII name in XML
Update tests to reflect new behavior
model/vms.py | 14 ++++++++++++--
tests/test_model.py | 41 ++++++++++++++++++++---------------------
2 files changed, 32 insertions(+), 23 deletions(-)
--
1.9.1
8 years, 5 months
[PATCH V2] [Wok] Remove support for TLS v1.0 and add SSL timeout
by Lucio Correia
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
src/nginx/wok.conf.in | 3 ++-
src/wok/proxy.py | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
Changes in V2:
* read timeout value from config
diff --git a/src/nginx/wok.conf.in b/src/nginx/wok.conf.in
index 8dd5d7c..cb05e4d 100644
--- a/src/nginx/wok.conf.in
+++ b/src/nginx/wok.conf.in
@@ -62,10 +62,11 @@ http {
ssl_certificate ${cert_pem};
ssl_certificate_key ${cert_key};
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:@STRENGTH';
ssl_prefer_server_ciphers on;
ssl_dhparam ${dhparams_pem};
+ ssl_session_timeout ${session_timeout}m;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
add_header X-Frame-Options DENY;
diff --git a/src/wok/proxy.py b/src/wok/proxy.py
index 9d39dbd..a74e88a 100644
--- a/src/wok/proxy.py
+++ b/src/wok/proxy.py
@@ -102,6 +102,7 @@ def _create_proxy_config(options):
websockets_port=options.websockets_port,
cert_pem=cert, cert_key=key,
max_body_size=eval(options.max_body_size),
+ session_timeout=options.session_timeout,
dhparams_pem=dhparams_pem)
# Write file to be used for nginx.
--
1.9.1
8 years, 5 months
[PATCH v2][Kimchi] Issue #962: Suggestion to check spec guidelines
by Ramon Medeiros
Run rpmlint on check-local
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
Changes:
v2:
Verify if rpmlint is installed (this will prevent break on debian based systems)
Makefile.am | 5 ++++-
check_spec_errors.sh | 36 ++++++++++++++++++++++++++++++++++++
configure.ac | 1 +
docs/fedora-deps.md | 2 +-
docs/opensuse-deps.md | 2 +-
5 files changed, 43 insertions(+), 3 deletions(-)
create mode 100755 check_spec_errors.sh
diff --git a/Makefile.am b/Makefile.am
index 1b46773..0018287 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -82,7 +82,10 @@ check-local:
&& echo "ERROR: Whitespaces found" || echo "Ok"; \
echo "IBM copyright year verification ..." ; \
/bin/bash ../../../../check-IBM-license-header.sh ; \
- fi
+ fi;
+ @if [ -f $(RPMLINT) ]; then \
+ ./check_spec_errors.sh; \
+ fi;
# Link built mo files in the source tree to enable use of translations from
# within the source tree
diff --git a/check_spec_errors.sh b/check_spec_errors.sh
new file mode 100755
index 0000000..5e43d8b
--- /dev/null
+++ b/check_spec_errors.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2016
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+echo "Checking spec guidelines"
+
+# create links
+cp contrib/kimchi.spec.fedora contrib/kimchi_fedora.spec
+cp contrib/kimchi.spec.suse contrib/kimchi_suse.spec
+
+# run checking
+rpmlint contrib/kimchi_fedora.spec
+rpmlint contrib/kimchi_suse.spec
+
+# remove links
+rm contrib/kimchi_fedora.spec
+rm contrib/kimchi_suse.spec
+
+
diff --git a/configure.ac b/configure.ac
index 870ac0c..cafff0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,6 +36,7 @@ AM_INIT_AUTOMAKE([-Wno-portability])
AM_PATH_PYTHON([2.6])
AC_PATH_PROG([PEP8], [pep8], [/usr/bin/pep8])
AC_PATH_PROG([GIT], [git], [/usr/bin/git])
+AC_PATH_PROG([RPMLINT], [rpmlint], [/usr/bin/rpmlint])
AC_PYTHON_MODULE([unittest])
AC_SUBST([HAVE_PYMOD_UNITTEST])
AC_SUBST([PYTHON_VERSION])
diff --git a/docs/fedora-deps.md b/docs/fedora-deps.md
index ca24994..65ad987 100644
--- a/docs/fedora-deps.md
+++ b/docs/fedora-deps.md
@@ -47,7 +47,7 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo yum install pyflakes python-pep8 python-requests python-mock
+ $ sudo yum install pyflakes python-pep8 python-requests python-mock rpmlint
# For RHEL systems, install the additional packages:
$ sudo yum install python-unittest2
diff --git a/docs/opensuse-deps.md b/docs/opensuse-deps.md
index a8763b3..16ffb5e 100644
--- a/docs/opensuse-deps.md
+++ b/docs/opensuse-deps.md
@@ -45,4 +45,4 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo zypper install python-pyflakes python-pep8 python-requests python-mock
+ $ sudo zypper install python-pyflakes python-pep8 python-requests python-mock rpmlint
--
2.5.5
8 years, 5 months
[PATCH v2][Wok] Issue #116: Suggestion to check spec guidelines
by Ramon Medeiros
Run rpmlint on check-local
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
v2:
Verify if rpmlint is installed (this will prevent break on debian based systems)
Makefile.am | 4 ++++
check_spec_errors.sh | 36 ++++++++++++++++++++++++++++++++++++
configure.ac | 1 +
docs/fedora-deps.md | 2 +-
docs/opensuse-deps.md | 2 +-
5 files changed, 43 insertions(+), 2 deletions(-)
create mode 100755 check_spec_errors.sh
diff --git a/Makefile.am b/Makefile.am
index 325d0c9..6d3588a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -69,6 +69,10 @@ check-local:
echo "Check IBM license header and copyright date ..." ; \
/bin/bash check-IBM-license-header.sh ; \
fi
+ @if [ -f $(RPMLINT) ]; then \
+ ./check_spec_errors.sh; \
+ fi;
+
# Link built mo files in the source tree to enable use of translations from
# within the source tree
diff --git a/check_spec_errors.sh b/check_spec_errors.sh
new file mode 100755
index 0000000..e5f47f4
--- /dev/null
+++ b/check_spec_errors.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2016
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+echo "Checking spec guidelines"
+
+# create links
+cp contrib/wok.spec.fedora contrib/wok_fedora.spec
+cp contrib/wok.spec.suse contrib/wok_suse.spec
+
+# run checking
+rpmlint contrib/wok_fedora.spec
+rpmlint contrib/wok_suse.spec
+
+# remove links
+rm contrib/wok_fedora.spec
+rm contrib/wok_suse.spec
+
+
diff --git a/configure.ac b/configure.ac
index 002774d..4d34e88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,7 @@ AM_INIT_AUTOMAKE([-Wno-portability])
AM_PATH_PYTHON([2.6])
AC_PATH_PROG([PEP8], [pep8], [/usr/bin/pep8])
AC_PATH_PROG([GIT], [git], [/usr/bin/git])
+AC_PATH_PROG([RPMLINT], [rpmlint], [/usr/bin/rpmlint])
AC_PYTHON_MODULE([unittest])
AC_SUBST([HAVE_PYMOD_UNITTEST])
AC_SUBST([PYTHON_VERSION])
diff --git a/docs/fedora-deps.md b/docs/fedora-deps.md
index e665cdb..260390e 100644
--- a/docs/fedora-deps.md
+++ b/docs/fedora-deps.md
@@ -42,7 +42,7 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo yum install pyflakes python-pep8 python-requests
+ $ sudo yum install pyflakes python-pep8 python-requests rpmlint
# For RHEL systems, install the additional packages:
$ sudo yum install python-unittest2
diff --git a/docs/opensuse-deps.md b/docs/opensuse-deps.md
index 4fe3876..7fe1763 100644
--- a/docs/opensuse-deps.md
+++ b/docs/opensuse-deps.md
@@ -29,4 +29,4 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo zypper install python-pyflakes python-pep8 python-requests
+ $ sudo zypper install python-pyflakes python-pep8 python-requests rpmlint
--
2.5.5
8 years, 5 months
[PATCH] [Kimchi] Add loading icon for guests tab
by Socorro Stoppler
Add 'loading' icon when in Guests tab as it may take a while to get
the list of guests to appear
Signed-off-by: Socorro Stoppler <socorro(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_main.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index 2f5e757..fea8054 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -315,7 +315,7 @@ kimchi.initClone = function() {
kimchi.listVmsAuto = function() {
-
+ $('.wok-mask').removeClass('hidden');
//Check if the actions button is opened or not,
//if opended stop the reload of the itens until closed
var $isDropdownOpened = $('[name="guest-actions"] ul.dropdown-menu').is(":visible");
@@ -418,10 +418,12 @@ kimchi.listVmsAuto = function() {
});
});
}
+ $('.wok-mask').fadeOut(300, function() {});
} else {
$('.grid-control').addClass('hidden');
$('#guestListField').hide();
$('#noGuests').show();
+ $('.wok-mask').fadeOut(300, function() {});
}
}
--
2.5.0
8 years, 5 months
[PATCH] [Kimchi] Save view for Guests tab
by Socorro Stoppler
This patch addresses the issue of the last view of the Guests tab not
being remembered either after switching tabs or exiting Kimchi. When
switching view from List to Gallery (or vice versa), the next time the
user goes back to the Guests tab, whatever view it was last on should
be what is shown when going back to the Guests tab.
Signed-off-by: Socorro Stoppler <socorro(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_main.js | 59 ++++++++++++++++++++++++++++++++++++++----
1 file changed, 54 insertions(+), 5 deletions(-)
diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index 2f5e757..fe6d48d 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -801,15 +801,64 @@ kimchi.guestSetRequestHeader = function(xhr) {
};
kimchi.toggleGuestsGallery = function() {
- $(".wok-guest-list, .wok-guest-gallery").toggleClass("wok-guest-list wok-guest-gallery");
- $(".wok-list, .wok-gallery").toggleClass("wok-list wok-gallery");
- var text = $('#guest-gallery-table-button span.text').text();
- $('#guest-gallery-table-button span.text').text(text == i18n['KCHTMPL6005M'] ? i18n['KCHTMPL6004M'] : i18n['KCHTMPL6005M']);
+ $(".wok-guest-list, .wok-guest-gallery").toggleClass("wok-guest-list wok-guest-gallery");
+ $(".wok-list, .wok-gallery").toggleClass("wok-list wok-gallery");
+ var text = $('#guest-gallery-table-button span.text').text();
+ $('#guest-gallery-table-button span.text').text(text == i18n['KCHTMPL6005M'] ? i18n['KCHTMPL6004M'] : i18n['KCHTMPL6005M']);
+ var buttonText = $('#guest-gallery-table-button span.text').text();
+ if (buttonText.indexOf("Gallery") !== -1) {
+ // Currently in list view
+ kimchi.setGuestView("guestView", "list");
+ } else {
+ // Currently in gallery
+ kimchi.setGuestView("guestView", "gallery");
+ }
+};
+
+kimchi.setGuestView = function(name, value) {
+ window.localStorage.setItem(name, value);
+};
+
+kimchi.readGuestView = function(name) {
+ var viewName = window.localStorage.getItem(name);
+ if (viewName !== "") {
+ return viewName;
+ } else {
+ return null;
+ }
+};
+
+kimchi.showGuestGallery = function() {
+ $(".wok-guest-list").addClass("wok-guest-gallery");
+ $(".wok-list").addClass("wok-gallery");
+ $(".wok-guest-gallery").removeClass("wok-guest-list");
+ $(".wok-gallery").removeClass("wok-list");
+ $('#guest-gallery-table-button span.text').text(i18n['KCHTMPL6004M']);
+};
+
+kimchi.showGuestList = function() {
+ $(".wok-guest-list").removeClass("wok-guest-gallery");
+ $(".wok-list").removeClass("wok-gallery");
+ $(".wok-guest-gallery").addClass("wok-guest-list");
+ $(".wok-gallery").addClass("wok-list");
+ $('#guest-gallery-table-button span.text').text(i18n['KCHTMPL6005M']);
};
kimchi.guest_main = function() {
$('body').addClass('wok-list');
-
+ var viewFound = kimchi.readGuestView("guestView");
+ if (viewFound) {
+ if(viewFound === "gallery") {
+ // should be showing gallery
+ kimchi.showGuestGallery();
+ } else {
+ // Should be showing list
+ kimchi.showGuestList();
+ }
+ } else {
+ // Default to showing list
+ kimchi.showGuestList();
+ }
if (wok.tabMode['guests'] === 'admin') {
$('.tools').attr('style', 'display');
$("#vm-add").on("click", function(event) {
--
2.5.0
8 years, 5 months
[PATCH][Kimchi] Improve UI error codes checking
by Ramon Medeiros
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
check_ui_code_errors.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/check_ui_code_errors.sh b/check_ui_code_errors.sh
index 59d631f..58dd231 100755
--- a/check_ui_code_errors.sh
+++ b/check_ui_code_errors.sh
@@ -20,7 +20,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
errors="$(cat ui/pages/i18n.json.tmpl | grep -o 'KCH[0-9A-Z]*'| sort)"
-uiErrors="$(grep -Ro 'KCH[0-9A-Z]*' ui/js/ | cut -d: -f2 | sort| uniq)"
+uiErrors="$(grep -ERo 'KCH[0-9A-Z]+' ui/js/ | cut -d: -f2 | sort| uniq)"
# all errors on i18n are present in js/html files: success
if [ "$errors" == "$uiErrors" ]; then
--
2.5.5
8 years, 5 months