app/gre_tunnel: implement GRETunnel app

- race masking layer
- implement GRETunnel app: app/gre_tunnel

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu/controller/network.py: add helper functions for tunnel updater

This will be used by tunnel app.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
app/tunnel_port_updater: application that creates/deletes tunnel ports

This application dynamically creates/deletes tunnel ports for GRE tunnel app.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
app/rest: add API to register/update mac address for a given port

Via this API, ryu knows that what mac address is associated with the port.
So ryu can pass/drop packets from the port.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
app/rest: add requirements to path component

This patch adds requirements to path component so that URL is verified.
And simplify with submapper.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
app/client: add mac support

- fix path to 'networks'
- list_macs() must return string object, not implicit None

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
lib/ovs/db_client: library for low-level ovsdb manipulation

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ovs/vsctl: more commands

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ovs/bridge: more helper methods

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
ryu/controller/controller: add a helper method, is_reserved_port()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add support live-migration

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
app_manager: add an function to register an app instance explicitly

will be used by gre_tunnel

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
app_manager: print some info about event flows for --verbose

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>

BRICK dpset
  PROVIDES EventPortModify TO ['PortSet']
  PROVIDES EventPortAdd TO ['QuantumAdapter', 'PortSet']
  PROVIDES EventDP TO ['QuantumAdapter', 'PortSet']
  PROVIDES EventPortDelete TO ['QuantumAdapter', 'PortSet']
  CONSUMES EventOFPSwitchFeatures
  CONSUMES EventOFPStateChange
  CONSUMES EventOFPPortStatus
BRICK conf_switch
  PROVIDES EventConfSwitchDel TO ['TunnelPortUpdater', 'QuantumAdapter']
  PROVIDES EventConfSwitchSet TO ['TunnelPortUpdater', 'QuantumAdapter']
BRICK network
  PROVIDES EventNetworkDel TO ['PortSet']
  PROVIDES EventNetworkPort TO ['TunnelPortUpdater', 'PortSet']
  PROVIDES EventMacAddress TO ['PortSet']
BRICK TunnelPortUpdater
  CONSUMES EventConfSwitchDel
  CONSUMES EventNetworkPort
  CONSUMES EventConfSwitchSet
	:
	:
	:
	:
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
app_manager: print event flow for --verbose

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
app_manager: add some assertions and LOG.info

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
controller/handler: allow set_ev_handler without dispatchers

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
tunnel_port_updater: adapt to the new world order after dispatcher removal

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
gre_tunnel: adapt to the new world order after dispatcher removal

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
fix a fatal typo in GRETunnel _CONTEXTS

netowrk -> network

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
fix a fatal typo in network.py

netowrk_id -> network_id

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>