[PATCH V2] Issue #737: Fix to remove twice calls of resource lookup on GET OPERATION
by archus@linux.vnet.ibm.com
From: Archana Singh <archus(a)linux.vnet.ibm.com>
Incase of GET lookup was called twice.
Once lookup() before is_authorized() and then in self.get().
This added overhead to system when lookup() is called
for each value in list from get_list() of Collection.
So to avoid this overhead, lookup() should not be called
before self.get().
1) Added lookup() call from Resource's update(), delete().
2) Removed lookup() call from Resource's index().
2) As is_authorized() calls self.data which calls self.info.
Added check to make sure that self.data only get called
if self.info is not None. And intialized self.info as None
in __init__. As its value is getting assigned in lookup().
3) In _generate_action_handler_base(), lookup() was getting
called before is_authorized(), move its call after is_authorized().
Archana Singh (1):
Issue #737: Fix to remove twice calls of resource lookup on GET
OPERATION
src/wok/control/base.py | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
--
2.1.4
9 years, 1 month
[PATCH] Ginger Base: Fix DEBIAN/control.in
by Aline Manera
The package name for Ginger Base plugin is ginger-base, and @PACKAGE_NAME@
refers to the directory name, so explicity set the right package name.
Also remove extra colon and fix Description text that must be in done in
one line.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
src/wok/plugins/gingerbase/contrib/DEBIAN/control.in | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/wok/plugins/gingerbase/contrib/DEBIAN/control.in b/src/wok/plugins/gingerbase/contrib/DEBIAN/control.in
index aacf946..6bf6631 100644
--- a/src/wok/plugins/gingerbase/contrib/DEBIAN/control.in
+++ b/src/wok/plugins/gingerbase/contrib/DEBIAN/control.in
@@ -1,14 +1,12 @@
-Package: @PACKAGE_NAME@
+Package: ginger-base
Version: @PACKAGE_VERSION@
Section: base
Priority: optional
Architecture: all
Depends: wok,
python-psutil (>= 0.6.0),
- sosreport,
+ sosreport
Build-Depends: libxslt,
python-lxml
Maintainer: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
-Description: Ginger Base is an open source base host management plugin for Wok
-(Webserver Originated from Kimchi), that provides an intuitive web panel with
-common tools for configuring and managing the Linux systems.
+Description: Ginger Base is an open source base host management plugin for Wok (Webserver Originated from Kimchi), that provides an intuitive web panel with common tools for configuring and managing the Linux systems.
--
2.1.0
9 years, 1 month
[PATCH] Display guest memory utilization in UI
by Socorro Stoppler
Add support for displaying guest memory utilization.
This patch is created on top of Samuel's branch.
Socorro Stoppler (1):
Add support for displaying guest memory utilization
src/wok/plugins/kimchi/ui/css/theme-default/list.css | 10 +++++++---
src/wok/plugins/kimchi/ui/js/src/kimchi.guest_main.js | 3 +++
src/wok/plugins/kimchi/ui/pages/guest.html.tmpl | 3 +++
src/wok/plugins/kimchi/ui/pages/guests.html.tmpl | 1 +
4 files changed, 14 insertions(+), 3 deletions(-)
--
1.9.1
9 years, 1 month
[PATCH 0/2 v4] Fix Issues #743 and #744
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
Fix Issue #744 - gingerbase: objectstore issues
Ginger Base : Plugin path changes
Plug in path for gingerbase been changed to /var/lib/gingerbase
Fix issue #744 : 'unable to open database file' in root.py and gingerbase.py
Fix Issue #743 : gingerbase: fail to create RPM.
Changed the following files:
gingerbase.spec.fedora.in
gignerbase.spec.suse.in
make-deb.sh.in
Correct the rpm instructions
RPM name changed from gingerbase to ginger-base
Added files ChangeLog and CONTRIBUTE.md
VERSION changed to 2.0.0
chandrureddy (2):
Ginger Base : Plugin path changes
Fix Issue #743 : gingerbase: fail to create RPM.
src/wok/plugins/gingerbase/CONTRIBUTE.md | 19 +++++++++++++
src/wok/plugins/gingerbase/ChangeLog | 31 ++++++++++++++++++++++
src/wok/plugins/gingerbase/Makefile.am | 18 +++++++------
src/wok/plugins/gingerbase/VERSION | 2 +-
src/wok/plugins/gingerbase/config.py.in | 6 ++---
.../gingerbase/contrib/gingerbase.spec.fedora.in | 24 ++++++-----------
.../gingerbase/contrib/gingerbase.spec.suse.in | 28 +++++++++----------
src/wok/plugins/gingerbase/contrib/make-deb.sh.in | 2 +-
src/wok/plugins/gingerbase/gingerbase.conf | 2 +-
src/wok/plugins/gingerbase/gingerbase.py | 16 +++++------
10 files changed, 94 insertions(+), 54 deletions(-)
create mode 100644 src/wok/plugins/gingerbase/CONTRIBUTE.md
create mode 100644 src/wok/plugins/gingerbase/ChangeLog
--
2.1.0
9 years, 1 month
[PATCH]Ginger Base:Take off libvirt to get vms info used before any shutdown and reboot actions
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
Earlier been used libvirt to fetch the vms information in the back end code
UI was using REST API 'plugins/kimchi/vms' to get the vms info.
Ginger Base not have this functionality and will not work on plain linux.
Ginger Base should handle well on both plain linux with out KVM and with KVM
New code provides REST API 'plugins/gingerbase/vms'
1. to get the vms information on KVM mahcine (virsh way)
For ex:
[root@chandra wok]# curl -k -u root -H "Content-Type: application/json" -H "Accept: application/json" \
-X "GET" https://127.0.0.1:8001/plugins/gingerbase/vms
Enter host password for user 'root':
[
{
"state":"shut off",
"id":"-",
"name":"a8Sr0LzRgWjEqy3iiKjQvA"
},
{
"state":"shut off",
"id":"-",
"name":"Fedora21"
},
{
"state":"shut off",
"id":"-",
"name":"kimchi-cdrom"
},
{
"state":"shut off",
"id":"-",
"name":"kimchi-ifaces"
}
]
2. return empty json in case of plain linux machine
For ex:
[root@chandra wok]# curl -k -u root -H "Content-Type: application/json" -H "Accept: application/json" \
-X "GET" https://127.0.0.1:8001/plugins/gingerbase/vms
Enter host password for user 'root':
[
]
chandrureddy (1):
Take off libvirt to get vms info used before any shutdown and reboot
actions
src/wok/plugins/gingerbase/control/vmsinfo.py | 34 +++++++++++++
src/wok/plugins/gingerbase/i18n.py | 1 +
src/wok/plugins/gingerbase/model/host.py | 23 +++------
src/wok/plugins/gingerbase/model/vmsinfo.py | 32 ++++++++++++
.../plugins/gingerbase/ui/js/src/gingerbase.api.js | 12 +++++
.../gingerbase/ui/js/src/gingerbase.host.js | 23 ++++-----
src/wok/plugins/gingerbase/ui/pages/i18n.json.tmpl | 2 +
src/wok/plugins/gingerbase/utils.py | 59 +++++++++++++++++++++-
8 files changed, 157 insertions(+), 29 deletions(-)
create mode 100644 src/wok/plugins/gingerbase/control/vmsinfo.py
create mode 100644 src/wok/plugins/gingerbase/model/vmsinfo.py
--
2.1.0
9 years, 1 month
[PATCH] Ginger Base : Fix Minor Issues with the test cases.
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
1. Fix import statement in test_autorization.py
2. Fix object store location in test_yumparser.py
---
src/wok/plugins/gingerbase/tests/test_authorization.py | 2 +-
src/wok/plugins/gingerbase/tests/test_yumparser.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wok/plugins/gingerbase/tests/test_authorization.py b/src/wok/plugins/gingerbase/tests/test_authorization.py
index 7460679..d0fc57c 100644
--- a/src/wok/plugins/gingerbase/tests/test_authorization.py
+++ b/src/wok/plugins/gingerbase/tests/test_authorization.py
@@ -23,7 +23,7 @@ import os
import unittest
from functools import partial
-from wok.plugins.kimchi import mockmodel
+from wok.plugins.gingerbase import mockmodel
from utils import get_free_port, patch_auth, request, run_server
diff --git a/src/wok/plugins/gingerbase/tests/test_yumparser.py b/src/wok/plugins/gingerbase/tests/test_yumparser.py
index caf7c27..1695208 100644
--- a/src/wok/plugins/gingerbase/tests/test_yumparser.py
+++ b/src/wok/plugins/gingerbase/tests/test_yumparser.py
@@ -37,7 +37,7 @@ TEMP_REPO_FILE = ''
def _is_yum_distro():
- inst = model.Model()
+ inst = model.Model("/tmp/objectstore")
repo_type = inst.capabilities_lookup()['repo_mngt_tool']
return repo_type == 'yum'
--
2.1.0
9 years, 1 month
[PATCH 0/2 v3] Fix Issues #743 and #744
by chandra@linux.vnet.ibm.com
From: chandrureddy <chandra(a)linux.vnet.ibm.com>
Fix Issue #744 - gingerbase: objectstore issues
plug in path for gingerbase been changed to /var/lib/gingerbase
Fix issue 'unable to open database file' and gingerbase.py
Fix Issue #743 - gingerbase: fail to create RPM.
In files gingerbase.spec.fedora.in and gignerbase.spec.suse.in and make-deb.sh.in
add setup instruction
correct the file section
day correction
Name changed from gingerbase to ginger-base
Added files ChangeLog and CONTRIBUTE.md
VERSION changed to 2.0.0
Review Comments taken care.
chandrureddy (2):
Plug in path for gingerbase been changed to /var/lib/gingerbase
Fix issue 'unable to open database file' in root.py and
gingerbase.py
In files gingerbase.spec.fedora.in and gignerbase.spec.suse.in and
make-deb.sh.in add setup instruction correct the file
section day correction Name changed from gingerbase to
ginger-base
src/wok/plugins/gingerbase/CONTRIBUTE.md | 19 +++++++++++++
src/wok/plugins/gingerbase/ChangeLog | 31 ++++++++++++++++++++++
src/wok/plugins/gingerbase/Makefile.am | 18 +++++++------
src/wok/plugins/gingerbase/VERSION | 2 +-
src/wok/plugins/gingerbase/config.py.in | 6 ++---
.../gingerbase/contrib/gingerbase.spec.fedora.in | 24 ++++++-----------
.../gingerbase/contrib/gingerbase.spec.suse.in | 28 +++++++++----------
src/wok/plugins/gingerbase/contrib/make-deb.sh.in | 2 +-
src/wok/plugins/gingerbase/gingerbase.conf | 2 +-
src/wok/plugins/gingerbase/gingerbase.py | 16 +++++------
10 files changed, 94 insertions(+), 54 deletions(-)
create mode 100644 src/wok/plugins/gingerbase/CONTRIBUTE.md
create mode 100644 src/wok/plugins/gingerbase/ChangeLog
--
2.1.0
9 years, 1 month
[PATCH 0/2] *** Sosreport accepts underscore and support for s390x platform ***
by archus@linux.vnet.ibm.com
From: Megha Smriti <mesmriti(a)linux.vnet.ibm.com>
#748: Sosreport accepts underscore in name
#749: Added debug report for plaform s390x
along with sosreport
Megha Smriti (2):
Modified code to parse the output of sosreport command using
regular expression which gives the name and location of
sosreport present in command output, instead of searching the
sosreport file with regular pattern "sosreport-<name>*" in /tmp
and /var/tmp
Modified code to check platform and if its s390x then collect
dbginfo tar along with sosreport and create new tar having both
the above tar and move to /var/lib/kimchi/debugreports. Also
added i18n error messages required for dbginfo.
src/wok/plugins/gingerbase/i18n.py | 9 +-
src/wok/plugins/gingerbase/model/debugreports.py | 135 +++++++++++++++++------
2 files changed, 106 insertions(+), 38 deletions(-)
--
2.4.0
9 years, 1 month