[PATCH V2 0/2] Add UI support of iscsi

v1-v2 modify some of translation messages Include create storage pool UI and translation files. zhoumeina (2): Add UI support of iscsi Add the ISCSI translation po files po/en_US.po | 31 +++++++++++++---- po/kimchi.pot | 30 ++++++++++++---- po/pt_BR.po | 31 +++++++++++++---- po/zh_CN.po | 31 +++++++++++++---- ui/js/src/kimchi.storagepool_add_main.js | 54 ++++++++++++++++++++++++----- ui/pages/i18n.html.tmpl | 7 ++-- ui/pages/storagepool-add.html.tmpl | 22 +++++++++++- 7 files changed, 159 insertions(+), 47 deletions(-) mode change 100644 => 100755 po/kimchi.pot

This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page. Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 54 ++++++++++++++++++++++++----- ui/pages/i18n.html.tmpl | 7 ++-- ui/pages/storagepool-add.html.tmpl | 22 +++++++++++- 3 files changed, 68 insertions(+), 15 deletions(-) diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index b31610a..cd8f1ae 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "ISCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,14 +60,22 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); }); @@ -85,6 +96,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +120,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +}; - if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +}; - if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -153,6 +184,9 @@ kimchi.addPool = function(event) { deviceObj[0] = formData.devices; formData.devices = deviceObj; } + } else if (poolType === 'iscsi'){ + formData.srcTarget = $('#iscsiserverId').val(); + formData.srcHost = $('#iscsiTargetId').val(); } else { formData.nfspath = $('#nfspathId').val(); formData.nfsserver = $('#nfsserverId').val(); diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 3ab9ae5..2898540 100644 --- a/ui/pages/storagepool-add.html.tmpl +++ b/ui/pages/storagepool-add.html.tmpl @@ -84,8 +84,7 @@ <p class="text-help">$_("The nfs exported path on nfs server")</p> <input id="nfspathId" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -104,6 +103,25 @@ <span class="text">$_("Create")</span> </button> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("ISCSI server")</h2> + <div class="field"> + <p class="text-help"> + $_("ISCSI server IP or hostname. It should not be empty.")</p> + <input id="iscsiserverId" type="text" class="text" + style="width: 300px"> + </div> + </section> + <section class="form-section"> + <h2>4. $_("Target")</h2> + <div class="field"> + <p class="text-help">$_("The ISCSI target on ISCSI server")</p> + <input id="iscsiTargetId" type="text" class="text" style="width: 300px"> + </div> + <div class="clear"></div> + </section> + </div> </footer> </div> <script> -- 1.7.1

