I forgot to include this patch.

>From c2f88572539aceb84659eb2376cf185be8a2066d Mon Sep 17 00:00:00 2001
Message-Id: 
<c2f88572539aceb84659eb2376cf185be8a2066d.1348814505.git.yamah...@valinux.co.jp>
In-Reply-To: <[email protected]>
References: <[email protected]>
From: Isaku Yamahata <[email protected]>
Date: Fri, 28 Sep 2012 15:40:36 +0900
Subject: [PATCH] lib/synchronized: introduce helper decorator to lock

Signed-off-by: Isaku Yamahata <[email protected]>
---
 ryu/lib/synchronized.py |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 ryu/lib/synchronized.py

diff --git a/ryu/lib/synchronized.py b/ryu/lib/synchronized.py
new file mode 100644
index 0000000..d1129db
--- /dev/null
+++ b/ryu/lib/synchronized.py
@@ -0,0 +1,29 @@
+# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
+# Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import functools
+
+
+def synchronized(lockname):
+    def _synchronized(meth):
+        @functools.wraps(meth)
+        def wrapped(self, *args, **kwargs):
+            lock = getattr(self, lockname)
+            with lock:
+                meth(self, *args, **kwargs)
+        return wrapped
+
+    return _synchronized
-- 
1.7.10.4



On Fri, Sep 28, 2012 at 03:38:14PM +0900, Isaku Yamahata wrote:
> This is a revised version of GRE tunnel support,  which is greatly simplified
> from the previous version.
> dispatcher.cork/uncork should be fixed, but I'd like to post the patch first.
> 
> Known issue:
> If net namespace is used, instance metadata can't be retrieved. This
> is because routing must be set manually. For more details, please see
> https://review.openstack.org/#/c/13693/1/stack.sh
> 
> Changes v2 -> v3:
> - pylint
> - fixed some race condition
> 
> Changes v1 -> v2:
> - eliminated cork/uncork.
> - teash OVSVethInterfaceDriver
> - reorder patch series
> 
> quantum and openvswitch need patch. the patched trees are available
> for convenience. patches devstack is also avaiable.
> git://github.com/yamahata/ryu.git ryu-gre-tunnel-sep-28-2012
> git://github.com/yamahata/openvswitch.git ryu-gre-tunnel-sep-28-2012
> git://github.com/yamahata/quantum.git ryu-gre-tunnel-sep-28-2012
> git://github.com/yamahata/devstack.git ryu-gre-tunnel-sep-26-2012
> 
> thanks,
> 
> Isaku Yamahata (32):
>   utils: avoid double import and don't append sys.path with same path
>   ryu/controller/controller: add a helper method, is_reserved_port()
>   wsgi/routes: add regex pattern for each REST component
>   app/rest: add requirements to path component
>   ryu/exception: introduce more exception for later use
>   app/rest_nw_id: add port type for reserved port and vport-gre
>   ryu/app/client: factor out rest client code
>   app/client: add helper function to ignore NOT_FOUND, 404
>   controller/network: factor out network.py and add event generator for
>     gre tunnel and helper methods
>   dpset: add port{add, delete, modify} event for convenience and helper
>     functions
>   app/rest: add API to register/update mac address for a given port
>   app/rest: add requirements to path component
>   app/client: add mac support
>   bin/ryu-client: support mac address tracking
>   controller/tunnel: introduce new class that tracks infos related to
>     tunneling
>   app/rest_tunnel: REST API for tunnel
>   app/client: add tunnel client
>   bin/ryu-client: support gre tunnel client
>   app/gre_tunnel: implement GRETunnel app
>   controller/switch_conf: add interface to store per-switch
>     configuration
>   ryu/app: REST API to set per-switch configuration
>   ryu/app/client: support conf_switch
>   bin/ryu-client: support switch_conf
>   exception: Add OVSBridgeNotFound exception
>   ryu/controller/network.py: add helper functions for tunnel updater
>   lib/ovs/db_client: library for low-level ovsdb manipulation
>   lib/ovs: add constants for ovsdb Open_vSwitch db
>   lib/ovs/vsctl: python reimplementation of ovs-vsctl
>   ovs/bridge: helper class to manipulate ovs bridge
>   app/tunnel_port_updater: application that creates/deletes tunnel
>     ports
>   app: Add quantum adapter
>   bin/ryu-manager: work around gflags of quantum_adapter
> 
>  bin/ryu-client                 |   37 +-
>  bin/ryu-manager                |    4 +-
>  ryu/app/client.py              |  171 ++++-
>  ryu/app/conf_switch_key.py     |   18 +
>  ryu/app/gre_tunnel.py          |  926 +++++++++++++++++++++++
>  ryu/app/quantum_adapter.py     |  578 +++++++++++++++
>  ryu/app/rest.py                |  146 +++-
>  ryu/app/rest_conf_switch.py    |  173 +++++
>  ryu/app/rest_nw_id.py          |   20 +-
>  ryu/app/rest_tunnel.py         |  210 ++++++
>  ryu/app/tunnel_port_updater.py |  470 ++++++++++++
>  ryu/app/wsgi_path.py           |   18 +
>  ryu/controller/conf_switch.py  |  105 +++
>  ryu/controller/controller.py   |    3 +
>  ryu/controller/dpset.py        |  105 ++-
>  ryu/controller/network.py      |  334 +++++++--
>  ryu/controller/tunnels.py      |  197 +++++
>  ryu/exception.py               |   20 +
>  ryu/lib/dpid.py                |    4 +-
>  ryu/lib/mac.py                 |    2 +
>  ryu/lib/ovs/bridge.py          |  228 ++++++
>  ryu/lib/ovs/db_client.py       |  132 ++++
>  ryu/lib/ovs/vsctl.py           | 1601 
> ++++++++++++++++++++++++++++++++++++++++
>  ryu/lib/ovs/vswitch_idl.py     |  172 +++++
>  ryu/utils.py                   |   27 +-
>  25 files changed, 5576 insertions(+), 125 deletions(-)
>  create mode 100644 ryu/app/conf_switch_key.py
>  create mode 100644 ryu/app/gre_tunnel.py
>  create mode 100644 ryu/app/quantum_adapter.py
>  create mode 100644 ryu/app/rest_conf_switch.py
>  create mode 100644 ryu/app/rest_tunnel.py
>  create mode 100644 ryu/app/tunnel_port_updater.py
>  create mode 100644 ryu/app/wsgi_path.py
>  create mode 100644 ryu/controller/conf_switch.py
>  create mode 100644 ryu/controller/tunnels.py
>  create mode 100644 ryu/lib/ovs/__init__.py
>  create mode 100644 ryu/lib/ovs/bridge.py
>  create mode 100644 ryu/lib/ovs/db_client.py
>  create mode 100644 ryu/lib/ovs/vsctl.py
>  create mode 100644 ryu/lib/ovs/vswitch_idl.py
> 
> -- 
> 1.7.10.4
> 

-- 
yamahata

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to