[PATCH] Bug 482 Fix: Interfaces stacked in template edit
by huoyuxin@linux.vnet.ibm.com
From: Yu Xin Huo <huoyuxin(a)linux.vnet.ibm.com>
Signed-off-by: Yu Xin Huo <huoyuxin(a)linux.vnet.ibm.com>
---
ui/pages/template-edit.html.tmpl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ui/pages/template-edit.html.tmpl b/ui/pages/template-edit.html.tmpl
index 7177bf0..499d45d 100644
--- a/ui/pages/template-edit.html.tmpl
+++ b/ui/pages/template-edit.html.tmpl
@@ -151,7 +151,7 @@
</div>
</script>
<script id="template-interface-tmpl" type="text/html">
- <div class="item" id={networkID}>
+ <div id={networkID}>
<span class="template-interface-cell">
<select></select>
</span>
--
1.7.1
10 years
[PATCH] Bug 485 Fix: Label alignement in guest edit
by huoyuxin@linux.vnet.ibm.com
From: Yu Xin Huo <huoyuxin(a)linux.vnet.ibm.com>
Signed-off-by: Yu Xin Huo <huoyuxin(a)linux.vnet.ibm.com>
---
ui/css/theme-default/guest-edit.css | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/ui/css/theme-default/guest-edit.css b/ui/css/theme-default/guest-edit.css
index 6815ecf..9eadc6a 100644
--- a/ui/css/theme-default/guest-edit.css
+++ b/ui/css/theme-default/guest-edit.css
@@ -34,6 +34,7 @@
#form-guest-edit-general .edit-general-inline {
display: inline-block;
+ vertical-align: top;
}
#form-guest-edit-storage input[readonly] {
@@ -47,10 +48,8 @@
}
.guest-edit-wrapper-label {
- height: 38px;
- line-height: 38px;
- margin-top: 5px;
- vertical-align: top;
+ line-height: 42px;
+ margin-bottom: 1px;
min-width: 100px;
}
@@ -60,6 +59,7 @@
.guest-edit-wrapper-controls {
width: 470px;
+ margin-bottom: 1px;
}
#form-guest-edit-storage .guest-edit-wrapper-controls {
@@ -73,9 +73,8 @@
-webkit-border-radius: 5px;
border-radius: 5px;
box-shadow: 2px 2px 2px #eee inset;
- border-top: 1px solid #bbb;
- border-left: 1px solid #bbb;
- padding-left: 10px;
+ border: 1px solid #bbb;
+ padding: 1px 1px 1px 10px;
width: 450px;
}
--
1.7.1
10 years
[PATCH] Bug 487 Fix: Dropdown & Filter not aligned(mobile)
by huoyuxin@linux.vnet.ibm.com
From: Yu Xin Huo <huoyuxin(a)linux.vnet.ibm.com>
Signed-off-by: Yu Xin Huo <huoyuxin(a)linux.vnet.ibm.com>
---
ui/css/theme-default/guest-edit.css | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ui/css/theme-default/guest-edit.css b/ui/css/theme-default/guest-edit.css
index cd8ac89..6815ecf 100644
--- a/ui/css/theme-default/guest-edit.css
+++ b/ui/css/theme-default/guest-edit.css
@@ -360,6 +360,7 @@
border-radius: 7px 0px 0px 7px;
padding: 2px 2px 2px 7px;
width: 100px;
+ height: 24px;
}
.guest-edit-pci .filter select option {
@@ -370,6 +371,7 @@
border-radius: 0px 7px 7px 0px;
padding: 3px 3px 3px 10px;
width: 200px;
+ height: 16px;
font-style: italic;
}
--
1.7.1
10 years
[PATCH] Bug fix #529: Kill all Kimchi process when stopping kimchid service
by Aline Manera
When using "tree.mount(); engine.start(); engine.block()" to start cherrypy
server, we need to manually subscribe to the signal handlers plugin.
For reference: https://cherrypy.readthedocs.org/en/3.2.6/refman/process/plugins/signalha...
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
src/kimchi/server.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/kimchi/server.py b/src/kimchi/server.py
index ec78b6c..eb58465 100644
--- a/src/kimchi/server.py
+++ b/src/kimchi/server.py
@@ -172,6 +172,10 @@ class Server(object):
cherrypy.tree.mount(plugin_app, script_name, plugin_config)
def start(self):
+ # Subscribe to SignalHandler plugin
+ if hasattr(cherrypy.engine, 'signal_handler'):
+ cherrypy.engine.signal_handler.subscribe()
+
cherrypy.engine.start()
cherrypy.engine.block()
--
1.9.3
10 years
[PATCHv2] issue#474: Add default value for ldap_admin_id
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Add default value for ldap_admin_id so that kimchi will not raise
error for ldap log in.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/kimchi/config.py.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in
index 88de1aa..83a5dd0 100644
--- a/src/kimchi/config.py.in
+++ b/src/kimchi/config.py.in
@@ -290,6 +290,7 @@ def _get_config():
config.set("authentication", "ldap_server", "")
config.set("authentication", "ldap_search_base", "")
config.set("authentication", "ldap_search_filter", "")
+ config.set("authentication", "ldap_admin_id", "")
config.add_section("logging")
config.set("logging", "log_dir", paths.log_dir)
config.set("logging", "log_level", DEFAULT_LOG_LEVEL)
--
1.8.3.2
10 years
[PATCH] issue#474: Add check for ldap configuration
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Check ldap server and filter when start up.
Ignore admin id if it does not specified in config.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
src/kimchi/auth.py | 14 +++++++++-----
src/kimchid.in | 9 +++++++++
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/kimchi/auth.py b/src/kimchi/auth.py
index 22c5c81..23bc5ec 100644
--- a/src/kimchi/auth.py
+++ b/src/kimchi/auth.py
@@ -19,6 +19,7 @@
import base64
import cherrypy
+from ConfigParser import NoOptionError
import fcntl
import ldap
import multiprocessing
@@ -222,11 +223,14 @@ class LDAPUser(User):
return self.user[USER_GROUPS]
def get_roles(self):
- admin_ids = config.get(
- "authentication", "ldap_admin_id").strip('"').split(',')
- for admin_id in admin_ids:
- if self.user[USER_NAME] == admin_id.strip():
- self.user[USER_ROLES] = dict.fromkeys(tabs, 'admin')
+ try:
+ admin_ids = config.get(
+ "authentication", "ldap_admin_id").strip('"').split(',')
+ for admin_id in admin_ids:
+ if self.user[USER_NAME] == admin_id.strip():
+ self.user[USER_ROLES] = dict.fromkeys(tabs, 'admin')
+ except NoOptionError:
+ pass
return self.user[USER_ROLES]
def get_user(self):
diff --git a/src/kimchid.in b/src/kimchid.in
index 0746ba6..0121f97 100644
--- a/src/kimchid.in
+++ b/src/kimchid.in
@@ -49,6 +49,15 @@ def main(options):
federation = config.config.get("server", "federation")
logDir = config.config.get("logging", "log_dir")
logLevel = config.config.get("logging", "log_level")
+ auth = config.config.get("authentication", "method")
+ ldap_server = config.config.get("authentication", "ldap_server")
+ search_base = config.config.get("authentication", "ldap_search_base")
+ search_filter = config.config.get("authentication", "ldap_search_filter",
+ vars={"username": "fake"})
+
+ if auth == "ldap" and \
+ (not all([auth, ldap_server, search_base, search_filter])):
+ sys.exit("LDAP server is not setup properly.Exiting ...")
parser = OptionParser()
parser.add_option('--host', type="string", default=host,
--
1.8.3.2
10 years
[PATCH] Remove empty directories after rpm -e kimchi on fedora
by Ramon Medeiros
Some directories were not removed on rpm -e due no declaration on %files
section. Also, the directory was being created in runtime. Now, it is
being created on rpm build.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
contrib/kimchi.spec.fedora.in | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
index c1929f8..99dc153 100644
--- a/contrib/kimchi.spec.fedora.in
+++ b/contrib/kimchi.spec.fedora.in
@@ -83,6 +83,11 @@ rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
%if 0%{?with_systemd}
+
+# create directory
+mkdir -p %{buildroot}/var/lib/kimchi/{isos,vnc-tokens}
+
+
# Install the systemd scripts
install -Dm 0644 contrib/kimchid.service.fedora %{buildroot}%{_unitdir}/kimchid.service
install -Dm 0640 src/firewalld.xml %{buildroot}%{_prefix}/lib/firewalld/services/kimchid.xml
@@ -148,7 +153,6 @@ exit 0
# Rollback SELinux rules
semanage permissive -d httpd_t
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -162,6 +166,7 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/kimchi/xmlutils/*.py*
%{python_sitelib}/kimchi/API.json
%{python_sitelib}/kimchi/plugins/*.py*
+%{python_sitelib}/kimchi/
%{_datadir}/kimchi/doc/API.md
%{_datadir}/kimchi/doc/README.md
%{_datadir}/kimchi/doc/README-federation.md
@@ -170,6 +175,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/share/locale/*/LC_MESSAGES/kimchi.mo
%{_datadir}/kimchi/config/ui/*.xml
%{_datadir}/kimchi/ui/
+%{_datadir}/kimchi
%{_sysconfdir}/kimchi/kimchi.conf
%{_sysconfdir}/kimchi/nginx.conf.in
%{_sysconfdir}/kimchi/distros.d/debian.json
@@ -177,6 +183,8 @@ rm -rf $RPM_BUILD_ROOT
%{_sysconfdir}/kimchi/distros.d/opensuse.json
%{_sysconfdir}/kimchi/distros.d/ubuntu.json
%{_sysconfdir}/kimchi/distros.d/gentoo.json
+%{_sysconfdir}/kimchi/
+%{_sharedstatedir}/kimchi/*
%if 0%{?with_systemd}
%{_unitdir}/kimchid.service
--
1.8.3.1
10 years
[PATCH v2] List as many pools' info as possible
by Christy Perez
If a pool happens to be busy at the time the pool.refresh() is
called, then libvirt will throw an error: "internal error:
pool 'default' has asynchronous jobs running." Currently, kimchi
rasise an exception and no pools' storage volumes are listed.
This patch returns a 0 for that particular pool, and allows
the user to continue to request information for other pools.
Without this patch, nothing is shown at all on the Storage tab
if one pool is busy.
In the future, we can check for VIR_ERR_RESOURCE_BUSY and
come up with a plan that works with the UI to display "Busy"
for a pool. But for now, this works around the issue.
v1 -> v2:
- Log exception message and error code
Signed-off-by: Christy Perez <christy(a)linux.vnet.ibm.com>
---
src/kimchi/model/storagepools.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/kimchi/model/storagepools.py b/src/kimchi/model/storagepools.py
index 20c9e5a..e03c6bb 100644
--- a/src/kimchi/model/storagepools.py
+++ b/src/kimchi/model/storagepools.py
@@ -202,6 +202,15 @@ def _get_storagepool_vols_num(self, pool):
else:
return 0
except libvirt.libvirtError as e:
+ # If something (say a busy pool) prevents the refresh,
+ # throwing an Exception here would prevent all pools from
+ # displaying information -- so return None for busy
+ kimchi_log.error("ERROR: Storage Pool get vol count: %s "
+ % e.get_error_message())
+ kimchi_log.error("ERROR: Storage Pool get vol count error no: %s "
+ % e.get_error_code())
+ return 0
+ except Exception as e:
raise OperationFailed("KCHPOOL0008E",
{'name': pool.name(),
'err': e.get_error_message()})
--
1.9.3
10 years
[PATCH] Bugfix#549 VM button icons unaligned
by wenwang@linux.vnet.ibm.com
From: Wen Wang <wenwang(a)linux.vnet.ibm.com>
Fix the issue that chrome and IE won't align the VM action buttons
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
ui/css/theme-default/list.css | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ui/css/theme-default/list.css b/ui/css/theme-default/list.css
index 52cccc4..7b32ea6 100644
--- a/ui/css/theme-default/list.css
+++ b/ui/css/theme-default/list.css
@@ -234,9 +234,11 @@
height: 42px;
}
-.guest-actions .top button span {
- margin-left: -3px;
- margin-top: -1px;
+@-moz-document url-prefix() {
+ .guest-actions .top button span {
+ margin-left: -3px;
+ margin-top: -1px;
+ }
}
.guest-actions .bottom {
--
1.9.3
10 years
[PATCH v3] Add details on how to install test dependencies
by Crístian Viana
The difference between this and the previous patchset (v2) is:
- Remove "python-requests" from the RPM/DEB configuration files.
Crístian Viana (1):
issue #504: Add details on how to install test dependencies
contrib/DEBIAN/control.in | 3 +--
contrib/kimchi.spec.fedora.in | 1 -
contrib/kimchi.spec.suse.in | 1 -
docs/README.md | 29 +++++++++++++++++++++++------
4 files changed, 24 insertions(+), 10 deletions(-)
--
1.9.3
10 years