[PATCH ][Wok]Issue # 28 : Tab order in Host is not consistent
by atreyee@linux.vnet.ibm.com
From: Atreyee Mukhopadhyay <atreyee(a)linux.vnet.ibm.com>
Second level tabs in Host functionality are sorted using a unique
number assigned to align them in desired order irrespective of
the plugin installed
Unique numbers are assigned to tabs in gingerbase and ginger plugin
Atreyee Mukhopadhyay (1):
Issue # 28 : Tab order in Host is not consistent
ui/js/src/wok.main.js | 822 +++++++++++++++++++++++++-------------------------
1 file changed, 416 insertions(+), 406 deletions(-)
--
2.1.0
8 years, 10 months
[RFC] [Wok] Display new Wok Logos
by Samuel Henrique De Oliveira Guimaraes
Hi team,
I've done some tests with the new logos and I'm attaching the mockups with a footer in three sizes, normal, smaller and smallest. I'm also attaching what the About window would look like if the user has all plugins installed.
In my opinion if we are really going forward with a gray footer, then we could show the logos in white or light gray instead of colors. We would also have to shrink the footer a little more because in the smallest variation it has 60px.
Regards,
Samuel
8 years, 10 months
[PATCH][Kimchi 0/3] Support to edit max memory
by Rodrigo Trujillo
This patchset implements the support in backend to allow user to
change maxMemory xml tag.
It also changes the memory API from 'memory: XXX' to
'memory': {'current': XXX, 'maxmemory': YYY}
maxMemory xml tag is not created by default anymore, when a guest is
created. Tag will be created only when the user changes maxmemory
manually, and if the value is different (higher) of 'current' memory.
So in order to performe memory hotplug, an user has to stop guest,
modify maxmemory and then start the guest.
Tests were fixed and new ones were included.
Rodrigo Trujillo (3):
Add support to edit max memory in Templates
Add support to edit max memory in Guest
Changes and add tests to support new memory API (templates/guest)
API.json | 66 +++++++++---
docs/API.md | 29 ++++--
i18n.py | 11 +-
model/templates.py | 58 ++++++++++-
model/vms.py | 245 ++++++++++++++++++++++++++------------------
osinfo.py | 16 ++-
template.conf | 10 +-
tests/test_livemigration.py | 6 +-
tests/test_model.py | 22 ++--
tests/test_rest.py | 23 ++++-
tests/test_template.py | 38 +++++--
tests/test_vmtemplate.py | 26 +++--
vmtemplate.py | 74 ++++++-------
13 files changed, 411 insertions(+), 213 deletions(-)
--
2.1.0
8 years, 10 months
[RFC] [Wok] Feature: User Activity Log
by Lucio Correia
User Activity Log functionality
-------------------------------
Host admin wants to have access to all actions performed by Wok users,
either through API, web user interface, with the option to download User
Acitivity Log in a text file.
REST API
--------
Only one API will be exposed:
- GET /logs - Collection of log entries for all installed plugins.
Examples of filtering:
/logs?plugin=kimchi - All log entries for Kimchi plugin
/logs?user=admin - All log entries from admin user
/logs?request=PUT - All log entries relative to PUT requests
/logs?date=20160110 - All Jan 10th's log entries
Backend design
--------------
- Define activity texts for each currently implemented activity of all
plugins
- Implement method to retrieve the activity texts in Wok and all plugins
- Log events to a JSON file in the host file system. Each user request
received by Wok will generate an entry in the respective log file.
Fields to be saved for each entry: plugin, datetime, user, request type
(PUT, POST, GET, DELETE), activity text (i.e. "create guest 'vm-sample'")
- Implement code for retrieving and filtering log events by the fields above
Web User interface design
-------------------------
Create a new tab: "User Activity" - available only to Wok admins
- Search fields to filter log events by installed plugin, date, user,
and/or request type
- Show search results in a table containing plugin, datetime, user,
request type, activity text
- User may sort the table by plugin, datetime, user or request type
- Button for downloading current search results as a txt file
--
Lucio Correia
Software Engineer
IBM LTC Brazil
8 years, 10 months
[PATCH ][Gingerbase] Changes for gingerbase to fix the Issue# 28 in Wok.
by atreyee@linux.vnet.ibm.com
From: Atreyee Mukhopadhyay <atreyee(a)linux.vnet.ibm.com>
Unique numbers are assigned to tabs details in gingerbase
to fix the tab ordering issue in Host functionality.
---
ui/config/tab-ext.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ui/config/tab-ext.xml b/ui/config/tab-ext.xml
index 69dcca0..dcea62d 100644
--- a/ui/config/tab-ext.xml
+++ b/ui/config/tab-ext.xml
@@ -5,12 +5,14 @@
<access role="admin" mode="admin"/>
<access role="user" mode="read-only"/>
<title>Dashboard</title>
+ <order>0</order>
<path>plugins/gingerbase/tabs/host-dashboard.html</path>
</tab>
<tab>
<access role="admin" mode="admin"/>
<access role="user" mode="none"/>
<title>Updates</title>
+ <order>20</order>
<path>plugins/gingerbase/tabs/host-update.html</path>
</tab>
</tabs-ext>
--
2.1.0
8 years, 10 months
[PATCH v4] [Kimchi 0/8] Network API change + VEPA network support
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
v4:
- added one interface only restriction to macvtap and bridge
networks
v3:
- Lucio suggestions made: docs/API.md and 'bridge' connection
in test_template.py
v2:
- changes on the existing network backend
This patch set implements two major changes in the network
backend and API of Kimchi:
- first 4 patches: changed the API to allow networks to be created
with more than one interface
Changing 'interface' to 'interfaces' in the network backend
to allow more than one interface to be added to a network. Existing
networks that use only one interface were adapted to use
interfaces[0] instead. UI changes were made to comply with this
change.
- last 4 patches: second version of the VEPA network patch set.
VEPA networks are somewhat similar to macvtap networks that tunnels
traffic between VMs by using an external VEPA-enabled switch that will
process and forward the frames faster than the host
CPU/OS can do.
The UI support is similar to what we already have for the macvtap
network. ATM the UI doesn't support multiple physical devices being
assigned to a single VEPA network but the backend does. This can
be enhanced in the future with an UI patch. The idea was to have
some UI support to get the feature alive ASAP.
To create a VEPA network the process is similar to the bridge
network, allowing more interfaces to be declared in the new
'interfaces' parameter of the networks backend.
This is the XML created when adding a VEPA network using
one interface:
<network>
<name>vepa_net</name>
<uuid>d6a3c86b-0592-4ccf-abf0-0abb353870b3</uuid>
<forward dev='enp0s25' mode='vepa'>
<interface dev='enp0s25'/>
</forward>
</network>
This is how a VM can declare a interface that belongs to this network:
<interface type='network'>
<mac address='52:54:00:9c:be:bd'/>
<source network='vepa_net'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
This is how the XML looks like when turning on the VM. Libvirt
will take care of the creation of the VEPA tunnel by using the
assigned physical interface in the network. If more interfaces
were added to the network, libvirt will do a load balance
between them and the VMs:
<interface type='direct'>
<mac address='52:54:00:9c:be:bd'/>
<source network='vepa_net' dev='enp0s25' mode='vepa'/>
<target dev='macvtap0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
Daniel Henrique Barboza (8):
Changing network API 'interface' to array: docs and API
Changing network API: control and model changes
Changing network API: unit test changes
Changing network API: UI changes
VEPA network support: API and i18n changes
VEPA network support - models and xmlutils changes
VEPA network support: additional backend unit tests
VEPA network support: UI changes
API.json | 8 ++---
control/networks.py | 4 +--
docs/API.md | 14 ++++----
i18n.py | 8 +++--
model/networks.py | 65 ++++++++++++++++++++++++------------
tests/test_mock_network.py | 11 ++----
tests/test_model_network.py | 38 ++++++++++++++++++---
tests/test_networkxml.py | 44 +++++++++++++++++++++++-
tests/test_template.py | 12 ++++---
ui/js/src/kimchi.network.js | 5 +--
ui/js/src/kimchi.network_add_main.js | 12 +++----
ui/pages/network-add.html.tmpl | 5 +--
xmlutils/network.py | 10 +++++-
13 files changed, 169 insertions(+), 67 deletions(-)
--
2.5.0
8 years, 10 months
[PATCH v3] [Kimchi 0/8] Network API change + VEPA network support
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
v3:
- Lucio suggestions made: docs/API.md and 'bridge' connection
in test_template.py
v2:
- changes on the existing network backend
This patch set implements two major changes in the network
backend and API of Kimchi:
- first 4 patches: changed the API to allow networks to be created
with more than one interface
Changing 'interface' to 'interfaces' in the network backend
to allow more than one interface to be added to a network. Existing
networks that use only one interface were adapted to use
interfaces[0] instead. UI changes were made to comply with this
change.
- last 4 patches: second version of the VEPA network patch set.
VEPA networks are somewhat similar to macvtap networks that tunnels
traffic between VMs by using an external VEPA-enabled switch that will
process and forward the frames faster than the host
CPU/OS can do.
The UI support is similar to what we already have for the macvtap
network. ATM the UI doesn't support multiple physical devices being
assigned to a single VEPA network but the backend does. This can
be enhanced in the future with an UI patch. The idea was to have
some UI support to get the feature alive ASAP.
To create a VEPA network the process is similar to the bridge
network, allowing more interfaces to be declared in the new
'interfaces' parameter of the networks backend.
This is the XML created when adding a VEPA network using
one interface:
<network>
<name>vepa_net</name>
<uuid>d6a3c86b-0592-4ccf-abf0-0abb353870b3</uuid>
<forward dev='enp0s25' mode='vepa'>
<interface dev='enp0s25'/>
</forward>
</network>
This is how a VM can declare a interface that belongs to this network:
<interface type='network'>
<mac address='52:54:00:9c:be:bd'/>
<source network='vepa_net'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
This is how the XML looks like when turning on the VM. Libvirt
will take care of the creation of the VEPA tunnel by using the
assigned physical interface in the network. If more interfaces
were added to the network, libvirt will do a load balance
between them and the VMs:
<interface type='direct'>
<mac address='52:54:00:9c:be:bd'/>
<source network='vepa_net' dev='enp0s25' mode='vepa'/>
<target dev='macvtap0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
Daniel Henrique Barboza (8):
Changing network API 'interface' to array: docs and API
Changing network API: control and model changes
Changing network API: unit test changes
Changing network API: UI changes
VEPA network support: API and i18n changes
VEPA network support - models and xmlutils changes
VEPA network support: additional backend unit tests
VEPA network support: UI changes
API.json | 8 ++---
control/networks.py | 4 +--
docs/API.md | 14 +++++----
i18n.py | 7 +++--
model/networks.py | 61 +++++++++++++++++++++++-------------
tests/test_mock_network.py | 11 ++-----
tests/test_model_network.py | 13 +++++---
tests/test_networkxml.py | 44 +++++++++++++++++++++++++-
tests/test_template.py | 12 ++++---
ui/js/src/kimchi.network.js | 5 +--
ui/js/src/kimchi.network_add_main.js | 12 +++----
ui/pages/network-add.html.tmpl | 5 +--
xmlutils/network.py | 10 +++++-
13 files changed, 139 insertions(+), 67 deletions(-)
--
2.5.0
8 years, 10 months
[PATCH] [Kimchi] Bugfix 804: Disable connect vnc when VM is powered off
by Jose Ricardo Ziviani
- When a VM is powered off, the option to connect to its vnc should not
be displayed under the actions menu otherwise users will get errors.
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_main.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index bfd62a8..83ee3f0 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -652,7 +652,8 @@ kimchi.createGuestLi = function(vmObject, prevScreenImage, openMenu) {
var consoleActions = guestActions.find("[name=vm-console]");
var consoleLinkActions = result.find(".vnc-link");
- if ((vmObject.graphics['type'] == 'vnc') || (vmObject.graphics['type'] == 'spice')) {
+ if (((vmObject.graphics['type'] == 'vnc') || (vmObject.graphics['type'] == 'spice'))
+ && (!vmPoweredOffBool)) {
consoleActions.on("click", function(event) {
event.preventDefault();
kimchi.openVmConsole(event);
--
1.9.1
8 years, 10 months
[PATCH] [Kimchi] Bugfix 843: Add sourceURL comment for kimchi.min.js
by Jose Ricardo Ziviani
- browser javascript debuggers cannot inspect dynamic loaded javascript
because such scripts have no name (they are created with eval). The
comment //# sourceURL=name is a way to solve it.
- https://developer.chrome.com/devtools/docs/javascript-debugging
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
ui/js/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/js/Makefile.am b/ui/js/Makefile.am
index c9d1218..c24feeb 100644
--- a/ui/js/Makefile.am
+++ b/ui/js/Makefile.am
@@ -23,5 +23,6 @@ dist_js_DATA = kimchi.min.js $(filter-out kimchi.min.js, $(wildcard *.js))
kimchi.min.js: src/*.js
cat $(sort $^) > $@
+ echo "//# sourceURL=kimchi.min.js" >> $@
CLEANFILES = kimchi.min.js
--
1.9.1
8 years, 10 months
[PATCH] [Wok] Allow user disables HTTP port
by Aline Manera
This patch adds a new option to wok.conf file - https_only - to allow
user disable HTTP port.
The default value for https_only option is false, which means HTTP and HTTPS
are allowed.
When set to true, all the connections will be done through HTTPS.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
src/nginx/wok.conf.in | 7 +------
src/wok.conf.in | 6 +++++-
src/wok/config.py.in | 1 +
src/wok/proxy.py | 16 +++++++++++++++-
src/wokd.in | 4 ++++
tests/utils.py | 10 +++++-----
6 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/src/nginx/wok.conf.in b/src/nginx/wok.conf.in
index 501377e..8dd5d7c 100644
--- a/src/nginx/wok.conf.in
+++ b/src/nginx/wok.conf.in
@@ -32,7 +32,6 @@ events {
}
http {
-
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
@@ -88,9 +87,5 @@ http {
proxy_set_header Connection $connection_upgrade;
}
}
-
- server {
- listen ${host_addr}:${proxy_port};
- rewrite ^/(.*)$ https://$host:${proxy_ssl_port}/$1 redirect;
- }
+ ${http_config}
}
diff --git a/src/wok.conf.in b/src/wok.conf.in
index 7d479d3..77a79b6 100644
--- a/src/wok.conf.in
+++ b/src/wok.conf.in
@@ -9,9 +9,13 @@
# Port to listen on
#port = 8000
-# If present, start an SSL-enabled server on the given port
+# Start an SSL-enabled server on the given port
#ssl_port = 8001
+# Allow user disables HTTP port. In that case, all the connections
+# will be done directly through HTTPS port (values: true|false)
+#https_only = false
+
# Cherrypy server port
#cherrypy_port = 8010
diff --git a/src/wok/config.py.in b/src/wok/config.py.in
index 5d32ba4..40fbcda 100644
--- a/src/wok/config.py.in
+++ b/src/wok/config.py.in
@@ -232,6 +232,7 @@ def _get_config():
config.set("server", "host", "0.0.0.0")
config.set("server", "port", "8000")
config.set("server", "ssl_port", "8001")
+ config.set("server", "https_only", "false")
config.set("server", "cherrypy_port", "8010")
config.set("server", "websockets_port", "64667")
config.set("server", "ssl_cert", "")
diff --git a/src/wok/proxy.py b/src/wok/proxy.py
index c7bc665..9d39dbd 100644
--- a/src/wok/proxy.py
+++ b/src/wok/proxy.py
@@ -33,6 +33,14 @@ from wok import sslcert
from wok.config import paths
+HTTP_CONFIG = """
+server {
+ listen %(host_addr)s:%(proxy_port)s;
+ rewrite ^/(.*)$ https://$host:%(proxy_ssl_port)s/$1 redirect;
+}
+"""
+
+
def _create_proxy_config(options):
"""Create nginx configuration file based on current ports config
@@ -75,6 +83,12 @@ def _create_proxy_config(options):
# Setting up Diffie-Hellman group with 2048-bit file
dhparams_pem = os.path.join(config_dir, "dhparams.pem")
+ http_config = ''
+ if options.https_only == 'false':
+ http_config = HTTP_CONFIG % {'host_addr': options.host,
+ 'proxy_port': options.port,
+ 'proxy_ssl_port': options.ssl_port}
+
# Read template file and create a new config file
# with the specified parameters.
with open(os.path.join(nginx_config_dir, "wok.conf.in")) as template:
@@ -82,8 +96,8 @@ def _create_proxy_config(options):
data = Template(data)
data = data.safe_substitute(user=user_proxy,
host_addr=options.host,
- proxy_port=options.port,
proxy_ssl_port=options.ssl_port,
+ http_config=http_config,
cherrypy_port=options.cherrypy_port,
websockets_port=options.websockets_port,
cert_pem=cert, cert_key=key,
diff --git a/src/wokd.in b/src/wokd.in
index 59a81f8..7255d3c 100644
--- a/src/wokd.in
+++ b/src/wokd.in
@@ -46,6 +46,7 @@ def main(options):
host = config.config.get("server", "host")
port = config.config.get("server", "port")
ssl_port = config.config.get("server", "ssl_port")
+ https_only = config.config.get("server", "https_only")
cherrypy_port = config.config.get("server", "cherrypy_port")
websockets_port = config.config.get("server", "websockets_port")
runningEnv = config.config.get("server", "environment")
@@ -59,6 +60,9 @@ def main(options):
help="Port to listen on (default %s)" % port)
parser.add_option('--ssl-port', type="int", default=ssl_port,
help="Port to enable SSL (default %s)" % ssl_port)
+ parser.add_option('--https_only', type="choice", default=https_only,
+ choices=['false', 'true'],
+ help="Disable HTTP port (default %s)" % ssl_port)
parser.add_option('--cherrypy_port', type="int", default=cherrypy_port,
help="Cherrypy server port (default %s)" % cherrypy_port)
parser.add_option('--websockets_port', type="int", default=websockets_port,
diff --git a/tests/utils.py b/tests/utils.py
index bb9efb0..d158ba1 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -115,11 +115,11 @@ def run_server(host, port, ssl_port, test_mode, cherrypy_port=None,
args = type('_', (object,),
{'host': host, 'port': port, 'ssl_port': ssl_port,
- 'cherrypy_port': cherrypy_port, 'max_body_size': '4*1024',
- 'websockets_port': 64667, 'ssl_cert': '',
- 'ssl_key': '', 'test': test_mode, 'access_log': '/dev/null',
- 'error_log': '/dev/null', 'environment': environment,
- 'log_level': 'debug'})()
+ 'https_only': 'false', 'cherrypy_port': cherrypy_port,
+ 'websockets_port': 64667, 'ssl_cert': '', 'ssl_key': '',
+ 'max_body_size': '4*1024', 'test': test_mode,
+ 'access_log': '/dev/null', 'error_log': '/dev/null',
+ 'environment': environment, 'log_level': 'debug'})()
if model is not None:
setattr(args, 'model', model)
--
2.5.0
8 years, 10 months