于 2013年12月23日 10:57, zhoumeina 写道:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 54 ++++++++++++++++++++++++----- ui/pages/i18n.html.tmpl | 7 ++-- ui/pages/storagepool-add.html.tmpl | 22 +++++++++++- 3 files changed, 68 insertions(+), 15 deletions(-)
diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index b31610a..cd8f1ae 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "ISCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,14 +60,22 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); }); @@ -85,6 +96,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +120,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -153,6 +184,9 @@ kimchi.addPool = function(event) { deviceObj[0] = formData.devices; formData.devices = deviceObj; } + } else if (poolType === 'iscsi'){ + formData.srcTarget = $('#iscsiserverId').val(); + formData.srcHost = $('#iscsiTargetId').val();
It seems you are based on master rather than my iSCSI backend implementation. I think it's ok. When backend is ready, things to be changed in UI code is only this small part.
} else { formData.nfspath = $('#nfspathId').val(); formData.nfsserver = $('#nfsserverId').val(); diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 3ab9ae5..2898540 100644 --- a/ui/pages/storagepool-add.html.tmpl +++ b/ui/pages/storagepool-add.html.tmpl @@ -84,8 +84,7 @@ <p class="text-help">$_("The nfs exported path on nfs server")</p> <input id="nfspathId" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -104,6 +103,25 @@ <span class="text">$_("Create")</span> </button> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("ISCSI server")</h2> + <div class="field"> + <p class="text-help"> + $_("ISCSI server IP or hostname. It should not be empty.")</p> + <input id="iscsiserverId" type="text" class="text" + style="width: 300px"> + </div> + </section> + <section class="form-section"> + <h2>4. $_("Target")</h2> + <div class="field"> + <p class="text-help">$_("The ISCSI target on ISCSI server")</p> + <input id="iscsiTargetId" type="text" class="text" style="width: 300px"> + </div> + <div class="clear"></div> + </section> + </div> </footer> </div> <script>
-- Thanks and best regards! Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397

On 12/23/2013 12:57 AM, zhoumeina wrote:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 54 ++++++++++++++++++++++++----- ui/pages/i18n.html.tmpl | 7 ++-- ui/pages/storagepool-add.html.tmpl | 22 +++++++++++- 3 files changed, 68 insertions(+), 15 deletions(-)
diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index b31610a..cd8f1ae 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "ISCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,14 +60,22 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); }); @@ -85,6 +96,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +120,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -153,6 +184,9 @@ kimchi.addPool = function(event) { deviceObj[0] = formData.devices; formData.devices = deviceObj; } + } else if (poolType === 'iscsi'){ + formData.srcTarget = $('#iscsiserverId').val(); + formData.srcHost = $('#iscsiTargetId').val(); } else { formData.nfspath = $('#nfspathId').val(); formData.nfsserver = $('#nfsserverId').val(); diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 3ab9ae5..2898540 100644 --- a/ui/pages/storagepool-add.html.tmpl +++ b/ui/pages/storagepool-add.html.tmpl @@ -84,8 +84,7 @@ <p class="text-help">$_("The nfs exported path on nfs server")</p> <input id="nfspathId" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -104,6 +103,25 @@ <span class="text">$_("Create")</span> </button> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("ISCSI server")</h2> + <div class="field"> + <p class="text-help"> + $_("ISCSI server IP or hostname. It should not be empty.")</p> + <input id="iscsiserverId" type="text" class="text" + style="width: 300px"> + </div> + </section> + <section class="form-section"> + <h2>4. $_("Target")</h2> + <div class="field"> + <p class="text-help">$_("The ISCSI target on ISCSI server")</p> + <input id="iscsiTargetId" type="text" class="text" style="width: 300px"> + </div> + <div class="clear"></div> + </section> + </div>
What about iSCSI servers that need authentication ? Will user provide the password through UI or some config file ?
</footer> </div> <script>

于 2013年12月25日 01:51, Rodrigo Trujillo 写道:
On 12/23/2013 12:57 AM, zhoumeina wrote:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 54 ++++++++++++++++++++++++----- ui/pages/i18n.html.tmpl | 7 ++-- ui/pages/storagepool-add.html.tmpl | 22 +++++++++++- 3 files changed, 68 insertions(+), 15 deletions(-)
diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index b31610a..cd8f1ae 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "ISCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,14 +60,22 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); }); @@ -85,6 +96,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +120,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -153,6 +184,9 @@ kimchi.addPool = function(event) { deviceObj[0] = formData.devices; formData.devices = deviceObj; } + } else if (poolType === 'iscsi'){ + formData.srcTarget = $('#iscsiserverId').val(); + formData.srcHost = $('#iscsiTargetId').val(); } else { formData.nfspath = $('#nfspathId').val(); formData.nfsserver = $('#nfsserverId').val(); diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 3ab9ae5..2898540 100644 --- a/ui/pages/storagepool-add.html.tmpl +++ b/ui/pages/storagepool-add.html.tmpl @@ -84,8 +84,7 @@ <p class="text-help">$_("The nfs exported path on nfs server")</p> <input id="nfspathId" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -104,6 +103,25 @@ <span class="text">$_("Create")</span> </button> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("ISCSI server")</h2> + <div class="field"> + <p class="text-help"> + $_("ISCSI server IP or hostname. It should not be empty.")</p> + <input id="iscsiserverId" type="text" class="text" + style="width: 300px"> + </div> + </section> + <section class="form-section"> + <h2>4. $_("Target")</h2> + <div class="field"> + <p class="text-help">$_("The ISCSI target on ISCSI server")</p> + <input id="iscsiTargetId" type="text" class="text" style="width: 300px"> + </div> + <div class="clear"></div> + </section> + </div>
What about iSCSI servers that need authentication ? Will user provide the password through UI or some config file ?
kimchi transfers password in clear text, and it doesn't force https. I think it's not safe, so I didn't add a password in the back-end. I think there should be an overall solution for passwords (login, iSCSI CHAP, and other). For now, the back-end implementation does not support iSCSI authentication. This question has been asked twice, maybe I can add password support in the new patch set, and just transfer the password in clear text.
</footer> </div> <script>
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
-- Thanks and best regards! Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397

On 12/26/2013 12:33 AM, Zhou Zheng Sheng wrote:
于 2013年12月25日 01:51, Rodrigo Trujillo 写道:
On 12/23/2013 12:57 AM, zhoumeina wrote:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 54 ++++++++++++++++++++++++----- ui/pages/i18n.html.tmpl | 7 ++-- ui/pages/storagepool-add.html.tmpl | 22 +++++++++++- 3 files changed, 68 insertions(+), 15 deletions(-)
diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index b31610a..cd8f1ae 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "ISCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,14 +60,22 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); }); @@ -85,6 +96,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +120,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -153,6 +184,9 @@ kimchi.addPool = function(event) { deviceObj[0] = formData.devices; formData.devices = deviceObj; } + } else if (poolType === 'iscsi'){ + formData.srcTarget = $('#iscsiserverId').val(); + formData.srcHost = $('#iscsiTargetId').val(); } else { formData.nfspath = $('#nfspathId').val(); formData.nfsserver = $('#nfsserverId').val(); diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 3ab9ae5..2898540 100644 --- a/ui/pages/storagepool-add.html.tmpl +++ b/ui/pages/storagepool-add.html.tmpl @@ -84,8 +84,7 @@ <p class="text-help">$_("The nfs exported path on nfs server")</p> <input id="nfspathId" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -104,6 +103,25 @@ <span class="text">$_("Create")</span> </button> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("ISCSI server")</h2> + <div class="field"> + <p class="text-help"> + $_("ISCSI server IP or hostname. It should not be empty.")</p> + <input id="iscsiserverId" type="text" class="text" + style="width: 300px"> + </div> + </section> + <section class="form-section"> + <h2>4. $_("Target")</h2> + <div class="field"> + <p class="text-help">$_("The ISCSI target on ISCSI server")</p> + <input id="iscsiTargetId" type="text" class="text" style="width: 300px"> + </div> + <div class="clear"></div> + </section> + </div> What about iSCSI servers that need authentication ? Will user provide the password through UI or some config file ?
kimchi transfers password in clear text, and it doesn't force https. I think it's not safe, so I didn't add a password in the back-end. I think there should be an overall solution for passwords (login, iSCSI CHAP, and other). For now, the back-end implementation does not support iSCSI authentication.
This question has been asked twice, maybe I can add password support in the new patch set, and just transfer the password in clear text.
Sorry for have asked this again and thanks for the answer :) Agree, transfer password in plan text is not good. I am not UI/WEB specialist, but maybe there is a way to send the password already encrypted or force an https connection when sending passwords ... well, I need to read more about this.
</footer> </div> <script>
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

