[PATCH] [Wok] Remove support for TLS v1.0 and add SSL timeout
by Lucio Correia
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
src/nginx/wok.conf.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/nginx/wok.conf.in b/src/nginx/wok.conf.in
index 8dd5d7c..f56f5c0 100644
--- a/src/nginx/wok.conf.in
+++ b/src/nginx/wok.conf.in
@@ -62,10 +62,11 @@ http {
ssl_certificate ${cert_pem};
ssl_certificate_key ${cert_key};
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:@STRENGTH';
ssl_prefer_server_ciphers on;
ssl_dhparam ${dhparams_pem};
+ ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
add_header X-Frame-Options DENY;
--
1.9.1
8 years, 5 months
[PATCH] [Wok] Reduce from 5 to 2 seconds between notification requests
by Lucio Correia
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
ui/js/src/wok.main.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/wok.main.js b/ui/js/src/wok.main.js
index 2146b3d..55b8d0d 100644
--- a/ui/js/src/wok.main.js
+++ b/ui/js/src/wok.main.js
@@ -18,7 +18,7 @@
* limitations under the License.
*/
-wok.NOTIFICATION_INTERVAL = 5000
+wok.NOTIFICATION_INTERVAL = 2000
wok.postedNotifications = []
wok.tabMode = {};
--
1.9.1
8 years, 5 months
[PATCH] [Wok] Added lodash.js library to Wok
by sguimaraes943@gmail.com
From: Samuel Guimarães <sguimaraes943(a)gmail.com>
Lodash makes JavaScript easier by taking the hassle out of working with arrays, numbers, objects, strings, etc.
This library is necessary in order to redesign Ginger Sensor Monitors. With this library we can also improve other panels that have dynamically generated content that we have to iterate through arrays of objects.
If the patch doesn't apply because it is a minified library, please let me know.
Samuel Guimarães (1):
Added lodash.js library to Wok
configure.ac | 1 +
ui/libs/Makefile.am | 2 +-
ui/libs/lodash/LICENSE | 24 +++++++++
ui/libs/lodash/Makefile.am | 21 ++++++++
ui/libs/lodash/lodash.js | 127 +++++++++++++++++++++++++++++++++++++++++++++
ui/pages/login.html.tmpl | 1 +
ui/pages/wok-ui.html.tmpl | 1 +
7 files changed, 176 insertions(+), 1 deletion(-)
create mode 100644 ui/libs/lodash/LICENSE
create mode 100644 ui/libs/lodash/Makefile.am
create mode 100644 ui/libs/lodash/lodash.js
--
1.9.3
8 years, 5 months
[PATCH][Wok] Issue #116: Suggestion to check spec guidelines
by Ramon Medeiros
Run rpmlint on check-local
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
Makefile.am | 1 +
check_spec_errors.sh | 34 ++++++++++++++++++++++++++++++++++
docs/fedora-deps.md | 2 +-
docs/opensuse-deps.md | 2 +-
4 files changed, 37 insertions(+), 2 deletions(-)
create mode 100755 check_spec_errors.sh
diff --git a/Makefile.am b/Makefile.am
index 325d0c9..579f707 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -69,6 +69,7 @@ check-local:
echo "Check IBM license header and copyright date ..." ; \
/bin/bash check-IBM-license-header.sh ; \
fi
+ /bin/bash check_spec_errors.sh;
# Link built mo files in the source tree to enable use of translations from
# within the source tree
diff --git a/check_spec_errors.sh b/check_spec_errors.sh
new file mode 100755
index 0000000..fa67ced
--- /dev/null
+++ b/check_spec_errors.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2015-2016
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# create links
+cp contrib/wok.spec.fedora contrib/wok_fedora.spec
+cp contrib/wok.spec.suse contrib/wok_suse.spec
+
+# run checking
+rpmlint contrib/wok_fedora.spec
+rpmlint contrib/wok_suse.spec
+
+# remove links
+rm contrib/wok_fedora.spec
+rm contrib/wok_suse.spec
+
+
diff --git a/docs/fedora-deps.md b/docs/fedora-deps.md
index e665cdb..260390e 100644
--- a/docs/fedora-deps.md
+++ b/docs/fedora-deps.md
@@ -42,7 +42,7 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo yum install pyflakes python-pep8 python-requests
+ $ sudo yum install pyflakes python-pep8 python-requests rpmlint
# For RHEL systems, install the additional packages:
$ sudo yum install python-unittest2
diff --git a/docs/opensuse-deps.md b/docs/opensuse-deps.md
index 4fe3876..7fe1763 100644
--- a/docs/opensuse-deps.md
+++ b/docs/opensuse-deps.md
@@ -29,4 +29,4 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo zypper install python-pyflakes python-pep8 python-requests
+ $ sudo zypper install python-pyflakes python-pep8 python-requests rpmlint
--
2.5.5
8 years, 5 months
[PATCH v2][Wok] Improve UI error codes checking
by Ramon Medeiros
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
Changes:
v2:
Use "+" instead of "*". This expression only match WOKXXXXXX, and no more WOK,
what was causing trouble before
check_ui_code_errors.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/check_ui_code_errors.sh b/check_ui_code_errors.sh
index 4d9a8bd..6b7ea7e 100755
--- a/check_ui_code_errors.sh
+++ b/check_ui_code_errors.sh
@@ -20,7 +20,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
errors="$(cat ui/pages/i18n.json.tmpl | grep -o 'WOK[0-9A-Z]*'| sort)"
-uiErrors="$(grep -Ro 'WOK[0-9A-Z]*' ui/js/ | cut -d: -f2 | sort| uniq)"
+uiErrors="$(grep -ERo 'WOK[0-9A-Z]+' ui/js/ | cut -d: -f2 | sort| uniq)"
# all errors on i18n are present in js/html files: success
if [ "$errors" == "$uiErrors" ]; then
--
2.5.5
8 years, 5 months
[PATCH v2][Wok 0/2] Issue #118: logrotate fails
by Ramon Medeiros
Changes:
v2:
Add option to change log size on wok.conf
Ramon Medeiros (2):
Issue #118: logrotate fails
Allow wok.conf determine log file size
Makefile.am | 2 --
contrib/Makefile.am | 1 -
contrib/wok.spec.fedora.in | 1 -
contrib/wok.spec.suse.in | 1 -
contrib/wokd.logrotate.in | 9 ---------
src/wok.conf.in | 3 +++
src/wok/config.py.in | 1 +
src/wok/server.py | 20 ++++++++++++++------
8 files changed, 18 insertions(+), 20 deletions(-)
delete mode 100644 contrib/wokd.logrotate.in
--
2.5.5
8 years, 5 months
[PATCH][Kimchi] Issue #116: Suggestion to check spec guidelines
by Ramon Medeiros
Run rpmlint on check-local
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
Makefile.am | 1 +
check_spec_errors.sh | 34 ++++++++++++++++++++++++++++++++++
docs/fedora-deps.md | 2 +-
docs/opensuse-deps.md | 2 +-
4 files changed, 37 insertions(+), 2 deletions(-)
create mode 100755 check_spec_errors.sh
diff --git a/Makefile.am b/Makefile.am
index 1b46773..85a44bc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -83,6 +83,7 @@ check-local:
echo "IBM copyright year verification ..." ; \
/bin/bash ../../../../check-IBM-license-header.sh ; \
fi
+ ./check_spec_errors.sh
# Link built mo files in the source tree to enable use of translations from
# within the source tree
diff --git a/check_spec_errors.sh b/check_spec_errors.sh
new file mode 100755
index 0000000..b25da58
--- /dev/null
+++ b/check_spec_errors.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+#
+# Project Wok
+#
+# Copyright IBM Corp, 2015-2016
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# create links
+cp contrib/kimchi.spec.fedora contrib/kimchi_fedora.spec
+cp contrib/kimchi.spec.suse contrib/kimchi_suse.spec
+
+# run checking
+rpmlint contrib/kimchi_fedora.spec
+rpmlint contrib/kimchi_suse.spec
+
+# remove links
+rm contrib/kimchi_fedora.spec
+rm contrib/kimchi_suse.spec
+
+
diff --git a/docs/fedora-deps.md b/docs/fedora-deps.md
index ca24994..65ad987 100644
--- a/docs/fedora-deps.md
+++ b/docs/fedora-deps.md
@@ -47,7 +47,7 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo yum install pyflakes python-pep8 python-requests python-mock
+ $ sudo yum install pyflakes python-pep8 python-requests python-mock rpmlint
# For RHEL systems, install the additional packages:
$ sudo yum install python-unittest2
diff --git a/docs/opensuse-deps.md b/docs/opensuse-deps.md
index a8763b3..16ffb5e 100644
--- a/docs/opensuse-deps.md
+++ b/docs/opensuse-deps.md
@@ -45,4 +45,4 @@ Packages required for UI development
Packages required for tests
---------------------------
- $ sudo zypper install python-pyflakes python-pep8 python-requests python-mock
+ $ sudo zypper install python-pyflakes python-pep8 python-requests python-mock rpmlint
--
2.5.5
8 years, 5 months
[PATCH] [Wok] Refresh functionality to user activity log
by peterpnns@gmail.com
From: peterpennings <peterpnns(a)gmail.com>
This patch turns possible to refresh the list of user activity log.
peterpennings (1):
Refresh functionality to user activity log
ui/js/wok.user-log.js | 23 ++++++++---------------
ui/pages/tabs/settings.html.tmpl | 2 +-
2 files changed, 9 insertions(+), 16 deletions(-)
--
2.5.0
8 years, 5 months
[PATCH] [Kimchi] Fix storage volume clone test case
by Aline Manera
Commit c9ea5072b changed the target_uri of a cloning storage volume to
distinguish it from a storage volume creation by appeding '/clone' to
the end of the target_uri. But the test case was not properly updated.
So do that to avoid issues while running 'make check'.
Without this patch a test case is failing:
[alinefm@alinefm-TP440 tests]$ sudo ./run_tests.sh test_mock_storagevolume.MockStorageVolumeTests.test_storagevolume
***** Running unit test:
test_mock_storagevolume.MockStorageVolumeTests.test_storagevolume...
FAILED
======================================================================
FAIL: test_storagevolume
(test_mock_storagevolume.MockStorageVolumeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_mock_storagevolume.py", line 99, in test_storagevolume
_do_volume_test(self, model, host, ssl_port, pool_name)
File "test_model_storagevolume.py", line 141, in _do_volume_test
self.assertEquals(200, resp.status)
AssertionError: 200 != 404
----------------------------------------------------------------------
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
tests/test_model_storagevolume.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_model_storagevolume.py b/tests/test_model_storagevolume.py
index 56dda8f..35cb51d 100644
--- a/tests/test_model_storagevolume.py
+++ b/tests/test_model_storagevolume.py
@@ -126,7 +126,7 @@ def _do_volume_test(self, model, host, ssl_port, pool_name):
resp = self.request(vol_uri + '/clone', '{}', 'POST')
self.assertEquals(202, resp.status)
task = json.loads(resp.read())
- cloned_vol_name = task['target_uri'].split('/')[-1]
+ cloned_vol_name = task['target_uri'].split('/')[-2]
rollback.prependDefer(model.storagevolume_delete, pool_name,
cloned_vol_name)
wait_task(_task_lookup, task['id'])
--
2.5.5
8 years, 5 months
[PATCH][Kimchi] Change PPC memory slots to 256
by Rodrigo Trujillo
PowerPC architecture now supports up to 256 memory devices for memory
hotplug operations.
---
model/vms.py | 7 ++++---
osinfo.py | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/model/vms.py b/model/vms.py
index 58ff28d..795a251 100644
--- a/model/vms.py
+++ b/model/vms.py
@@ -58,7 +58,7 @@ from wok.plugins.kimchi.model.utils import get_ascii_nonascii_name, get_vm_name
from wok.plugins.kimchi.model.utils import get_metadata_node
from wok.plugins.kimchi.model.utils import remove_metadata_node
from wok.plugins.kimchi.model.utils import set_metadata_node
-from wok.plugins.kimchi.osinfo import defaults
+from wok.plugins.kimchi.osinfo import defaults, MEM_DEV_SLOTS
from wok.plugins.kimchi.screenshot import VMScreenshot
from wok.plugins.kimchi.utils import get_next_clone_name
from wok.plugins.kimchi.utils import template_name_from_uri
@@ -994,8 +994,9 @@ class VMModel(object):
{'param': "Memory",
'mem': str(new_mem),
'alignment': str(PPC_MEM_ALIGN)})
- # PPC suports only 32 memory slots
- if len(xpath_get_text(xml, './devices/memory')) == 32:
+ # Check number of slots supported
+ if len(xpath_get_text(xml, './devices/memory')) == \
+ MEM_DEV_SLOTS[os.uname()[4]]:
raise InvalidOperation('KCHVM0045E')
if memory == 0:
diff --git a/osinfo.py b/osinfo.py
index d3909ad..4b89aac 100644
--- a/osinfo.py
+++ b/osinfo.py
@@ -35,8 +35,8 @@ SUPPORTED_ARCHS = {'x86': ('i386', 'i686', 'x86_64'),
# Memory devices slot limits by architecture
-MEM_DEV_SLOTS = {'ppc64': 32,
- 'ppc64le': 32,
+MEM_DEV_SLOTS = {'ppc64': 256,
+ 'ppc64le': 256,
'x86_64': 256,
'i686': 256,
'i386': 256}
@@ -184,7 +184,7 @@ def _get_tmpl_defaults():
defaults['graphics'] = default_config.pop('graphics')
# Setting default memory device slots
- defaults['mem_dev_slots'] = MEM_DEV_SLOTS.get(os.uname()[4], 32)
+ defaults['mem_dev_slots'] = MEM_DEV_SLOTS.get(os.uname()[4], 256)
return defaults
--
2.1.0
8 years, 5 months