blob: 3f09108eb497acd55724426ae5ee87a6e4b5f2ad [file] [log] [blame]
daniel parkb5817102018-02-15 00:18:51 +09001/*
2 * Copyright 2018-present Open Networking Foundation
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.openstacknetworking.api;
17
18import org.onlab.packet.IpAddress;
19import org.onlab.packet.MacAddress;
20import org.onlab.packet.VlanId;
21
22/**
23 * Representation of external peer router.
24 */
25public interface ExternalPeerRouter {
Jian Li5e2ad4a2018-07-16 13:40:53 +090026
daniel parkb5817102018-02-15 00:18:51 +090027 /**
Jian Li5e2ad4a2018-07-16 13:40:53 +090028 * Returns external peer router IP address.
daniel parkb5817102018-02-15 00:18:51 +090029 *
30 * @return ip address.
31 */
Jian Li5e2ad4a2018-07-16 13:40:53 +090032 IpAddress ipAddress();
daniel parkb5817102018-02-15 00:18:51 +090033
34 /**
Jian Li5e2ad4a2018-07-16 13:40:53 +090035 * Returns external peer router MAC address.
daniel parkb5817102018-02-15 00:18:51 +090036 *
37 * @return mac address
38 */
Jian Li5e2ad4a2018-07-16 13:40:53 +090039 MacAddress macAddress();
daniel parkb5817102018-02-15 00:18:51 +090040
41 /**
Jian Li5e2ad4a2018-07-16 13:40:53 +090042 * Returns external peer router VLAN ID.
daniel parkb5817102018-02-15 00:18:51 +090043 *
44 * @return vlan id
45 */
Jian Li5e2ad4a2018-07-16 13:40:53 +090046 VlanId vlanId();
47
48 /**
49 * Builder of new external peer router.
50 */
51 interface Builder {
52
53 /**
54 * Builds an immutable external peer router instance.
55 *
56 * @return external peer router
57 */
58 ExternalPeerRouter build();
59
60 /**
61 * Returns router builder with supplied IP address.
62 *
63 * @param ipAddress IP address of external peer router
64 * @return peer router builder
65 */
66 Builder ipAddress(IpAddress ipAddress);
67
68 /**
69 * Returns router builder with supplied MAC address.
70 *
71 * @param macAddress MAC address of external peer router
72 * @return peer router builder
73 */
74 Builder macAddress(MacAddress macAddress);
75
76 /**
77 * Returns router builder with supplied VLAN ID.
78 *
79 * @param vlanId VLAN ID of external peer router
80 * @return peer router builder
81 */
82 Builder vlanId(VlanId vlanId);
83 }
daniel parkb5817102018-02-15 00:18:51 +090084}