on 2013/12/26 20:34, Rodrigo Trujillo wrote:
On 12/26/2013 12:33 AM, Zhou Zheng Sheng wrote:
于 2013年12月25日 01:51, Rodrigo Trujillo 写道:
On 12/23/2013 12:57 AM, zhoumeina wrote:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 54 ++++++++++++++++++++++++----- ui/pages/i18n.html.tmpl | 7 ++-- ui/pages/storagepool-add.html.tmpl | 22 +++++++++++- 3 files changed, 68 insertions(+), 15 deletions(-)
diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index b31610a..cd8f1ae 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "ISCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,14 +60,22 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); }); @@ -85,6 +96,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +120,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -153,6 +184,9 @@ kimchi.addPool = function(event) { deviceObj[0] = formData.devices; formData.devices = deviceObj; } + } else if (poolType === 'iscsi'){ + formData.srcTarget = $('#iscsiserverId').val(); + formData.srcHost = $('#iscsiTargetId').val(); } else { formData.nfspath = $('#nfspathId').val(); formData.nfsserver = $('#nfsserverId').val(); diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 3ab9ae5..2898540 100644 --- a/ui/pages/storagepool-add.html.tmpl +++ b/ui/pages/storagepool-add.html.tmpl @@ -84,8 +84,7 @@ <p class="text-help">$_("The nfs exported path on nfs server")</p> <input id="nfspathId" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -104,6 +103,25 @@ <span class="text">$_("Create")</span> </button> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("ISCSI server")</h2> + <div class="field"> + <p class="text-help"> + $_("ISCSI server IP or hostname. It should not be empty.")</p> + <input id="iscsiserverId" type="text" class="text" + style="width: 300px"> + </div> + </section> + <section class="form-section"> + <h2>4. $_("Target")</h2> + <div class="field"> + <p class="text-help">$_("The ISCSI target on ISCSI server")</p> + <input id="iscsiTargetId" type="text" class="text" style="width: 300px"> + </div> + <div class="clear"></div> + </section> + </div> What about iSCSI servers that need authentication ? Will user provide the password through UI or some config file ?
kimchi transfers password in clear text, and it doesn't force https. I think it's not safe, so I didn't add a password in the back-end. I think there should be an overall solution for passwords (login, iSCSI CHAP, and other). For now, the back-end implementation does not support iSCSI authentication.
This question has been asked twice, maybe I can add password support in the new patch set, and just transfer the password in clear text.
Sorry for have asked this again and thanks for the answer :) Agree, transfer password in plan text is not good. I am not UI/WEB specialist, but maybe there is a way to send the password already encrypted or force an https connection when sending passwords ... well, I need to read more about this.
Thanks! Maybe my word is a bit misleading. By writing "This question has been asked twice", I actually mean "It's a sign that people want kimchi to support iSCSI CHAP authentication". I actually took your advice and wrote a new patch series, and added iSCSI authentication. I decided to transfer the password in clear text, and rely on HTTPs for security. Maybe someone will submit a patch to use only HTTPs by default. I'm sending my new patches, maybe you could have a look at the back-end implementation.
</footer> </div> <script>
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
-- Thanks and best regards! Zhou Zheng Sheng / 周征晟 E-mail: zhshzhou@linux.vnet.ibm.com Telephone: 86-10-82454397

