[Kimchi-devel] [PATCH] [Kimchi 1/5] VEPA network support: API and i18n changes

dhbarboza82 at gmail.com dhbarboza82 at gmail.com
Thu Jan 21 13:39:11 UTC 2016


From: Daniel Henrique Barboza <dhbarboza82 at gmail.com>

This patch includes API and message changes to support
VEPA networks in Kimchi:

- API.json: added 'vepa' as a valid connection in the networks
API

- docs/API.md: added 'vepa' as a valid connection in the networks
API. A new attribute called 'vepa_devs' was created to declare
one or more VEPA physical devices.

- i18n.py: changed one message and added an additional message.

Signed-off-by: Daniel Henrique Barboza <dhbarboza82 at gmail.com>
---
 API.json    | 2 +-
 docs/API.md | 5 +++++
 i18n.py     | 5 +++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/API.json b/API.json
index 2b64d07..2724d21 100644
--- a/API.json
+++ b/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|macvtap$",
+                    "pattern": "^isolated|nat|bridge|macvtap|vepa$",
                     "required": true,
                     "error": "KCHNET0012E"
                 },
diff --git a/docs/API.md b/docs/API.md
index 01ee432..ff9159c 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -637,12 +637,17 @@ A interface represents available interface on host.
         * 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.
+        * vepa: All traffic will be forward to one or more physical devices
+                directly connected to a VEPA-enabled switch.
     * 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 "macvtap" and "bridge" connections, the
                               interface can be a nic, bridge or bonding device.
     * vlan_id *(optional)*: VLAN tagging ID for the macvtap bridge network.
+    * vepa_devs *(required for VEPA)*: list of devices that composes the vepa network.
+                                       At least one device must be present.
+
 
 ### Resource: Network
 
diff --git a/i18n.py b/i18n.py
index a575922..bfa85ec 100644
--- a/i18n.py
+++ b/i18n.py
@@ -1,7 +1,7 @@
 #
 # Project Kimchi
 #
-# Copyright IBM, Corp. 2014-2015
+# Copyright IBM, Corp. 2014-2016
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -259,7 +259,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, macvtap and bridge"),
+    "KCHNET0012E": _("Supported network types are isolated, NAT, macvtap, bridge and vepa"),
     "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"),
@@ -274,6 +274,7 @@ messages = {
     "KCHNET0025E": _("Unable to create bridge %(name)s. Details: %(err)s"),
     "KCHNET0026E": _("Open VSwitch bridges can only host bridged networks."),
     "KCHNET0027E": _("Unable to create bridge with NetworkManager enabled. Disable it and try again."),
+    "KCHNET0028E": _("Creating a VEPA network requires interfaces declared in 'vepa_devs' parameter."),
 
     "KCHSR0001E": _("Storage server %(server)s was not used by Kimchi"),
 
-- 
2.5.0




More information about the Kimchi-devel mailing list