[PATCH v2] guest-storage-add: removing "Storage Name" field
by Daniel Henrique Barboza
This specific field adds very little to the user experience in
comparison with the effort required to mantain it. This patch
removes it from the UI, making the "Add a Storage Device to VM"
window simpler.
Backend support of specifying dev name is left as is because
it can be helpful in testing/debugging.
Signed-off-by: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
---
po/de_DE.po | 3 ---
po/en_US.po | 3 ---
po/es_ES.po | 3 ---
po/fr_FR.po | 3 ---
po/it_IT.po | 3 ---
po/ja_JP.po | 3 ---
po/kimchi.pot | 3 ---
po/ko_KR.po | 3 ---
po/pt_BR.po | 3 ---
po/ru_RU.po | 3 ---
po/zh_CN.po | 3 ---
po/zh_TW.po | 3 ---
ui/js/src/kimchi.guest_storage_add.main.js | 7 +++----
ui/pages/guest-storage-add.html.tmpl | 17 ++++-------------
14 files changed, 7 insertions(+), 53 deletions(-)
diff --git a/po/de_DE.po b/po/de_DE.po
index 06d8c38..da6fe9d 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -1183,9 +1183,6 @@ msgstr "Löschen"
msgid "Add a Storage Device to VM"
msgstr "Speichereinheit zur virtuellen Maschine hinzufügen"
-msgid "Device Name"
-msgstr "Einheitenname"
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/en_US.po b/po/en_US.po
index 11fcec9..459af07 100644
--- a/po/en_US.po
+++ b/po/en_US.po
@@ -1057,9 +1057,6 @@ msgstr ""
msgid "Add a Storage Device to VM"
msgstr ""
-msgid "Device Name"
-msgstr ""
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/es_ES.po b/po/es_ES.po
index 4aec448..96027dc 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -1201,9 +1201,6 @@ msgstr "Suprimir"
msgid "Add a Storage Device to VM"
msgstr "Añadir un dispositivo de almacenamiento a VM"
-msgid "Device Name"
-msgstr "Nombre de dispositivo"
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 6b2bd2d..35de2b5 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -1189,9 +1189,6 @@ msgstr "Supprimer"
msgid "Add a Storage Device to VM"
msgstr "Ajouter un Périphérique de Stockage à la VM"
-msgid "Device Name"
-msgstr "Nom de Périphérique"
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/it_IT.po b/po/it_IT.po
index 3293fa2..672ba1b 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -1170,9 +1170,6 @@ msgstr "Elimina"
msgid "Add a Storage Device to VM"
msgstr "Aggiungi un dispositivo di memoria alla VM"
-msgid "Device Name"
-msgstr "Nome dispositivo"
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/ja_JP.po b/po/ja_JP.po
index a2740bf..2915b2a 100644
--- a/po/ja_JP.po
+++ b/po/ja_JP.po
@@ -1182,9 +1182,6 @@ msgstr "削除"
msgid "Add a Storage Device to VM"
msgstr "VM にストレージ・デバイスを追加"
-msgid "Device Name"
-msgstr "デバイス名"
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/kimchi.pot b/po/kimchi.pot
index cd0a1ac..5421615 100755
--- a/po/kimchi.pot
+++ b/po/kimchi.pot
@@ -1057,9 +1057,6 @@ msgstr ""
msgid "Add a Storage Device to VM"
msgstr ""
-msgid "Device Name"
-msgstr ""
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/ko_KR.po b/po/ko_KR.po
index 20e8a0f..b9f8268 100644
--- a/po/ko_KR.po
+++ b/po/ko_KR.po
@@ -1113,9 +1113,6 @@ msgstr "삭제"
msgid "Add a Storage Device to VM"
msgstr "스토리지 장치를 VM에 추가"
-msgid "Device Name"
-msgstr "장치 이름"
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 7d18a2d..4661585 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -1189,9 +1189,6 @@ msgstr "Remover"
msgid "Add a Storage Device to VM"
msgstr "Adicionar um dispositivo de storage à VM"
-msgid "Device Name"
-msgstr "Nome do dispositivo"
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 069e083..d10ed6c 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -1113,9 +1113,6 @@ msgstr "Удалить"
msgid "Add a Storage Device to VM"
msgstr "Добавить устройство хранения в VM"
-msgid "Device Name"
-msgstr "Имя устройства"
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/zh_CN.po b/po/zh_CN.po
index e6f9ac7..636dd46 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -1076,9 +1076,6 @@ msgstr "删除"
msgid "Add a Storage Device to VM"
msgstr "为虚拟机添加一个存储设备"
-msgid "Device Name"
-msgstr "设备名称"
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 69e1c9a..5994802 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -1060,9 +1060,6 @@ msgstr "刪除"
msgid "Add a Storage Device to VM"
msgstr "將儲存裝置新增至 VM"
-msgid "Device Name"
-msgstr "裝置名稱"
-
msgid ""
"The name used to identify the device. If omitted, a name will be chosen "
"automatically."
diff --git a/ui/js/src/kimchi.guest_storage_add.main.js b/ui/js/src/kimchi.guest_storage_add.main.js
index a8c5acb..54ae748 100644
--- a/ui/js/src/kimchi.guest_storage_add.main.js
+++ b/ui/js/src/kimchi.guest_storage_add.main.js
@@ -28,7 +28,6 @@ kimchi.guest_storage_add_main = function() {
var storageAddForm = $('#form-guest-storage-add');
var submitButton = $('#guest-storage-button-add');
- var nameTextbox = $('input[name="dev"]', storageAddForm);
var typeTextbox = $('input[name="type"]', storageAddForm);
var pathTextbox = $('input[name="path"]', storageAddForm);
var poolTextbox = $('input[name="pool"]', storageAddForm);
@@ -139,7 +138,7 @@ kimchi.guest_storage_add_main = function() {
};
$(submitButton).prop('disabled', true);
- $.each([nameTextbox, pathTextbox, poolTextbox, volTextbox], function(i, c) {
+ $.each([pathTextbox, poolTextbox, volTextbox], function(i, c) {
$(c).prop('disabled', true);
val = $(c).val()
if (val && val != '') {
@@ -150,7 +149,7 @@ kimchi.guest_storage_add_main = function() {
validateSpecifiedForm = validator[settings['type']];
if (!validateSpecifiedForm(settings)) {
$(submitButton).prop('disabled', false);
- $.each([submitButton, nameTextbox, pathTextbox, poolTextbox, volTextbox], function(i, c) {
+ $.each([submitButton, pathTextbox, poolTextbox, volTextbox], function(i, c) {
$(c).prop('disabled', false);
});
return false;
@@ -167,7 +166,7 @@ kimchi.guest_storage_add_main = function() {
result['responseJSON']['reason'];
kimchi.message.error(errText);
- $.each([submitButton, nameTextbox, pathTextbox, poolTextbox, volTextbox], function(i, c) {
+ $.each([submitButton, pathTextbox, poolTextbox, volTextbox], function(i, c) {
$(c).prop('disabled', false);
});
$(submitButton).removeClass('loading').text(i18n['KCHVMCD6002M']);
diff --git a/ui/pages/guest-storage-add.html.tmpl b/ui/pages/guest-storage-add.html.tmpl
index ca064fc..c991f42 100644
--- a/ui/pages/guest-storage-add.html.tmpl
+++ b/ui/pages/guest-storage-add.html.tmpl
@@ -29,16 +29,7 @@
<div class="content">
<form id="form-guest-storage-add">
<section class="form-section">
- <h2>1. $_("Device Name")</h2>
- <div class="field">
- <p class="text-help">
- $_("The name used to identify the device. If omitted, a name will be chosen automatically.")
- </p>
- <input type="text" class="text" name="dev" />
- </div>
- </section>
- <section class="form-section">
- <h2>2. $_("Device Type")</h2>
+ <h2>1. $_("Device Type")</h2>
<div class="field">
<p class="text-help">
$_("The device type. Currently, \"cdrom\" and \"disk\" are supported.")
@@ -55,7 +46,7 @@
</section>
<div class="volume-section hidden">
<section class="form-section">
- <h2>4. $_("Storage Pool")</h2>
+ <h2>2. $_("Storage Pool")</h2>
<div class="field storage-field">
<p class="text-help">
$_("Storage pool which volume located in")
@@ -70,7 +61,7 @@
</div>
</section>
<section class="form-section">
- <h2>5. $_("Storage Volume")</h2>
+ <h2>3. $_("Storage Volume")</h2>
<div class="field storage-field">
<p class="text-help">
$_("Storage volume to be attached")
@@ -87,7 +78,7 @@
</div>
<div class="path-section">
<section class="form-section">
- <h2>4. $_("File Path")</h2>
+ <h2>2. $_("File Path")</h2>
<div class="field">
<p class="text-help">
$_("The ISO file path in the server for CDROM.")
--
1.8.3.1
10 years, 3 months
[PATCH] guest-storage-add: removing "Storage Name" field
by Daniel Henrique Barboza
This specific field adds very little to the user experience in
comparison with the effort required to mantain it. This patch
removes it from the UI, making the "Add a Storage Device to VM"
window simpler.
Backend support of specifying dev name is left as is because
it can be helpful in testing/debugging.
Signed-off-by: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_storage_add.main.js | 7 +++----
ui/pages/guest-storage-add.html.tmpl | 17 ++++-------------
2 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/ui/js/src/kimchi.guest_storage_add.main.js b/ui/js/src/kimchi.guest_storage_add.main.js
index a8c5acb..54ae748 100644
--- a/ui/js/src/kimchi.guest_storage_add.main.js
+++ b/ui/js/src/kimchi.guest_storage_add.main.js
@@ -28,7 +28,6 @@ kimchi.guest_storage_add_main = function() {
var storageAddForm = $('#form-guest-storage-add');
var submitButton = $('#guest-storage-button-add');
- var nameTextbox = $('input[name="dev"]', storageAddForm);
var typeTextbox = $('input[name="type"]', storageAddForm);
var pathTextbox = $('input[name="path"]', storageAddForm);
var poolTextbox = $('input[name="pool"]', storageAddForm);
@@ -139,7 +138,7 @@ kimchi.guest_storage_add_main = function() {
};
$(submitButton).prop('disabled', true);
- $.each([nameTextbox, pathTextbox, poolTextbox, volTextbox], function(i, c) {
+ $.each([pathTextbox, poolTextbox, volTextbox], function(i, c) {
$(c).prop('disabled', true);
val = $(c).val()
if (val && val != '') {
@@ -150,7 +149,7 @@ kimchi.guest_storage_add_main = function() {
validateSpecifiedForm = validator[settings['type']];
if (!validateSpecifiedForm(settings)) {
$(submitButton).prop('disabled', false);
- $.each([submitButton, nameTextbox, pathTextbox, poolTextbox, volTextbox], function(i, c) {
+ $.each([submitButton, pathTextbox, poolTextbox, volTextbox], function(i, c) {
$(c).prop('disabled', false);
});
return false;
@@ -167,7 +166,7 @@ kimchi.guest_storage_add_main = function() {
result['responseJSON']['reason'];
kimchi.message.error(errText);
- $.each([submitButton, nameTextbox, pathTextbox, poolTextbox, volTextbox], function(i, c) {
+ $.each([submitButton, pathTextbox, poolTextbox, volTextbox], function(i, c) {
$(c).prop('disabled', false);
});
$(submitButton).removeClass('loading').text(i18n['KCHVMCD6002M']);
diff --git a/ui/pages/guest-storage-add.html.tmpl b/ui/pages/guest-storage-add.html.tmpl
index ca064fc..c991f42 100644
--- a/ui/pages/guest-storage-add.html.tmpl
+++ b/ui/pages/guest-storage-add.html.tmpl
@@ -29,16 +29,7 @@
<div class="content">
<form id="form-guest-storage-add">
<section class="form-section">
- <h2>1. $_("Device Name")</h2>
- <div class="field">
- <p class="text-help">
- $_("The name used to identify the device. If omitted, a name will be chosen automatically.")
- </p>
- <input type="text" class="text" name="dev" />
- </div>
- </section>
- <section class="form-section">
- <h2>2. $_("Device Type")</h2>
+ <h2>1. $_("Device Type")</h2>
<div class="field">
<p class="text-help">
$_("The device type. Currently, \"cdrom\" and \"disk\" are supported.")
@@ -55,7 +46,7 @@
</section>
<div class="volume-section hidden">
<section class="form-section">
- <h2>4. $_("Storage Pool")</h2>
+ <h2>2. $_("Storage Pool")</h2>
<div class="field storage-field">
<p class="text-help">
$_("Storage pool which volume located in")
@@ -70,7 +61,7 @@
</div>
</section>
<section class="form-section">
- <h2>5. $_("Storage Volume")</h2>
+ <h2>3. $_("Storage Volume")</h2>
<div class="field storage-field">
<p class="text-help">
$_("Storage volume to be attached")
@@ -87,7 +78,7 @@
</div>
<div class="path-section">
<section class="form-section">
- <h2>4. $_("File Path")</h2>
+ <h2>2. $_("File Path")</h2>
<div class="field">
<p class="text-help">
$_("The ISO file path in the server for CDROM.")
--
1.8.3.1
10 years, 3 months
[PATCH] vmstorages changes for Power: allow SCSI devs, block IDE devs
by Daniel Henrique Barboza
Kimchi does not allow scsi devices to be attached in a VM (devices
with names sdb,sdc ...). A simple change in API.json regex of
vmstorages_create fixes it.
At the same time, Power systems does not support IDE devices and
adding devices with 'hd[b-z]' name have unpredictable results.
This patch also adds a backend verification to avoid this scenario.
Signed-off-by: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
---
src/kimchi/API.json | 2 +-
src/kimchi/i18n.py | 1 +
src/kimchi/model/vmstorages.py | 7 +++++++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/kimchi/API.json b/src/kimchi/API.json
index 1319531..4a3cd03 100644
--- a/src/kimchi/API.json
+++ b/src/kimchi/API.json
@@ -489,7 +489,7 @@
"dev": {
"description": "The storage device name",
"type": "string",
- "pattern": "^h|vd[b-z]$",
+ "pattern": "^h|s|vd[b-z]$",
"error": "KCHVMSTOR0001E"
},
"type": {
diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index 9e66c68..0839007 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -259,6 +259,7 @@ messages = {
"KCHVMSTOR0015E": _("Cannot retrieve disk path information for given pool/volume: %(error)s"),
"KCHVMSTOR0016E": _("Volume already in use by other virtual machine."),
"KCHVMSTOR0017E": _("Only one of path or pool/volume can be specified to add a new virtual machine disk"),
+ "KCHVMSTOR0018E": _("Device name %(dev_name)s is not allowed because Power systems does not support IDE devices"),
"KCHREPOS0001E": _("YUM Repository ID must be one word only string."),
"KCHREPOS0002E": _("Repository URL must be an http://, ftp:// or file:// URL."),
diff --git a/src/kimchi/model/vmstorages.py b/src/kimchi/model/vmstorages.py
index 40856d3..c302709 100644
--- a/src/kimchi/model/vmstorages.py
+++ b/src/kimchi/model/vmstorages.py
@@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import os
+import platform
+import re
import socket
import stat
import string
@@ -188,6 +190,11 @@ class VMStoragesModel(object):
string.ascii_lowercase.index(last_dev[2]) + 1
params['dev'] =\
bus_prefix + string.ascii_lowercase[next_dev_letter_pos]
+ # Power systems does not support IDE devices
+ elif platform.machine().startswith('ppc') and \
+ re.match('^hd[b-z]', params.get('dev')):
+ raise OperationFailed('KCHVMSTOR0018E',
+ {'dev_name': params['dev']})
devices = self.get_list(vm_name)
if params['dev'] in devices:
--
1.8.3.1
10 years, 3 months
[PATCH] Bugfix#426: When no interface available, creating network popup error
by Wen Wang
From: Wen Wang <wenwang(a)linux.vnet.ibm.com>
This patch fix the the issue when creating a network that lack of
interface options pops up errors
Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.network.js | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
index 4ee7249..7b0743f 100644
--- a/ui/js/src/kimchi.network.js
+++ b/ui/js/src/kimchi.network.js
@@ -247,17 +247,16 @@ kimchi.openNetworkDialog = function(okCallback) {
kimchi.getInterfaces(function(result) {
var options = [];
$('#networkDestinationID').selectMenu();
- $("#networkDestinationID").on('click',function(){
- });
var nics = {};
for (var i = 0; i < result.length; i++) {
options.push({label:result[i].name,value:result[i].name});
nics[result[i].name] = result[i];
}
- $("#networkDestinationID").selectMenu("setData", options);
+ result.length>0 && $("#networkDestinationID").selectMenu("setData", options);
onChange = function() {
$("#networkDestinationLabel").text($("#networkDestinationID li:first-child").text());
- if (nics[$("#networkDestinationLabel").text()].type === "bridge") {
+ $("#networkDestinationID li:first-child").addClass("active");
+ if (result.length>0 && nics[$("#networkDestinationLabel").text()].type === "bridge") {
$("#enableVlan").prop("checked", false);
$("#enableVlan").prop("disabled", true);
$("#networkVlanID").val("");
@@ -268,8 +267,8 @@ kimchi.openNetworkDialog = function(okCallback) {
}
};
$("#networkDestinationLabel").on("change", onChange);
- onChange();
kimchi.setDefaultNetworkType(result.length!==0);
+ onChange();
});
$("#networkConfig").dialog({
title : i18n.KCHNET6003M
--
1.7.1
10 years, 3 months
[PATCH] Disk image type in vm template - backend
by Daniel Henrique Barboza
A new parameter called "type" is now allowed in the backend to
choose the image type of the VM template. The default image type, if
this parameter isn't used, is "qcow2".
Examples:
- creates a VM template called "opensuse_disktype" with 2 disks, one of them is of type "raw":
$ curl -u user:passwd -H "Content-Type: application/json" -H "Accept: application/json" http://localhost:8010/templates -X POST -d'{"name": "opensuse_disktype", "cdrom":"/home/danielhb/Downloads/openSUSE-13.1-DVD-x86_64.iso", "disks":[{"index":0,"size":3}, {"index":1, "size":4, "type":"raw"}]}'
- changing the disk types of the template:
$ curl -u user:passwd -H "Content-Type: application/json" -H "Accept: application/json" http://localhost:8010/templates/opensuse_disktype -X PUT -d'{"disks":[{"index":0,"size":3, "type":"raw"}, {"index":1, "size":4}]}'
Daniel Henrique Barboza (1):
Choose disk image type in vm template - backend
docs/API.md | 1 +
src/kimchi/API.json | 12 ++++++++++++
src/kimchi/i18n.py | 1 +
src/kimchi/vmtemplate.py | 5 ++++-
4 files changed, 18 insertions(+), 1 deletion(-)
--
1.8.3.1
10 years, 3 months
[PATCH] Fix cdrom eject
by lvroyce@linux.vnet.ibm.com
From: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
Cdrom eject intended to use POST "/vms/vm-name/vmstorages/hdc" to eject
cdrom, while UI used PUT "/vms/vm-name/vmstorages/hdc" to implement this,
which makes cdrom eject not working.
Adjust backend code to fix this and delete eject action.
Signed-off-by: Royce Lv <lvroyce(a)linux.vnet.ibm.com>
---
docs/API.md | 2 --
src/kimchi/API.json | 2 +-
src/kimchi/control/vm/storages.py | 1 -
src/kimchi/model/vmstorages.py | 8 +++-----
tests/test_model.py | 2 +-
5 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/docs/API.md b/docs/API.md
index ca64af6..50ed321 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -168,8 +168,6 @@ Represents a snapshot of the Virtual Machine's primary monitor.
**Actions (POST):**
-* eject: Eject cdrom from device.
-
### Collection: Templates
diff --git a/src/kimchi/API.json b/src/kimchi/API.json
index 2e2f9b0..47bc05b 100644
--- a/src/kimchi/API.json
+++ b/src/kimchi/API.json
@@ -522,7 +522,7 @@
"path": {
"description": "Path of iso image file or disk mount point",
"type": "string",
- "pattern": "^((/)|(http)[s]?:|[t]?(ftp)[s]?:)+.*$",
+ "pattern": "^(|(/)|(http)[s]?:|[t]?(ftp)[s]?:)+.*$",
"required": true,
"error": "KCHVMSTOR0003E"
}
diff --git a/src/kimchi/control/vm/storages.py b/src/kimchi/control/vm/storages.py
index a8a037a..984c4d2 100644
--- a/src/kimchi/control/vm/storages.py
+++ b/src/kimchi/control/vm/storages.py
@@ -39,7 +39,6 @@ class VMStorage(Resource):
self.info = {}
self.model_args = [self.vm, self.ident]
self.uri_fmt = '/vms/%s/storages/%s'
- self.eject = self.generate_action_handler('eject')
self.update_params = ['path']
@property
diff --git a/src/kimchi/model/vmstorages.py b/src/kimchi/model/vmstorages.py
index 40856d3..54e2685 100644
--- a/src/kimchi/model/vmstorages.py
+++ b/src/kimchi/model/vmstorages.py
@@ -232,8 +232,9 @@ class VMStorageModel(object):
raise OperationFailed("KCHVMSTOR0010E", {'error': e.message})
def update(self, vm_name, dev_name, params):
- if params.get('path'):
- params['src_type'] = _check_path(params['path'])
+ path = params.get('path')
+ if path and len(path) != 0:
+ params['src_type'] = _check_path(path)
ignore_source = False
else:
params['src_type'] = 'file'
@@ -251,6 +252,3 @@ class VMStorageModel(object):
except Exception as e:
raise OperationFailed("KCHVMSTOR0009E", {'error': e.message})
return dev_name
-
- def eject(self, vm_name, dev_name):
- return self.update(vm_name, dev_name, dict())
diff --git a/tests/test_model.py b/tests/test_model.py
index 5ee824d..27f5b80 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -382,7 +382,7 @@ class ModelTests(unittest.TestCase):
self.assertEquals(iso_path, cdrom_info['path'])
# eject cdrom
- cdrom_dev = inst.vmstorage_eject(vm_name, cdrom_dev)
+ cdrom_dev = inst.vmstorage_update(vm_name, cdrom_dev, {'path': ''})
cdrom_info = inst.vmstorage_lookup(vm_name, cdrom_dev)
self.assertEquals('', cdrom_info['path'])
inst.vm_poweroff(vm_name)
--
1.8.3.2
10 years, 3 months
Changing graphics type, passwd and validto params
by Brent Baude
Hi Folks,
I have a patch ready that deals with the graphics elements in kimchi.
First, I have added serial console as a graphics type along with the
existing vnc and spice options.
Secondly, I have added the ability to edit the graphics type on a cold
guest. You can switch between the platform appropriate options and the
next time you boot the vm, it will take effect. One issue I am hitting
in completing this function is the recently added options for password
and validto time parameters. Neither of these are in the UI but can be
set via a curl request evidently.
Where I would like some input from the team is around how to handle
these in the case of changing the graphics type. The passwd and validto
options are only applicable to vnc and spice, so these options will not
be preserved if the user changes to serial console. That said, what are
people's expectations on saving these values (if they are set) when
switching between spice and vnc?
I believe the current function will set the validto to 30 seconds if the
passwd is set but no validto is provided. Given that the validto is
intended to be a short time, should I just set the new validto to 30
seconds as well? Should I just take the current validto and set it the
same in the new graphics definition? Since the function is not in the
GUI, should I discard both? And finally, is there a value for "never"
for validto?
Right now, my current line of thinking is this:
Because the passwd and validto is not in the GUI, I should discard the
values when switching the graphics type unless there is a 'never' value
already set. Then I would set both passwd and valueto in the new
graphics type. My justification for this line of thinking is that if
people know to set these options, then they would know their validto
value has probably expired and both would need to be reset.
Thoughts and input welcome please.
Brent
10 years, 3 months
[PATCH v2 0/4] UI: Download Remote Image Feature
by Hongliang Wang
Implemented download remote image feature.
v1 -> v2:
2a) Disabled add volume for inactive and iscsi/scsi pools
(Aline's comment)
2b) Removed progress bar after upload/download finished
(Aline & Cristian's comment)
2c) Changed the button label to "Add" from "OK"
(Cristian's comment)
2d) Made add volume button behave correctly (enabled/disabled)
(Cristian's comment)
2e) Removed some code redundent
(Aline & Cristian's comment)
Hongliang Wang (4):
Storage Pool Add Volume UI: Add APIs to kimchi.api.js
Storage Pool Add Volume UI: Add i18n Strings
Storage Pool Add Volume UI: Implement Download/Upload Volume Function
Storage Pool Add Volume UI: Connect the Feature in Storage Tab
ui/css/theme-default/storage.css | 31 ++-
ui/css/theme-default/storagepool-add-volume.css | 36 ++++
ui/js/src/kimchi.api.js | 37 ++++
ui/js/src/kimchi.storage_main.js | 116 ++++++++++-
ui/js/src/kimchi.storagepool_add_volume_main.js | 243 ++++++++++++++++++++++++
ui/pages/i18n.json.tmpl | 4 +
ui/pages/storagepool-add-volume.html.tmpl | 80 ++++++++
ui/pages/tabs/storage.html.tmpl | 12 +-
8 files changed, 549 insertions(+), 10 deletions(-)
create mode 100644 ui/css/theme-default/storagepool-add-volume.css
create mode 100644 ui/js/src/kimchi.storagepool_add_volume_main.js
create mode 100644 ui/pages/storagepool-add-volume.html.tmpl
--
1.8.1.4
10 years, 3 months
[PATCH 0/5 V3] Download and upload UI
by Aline Manera
- Set dataType (dataType: 'json') instead of add Accept header
- Use .show() and .hide() to display or not the "Add Volume button"
- Allow any type of file to be uploaded
- Change upload/download handlers to query for running Tasks while
listing storage volumes in a pool
That way all users get the same view when a storage volume is being
downloaded or uploaded
- Disable upload option until we get all issues fixed
Aline Manera (1):
Disable upload option while adding a volume to a pool
Hongliang Wang (4):
Storage Pool Add Volume UI: Add APIs to kimchi.api.js
Storage Pool Add Volume UI: Add i18n Strings
Storage Pool Add Volume UI: Implement Download/Upload Volume Function
Storage Pool Add Volume UI: Connect the Feature in Storage Tab
ui/css/theme-default/storage.css | 31 +++-
ui/css/theme-default/storagepool-add-volume.css | 36 +++++
ui/js/src/kimchi.api.js | 35 +++++
ui/js/src/kimchi.storage_main.js | 196 +++++++++++++++++++++---
ui/js/src/kimchi.storagepool_add_volume_main.js | 107 +++++++++++++
ui/pages/i18n.json.tmpl | 2 +
ui/pages/storagepool-add-volume.html.tmpl | 80 ++++++++++
ui/pages/tabs/storage.html.tmpl | 12 +-
8 files changed, 473 insertions(+), 26 deletions(-)
create mode 100644 ui/css/theme-default/storagepool-add-volume.css
create mode 100644 ui/js/src/kimchi.storagepool_add_volume_main.js
create mode 100644 ui/pages/storagepool-add-volume.html.tmpl
--
1.9.3
10 years, 3 months