On 12/23/2013 12:57 AM, zhoumeina wrote:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 54 ++++++++++++++++++++++++----- ui/pages/i18n.html.tmpl | 7 ++-- ui/pages/storagepool-add.html.tmpl | 22 +++++++++++- 3 files changed, 68 insertions(+), 15 deletions(-)
diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index b31610a..cd8f1ae 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "ISCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,14 +60,22 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); }); @@ -85,6 +96,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +120,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -153,6 +184,9 @@ kimchi.addPool = function(event) { deviceObj[0] = formData.devices; formData.devices = deviceObj; } + } else if (poolType === 'iscsi'){ + formData.srcTarget = $('#iscsiserverId').val(); + formData.srcHost = $('#iscsiTargetId').val(); } else { formData.nfspath = $('#nfspathId').val(); formData.nfsserver = $('#nfsserverId').val(); diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 3ab9ae5..2898540 100644 --- a/ui/pages/storagepool-add.html.tmpl +++ b/ui/pages/storagepool-add.html.tmpl @@ -84,8 +84,7 @@ <p class="text-help">$_("The nfs exported path on nfs server")</p> <input id="nfspathId" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -104,6 +103,25 @@ <span class="text">$_("Create")</span> </button> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("ISCSI server")</h2> + <div class="field"> + <p class="text-help"> + $_("ISCSI server IP or hostname. It should not be empty.")</p> + <input id="iscsiserverId" type="text" class="text" + style="width: 300px"> + </div> + </section> + <section class="form-section"> + <h2>4. $_("Target")</h2> + <div class="field"> + <p class="text-help">$_("The ISCSI target on ISCSI server")</p>
Meina, I think you didn't see Zhou Zheng Sheng's comments in time I think "iSCSI" is a better format for this word, and "iSCSI server" can be changed to "iSCSI host".
+ <input id="iscsiTargetId" type="text" class="text" style="width: 300px"> + </div> + <div class="clear"></div> + </section> + </div> </footer> </div> <script>

