[RFC] Removal of of developer UI
by Shu Ming
Background
Developer UI is a legacy way for Kimchi to render html page to the front
end. And the font end can display the html page directly without
creating the page dynamically. After the design UI code went into
Kimchi, developer UI is attracting less and less attention and have been
broken for a while. Further, design UI is good enough and can replace
the developer UI without any encumbrance. Maintaining two sets of UI
brings a lot of extra works and is unnecessary. So it is reasonable to
remove the design UI code from Kimchi repository.
Work to be done:
* Remove the code to support rendering html text in controller
* Remove the code to generate html page from the cheetah template
10 years, 11 months
[project-kimchi][PATCHv4 0/5] Storage server query support
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
v3>v4, fix inconsistency between doc and json schema
v1>v3, fix racing problem, fix style.
Add parameters to GET request so that we will query storage server as:
/storageservers?type=netfs
Royce Lv (5):
Support params for GET method
Add testcase for GET param
Storage server: Update API.md
storage server: update controller.py
storage server: Update model and mockmodel
docs/API.md | 13 +++++++++++++
src/kimchi/API.json | 11 +++++++++++
src/kimchi/controller.py | 26 ++++++++++++++++++++++++--
src/kimchi/mockmodel.py | 13 +++++++++++++
src/kimchi/model.py | 14 +++++++++++++-
src/kimchi/root.py | 1 +
tests/test_rest.py | 37 +++++++++++++++++++++++++++++++++++++
7 files changed, 112 insertions(+), 3 deletions(-)
--
1.8.1.2
10 years, 11 months
[Patch v2 1/4] Move configuration parsing to config.py
by Mark Wu
The configruation is also needed for other code except starting kimchi
server. So it should be moved to a separate module, config.py. Then the
configuration can be accessed directly by importing config module.
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
src/kimchi/config.py.in | 23 ++++++++++++++++++++---
src/kimchid.in | 20 +-------------------
2 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in
index f3c408a..49d42db 100644
--- a/src/kimchi/config.py.in
+++ b/src/kimchi/config.py.in
@@ -25,11 +25,9 @@
import libvirt
import os
import platform
-
-
+from ConfigParser import SafeConfigParser
from glob import iglob
-
from kimchi.xmlutils import xpath_get_text
@@ -166,5 +164,24 @@ def get_plugin_tab_xml(name):
return os.path.join(_get_plugin_ui_dir(name), 'config/tab-ext.xml')
+CONFIG_FILE = "%s/kimchi.conf" % get_config_dir()
+DEFAULT_LOG_LEVEL = "debug"
+
+config = SafeConfigParser()
+config.add_section("server")
+config.set("server", "host", "0.0.0.0")
+config.set("server", "port", "8000")
+config.set("server", "ssl_port", "8001")
+config.set("server", "ssl_cert", "")
+config.set("server", "ssl_key", "")
+config.set("server", "environment", "development")
+config.add_section("logging")
+config.set("logging", "log_dir", get_default_log_dir())
+config.set("logging", "log_level", DEFAULT_LOG_LEVEL)
+
+if os.path.exists(CONFIG_FILE):
+ config.read(CONFIG_FILE)
+
+
if __name__ == '__main__':
print get_prefix()
diff --git a/src/kimchid.in b/src/kimchid.in
index 7865713..548fa52 100644
--- a/src/kimchid.in
+++ b/src/kimchid.in
@@ -33,31 +33,13 @@ import kimchi.config
if kimchi.config.without_installation():
sys.path.append(kimchi.config.get_prefix())
-from ConfigParser import SafeConfigParser
+from kimchi.config import config
from optparse import OptionParser
ACCESS_LOG = "kimchi-access.log"
ERROR_LOG = "kimchi-error.log"
-CONFIG_FILE = "%s/kimchi.conf" % kimchi.config.get_config_dir()
-DEFAULT_LOG_DIR = kimchi.config.get_default_log_dir()
-DEFAULT_LOG_LEVEL = "debug"
def main(options):
- config = SafeConfigParser()
- config.add_section("server")
- config.set("server", "host", "0.0.0.0")
- config.set("server", "port", "8000")
- config.set("server", "ssl_port", "8001")
- config.set("server", "ssl_cert", "")
- config.set("server", "ssl_key", "")
- config.set("server", "environment", "development")
- config.add_section("logging")
- config.set("logging", "log_dir", DEFAULT_LOG_DIR)
- config.set("logging", "log_level", DEFAULT_LOG_LEVEL)
-
- if os.path.exists(CONFIG_FILE):
- config.read(CONFIG_FILE)
-
host = config.get("server", "host")
port = config.get("server", "port")
ssl_port = config.get("server", "ssl_port")
--
1.8.3.1
10 years, 11 months
[PATCH 0/6 V2] Refactore isoinfo.py
by Aline Manera
From: Aline Manera <alinefm(a)br.ibm.com>
V1 -> V2:
- Apply comments made by Ramon and Royce
Aline Manera (6):
isoinfo: Add default value for ignore_list paramter
isoinfo: Use absolute path only for local ISO files
Move IsoFormatError() from isoinfo.py to exception.py
Move ISO path validation to IsoImage()
isoinfo: Move _probe_iso() to IsoImage()
pep8 cleanup for isoinfo.py
Makefile.am | 1 +
src/kimchi/exception.py | 4 ++
src/kimchi/isoinfo.py | 135 +++++++++++++++++++++++-----------------------
src/kimchi/model.py | 11 ++--
src/kimchi/scan.py | 5 +-
src/kimchi/vmtemplate.py | 8 +--
6 files changed, 85 insertions(+), 79 deletions(-)
--
1.7.10.4
10 years, 11 months
[PATCH V6 0/7] template supports networks
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V5 -> V6
address ming's commnet.
raise InvalidParameter instead of NotFoundError when netowrk specified by template does not exist
V4 -> V5:
rebase to the latest commit.
for "move RollbackContext..." merged.
V3 -> V4:
after template supports networks, we should change the test case accordingly
aline refactor controller, rebase to the latest commit.
V2 -> V3:
fix typo.
support creating a vm without network.
V1 -> V2:
update mockmodel and test case
add 'networks' option for template get/create/update
ShaoHe Feng (7):
template supports networks: let template xml support more networks
template supports networks: fix test case
template supports networks: update API
template supports networks: update controller and json schema
template supports networks: update model
template supports networks: update mockmodel
template supports networks: update test case
docs/API.md | 4 ++
src/kimchi/API.json | 12 ++++++
src/kimchi/control/templates.py | 3 +-
src/kimchi/mockmodel.py | 16 +++++++-
src/kimchi/model.py | 33 ++++++++++++-----
src/kimchi/osinfo.py | 5 ++-
src/kimchi/vmtemplate.py | 20 ++++++++--
tests/test_model.py | 82 ++++++++++++++++++++++++++++++++---------
tests/test_osinfo.py | 2 +-
tests/test_rest.py | 58 +++++++++++++++++++++++++++++
tests/test_vmtemplate.py | 6 +--
11 files changed, 201 insertions(+), 40 deletions(-)
--
1.8.4.2
10 years, 11 months
[PATCH] Issue #293: Resizing Issue When There Are Multiple Grids
by Hongliang Wang
Resizing function corrupts when there are more than one kimchi.widget.Grid
instances in a page.
Signed-off-by: Hongliang Wang <hlwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.grid.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/js/src/kimchi.grid.js b/ui/js/src/kimchi.grid.js
index 6e5f1fe..022c4f5 100644
--- a/ui/js/src/kimchi.grid.js
+++ b/ui/js/src/kimchi.grid.js
@@ -308,6 +308,7 @@ kimchi.widget.Grid = function(params) {
left - leftmostOffset
);
fixTableLayout();
+ columnBeingResized = null;
};
var resizeColumnWidth = function(index, width) {
--
1.8.1.4
10 years, 11 months
[PATCHv2 0/3] Storage targets support
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
v1>v2, when showmount got no result, instead of fail the request,
return empty list to user.
NOTE: this patchset depends on storage server support patchset.
Tested in Fedora 19, due to libvirt bug, ubuntu 13.10 cannot be tested, fixing.
Usage:
GET /storageservers/<ip or hostname>/storagetargets?target_type=netfs
Royce Lv (3):
storage target: Update API.md
storage target: Update controller and json schema
storage target: Add model support
docs/API.md | 9 +++++++++
src/kimchi/API.json | 11 +++++++++++
src/kimchi/controller.py | 30 ++++++++++++++++++++++++++++--
src/kimchi/model.py | 40 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 88 insertions(+), 2 deletions(-)
--
1.8.1.2
10 years, 11 months
[PATCH v4 0/5] Support Creating iSCSI storage pool
by Zhou Zheng Sheng
This patch series is about creating iSCSI storage pool.
After this patch, you can create an ISCSI storage pool as the following.
curl -u root -H 'Content-type: application/json' \
-H 'Accept: application/json' \
-d '{"source": {
"target": "iqn.2013-01.example.com.targetname",
"host": "192.168.X.X",
"port": 326X,
"auth": {"username": "testUser", "password": "123456"}},
"type": "iscsi",
"name": "testIscsiPool"}' \
http://127.0.0.1:8000/storagepools
Note the "port" and "auth" is optional.
Thanks the reviewers. I took most of reviewer advices and submit this
v4 patch series.
Tested the patch over LIO iSCSI target and libvirt-1.1.4-1.fc19.
http://linux-iscsi.org/wiki/ISCSI
v3 -> v4
storagepool: refactor _get_pool_xml()
Change StoragePoolDef.get_xml() into a cached property
StoragePoolDef.xml.
storagepool: rename and consolidate arguments of creating (front end)
No change.
storagepool: rename and consolidate arguments of creating (back end)
Update src/kimchi/API.json
storagepool: Support Creating iSCSI storagepool in model.py
Fix typo.
Give the iscsiadm wrapper class a friendly name TargetClient.
Update API.json.
Update RPM spec files and Debian control file.
iscsi.validate_iscsi_target() is now TargetClient.validate().
test_model: test creating iSCSI storage pool
Since the parent patch changed interface, the tests also change to
use StoragePoolDef.xml and TargetClient.validate(), no other change.
Zhou Zheng Sheng (5):
storagepool: refactor _get_pool_xml()
storagepool: rename and consolidate arguments of creating (back end)
storagepool: rename and consolidate arguments of creating (front end)
storagepool: Support Creating iSCSI storagepool in model.py
test_model: test creating iSCSI storage pool
Makefile.am | 2 +
contrib/DEBIAN/control.in | 3 +-
contrib/kimchi.spec.fedora.in | 1 +
contrib/kimchi.spec.suse.in | 1 +
docs/API.md | 28 ++--
src/kimchi/API.json | 69 ++++++++++
src/kimchi/Makefile.am | 1 +
src/kimchi/iscsi.py | 89 ++++++++++++
src/kimchi/model.py | 227 +++++++++++++++++++++++++------
tests/Makefile.am | 1 +
tests/test_model.py | 89 ++++++------
tests/test_storagepool.py | 156 +++++++++++++++++++++
ui/js/src/kimchi.storagepool_add_main.js | 13 +-
13 files changed, 590 insertions(+), 90 deletions(-)
create mode 100644 src/kimchi/iscsi.py
create mode 100644 tests/test_storagepool.py
--
1.7.11.7
10 years, 11 months
[PATCH V5 0/7] template supports networks
by shaohef@linux.vnet.ibm.com
From: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
V4 -> V5:
rebase to the latest commit.
for "move RollbackContext..." merged.
V3 -> V4:
after template supports networks, we should change the test case accordingly
aline refactor controller, rebase to the latest commit.
V2 -> V3:
fix typo.
support creating a vm without network.
V1 -> V2:
update mockmodel and test case
add 'networks' option for template get/create/update
ShaoHe Feng (7):
template supports networks: let template xml support more networks
template supports networks: fix test case
template supports networks: update API
template supports networks: update controller and json schema
template supports networks: update model
template supports networks: update mockmodel
template supports networks: update test case
docs/API.md | 4 ++
src/kimchi/API.json | 12 ++++++
src/kimchi/control/templates.py | 3 +-
src/kimchi/mockmodel.py | 7 +++-
src/kimchi/model.py | 25 ++++++++-----
src/kimchi/osinfo.py | 5 ++-
src/kimchi/vmtemplate.py | 20 ++++++++--
tests/test_model.py | 82 ++++++++++++++++++++++++++++++++---------
tests/test_osinfo.py | 2 +-
tests/test_rest.py | 56 ++++++++++++++++++++++++++++
tests/test_vmtemplate.py | 6 +--
11 files changed, 182 insertions(+), 40 deletions(-)
--
1.8.4.2
10 years, 11 months