On 2014年09月18日 17:51, Wen Wang wrote:
Hi Daniel,
I have tried your patch and by adding an iso file from
/var/lib/libvirt/Fedora-Live-Desktop-x86_64-20-1.iso, there error occurs:
|{
|| "reason":"KCHVMSTOR0011E: Do not support IDE device hot plug",
|| "code":"400 Bad Request"
||}|
Could you please take a look at this?
Wang Wen,
Did you try to attach a cdrom to a running vm? if so, I think this
is expected behaviour, because cdrom which takes IDE bus as default,
does not support hotplug.
On 09/18/2014 03:22 AM, Daniel Henrique Barboza wrote:
> 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 | 10 ----------
> po/en_US.po | 8 --------
> po/es_ES.po | 10 ----------
> po/fr_FR.po | 10 ----------
> po/it_IT.po | 10 ----------
> po/ja_JP.po | 10 ----------
> po/kimchi.pot | 8 --------
> po/ko_KR.po | 9 ---------
> po/pt_BR.po | 10 ----------
> po/ru_RU.po | 10 ----------
> po/zh_CN.po | 8 --------
> po/zh_TW.po | 8 --------
> ui/js/src/kimchi.guest_storage_add.main.js | 7 +++----
> ui/pages/guest-storage-add.html.tmpl | 17 ++++-------------
> 14 files changed, 7 insertions(+), 128 deletions(-)
>
> diff --git a/po/de_DE.po b/po/de_DE.po
> index 06d8c38..3c8a3a9 100644
> --- a/po/de_DE.po
> +++ b/po/de_DE.po
> @@ -1183,16 +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."
> -msgstr ""
> -"Der Name, mit dem die Einheit gekennzeichnet wird. Falls er
> ausgelassen "
> -"wird, wird automatisch ein Name gewählt."
> -
> msgid "Device Type"
> msgstr "Einheitentyp"
> diff --git a/po/en_US.po b/po/en_US.po
> index 11fcec9..bc851b2 100644
> --- a/po/en_US.po
> +++ b/po/en_US.po
> @@ -1057,14 +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."
> -msgstr ""
> -
> msgid "Device Type"
> msgstr ""
> diff --git a/po/es_ES.po b/po/es_ES.po
> index 4aec448..d966fd6 100644
> --- a/po/es_ES.po
> +++ b/po/es_ES.po
> @@ -1201,16 +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."
> -msgstr ""
> -"El nombre que se utiliza para identificar el dispositivo. Si se
> omite, se "
> -"elegirá un nombre automáticamente"
> -
> msgid "Device Type"
> msgstr "Tipo de dispositivo"
> diff --git a/po/fr_FR.po b/po/fr_FR.po
> index 6b2bd2d..c4746d0 100644
> --- a/po/fr_FR.po
> +++ b/po/fr_FR.po
> @@ -1189,16 +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."
> -msgstr ""
> -"Le nom utilisé pour identifier le périphérique. Si omis, un nom
> sera choisi "
> -"automatiquement."
> -
> msgid "Device Type"
> msgstr "Type de Périphérique"
> diff --git a/po/it_IT.po b/po/it_IT.po
> index 3293fa2..cb6ea0f 100644
> --- a/po/it_IT.po
> +++ b/po/it_IT.po
> @@ -1170,16 +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."
> -msgstr ""
> -"Il nome utilizzato per identificare il dispositivo. Se omesso, ne
> verrà "
> -"scelto uno automaticamente."
> -
> msgid "Device Type"
> msgstr "Tipo dispositivo"
> diff --git a/po/ja_JP.po b/po/ja_JP.po
> index a2740bf..fd419ce 100644
> --- a/po/ja_JP.po
> +++ b/po/ja_JP.po
> @@ -1182,16 +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."
> -msgstr ""
> -"名前はデバイスを識別するために使用されます。省略すると、名前は自動
> 的に選択さ"
> -"れます。"
> -
> msgid "Device Type"
> msgstr "デバイス・タイプ"
> diff --git a/po/kimchi.pot b/po/kimchi.pot
> index cd0a1ac..53d32ef 100755
> --- a/po/kimchi.pot
> +++ b/po/kimchi.pot
> @@ -1057,14 +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."
> -msgstr ""
> -
> msgid "Device Type"
> msgstr ""
> diff --git a/po/ko_KR.po b/po/ko_KR.po
> index 20e8a0f..0a7e8ac 100644
> --- a/po/ko_KR.po
> +++ b/po/ko_KR.po
> @@ -1113,15 +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."
> -msgstr ""
> -"장치를 식별하는 데 사용되는 이름입니다. 생략 시 이름이 자동으로 선
> 택됩니다."
> -
> msgid "Device Type"
> msgstr "장치 유형"
> diff --git a/po/pt_BR.po b/po/pt_BR.po
> index 7d18a2d..d94cd11 100644
> --- a/po/pt_BR.po
> +++ b/po/pt_BR.po
> @@ -1189,16 +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."
> -msgstr ""
> -"O nome usado para identificar o dispositivo. Se omitido, um nome
> será "
> -"escolhido automaticamente."
> -
> msgid "Device Type"
> msgstr "Tipo do Dispositivo"
> diff --git a/po/ru_RU.po b/po/ru_RU.po
> index 069e083..6e542b4 100644
> --- a/po/ru_RU.po
> +++ b/po/ru_RU.po
> @@ -1113,16 +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."
> -msgstr ""
> -"Имя для идентификации устройства. Если не указано, то имя будет
> выбрано "
> -"автоматически."
> -
> msgid "Device Type"
> msgstr "Тип устройства"
> diff --git a/po/zh_CN.po b/po/zh_CN.po
> index e6f9ac7..29a615b 100644
> --- a/po/zh_CN.po
> +++ b/po/zh_CN.po
> @@ -1076,14 +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."
> -msgstr "设备名称,如果留空系统会自动生成一个"
> -
> msgid "Device Type"
> msgstr "设备类型"
> diff --git a/po/zh_TW.po b/po/zh_TW.po
> index 69e1c9a..e084aa7 100644
> --- a/po/zh_TW.po
> +++ b/po/zh_TW.po
> @@ -1060,14 +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."
> -msgstr "用來識別裝置的名稱。如果省略,則將自動選擇一個名稱。"
> -
> msgid "Device Type"
> msgstr "裝置類型"
> 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.")