On 12/28/2013 03:02 AM, Aline Manera wrote:
On 12/23/2013 12:57 AM, zhoumeina wrote:
This patch is working for add iscsi type in storage pool create page. 1.Add iscsi server to create storage pool page. 2.Add iscsi target to create storage pool page.
Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 54 ++++++++++++++++++++++++----- ui/pages/i18n.html.tmpl | 7 ++-- ui/pages/storagepool-add.html.tmpl | 22 +++++++++++- 3 files changed, 68 insertions(+), 15 deletions(-)
diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index b31610a..cd8f1ae 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -35,6 +35,9 @@ kimchi.initStorageAddPage = function() { }, { label : "NFS", value : "netfs" + } ,{ + label : "ISCSI", + value : "iscsi" } ]; kimchi.listHostPartitions(function(data) { if (data.length > 0) { @@ -57,14 +60,22 @@ kimchi.initStorageAddPage = function() { $('.path-section').removeClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } else if ($(this).val() === 'netfs') { $('.path-section').addClass('tmpl-html'); $('.logical-section').addClass('tmpl-html'); $('.nfs-section').removeClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); + } else if ($(this).val() === 'iscsi') { + $('.path-section').addClass('tmpl-html'); + $('.logical-section').addClass('tmpl-html'); + $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').removeClass('tmpl-html'); } else { $('.path-section').addClass('tmpl-html'); $('.logical-section').removeClass('tmpl-html'); $('.nfs-section').addClass('tmpl-html'); + $('.iscsi-section').addClass('tmpl-html'); } }); }); @@ -85,6 +96,8 @@ kimchi.validateForm = function() { return kimchi.validateDirForm(); } else if (poolType === "netfs") { return kimchi.validateNfsForm(); + } else if (poolType === "iscsi") { + return kimchi.validateIscsiForm(); } else { return kimchi.validateLogicalForm(); } @@ -107,26 +120,44 @@ kimchi.validateDirForm = function () { kimchi.validateNfsForm = function () { var nfspath = $('#nfspathId').val(); var nfsserver = $('#nfsserverId').val(); - if ('' === nfsserver) { - kimchi.message.error(i18n['msg.pool.edit.nfsserver.blank']); + if (!kimchi.validateServer(nfsserver)) { return false; } - if ('' === nfspath) { kimchi.message.error(i18n['msg.pool.edit.nfspath.blank']); return false; } - var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" - var ip = "(\\d{1,3}\.){3}\\d{1,3}" - regex = new RegExp('^' + domain + '|' + ip + '$') + if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { + kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); + return false; + } + return true; +};
- if(!regex.test(nfsserver)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfsserver']); +kimchi.validateIscsiForm = function() { + var iscsiServer = $('#iscsiserverId').val(); + var iscsiTarget = $('#iscsiTargetId').val(); + if (!kimchi.validateServer(iscsiServer)) { return false; } + if ('' === iscsiTarget) { + kimchi.message.error(i18n['msg.pool.edit.iscsitarget.blank']); + return false; + } + return true; +};
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(nfspath)) { - kimchi.message.error(i18n['msg.validate.pool.edit.nfspath']); +kimchi.validateServer = function(serverField) { + if ('' === serverField) { + kimchi.message.error(i18n['msg.pool.edit.server.blank']); + return false; + } + var domain = "([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6}" + var ip = "(\\d{1,3}\.){3}\\d{1,3}" + regex = new RegExp('^' + domain + '|' + ip + '$') + + if (!regex.test(serverField)) { + kimchi.message.error(i18n['msg.validate.pool.edit.server']); return false; } return true; @@ -153,6 +184,9 @@ kimchi.addPool = function(event) { deviceObj[0] = formData.devices; formData.devices = deviceObj; } + } else if (poolType === 'iscsi'){ + formData.srcTarget = $('#iscsiserverId').val(); + formData.srcHost = $('#iscsiTargetId').val(); } else { formData.nfspath = $('#nfspathId').val(); formData.nfsserver = $('#nfsserverId').val(); diff --git a/ui/pages/i18n.html.tmpl b/ui/pages/i18n.html.tmpl index c1fc3d1..4a02e4d 100644 --- a/ui/pages/i18n.html.tmpl +++ b/ui/pages/i18n.html.tmpl @@ -94,11 +94,9 @@ var i18n = { 'msg.storagepool.confirm.delete':"$_("This will permanently delete the Storage Pool. Would you like to continue?")", 'msg.pool.edit.name.blank':"$_("The storage pool name can not be blank.")", 'msg.pool.edit.path.blank':"$_("The storage pool path can not be blank.")", - 'msg.pool.edit.nfsserver.blank':"$_("NFS server can not be blank.")", 'msg.pool.edit.nfspath.blank':"$_("NFS server mount path can not be blank.")", 'msg.validate.pool.edit.name':"$_("Invalid Storage Pool name. It may only contain letters, numbers, underscores, and hyphens.")", 'msg.validate.pool.edit.path':"$_("This is not a real linux path.")", - 'msg.validate.pool.edit.nfsserver':"$_("This is not a valid NFS server.")", 'msg.validate.pool.edit.nfspath':"$_("Invalid nfs mount path.")", 'msg.kimchi.storage.pool.empty':"$_("This storage pool is empty.")", 'msg.kimchi.list.volume.fail':"$_("Failed to list the storage pool.")", @@ -121,7 +119,10 @@ var i18n = { 'action_create': "$_("Create")", 'msg_warning': "$_("Warning")", 'msg.logicalpool.confirm.delete': "$_("It will format your disk and you will loose any data in" - " there, are you sure to continue? ")" + " there, are you sure to continue? ")", + 'msg.pool.edit.iscsitarget.blank': "$_("The iscsi target can not be blank.")", + 'msg.pool.edit.server.blank':"$_("Server name can not be blank.")", + 'msg.validate.pool.edit.server':"$_("This is not a valid Server Name or IP. please, modify it.")" }; </script> </body> diff --git a/ui/pages/storagepool-add.html.tmpl b/ui/pages/storagepool-add.html.tmpl index 3ab9ae5..2898540 100644 --- a/ui/pages/storagepool-add.html.tmpl +++ b/ui/pages/storagepool-add.html.tmpl @@ -84,8 +84,7 @@ <p class="text-help">$_("The nfs exported path on nfs server")</p> <input id="nfspathId" type="text" class="text" style="width: 300px"> - <input type="hidden" id="localpathId" class="text" - value="none"> + <input type="hidden" id="localpathId" class="text" value="none"> </div> <div class="clear"></div> </section> @@ -104,6 +103,25 @@ <span class="text">$_("Create")</span> </button> </div> + <div class="iscsi-section tmpl-html"> + <section class="form-section"> + <h2>3. $_("ISCSI server")</h2> + <div class="field"> + <p class="text-help"> + $_("ISCSI server IP or hostname. It should not be empty.")</p> + <input id="iscsiserverId" type="text" class="text" + style="width: 300px"> + </div> + </section> + <section class="form-section"> + <h2>4. $_("Target")</h2> + <div class="field"> + <p class="text-help">$_("The ISCSI target on ISCSI server")</p>
Meina, I think you didn't see Zhou Zheng Sheng's comments in time
I think "iSCSI" is a better format for this word, and "iSCSI server" can be changed to "iSCSI host". I have checked this message with zeng sheng, and we decide to user iSCSI server instead.
+ <input id="iscsiTargetId" type="text" class="text" style="width: 300px"> + </div> + <div class="clear"></div> + </section> + </div> </footer> </div> <script>

Add the Chinese and English translation po files of iscsi pool. Signed-off-by: zhoumeina <zhoumein@linux.vnet.ibm.com> --- po/en_US.po | 31 +++++++++++++++++++++++-------- po/kimchi.pot | 30 ++++++++++++++++++++++-------- po/pt_BR.po | 31 +++++++++++++++++++++++-------- po/zh_CN.po | 31 +++++++++++++++++++++++-------- 4 files changed, 91 insertions(+), 32 deletions(-) mode change 100644 => 100755 po/kimchi.pot diff --git a/po/en_US.po b/po/en_US.po index f2810db..23a88bd 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -6,14 +6,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2013-12-23 10:33+0800\n" "PO-Revision-Date: 2013-07-11 17:32-0400\n" "Last-Translator: Crístian Viana <vianac@linux.vnet.ibm.com>\n" "Language-Team: English\n" -"Language: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: en_US\n" "Generated-By: pygettext.py 1.5\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -335,9 +335,6 @@ msgstr "The storage pool name can not be blank." msgid "The storage pool path can not be blank." msgstr "The storage pool path can not be blank." -msgid "NFS server can not be blank." -msgstr "NFS server can not be blank." - msgid "NFS server mount path can not be blank." msgstr "NFS server mount path can not be blank." @@ -351,9 +348,6 @@ msgstr "" msgid "This is not a real linux path." msgstr "This is not a real linux path." -msgid "This is not a valid NFS server." -msgstr "This is not a valid NFS server." - msgid "Invalid nfs mount path." msgstr "Invalid nfs mount path." @@ -407,6 +401,15 @@ msgstr "" "It will format your disk and you will loose any data in there, are you sure " "to continue? " +msgid "The iscsi target can not be blank." +msgstr "The iscsi target can not be blank." + +msgid "Server name can not be blank." +msgstr "Server name can not be blank." + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "This is not a valid Server Name or IP. please, modify it." + msgid "Log out" msgstr "Log out" @@ -471,6 +474,18 @@ msgstr "The nfs exported path on nfs server" msgid "Device Path" msgstr "Device Path" +msgid "ISCSI server" +msgstr "ISCSI server" + +msgid "ISCSI server IP or hostname. It should not be empty." +msgstr "ISCSI server IP or hostname. It should not be empty." + +msgid "Target" +msgstr "Target" + +msgid "The ISCSI target on ISCSI server" +msgstr "The ISCSI target on ISCSI server" + msgid "CPU" msgstr "CPU" diff --git a/po/kimchi.pot b/po/kimchi.pot old mode 100644 new mode 100755 index 762f4e4..7346232 --- a/po/kimchi.pot +++ b/po/kimchi.pot @@ -8,11 +8,10 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2013-12-23 10:33+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" @@ -326,9 +325,6 @@ msgstr "" msgid "The storage pool path can not be blank." msgstr "" -msgid "NFS server can not be blank." -msgstr "" - msgid "NFS server mount path can not be blank." msgstr "" @@ -340,9 +336,6 @@ msgstr "" msgid "This is not a real linux path." msgstr "" -msgid "This is not a valid NFS server." -msgstr "" - msgid "Invalid nfs mount path." msgstr "" @@ -392,6 +385,15 @@ msgid "" "to continue? " msgstr "" +msgid "The iscsi target can not be blank." +msgstr "" + +msgid "Server name can not be blank." +msgstr "" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "" + msgid "Log out" msgstr "" @@ -451,6 +453,18 @@ msgstr "" msgid "Device Path" msgstr "" +msgid "ISCSI server" +msgstr "" + +msgid "ISCSI server IP or hostname. It should not be empty." +msgstr "" + +msgid "Target" +msgstr "" + +msgid "The ISCSI target on ISCSI server" +msgstr "" + msgid "CPU" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index 7d59503..44e2e2b 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,14 +20,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2013-12-23 10:33+0800\n" "PO-Revision-Date: 2013-06-27 10:48+0000\n" "Last-Translator: Alexandre Hirata <hirata@linux.vnet.ibm.com>\n" "Language-Team: Aline Manera <alinefm@br.ibm.com>\n" -"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: pt_BR\n" "Generated-By: pygettext.py 1.5\n" "X-Poedit-Country: Brazil\n" "X-Poedit-Language: Portuguese\n" @@ -352,9 +352,6 @@ msgstr "O nome do storage pool não pode ser em branco." msgid "The storage pool path can not be blank." msgstr "O caminho do storage pool não pde ser em branco." -msgid "NFS server can not be blank." -msgstr "Servidor de NFS não pode ficar em branco." - msgid "NFS server mount path can not be blank." msgstr "Caminho de montagem do servidor de NFS não pode ficar em branco." @@ -368,9 +365,6 @@ msgstr "" msgid "This is not a real linux path." msgstr "Esse não é um caminho real no linux." -msgid "This is not a valid NFS server." -msgstr "Isso não é um servidor de NFS válido." - msgid "Invalid nfs mount path." msgstr "Caminho de montagem NFS inválido." @@ -424,6 +418,15 @@ msgstr "" "Isso formatará seu disco e você perderá toda informação, você tem certeza " "que quer continuar?" +msgid "The iscsi target can not be blank." +msgstr "" + +msgid "Server name can not be blank." +msgstr "" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "" + msgid "Log out" msgstr "Sair" @@ -487,6 +490,18 @@ msgstr "O caminho exportado no servidor NFS" msgid "Device Path" msgstr "Caminho do dispositivo" +msgid "ISCSI server" +msgstr "" + +msgid "ISCSI server IP or hostname. It should not be empty." +msgstr "" + +msgid "Target" +msgstr "" + +msgid "The ISCSI target on ISCSI server" +msgstr "" + msgid "CPU" msgstr "CPU" diff --git a/po/zh_CN.po b/po/zh_CN.po index de759ef..49b4213 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -20,14 +20,14 @@ msgid "" msgstr "" "Project-Id-Version: kimchi 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-12-18 16:04-0200\n" +"POT-Creation-Date: 2013-12-23 10:33+0800\n" "PO-Revision-Date: 2013-06-27 10:48+0000\n" "Last-Translator: ShaoHe Feng <shaohef@linux.vnet.ibm.com>\n" "Language-Team: ShaoHe Feng <shaohef@linux.vnet.ibm.com>\n" -"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: zh_CN\n" "Generated-By: pygettext.py 1.5\n" "X-Poedit-Country: CHINA\n" "X-Poedit-Language: Chinese\n" @@ -342,9 +342,6 @@ msgstr "存储池的名字不能为空" msgid "The storage pool path can not be blank." msgstr "存储池的路径不能为空" -msgid "NFS server can not be blank." -msgstr "NFS服务器不能为空" - msgid "NFS server mount path can not be blank." msgstr "NFS服务器挂载路径不能为空" @@ -356,9 +353,6 @@ msgstr "无效的存储池名字,它应该只包括字母,数字,下划线 msgid "This is not a real linux path." msgstr "这不是一个符合要求的LINUX路径" -msgid "This is not a valid NFS server." -msgstr "这不是一个有效的NFS服务器" - msgid "Invalid nfs mount path." msgstr "无效的nfs挂载路径" @@ -408,6 +402,15 @@ msgid "" "to continue? " msgstr "你的磁盘将会格式化,磁盘上的数据会丢失,你确定要继续吗?" +msgid "The iscsi target can not be blank." +msgstr "ISCSI对象的路径不能为空" + +msgid "Server name can not be blank." +msgstr "服务器不能为空" + +msgid "This is not a valid Server Name or IP. please, modify it." +msgstr "这不是一个有效的服务器名或IP,请修改" + msgid "Log out" msgstr "登出" @@ -469,6 +472,18 @@ msgstr "nfs服务器上导出的路径" msgid "Device Path" msgstr "设备路径" +msgid "ISCSI server" +msgstr "ISCSI服务器" + +msgid "ISCSI server IP or hostname. It should not be empty." +msgstr "ISCSI服务器IP或者主机名, 不能为空。" + +msgid "Target" +msgstr "对象" + +msgid "The ISCSI target on ISCSI server" +msgstr "ISCSI服务器对象" + msgid "CPU" msgstr "处理器" -- 1.7.1
participants (4)
-
Aline Manera
-
Rodrigo Trujillo
-
Zhou Zheng Sheng
-
zhoumeina