Metaswitch/calico-neutron — pull request #2 by Lukasa (2014-07-11 10:13:13+00:00)
Title: Patch the metadata agent and proxy to function in flat networks

This patch enables the metadata agent and the metadata namespace proxy to function correctly in flat networks.

The metadata proxy can now be launched with the `--flat` flag, which takes a UUID. This flag instructs the proxy not to bother adding headers signaling router or network. This is necessary because Calico OpenStack deployments do not have routers, and each compute node may have guests on many networks.

For the metadata agent, if it receives a proxied request with neither header it will search for the port based on source IP alone. This is acceptable because in Calico-based networks each VM IP is unique. Note that if, for some reason, a non-unique IP is received the request will be rejected.

This is part of the solution for Metaswitch/calico#3.