blob: 4304a33a535b51193dc9f4ae073c84bc8c6c3a8a [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001package net.floodlightcontroller.virtualnetwork;
2
3import java.util.Collection;
4import net.floodlightcontroller.core.module.IFloodlightService;
5import net.floodlightcontroller.util.MACAddress;
6
7public interface IVirtualNetworkService extends IFloodlightService {
8 /**
9 * Creates a new virtual network. This can also be called
10 * to modify a virtual network. To update a network you specify the GUID
11 * and the fields you want to update.
12 * @param network The network name. Must be unique.
13 * @param guid The ID of the network. Must be unique.
14 * @param gateway The IP address of the network gateway, null if none.
15 */
16 public void createNetwork(String guid, String network, Integer gateway);
17
18 /**
19 * Deletes a virtual network.
20 * @param guid The ID (not name) of virtual network to delete.
21 */
22 public void deleteNetwork(String guid);
23
24 /**
25 * Adds a host to a virtual network. If a mapping already exists the
26 * new one will override the old mapping.
27 * @param mac The MAC address of the host to add.
28 * @param network The network to add the host to.
29 * @param port The logical port name to attach the host to. Must be unique.
30 */
31 public void addHost(MACAddress mac, String network, String port);
32
33 /**
34 * Deletes a host from a virtual network. Either the MAC or Port must
35 * be specified.
36 * @param mac The MAC address to delete.
37 * @param port The logical port the host is attached to.
38 */
39 public void deleteHost(MACAddress mac, String port);
40
41 /**
42 * Return list of all virtual networks.
43 * @return Collection <VirtualNetwork>
44 */
45 public Collection <VirtualNetwork> listNetworks();
46}