[Kimchi-devel] [PATCH] [Kimchi 4/4] Update UI to reflect modifications in template API
pvital at linux.vnet.ibm.com
pvital at linux.vnet.ibm.com
Tue Apr 26 18:30:44 UTC 2016
From: Paulo Vital <pvital at linux.vnet.ibm.com>
Modified ui/js/src/kimchi.template_add_main.js to reflect the template API
changes in source_media field.
This is part of solution to Issue #372.
Signed-off-by: Paulo Vital <pvital at linux.vnet.ibm.com>
---
tests/test_mockmodel.py | 2 +-
tests/test_model.py | 1 -
ui/js/src/kimchi.template_add_main.js | 4 ++--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/test_mockmodel.py b/tests/test_mockmodel.py
index d5fffb4..45358fe 100644
--- a/tests/test_mockmodel.py
+++ b/tests/test_mockmodel.py
@@ -118,7 +118,7 @@ class MockModelTests(unittest.TestCase):
def test_memory_window_changes(self):
model.templates_create({'name': u'test',
- 'source_media': {'type': 'disk',
+ 'source_media': {'type': 'disk',
'path': fake_iso}})
task = model.vms_create({'name': u'test-vm',
'template': '/plugins/kimchi/templates/test'})
diff --git a/tests/test_model.py b/tests/test_model.py
index bf5ed28..4af3b2c 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -443,7 +443,6 @@ class ModelTests(unittest.TestCase):
self.assertEquals('running', info['state'])
inst.vm_poweroff(u'kimchi-netboot-vm')
- vm = inst.vm_lookup(u'kimchi-netboot-vm')
vms = inst.vms_get_list()
self.assertFalse('kimchi-netboot-vm' in vms)
diff --git a/ui/js/src/kimchi.template_add_main.js b/ui/js/src/kimchi.template_add_main.js
index c3dd014..88d26e2 100644
--- a/ui/js/src/kimchi.template_add_main.js
+++ b/ui/js/src/kimchi.template_add_main.js
@@ -260,7 +260,7 @@ kimchi.template_add_main = function() {
return;
}
var data = {
- "source_media": isoFile
+ "source_media": {"type": "disk", "path": isoFile}
};
addTemplate(data);
});
@@ -356,7 +356,7 @@ kimchi.template_add_main = function() {
var data = {
"os_distro": isoInfo.os_distro,
"os_version": isoInfo.os_version,
- "source_media": isoInfo.path
+ "source_media": {"type": "disk", "path": isoInfo.path}
};
kimchi.createTemplate(data, function() {
successNum++;
--
2.5.5
More information about the Kimchi-devel
mailing list