Virtual Network Filter REST API

For more information about configuration see the documentation here

VirtualNetworkFilter REST API

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

Examples using curl

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).

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".

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