Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

...

The module is not enabled by default. It must be added to the configuration file and Floodlight must be restarted in order for it to be loaded. A sample configuration file is posted below. The module is called "VirtualNetworkFilter". The default configuration file used for this is in src/main/resources/quantum.properties.

Code Block
xml
xml

# The default configuration for openstack
floodlight.modules = net.floodlightcontroller.storage.memory.MemoryStorageSource,\
net.floodlightcontroller.staticflowentry.StaticFlowEntryPusherStaticEntryPusher,\
net.floodlightcontroller.forwarding.Forwarding,\
net.floodlightcontroller.jython.JythonDebugInterface,\
net.floodlightcontroller.counter.CounterStore,\
net.floodlightcontroller.perfmon.PktInProcessingTime,\
net.floodlightcontroller.ui.web.StaticWebRoutable,\
net.floodlightcontroller.virtualnetwork.VirtualNetworkFilter
net.floodlightcontroller.restserver.RestApiServer.port = 8080
net.floodlightcontroller.core.FloodlightProvider.openflowport = 66336653
net.floodlightcontroller.jython.JythonDebugInterface.port = 6655

...

If you are using the Floodlight VM the configuration file is already on the machine. Simply execute these commands to enable it.

Code Block
xml
xml

floodlight@localhost:~$ touch /opt/floodlight/floodlight/feature/quantum
floodlight@localhost:~$ sudo service floodlight stop
floodlight@localhost:~$ sudo service floodlight start

...

URI

Method

URI Arguments

Data

Data Fields

Description

/networkService/v1.1/tenants/{tenant}/networks/{network}

PUT/POST/DELETE

Tenant: Currently ignored 
Network: The ID (not name) of the network

{"network": { "gateway": "<IP>", "name": "<Name>" }}\

IP: Gateway IP in "1.1.1.1" format, can be null 
Name: Network name a string

Creates a new virtual network. Name and ID are required, gateway is optional.

/networkService/v1.1/tenants/{tenant}/networks/{network}/ports/{port}/attachment

PUT/DELETE

Tenant: Currently ignored 
Network: The ID (not name) of the network
Port: Logical port name

{"attachment": {"id": "<Network ID>", "mac": "<MAC>"}} 

Network ID: Network ID as a string, the one you just created 
MAC: MAC address in "00:00:00:00:00:09" format

Attaches a host to a virtual network.

/networkService/v1.1/tenants/{tenant}/networks

GET

Tenant: Currently ignored

None

None

Shows all networks and their gateway, ID, and hosts mac in json format

...

Creating a virtual network named "VirtualNetwork1", the ID is "NetworkId1", the gateway is "10.0.0.7", and the tenant is "default" (which is currently ignored).

Code Block
xml
xml

curl -X PUT -d '{ "network": { "gateway": "10.0.0.7", "name": "virtualNetwork1" } }' http://localhost:8080/networkService/v1.1/tenants/default/networks/NetworkId1

Adding a host to VirtualNetwork1 with the MAC address "00:00:00:00:00:08" and the port "port1".

Code Block
xml
xml

curl -X PUT -d '{"attachment": {"id": "NetworkId1", "mac": "00:00:00:00:00:08"}}' http://localhost:8080/networkService/v1.1/tenants/default/networks/NetworkId1/ports/port1/attachment

...