Quantum REST Proxy Plug-in for Big Switch and FloodLight Controllers
QuantumRestProxy provides a generic quantum plugin that translates all plugin function calls to equivalent authenticated REST calls to a set of redundant external network controllers. It also keeps persistent store for all quantum state to allow for re-sync of the external controller(s), if required.
The local state on the plugin also allows for local response and fast-fail semantics where it can be determined based on the local persistent store.
Network controller specific code is decoupled from this plugin and expected to reside on the controller itself (via the REST interface).
External REST API used by proxy is the same API as defined for quantum (JSON subset) with some additional parameters (gateway on network-create and macaddr on port-attach) on an additional PUT to do a bulk dump of all persistent data.
Bases: quantum.db.db_base_plugin_v2.QuantumDbPluginV2, quantum.db.l3_db.L3_NAT_db_mixin
Create a network, which represents an L2 network segment which can have a set of subnets and ports associated with it. :param context: quantum api request context :param network: dictionary describing the network
| Returns: | a sequence of mappings with the following signature: |
|---|
“id”: UUID representing the network. “name”: Human-readable name identifying the network. “tenant_id”: Owner of network. NOTE: only admin user can specify
a tenant_id other than its own.
“subnets”: Subnets associated with this network.
}
| Raises : | RemoteRestError |
|---|
Create a port, which is a connection point of a device (e.g., a VM NIC) to attach to a L2 Quantum network. :param context: quantum api request context :param port: dictionary describing the port
| Returns: |
|---|
“id”: uuid represeting the port. “network_id”: uuid of network. “tenant_id”: tenant_id “mac_address”: mac address to use on this port. “admin_state_up”: Sets admin state of port. if down, port
does not forward packets.
}
| Raises : | exceptions.NetworkNotFound |
|---|---|
| Raises : | exceptions.StateInvalid |
| Raises : | RemoteRestError |
Delete a network. :param context: quantum api request context :param id: UUID representing the network to delete.
| Returns: | None |
|---|---|
| Raises : | exceptions.NetworkInUse |
| Raises : | exceptions.NetworkNotFound |
| Raises : | RemoteRestError |
Delete a port. :param context: quantum api request context :param id: UUID representing the port to delete.
| Raises : | exceptions.PortInUse |
|---|---|
| Raises : | exceptions.PortNotFound |
| Raises : | exceptions.NetworkNotFound |
| Raises : | RemoteRestError |
Updates the properties of a particular Virtual Network. :param context: quantum api request context :param net_id: uuid of the network to update :param network: dictionary describing the updates
| Returns: | a sequence of mappings with the following signature: |
|---|
“id”: UUID representing the network. “name”: Human-readable name identifying the network. “tenant_id”: Owner of network. NOTE: only admin user can
specify a tenant_id other than its own.
“subnets”: Subnets associated with this network.
}
| Raises : | exceptions.NetworkNotFound |
|---|---|
| Raises : | RemoteRestError |
Update values of a port. :param context: quantum api request context :param id: UUID representing the port to update. :param port: dictionary with keys indicating fields to update.
| Returns: | a mapping sequence with the following signature: |
|---|
“id”: uuid represeting the port. “network_id”: uuid of network. “tenant_id”: tenant_id “mac_address”: mac address to use on this port. “admin_state_up”: sets admin state of port. if down, port
does not forward packets.
}
| Raises : | exceptions.StateInvalid |
|---|---|
| Raises : | exceptions.PortNotFound |
| Raises : | RemoteRestError |
Bases: quantum.db.dhcp_rpc_base.DhcpRpcCallbackMixin
Bases: object
Defining success codes as required. Note: We assume any valid 2xx as being successful response.
Define failure codes as required. Note: We assume 301-303 is a failure, and try the next server in the server pool.