blob: 051469ea36a2e314de12ee168e0f3a9c09fee202 [file] [log] [blame]
Pingping Linffa27d32015-04-30 14:41:03 -07001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.virtualbng;
17
18import org.onlab.packet.IpAddress;
Pingping Lindead2052015-06-08 16:07:23 -070019import org.onlab.packet.MacAddress;
Pingping Linffa27d32015-04-30 14:41:03 -070020
21/**
22 * Provides service of the virtual BNG.
23 */
24public interface VbngService {
25
26 /**
27 * Creates a virtual BNG.
28 * <p>
29 * It firstly finds out an available local public IP address. Then, it
30 * sets up paths between the host configured with private IP and
31 * next hop. Finally it returns the public IP address.
32 * </p>
33 *
34 * @param privateIpAddress the private IP address
Pingping Lindead2052015-06-08 16:07:23 -070035 * @param hostMacAddress the MAC address for the IP address
36 * @param hostName the host name for the IP address
Pingping Linffa27d32015-04-30 14:41:03 -070037 * @return the public address if a virtual BGN is successfully created,
38 * otherwise return null
39 */
Pingping Lindead2052015-06-08 16:07:23 -070040 IpAddress createVbng(IpAddress privateIpAddress, MacAddress hostMacAddress,
41 String hostName);
Pingping Linffa27d32015-04-30 14:41:03 -070042
Pingping Lind2afaf22015-06-02 10:46:29 -070043 /**
44 * Deletes a virtual BNG.
45 *
46 * @param privateIpAddress a private IP address
47 * @return the public address assigned for this private IP address if the
48 * virtual BGN exists and is deleted, otherwise return null if
49 * there is no vBNG for this private IP address
50 */
51 IpAddress deleteVbng(IpAddress privateIpAddress);
Pingping Linffa27d32015-04-30 14:41:03 -070052}