[Wok][RFC] Issue 104 Multi-culture support for formatting numbers and datetime
by Pooja Kulkarni
Hi Team,
In order to provide multi-culture support, we must format the numbers
and datetime data as per the user's locale. For example, when a french
user selects the UI language as English, he/she must still see the
numbers and datetime in french format.
The user's locale may be obtained in two ways:
1. Fetch the language setting of user's browser:
This approach involves fetching the language setting of user's browser
either by using 'accept-language' header that is sent to the server or
navigator.language
2. Have another drop down menu for user's locale:
This approach involves having two drop down menus, one for the
translation language and another for the locale. The locale drop down
menu can contain languages that may or may not be included in the
translation language drop down menu. By default, the language selected
in the translation drop down can be selected in the locale drop down as
well.
However, the first approach is not reliable and may vary from one
browser to another (some may not support navigator method). So I would
prefer the second approach.
Any thoughts or comments?
Regards
Pooja
8 years, 8 months
[PATCH v2] [Wok] Changes in wok.list.js widget to allow multiple selection
by sguimaraes943@gmail.com
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
This patch updates wok.list.js widget to allow multiple selection in Debug Reports and Repositories in Gingerbase.
Another patch was sent to Ginger Dev List covering the changes necessary.
This patch also includes changes in Wok SCSS and CSS aiming accessibility and responsive design.
v2 - Displays checkbox on all screen sizes and platforms. Fixed spinner icon position when generating a new log. No need to update patch sent to Gingerbase mailing list for now.
Samuel Guimarães (1):
Changes in wok.list.js widget to allow multiple selection
ui/css/bootstrap.custom.css | 8 +-
ui/css/src/modules/_buttons.scss | 8 ++
ui/css/src/modules/_wok-forms.scss | 1 +
ui/css/src/modules/_wok-grid.scss | 250 +++++++++++++++++++++++++++-----
ui/css/src/modules/_wok-variables.scss | 4 +-
ui/css/wok.css | 254 ++++++++++++++++++++++++++++-----
ui/js/src/wok.list.js | 174 +++++++++++-----------
7 files changed, 531 insertions(+), 168 deletions(-)
--
1.9.3
8 years, 8 months
[PATCH ][Wok]Issue # 317 : Ginger should NOT depeden on
by atreyee@linux.vnet.ibm.com
From: Atreyee Mukhopadhyay <atreyee(a)linux.vnet.ibm.com>
This change will make any plugin UI extended by another.
Gingers390x related changes will be imported dynamically to
ginger when ginger390x plugin is installed.
Atreyee Mukhopadhyay (1):
Issue # 317: Ginger should NOT depeden on Ginger s390x
src/wok/root.py | 8 ++++++++
src/wok/template.py | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
--
2.1.0
8 years, 8 months
[PATCH V6] [Kimchi 0/4] Issue #372: Add support to netboot installation.
by pvital@linux.vnet.ibm.com
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
V6:
* Make sure only valid information is stored in objectstore
* Modified VMTemplate constructor to receive one new argument: netboot=False
V5:
* Improved the changes in API for source_media
* Added two new test cases
* Updated UI to reflect the changes in template API
V4:
* Changed API of source_media to be a dictionary with type and path
* Adapted source code to the new API
V3:
* set network as third default option to boot order
V2:
* Adapted patch to new template API (automatic detection of cdrom)
V1:
This patchset adds support in backend to create templates and guests to netboot
without setting a cdrom path or URL as image to install. Once created a guest
to boot via network, the guest will request DHCP/TFTP/(NFS/HTTP/FTP) network
installation servers to download the configured images and start the install.
Reference: http://miud.in/1Ht3
To test, use the curl commands (look the parameters used):
$ curl -k -u test -H "Content-Type: application/json" -H \
"Accept: application/json" 'https://localhost:8001/plugins/kimchi/templates' \
-X POST -d '{"name": "test-netboot", "source_media": {"type": "netboot", "path": "/var/lib/libvirt/images/netboot"}}'
Enter host password for user 'test':
{
"cpu_info":{
"maxvcpus":1,
"vcpus":1
},
"graphics":{
"type":"vnc",
"listen":"127.0.0.1"
},
"cdrom":null,
"networks":[
"default"
],
"icon":"plugins/kimchi/images/icon-vm.png",
"os_distro":"unknown",
"name":"test-netboot",
"disks":[
{
"index":0,
"format":"qcow2",
"pool":{
"type":"dir",
"name":"/plugins/kimchi/storagepools/default"
},
"size":10
}
],
"invalid":{},
"os_version":"unknown",
"memory":{
"current":1024,
"maxmemory":1024
},
"folder":[]
}
$ curl -k -u test -H "Content-Type: application/json" -H \
"Accept: application/json" 'https://localhost:8001/plugins/kimchi/vms' -X POST \
-d '{"name":"1netboot-test","template":"/plugins/kimchi/templates/test-netboot"}'
Enter host password for user 'test':
{
"status":"running",
"message":"Provisioning storages for new VM",
"id":"1",
"target_uri":"/plugins/kimchi/vms/1netboot-test"
}
$ sudo virsh dumpxml 1netboot-test
<domain type='kvm'>
<name>1netboot-test</name>
<uuid>5c9fa5b3-3203-4c93-92d6-2b4103fe7b40</uuid>
<metadata>
<kimchi:metadata xmlns:kimchi="https://github.com/kimchi-project/kimchi">
<kimchi:os version="unknown" distro="unknown"/>
</kimchi:metadata>
</metadata>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<memtune>
<hard_limit unit='KiB'>2097152</hard_limit>
</memtune>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-2.4'>hvm</type>
<boot dev='hd'/>
<boot dev='cdrom'/>
<boot dev='network'/>
</os>
<acpi/>
<apic/>
<pae/>
</features>
<cpu>
<numa>
<cell id='0' cpus='0' memory='1048576' unit='KiB'/>
</numa>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/5c9fa5b3-3203-4c93-92d6-2b4103fe7b40-0.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='network'>
<mac address='52:54:00:ea:7e:ad'/>
<source network='default'/>
<model type='e1000'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='16384' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>
Paulo Vital (4):
Add support to create netboot templates.
Add support to create guests to netboot.
Update test cases to support netboot.
Update UI to reflect modifications in template API
API.json | 18 +++++--
model/templates.py | 16 +++++-
tests/test_authorization.py | 4 +-
tests/test_mockmodel.py | 15 ++++--
tests/test_model.py | 73 ++++++++++++++++++++-------
tests/test_rest.py | 95 ++++++++++++++++++++++++++++++-----
tests/test_template.py | 53 ++++++++++++++-----
tests/test_vmtemplate.py | 17 +++++++
ui/js/src/kimchi.template_add_main.js | 4 +-
vmtemplate.py | 39 ++++++++------
xmlutils/bootorder.py | 39 ++++++++++++++
11 files changed, 304 insertions(+), 69 deletions(-)
create mode 100644 xmlutils/bootorder.py
--
2.5.5
8 years, 8 months
[PATCH][Kimchi] Issue #931 Error when editing a template created using a disk image
by Ramon Medeiros
UI wasn't passing path to image disk when updating it, so the backend
was losing the disk.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.template_edit_main.js | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js
index de72452..8b5abfb 100644
--- a/ui/js/src/kimchi.template_edit_main.js
+++ b/ui/js/src/kimchi.template_edit_main.js
@@ -20,6 +20,7 @@ kimchi.template_edit_main = function() {
var origDisks;
var origNetworks;
var templateDiskSize;
+ var baseImageTemplate;
$('#template-name', templateEditMain).val(kimchi.selectedTemplate);
$('#edit-template-tabs a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
$('.tab-content').css('overflow','hidden');
@@ -89,6 +90,7 @@ kimchi.template_edit_main = function() {
}
return false;
}
+ baseImageTemplate = isImageBasedTemplate;
enableSpice();
$('#template-edit-graphics').selectpicker();
@@ -334,7 +336,9 @@ kimchi.template_edit_main = function() {
var data = {};
var disks = $('.template-tab-body .item', '#form-template-storage');
var disksForUpdate = new Array();
+
$.each(disks, function(index, diskEntity) {
+
var newDisk = {
'index' : index,
'pool' : {'name': '/plugins/kimchi/storagepools/' + $(diskEntity).find('.template-storage-name').val()},
@@ -342,6 +346,11 @@ kimchi.template_edit_main = function() {
'format' : $(diskEntity).find('.template-storage-disk-format').val()
};
+ // image based template: add base to dictionary
+ if ((baseImageTemplate()) && (index == 0)) {
+ newDisk["base"] = $('#template-edit-vmimage-textbox').val();
+ }
+
var storageType = $(diskEntity).find('.template-storage-type').val();
if(storageType === 'iscsi' || storageType === 'scsi') {
newDisk['volume'] = newDisk['pool']['name'].split('/').pop();
--
2.5.5
8 years, 8 months
[PATCH] [Kimchi] Do not use systemd private tmp dir
by Jose Ricardo Ziviani
- systemd improves daemon security by creating an isolated tmp
directory, however it breaks programs that are not yet
aware and, in Kimchi particular case, all directories created
under tmp are randomized, meaning that a possible attacker
cannot easily guess which file/dir will be created beforehand.
https://access.redhat.com/blogs/766093/posts/1976243
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
contrib/kimchid.service.fedora | 2 +-
contrib/kimchid.service.ubuntu | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/kimchid.service.fedora b/contrib/kimchid.service.fedora
index cd8e137..d7b10d2 100644
--- a/contrib/kimchid.service.fedora
+++ b/contrib/kimchid.service.fedora
@@ -4,4 +4,4 @@ After=libvirtd.service wokd.service
[Service]
Nice=0
-PrivateTmp=yes
+PrivateTmp=no
diff --git a/contrib/kimchid.service.ubuntu b/contrib/kimchid.service.ubuntu
index 1c7d63f..f865987 100644
--- a/contrib/kimchid.service.ubuntu
+++ b/contrib/kimchid.service.ubuntu
@@ -4,4 +4,4 @@ After=libvirt-bin.service wokd.service
[Service]
Nice=0
-PrivateTmp=yes
+PrivateTmp=no
--
2.7.4
8 years, 8 months
[PATCH] [Kimchi] Make libguestfs uses direct backend instead of libvirt
by Jose Ricardo Ziviani
- there is an issue regarding libvirt socket permissions that make
libguestfs fails when trying to access an image. If libguestfs
access the same image directly, instead of using libvirt, it
works. http://libguestfs.org/guestfs-faq.1.html
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
imageinfo.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/imageinfo.py b/imageinfo.py
index 8874917..5a25bb7 100644
--- a/imageinfo.py
+++ b/imageinfo.py
@@ -50,6 +50,7 @@ def probe_image(image_path):
g = guestfs.GuestFS(python_return_dict=True)
g.add_drive_opts(image_path, readonly=1)
+ g.set_backend('direct')
g.launch()
try:
roots = g.inspect_os()
--
2.7.4
8 years, 8 months
[PATCH] [Wok] Changes in wok.list.js widget to allow multiple selection
by sguimaraes943@gmail.com
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
This patch updates wok.list.js widget to allow multiple selection in Debug Reports and Repositories in Gingerbase.
Another patch was sent to Ginger Dev List covering the changes necessary.
This patch also includes changes in Wok SCSS and CSS aiming accessibility and responsive design.
Samuel Guimarães (1):
Changes in wok.list.js widget to allow multiple selection
ui/css/bootstrap.custom.css | 8 +-
ui/css/src/modules/_buttons.scss | 8 +
ui/css/src/modules/_wok-forms.scss | 1 +
ui/css/src/modules/_wok-grid.scss | 254 +++++++++++++++++++++++++++-----
ui/css/src/modules/_wok-variables.scss | 4 +-
ui/css/wok.css | 257 ++++++++++++++++++++++++++++-----
ui/js/src/wok.list.js | 174 +++++++++++-----------
7 files changed, 538 insertions(+), 168 deletions(-)
--
1.9.3
8 years, 8 months
[PATCH V5] [Kimchi 0/4] Issue #372: Add support to netboot installation.
by pvital@linux.vnet.ibm.com
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
V5:
* Improved the changes in API for source_media
* Added two new test cases
* Updated UI to reflect the changes in template API
V4:
* Changed API of source_media to be a dictionary with type and path
* Adapted source code to the new API
V3:
* set network as third default option to boot order
V2:
* Adapted patch to new template API (automatic detection of cdrom)
V1:
This patchset adds support in backend to create templates and guests to netboot
without setting a cdrom path or URL as image to install. Once created a guest
to boot via network, the guest will request DHCP/TFTP/(NFS/HTTP/FTP) network
installation servers to download the configured images and start the install.
Reference: http://miud.in/1Ht3
To test, use the curl commands (look the parameters used):
$ curl -k -u test -H "Content-Type: application/json" -H \
"Accept: application/json" 'https://localhost:8001/plugins/kimchi/templates' \
-X POST -d '{"name": "test-netboot", "source_media": {"type": "netboot", "path": "/var/lib/libvirt/images/netboot"}}'
Enter host password for user 'test':
{
"cpu_info":{
"maxvcpus":1,
"vcpus":1
},
"graphics":{
"type":"vnc",
"listen":"127.0.0.1"
},
"cdrom":null,
"networks":[
"default"
],
"icon":"plugins/kimchi/images/icon-vm.png",
"os_distro":"unknown",
"name":"test-netboot",
"disks":[
{
"index":0,
"format":"qcow2",
"pool":{
"type":"dir",
"name":"/plugins/kimchi/storagepools/default"
},
"size":10
}
],
"invalid":{},
"os_version":"unknown",
"memory":{
"current":1024,
"maxmemory":1024
},
"folder":[]
}
$ curl -k -u test -H "Content-Type: application/json" -H \
"Accept: application/json" 'https://localhost:8001/plugins/kimchi/vms' -X POST \
-d '{"name":"1netboot-test","template":"/plugins/kimchi/templates/test-netboot"}'
Enter host password for user 'test':
{
"status":"running",
"message":"Provisioning storages for new VM",
"id":"1",
"target_uri":"/plugins/kimchi/vms/1netboot-test"
}
$ sudo virsh dumpxml 1netboot-test
<domain type='kvm'>
<name>1netboot-test</name>
<uuid>5c9fa5b3-3203-4c93-92d6-2b4103fe7b40</uuid>
<metadata>
<kimchi:metadata xmlns:kimchi="https://github.com/kimchi-project/kimchi">
<kimchi:os version="unknown" distro="unknown"/>
</kimchi:metadata>
</metadata>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<memtune>
<hard_limit unit='KiB'>2097152</hard_limit>
</memtune>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-2.4'>hvm</type>
<boot dev='hd'/>
<boot dev='cdrom'/>
<boot dev='network'/>
</os>
<acpi/>
<apic/>
<pae/>
</features>
<cpu>
<numa>
<cell id='0' cpus='0' memory='1048576' unit='KiB'/>
</numa>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/5c9fa5b3-3203-4c93-92d6-2b4103fe7b40-0.img'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='network'>
<mac address='52:54:00:ea:7e:ad'/>
<source network='default'/>
<model type='e1000'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='16384' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>
Paulo Vital (4):
Add support to create netboot templates.
Add support to create guests to netboot.
Update test cases to support netboot.
Update UI to reflect modifications in template API
API.json | 18 +++++--
model/templates.py | 14 +++++-
tests/test_authorization.py | 4 +-
tests/test_mockmodel.py | 15 ++++--
tests/test_model.py | 73 ++++++++++++++++++++-------
tests/test_rest.py | 95 ++++++++++++++++++++++++++++++-----
tests/test_template.py | 53 ++++++++++++++-----
tests/test_vmtemplate.py | 18 +++++++
ui/js/src/kimchi.template_add_main.js | 4 +-
vmtemplate.py | 28 +++++++----
xmlutils/bootorder.py | 39 ++++++++++++++
11 files changed, 298 insertions(+), 63 deletions(-)
create mode 100644 xmlutils/bootorder.py
--
2.5.5
8 years, 8 months
[PATCH] [Kimchi 0/2] Add VEPA network tests
by Lucio Correia
Lucio Correia (2):
Update mockmodel to have one more NIC available
Add VEPA network tests
mockmodel.py | 41 ++++++++++++++++++++++++++++++++++++++++-
tests/test_mock_network.py | 13 +++++++++++++
tests/test_model_network.py | 2 ++
3 files changed, 55 insertions(+), 1 deletion(-)
--
1.9.1
8 years, 8 months