[PATCH V3] Issue #737: Wok base framework calls resource model's lookup twice
by archus@linux.vnet.ibm.com
From: Archana Singh <archus(a)linux.vnet.ibm.com>
In case of GET lookup was called twice.
Once before is_authorized() and then in self.get().
This added overhead to system when lookup() is called
for each value in list from get_list() of Collection.
So to avoid this, removed lookup() call from get().
Also updated code to call self.lookup() before self.get()
in resource's update() and collection's create().
Archana Singh (1):
Issue #737: Wok base framework calls resource model's lookup twice
src/wok/control/base.py | 5 ++---
src/wok/plugins/kimchi/control/storagepools.py | 1 +
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.1.4
9 years, 1 month
[PATCH V2] #748 Sosreport generation.
by mesmriti@linux.vnet.ibm.com
From: Megha Smriti <mesmriti(a)linux.vnet.ibm.com>
The reveiw comments have been taken care of and
changes were made to keep a separate sosreport method
and the path where the sosreport will be generated will be
specified in the sosreport command.
Ex:
path_sosreport = '/var/tmp/'
command = ['sosreport', '--batch', '--name=%s' % name,
'--tmp-dir=%s' % path_sosreport]
Megha Smriti (1):
model/debugreports.py
Rodrigo Trujillo (1):
Allow listStorageVolumes ajax call be synchronized
src/wok/plugins/gingerbase/model/debugreports.py | 103 ++++++++++++---------
src/wok/plugins/kimchi/ui/js/src/kimchi.api.js | 7 +-
.../ui/js/src/kimchi.guest_storage_add.main.js | 2 +-
.../kimchi/ui/js/src/kimchi.storage_main.js | 2 +-
4 files changed, 67 insertions(+), 47 deletions(-)
--
2.4.3
9 years, 1 month
[PATCH v3] Create logical pool from existing VG
by Aline Manera
V2 - V3:
- Address Rodrigo's comments
Aline Manera (1):
Create logical pool from existing VG
src/wok/plugins/kimchi/API.json | 5 +
src/wok/plugins/kimchi/control/host.py | 22 ++++
src/wok/plugins/kimchi/disks.py | 123 +++++++++++++++++++++
src/wok/plugins/kimchi/docs/API.md | 25 ++++-
src/wok/plugins/kimchi/i18n.py | 5 +
src/wok/plugins/kimchi/mockmodel.py | 27 +++++
src/wok/plugins/kimchi/model/host.py | 27 +++++
src/wok/plugins/kimchi/model/libvirtstoragepool.py | 9 +-
src/wok/plugins/kimchi/model/storagepools.py | 30 +++--
.../plugins/kimchi/tests/test_mock_storagepool.py | 8 +-
10 files changed, 264 insertions(+), 17 deletions(-)
--
2.5.0
9 years, 1 month
[PATCH] Gingerbase: adapting unit tests to use WoK /tests/utils.py
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
As a follow up of the recent changes in the WoK /tests/utils.py
module in Kimchi, the same procedure is now being done in
Gingerbase:
- unit tests now points to tests.utils
- Gingerbase tests/utils.py module was deleted
Signed-off-by: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
---
src/wok/plugins/ginger | 2 +-
src/wok/plugins/gingerbase/tests/run_tests.sh.in | 3 +-
.../plugins/gingerbase/tests/test_authorization.py | 3 +-
src/wok/plugins/gingerbase/tests/test_host.py | 4 +-
src/wok/plugins/gingerbase/tests/test_rest.py | 6 +-
src/wok/plugins/gingerbase/tests/utils.py | 262 ---------------------
6 files changed, 11 insertions(+), 269 deletions(-)
delete mode 100644 src/wok/plugins/gingerbase/tests/utils.py
diff --git a/src/wok/plugins/ginger b/src/wok/plugins/ginger
index 84f36db..a0cc2a3 160000
--- a/src/wok/plugins/ginger
+++ b/src/wok/plugins/ginger
@@ -1 +1 @@
-Subproject commit 84f36dbbfe63869fa97cd68e9abdeaffdf1846d9
+Subproject commit a0cc2a369abf5ec93068924c3b681957d1c82cb3
diff --git a/src/wok/plugins/gingerbase/tests/run_tests.sh.in b/src/wok/plugins/gingerbase/tests/run_tests.sh.in
index 3b08fa6..ab3de12 100644
--- a/src/wok/plugins/gingerbase/tests/run_tests.sh.in
+++ b/src/wok/plugins/gingerbase/tests/run_tests.sh.in
@@ -52,6 +52,7 @@ for ((i=0;i<${#LIST[@]};i++)); do
fi
done
+# ../../../../../ refers to wok root
# ../../../../ refers to wok directory
# ../../../ refers to plugins directory
-PYTHONPATH=../../../../:../../../ $CMD $OPTS ${MODEL_LIST[@]} ${MOCK_LIST[@]}
+PYTHONPATH=../../../../../:../../../../:../../../ $CMD $OPTS ${MODEL_LIST[@]} ${MOCK_LIST[@]}
diff --git a/src/wok/plugins/gingerbase/tests/test_authorization.py b/src/wok/plugins/gingerbase/tests/test_authorization.py
index d0fc57c..0650f0a 100644
--- a/src/wok/plugins/gingerbase/tests/test_authorization.py
+++ b/src/wok/plugins/gingerbase/tests/test_authorization.py
@@ -23,9 +23,10 @@ import os
import unittest
from functools import partial
+from tests.utils import get_free_port, patch_auth, request, run_server
+
from wok.plugins.gingerbase import mockmodel
-from utils import get_free_port, patch_auth, request, run_server
test_server = None
model = None
diff --git a/src/wok/plugins/gingerbase/tests/test_host.py b/src/wok/plugins/gingerbase/tests/test_host.py
index 4f3e848..5d158bb 100644
--- a/src/wok/plugins/gingerbase/tests/test_host.py
+++ b/src/wok/plugins/gingerbase/tests/test_host.py
@@ -29,8 +29,10 @@ import time
import unittest
from functools import partial
+from tests.utils import get_free_port, patch_auth, request
+from tests.utils import run_server, wait_task
+
from wok.plugins.gingerbase.mockmodel import MockModel
-from utils import get_free_port, patch_auth, request, run_server, wait_task
test_server = None
diff --git a/src/wok/plugins/gingerbase/tests/test_rest.py b/src/wok/plugins/gingerbase/tests/test_rest.py
index a8138c6..c723a0e 100644
--- a/src/wok/plugins/gingerbase/tests/test_rest.py
+++ b/src/wok/plugins/gingerbase/tests/test_rest.py
@@ -26,13 +26,13 @@ import time
import unittest
from functools import partial
+from tests.utils import get_free_port, patch_auth, request
+from tests.utils import run_server, wait_task
+
from wok.rollbackcontext import RollbackContext
from wok.plugins.gingerbase import mockmodel
-from utils import get_free_port, patch_auth, request
-from utils import run_server, wait_task
-
test_server = None
model = None
diff --git a/src/wok/plugins/gingerbase/tests/utils.py b/src/wok/plugins/gingerbase/tests/utils.py
deleted file mode 100644
index 111cb02..0000000
--- a/src/wok/plugins/gingerbase/tests/utils.py
+++ /dev/null
@@ -1,262 +0,0 @@
-#
-# Project Ginger Base
-#
-# Copyright IBM, Corp. 2013-2015
-#
-# Code derived from Project Kimchi
-#
-# 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
-#
-
-import base64
-import cherrypy
-import grp
-import httplib
-import inspect
-import json
-import os
-import socket
-import ssl
-import sys
-import threading
-import time
-import unittest
-from contextlib import closing
-from lxml import etree
-
-import wok.server
-from wok.config import config, PluginPaths
-from wok.auth import User, USER_NAME, USER_GROUPS, USER_ROLES, tabs
-from wok.exception import NotFoundError, OperationFailed
-from wok.utils import wok_log
-
-from wok.plugins.gingerbase import mockmodel
-
-
-_ports = {}
-
-# provide missing unittest decorators and API for python 2.6; these decorators
-# do not actually work, just avoid the syntax failure
-if sys.version_info[:2] == (2, 6):
- def skipUnless(condition, reason):
- if not condition:
- sys.stderr.write('[expected failure] ')
- raise Exception(reason)
- return lambda obj: obj
-
- unittest.skipUnless = skipUnless
- unittest.expectedFailure = lambda obj: obj
-
- def assertGreater(self, a, b, msg=None):
- if not a > b:
- self.fail('%s not greater than %s' % (repr(a), repr(b)))
-
- def assertGreaterEqual(self, a, b, msg=None):
- if not a >= b:
- self.fail('%s not greater than or equal to %s'
- % (repr(a), repr(b)))
-
- def assertIsInstance(self, obj, cls, msg=None):
- if not isinstance(obj, cls):
- self.fail('%s is not an instance of %r' % (repr(obj), cls))
-
- def assertIn(self, a, b, msg=None):
- if a not in b:
- self.fail("%s is not in %b" % (repr(a), repr(b)))
-
- def assertNotIn(self, a, b, msg=None):
- if a in b:
- self.fail("%s is in %b" % (repr(a), repr(b)))
-
- unittest.TestCase.assertGreaterEqual = assertGreaterEqual
- unittest.TestCase.assertGreater = assertGreater
- unittest.TestCase.assertIsInstance = assertIsInstance
- unittest.TestCase.assertIn = assertIn
- unittest.TestCase.assertNotIn = assertNotIn
-
-
-def get_free_port(name='http'):
- global _ports
- if _ports.get(name) is not None:
- return _ports[name]
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- with closing(sock):
- try:
- sock.bind(("0.0.0.0", 0))
- except:
- raise Exception("Could not find a free port")
- _ports[name] = sock.getsockname()[1]
- return _ports[name]
-
-
-def run_server(host, port, ssl_port, test_mode, cherrypy_port=None,
- model=None, environment='development'):
-
- if cherrypy_port is None:
- cherrypy_port = get_free_port('cherrypy_port')
-
- if ssl_port is None:
- ssl_port = get_free_port('https')
-
- args = type('_', (object,),
- {'host': host, 'port': port, 'ssl_port': ssl_port,
- 'cherrypy_port': cherrypy_port, 'max_body_size': '4*1024',
- 'ssl_cert': '', 'ssl_key': '',
- '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)
-
- s = wok.server.Server(args)
- t = threading.Thread(target=s.start)
- t.setDaemon(True)
- t.start()
- cherrypy.engine.wait(cherrypy.engine.states.STARTED)
- return s
-
-
-def silence_server():
- """
- Silence server status messages on stdout
- """
- cherrypy.config.update({"environment": "embedded"})
-
-
-def running_as_root():
- return os.geteuid() == 0
-
-
-def _request(conn, path, data, method, headers):
- if headers is None:
- headers = {'Content-Type': 'application/json',
- 'Accept': 'application/json'}
- if 'AUTHORIZATION' not in headers.keys():
- user, pw = mockmodel.fake_user.items()[0]
- hdr = "Basic " + base64.b64encode("%s:%s" % (user, pw))
- headers['AUTHORIZATION'] = hdr
- conn.request(method, path, data, headers)
- return conn.getresponse()
-
-
-def request(host, port, path, data=None, method='GET', headers=None):
- # verify if HTTPSConnection has context parameter
- if "context" in inspect.getargspec(httplib.HTTPSConnection.__init__).args:
- context = ssl._create_unverified_context()
- conn = httplib.HTTPSConnection(host, port, context=context)
- else:
- conn = httplib.HTTPSConnection(host, port)
-
- return _request(conn, path, data, method, headers)
-
-
-def get_remote_iso_path():
- """
- Get a remote iso with the right arch from the distro files shipped
- with gingerbase.
- """
- host_arch = os.uname()[4]
- remote_path = ''
- with open(os.path.join(PluginPaths('gingerbase').conf_dir, 'distros.d',
- 'fedora.json')) as fedora_isos:
- # Get a list of dicts
- json_isos_list = json.load(fedora_isos)
- for iso in json_isos_list:
- if (iso.get('os_arch')) == host_arch:
- remote_path = iso.get('path')
- break
-
- return remote_path
-
-
-class FakeUser(User):
- auth_type = "fake"
- sudo = True
-
- def __init__(self, username):
- self.user = {}
- self.user[USER_NAME] = username
- self.user[USER_GROUPS] = None
- self.user[USER_ROLES] = dict.fromkeys(tabs, 'user')
-
- def get_groups(self):
- return sorted([group.gr_name for group in grp.getgrall()])[0:3]
-
- def get_roles(self):
- if self.sudo:
- self.user[USER_ROLES] = dict.fromkeys(tabs, 'admin')
- return self.user[USER_ROLES]
-
- def get_user(self):
- return self.user
-
- @staticmethod
- def authenticate(username, password, service="passwd"):
- try:
- return mockmodel.fake_user[username] == password
- except KeyError, e:
- raise OperationFailed("GGBAUTH0001E", {'username': 'username',
- 'code': e.message})
-
-
-def patch_auth(sudo=True):
- """
- Override the authenticate function with a simple test against an
- internal dict of users and passwords.
- """
- config.set("authentication", "method", "fake")
- FakeUser.sudo = sudo
-
-
-def normalize_xml(xml_str):
- return etree.tostring(etree.fromstring(xml_str,
- etree.XMLParser(remove_blank_text=True)))
-
-
-def wait_task(task_lookup, taskid, timeout=10):
- for i in range(0, timeout):
- task_info = task_lookup(taskid)
- if task_info['status'] == "running":
- wok_log.info("Waiting task %s, message: %s",
- taskid, task_info['message'])
- time.sleep(1)
- else:
- return
- wok_log.error("Timeout while process long-run task, "
- "try to increase timeout value.")
-
-
-# The action functions in model backend raise NotFoundError exception if the
-# element is not found. But in some tests, these functions are called after
-# the element has been deleted if test finishes correctly, then NofFoundError
-# exception is raised and rollback breaks. To avoid it, this wrapper ignores
-# the NotFoundError.
-def rollback_wrapper(func, resource, *args):
- try:
- func(resource, *args)
- except NotFoundError:
- # VM has been deleted already
- return
-
-
-# This function is used to test storage volume upload.
-# If we use self.request, we may encode multipart formdata by ourselves
-# requests lib take care of encode part, so use this lib instead
-def fake_auth_header():
- headers = {'Accept': 'application/json'}
- user, pw = mockmodel.fake_user.items()[0]
- hdr = "Basic " + base64.b64encode("%s:%s" % (user, pw))
- headers['AUTHORIZATION'] = hdr
- return headers
--
2.4.3
9 years, 1 month
[PATCH 0/4 V2] Upgrade ObjectStore data to Kimchi-2.0
by pvital@linux.vnet.ibm.com
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
This patch-set contains some fixes and changes related to upgrade process
of objectstore data from Kimchi-1.5.1 (or older) to the new Wok and
Kimchi-2.0 structure.
This is a V2 submission completely different from V1, since it's solving the
problem using a different approach, common to all supported distros, during
the startup of Kimchi plugin. The patch-set was tested on Fedora 22 and
Ubuntu-14.04 distros.
Paulo Vital (4):
Add version to objectstore information.
Add Kimchi version to objectstore entries.
Upgrade Kimchi objectstore content.
Change Kimchi version.
src/wok/objectstore.py | 20 +++++--
src/wok/plugins/kimchi/VERSION | 2 +-
src/wok/plugins/kimchi/config.py.in | 5 ++
src/wok/plugins/kimchi/i18n.py | 1 +
src/wok/plugins/kimchi/model/diskutils.py | 7 ++-
src/wok/plugins/kimchi/model/storagepools.py | 4 +-
src/wok/plugins/kimchi/model/templates.py | 4 +-
src/wok/plugins/kimchi/model/vms.py | 20 ++++---
src/wok/plugins/kimchi/root.py | 10 ++++
src/wok/plugins/kimchi/tests/test_model.py | 4 +-
src/wok/plugins/kimchi/utils.py | 80 +++++++++++++++++++++++++++-
tests/test_objectstore.py | 5 ++
12 files changed, 143 insertions(+), 19 deletions(-)
--
2.4.3
9 years, 1 month
[PATCH V2] Add OVS bridges recognition support
by Lucio Correia
Allow bridged networks to be created from OVS bridges, and
adapt VM XML to work with OVS networks.
In some distributions, i.e. Fedora, the directories "bridge"
and "brif" are not created for OVS bridges, and they are the
method Kimchi uses to detect bridges. This patch also fixes
that by recognizing OVS bridges through OVS commands,
allowing networks to be created using OVS bridges in those
distributions.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
src/wok/plugins/kimchi/model/networks.py | 4 +++
src/wok/plugins/kimchi/netinfo.py | 53 ++++++++++++++++++++++++++++--
src/wok/plugins/kimchi/xmlutils/network.py | 5 +++
3 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/src/wok/plugins/kimchi/model/networks.py b/src/wok/plugins/kimchi/model/networks.py
index 54cb0ea..5cd33e7 100644
--- a/src/wok/plugins/kimchi/model/networks.py
+++ b/src/wok/plugins/kimchi/model/networks.py
@@ -176,9 +176,13 @@ class NetworksModel(object):
# User specified bridge interface, simply use it
self._ensure_iface_up(iface)
+ params['ovs'] = False
if netinfo.is_bridge(iface):
params['bridge'] = iface
+ if netinfo.is_ovs_bridge(iface):
+ params['ovs'] = True
+
# User wants Linux bridge network, but didn't specify bridge interface
elif params['connection'] == "bridge":
# create Linux bridge interface first and use it as actual iface
diff --git a/src/wok/plugins/kimchi/netinfo.py b/src/wok/plugins/kimchi/netinfo.py
index c5746d7..ff91489 100644
--- a/src/wok/plugins/kimchi/netinfo.py
+++ b/src/wok/plugins/kimchi/netinfo.py
@@ -21,6 +21,9 @@ import ethtool
import glob
import os
+from distutils.spawn import find_executable
+from wok.utils import run_command
+from wok.utils import wok_log
NET_PATH = '/sys/class/net'
NIC_PATH = '/sys/class/net/*/device'
@@ -73,13 +76,51 @@ def is_vlan(iface):
def bridges():
- return [b.split('/')[-2] for b in glob.glob(BRIDGE_PATH)]
+ return list(set([b.split('/')[-2] for b in glob.glob(BRIDGE_PATH)] +
+ ovs_bridges()))
def is_bridge(iface):
return iface in bridges()
+# In some distributions, like Fedora, the files bridge and brif are not created
+# under /sys/class/net/<ovsbridge> for OVS bridges. These specific functions
+# allows one to differentiate OVS bridges from other types of bridges.
+def ovs_bridges():
+ ovs_cmd = find_executable("ovs-vsctl")
+
+ # openvswitch not installed: there is no OVS bridge configured
+ if ovs_cmd is None:
+ return []
+
+ out, error, rc = run_command([ovs_cmd, '--oneline', 'list-br'])
+ if rc != 0:
+ wok_log.info("Error listing OVS bridges")
+ return []
+
+ return list(set(out.split('\n')) - set(['']))
+
+
+def is_ovs_bridge(iface):
+ return iface in ovs_bridges()
+
+
+def ovs_bridge_ports(ovsbr):
+ ovs_cmd = find_executable("ovs-vsctl")
+
+ # openvswitch not installed: there is no OVS bridge configured
+ if ovs_cmd is None:
+ return []
+
+ out, error, rc = run_command([ovs_cmd, '--oneline', 'list-ports', ovsbr])
+ if rc != 0:
+ wok_log.info("Error listing OVS bridge ports for %s" % str(ovsbr))
+ return []
+
+ return list(set(out.split('\n')) - set(['']))
+
+
def all_interfaces():
return [d.rsplit("/", 1)[-1] for d in glob.glob(NET_PATH + '/*')]
@@ -91,11 +132,19 @@ def slaves(bonding):
def ports(bridge):
+ if bridge in ovs_bridges():
+ return ovs_bridge_ports(bridge)
+
return os.listdir(BRIDGE_PORTS % bridge)
def is_brport(nic):
- return os.path.exists(NET_BRPORT % nic)
+ ovs_brports = []
+
+ for ovsbr in ovs_bridges():
+ ovs_brports += ovs_bridge_ports(ovsbr)
+
+ return os.path.exists(NET_BRPORT % nic) or nic in ovs_brports
def is_bondlave(nic):
diff --git a/src/wok/plugins/kimchi/xmlutils/network.py b/src/wok/plugins/kimchi/xmlutils/network.py
index 14c7e13..f9594e6 100644
--- a/src/wok/plugins/kimchi/xmlutils/network.py
+++ b/src/wok/plugins/kimchi/xmlutils/network.py
@@ -95,6 +95,11 @@ def to_network_xml(**kwargs):
if bridge:
network.append(E.bridge(name=bridge))
+ # Add virtualport element for openvswitch bridges
+ ovs = kwargs.get('ovs')
+ if ovs:
+ network.append(E.virtualport(type='openvswitch'))
+
# None means is Isolated network, {} means default mode nat
params = kwargs.get('forward', {"mode": None})
forward = _get_forward_elem(**params)
--
1.9.1
9 years, 1 month
[PATCH 0/3 - v2] Checks memory alignment to 256 MiB and number of slots in PPC
by Rodrigo Trujillo
V2:
- Created global variable to hold PPC Memory aligment value: 256 currently
- Fix missing platform import
- Changed mathematical operators by bitwise operators when manipulate memory
values
V1:
This patchset makes necessary changes to check and change in PPC:
- memory and maxMemory must be aligned to 256 MiB
- Number of slots must be <= 32
Rodrigo Trujillo (3):
Check memory alignment in PowerPC to 256MiB
Check and align number of memory slot to 32 in PowerPC
Change memory multipliers/divisors by bitwise operators
src/wok/plugins/kimchi/i18n.py | 3 ++
src/wok/plugins/kimchi/model/vms.py | 38 ++++++++++++++++++++--
src/wok/plugins/kimchi/osinfo.py | 7 ++++
src/wok/plugins/kimchi/tests/test_livemigration.py | 2 +-
src/wok/plugins/kimchi/vmtemplate.py | 8 ++++-
5 files changed, 54 insertions(+), 4 deletions(-)
--
2.1.0
9 years, 1 month
[PATCH 0/2] Github #760: Enabling the import of WoK module /test/utils.py
by dhbarboza82@gmail.com
From: Daniel Henrique Barboza <dhbarboza82(a)gmail.com>
This patch set makes changes in WoK and Kimchi to allow the
unit tests of all WoK plugins access to the /tests/utils.py
module of WoK.
This module is replicated at /plugins/kimchi/tests/utils.py and
it was deleted.
See https://github.com/kimchi-project/kimchi/issues/760 for further info
Daniel Henrique Barboza (2):
WoK: making /tests/utils.py available to all WoK plug-ins
Kimchi: updating unit tests to use WoK /test/utils.py
src/wok/plugins/kimchi/tests/run_tests.sh.in | 3 +-
src/wok/plugins/kimchi/tests/test_authorization.py | 9 +-
src/wok/plugins/kimchi/tests/test_host.py | 4 +-
src/wok/plugins/kimchi/tests/test_livemigration.py | 21 +-
src/wok/plugins/kimchi/tests/test_mock_network.py | 3 +-
.../plugins/kimchi/tests/test_mock_storagepool.py | 4 +-
.../kimchi/tests/test_mock_storagevolume.py | 3 +-
src/wok/plugins/kimchi/tests/test_mockmodel.py | 5 +-
src/wok/plugins/kimchi/tests/test_model.py | 3 +-
src/wok/plugins/kimchi/tests/test_model_network.py | 6 +-
.../plugins/kimchi/tests/test_model_storagepool.py | 4 +-
.../kimchi/tests/test_model_storagevolume.py | 7 +-
src/wok/plugins/kimchi/tests/test_networkxml.py | 7 +-
src/wok/plugins/kimchi/tests/test_rest.py | 5 +-
src/wok/plugins/kimchi/tests/test_template.py | 4 +-
src/wok/plugins/kimchi/tests/utils.py | 259 ---------------------
tests/__init__.py | 18 ++
tests/utils.py | 6 +-
18 files changed, 72 insertions(+), 299 deletions(-)
delete mode 100644 src/wok/plugins/kimchi/tests/utils.py
create mode 100644 tests/__init__.py
--
2.4.3
9 years, 1 month
[PATCH] Issue #755 : Action's states are showing in correctly for Repositories
by atreyee@linux.vnet.ibm.com
From: Atreyee Mukhopadhyay <atreyee(a)linux.vnet.ibm.com>
Fix Action enable/disable functionality of the repositories.
---
.../plugins/gingerbase/ui/js/src/gingerbase.host.js | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js
index 24a4aa6..6a6e690 100644
--- a/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js
+++ b/src/wok/plugins/gingerbase/ui/js/src/gingerbase.host.js
@@ -161,11 +161,21 @@ gingerbase.host_main = function() {
if (!repository) {
return;
}
- $('#repositories-grid-remove-button').prop('disabled', false);
- $('#repositories-grid-edit-button').prop('disabled', false);
+ var selectedRow = $('tr',repositoriesGrid.bodyContainer);
+ $('#repositories-grid-remove-button',selectedRow).prop('disabled', false);
+ $('#repositories-grid-edit-button',selectedRow).prop('disabled', false);
var enabled = repository['enabled'];
- $('#repositories-grid-enable-button')
- .text(i18n[enabled ? 'GGBREPO6017M' : 'GGBREPO6016M'])
+ var actionHtml,actionText,actionIcon ='';
+ if(enabled){
+ actionText= i18n['GGBREPO6017M'];
+ actionIcon = 'fa-pause';
+ }else{
+ actionText= i18n['GGBREPO6016M'];
+ actionIcon = 'fa-play-circle-o';
+ }
+ actionHtml = ['<i class="fa',' ',actionIcon,'"></i>','',actionText].join('');
+ $('#repositories-grid-enable-button',selectedRow)
+ .html(actionHtml)
.prop('disabled', false);
},
frozenFields: [],
--
2.1.0
9 years, 1 month
[PATCH 0/3 - v3] Checks memory alignment to 256 MiB and number of slots in PPC
by Rodrigo Trujillo
V3:
- Make modifications asked by Aline
- Rebase with latest master code
V2:
- Created global variable to hold PPC Memory aligment value: 256 currently
- Fix missing platform import
- Changed mathematical operators by bitwise operators when manipulate memory
values
V1:
This patchset makes necessary changes to check and change in PPC:
- memory and maxMemory must be aligned to 256 MiB
- Number of slots must be <= 32
Rodrigo Trujillo (3):
Check memory alignment in PowerPC to 256MiB
Check and align number of memory slot to 32 in PowerPC
Change memory multipliers/divisors by bitwise operators
src/wok/plugins/kimchi/i18n.py | 3 +-
src/wok/plugins/kimchi/model/vms.py | 38 ++++++++++++++++++++--
src/wok/plugins/kimchi/osinfo.py | 7 ++++
src/wok/plugins/kimchi/tests/test_livemigration.py | 2 +-
src/wok/plugins/kimchi/vmtemplate.py | 8 ++++-
5 files changed, 52 insertions(+), 6 deletions(-)
--
2.1.0
9 years, 1 month