dana-i2cat/opennaas — pull request #634 by adrian-rosello (2013-07-31 06:52:42+00:00)
Title: Feature/openstack quantum plugin

This pull request introduces the OpenNaaS Quantum support.

A new resource has been created: "quantumresource". It's model contain three main entities: Network, ports and subnetworks, based on the Quantum API specification.

QuantumAPIV2Capability is the single capability developed for this resource right now. It exposes all methods called by the RESTProxyPlugin of Quantum for the three entities:

- Network: create, update and remove network.
- Port: create, update, attach and remove network.
- Subnetwork: information is send as an update over the network it belongs to.

The capability includes two main components: the NetworkBuilder and the QuantumModelController.
The NetworkBuilder is responsible of translating the information received by the capability into request to other OpenNaaS resources. It has been designed in a flexible way, so many different builders can be developed to the capability. In our case, it includes the AutobahnBuilder. It's instantiated when the capability is created (maybe we can find a better way in the future).

The AutobahnBuilder reads information from a configuration file in platform. It defines the name of the autobahn resource to use, the ports for the circuit, and the vlans to be configured in them. With this information, the AutobahnBuilder calls resource manager to get the specified resource and make a requestconnection to its l2bod capability.

The quantum resource would need to access to the created network information in the future (for example, to destroy it). Therefore, the model was extended with a list of network models. It stores the data of all networks "created" by the NetworkBuilder(s). Every NetworkModel of QuantumResource consists of the list of OpenNaaS resources it has been mapped to, and the network elements used to provide the virtual/physical network. For example: in our case, the network model consists of an autobahn resource, which stores as network elements the BoDLinks created to satisfy the network creation.

The ModelController's goal is to upodate information of QuantumResource model.