[PATCH V4] Support Linux Bridge creation
by Lucio Correia
From: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
This commit adds a new option to bridged network creation
API: "macvtap". When it is chosen, the usual behavior for
option "bridge" will be applied.
This commit also changes the behavior for the already
existing "bridge" option. Now, when that option is chosen,
a Linux bridge will be created, not a macvtap one.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>i
Changes in V4:
- Fixed tests
- Fixed macvtap use case
---
src/wok/plugins/kimchi/API.json | 2 +-
src/wok/plugins/kimchi/docs/API.md | 11 ++-
src/wok/plugins/kimchi/i18n.py | 5 +-
src/wok/plugins/kimchi/model/networks.py | 108 +++++++++++++++------
src/wok/plugins/kimchi/tests/test_mock_network.py | 4 +-
src/wok/plugins/kimchi/tests/test_model_network.py | 5 +
src/wok/plugins/kimchi/tests/test_networkxml.py | 24 +++++
src/wok/plugins/kimchi/xmlutils/network.py | 25 +++++
8 files changed, 149 insertions(+), 35 deletions(-)
diff --git a/src/wok/plugins/kimchi/API.json b/src/wok/plugins/kimchi/API.json
index ab9ac9b..7addfc7 100644
--- a/src/wok/plugins/kimchi/API.json
+++ b/src/wok/plugins/kimchi/API.json
@@ -353,7 +353,7 @@
"connection": {
"description": "Specifies how this network should be connected to the other networks",
"type": "string",
- "pattern": "^isolated|nat|bridge$",
+ "pattern": "^isolated|nat|bridge|macvtap$",
"required": true,
"error": "KCHNET0012E"
},
diff --git a/src/wok/plugins/kimchi/docs/API.md b/src/wok/plugins/kimchi/docs/API.md
index 5787755..e1c9396 100644
--- a/src/wok/plugins/kimchi/docs/API.md
+++ b/src/wok/plugins/kimchi/docs/API.md
@@ -627,13 +627,16 @@ A interface represents available interface on host.
networks visible to this host.
* isolated: Create a private, isolated virtual network.
* nat: Outgoing traffic will be routed through the host.
- * bridge: All traffic on this network will be bridged through the indicated
- interface.
+ * macvtap: All traffic on this network will be bridged through the
+ specified interface.
+ * bridge: All traffic on this network will be bridged through a Linux
+ bridged, which is created upon specified interface in case
+ it is not already a Linux bridge.
* subnet *(optional)*: Network segment in slash-separated format with ip address and
prefix or netmask used to create nat network.
* interface *(optional)*: The name of a network interface on the host.
- For bridge network, the interface can be a bridge or nic/bonding
- device.
+ For "macvtap" and "bridge" connections, the
+ interface can be a nic, bridge or bonding device.
* vlan_id *(optional)*: VLAN tagging ID for the bridge network.
### Resource: Network
diff --git a/src/wok/plugins/kimchi/i18n.py b/src/wok/plugins/kimchi/i18n.py
index aede103..a72f1ee 100644
--- a/src/wok/plugins/kimchi/i18n.py
+++ b/src/wok/plugins/kimchi/i18n.py
@@ -256,7 +256,7 @@ messages = {
"KCHNET0009E": _("Unable to find a free IP address for network '%(name)s'"),
"KCHNET0010E": _("The interface %(iface)s already exists."),
"KCHNET0011E": _("Network name must be a string without slashes (/) or quotes (\")"),
- "KCHNET0012E": _("Supported network types are isolated, NAT and bridge"),
+ "KCHNET0012E": _("Supported network types are isolated, NAT, macvtap and bridge"),
"KCHNET0013E": _("Network subnet must be a string with IP address and prefix or netmask"),
"KCHNET0014E": _("Network interface must be a string"),
"KCHNET0015E": _("Network VLAN ID must be an integer between 1 and 4094"),
@@ -267,6 +267,9 @@ messages = {
"KCHNET0020E": _("Failed to activate interface %(iface)s: %(err)s."),
"KCHNET0021E": _("Failed to activate interface %(iface)s. Please check the physical link status."),
"KCHNET0022E": _("Failed to start network %(name)s. Details: %(err)s"),
+ "KCHNET0023E": _("Unable to get XML definition for interface %(name)s. Details: %(err)s"),
+ "KCHNET0024E": _("Unable to redefine interface %(name)s. Details: %(err)s"),
+ "KCHNET0025E": _("Unable to create bridge %(name)s. Details: %(err)s"),
"KCHSR0001E": _("Storage server %(server)s was not used by Kimchi"),
diff --git a/src/wok/plugins/kimchi/model/networks.py b/src/wok/plugins/kimchi/model/networks.py
index 71ea595..89c8c3a 100644
--- a/src/wok/plugins/kimchi/model/networks.py
+++ b/src/wok/plugins/kimchi/model/networks.py
@@ -21,19 +21,21 @@ import ipaddr
import libvirt
import sys
import time
+from libvirt import VIR_INTERFACE_XML_INACTIVE
from xml.sax.saxutils import escape
from wok.config import PluginPaths
from wok.exception import InvalidOperation, InvalidParameter
from wok.exception import MissingParameter, NotFoundError, OperationFailed
-from wok.rollbackcontext import RollbackContext
from wok.utils import run_command, wok_log
from wok.xmlutils.utils import xpath_get_text
from wok.plugins.kimchi import netinfo
from wok.plugins.kimchi import network as knetwork
from wok.plugins.kimchi.osinfo import defaults as tmpl_defaults
+from wok.plugins.kimchi.xmlutils.network import create_linux_bridge_xml
from wok.plugins.kimchi.xmlutils.network import create_vlan_tagged_bridge_xml
+from wok.plugins.kimchi.xmlutils.network import get_no_network_config_xml
from wok.plugins.kimchi.xmlutils.network import to_network_xml
@@ -82,7 +84,9 @@ class NetworksModel(object):
connection = params["connection"]
# set forward mode, isolated do not need forward
- if connection != 'isolated':
+ if connection == 'macvtap':
+ params['forward'] = {'mode': 'bridge'}
+ elif connection != 'isolated':
params['forward'] = {'mode': connection}
# set subnet, bridge network do not need subnet
@@ -90,7 +94,7 @@ class NetworksModel(object):
self._set_network_subnet(params)
# only bridge network need bridge(linux bridge) or interface(macvtap)
- if connection == 'bridge':
+ if connection in ['bridge', 'macvtap']:
self._set_network_bridge(params)
params['name'] = escape(params['name'])
@@ -159,6 +163,7 @@ class NetworksModel(object):
def _set_network_bridge(self, params):
try:
+ # fails if host interface is already in use by a libvirt network
iface = params['interface']
if iface in self.get_all_networks_interfaces():
msg_args = {'iface': iface, 'network': params['name']}
@@ -166,11 +171,23 @@ class NetworksModel(object):
except KeyError:
raise MissingParameter("KCHNET0004E", {'name': params['name']})
+ # Linux bridges cannot be the trunk device of a VLAN
+ if 'vlan_id' in params and \
+ (netinfo.is_bridge(iface) or params['connection'] == "bridge"):
+ raise InvalidParameter('KCHNET0019E', {'name': iface})
+
+ # User specified bridge interface, simply use it
self._ensure_iface_up(iface)
if netinfo.is_bridge(iface):
- if 'vlan_id' in params:
- raise InvalidParameter('KCHNET0019E', {'name': iface})
params['bridge'] = iface
+
+ # 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
+ iface = self._create_linux_bridge(iface)
+ params['bridge'] = iface
+
+ # connection == macvtap and iface is not bridge
elif netinfo.is_bare_nic(iface) or netinfo.is_bonding(iface):
if params.get('vlan_id') is None:
params['forward']['dev'] = iface
@@ -196,36 +213,73 @@ class NetworksModel(object):
net_dict['bridge'] and interfaces.append(net_dict['bridge'])
return interfaces
+ def _create_bridge(self, name, xml):
+ conn = self.conn.get()
+
+ # check if name exists
+ if name in netinfo.all_interfaces():
+ raise InvalidOperation("KCHNET0010E", {'iface': name})
+
+ # create bridge through libvirt
+ try:
+ bridge = conn.interfaceDefineXML(xml)
+ bridge.create()
+ except libvirt.libvirtError as e:
+ raise OperationFailed("KCHNET0025E", {'name': name,
+ 'err': e.get_error_message()})
+
+ def _create_linux_bridge(self, interface):
+ # get xml definition of interface
+ iface_xml = self._get_interface_desc_xml(interface)
+
+ # Truncate the interface name if it exceeds 13 characters to make sure
+ # the length of bridge name is less than 15 (its maximum value).
+ br_name = KIMCHI_BRIDGE_PREFIX + interface[-13:]
+ br_xml = create_linux_bridge_xml(br_name, interface, iface_xml)
+
+ # drop network config from interface
+ self._redefine_iface_no_network(interface)
+
+ # create and start bridge
+ self._create_bridge(br_name, br_xml)
+
+ return br_name
+
def _create_vlan_tagged_bridge(self, interface, vlan_id):
# Truncate the interface name if it exceeds 8 characters to make sure
# the length of bridge name is less than 15 (its maximum value).
br_name = KIMCHI_BRIDGE_PREFIX + interface[-8:] + '-' + vlan_id
br_xml = create_vlan_tagged_bridge_xml(br_name, interface, vlan_id)
+
+ self._create_bridge(br_name, br_xml)
+
+ return br_name
+
+ def _get_interface_desc_xml(self, name):
conn = self.conn.get()
- bridges = []
- for net in conn.listAllNetworks():
- # Bridged networks do not have a bridge name
- # So in those cases, libvirt raises an error when trying to get
- # the bridge name
- try:
- bridges.append(net.bridgeName())
- except libvirt.libvirtError, e:
- wok_log.error(e.message)
+ try:
+ iface = conn.interfaceLookupByName(name)
+ xml = iface.XMLDesc(flags=VIR_INTERFACE_XML_INACTIVE)
+ except libvirt.libvirtError, e:
+ raise OperationFailed("KCHNET0023E",
+ {'name': name, 'err': e.get_error_message()})
- if br_name in bridges:
- raise InvalidOperation("KCHNET0010E", {'iface': br_name})
+ return xml
- with RollbackContext() as rollback:
- try:
- vlan_tagged_br = conn.interfaceDefineXML(br_xml, 0)
- rollback.prependDefer(vlan_tagged_br.destroy)
- vlan_tagged_br.create(0)
- except libvirt.libvirtError as e:
- raise OperationFailed(e.message)
- else:
- return br_name
+ def _redefine_iface_no_network(self, name):
+ conn = self.conn.get()
+ # drop network config from definition of interface
+ iface_xml = self._get_interface_desc_xml(name)
+ xml = get_no_network_config_xml(iface_xml.encode("utf-8"))
+
+ try:
+ # redefine interface
+ iface = conn.interfaceDefineXML(xml.encode("utf-8"))
+ except libvirt.libvirtError as e:
+ raise OperationFailed("KCHNET0024E", {'name': name,
+ 'err': e.get_error_message()})
class NetworkModel(object):
def __init__(self, **kargs):
@@ -333,7 +387,7 @@ class NetworkModel(object):
if network.isActive():
raise InvalidOperation("KCHNET0005E", {'name': name})
- self._remove_vlan_tagged_bridge(network)
+ self._remove_bridge(network)
network.undefine()
@staticmethod
@@ -369,7 +423,7 @@ class NetworkModel(object):
'interface': forward_if,
'pf': forward_pf}}
- def _remove_vlan_tagged_bridge(self, network):
+ def _remove_bridge(self, network):
try:
bridge = network.bridgeName()
except libvirt.libvirtError:
diff --git a/src/wok/plugins/kimchi/tests/test_mock_network.py b/src/wok/plugins/kimchi/tests/test_mock_network.py
index 8368ced..4b0a284 100644
--- a/src/wok/plugins/kimchi/tests/test_mock_network.py
+++ b/src/wok/plugins/kimchi/tests/test_mock_network.py
@@ -69,6 +69,6 @@ class MockNetworkTests(unittest.TestCase):
)
if len(interfaces) > 0:
iface = interfaces[0]['name']
- _do_network_test(self, model, {'name': u'bridge-network',
- 'connection': 'bridge',
+ _do_network_test(self, model, {'name': u'macvtap-network',
+ 'connection': 'macvtap',
'interface': iface, 'vlan_id': 987})
diff --git a/src/wok/plugins/kimchi/tests/test_model_network.py b/src/wok/plugins/kimchi/tests/test_model_network.py
index 6be2d39..776e69e 100644
--- a/src/wok/plugins/kimchi/tests/test_model_network.py
+++ b/src/wok/plugins/kimchi/tests/test_model_network.py
@@ -142,6 +142,11 @@ class NetworkTests(unittest.TestCase):
)
if len(interfaces) > 0:
iface = interfaces[0]['name']
+ networks.append({'name': u'macvtap-network',
+ 'connection': 'macvtap', 'interface': iface})
+
+ if len(interfaces) > 1:
+ iface = interfaces[1]['name']
networks.append({'name': u'bridge-network', 'connection': 'bridge',
'interface': iface})
diff --git a/src/wok/plugins/kimchi/tests/test_networkxml.py b/src/wok/plugins/kimchi/tests/test_networkxml.py
index 69965e6..d4e2c3f 100644
--- a/src/wok/plugins/kimchi/tests/test_networkxml.py
+++ b/src/wok/plugins/kimchi/tests/test_networkxml.py
@@ -171,3 +171,27 @@ class InterfaceXmlTests(unittest.TestCase):
"""
actual_xml = nxml.create_vlan_tagged_bridge_xml('br10', 'em1', '10')
self.assertEquals(actual_xml, normalize_xml(expected_xml))
+
+ def test_linux_bridge_no_ip(self):
+ em1_xml = """
+ <interface type='ethernet' name='em1'>
+ <start mode='onboot'/>
+ <protocol family='ipv4'>
+ <dhcp/>
+ </protocol>
+ </interface>
+ """
+ expected_xml = """
+ <interface type='bridge' name='br10'>
+ <start mode='onboot'/>
+ <bridge>
+ <interface type='ethernet' name='em1' />
+ </bridge>
+ <protocol family='ipv4'>
+ <dhcp/>
+ </protocol>
+ </interface>
+ """
+ actual_xml = nxml.create_linux_bridge_xml('br10', 'em1',
+ normalize_xml(em1_xml))
+ self.assertEquals(actual_xml, normalize_xml(expected_xml))
diff --git a/src/wok/plugins/kimchi/xmlutils/network.py b/src/wok/plugins/kimchi/xmlutils/network.py
index c73aad9..14c7e13 100644
--- a/src/wok/plugins/kimchi/xmlutils/network.py
+++ b/src/wok/plugins/kimchi/xmlutils/network.py
@@ -120,3 +120,28 @@ def create_vlan_tagged_bridge_xml(bridge, interface, vlan_id):
type='bridge',
name=bridge)
return ET.tostring(m)
+
+def create_linux_bridge_xml(bridge, interface, iface_xml):
+ m = E.interface(
+ E.start(mode='onboot'),
+ E.bridge(
+ E.interface(
+ type='ethernet',
+ name=interface)),
+ type='bridge',
+ name=bridge)
+
+ # use same network configuration of lower interface
+ iface = ET.fromstring(iface_xml)
+ for element in iface.iter("protocol"):
+ m.append(element)
+
+ return ET.tostring(m)
+
+def get_no_network_config_xml(iface_xml):
+ # remove all protocol elements from interface xml
+ xml = ET.fromstring(iface_xml)
+ for element in xml.iter("protocol"):
+ element.getparent().remove(element)
+
+ return ET.tostring(xml)
--
1.9.1
9 years, 1 month
[PATCH] [Ginger-Base 0/1] Issue 728 - Processor Info in s390 architecture
by sureshab@linux.vnet.ibm.com
From: Suresh Babu Angadi <sureshab(a)in.ibm.com>
As per RFC mail thread -
[Kimchi-devel] RFC - #728 - Processor Info in s390 architecture
this patch set adds functionality in back-end to add
architecture, and host name(for all architecture),
split CPUs to online and offline(x86, s390x),
additional virtualization details(for s390x)
Note: Subsequent patch set for UI changes will follow
to accommodate these changes
Test Cases Executed:
====================
1) On x86 machine:
curl -k -u suresh -H "Content-Type: application/json" -H "Accept: application/json" -X GET 'https://127.0.0.1:8001/plugins/gingerbase/host'
{
"os_distro":"Fedora",
"cpus":{
"offline":0,
"online":4
},
"cpu_model":"Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz",
"os_version":"21",
"host":"localhost.localdomain",
"os_codename":"Twenty One",
"architecture":"x86_64",
"memory":7933902848
}
2) On s390x machine:
curl -k -u root -H "Content-Type: application/json" -H "Accept: application/json" -X GET 'https://127.0.0.1:8001/plugins/gingerbase/host'
{
"os_distro":"KVM for IBM z Systems",
"cpus":{
"shared":2,
"offline":2,
"dedicated":0,
"online":2
},
"cpu_model":"IBM/2827/743 H43",
"os_version":"1.1.1",
"host":"zfwcec103",
"os_codename":"Z",
"architecture":"s390x",
"memory":{
"offline":2147483648,
"online":2147483648
},
"virtualization":{
"lpar_name":"CSTLIN1",
"hypervisor":"PR/SM",
"lpar_number":55,
"hypervisor_vendor":"IBM"
}
}
3) For Power(Expected Output):
{
"os_distro":<os distro>,
"cpus":<cpu count>,
"cpu_model":<cpu model>,
"os_version":<os version>,
"host":<host name>,
"os_codename":<os codename>,
"architecture":"ppc",
"memory":<memory>
}
Suresh Babu Angadi (1):
Fix for issue 728: processor info displays blank for system z this
patch set also adds additional capability: retrieving
architecture and host name (for all architecture) split CPUs to
show online and offline cpus(for x86 and s390x) split memory to
show online and offline memory(for s390x) additional
virtualization details(for s390x): virtualization will have
hypervisor details and lpar details
src/wok/plugins/gingerbase/docs/API.md | 22 ++-
src/wok/plugins/gingerbase/i18n.py | 1 +
src/wok/plugins/gingerbase/lscpu.py | 59 ++++++
src/wok/plugins/gingerbase/model/host.py | 256 +++++++++++++++++++++++---
src/wok/plugins/gingerbase/tests/test_host.py | 12 +-
5 files changed, 320 insertions(+), 30 deletions(-)
--
2.1.0
9 years, 1 month
[PATCH v2] Add support for serial console
by Ramon Medeiros
Changes:
v2:
Add ppc rules to serial.py
Correct date on "Copyright"
Automatically create serial console device.
Signed-off-by: Ramon Medeiros <ramonn(a)linux.vnet.ibm.com>
---
src/wok/plugins/kimchi/vmtemplate.py | 13 ++------
src/wok/plugins/kimchi/xmlutils/serial.py | 55 +++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 10 deletions(-)
create mode 100644 src/wok/plugins/kimchi/xmlutils/serial.py
diff --git a/src/wok/plugins/kimchi/vmtemplate.py b/src/wok/plugins/kimchi/vmtemplate.py
index d653665..34bf38b 100644
--- a/src/wok/plugins/kimchi/vmtemplate.py
+++ b/src/wok/plugins/kimchi/vmtemplate.py
@@ -38,7 +38,7 @@ from wok.plugins.kimchi.xmlutils.disk import get_disk_xml
from wok.plugins.kimchi.xmlutils.graphics import get_graphics_xml
from wok.plugins.kimchi.xmlutils.interface import get_iface_xml
from wok.plugins.kimchi.xmlutils.qemucmdline import get_qemucmdline_xml
-
+from wok.plugins.kimchi.xmlutils.serial import get_serial_xml
class VMTemplate(object):
def __init__(self, args, scan=False):
@@ -312,6 +312,7 @@ class VMTemplate(object):
params['qemu-stream-cmdline'] = ''
params['cpu_info'] = self._get_cpu_xml()
params['disks'] = self._get_disks_xml(vm_uuid)
+ params['serial'] = get_serial_xml(params)
graphics = dict(self.info['graphics'])
graphics.update(kwargs.get('graphics', {}))
@@ -371,20 +372,12 @@ class VMTemplate(object):
%(networks)s
%(graphics)s
%(input_output)s
+ %(serial)s
<memballoon model='virtio' />
</devices>
</domain>
""" % params
- # Adding PPC console configuration
- if params['arch'] in ['ppc', 'ppc64']:
- ppc_console = """<memballoon model='virtio' />
- <console type='pty'>
- <target type='serial' port='1'/>
- <address type='spapr-vio' reg='0x30001000'/>
- </console>"""
- xml = xml.replace("<memballoon model='virtio' />", ppc_console)
-
return xml
def validate(self):
diff --git a/src/wok/plugins/kimchi/xmlutils/serial.py b/src/wok/plugins/kimchi/xmlutils/serial.py
new file mode 100644
index 0000000..869a971
--- /dev/null
+++ b/src/wok/plugins/kimchi/xmlutils/serial.py
@@ -0,0 +1,55 @@
+#
+# Project Kimchi
+#
+# Copyright IBM, Corp. 2015
+#
+# 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 lxml.etree as ET
+from lxml.builder import E
+
+def get_serial_xml(params):
+ """
+ For X
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+
+ For ppc
+ <console type='pty'>
+ <target type='serial' port='1'/>
+ <address type='spapr-vio' reg='0x30001000'/>
+ </console>
+ """
+ # pcc serial console
+ if params["arch"] in ["ppc", "ppc64"]:
+ console = E.console(type="pty")
+ console.append(E.target(type="serial", port='1'))
+ console.append(E.address(type="spapr-vio", reg="0x30001000"))
+ return ET.tostring(console, encoding='utf-8', pretty_print=True)
+
+ # for x
+ else:
+ serial = E.serial(type="pty")
+ serial.append(E.target(port='0'))
+ console = E.console(type="pty")
+ console.append(E.target(type="serial", port='0'))
+ return ET.tostring(serial, encoding='utf-8', pretty_print=True) + \
+ ET.tostring(console, encoding='utf-8', pretty_print=True)
+
+ return ''
--
2.1.0
9 years, 1 month
[PATCH] Add python-mock to README.md
by Rodrigo Trujillo
Supported distributions provide python-mock. This patch updates
README.md with this information.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/wok/plugins/kimchi/docs/README.md | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/wok/plugins/kimchi/docs/README.md b/src/wok/plugins/kimchi/docs/README.md
index 16fd1e5..23db018 100644
--- a/src/wok/plugins/kimchi/docs/README.md
+++ b/src/wok/plugins/kimchi/docs/README.md
@@ -63,8 +63,7 @@ Install Dependencies
$ sudo service libvirtd restart
# These dependencies are only required if you want to run the tests:
- $ sudo yum install pyflakes python-pep8 python-requests
- $ sudo pip install mock
+ $ sudo yum install pyflakes python-pep8 python-requests python-mock
*Note for RHEL users*: Some of the above packages are located in the Red Hat
@@ -85,7 +84,7 @@ channel at RHN Classic or Red Hat Satellite.
python-magic python-paramiko \
# These dependencies are only required if you want to run the tests:
- $ sudo apt-get install pep8 pyflakes python-requests
+ $ sudo apt-get install pep8 pyflakes python-requests python-mock
**For openSUSE:**
@@ -97,7 +96,7 @@ channel at RHN Classic or Red Hat Satellite.
novnc python-magic
# These dependencies are only required if you want to run the tests:
- $ sudo zypper install python-pyflakes python-pep8 python-requests
+ $ sudo zypper install python-pyflakes python-pep8 python-requests python-mock
*Note for openSUSE users*: Some of the above packages are located in different
openSUSE repositories. See
--
2.1.0
9 years, 1 month
[PATCH] Fix memory add aligment to 256 in PowerPC
by Rodrigo Trujillo
This patch fixes an error in the 'if' that checks the system
architecture.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/wok/plugins/kimchi/model/vms.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wok/plugins/kimchi/model/vms.py b/src/wok/plugins/kimchi/model/vms.py
index 5623879..7e12b91 100644
--- a/src/wok/plugins/kimchi/model/vms.py
+++ b/src/wok/plugins/kimchi/model/vms.py
@@ -238,9 +238,9 @@ class VMModel(object):
vm_locks[name] = lock
with lock:
- # make sure memory is alingned in 256MiB
+ # make sure memory is alingned in 256MiB in PowerPC
distro, _, _ = platform.linux_distribution()
- if 'memory' in params and distro != "IBM_PowerKVM":
+ if 'memory' in params and distro == "IBM_PowerKVM":
if params['memory'] % PPC_MEM_ALIGN != 0:
raise InvalidParameter('KCHVM0071E',
{'mem': str(params['memory']),
--
2.1.0
9 years, 1 month
[PATCH v2] New Navigation bar
by atreyee@linux.vnet.ibm.com
From: Atreyee Mukhopadhyay <atreyee(a)linux.vnet.ibm.com>
This patch is to implement new feature mentioned in issue #746.
First level navigation bar with Host and Virtualization tabs.
Second level tab navigation based on first level navigation.
V2 Fixes:
Review comments from Aline taken care
1. alignement of second level navigation with first level navigation
2. second level tab color to fit the window
Atreyee Mukhopadhyay (1):
Issue #746 : New navigation bar.
src/wok/plugins/gingerbase/ui/config/tab-ext.xml | 2 +-
src/wok/plugins/kimchi/ui/config/tab-ext.xml | 1 +
ui/css/src/modules/_navbar-flat.scss | 5 +-
ui/css/src/modules/_toolbar.scss | 9 ++-
ui/css/src/modules/_wok-variables.scss | 9 ++-
ui/css/src/wok.scss | 4 ++
ui/js/src/wok.main.js | 87 +++++++++++++++++++++---
ui/pages/wok-ui.html.tmpl | 8 ++-
8 files changed, 105 insertions(+), 20 deletions(-)
--
2.1.0
9 years, 1 month
[PATCH V4] Create logical pool from existing VG
by Aline Manera
V3 - V4:
- Use run_command instead of subprocess.Popen (by Daniel)
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 | 127 ++++++++++++++++++---
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, 255 insertions(+), 30 deletions(-)
--
2.5.0
9 years, 1 month
[PATCH v3] New Navigation bar
by atreyee@linux.vnet.ibm.com
From: Atreyee Mukhopadhyay <atreyee(a)linux.vnet.ibm.com>
This patch is to implement new feature mentioned in issue #746.
First level navigation bar with Host and Virtualization tabs.
Second level tab navigation based on first level navigation.
V3 Fixes:
Review comments from Aline taken care
Implementing same color for all tabs in kimchi
Atreyee Mukhopadhyay (1):
Issue #746 : New navigation bar.
src/wok/plugins/gingerbase/ui/config/tab-ext.xml | 2 +-
src/wok/plugins/kimchi/ui/config/tab-ext.xml | 1 +
ui/css/src/modules/_navbar-flat.scss | 5 +-
ui/css/src/modules/_toolbar.scss | 9 ++-
ui/css/src/modules/_wok-variables.scss | 9 ++-
ui/css/src/wok.scss | 4 ++
ui/js/src/wok.main.js | 87 +++++++++++++++++++++---
ui/pages/wok-ui.html.tmpl | 8 ++-
8 files changed, 105 insertions(+), 20 deletions(-)
--
2.1.0
9 years, 1 month
[PATCH] Moved disks.py file from kimchi plugin to gingerbase plugin
by pkulkark@linux.vnet.ibm.com
From: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
This patch moves the file disks.py from kimchi plugin to gingerbase plugin
so that it may be used by both kimchi and ginger without code duplication.
Import statement in plugins/kimchi/model/host.py has been modified for the same.
Pooja Kulkarni (1):
Moved disks.py file from kimchi plugin to gingerbase plugin
src/wok/plugins/gingerbase/disks.py | 196 +++++++++++++++++++++++++++++++++++
src/wok/plugins/kimchi/model/host.py | 2 +-
2 files changed, 197 insertions(+), 1 deletion(-)
create mode 100644 src/wok/plugins/gingerbase/disks.py
--
2.1.0
9 years, 1 month
[PATCH v2] Moved disks.py file from kimchi plugin to Gingerbase plugin
by pkulkark@linux.vnet.ibm.com
From: Pooja Kulkarni <pkulkark(a)linux.vnet.ibm.com>
v2 changes:
Updated license header to project Ginger Base
v1:
This patch moves the file disks.py from kimchi plugin to gingerbase plugin
so that it may be used by both kimchi and ginger without code duplication.
Import statement in plugins/kimchi/model/host.py has been modified for the same.
Pooja Kulkarni (1):
Updated license header to include Project Gingerbase
src/wok/plugins/gingerbase/disks.py | 198 +++++++++++++++++++++++++++++++++++
src/wok/plugins/kimchi/model/host.py | 2 +-
2 files changed, 199 insertions(+), 1 deletion(-)
create mode 100644 src/wok/plugins/gingerbase/disks.py
--
2.1.0
9 years, 1 month